[
  {
    "path": ".deepsource.toml",
    "content": "version = 1\n\n[[analyzers]]\nname = \"php\"\n\n[[analyzers]]\nname = \"javascript\"\n\n[[analyzers]]\nname = \"sql\"\n\nexclude_files = [\n\t\"lib/phpmailer/**\",\n]\n"
  },
  {
    "path": ".editorconfig",
    "content": "# rAthena FluxCP EditorConfig file\n# EditorConfig is awesome: https://EditorConfig.org\n\nroot = true\n\n[*]\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.php]\ncharset = utf-8\nend_of_line = lf\nindent_style = space\nindent_size = 4\n\n[*.json]\nindent_style = space\nindent_size = 2\n\n[*.yml]\nindent_style = space\nindent_size = 2\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "name: Bug Report\ndescription: Create an Issue that details broken or unexpected behaviour\nlabels: [Bug Report]\nbody:\n- type: textarea\n  attributes:\n    label: Environment\n    description: |\n      examples:\n        - **PHP**: 8.1\n        - **MySQL**: MariaDB 10\n    value: |\n        - PHP: \n        - MySQL: \n    render: Markdown\n  validations:\n    required: true\n- type: textarea\n  attributes:\n    label: Current Behavior\n    description: A concise description of what you're experiencing.\n  validations:\n    required: true\n- type: textarea\n  attributes:\n    label: Expected Behavior\n    description: A concise description of what you expected to happen.\n  validations:\n    required: false\n- type: textarea\n  attributes:\n    label: Steps To Reproduce\n    description: Steps to reproduce the behavior.\n    placeholder: |\n      1. In this environment...\n      2. With this config...\n      3. Open page '...'\n      4. See error...\n  validations:\n    required: true\n- type: textarea\n  attributes:\n    label: Anything else?\n    description: |\n      Links? References? Anything that will give us more context about the issue you are encountering!\n\n      Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.\n  validations:\n    required: false\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: Forum Support\n    url: https://rathena.org/board/forum/21-web-support/\n    about: You can obtain support for FluxCP on our forum.\n  - name: Discord Support\n    url: https://discord.gg/kMeMXWEvSV\n    about: Chat with others in our fluxcp-support channel.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/enhancement_request.yml",
    "content": "name: Enhancement Request\ndescription: Submit your request for changes to existing code to provide more functionality or QoL changes.\ntitle: \"Enhancement Request\"\nlabels: [Enhancement Request]\nbody:\n- type: textarea\n  attributes:\n    label: Provide Details\n    description: Give as much information as possible in order to get the discussion going.\n  validations:\n    required: true\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE/pull_request_template.md",
    "content": "Fixes # .\n\nChanges proposed in this Pull Request:\n * ?\n * ?\n * ?\n"
  },
  {
    "path": ".github/pull_request_template.md",
    "content": "Fixes # .\n\nChanges proposed in this Pull Request:\n * ?\n * ?\n * ?\n"
  },
  {
    "path": ".github/workflows/codeql.yml",
    "content": "name: \"CodeQL\"\n\non:\n  push:\n    branches: [ \"master\" ]\n  pull_request:\n    branches: [ \"master\" ]\n  schedule:\n    - cron: \"36 3 * * 3\"\n\njobs:\n  analyze:\n    name: Analyze\n    runs-on: ubuntu-latest\n    permissions:\n      actions: read\n      contents: read\n      security-events: write\n\n    strategy:\n      fail-fast: false\n      matrix:\n        language: [ javascript ]\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n\n      - name: Initialize CodeQL\n        uses: github/codeql-action/init@v2\n        with:\n          languages: ${{ matrix.language }}\n          queries: +security-and-quality\n\n      - name: Autobuild\n        uses: github/codeql-action/autobuild@v2\n\n      - name: Perform CodeQL Analysis\n        uses: github/codeql-action/analyze@v2\n        with:\n          category: \"/language:${{ matrix.language }}\"\n"
  },
  {
    "path": ".gitignore",
    "content": "# Images\n/data/items/icons/*.png\n/data/items/images/*.png\n\n/data/jobs/images/F/*.gif\n/data/jobs/images/M/*.gif\n\n/data/monsters/*.png\n/data/monsters/*.gif\n\n# Logs\n/data/logs/errors\n/data/logs/mail\n/data/logs/mysql\n/data/logs/schemas\n/data/logs/transactions\n\n# Caches\n/data/tmp/*.php\n/data/tmp/*.cache\n/data/tmp/emblems\n\n# Non-Default Themes\n/themes/*\n!/themes/default\n!/themes/bootstrap\n!/themes/installer\n\n# Import Configs\n/config/import\n"
  },
  {
    "path": ".htaccess",
    "content": "#RewriteEngine On\n#RewriteBase /\n#RewriteCond %{REQUEST_FILENAME} !-f\n#RewriteCond %{REQUEST_FILENAME} !-d\n#RewriteRule !\\.(js|ico|gif|jpg|png|css|pdf|swf|flv)$ index.php [QSA]\n"
  },
  {
    "path": "LICENSE",
    "content": "\t\t   GNU LESSER GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\n  This version of the GNU Lesser General Public License incorporates\nthe terms and conditions of version 3 of the GNU General Public\nLicense, supplemented by the additional permissions listed below.\n\n  0. Additional Definitions. \n\n  As used herein, \"this License\" refers to version 3 of the GNU Lesser\nGeneral Public License, and the \"GNU GPL\" refers to version 3 of the GNU\nGeneral Public License.\n\n  \"The Library\" refers to a covered work governed by this License,\nother than an Application or a Combined Work as defined below.\n\n  An \"Application\" is any work that makes use of an interface provided\nby the Library, but which is not otherwise based on the Library.\nDefining a subclass of a class defined by the Library is deemed a mode\nof using an interface provided by the Library.\n\n  A \"Combined Work\" is a work produced by combining or linking an\nApplication with the Library.  The particular version of the Library\nwith which the Combined Work was made is also called the \"Linked\nVersion\".\n\n  The \"Minimal Corresponding Source\" for a Combined Work means the\nCorresponding Source for the Combined Work, excluding any source code\nfor portions of the Combined Work that, considered in isolation, are\nbased on the Application, and not on the Linked Version.\n\n  The \"Corresponding Application Code\" for a Combined Work means the\nobject code and/or source code for the Application, including any data\nand utility programs needed for reproducing the Combined Work from the\nApplication, but excluding the System Libraries of the Combined Work.\n\n  1. Exception to Section 3 of the GNU GPL.\n\n  You may convey a covered work under sections 3 and 4 of this License\nwithout being bound by section 3 of the GNU GPL.\n\n  2. Conveying Modified Versions.\n\n  If you modify a copy of the Library, and, in your modifications, a\nfacility refers to a function or data to be supplied by an Application\nthat uses the facility (other than as an argument passed when the\nfacility is invoked), then you may convey a copy of the modified\nversion:\n\n   a) under this License, provided that you make a good faith effort to\n   ensure that, in the event an Application does not supply the\n   function or data, the facility still operates, and performs\n   whatever part of its purpose remains meaningful, or\n\n   b) under the GNU GPL, with none of the additional permissions of\n   this License applicable to that copy.\n\n  3. Object Code Incorporating Material from Library Header Files.\n\n  The object code form of an Application may incorporate material from\na header file that is part of the Library.  You may convey such object\ncode under terms of your choice, provided that, if the incorporated\nmaterial is not limited to numerical parameters, data structure\nlayouts and accessors, or small macros, inline functions and templates\n(ten or fewer lines in length), you do both of the following:\n\n   a) Give prominent notice with each copy of the object code that the\n   Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the object code with a copy of the GNU GPL and this license\n   document.\n\n  4. Combined Works.\n\n  You may convey a Combined Work under terms of your choice that,\ntaken together, effectively do not restrict modification of the\nportions of the Library contained in the Combined Work and reverse\nengineering for debugging such modifications, if you also do each of\nthe following:\n\n   a) Give prominent notice with each copy of the Combined Work that\n   the Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the Combined Work with a copy of the GNU GPL and this license\n   document.\n\n   c) For a Combined Work that displays copyright notices during\n   execution, include the copyright notice for the Library among\n   these notices, as well as a reference directing the user to the\n   copies of the GNU GPL and this license document.\n\n   d) Do one of the following:\n\n       0) Convey the Minimal Corresponding Source under the terms of this\n       License, and the Corresponding Application Code in a form\n       suitable for, and under terms that permit, the user to\n       recombine or relink the Application with a modified version of\n       the Linked Version to produce a modified Combined Work, in the\n       manner specified by section 6 of the GNU GPL for conveying\n       Corresponding Source.\n\n       1) Use a suitable shared library mechanism for linking with the\n       Library.  A suitable mechanism is one that (a) uses at run time\n       a copy of the Library already present on the user's computer\n       system, and (b) will operate properly with a modified version\n       of the Library that is interface-compatible with the Linked\n       Version. \n\n   e) Provide Installation Information, but only if you would otherwise\n   be required to provide such information under section 6 of the\n   GNU GPL, and only to the extent that such information is\n   necessary to install and execute a modified version of the\n   Combined Work produced by recombining or relinking the\n   Application with a modified version of the Linked Version. (If\n   you use option 4d0, the Installation Information must accompany\n   the Minimal Corresponding Source and Corresponding Application\n   Code. If you use option 4d1, you must provide the Installation\n   Information in the manner specified by section 6 of the GNU GPL\n   for conveying Corresponding Source.)\n\n  5. Combined Libraries.\n\n  You may place library facilities that are a work based on the\nLibrary side by side in a single library together with other library\nfacilities that are not Applications and are not covered by this\nLicense, and convey such a combined library under terms of your\nchoice, if you do both of the following:\n\n   a) Accompany the combined library with a copy of the same work based\n   on the Library, uncombined with any other library facilities,\n   conveyed under the terms of this License.\n\n   b) Give prominent notice with the combined library that part of it\n   is a work based on the Library, and explaining where to find the\n   accompanying uncombined form of the same work.\n\n  6. Revised Versions of the GNU Lesser General Public License.\n\n  The Free Software Foundation may publish revised and/or new versions\nof the GNU Lesser General Public License from time to time. Such new\nversions will be similar in spirit to the present version, but may\ndiffer in detail to address new problems or concerns.\n\n  Each version is given a distinguishing version number. If the\nLibrary as you received it specifies that a certain numbered version\nof the GNU Lesser General Public License \"or any later version\"\napplies to it, you have the option of following the terms and\nconditions either of that published version or of any later version\npublished by the Free Software Foundation. If the Library as you\nreceived it does not specify a version number of the GNU Lesser\nGeneral Public License, you may choose any version of the GNU Lesser\nGeneral Public License ever published by the Free Software Foundation.\n\n  If the Library as you received it specifies that a proxy can decide\nwhether future versions of the GNU Lesser General Public License shall\napply, that proxy's public statement of acceptance of any version is\npermanent authorization for you to choose that version for the\nLibrary.\n"
  },
  {
    "path": "README.md",
    "content": "FluxCP\n======\n[![DeepSource](https://app.deepsource.com/gh/rathena/FluxCP.svg/?label=active+issues&show_trend=true&token=nhkIfid6qRIZxl2INWaaV4Qb)](https://app.deepsource.com/gh/rathena/FluxCP/?ref=repository-badge)\n[![Open Issues](https://img.shields.io/github/issues/rathena/FluxCP.svg?logo=github&logoWidth=18&color=yellow)](https://lgtm.com/projects/g/rathena/FluxCP/alerts/)\n[![Open PRs](https://img.shields.io/github/issues-pr/rathena/FluxCP.svg?logo=github&logoWidth=18&color=blue)](https://lgtm.com/projects/g/rathena/FluxCP/alerts/)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4d1c0a43c0864764b3d3dc5ed2d93192)](https://www.codacy.com/gh/rathena/FluxCP/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=rathena/FluxCP&amp;utm_campaign=Badge_Grade)\n\nFlux Control Panel (FluxCP) for rAthena servers.\n\nRequirements\n---------\n* PHP 7.3 or newer\n* PDO and PDO-MYSQL extensions for PHP (including PHP_MYSQL support)\n* MySQL 5 or newer\n* Optional: GD2 (for guild emblems and registration CAPTCHA)\n* Optional: Tidy (for cleaner HTML output)\n* Optional: mod_rewrite support for UseCleanUrls feature\n* Optional: [Item images](http://rathena.org/board/files/file/2509-item-images/)\n\n\nWhat's New?\n---------\n* The description files are kept upto-date with each new commit from rAthena.\n* Pre-integrated themes:\n\t- default\n\t- Bootstrap\n\n* Built-In:\n\t- News and Pages CMS with integrated TinyMCE\n\t- Service Desk (ITIL Incident Management style support ticket system)\n\t- Additional Logs\n\t- More Ranking Lists\n    - Discord Integration\n    - Google ReCaptcha\n    - Remote AtCommand functionality\n\n\nHow To ... ?\n---------\nWe have a small doc library that covers:\n* Basic User Documentation\n    - Installation\n    - [Themes](https://github.com/rathena/FluxCP/blob/master/doc/user_theme.md)\n    - [Languages](https://github.com/rathena/FluxCP/blob/master/doc/user_lang.md)\n    - Installing Addons\n    - Updating FluxCP\n\n* Developer Documentation\n    - Creating an Addon\n    - Providing Addon updates\n    - Creating a custom Theme\n\n\nJoin the Discussion\n---------\nWe have a discord server separate from rAthena just for FluxCP stuff!\nThe channels there can be used to obtain help, discuss testing, view anonymous feedback log, Github commits, etc.\nhttps://discord.gg/kMeMXWEvSV\n\n\nExtra Credits\n---------\nOriginal FluxCP created by Paradox924X and Byteflux with additional contributions from Xantara.\nSome works from other users have been integrated into this project.\n"
  },
  {
    "path": "addons/helloworld/config/access.php",
    "content": "<?php\nreturn array(\n\t'modules' => array(\n\t\t'helloworld' => array(\n\t\t\t'index' => AccountLevel::ADMIN\n\t\t)\n\t),\n\t'features' => array(\n\t\t// None.\n\t)\n)\n?>\n"
  },
  {
    "path": "addons/helloworld/config/addon.php",
    "content": "<?php\nreturn array(\n\t'MenuItems' => array(\n\t\t//'Hello World' => array('module' => 'helloworld')\n\t)\n)\n?>\n"
  },
  {
    "path": "addons/helloworld/lang/en_us.php",
    "content": "<?php\nreturn array(\n\t'HelloWorld'       => 'Hello, World!',\n\t'HelloInfoText'    => 'This is a “Hello World” sample from an add-on!',\n\t'HelloVersionText' => 'Your Flux Control Panel version is %s'\n);\n?>\n"
  },
  {
    "path": "addons/helloworld/lang/ko_kr.php",
    "content": "<?php\nreturn array(\n\t'HelloWorld'       => '안녕하세요!',\n\t'HelloInfoText'    => '현제보고계시는건 샘플 애드온 프로그램입니다!',\n\t'HelloVersionText' => '지금 사용하고계시는 플럭스 버젼은 %s입니다.'\n);\n?>\n"
  },
  {
    "path": "addons/helloworld/modules/helloworld/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$fluxVersion  = Flux::VERSION;\n$fluxVersion .= Flux::REPOSVERSION ? '.'.Flux::REPOSVERSION : '';\n?>\n"
  },
  {
    "path": "addons/helloworld/themes/default/helloworld/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo Flux::message('HelloWorld') ?></h2>\n<p><?php echo Flux::message('HelloInfoText') ?></p>\n<p><?php printf(Flux::message('HelloVersionText'), $fluxVersion) ?></p>\n"
  },
  {
    "path": "config/.htaccess",
    "content": "Order deny,allow\nDeny from all\n"
  },
  {
    "path": "config/access.php",
    "content": "<?php\n// This file should control all access to specified modules and actions.\nreturn array(\n\t// Module/action permissions.\n\t// These are handled during runtime by Flux.\n\t// '*' is a default that is checked for any action that has not been\n\t// specified an access level.\n\t'modules' => array(\n\t\t'main'      => array(\n\t\t\t'*'        => AccountLevel::ANYONE\n\t\t),\n\t\t'donate'    => array(\n\t\t\t'index'    => AccountLevel::ANYONE,\n\t\t\t'notify'   => AccountLevel::ANYONE,\n\t\t\t'update'   => AccountLevel::ANYONE,\n\t\t\t'complete' => AccountLevel::ANYONE,\n\t\t\t'history'  => AccountLevel::NORMAL,\n\t\t\t'trusted'  => AccountLevel::NORMAL\n\t\t),\n\t\t'purchase'  => array(\n\t\t\t'index'    => AccountLevel::ANYONE,\n\t\t\t'add'      => AccountLevel::ANYONE,\n\t\t\t'clear'    => AccountLevel::NORMAL,\n\t\t\t'cart'     => AccountLevel::NORMAL,\n\t\t\t'checkout' => AccountLevel::NORMAL,\n\t\t\t'remove'   => AccountLevel::NORMAL,\n\t\t\t'pending'  => AccountLevel::NORMAL\n\t\t),\n\t\t'itemshop'  => array(\n\t\t\t'add'      => AccountLevel::ADMIN,\n\t\t\t'edit'     => AccountLevel::ADMIN,\n\t\t\t'delete'   => AccountLevel::ADMIN,\n\t\t\t'imagedel' => AccountLevel::ADMIN\n\t\t),\n\t\t'account'   => array(\n\t\t\t'index'    => AccountLevel::LOWGM,\n\t\t\t'view'     => AccountLevel::NORMAL,\n\t\t\t'create'   => AccountLevel::UNAUTH,\n\t\t\t'login'    => AccountLevel::UNAUTH,\n\t\t\t'logout'   => AccountLevel::NORMAL,\n\t\t\t'transfer' => AccountLevel::NORMAL,\n\t\t\t'xferlog'  => AccountLevel::NORMAL,\n\t\t\t'cart'     => AccountLevel::NORMAL,\n\t\t\t'changepass' => AccountLevel::NORMAL,\n\t\t\t'edit'       => AccountLevel::ADMIN,\n\t\t\t'changesex'  => AccountLevel::NORMAL,\n\t\t\t'confirm'    => AccountLevel::UNAUTH,\n\t\t\t'resend'     => AccountLevel::UNAUTH,\n\t\t\t'resetpass'  => AccountLevel::UNAUTH,\n\t\t\t'resetpw'    => AccountLevel::UNAUTH,\n\t\t\t'changemail' => AccountLevel::NORMAL,\n\t\t\t'confirmemail' => AccountLevel::NORMAL,\n\t\t\t'prune'        => AccountLevel::ANYONE\n\t\t),\n\t\t'character'\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::LOWGM,\n\t\t\t'view'\t\t\t=> AccountLevel::NORMAL,\n\t\t\t'online'\t\t=> AccountLevel::ANYONE,\n\t\t\t'prefs'\t\t\t=> AccountLevel::NORMAL,\n\t\t\t'changeslot'\t=> AccountLevel::NORMAL,\n\t\t\t'resetlook'\t\t=> AccountLevel::NORMAL,\n\t\t\t'resetpos'\t\t=> AccountLevel::NORMAL,\n\t\t\t'mapstats'\t\t=> AccountLevel::ANYONE,\n\t\t\t'divorce'\t\t=> AccountLevel::NORMAL\n\t\t),\n\t\t'guild'\t\t=> array(\n\t\t\t'emblem'\t\t=> AccountLevel::ANYONE,\n\t\t\t'index'\t\t\t=> AccountLevel::LOWGM,\n\t\t\t'export'\t\t=> AccountLevel::ADMIN,\n\t\t\t'view'\t\t\t=> AccountLevel::NORMAL\n\t\t),\n\t\t'castle'\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ANYONE\n\t\t),\n\t\t'economy'\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::NORMAL\n\t\t),\n\t\t'auction'\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::LOWGM\n\t\t),\n\t\t'ranking'\t=> array(\n\t\t\t'character'\t\t=> AccountLevel::ANYONE,\n\t\t\t'guild'\t\t\t=> AccountLevel::ANYONE,\n\t\t\t'zeny'\t\t\t=> AccountLevel::ANYONE,\n\t\t\t'death'\t\t\t=> AccountLevel::ANYONE,\n\t\t\t'homun'\t\t\t=> AccountLevel::ANYONE,\n\t\t\t'swordman'\t\t=> AccountLevel::ANYONE,\n\t\t\t'bowman'\t\t=> AccountLevel::ANYONE,\n\t\t\t'spearman'\t\t=> AccountLevel::ANYONE,\n\t\t\t'mvp'       \t=> AccountLevel::ANYONE,\n\t\t),\n\t\t'item'\t\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ANYONE,\n\t\t\t'view'\t\t\t=> AccountLevel::ANYONE,\n            'iteminfo'\t\t=> AccountLevel::ADMIN\n\t\t),\n\t\t'monster'\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ANYONE,\n\t\t\t'view'\t\t\t=> AccountLevel::ANYONE\n\t\t),\n\t\t'server'\t=> array(\n\t\t\t'status'\t\t=> AccountLevel::ANYONE,\n\t\t\t'status-xml'\t=> AccountLevel::ANYONE,\n\t\t\t'info'\t\t\t=> AccountLevel::ANYONE\n\t\t),\n\t\t'logdata'\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'char'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'cashpoints'\t=> AccountLevel::ADMIN,\n\t\t\t'feeding'\t\t=> AccountLevel::ADMIN,\n\t\t\t'inter'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'command'\t\t=> AccountLevel::ADMIN,\n\t\t\t'branch'\t\t=> AccountLevel::ADMIN,\n\t\t\t'chat'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'login'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'mvp'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'npc'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'pick'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'zeny'\t\t\t=> AccountLevel::ADMIN\n\t\t),\n\t\t'cplog'\t\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'create'\t\t=> AccountLevel::ADMIN,\n\t\t\t'paypal'\t\t=> AccountLevel::ADMIN,\n\t\t\t'login'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'resetpass'\t\t=> AccountLevel::ADMIN,\n\t\t\t'changepass'\t=> AccountLevel::ADMIN,\n\t\t\t'changemail'\t=> AccountLevel::ADMIN,\n\t\t\t'ban'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'ipban'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'txnview'\t\t=> AccountLevel::ADMIN\t\t\t\n\t\t),\n\t\t'ipban'\t\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'add'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'unban'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'edit'\t\t\t=> AccountLevel::ADMIN,\n\t\t\t'remove'\t\t=> AccountLevel::ADMIN\n\t\t),\n\t\t'service'\t=> array(\n\t\t\t'tos'\t\t\t=> AccountLevel::ANYONE\n\t\t),\n\t\t'captcha'\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ANYONE\n\t\t),\n\t\t'install'\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ANYONE,\n\t\t\t'reinstall'\t\t=> AccountLevel::ADMIN\n\t\t),\n\t\t'test'\t\t=> array(\n\t\t\t'*'\t\t\t\t=> AccountLevel::ANYONE\n\t\t),\n\t\t'woe'\t\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ANYONE\n\t\t),\n\t\t'mail'\t\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ADMIN\n\t\t),\n\t\t'history'\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::NORMAL,\n\t\t\t'cplogin'\t\t=> AccountLevel::NORMAL,\n\t\t\t'gamelogin'\t\t=> AccountLevel::NORMAL,\n\t\t\t'emailchange'\t=> AccountLevel::NORMAL,\n\t\t\t'passchange'\t=> AccountLevel::NORMAL,\n\t\t\t'passreset'\t\t=> AccountLevel::NORMAL\n\t\t),\n\t\t'pages'\t\t=> array(\n\t\t\t'index' \t\t=> AccountLevel::ADMIN,\n\t\t\t'add' \t\t\t=> AccountLevel::ADMIN,\n\t\t\t'delete' \t\t=> AccountLevel::ADMIN,\n\t\t\t'edit' \t\t\t=> AccountLevel::ADMIN,\n\t\t\t'content' \t\t=> AccountLevel::ANYONE,\n\t\t),\n\t\t'news'\t\t=> array(\n\t\t\t'index' \t\t=>  AccountLevel::ANYONE,\n\t\t\t'view' \t\t\t=>  AccountLevel::ANYONE,\n\t\t\t'manage'\t\t=>  AccountLevel::ADMIN,\n\t\t\t'add' \t\t\t=>  AccountLevel::ADMIN,\n\t\t\t'edit' \t\t\t=>  AccountLevel::ADMIN,\n\t\t\t'delete' \t\t=> AccountLevel::ADMIN,\n\t\t),\n\t\t'servicedesk'=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::NORMAL,\n\t\t\t'create'\t\t=> AccountLevel::NORMAL,\n\t\t\t'view'\t\t\t=> AccountLevel::NORMAL,\n\t\t\t'staffindex'\t=> AccountLevel::LOWGM,\n\t\t\t'staffview'\t\t=> AccountLevel::LOWGM,\n\t\t\t'staffviewclosed'=> AccountLevel::LOWGM,\n\t\t\t'staffsettings'\t=> AccountLevel::LOWGM,\n\t\t\t'catcontrol'\t=> AccountLevel::HIGHGM\n\t\t),\n\t\t'vending'\t\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ANYONE,\n\t\t\t'viewshop'\t\t=> AccountLevel::ANYONE,\n\t\t),\t\n\t\t'webcommands'\t=> array(\n\t\t\t'index'\t\t\t=> AccountLevel::ADMIN,\n\t\t),\n\t),\n\t// General feature permissions, handled by the modules themselves.\n\t'features' => array(\n\t\t'ViewAccount'\t\t=> AccountLevel::HIGHGM, // View another person's account details.\n\t\t'ViewAccountBanLog'\t=> AccountLevel::HIGHGM, // View another person's account ban log.\n\t\t'DeleteAccount'\t\t=> AccountLevel::ADMIN,  // (not yet implemented)\n\t\t'DeleteCharacter'\t=> AccountLevel::ADMIN,  // (not yet implemented)\n\t\t'SeeAccountPassword'\t=> AccountLevel::NOONE,  // If not using MD5, view another person's password in list.\n\t\t'TempBanAccount'\t=> AccountLevel::LOWGM,  // Has ability to temporarily ban an account.\n\t\t'TempUnbanAccount'\t=> AccountLevel::LOWGM,  // Has ability to remove a temporary ban on an account.\n\t\t'PermBanAccount'\t=> AccountLevel::HIGHGM, // Has ability to permanently ban an account.\n\t\t'PermUnbanAccount'\t=> AccountLevel::HIGHGM, // Has ability to remove a permanent ban on an account.\n\t\t'SearchMD5Passwords'\t=> AccountLevel::NOONE,  // Ability to search MD5'd passwords in list.\n\t\t'ViewCharacter'\t\t=> AccountLevel::HIGHGM, // View another person's character details.\n\t\t'DivorceCharacter'\t=> AccountLevel::LOWGM,  // Divorce another character.\n\t\t'AddShopItem'\t\t=> AccountLevel::ADMIN,  // Ability to add an item to the shop.\n\t\t'EditShopItem'\t\t=> AccountLevel::ADMIN,  // Ability to modify a shop item's details.\n\t\t'DeleteShopItem'     => AccountLevel::ADMIN,  // Ability to remove an item for sale on the shop.\n\t\t'ViewGuild'          => AccountLevel::ADMIN,  // Ability to view another guild's details.\n\t\t'SearchWhosOnline'   => AccountLevel::ANYONE, // Ability to search the \"Who's Online\" page.\n\t\t'ViewOnlinePosition' => AccountLevel::LOWGM,  // Ability to see a character's current map on \"Who's Online\" page.\n\t\t'EditAccountGroupID' => AccountLevel::ADMIN,  // Ability to edit another person's account group ID.\n\t\t'EditAccountBalance' => AccountLevel::ADMIN,  // Ability to edit another person's account balance.\n\t\t'ModifyAccountPrefs' => AccountLevel::ADMIN,  // Ability to modify another person's account preferences.\n\t\t'ModifyCharPrefs'    => AccountLevel::ADMIN,  // Ability to modify another person's character preferences.\n\t\t'IgnoreHiddenPref'   => AccountLevel::LOWGM,  // Ability to see users on \"Who's Online\" page, hidden or not.\n\t\t'IgnoreHiddenPref2'  => AccountLevel::LOWGM,  // Ability to see users on \"Who's Online\" page, hidden by app config or not.\n\t\t'SeeHiddenMapStats'  => AccountLevel::LOWGM,  // Ability to see hidden map statistics.\n\t\t'ChangeSlot'         => AccountLevel::LOWGM,  // Minimum group level required to change another character's slot.\n\t\t'ModifyIpBan'        => AccountLevel::ADMIN,  // Minimum group level required to modify an existing IP ban.\n\t\t'RemoveIpBan'        => AccountLevel::ADMIN,  // Minimum group level required to remove an existing IP ban.\n\t\t'HideFromZenyRank'   => AccountLevel::NORMAL, // Ability to set \"Hide from zeny ranking\" pref.\n\t\t'SeeItemDbScripts'   => AccountLevel::ANYONE, // Ability to see item_db scripts in view page.\n\t\t'SeeItemDb2Scripts'  => AccountLevel::ADMIN,  // Ability to see item_db2 scripts in view page.\n\t\t'ViewRawTxnLogData'  => AccountLevel::ADMIN,  // Minimum group level required to view Raw Transaction Log in txnview page.\n\t\t'ResetLook'          => AccountLevel::LOWGM,  // Minimum group level required to reset another character's look.\n\t\t'ResetPosition'      => AccountLevel::LOWGM,  // Minimum group level required to reset another character's position.\n\t\t'ViewWoeDisallowed'  => AccountLevel::LOWGM,  // Minimum group level required to bypass WoE-disabled page security check.\n\t\t'SeeCpLoginLogPass'  => AccountLevel::NOONE,  // Minimum group level required to see password in CP login log (also requires CpLoginLogShowPassword in application.php)\n\t\t'SearchCpLoginLogPw' => AccountLevel::NOONE,  // Minimum group level required to search through passwords in the CP login log.\n\t\t'SeeCpResetPass'     => AccountLevel::NOONE,  // Minimum group level required to see passwords in CP log's \"password resets\" page.\n\t\t'SearchCpResetPass'  => AccountLevel::NOONE,  // Minimum group level required to search passwords in CP log's \"password resets\" page.\n\t\t'SeeCpChangePass'    => AccountLevel::NOONE,  // Minimum group level required to see passwords in CP log's \"password changes\" page.\n\t\t'SearchCpChangePass' => AccountLevel::NOONE,  // Minimum group level required to search passwords in CP log's \"password changes\" page.\n\t\t'SeeAccountID'       => AccountLevel::LOWGM,  // Minimum group level required to see Account ID on account view and character view pages.\n\t\t'SeeUnknownItems'    => AccountLevel::LOWGM,  // Minimum group level required to see unidentified items as identified.\n\t\t'AvoidSexChangeCost' => AccountLevel::LOWGM,  // Avoid paying cost (if any) for sex changes.\n\t\t\n\t\t'EditHigherPower'    => AccountLevel::NOONE,\n\t\t'BanHigherPower'     => AccountLevel::NOONE\n\t)\n);\n?>\n"
  },
  {
    "path": "config/application.php",
    "content": "<?php\n// This is the application configuration file. All values have been set to\n// the default, and should be changed as needed.\nreturn array(\n\t'ServerAddress'\t\t\t\t=> 'localhost',\t\t\t\t// This value is the hostname:port under which Flux runs. (e.g., example.com or example.com:80)\n\t'BaseURI'\t\t\t\t\t=> 'fluxcp',\t\t\t\t\t\t// The base URI is the base web root on which your application lies.\n\t'ForceHTTPS'\t\t\t\t=> true,\t\t\t\t\t// By default use HTTPS, you should only use HTTP, if you have no certificate available (Note: You may want to visit https://letsencrypt.org)\n\t'InstallerPassword'\t\t\t=> 'secretpassword',\t\t// Installer/updater password.\n\t'RequireOwnership'\t\t\t=> true,\t\t\t\t\t// Require the executing user to be owner of the FLUX_ROOT/data/ directory tree? (Better for security)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// WARNING: This will be mostly IGNORED on non-POSIX-compliant OSes (e.g. Windows).\n\t'DefaultLoginGroup'\t\t\t=> null,\n\t'DefaultCharMapServer'\t\t=> null,\n\t'DefaultLanguage'\t\t\t=> 'en_us',\t\t\t\t\t// Specify the default control panel language (see FLUX_ROOT/lang/ directory for available languages.)\n\t'SiteTitle'\t\t\t\t\t=> 'Flux Control Panel',\t// This value is only used if the theme decides to use it.\n\t'ThemeName'\t\t\t\t\t=> array('default', 'bootstrap'), // Names of the themes you would like list for use in the footer. Themes are in FLUX_ROOT/themes.\n\t'ScriptTimeLimit'\t\t\t=> 0,\t\t\t\t\t\t// Script execution time limit. Specifies (in seconds) how long a page should run before timing out. (0 means forever)\n\t'MissingEmblemBMP'\t\t\t=> 'empty.bmp',\t\t\t\t//\n\t'ItemIconNameFormat'\t\t=> '%d.png',\t\t\t\t// The filename format for item icons (defaults to {itemid}.png).\n\t'ItemImageNameFormat'\t\t=> '%d.png',\t\t\t\t// The filename format for item images (defaults to {itemid}.png).\n\t'MonsterImageNameFormat'\t=> '%d.gif',\t\t\t\t// The filename format for monster images (defaults to {monsterid}.gif).\n\t'JobImageNameFormat'\t\t=> '%d.gif',\t\t\t\t// The filename format for job images (defaults to {jobid}.gif).\n\t'DivinePrideIntegration'\t=> true,\t\t\t\t\t// Dowload monsters and items images from https://www.divine-pride.net if it's not exist.\n\t'ForceEmptyEmblem'\t\t\t=> false,\t\t\t\t\t// Forcefully display empty guild emblems, helpful when you don't have GD2 installed.\n\t'EmblemCacheInterval'\t\t=> 12,\t\t\t\t\t\t// Hourly interval to re-cache guild emblems (set to 0 to disable emblem cache).\n\t'EmblemUseWebservice'\t\t=> true,\t\t\t\t\t// Load emblems from WebService?\n\t'SessionCookieExpire'\t\t=> 48,\t\t\t\t\t\t// Duration in hours.\n\t'AdminMenuGroupLevel'\t\t=> AccountLevel::LOWGM,\t\t// The starting group ID for which module actions are moved into the admin menu for display.\n\t'DateDefaultTimezone'\t\t=> 'UTC',\t\t\t\t\t// The default timezone, consult the PHP manual for valid timezones: http://php.net/timezones (null for defaut system TZ)\n\t'DateFormat'\t\t\t\t=> 'Y-m-d',\t\t\t\t\t// Default DATE format to be displayed in pages.\n\t'DateTimeFormat'\t\t\t=> 'Y-m-d H:i:s',\t\t\t// Default DATETIME format to be displayed in pages.\n\t'ShowSinglePage'\t\t\t=> true,\t\t\t\t\t// Whether or not to show the page numbers even if there's only one page.\n\t'ResultsPerPage'\t\t\t=> 20,\t\t\t\t\t\t// The number of results to display in a paged set, per page.\n\t'PagesToShow'\t\t\t\t=> 10,\t\t\t\t\t\t// The number of page numbers to display at once.\n\t'PageJumpMinimumPages'\t\t=> 1,\t\t\t\t\t\t// Minimum number of required pages before page jump box is shown. (0 to always show!)\n\t'ShowPageJump'\t\t\t\t=> true,\t\t\t\t\t// Whether or not to show the \"Page Jump\" box.\n\t'SingleMatchRedirect'\t\t=> true,\t\t\t\t\t// Whether or not to redirect to view action from index page if only one match is returned (and action is allowed).\n\t'SingleMatchRedirectItem'\t=> false,\t\t\t\t\t// Same as above, for item module.\n\t'SingleMatchRedirectMobs'\t=> false,\t\t\t\t\t// Same as above, for monster module.\n\t'UsernameAllowedChars'\t\t=> 'a-zA-Z0-9_',\t\t\t// PCRE Format Pattern. default: 'a-zA-Z0-9_' (alphanumeric and underscore)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// WARNING: This string isn't escaped so be careful which chars you use!\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// PCRE Pattern Ref: http://php.net/manual/en/pcre.pattern.php\n\t'MinUsernameLength'\t\t\t=> 4,\t\t\t\t\t\t// Minimum username length.\n\t'MaxUsernameLength'\t\t\t=> 23,\t\t\t\t\t\t// Maximum username length.\n\t'MinPasswordLength'\t\t\t=> 8,\t\t\t\t\t\t// Minimum password length.\n\t'MaxPasswordLength'\t\t\t=> 31,\t\t\t\t\t\t// Maximum password length.\n\t'PasswordMinUpper'\t\t\t=> 1,\t\t\t\t\t\t// Number of upper-case letters to require in passwords.\n\t'PasswordMinLower'\t\t\t=> 1,\t\t\t\t\t\t// Number of lower-case letters to require in passwords.\n\t'PasswordMinNumber'\t\t\t=> 1,\t\t\t\t\t\t// Number of numbers to require in passwords.\n\t'PasswordMinSymbol'\t\t\t=> 0,\t\t\t\t\t\t// Number of symbols to require in passwords.\n\t'GMMinPasswordLength'\t\t=> 8,\t\t\t\t\t\t// Minimum password length for GM accounts.\n\t'GMPasswordMinUpper'\t\t=> 1,\t\t\t\t\t\t// Number of upper-case letters to require in passwords for GM accounts.\n\t'GMPasswordMinLower'\t\t=> 1,\t\t\t\t\t\t// Number of lower-case letters to require in passwords for GM accounts.\n\t'GMPasswordMinNumber'\t\t=> 1,\t\t\t\t\t\t// Number of numbers to require in passwords for GM accounts.\n\t'GMPasswordMinSymbol'\t\t=> 1,\t\t\t\t\t\t// Number of symbols to require in passwords for GM accounts.\n\t'RandomPasswordLength'\t\t=> 16,\t\t\t\t\t\t// This is the length of the random password generated by the \"Reset Password\" feature. (NOTE: Hardcoded minimum value of 8)\n\t'AllowUserInPassword'\t\t=> false,\t\t\t\t\t// Whether or not to allow the password to contain the username. (NOTE: A case-insensitive search is performed)\n\t'AllowDuplicateEmails'\t\t=> false,\t\t\t\t\t// Whether or not to allow duplicate e-mails to be used in registration. (See Mailer config options)\n\t'RequireEmailConfirm'\t\t=> false,\t\t\t\t\t// Require e-mail confirmation during registration.\n\t'RequireChangeConfirm'\t\t=> false,\t\t\t\t\t// Require confirmation when changing e-mail addresses.\n\t'EmailConfirmExpire'\t\t=> 48,\t\t\t\t\t\t// E-mail confirmations expire hours. Unconfirmed accounts will expire after this period of time.\n\t'PincodeEnabled'\t\t\t=> true,\t\t\t\t\t// Whether or not the pincode system is enabled in your server. (Check your char_athena.conf file. Enabled by default.)\n\t'MailerFromAddress'\t\t\t=> 'noreply@localhost',\t\t// The e-mail address displayed in the From field.\n\t'MailerFromName'\t\t\t=> 'MailerName',\t\t\t// The name displayed with the From e-mail address.\n\t'MailerUseSMTP'\t\t\t\t=> false,\t\t\t\t\t// Whether or not to use a separate SMTP server for sending mail.\n\t'MailerSMTPUseSSL'\t\t\t=> false,\t\t\t\t\t// Whether or not mailer should connect using SSL (yes for GMail).\n\t'MailerSMTPUseTLS'\t\t\t=> false,\t\t\t\t\t// Same as above SSL setting, but for TLS.  This setting will override the SSL setting.\n\t'MailerSMTPPort'\t\t\t=> null,\t\t\t\t\t// When MailerUseSMTP is true: SMTP server port (mailer will default to 25).\n\t'MailerSMTPHosts'\t\t\t=> null,\t\t\t\t\t// When MailerUseSMTP is true: A string host or array of hosts (e.g., 'host1' or array('host1', 'backuphost')).\n\t'MailerSMTPUsername'\t\t=> null,\t\t\t\t\t// When MailerUseSMTP is true: Authorized username for SMTP server.\n\t'MailerSMTPPassword'\t\t=> null,\t\t\t\t\t// When MailerUseSMTP is true: Authorized password for SMTP server (for above user).\n\t'ServerStatusCache'\t\t\t=> 2,\t\t\t\t\t\t// Store a cached server status and refresh every X minutes.  Default: 2 minutes (value is measured in minutes).\n\t'ServerStatusTimeout'\t\t=> 2,\t\t\t\t\t\t// For each server, spend X amount of seconds to determine whether it's up or not.\n\t'SessionKey'\t\t\t\t=> 'fluxSessionData',\t\t// Shouldn't be changed, just specifies the session key to be used for session data.\n\t'DefaultModule'\t\t\t\t=> 'main',\t\t\t\t\t// This is the module to execute when none has been specified.\n\t'DefaultAction'\t\t\t\t=> 'index',\t\t\t\t\t// This is the default action for any module, probably should leave this alone. (Deprecated)\n\t'GzipCompressOutput'\t\t=> false,\t\t\t\t\t// Whether or not to compress output using zlib.\n\t'GzipCompressionLevel'\t\t=> 9,\t\t\t\t\t\t// zlib compression level. (1~9)\n\t'OutputCleanHTML'\t\t\t=> true,\t\t\t\t\t// Use this if you have Tidy installed to clean your HTML output when serving pages.\n\t'ShowCopyright'\t\t\t\t=> true,\t\t\t\t\t// Whether or not to show the copyright footer.\n\t'ShowRenderDetails'\t\t\t=> true,\t\t\t\t\t// Shows the \"page rendered in X seconds\" and \"number of queries executed: X\" in the default theme.\n\t'UseCleanUrls'\t\t\t\t=> false,\t\t\t\t\t// Set to true if you're running Apache and it supports mod_rewrite and .htaccess files.\n\t'DebugMode'\t\t\t\t\t=> false,\t\t\t\t\t// Set to false to minimize technical details from being output by Flux. WARNING: DO NOT USE THIS OPTION ON A PUBLICALLY-ACCESSIBLE CP.\n\t'UseCaptcha'\t\t\t\t=> false,\t\t\t\t\t// Use CAPTCHA image for account registration to prevent automated account creations. (Requires GD2/FreeType2)\n\t'UseLoginCaptcha'\t\t\t=> false,\t\t\t\t\t// Use CAPTCHA image for account logins. (Requires GD2/FreeType2)\n\t'EnableReCaptcha'\t\t\t=> false,\t\t\t\t\t// Enables the use of reCAPTCHA instead of Flux's native GD2 library (http://www.google.com/recaptcha)\n\t'ReCaptchaPublicKey'\t\t=> '...',\t\t\t\t\t// This is your reCAPTCHA public key [REQUIRED FOR RECAPTCHA] (sign up at http://www.google.com/recaptcha)\n\t'ReCaptchaPrivateKey'\t\t=> '...',\t\t\t\t\t// This is your reCAPTCHA private key [REQUIRED FOR RECAPTCHA] (sign up at http://www.google.com/recaptcha)\n\t'ReCaptchaTheme'\t\t\t=> 'light',\t\t\t\t\t// ReCaptcha theme to use (Value: dark or light) (see: https://developers.google.com/recaptcha/docs/display#render_param)\n\t'DisplaySinglePages'\t\t=> true,\t\t\t\t\t// Whether or not to display paging for single page results.\n\t'ForwardYears'\t\t\t\t=> 15,\t\t\t\t\t\t// (Visual) The number of years to display ahead of the current year in date inputs.\n\t'BackwardYears'\t\t\t\t=> 60,\t\t\t\t\t\t// (Visual) The number of years to display behind the current year in date inputs.\n\t'ColumnSortAscending'\t\t=> ' ▲',\t\t\t\t\t// (Visual) Text displayed for ascending sorted column names.\n\t'ColumnSortDescending'\t\t=> ' ▼',\t\t\t\t\t// (Visual) Text displayed for descending sorted column names.\n\t'DisplayCashPoints'\t\t\t=> false,\t\t\t\t\t// Whether or not to display \"Cash Points\" instead of the player's \"Credits\" in the control panel.\n\t'CreditExchangeRate'\t\t=> 1.0,\t\t\t\t\t\t// The rate at which credits are exchanged for dollars.\n\t'MinDonationAmount'\t\t\t=> 2.0,\t\t\t\t\t\t// Minimum donation amount. (NOTE: Actual donations made that are less than this account won't be exchanged)\n\t'DonationCurrency'\t\t\t=> 'USD',\t\t\t\t\t// Preferred donation currency. Only donations made in this currency will be processed for credit deposits.\n\t'MoneyDecimalPlaces'\t\t=> 2,\t\t\t\t\t\t// (Visual) Number of decimal places to display in amount.\n\t'MoneyThousandsSymbol'\t\t=> ',',\t\t\t\t\t\t// (Visual) Thousandths place separator (a period in European currencies).\n\t'MoneyDecimalSymbol'\t\t=> '.',\t\t\t\t\t\t// (Visual) Decimal separator (a comma in European currencies).\n\t'AcceptDonations'\t\t\t=> true,\t\t\t\t\t// Whether or not to accept donations.\n\t'PayPalIpnUrl'\t\t\t\t=> 'www.paypal.com',\t\t// The ipnpb.paypal.com and ipnpb.sandbox.paypal.com endpoints only accept HTTPS connections. If you currently use www.paypal.com, you should move to ipnpb.paypal.com when you update your code to use HTTPS.\n\t'PayPalBusinessEmail'\t\t=> 'admin@localhost',\t\t// Enter the e-mail under which you have registered your business account.\n\t'PayPalReceiverEmails'\t\t=> array(\t\t\t\t\t// These are the receiver e-mail addresses who are allowed to receive payment.\n\t\t//'admin2@localhost',\t\t\t\t\t\t\t\t// -- This array may be empty if you only use one e-mail\n\t\t//'admin3@localhost'\t\t\t\t\t\t\t\t// -- because your Business Email is also checked.\n\t),\n\t'PaypalHackNotify'          => true,                    // Send email notification if hack attempt detected (Notification will be send for each address in list PayPalBusinessEmail and PayPalReceiverEmails)\n\t'PayPalAllowedHosts'        => array(\t\t\t\t\t// PayPal IP list https://www.paypal.com/fm/smarthelp/article/what-are-the-ip-addresses-for-live-paypal-servers-ts1056\n\t\t'ipn.sandbox.paypal.com',\n\t\t'notify.paypal.com',\n\t\t'66.211.170.66',\n\t\t'173.0.81.1',\n\t\t'173.0.81.0/24',\n\t\t'173.0.81.33',\n\t\t'173.0.81.65',\n\t\t'173.0.81.140',\n\t\t'64.4.240.0/21',\n\t\t'64.4.248.0/22',\n\t\t'6.211.168.0/22',\n\t\t'173.0.80.0/20',\n\t\t'91.243.72.0/23'\n\t),\n\t'GStorageLeaderOnly'\t\t=> false,\t\t\t\t\t// Only allow guild leader to view guild storage rather than all members?\n\t'DivorceKeepChild'\t\t\t=> false,\t\t\t\t\t// Keep child after divorce?\n\t'DivorceKeepRings'\t\t\t=> false,\t\t\t\t\t// Keep wedding rings after divorce?\n\t'IpWhitelistPattern'\t\t=>\t\t\t\t\t\t\t// PCRE Format Pattern. It's recommended you add your gameserver, webserver and server owner's IPs here.\n\t\t'(127\\.0\\.0\\.1|0(\\.[0\\*]){3})',\t\t\t\t\t\t// WARNING: This string isn't escaped so be careful which chars you use!\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// By default, whitelists 127.0.0.1 (localhost) and 0.0.0.0 (all interfaces; whitelists all wildcard bans that can achive this too)\n\t'AllowIpBanLogin'\t\t\t=> false,\t\t\t\t\t// Allow logging into account from banned IP.\n\t'AllowTempBanLogin'\t\t\t=> false,\t\t\t\t\t// Allow logging in of temporarily banned accounts.\n\t'AllowPermBanLogin'\t\t\t=> false,\t\t\t\t\t// Allow logging in of permanently banned accounts.\n\t'AutoRemoveTempBans'\t\t=> true,\t\t\t\t\t// Automatically remove expired temporary bans on certain pages.\n\t'ItemShopMaxCost'\t\t\t=> 99,\t\t\t\t\t\t// Max price an item can be sold for.\n\t'ItemShopMaxQuantity'\t\t=> 99,\t\t\t\t\t\t// Max quantity the item may be sold at once for.\n\t'ItemShopItemPerPage'\t\t=> 5,\t\t\t\t\t\t// The number of items to display per page in the \"Item Shop\" page.\n    'ShowItemDesc'              => false,                   // Displays generated item descs from parsed itemInfo.lua\n\t'HideFromWhosOnline'\t\t=> AccountLevel::LOWGM,\t\t// Levels greater than or equal to this will be hidden from the \"Who's Online\" page.\n\t'HideFromMapStats'\t\t\t=> AccountLevel::LOWGM,\t\t// Levels greater than or equal to this will be hidden from the \"Map Stats\" page.\n\t'EnableGMPassSecurity'\t\t=> AccountLevel::LOWGM,\t\t// Levels greater than or equal to this will be required to use passwords that meet the earlier GM Password settings.\n\t'ChargeGenderChange'\t\t=> 0,\t\t\t\t\t\t// You can specify this as the number of credits to charge for gender change.  Can be 0 for free change.\n\t'BanPaymentStatuses'\t\t=> array(\t\t\t\t\t// Payment statuses that will automatically ban the account owner if received.\n\t\t'Cancelled_Reversal',\t\t\t\t\t\t\t\t// -- 'Cancelled_Reversal'\n\t\t'Reversed',\t\t\t\t\t\t\t\t\t\t\t// -- 'Reversed'\n\t),\n\n\t'HoldUntrustedAccount'\t\t=> 0,\t\t\t\t\t\t// This is the time in hours to hold a donation crediting process for, if the account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// isn't a trusted account. Specify 0 or false to disable this feature.\n\n\t'AutoUnholdAccount'\t\t\t=> false,\t\t\t\t\t// Enable this to auto-unhold an account and credit it if the transaction is still\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// valid.  This only applies if you are using the HoldUnstrustedAccount feature.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// If you want to run a cron job instead, you can make a request to the '/donate/update'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// module/action with the InstallerPassword as the password to run the update task.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// With clean URLs: http://<server>/<baseURI>/donate/update?password=<InstallerPassword>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Without clean URLs: http://<server>/<baseURI>?module=donate&action=update&password=<InstallerPassword>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NOTE: This option is HIGHLY inefficient, it's recommended to run a cron job instead.\n\n\t'AutoPruneAccounts'\t\t\t=> false,\t\t\t\t\t// Enable this to automatically prune expired accounts. Enabling this is a performance\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// performance killer. See 'AutoUnholdAccount' for running this task as a cron job,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the module is 'account' and the action is 'prune'.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// With clean URLs: http://<server>/<baseURI>/account/prune?password=<InstallerPassword>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Without clean URLs: http://<server>/<baseURI>?module=account&action=prune&password=<InstallerPassword>\n\n\t'ShopImageExtensions'\t\t=> array(\t\t\t\t\t// These are the image extensions allowed for uploading in the item shop.\n\t\t'png', 'jpg', 'gif', 'bmp', 'jpeg'\n\t),\n\t'NoResetPassGroupLevel'\t\t=> AccountLevel::LOWGM,\t\t// Minimum group level of account to prevent password reset using control panel.\n\n\t'CharRankingLimit'\t\t\t=> 20,\t\t\t\t\t\t//\n\t'GuildRankingLimit'\t\t\t=> 20,\t\t\t\t\t\t//\n\t'ZenyRankingLimit'\t\t\t=> 20,\t\t\t\t\t\t//\n\t'DeathRankingLimit'\t\t\t=> 20,\t\t\t\t\t\t//\n\t'AlchemistRankingLimit'\t\t=> 20,\t\t\t\t\t\t//\n\t'BlacksmithRankingLimit'\t=> 20,\t\t\t\t\t\t//\n\t'HomunRankingLimit'\t\t\t=> 20,\t\t\t\t\t\t//\n\t'MVPRankingLimit'\t\t\t=> 20,\t\t\t\t\t\t//\n\n\t'RankingHideGroupLevel'\t\t=> AccountLevel::LOWGM,\t\t//\n\t'InfoHideZenyGroupLevel'\t=> AccountLevel::LOWGM,\t\t// Minimum group level of account to hide zeny from in server information page.\n\n\t'CharRankingThreshold'\t\t=> 0,\t\t\t\t\t\t// Number of days the character must have logged in within to be listed in character ranking. (0 = disabled)\n\t'ZenyRankingThreshold'\t\t=> 0,\t\t\t\t\t\t// Number of days the character must have logged in within to be listed in zeny ranking. (0 = disabled)\n\t'DeathRankingThreshold'\t\t=> 0,\t\t\t\t\t\t// Number of days the character must have logged in within to be listed in death ranking. (0 = disabled)\n\t'AlchemistRankingThreshold'\t=> 0,\t\t\t\t\t\t// Number of days the character must have logged in within to be listed in death ranking. (0 = disabled)\n\t'HomunRankingThreshold'\t\t=> 0,\t\t\t\t\t\t// Number of days the character must have logged in within to be listed in homunculus ranking. (0 = disabled)\n\n\t'HideTempBannedCharRank'\t=> false,\t\t\t\t\t// Hide temporarily banned characters from ranking.\n\t'HidePermBannedCharRank'\t=> true,\t\t\t\t\t// Hide permanently banned characters from ranking.\n\n\t'HideTempBannedZenyRank'\t=> false,\t\t\t\t\t// Hide temporarily banned characters from ranking.\n\t'HidePermBannedZenyRank'\t=> true,\t\t\t\t\t// Hide permanently banned characters from ranking.\n\n\t'HideTempBannedDeathRank'\t=> false,\t\t\t\t\t// Hide temporarily banned characters from ranking.\n\t'HidePermBannedDeathRank'\t=> true,\t\t\t\t\t// Hide permanently banned characters from ranking.\n\n\t'HideTempBannedAlcheRank'\t=> false,\t\t\t\t\t// Hide temporarily banned characters from ranking.\n\t'HidePermBannedAlcheRank'\t=> true,\t\t\t\t\t// Hide permanently banned characters from ranking.\n\n\t'HideTempBannedSmithRank'\t=> false,\t\t\t\t\t// Hide temporarily banned characters from ranking.\n\t'HidePermBannedSmithRank'\t=> true,\t\t\t\t\t// Hide permanently banned characters from ranking.\n\n\t'HideTempBannedStats'\t\t=> false,\t\t\t\t\t// Hide temporarily banned accounts from statistics.\n\t'HidePermBannedStats'\t\t=> true,\t\t\t\t\t// Hide permanently banned accounts from statistics.\n\n\t'HideTempBannedHomunRank'\t=> false,\t\t\t\t\t// Hide temporarily banned characters from ranking.\n\t'HidePermBannedHomunRank'\t=> true,\t\t\t\t\t// Hide permanently banned characters from ranking.\n\n\t'SortJobsByAmount'\t\t\t=> false,\t\t\t\t\t// Sort job class information on statistics page by descending quantity (false = Sort by Job ID).\n\n\t'CpLoginLogShowPassword'\t=> false,\t\t\t\t\t// Show password in CP login log (also see access.php's SeeCpLoginLogPass).\n\n\t'CpResetLogShowPassword'\t=> false,\t\t\t\t\t// Show password in CP \"password resets\" log (also see access.php's SeeCpResetPass).\n\n\t'CpChangeLogShowPassword'\t=> false,\t\t\t\t\t// Show password in CP \"password changes\" log (also see access.php's SeeCpChangePass).\n\n\t'AdminMenuNewStyle'\t\t\t=> true,\t\t\t\t\t// Use new-style admin menu;  Applies to 'default' theme.\n\t'EnablePeakDisplay'\t\t\t=> true,\t\t\t\t\t// Display Peak User count on Server Status page.\n\n\n// News Options\n\t'CMSNewsOnHomepage'\t\t\t=> true,\t\t\t\t\t// Display News on Home Page instead of \"You've Just Installed FluxCP\" message?\n\t'CMSNewsType'\t\t\t\t=> 1,\t\t\t\t\t\t// Type = source of news feed:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\t1 = Built-in news page\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\t2 = RSS Import\n\n\t'CMSNewsRSS'\t\t\t\t=> 'https://rathena.org/board/rss/1-latest-community-announcements.xml/',\t\t// Use if CMSNewsType = 2\n\t'CMSNewsLimit'\t\t\t\t=> 4,\t\t\t\t\t\t// Number of news items to display\n\t'CMSDisplayModifiedBy'\t\t=> false,\t\t\t\t\t// If a news item has been modified, display modified date under news item?\n\n// Service Desk\n\t'StaffReplyColour'\t\t\t=> 'brown',\n\t'FontResolvedColour'\t\t=> 'green',\n\t'FontPendingColour'\t\t\t=> 'orange',\n\t'FontClosedColour'\t\t\t=> 'darkgrey',\n\t'SDEnableCreditRewards'\t\t=> true,\t\t\t\t\t// Show option in Service Desk to reward player X credits for reporting bugs/abuse/etc.\n\t'SDCreditReward'\t\t\t=> 10,\t\t\t\t\t\t// Number of credits to award account.\n\n// Discord Webhooks\n\t'DiscordUseWebhook'\t\t\t=> false,\n\t'DiscordWebhookURL'\t\t\t=> 'enter_webhook_url_from_discord_here',\n    'DiscordSendOnRegister'     => true, // Sends a channel message when someone registers\n    'DiscordSendOnNewTicket'    => true, // Sends a channel message when someone submits a new ticket to the Service Desk\n    'DiscordSendOnWebCommand'   => true, // Sends a channel message when someone uses the Web Command feature in FluxCP\n    'DiscordSendOnMarketing'    => true, // Sends a channel message when someone uses the Send Email feature in FluxCP\n\t'DiscordSendOnErrorException' => true, // Sends a channel message when an exception is thrown\n\n\t'TinyMCEKey'\t\t\t\t=> 'no-key',\t\t\t\t// Register for a key at https://www.tiny.cloud/my-account/dashboard/\n\n\t// These are the main menu items that should be displayed by themes.\n\t// They route to modules and actions.  Whether they are displayed or\n\t// not at any given time depends on the user's account group level and/or\n\t// their login status.\n\t'MenuItems'\t\t=> array(\n\t\t'MainMenuLabel'\t\t=> array(\n\t\t\t'HomeLabel'\t\t\t=> array('module' => 'main'),\n\t\t\t//'ForumLabel'\t\t=> array('exturl' => 'http://www.fluxro.com/community'),\t// External forum link\n\t\t\t//'ForumLabel'\t\t=> array('module' => 'forums'), \t\t\t\t\t\t// Built-in forum link\n\t\t\t'NewsLabel'\t\t\t=> array('module' => 'news'),\n\t\t\t// Sample items for pages function.\n\t\t\t'DownloadsLabel'\t\t=> array('module' => 'pages','action'=>'content','param'=>array('path'=>'downloads')),\n\t\t\t'RulesLabel'\t\t\t=> array('module' => 'pages','action'=>'content','param'=>array('path'=>'rules')),\n\t\t\t// End sample items for pages function.\n\t\t),\n\t\t'AccountLabel'\t\t=> array(\n\t\t\t'AccountCreateHeading'\t\t=> array('module' => 'account', 'action' => 'create'),\n\t\t\t'LoginTitle'\t\t\t=> array('module' => 'account', 'action' => 'login'),\n\t\t\t'MyAccountLabel'\t=> array('module' => 'account', 'action' => 'view'),\n\t\t\t'HistoryLabel'\t\t=> array('module' => 'history'),\n\t\t\t'ServiceDeskLabel'\t=> array('module' => 'servicedesk'),\n\t\t\t'LogoutTitle'\t\t=> array('module' => 'account', 'action' => 'logout'),\n\t\t),\n\t\t'DonationsLabel'\t\t=> array(\n\t\t\t'PurchaseLabel'\t\t=> array('module' => 'purchase'),\n\t\t\t'DonateLabel'\t\t=> array('module' => 'donate'),\n\t\t),\n\t\t'InformationLabel'\t=> array(\n\t\t\t'ServerInfoLabel'\t=> array('module' => 'server', 'action' => 'info'),\n\t\t\t'ServerStatusLabel'\t=> array('module' => 'server', 'action' => 'status'),\n\t\t\t'WoeHoursLabel'\t\t=> array('module' => 'woe'),\n\t\t\t'CastlesLabel'\t\t=> array('module' => 'castle'),\n\t\t\t'WhosOnlineLabel'\t=> array('module' => 'character', 'action' => 'online'),\n\t\t\t'MapStaticsLabel'=> array('module' => 'character', 'action' => 'mapstats'),\n\t\t\t'RankingInfoLabel'\t=> array('module' => 'ranking', 'action' => 'character'),\n\t\t\t'VendingInfoLabel'\t=> array('module' => 'vending'),\n\t\t\t'BuyingstoreInfoLabel'\t=> array('module' => 'buyingstore'),\n\t\t),\n\t\t'DatabaseLabel'\t\t=> array(\n\t\t\t'ItemDatabaseLabel'\t=> array('module' => 'item'),\n\t\t\t'MobDatabaseLabel'\t=> array('module' => 'monster'),\n\t\t),\n\t\t'SocialLabel'\t\t=> array(\n\t\t\t'JoinUsInFacebookLabel'\t=> array('exturl' => 'https://www.facebook.com/<change_me>'),\n\t\t\t'RateUsOnRMSLabel'\t\t=> array('exturl' => '<link_to_RMS>'),\n\t\t),\n\t\t'Service Desk'\t=> array(\n\t\t\t'ServiceDeskLabel'\t=> array('module' => 'servicedesk', 'action' => 'staffindex'),\n\t\t),\n\t\t'Misc. Stuff'\t=> array(\n\t\t\t'AccountLabel'\t\t=> array('module' => 'account'),\n\t\t\t'CharacterLabel'\t=> array('module' => 'character'),\n\t\t\t'CPLogsLabel'\t\t=> array('module' => 'cplog'),\n\t\t\t'PagesLabel'\t\t=> array('module' => 'pages'),\n\t\t\t'NewsLabel'\t\t\t=> array('module' => 'news', 'action' => 'manage'),\n\t\t\t'GuildsLabel'\t\t=> array('module' => 'guild'),\n\t\t\t'IPBanListLabel'\t=> array('module' => 'ipban'),\n\t\t\t'rALogsLabel'\t\t=> array('module' => 'logdata'),\n\t\t\t'ReInstallLabel'\t=> array('module' => 'install', 'action' => 'reinstall'),\n\t\t\t'SendMailLabel'\t\t=> array('module' => 'mail'),\n\t\t\t'WCTitleLabel'\t\t=> array('module' => 'webcommands'),\n\t\t\t//'Auction'\t\t=> array('module' => 'auction'),\n\t\t\t//'Economy'\t\t=> array('module' => 'economy')\n\t\t)\n\t),\n\n\t// Sub-menu items that are displayed for any action belonging to a\n\t// particular module. The format it simple.\n\t'SubMenuItems'\t=> array(\n\t\t'history'\t\t=> array(\n\t\t\t'gamelogin'\t\t=> 'Game Logins',\n\t\t\t'cplogin'\t\t=> 'CP Logins',\n\t\t\t'emailchange'\t=> 'E-Mail Changes',\n\t\t\t'passchange'\t=> 'Password Changes',\n\t\t\t'passreset'\t\t=> 'Password Resets'\n\t\t),\n\t\t'account'\t\t=> array(\n\t\t\t'index'\t\t\t=> 'List Accounts',\n\t\t\t'view'\t\t\t=> 'View Account',\n\t\t\t'changepass'\t=> 'Change Password',\n\t\t\t'changemail'\t=> 'Change E-mail',\n\t\t\t'changesex'\t\t=> 'Change Gender',\n\t\t\t'transfer'\t\t=> 'Transfer Credits',\n\t\t\t'xferlog'\t\t=> 'Credit Transfer History',\n\t\t\t'cart'\t\t\t=> 'Go to Shopping Cart',\n\t\t\t'login'\t\t\t=> 'Login',\n\t\t\t'create'\t\t=> 'Register',\n\t\t\t'resetpass'\t\t=> 'Reset Password',\n\t\t\t'resend'\t\t=> 'Resend E-mail Confirmation'\n\t\t),\n\t\t'guild'\t\t\t=> array(\n\t\t\t'index'\t\t\t=> 'List Guilds',\n\t\t\t'export'\t\t=> 'Export Guild Emblems'\n\t\t),\n\t\t'server'\t\t=> array(\n\t\t\t'status'\t\t=> 'View Status',\n\t\t\t'status-xml'\t=> 'View Status as XML'\n\t\t),\n\t\t'logdata'\t\t=> array(\n\t\t\t'branch'\t\t=> 'Branches',\n\t\t\t'char'\t\t\t=> 'Characters',\n\t\t\t'cashpoints'\t=> 'CashPoints',\n\t\t\t'chat'\t\t\t=> 'Chat Messages',\n\t\t\t'command'\t\t=> 'Commands',\n\t\t\t'feeding'\t\t=> 'Feeding',\n\t\t\t'inter'\t\t\t=> 'Interactions',\n\t\t\t'pick'\t\t\t=> 'Item Picks',\n\t\t\t'login'\t\t\t=> 'Logins',\n\t\t\t'mvp'\t\t\t=> 'MVP',\n\t\t\t'npc'\t\t\t=> 'NPC',\n\t\t\t'zeny'\t\t\t=> 'Zeny'\n\t\t),\n\t\t'cplog'\t\t\t=> array(\n\t\t\t'paypal'\t\t=> 'PayPal Transactions',\n\t\t\t'create'\t\t=> 'Account Registrations',\n\t\t\t'login'\t\t\t=> 'Logins',\n\t\t\t'resetpass'\t\t=> 'Password Resets',\n\t\t\t'changepass'\t=> 'Password Changes',\n\t\t\t'changemail'\t=> 'E-mail Changes',\n\t\t\t'ban'\t\t\t=> 'Account Bans',\n\t\t\t'ipban'\t\t\t=> 'IP Bans'\n\t\t),\n\t\t'purchase'\t\t=> array(\n\t\t\t'index'\t\t\t=> 'Shop',\n\t\t\t'cart'\t\t\t=> 'Go to Cart',\n\t\t\t'checkout'\t\t=> 'Checkout',\n\t\t\t'clear'\t\t\t=> 'Empty Cart',\n\t\t\t'pending'\t\t=> 'Pending Redemption'\n\t\t),\n\t\t'donate'\t\t=> array(\n\t\t\t'index'\t\t\t=> 'Make a Donation',\n\t\t\t'history'\t\t=> 'Donation History',\n\t\t\t'trusted'\t\t=> 'Trusted PayPal E-mails'\n\t\t),\n\t\t'ipban'\t\t\t=> array(\n\t\t\t'index'\t\t\t=> 'IP Ban List',\n\t\t\t'add'\t\t\t=> 'Add IP Ban'\n\t\t),\n\t\t'ranking'\t\t=> array(\n\t\t\t'character'\t\t=> 'Characters',\n\t\t\t'death'\t\t\t=> 'Deaths',\n\t\t\t'alchemist'\t\t=> 'Alchemists',\n\t\t\t'blacksmith'\t=> 'Blacksmiths',\n\t\t\t'homunculus'\t=> 'Homunculus',\n\t\t\t'mvp'\t\t\t=> 'MVPs',\n\t\t\t'guild'\t\t\t=> 'Guilds',\n\t\t\t'zeny'\t\t\t=> 'Zeny'\n\t\t),\n\t\t'item'\t\t\t=> array(\n\t\t\t'index'\t\t\t=> 'List Items',\n\t\t\t'iteminfo'\t\t=> 'Add Item Info',\n\t\t),\n\t\t'pages'\t\t\t=> array(\n\t\t\t'index'\t\t\t=> 'Manage Pages',\n\t\t\t'add'\t\t\t=> 'Add New Page',\n\t\t),\n\t\t'news'\t\t\t=> array(\n\t\t\t'index'\t\t\t=> 'Latest News',\n\t\t\t'manage'\t\t\t=> 'Manage',\n\t\t\t'add'\t\t\t=> 'Add News',\n\t\t),\n\t\t'servicedesk'\t=> array(\n\t\t\t'staffindex'\t=> 'View Active',\n\t\t\t'staffviewclosed'=> 'View Closed',\n\t\t\t'staffsettings'\t=> 'Staff Settings',\n\t\t\t'catcontrol'\t=> 'Category Control',\n\t\t),\n\t\t'vending'\t\t\t=> array(\n\t\t\t'index'\t\t\t=> 'Vendors',\n\t\t),\n\t\t'buyingstore'\t\t=> array(\n\t\t\t'index'\t\t\t=> 'Buyers',\n\t\t),\n\t),\n\n\t'AllowMD5PasswordSearch'\t\t=> false,\n\t'ReallyAllowMD5PasswordSearch'\t=> false, // Are you POSITIVELY sure?\n\n\t// Specifies which modules and actions should be ignored by Tidy\n\t// (enabled/disabled by the OutputCleanHTML option).\n\t'TidyIgnore'\t=> array(\n\t\tarray('module' => 'captcha'),\n\t\tarray('module' => 'guild', 'action' => 'emblem')\n\t),\n\n\t// Job classes, loaded from another file to avoid cluttering this one.\n\t// There isn't normally a need to modify this file, unless it's been\n\t// modified in an update. (In English: DON'T TOUCH THIS.)\n\t'JobClasses'\t\t\t\t\t=> include('jobs.php'),\n\n\t// Alchemist job classes, mostly used for alchemist rankings.\n\t// Should be left alone unless new alchemist-related job classes are introduced.\n\t'AlchemistJobClasses'\t\t\t=> include('jobs_alchemist.php'),\n\n\t// Blacksmith job classes, mostly used for blacksmith rankings.\n\t// Should be left alone unless new blacksmith-related job classes are introduced.\n\t'BlacksmithJobClasses'\t\t\t=> include('jobs_blacksmith.php'),\n\n\t// Gender-linked Job class IDs and their corresponding names.\n\t// Should be left alone unless new gender-specific job classes are introduced.\n\t'GenderLinkedJobClasses'\t\t=> include('jobs_gender_linked.php'),\n\n\t// Homunculus class IDs and their corresponding names.\n\t// Best not to mess with this either.\n\t'HomunClasses'\t\t\t\t\t=> include('homunculus.php'),\n\n\t// Item Types with their corresponding names.\n\t// Shouldn't touch this either.\n\t'ItemTypes'\t\t\t\t\t\t=> include('itemtypes.php'),\n\n\t// Item SubTypes with their corresponding names.\n\t// Shouldn't touch this either.\n\t'ItemSubTypes'\t\t\t\t\t=> include('itemsubtypes.php'),\n\n\t// Common Equip Location Combinations with their corresponding names.\n\t// Shouldn't touch this unless you've added custom combinations.\n\t'EquipLocationCombinations'\t\t=> include('equip_location_combinations.php'),\n\n\t// Error Code -> Error Type mapping.\n\t// Shouldn't need touching, however modifying loginerrors.php should be relatively safe.\n\t'LoginErrors'\t\t\t\t\t=> include('loginerrors.php'),\n\n\t// rA equip jobs mapping.\n\t'EquipJobs'\t\t\t\t\t\t=> include('equip_jobs.php'),\n\n\t// rA equip locations mapping.\n\t'EquipLocations'\t\t\t\t=> include('equip_locations.php'),\n\n\t// rA equip upper mapping.\n\t'EquipUpper'\t\t\t\t\t=> include('equip_upper.php'),\n\n\t// rA monster sizes mapping.\n\t'MonsterSizes'\t\t\t\t\t=> include('sizes.php'),\n\n\t// rA monster races mapping.\n\t'MonsterRaces'\t\t\t\t\t=> include('races.php'),\n\n\t// rA elements mapping.\n\t'Elements'\t\t\t\t\t\t=> include('elements.php'),\n\n\t// rA attributes mapping.\n\t'Attributes'\t\t\t\t\t=> include('attributes.php'),\n\n\t// rA monster modes mapping.\n\t'MonsterModes'\t\t\t\t\t=> include('monstermode.php'),\n\t'MonsterAI'\t\t\t\t\t\t=> include('monster_ai.php'),\n\n\t// Item shop categories.\n\t'ShopCategories'\t\t\t\t=> include('shopcategories.php'),\n\n\t// Item pick and zeny log types.\n\t'PickTypes'\t\t\t\t\t\t=> include('picktypes.php'),\n\n\t// Type of feeding\n\t'FeedingTypes'\t\t\t\t\t=> include('feedingtypes.php'),\n\n\t// Castle names.\n\t'CastleNames'\t\t\t\t\t=> include('castlenames.php'),\n\n\t// Trade restrictions.\n\t'TradeRestriction'\t\t\t\t=> include('trade_restrictions.php'),\n\n\t// Item flags.\n\t'ItemFlags'\t\t\t\t\t\t=> include('itemsflags.php'),\n\n\t// Item random options.\n\t'RandomOptions'\t\t\t\t\t=> include('item_randoptions.php'),\n\n\t// DON'T TOUCH. THIS IS FOR DEVELOPERS.\n\t'FluxTables'\t\t=> array(\n\t\t'CreditsTable'\t\t\t=> 'cp_credits',\n\t\t'CreditTransferTable'\t=> 'cp_xferlog',\n\t\t'ItemShopTable'\t\t\t=> 'cp_itemshop',\n\t\t'TransactionTable'\t\t=> 'cp_txnlog',\n\t\t'RedemptionTable'\t\t=> 'cp_redeemlog',\n\t\t'AccountCreateTable'\t=> 'cp_createlog',\n\t\t'AccountBanTable'\t\t=> 'cp_banlog',\n\t\t'IpBanTable'\t\t\t=> 'cp_ipbanlog',\n\t\t'DonationTrustTable'\t=> 'cp_trusted',\n\t\t'AccountPrefsTable'\t\t=> 'cp_loginprefs',\n\t\t'CharacterPrefsTable'\t=> 'cp_charprefs',\n\t\t'ResetPasswordTable'\t=> 'cp_resetpass',\n\t\t'ChangeEmailTable'\t\t=> 'cp_emailchange',\n\t\t'LoginLogTable'\t\t\t=> 'cp_loginlog',\n\t\t'ChangePasswordTable'\t=> 'cp_pwchange',\n\t\t'OnlinePeakTable'\t\t=> 'cp_onlinepeak',\n\t\t'CMSNewsTable'\t\t\t=> 'cp_cmsnews',\n\t\t'CMSPagesTable'\t\t\t=> 'cp_cmspages',\n\t\t'CMSSettingsTable'\t\t=> 'cp_cmssettings',\n\t\t'ServiceDeskTable'\t\t=> 'cp_servicedesk',\n\t\t'ServiceDeskATable'\t\t=> 'cp_servicedeska',\n\t\t'ServiceDeskCatTable'\t=> 'cp_servicedeskcat',\n\t\t'ServiceDeskSettingsTable'\t=> 'cp_servicedesksettings',\n\t\t'WebCommandsTable'\t\t=> 'cp_commands',\n        'ItemDescTable'     \t=> 'cp_itemdesc',\n\t)\n);\n?>\n"
  },
  {
    "path": "config/attributes.php",
    "content": "<?php\n// rA attributes.\nreturn array(\n\t1 => 'Ice',\n\t2 => 'Earth',\n\t3 => 'Fire',\n\t4 => 'Wind',\n);\n?>\n"
  },
  {
    "path": "config/cashshopcategories.php",
    "content": "<?php\n// These are categories for the cash shop. Pay close attention to the numbers,\n// as these numbers are stored in the database when you add an item to a specific\n// category, so it knows which category the item belongs to.\n\n// Keep in mind that different texture files will display different categories in-game.\n// These are the same used in rAthena's db files.\nreturn array(\n\t0 => 'New',\n\t1 => 'Hot',\n\t2 => 'Limited',\n\t3 => 'Rental',\n\t4 => 'Gear',\n\t5 => 'Buff',\n\t6 => 'Heal',\n\t7 => 'Other',\n\t8 => 'Sale'\n);\n?>\n"
  },
  {
    "path": "config/castlenames.php",
    "content": "<?php\n// Commenting out a castle's entry will remove it from the castles page\n// and exclude it from being a factor in the guild ranking.\nreturn array(\n\t// iRO Names\n\t 0 => 'Neuschwanstein',\n\t 1 => 'Hohenschwangau',\n\t 2 => 'Nuenberg',\n\t 3 => 'Wuerzburg',\n\t 4 => 'Rothenburg',\n\t 5 => 'Repherion',\n\t 6 => 'Eeyolbriggar',\n\t 7 => 'Yesnelph',\n\t 8 => 'Bergel',\n\t 9 => 'Mersetzdeitz',\n\t10 => 'Bright Arbor',\n\t11 => 'Scarlet Palace',\n\t12 => 'Holy Shadow',\n\t13 => 'Sacred Altar',\n\t14 => 'Bamboo Grove Hill',\n\t15 => 'Kriemhild',\n\t16 => 'Swanhild',\n\t17 => 'Fadhgridh',\n\t18 => 'Skoegul',\n\t19 => 'Gondul',\n\t20 => 'Novice Aldebaran',\n\t21 => 'Novice Geffen',\n\t22 => 'Novice Payon',\n\t23 => 'Novice Prontera',\n\t24 => 'Himinn',\n\t25 => 'Andlangr',\n\t26 => 'Viblainn',\n\t27 => 'Hljod',\n\t28 => 'Skidbladnir',\n\t29 => 'Mardol',\n\t30 => 'Cyr',\n\t31 => 'Horn',\n\t32 => 'Gefn',\n\t33 => 'Bandis',\n\t34 => 'Leilah',\n\t35 => 'Pavianne',\n\t36 => 'Jasmine',\n\t37 => 'Roxie',\n\t38 => 'Curly Sue',\n\t39 => 'Gaebolg',\n\t40 => 'Richard',\n\t41 => 'Wigner',\n\t42 => 'Heine',\n\t43 => 'Nerious'\n\t// kRO Names\n\t/**\n\t * 0 => 'Noisyubantian',\n\t * 1 => 'Hohensyubangawoo',\n\t * 2 => 'Nyirenverk',\n\t * 3 => 'Byirtsburi',\n\t * 4 => 'Rotenburk',\n\t * 5 => 'Reprion',\n\t * 6 => 'Yolbriger',\n\t * 7 => 'Isinlife',\n\t * 8 => 'Berigel',\n\t * 9 => 'Melsedetsu',\n\t *10 => 'Mingting',\n\t *11 => 'Tiantan',\n\t *12 => 'Fuying',\n\t *13 => 'Honglou',\n\t *14 => 'Zhulinxian',\n\t *15 => 'Creamhilt',\n\t *16 => 'Sbanhealt',\n\t *17 => 'Lazrigees',\n\t *18 => 'Squagul',\n\t *19 => 'Guindull',\n\t *20 => 'Novice Aldebaran',\n\t *21 => 'Novice Geffen',\n\t *22 => 'Novice Payon',\n\t *23 => 'Novice Prontera',\n\t *24 => 'Himinn',\n\t *25 => 'Andlangr',\n\t *26 => 'Viblainn',\n\t *27 => 'Hljod',\n\t *28 => 'Skidbladnir',\n\t *29 => 'Mardol',\n\t *30 => 'Cyr',\n\t *31 => 'Horn',\n\t *32 => 'Gefn',\n\t *33 => 'Bandis',\n\t *34 => 'Kafragarten 1',\n\t *35 => 'Kafragarten 2',\n\t *36 => 'Kafragarten 3',\n\t *37 => 'Kafragarten 4',\n\t *38 => 'Kafragarten 5',\n\t *39 => 'Gloria 1',\n\t *40 => 'Gloria 2',\n\t *41 => 'Gloria 3',\n\t *42 => 'Gloria 4',\n\t *43 => 'Gloria 5'\n\t */\n)\n?>\n"
  },
  {
    "path": "config/elements.php",
    "content": "<?php\n// rA elements.\nreturn array(\n\t'Neutral' => 'Neutral',\n\t'Water' => 'Water',\n\t'Earth' => 'Earth',\n\t'Fire' => 'Fire',\n\t'Wind' => 'Wind',\n\t'Poison' => 'Poison',\n\t'Holy' => 'Holy',\n\t'Dark' => 'Dark',\n\t'Ghost' => 'Ghost',\n\t'Undead' => 'Undead'\n);\n?>\n"
  },
  {
    "path": "config/equip_jobs.php",
    "content": "<?php\nreturn array(\n\t0\t=>\t// Default job list\n\tarray(\n\t\t'job_all' => 'All jobs',\n\t\t'job_novice' => 'Novice',\n\t\t'job_supernovice' => 'Super novice',\n\t\t'job_swordman' => 'Swordman',\n\t\t'job_mage' => 'Mage',\n\t\t'job_archer' => 'Archer',\n\t\t'job_acolyte' => 'Acolyte',\n\t\t'job_merchant' => 'Merchant',\n\t\t'job_thief' => 'Thief',\n\t\t'job_knight' => 'Knight',\n\t\t'job_priest' => 'Priest',\n\t\t'job_wizard' => 'Wizard',\n\t\t'job_blacksmith' => 'Blacksmith',\n\t\t'job_hunter' => 'Hunter',\n\t\t'job_assassin' => 'Assassin',\n\t\t'job_crusader' => 'Crusader',\n\t\t'job_monk' => 'Monk',\n\t\t'job_sage' => 'Sage',\n\t\t'job_rogue' => 'Rogue',\n\t\t'job_alchemist' => 'Alchemist',\n\t\t'job_barddancer' => 'Bard / Dancer',\n\t\t'job_taekwon' => 'Taekwon',\n\t\t'job_stargladiator' => 'Star Gladiator',\n\t\t'job_soullinker' => 'Soul Linker',\n\t\t'job_gunslinger' => 'Gunslinger',\n\t\t'job_ninja' => 'Ninja',\n\t),\n\t1\t=>\t// Renewal job list\n\tarray(\n\t\t'job_kagerouoboro' => 'Kagerou / Oboro',\n\t\t'job_rebellion' => 'Rebellion',\n\t\t'job_summoner' => 'Summoner'\n\t)\n)\n?>\n"
  },
  {
    "path": "config/equip_location_combinations.php",
    "content": "<?php\nreturn array(\n\t'location_left_hand/location_right_hand'\t=> 'Two-Handed',\n\t'location_head_low/location_head_mid/location_head_top'\t\t=> 'Upper/Mid/Lower Headgear',\n\t'location_head_mid/location_head_top'\t\t=> 'Upper/Mid Headgear',\n\t'location_head_top/location_head_low'\t\t=> 'Upper/Lower Headgear',\n\t'location_head_low/location_head_mid'\t\t=> 'Mid/Lower Headgear',\n\t'location_head_low/location_head_top'\t\t=> 'Upper/Lower Headgear',\n\t'location_costume_head_mid/location_costume_head_top'\t\t=> 'Costume Upper/Mid Headgear',\n\t'location_costume_head_low/location_costume_head_top'\t\t=> 'Costume Upper/Lower Headgear',\n\t'location_costume_head_low/location_costume_head_mid'\t\t=> 'Costume Mid/Lower Headgear',\n\t'location_costume_head_low/location_costume_head_mid/location_costume_head_top'\t=> 'Costume Upper/Mid/Lower Headgear',\n\t'location_left_accessory/location_right_accessory'\t=> 'Accessory Left/Right',\n\t'location_armor/location_garment/location_head_low/location_head_mid/location_head_top/location_left_accessory/location_left_hand/location_right_accessory/location_right_hand/location_shoes'\t=> 'All equip',\n)\n?>\n"
  },
  {
    "path": "config/equip_locations.php",
    "content": "<?php\nreturn array(\n\t'location_head_low'\t\t\t\t\t=> 'Lower Headgear',\n\t'location_right_hand'\t\t\t\t=> 'Main Hand',\n\t'location_garment'\t\t\t\t\t=> 'Garment',\n\t'location_right_accessory'\t\t\t=> 'Accessory Right',\n\t'location_armor'\t\t\t\t\t=> 'Armor',\n\t'location_left_hand'\t\t\t\t=> 'Off Hand',\n\t'location_shoes'\t\t\t\t\t=> 'Footgear',\n\t'location_left_accessory'\t\t\t=> 'Accessory Left',\n\t'location_head_top'\t\t\t\t\t=> 'Upper Headgear',\n\t'location_head_mid'\t\t\t\t\t=> 'Middle Headgear',\n\t'location_costume_head_top'\t\t\t=> 'Costume Top Headgear',\n\t'location_costume_head_mid'\t\t\t=> 'Costume Mid Headgear',\n\t'location_costume_head_low'\t\t\t=> 'Costume Low Headgear',\n\t'location_costume_garment'\t\t\t=> 'Costume Garment',\n\t'location_ammo'\t\t\t\t\t\t=> 'Ammo',\n\t'location_shadow_armor'\t\t\t\t=> 'Shadow Armor',\n\t'location_shadow_weapon'\t\t\t=> 'Shadow Weapon',\n\t'location_shadow_shield'\t\t\t=> 'Shadow Shield',\n\t'location_shadow_shoes'\t\t\t\t=> 'Shadow Shoes',\n\t'location_shadow_right_accessory'\t=> 'Shadow Accessory Right (Earring)',\n\t'location_shadow_left_accessory'\t=> 'Shadow Accessory Left (Pendant)',\n)\n?>\n"
  },
  {
    "path": "config/equip_upper.php",
    "content": "<?php\nreturn array(\n\t0\t=>\t// Default class list\n\tarray(\n\t\t'class_all' => 'All classes',\n\t\t'class_normal' => 'Normal',\n\t\t'class_upper' => 'Upper',\n\t\t'class_baby' => 'Baby'\n\t),\n\t1\t=>\t// Renewal class list\n\tarray(\n\t\t'class_third' => 'Third',\n\t\t'class_third_upper' => 'Third Upper',\n\t\t'class_third_baby' => 'Third Baby'\n\t)\n)\n?>\n"
  },
  {
    "path": "config/error.php",
    "content": "<?php\n// Configuration information for critical error handling.\n// Critical errors are exposed due to an exception in the program.\n\n// Setting $showExceptions to true will cause not only exceptions to be displayed\n// but also the backtrace, which can result in security issues such as exposing\n// your MySQL user and password when unable to connect. Please keep it at false\n// in a production environment.\n\n$adminEmail      = 'admin@localhost'; // Administrator e-mail address.\n$errorFile       = 'error.php';       // Error file to render.\n$showExceptions  = true;              // Whether or not to show exceptions (only applies to error.php)\n?>\n"
  },
  {
    "path": "config/feedingtypes.php",
    "content": "<?php\nreturn array(\n    'P' => 'Pet',\n    'H' => 'Homunculus',\n    'O' => 'Other',\n);\n"
  },
  {
    "path": "config/groups.php",
    "content": "<?php\nfinal class AccountLevel {\n/*\tCorresponds to the different 'level' attribrutes */\n\tconst ANYONE =   -2;\n\tconst UNAUTH =   -1;\n\tconst NORMAL =    0;\n\tconst LOWGM  =    1;\n\tconst HIGHGM =    2;\n\tconst ADMIN  =   99;\n\tconst NOONE  = 9999;\n\t\n\tprivate static $groups = array(\n/**\n *\tSyntax:\n * \t\t<group_id> => array(\n *\t\t\t'name'  => \"<group name>\",\n *\t\t\t'level' => \"<group level>\",\n * \t\t),\n */\n\t\t0 => array(\n\t\t\t'name'  => \"Player\",\n\t\t\t'level' => AccountLevel::NORMAL\n\t\t),\n\t\t1 => array(\n\t\t\t'name'  => \"Super Player\",\n\t\t\t'level' => AccountLevel::NORMAL\n\t\t),\n\t\t2 => array(\n\t\t\t'name'  => \"Support\",\n\t\t\t'level' => AccountLevel::LOWGM\n\t\t),\n\t\t3 => array(\n\t\t\t'name'  => \"Script Manager\",\n\t\t\t'level' => AccountLevel::LOWGM\n\t\t),\n\t\t4 => array(\n\t\t\t'name'  => \"Event Manager\",\n\t\t\t'level' => AccountLevel::LOWGM\n\t\t),\n\t\t5 => array(\n\t\t\t'name'  => \"VIP\",\n\t\t\t'level' => AccountLevel::NORMAL\n\t\t),\n\t\t10 => array(\n\t\t\t'name'  => \"Law Enforcement\",\n\t\t\t'level' => AccountLevel::HIGHGM\n\t\t),\n\t\t99 => array(\n\t\t\t'name'  => \"Admin\",\n\t\t\t'level' => AccountLevel::ADMIN\n\t\t)\n\t);\n\n\t// DON'T TOUCH ANYTHING BELOW. THIS IS FOR DEVELOPERS.\n\t\n\t/**\n\t * Get array of all groups.\n\t *\n\t * @return array\n\t * @access public\n\t */\n   public static function getArray() {\n        return self::$groups;\n    }\n\t\n\t/**\n\t * Get array of group IDs that satisfy the operation \n\t * condition that compares the group level.\n\t *\n\t * @param int $compare\n\t * @param string $op\n\t * @return array\n\t * @access public\n\t */\n    public static function getGroupID($compare, $op) {\n\t\t$group_id = array();\n\t\tforeach(self::$groups as $id => $group) {\n\t\t\tif( ($op == '<' && $group['level'] < $compare) || ($op == '>' && $group['level'] > $compare) ||\n\t\t\t\t($op == '<=' && $group['level'] <= $compare) || ($op == '>=' && $group['level'] >= $compare)) {\n\t\t\t\tarray_push($group_id, $id);\n\t\t\t}\n\t\t}\n        return $group_id;\n    }\n\t\n\t/**\n\t * Get the level associated with the group ID.\n\t *\n\t * @param int $group_id\n\t * @return int\n\t * @access public\n\t */\n    public static function getGroupLevel($group_id) {\n\t\tif(isset(self::$groups[$group_id]['level'])) {\n\t\t\treturn self::$groups[$group_id]['level'];\n\t\t}\n\t\telse {\n\t\t\treturn AccountLevel::NORMAL;\n\t\t}\n    }\n\t\n\t/**\n\t * Get the name associated with the group ID.\n\t *\n\t * @param int $group_id\n\t * @return string\n\t * @access public\n\t */\n    public static function getGroupName($group_id) {\n\t\tif(isset(self::$groups[$group_id]['name'])) {\n\t\t\treturn self::$groups[$group_id]['name'];\n\t\t}\n\t\telse {\n\t\t\treturn \"N/A\";\n\t\t}\n    }\n}\n?>\n"
  },
  {
    "path": "config/homunculus.php",
    "content": "<?php\nreturn array(\n\t// Lif\n\t6001 => 'Lif',\n\t6009 => 'Lif',\n\t6005 => 'Lif',\n\t6013 => 'Lif',\n\t\n\t// Amistr\n\t6002 => 'Amistr',\n\t6010 => 'Amistr',\n\t6006 => 'Amistr',\n\t6014 => 'Amistr',\n\t\n\t// Filir\n\t6003 => 'Filir',\n\t6011 => 'Filir',\n\t6007 => 'Filir',\n\t6015 => 'Filir',\n\t\n\t// Vanilmirth\n\t6004 => 'Vanilmirth',\n\t6012 => 'Vanilmirth',\n\t6008 => 'Vanilmirth',\n\t6016 => 'Vanilmirth',\n\t\n\t// Homunculus S\n\t6048 => 'Eira',\n\t6049 => 'Bayeri',\n\t6050 => 'Sera',\n\t6051 => 'Dieter',\n\t6052 => 'Elanor'\n);\n?>\n"
  },
  {
    "path": "config/item_randoptions.php",
    "content": "<?php\nreturn array(\n\t1\t=>\t'MaxHP +%s',\n\t2\t=>\t'MaxSP +%s',\n\t3\t=>\t'STR +%s',\n\t4\t=>\t'AGI +%s',\n\t5\t=>\t'VIT +%s',\n\t6\t=>\t'INT +%s',\n\t7\t=>\t'DEX +%s',\n\t8\t=>\t'LUK +%s',\n\t9\t=>\t'MaxHP +%s%%',\n\t10\t=>\t'MaxSP +%s%%',\n\t11\t=>\t'HP regen +%s%%',\n\t12\t=>\t'SP regen +%s%%',\n\t13\t=>\t'ATK +%s%%',\n\t14\t=>\t'MATK +%s%%',\n\t15\t=>\t'ASPD +%s',\n\t16\t=>\t'Delay after attack -%s%%',\n\t17\t=>\t'ATK +%s',\n\t18\t=>\t'HIT +%s',\n\t19\t=>\t'MATK +%s',\n\t20\t=>\t'DEF +%s',\n\t21\t=>\t'MDEF +%s',\n\t22\t=>\t'FLEE +%s',\n\t23\t=>\t'Perfect dodge +%s',\n\t24\t=>\t'CRIT +%s',\n\t25\t=>\t'Neutral elemental resistance +%s%%',\n\t26\t=>\t'Water elemental resistance +%s%%',\n\t27\t=>\t'Earth elemental resistance +%s%%',\n\t28\t=>\t'Fire elemental resistance +%s%%',\n\t29\t=>\t'Wind elemental resistance +%s%%',\n\t30\t=>\t'Poison elemental resistance +%s%%',\n\t31\t=>\t'Holy elemental resistance +%s%%',\n\t32\t=>\t'Shadow elemental resistance +%s%%',\n\t33\t=>\t'Ghost elemental resistance +%s%%',\n\t34\t=>\t'Undead elemental resistance +%s%%',\n\t35\t=>\t'All elementals resistance +%s%%',\n\t36\t=>\t'Neutral monster resistance +%s%%',\n\t37\t=>\t'ATK +%s%% against Neutral monster',\n\t38\t=>\t'Water monster resistance +%s%%',\n\t39\t=>\t'ATK +%s%% against Water monster',\n\t40\t=>\t'Earth monster resistance +%s%%',\n\t41\t=>\t'ATK +%s%% against Earth monster',\n\t42\t=>\t'Fire monster resistance +%s%%',\n\t43\t=>\t'ATK +%s%% against Fire monster',\n\t44\t=>\t'Wind monster resistance +%s%%',\n\t45\t=>\t'ATK +%s%% against Wind monster',\n\t46\t=>\t'Poison monster resistance +%s%%',\n\t47\t=>\t'ATK +%s%% against Poison monster',\n\t48\t=>\t'Holy monster resistance +%s%%',\n\t49\t=>\t'ATK +%s%% against Holy monster',\n\t50\t=>\t'Shadow monster resistance +%s%%',\n\t51\t=>\t'ATK +%s%% against Shadow monster',\n\t52\t=>\t'Ghost monster resistance +%s%%',\n\t53\t=>\t'ATK +%s%% against Ghost monster',\n\t54\t=>\t'Undead monster resistance +%s%%',\n\t55\t=>\t'ATK +%s%% against Undead monster',\n\t56\t=>\t'Neutral monster magic resistance +%s%%',\n\t57\t=>\t'MATK +%s%% against Neutral monster',\n\t58\t=>\t'Water monster magic resistance +%s%%',\n\t59\t=>\t'MATK +%s%% against Water monster',\n\t60\t=>\t'Earth monster magic resistance +%s%%',\n\t61\t=>\t'MATK +%s%% against  Earth monster',\n\t62\t=>\t'Fire monster magic resistance +%s%%',\n\t63\t=>\t'MATK +%s%% against Fire monster',\n\t64\t=>\t'Wind monster magic resistance +%s%%',\n\t65\t=>\t'MATK +%s%% against Wind monster',\n\t66\t=>\t'Poison monster magic resistance +%s%%',\n\t67\t=>\t'MATK +%s%% against Poison monster',\n\t68\t=>\t'Holy monster magic resistance +%s%%',\n\t69\t=>\t'MATK +%s%% against Holy monster',\n\t70\t=>\t'Shadow monster magic resistance +%s%%',\n\t71\t=>\t'MATK +%s%% against Shadow monster',\n\t72\t=>\t'Ghost monster magic resistance +%s%%',\n\t73\t=>\t'MATK +%s%% against Ghost monster',\n\t74\t=>\t'Undead monster magic resistance +%s%%',\n\t75\t=>\t'MATK +%s%% against Undead monster',\n\t76\t=>\t'Armor element: Neutral',\n\t77\t=>\t'Armor element: Water',\n\t78\t=>\t'Armor element: Earth',\n\t79\t=>\t'Armor element: Fire',\n\t80\t=>\t'Armor element: Wind',\n\t81\t=>\t'Armor element: Poison',\n\t82\t=>\t'Armor element: Holy',\n\t83\t=>\t'Armor element: Shadow',\n\t84\t=>\t'Armor element: Ghost',\n\t85\t=>\t'Armor element: Undead',\n\t//86\t=>\t'',\n\t87\t=>\t'Formless monster resistance +%s%%',\n\t88\t=>\t'Undead monster resistance +%s%%',\n\t89\t=>\t'Brute monster resistance +%s%%',\n\t90\t=>\t'Plant monster resistance +%s%%',\n\t91\t=>\t'Insect monster resistance +%s%%',\n\t92\t=>\t'Fish monster resistance +%s%%',\n\t93\t=>\t'Demon monster resistance +%s%%',\n\t94\t=>\t'Demihuman monster resistance +%s%%',\n\t95\t=>\t'Angel monster resistance +%s%%',\n\t96\t=>\t'Dragon monster resistance +%s%%',\n\t97\t=>\t'ATK +%s%% against Formless monster',\n\t98\t=>\t'ATK +%s%% against Undead monster',\n\t99\t=>\t'ATK +%s%% against Brute monster',\n\t100\t=>\t'ATK +%s%% against Plant monster',\n\t101\t=>\t'ATK +%s%% against Insect monster',\n\t102\t=>\t'ATK +%s%% against Fish monster',\n\t103\t=>\t'ATK +%s%% against Demon monster',\n\t104\t=>\t'ATK +%s%% against Demihuman monster',\n\t105\t=>\t'ATK +%s%% against Angel monster',\n\t106\t=>\t'ATK +%s%% against Dragon monster',\n\t107\t=>\t'MATK +%s%% against Formless monster',\n\t108\t=>\t'MATK +%s%% against Undead monster',\n\t109\t=>\t'MATK +%s%% against Brute monster',\n\t110\t=>\t'MATK +%s%% against Plant monster',\n\t111\t=>\t'MATK +%s%% against Insect monster',\n\t112\t=>\t'MATK +%s%% against Fish monster',\n\t113\t=>\t'MATK +%s%% against Devil monster',\n\t114\t=>\t'MATK +%s%% against Demihuman monster',\n\t115\t=>\t'MATK +%s%% against Angel monster',\n\t116\t=>\t'MATK +%s%% against Dragon monster',\n\t117\t=>\t'CRIT +%s against Formless monster',\n\t118\t=>\t'CRIT +%s against Undead monster',\n\t119\t=>\t'CRIT +%s against Brute monster',\n\t120\t=>\t'CRIT +%s against Plant monster',\n\t121\t=>\t'CRIT +%s against Insect monster',\n\t122\t=>\t'CRIT +%s against Fish monster',\n\t123\t=>\t'CRIT +%s against Demon monster',\n\t124\t=>\t'CRIT +%s against Demihuman monster',\n\t125\t=>\t'CRIT +%s against Angel monster',\n\t126\t=>\t'CRIT +%s against Dragon monster',\n\t127\t=>\t'Pierces %s%% DEF of Formless monster',\n\t128\t=>\t'Pierces %s%% DEF of Undead monster',\n\t129\t=>\t'Pierces %s%% DEF of Brute monster',\n\t130\t=>\t'Pierces %s%% DEF of Plant monster',\n\t131\t=>\t'Pierces %s%% DEF of Insect monster',\n\t132\t=>\t'Pierces %s%% DEF of Fish monster',\n\t133\t=>\t'Pierces %s%% DEF of Demon monster',\n\t134\t=>\t'Pierces %s%% DEF of Demihuman monster',\n\t135\t=>\t'Pierces %s%% DEF of Angel monster',\n\t136\t=>\t'Pierces %s%% DEF of Dragon monster',\n\t137\t=>\t'Pierces %s%% MDEF of Formless monster',\n\t138\t=>\t'Pierces %s%% MDEF of Undead monster',\n\t139\t=>\t'Pierces %s%% MDEF of Brute monster',\n\t140\t=>\t'Pierces %s%% MDEF of Plant monster',\n\t141\t=>\t'Pierces %s%% MDEF of Insect monster',\n\t142\t=>\t'Pierces %s%% MDEF of Fish monster',\n\t143\t=>\t'Pierces %s%% MDEF of Demon monster',\n\t144\t=>\t'Pierces %s%% MDEF of Demihuman monster',\n\t145\t=>\t'Pierces %s%% MDEF of Angel monster',\n\t146\t=>\t'Pierces %s%% MDEF of Dragon monster',\n\t147\t=>\t'ATK +%s%% against Normal monster',\n\t148\t=>\t'ATK +%s%% against Boss monster',\n\t149\t=>\t'Normal monster resistance +%s%%',\n\t150\t=>\t'Boss monster resistance +%s%%',\n\t151\t=>\t'MATK +%s%% against Normal monster',\n\t152\t=>\t'MATK +%s%% against Boss monster',\n\t153\t=>\t'Pierces %s%% DEF of Normal monster',\n\t154\t=>\t'Pierces %s%% DEF of Boss monster',\n\t155\t=>\t'Pierces %s%% MDEF of Normal monster',\n\t156\t=>\t'Pierces %s%% MDEF of Boss monster',\n\t157\t=>\t'ATK +%s%% against Small size monster',\n\t158\t=>\t'ATK +%s%% against Medium size monster',\n\t159\t=>\t'ATK +%s%% against Large size monster',\n\t160\t=>\t'Small monster resistance +%s%%',\n\t161\t=>\t'Medium monster resistance +%s%%',\n\t162\t=>\t'Large monster resistance +%s%%',\n\t163\t=>\t'Nullify weapon\\'s damage size penalty',\n\t164\t=>\t'Critical attack +%s%%',\n\t165\t=>\t'Critical damage -%s%%',\n\t166\t=>\t'Long range physical attack +%s%%',\n\t167\t=>\t'Long range physical damage -%s%%',\n\t168\t=>\t'Healing skills +%s%%',\n\t169\t=>\t'Restoration gained from Healing skills +%s%%',\n\t170\t=>\t'Variable cast time -%s%%',\n\t171\t=>\t'After cast delay -%s%%',\n\t172\t=>\t'Reduces SP cost by %s%%',\n\t//173\t=>\t'',\n\t//174\t=>\t'',\n\t175\t=>\t'Weapon element: Neutral',\n\t176\t=>\t'Weapon element: Water',\n\t177\t=>\t'Weapon element: Earth',\n\t178\t=>\t'Weapon element: Fire',\n\t179\t=>\t'Weapon element: Wind',\n\t180\t=>\t'Weapon element: Poison',\n\t181\t=>\t'Weapon element: Holy',\n\t182\t=>\t'Weapon element: Shadow',\n\t183\t=>\t'Weapon element: Ghost',\n\t184\t=>\t'Weapon element: Undead',\n\t185\t=>\t'Indestructible in battle',\n\t186\t=>\t'Indestructible in battle',\n\t187\t=>\t'MATK against Small size monster +%s%%',\n\t188\t=>\t'MATK against Medium size monster +%s%%',\n\t189\t=>\t'MATK against Large size monster +%s%%',\n\t190\t=>\t'Small monster magic resistance +%s%%',\n\t191\t=>\t'Medium monster magic resistance +%s%%',\n\t192\t=>\t'Large monster magic resistance +%s%%',\n\t193\t=>\t'Elemental attacks resistance +%s%%',\n\t194\t=>\t'Formless monster resistance +%s%%',\n\t195\t=>\t'Undead monster resistance +%s%%',\n\t196\t=>\t'Brute monster resistance +%s%%',\n\t197\t=>\t'Plant monster resistance +%s%%',\n\t198\t=>\t'Insect monster resistance +%s%%',\n\t199\t=>\t'Fish monster resistance +%s%%',\n\t200\t=>\t'Demon monster resistance +%s%%',\n\t201\t=>\t'Demihuman monster resistance +%s%%',\n\t202\t=>\t'Angel monster resistance +%s%%',\n\t203\t=>\t'Dragon monster resistance +%s%%',\n\t204\t=>\t'Long range physical attack +%s%%',\n\t205\t=>\t'Long range physical damage -%s%%',\n\t206\t=>\t'Demi-Human players resistance + %s%%',\n\t207\t=>\t'Doram players resistance +%s%%',\n\t208\t=>\t'ATK against Demi-Human players +%s%%',\n\t209\t=>\t'ATK against Doram players +%s%%',\n\t210\t=>\t'MATK against Demi-Human players +%s%%',\n\t211\t=>\t'MATK against Doram players +%s%%',\n\t212\t=>\t'Critical +%s for Demi-Human players',\n\t213\t=>\t'Critical +%s for Doram players',\n\t214\t=>\t'Pierces %s%% DEF of Demi-Human players',\n\t215\t=>\t'Pierces %s%% DEF of Doram players',\n\t216\t=>\t'Pierces %s%% MDEF of Demi-Human players',\n\t217\t=>\t'Pierces %s%% MDEF of Doram players',\n\t218\t=>\t'Recieved reflected damage -%s%%',\n\t219\t=>\t'Melee physical damage +%s%%',\n\t220\t=>\t'Melee physical damage -%s%%',\n\t)\n?>\n"
  },
  {
    "path": "config/itemsflags.php",
    "content": "<?php\nreturn array(\n\t'flag_buyingstore'\t=> 'Item is available to Buying Stores',\n\t'flag_deadbranch'\t=> 'Item is a Dead Branch type',\n\t'flag_container'\t=> 'Item is part of a Container',\n\t'flag_uniqueid'\t\t=> 'Item is a unique stack',\n\t'flag_bindonequip'\t=> 'Item is bound to the character upon equipping',\n\t'flag_dropannounce'\t=> 'Item has a special announcement to self on drop',\n\t'flag_noconsume'\t=> 'Item is consumed on use',\n)\n?>\n"
  },
  {
    "path": "config/itemsubtypes.php",
    "content": "<?php\nreturn array(\n\t'weapon' => array(\n\t\t'1haxe'\t\t\t=> 'One-Handed Axe',\n\t\t'1hspear'\t\t=> 'One-Handed Spear',\n\t\t'1hsword'\t\t=> 'One-Handed Sword',\n\t\t'2haxe'\t\t\t=> 'Two-Handed Axe',\n\t\t'2hspear'\t\t=> 'Two-Handed Spear',\n\t\t'2hstaff'\t\t=> 'Two-Handed Staff',\n\t\t'2hsword'\t\t=> 'Two-Handed Sword',\n\t\t'book'\t\t\t=> 'Book',\n\t\t'bow'\t\t\t=> 'Bow',\n\t\t'dagger'\t\t=> 'Dagger',\n\t\t'gatling'\t\t=> 'Gatling Gun',\n\t\t'grenade'\t\t=> 'Grenade Launcher',\n\t\t'huuma'\t\t\t=> 'Fuuma Shuriken',\n\t\t'katar'\t\t\t=> 'Katar',\n\t\t'knuckle'\t\t=> 'Knuckle',\n\t\t'mace'\t\t\t=> 'Mace',\n\t\t'musical'\t\t=> 'Musical Instrument',\n\t\t'revolver'\t\t=> 'Revolver',\n\t\t'rifle'\t\t\t=> 'Rifle',\n\t\t'shotgun'\t\t=> 'Shotgun',\n\t\t'staff'\t\t\t=> 'Staff',\n\t\t'whip'\t\t\t=> 'Whip'\n\t),\n\t'ammo' => array(\n\t\t'arrow'\t\t\t=> 'Arrow',\n\t\t'bullet'\t\t=> 'Bullet',\n\t\t'dagger'\t\t=> 'Throwing Dagger',\n\t\t'cannonball'\t=> 'Cannonball',\n\t\t'grenade'\t\t=> 'Grenade',\n\t\t'kunai'\t\t\t=> 'Kunai',\n\t\t'shell'\t\t\t=> 'Shell',\n\t\t'shuriken'\t\t=> 'Shuriken',\n\t\t'throwweapon'\t=> 'Throwable Item (Sling Item)'\n\t),\n\t'card' => array(\n\t\t'normal'\t\t\t=> 'Card',\n\t\t'enchant'\t\t\t=> 'Enchant'\n\t)\n)\n?>"
  },
  {
    "path": "config/itemtypes.php",
    "content": "<?php\nreturn array(\n\t'ammo'\t\t\t=> 'Ammo',\n\t'armor'\t\t\t=> 'Armor',\n\t'card'\t\t\t=> 'Card',\n\t'cash'\t\t\t=> 'Cash Shop Reward',\n\t'delayconsume'\t=> 'Delay Consume',\n\t'etc'\t\t\t=> 'Etc',\n\t'healing'\t\t=> 'Healing',\n\t'petarmor'\t\t=> 'Pet Armor',\n\t'petegg'\t\t=> 'Pet Egg',\n\t'shadowgear'\t=> 'Shadow Equipment',\n\t'usable'\t\t=> 'Usable',\n\t'weapon'\t\t=> 'Weapon'\n)\n?>\n"
  },
  {
    "path": "config/jobs.php",
    "content": "<?php\nreturn array(\n\t0    => 'Novice',\n\t1    => 'Swordsman',\n\t2    => 'Mage',\n\t3    => 'Archer',\n\t4    => 'Acolyte',\n\t5    => 'Merchant',\n\t6    => 'Thief',\n\t7    => 'Knight',\n\t8    => 'Priest',\n\t9    => 'Wizard',\n\t10   => 'Blacksmith',\n\t11   => 'Hunter',\n\t12   => 'Assassin',\n\t//13   => 'Knight (Mounted)',\n\t14   => 'Crusader',\n\t15   => 'Monk',\n\t16   => 'Sage',\n\t17   => 'Rogue',\n\t18   => 'Alchemist',\n\t19   => 'Bard',\n\t20   => 'Dancer',\n\t//21   => 'Crusader (Mounted)',\n\t22   => 'Wedding',\n\t23   => 'Super Novice',\n\t24   => 'Gunslinger',\n\t25   => 'Ninja',\n\t26   => 'Xmas',\n\t27   => 'Summer',\n\t28   => 'Hanbok',\n\t29   => 'Oktoberfest',\n\n\t4001 => 'High Novice',\n\t4002 => 'High Swordsman',\n\t4003 => 'High Mage',\n\t4004 => 'High Archer',\n\t4005 => 'High Acolyte',\n\t4006 => 'High Merchant',\n\t4007 => 'High Thief',\n\t4008 => 'Lord Knight',\n\t4009 => 'High Priest',\n\t4010 => 'High Wizard',\n\t4011 => 'Whitesmith',\n\t4012 => 'Sniper',\n\t4013 => 'Assassin Cross',\n\t//4014 => 'Lord Knight (Mounted)',\n\t4015 => 'Paladin',\n\t4016 => 'Champion',\n\t4017 => 'Professor',\n\t4018 => 'Stalker',\n\t4019 => 'Creator',\n\t4020 => 'Clown',\n\t4021 => 'Gypsy',\n\t//4022 => 'Paladin (Mounted)',\n\n\t4023 => 'Baby',\n\t4024 => 'Baby Swordsman',\n\t4025 => 'Baby Mage',\n\t4026 => 'Baby Archer',\n\t4027 => 'Baby Acolyte',\n\t4028 => 'Baby Merchant',\n\t4029 => 'Baby Thief',\n\t4030 => 'Baby Knight',\n\t4031 => 'Baby Priest',\n\t4032 => 'Baby Wizard',\n\t4033 => 'Baby Blacksmith',\n\t4034 => 'Baby Hunter',\n\t4035 => 'Baby Assassin',\n\t//4036 => 'Baby Knight (Mounted)',\n\t4037 => 'Baby Crusader',\n\t4038 => 'Baby Monk',\n\t4039 => 'Baby Sage',\n\t4040 => 'Baby Rogue',\n\t4041 => 'Baby Alchemist',\n\t4042 => 'Baby Bard',\n\t4043 => 'Baby Dancer',\n\t//4044 => 'Baby Crusader (Mounted)',\n\t4045 => 'Super Baby',\n    \n\t4046 => 'Taekwon',\n\t4047 => 'Star Gladiator',\n\t//4048 => 'Star Gladiator (Flying)',\n\t4049 => 'Soul Linker',\n\n\t4050 => 'Jiang Shi',\n\t4051 => 'Death Knight',\n\t4052 => 'Dark Collector',\n\n\t4054 => 'Rune Knight',\n\t4055 => 'Warlock',\n\t4056 => 'Ranger',\n\t4057 => 'Arch Bishop',\n\t4058 => 'Mechanic',\n\t4059 => 'Guillotine Cross',\n\t4060 => 'Rune Knight+',\n\t4061 => 'Warlock+',\n\t4062 => 'Ranger+',\n\t4063 => 'Arch Bishop+',\n\t4064 => 'Mechanic+',\n\t4065 => 'Guillotine Cross+',\n\t4066 => 'Royal Guard',\n\t4067 => 'Sorcerer',\n\t4068 => 'Minstrel',\n\t4069 => 'Wanderer',\n\t4070 => 'Sura',\n\t4071 => 'Genetic',\n\t4072 => 'Shadow Chaser',\n\t4073 => 'Royal Guard+',\n\t4074 => 'Sorcerer+',\n\t4075 => 'Minstrel+',\n\t4076 => 'Wanderer+',\n\t4077 => 'Sura+',\n\t4078 => 'Genetic+',\n\t4079 => 'Shadow Chaser+',\n\n\t//4080 => 'Rune Knight (Mounted)',\n\t//4081 => 'Rune Knight+ (Mounted)',\n\t//4082 => 'Royal Guard (Mounted)',\n\t//4083 => 'Royal Guard+ (Mounted)',\n\t//4084 => 'Ranger (Mounted)',\n\t//4085 => 'Ranger+ (Mounted)',\n\t//4086 => 'Mechanic (Magic Gear)',\n\t//4087 => 'Mechanic+ (Magic Gear)',\n\n\t4096 => 'Baby Rune Knight',\n\t4097 => 'Baby Warlock',\n\t4098 => 'Baby Ranger',\n\t4099 => 'Baby Arch Bishop',\n\t4100 => 'Baby Mechanic',\n\t4101 => 'Baby Guillotine Cross',\n\t4102 => 'Baby Royal Guard',\n\t4103 => 'Baby Sorcerer',\n\t4104 => 'Baby Minstrel',\n\t4105 => 'Baby Wanderer',\n\t4106 => 'Baby Sura',\n\t4107 => 'Baby Genetic',\n\t4108 => 'Baby Shadow Chaser',\n\t\n\t//4109 => 'Baby Rune Knight (Mounted)',\n\t//4110 => 'Baby Royal Guard (Mounted)',\n\t//4111 => 'Baby Ranger (Mounted)',\n\t//4112 => 'Baby Mechanic (Magic Gear)',\n\t\n\t4190 => 'Expanded Super Novice',\n\t4191 => 'Expanded Super Baby',\n\t\n\t4211 => 'Kagerou',\n\t4212 => 'Oboro',\n\t\n\t4215 => 'Rebellion',\n\t4218 => 'Summoner',\n\n\t4220 => 'Baby Summoner',\n\t4222 => 'Baby Ninja',\n\t4223 => 'Baby Kagero',\n\t4224 => 'Baby Oboro',\n\t4225 => 'Baby Taekwon',\n\t4226 => 'Baby Star Gladiator',\n\t4227 => 'Baby Soul Linker',\n\t4228 => 'Baby Gunslinger',\n\t4229 => 'Baby Rebellion',\n\t//4238 => 'Baby Star Gladiator (Union)',\n\t\n\t//4238 => 'Baby Star Glad (Union)',\n\t4239 => 'Star Emperor',\n\t4240 => 'Soul Reaper',\n\t4241 => 'Baby Star Emperor',\n\t4242 => 'Baby Soul Reaper',\n\n\t4252 => 'Dragon Knight',\n\t4253 => 'Meister',\n\t4254 => 'Shadow Cross',\n\t4255 => 'Arch Mage',\n\t4256 => 'Cardinal',\n\t4257 => 'WindHawk',\n\t4258 => 'Imperial Guard',\n\t4259 => 'Biolo',\n\t4260 => 'Abyss Chaser',\n\t4261 => 'Elemental Master',\n\t4262 => 'Inquisitor',\n\t4263 => 'Troubadour',\n\t4264 => 'Trouvere',\n\n\t//4278 => 'Windhawk (Mounted)',\n\t//4279 => 'Meister (Mounted)',\n\t//4280 => 'Dragon Knight (Mounted)',\n\t//4281 => 'Imperial Guard (Mounted)',\n\n\t4302 => 'Sky Emperor',\n\t4303 => 'Soul Ascetic',\n\t4304 => 'Shinkiro',\n\t4305 => 'Shiranui',\n\t4306 => 'Night Watch',\n\t4307 => 'Hyper Novice',\n\t4308 => 'Spirit Handler',\n    \n\t//4316 => 'Sky Emperor (Mounted)',\n    \n)\n?>\n"
  },
  {
    "path": "config/jobs_alchemist.php",
    "content": "<?php\nreturn array(\n\t18   => 'Alchemist',\n\t4019 => 'Creator',\n\t4041 => 'Baby Alchemist',\n\t4071 => 'Genetic',\n\t4078 => 'Genetic+',\n\t4107 => 'Baby Genetic',\n\t4259 => 'Biolo'\n)\n?>\n"
  },
  {
    "path": "config/jobs_blacksmith.php",
    "content": "<?php\nreturn array(\n\t10   => 'Blacksmith',\n\t4011 => 'Whitesmith',\n\t4033 => 'Baby Blacksmith',\n\t4058 => 'Mechanic',\n\t4064 => 'Mechanic+',\n\t4100 => 'Baby Mechanic',\n\t4253 => 'Meister'\n)\n?>\n"
  },
  {
    "path": "config/jobs_gender_linked.php",
    "content": "<?php\nreturn array(\n\t19   => 'Bard',\n\t20   => 'Dancer',\n\t4020 => 'Clown',\n\t4021 => 'Gypsy',\n\t4042 => 'Baby Bard',\n\t4043 => 'Baby Dancer',\n\t4068 => 'Minstrel',\n\t4069 => 'Wanderer',\n\t4075 => 'Minstrel+',\n\t4076 => 'Wanderer+',\n\t4104 => 'Baby Minstrel',\n\t4105 => 'Baby Wanderer',\n\t4211 => 'Kagerou',\n\t4212 => 'Oboro',\n\t4223 => 'Baby Kagerou',\n\t4224 => 'Baby Oboro',\n\t4263 => 'Troubadour',\n\t4264 => 'Trouvere'\n)\n?>\n"
  },
  {
    "path": "config/loginerrors.php",
    "content": "<?php\nreturn array(\n\t0 => 'Unexpected Error',\n\t1 => 'Invalid Server',\n\t2 => 'Invalid Credentials',\n\t3 => 'Temporarily Banned',\n\t4 => 'Permanently Banned',\n\t5 => 'IP Banned',\n\t6 => 'Invalid Security Code',\n\t7 => 'Pending Confirmation'\n)\n?>\n"
  },
  {
    "path": "config/monster_ai.php",
    "content": "<?php\nreturn array(\n\t'01'\t\t\t=> array('mode_canattack', 'mode_canmove'),\n\t'02'\t\t\t=> array('mode_canattack', 'mode_looter', 'mode_canmove'),\n\t'03'\t\t\t=> array('mode_changetargetmelee', 'mode_canattack', 'mode_assist', 'mode_canmove'),\n\t'04'\t\t\t=> array('mode_changetargetchase', 'mode_changetargetmelee', 'mode_angry', 'mode_canattack', 'mode_aggressive', 'mode_canmove'),\n\t'05'\t\t\t=> array('mode_changetargetchase', 'mode_canattack', 'mode_aggressive', 'mode_canmove'),\n\t'06'\t\t\t=> array(),\n\t'07'\t\t\t=> array('mode_changetargetmelee', 'mode_canattack', 'mode_assist', 'mode_looter', 'mode_canmove'),\n\t'08'\t\t\t=> array('mode_targetweak', 'mode_changetargetchase', 'mode_changetargetmelee', 'mode_canattack', 'mode_aggressive', 'mode_canmove'),\n\t'09'\t\t\t=> array('mode_changetargetchase', 'mode_changetargetmelee', 'mode_canattack', 'mode_castsensoridle', 'mode_aggressive', 'mode_canmove'),\n\t'10'\t\t\t=> array('mode_canattack', 'mode_aggressive'),\n\t'11'\t\t\t=> array('mode_canattack', 'mode_aggressive'),\n\t'12'\t\t\t=> array('mode_changetargetchase', 'mode_canattack', 'mode_aggressive', 'mode_canmove'),\n\t'13'\t\t\t=> array('mode_changetargetchase', 'mode_changetargetmelee', 'mode_canattack', 'mode_assist', 'mode_aggressive', 'mode_canmove'),\n\t//14\t\t\t=> array(),\n\t//15\t\t\t=> array(),\n\t//16\t\t\t=> array(),\n\t'17'\t\t\t=> array('mode_canattack', 'mode_castsensoridle', 'mode_canmove'),\n\t//18\t\t\t=> array(),\n\t'19'\t\t\t=> array('mode_changetargetchase', 'mode_changetargetmelee', 'mode_canattack', 'mode_castsensoridle', 'mode_aggressive', 'mode_canmove'),\n\t'20'\t\t\t=> array('mode_changetargetchase', 'mode_changetargetmelee', 'mode_castsensorchase', 'mode_canattack', 'mode_castsensoridle', 'mode_aggressive', 'mode_canmove'),\n\t'21'\t\t\t=> array('mode_changetargetchase', 'mode_changetargetmelee', 'mode_changechase', 'mode_castsensorchase', 'mode_canattack', 'mode_castsensoridle', 'mode_aggressive', 'mode_canmove'),\n\t//22\t\t\t=> array(),\n\t//23\t\t\t=> array(),\n\t'24'\t\t\t=> array('mode_canattack', 'mode_norandomwalk', 'mode_canmove'),\n\t'25'\t\t\t=> array('mode_canmove'),\n\t'26'\t\t\t=> array('mode_randomtarget', 'mode_changetargetchase', 'mode_changetargetmelee', 'mode_changechase', 'mode_castsensorchase', 'mode_canattack', 'mode_castsensoridle', 'mode_aggressive', 'mode_canmove'),\n\t'27'\t\t\t=> array('mode_randomtarget', 'mode_canattack', 'mode_aggressive'),\n)\n?>\n"
  },
  {
    "path": "config/monstermode.php",
    "content": "<?php\nreturn array(\n\t'mode_aggressive'\t\t\t=> 'Aggressive',\n\t'mode_angry'\t\t\t\t=> 'Angry',\n\t'mode_assist'\t\t\t\t=> 'Assist',\n\t'mode_canattack'\t\t\t=> 'Can Attack',\n\t'mode_canmove'\t\t\t\t=> 'Can Move',\n\t'mode_castsensorchase'\t\t=> 'Cast Sensor Chase',\n\t'mode_castsensoridle'\t\t=> 'Cast Sensor Idle',\n\t'mode_changechase'\t\t\t=> 'Change Chase',\n\t'mode_changetargetchase'\t=> 'Change Target Chase',\n\t'mode_changetargetmelee'\t=> 'Change Target Melee',\n\t'mode_detector'\t\t\t\t=> 'Detector',\n\t'mode_fixeditemdrop'\t\t=> 'Fixed Item Drop',\n\t'mode_ignoremagic'\t\t\t=> 'Ignore Magic', \n\t'mode_ignoremelee'\t\t\t=> 'Ignore Melee',\n\t'mode_ignoremisc'\t\t\t=> 'Ignore Misc',\n\t'mode_ignoreranged'\t\t\t=> 'Ignore Ranged',\n\t'mode_knockbackimmune'\t\t=> 'Knockback Immune',\n\t'mode_looter'\t\t\t\t=> 'Looter',\n\t'mode_mvp'\t\t\t\t\t=> 'MVP',\n\t'mode_norandomwalk'\t\t\t=> 'Plant',\n\t'mode_randomtarget'\t\t\t=> 'Random Target',\n\t'mode_skillimmune'\t\t\t=> 'Skill Immune',\n\t'mode_statusimmune'\t\t\t=> 'Status Immune',\n\t'mode_targetweak'\t\t\t=> 'Target Weak',\n\t'mode_teleportblock'\t\t=> 'Teleport Block',\n)\n?>\n"
  },
  {
    "path": "config/picktypes.php",
    "content": "<?php\nreturn array(\n\t'A' => 'Admin',\n\t'B' => 'Buy Store',\n\t'C' => 'Consumed',\n\t'D' => 'Stolen/Ganked',\n\t'E' => 'Mailed',\n\t'F' => 'Bound Retrieval',\n\t'G' => 'Guild Storage',\n\t//'H' => '',\n\t'I' => 'Auctioned',\n\t//'J' => '',\n\t'K' => 'Bank',\n\t'L' => 'Looted',\n\t'M' => 'Monster',\n\t'N' => 'NPC (Script)',\n\t'O' => 'Produced',\n\t'P' => 'Player',\n\t'Q' => 'Quest',\n\t'R' => 'Storage',\n\t'S' => 'NPC (Shop)',\n\t'T' => 'Traded',\n\t'U' => 'MVP',\n\t'V' => 'Vended',\n\t//'W' => '',\n\t'X' => 'Other',\n\t'Y' => 'Lottery',\n\t'Z' => 'Merged',\n\t'$' => 'Cash',\n);\n?>\n"
  },
  {
    "path": "config/races.php",
    "content": "<?php\n// rA monster races.\nreturn array(\n\t 'Formless'\t\t=> 'Formless',\n\t 'Undead'\t\t=> 'Undead',\n\t 'Brute'\t\t=> 'Brute',\n\t 'Plant'\t\t=> 'Plant',\n\t 'Insect'\t\t=> 'Insect',\n\t 'Fish'\t\t\t=> 'Fish',\n\t 'Demon'\t\t=> 'Demon',\n\t 'Demihuman'\t=> 'Demi-Human',\n\t 'Angel'\t\t=> 'Angel',\n\t 'Dragon'\t\t=> 'Dragon'\n)\n?>\n"
  },
  {
    "path": "config/servers.php",
    "content": "<?php\nreturn array(\n\t// Example server configuration. You may have more arrays like this one to\n\t// specify multiple server groups (however they should share the same login\n\t// server whilst they are allowed to have multiple char/map pairs).\n\tarray(\n\t\t'ServerName'     => 'FluxRO',\n\t\t// Global database configuration (excludes logs database configuration).\n\t\t'DbConfig'       => array(\n\t\t\t//'Socket'     => '/tmp/mysql.sock',\n\t\t\t//'Port'       => 3306,\n\t\t\t//'Encoding'   => 'utf8', // Connection encoding -- use whatever here your MySQL tables collation is.\n\t\t\t'Convert'    => 'utf8',\n\t\t\t\t// -- 'Convert' option only works when 'Encoding' option is specified and iconv (http://php.net/iconv) is available.\n\t\t\t\t// -- It specifies the encoding to convert your MySQL data to on the website (most likely needs to be utf8)\n\t\t\t'Hostname'   => '127.0.0.1',\n\t\t\t'Username'   => 'ragnarok',\n\t\t\t'Password'   => 'ragnarok',\n\t\t\t'Database'   => 'ragnarok',\n\t\t\t'Persistent' => true,\n\t\t\t'Timezone'   => null // Example: '+0:00' is UTC.\n\t\t\t// The possible values of 'Timezone' is as documented from the MySQL website:\n\t\t\t// \"The value can be given as a string indicating an offset from UTC, such as '+10:00' or '-6:00'.\"\n\t\t\t// \"The value can be given as a named time zone, such as 'Europe/Helsinki', 'US/Eastern', or 'MET'.\" (see below continuation!)\n\t\t\t// **\"Named time zones can be used only if the time zone information tables in the mysql database have been created and populated.\"\n\t\t),\n\t\t// This is kept separate because many people choose to have their logs\n\t\t// database accessible under different credentials, and often on a\n\t\t// different server entirely to ensure the reliability of the log data.\n\t\t'LogsDbConfig'   => array(\n\t\t\t//'Socket'     => '/tmp/mysql.sock',\n\t\t\t//'Port'       => 3306,\n\t\t\t//'Encoding'   => null, // Connection encoding -- use whatever here your MySQL tables collation is.\n\t\t\t'Convert'    => 'utf8',\n\t\t\t\t// -- 'Convert' option only works when 'Encoding' option is specified and iconv (http://php.net/iconv) is available.\n\t\t\t\t// -- It specifies the encoding to convert your MySQL data to on the website (most likely needs to be utf8)\n\t\t\t'Hostname'   => '127.0.0.1',\n\t\t\t'Username'   => 'ragnarok',\n\t\t\t'Password'   => 'ragnarok',\n\t\t\t'Database'   => 'ragnarok',\n\t\t\t'Persistent' => true,\n\t\t\t'Timezone'   => null // Possible values is as described in the comment in DbConfig.\n\t\t),\n\t\t// Web server configuration.\n\t\t'WebDbConfig'    => array(\n\t\t\t'Hostname'   => '127.0.0.1',\n\t\t\t'Username'   => 'ragnarok',\n\t\t\t'Password'   => 'ragnarok',\n\t\t\t'Database'   => 'ragnarok',\n\t\t\t'Persistent' => true\n\t\t),\n\t\t// Login server configuration.\n\t\t'LoginServer'    => array(\n\t\t\t'Address'  => '127.0.0.1',\n\t\t\t'Port'     => 6900,\n\t\t\t'UseMD5'   => false,\n\t\t\t'NoCase'   => true, // rA account case-sensitivity; Default: Case-INsensitive (true).\n\t\t\t'GroupID'  => 0,    // Default account group ID during registration.\n\t\t\t//'Database' => 'ragnarok'\n\t\t),\n\t\t'CharMapServers' => array(\n\t\t\tarray(\n\t\t\t\t'ServerName'      => 'FluxRO',\n\t\t\t\t'Renewal'         => true,\n\t\t\t\t'MaxCharSlots'    => 9,\n\t\t\t\t'DateTimezone'    => null, // Specifies game server's timezone for this char/map pair. (See: http://php.net/timezones)\n\t\t\t\t//'ResetDenyMaps'   => 'sec_pri', // Defaults to 'sec_pri'. This value can be an array of map names.\n\t\t\t\t//'Database'        => 'ragnarok', // Defaults to DbConfig.Database\n\t\t\t\t'ExpRates' => array(\n\t\t\t\t\t'Base'        => 100, // Rate at which (base) exp is given\n\t\t\t\t\t'Job'         => 100, // Rate at which job exp is given\n\t\t\t\t\t'Mvp'         => 100  // MVP bonus exp rate\n\t\t\t\t),\n\t\t\t\t'DropRates' => array(\n\t\t\t\t\t// If drop rate was below this amount and bonus is applied to it, the bonus can't make it exceed this amount.\n\t\t\t\t\t'DropRateCap' => 9000,\n\t\t\t\t\t// The rate the common items (in the ETC tab, besides card) are dropped\n\t\t\t\t\t'Common'      => 100,\n\t\t\t\t\t'CommonBoss'  => 100,\n\t\t\t\t\t'CommonMVP'   => 100,\n\t\t\t\t\t'CommonMin'   => 1,\n\t\t\t\t\t'CommonMax'   => 10000,\n\t\t\t\t\t// The rate healing items (that restore HP or SP) are dropped\n\t\t\t\t\t'Heal'        => 100,\n\t\t\t\t\t'HealBoss'    => 100,\n\t\t\t\t\t'HealMVP'     => 100,\n\t\t\t\t\t'HealMin'     => 1,\n\t\t\t\t\t'HealMax'     => 10000,\n\t\t\t\t\t// The rate usable items (in the item tab other then healing items) are dropped\n\t\t\t\t\t'Useable'     => 100,\n\t\t\t\t\t'UseableBoss' => 100,\n\t\t\t\t\t'UseableMVP'  => 100,\n\t\t\t\t\t'UseableMin'  => 1,\n\t\t\t\t\t'UseableMax'  => 10000,\n\t\t\t\t\t// The rate at which equipment is dropped\n\t\t\t\t\t'Equip'       => 100,\n\t\t\t\t\t'EquipBoss'   => 100,\n\t\t\t\t\t'EquipMVP'    => 100,\n\t\t\t\t\t'EquipMin'    => 1,\n\t\t\t\t\t'EquipMax'    => 10000,\n\t\t\t\t\t// The rate at which cards are dropped\n\t\t\t\t\t'Card'        => 100,\n\t\t\t\t\t'CardBoss'    => 100,\n\t\t\t\t\t'CardMVP'     => 100,\n\t\t\t\t\t'CardMin'     => 1,\n\t\t\t\t\t'CardMax'     => 10000,\n\t\t\t\t\t// The rate adjustment for the MVP items that the MVP gets directly in their inventory\n\t\t\t\t\t'MvpItem'     => 100,\n\t\t\t\t\t'MvpItemMin'  => 1,\n\t\t\t\t\t'MvpItemMax'  => 10000,\n\t\t\t\t\t// 0 - official order (Show message \"Note: Only one MVP drop will be rewarded.\") , 2 - all items\n\t\t\t\t\t'MvpItemMode' => 0,\n\t\t\t\t),\n\t\t\t\t'CharServer'      => array(\n\t\t\t\t\t'Address'     => '127.0.0.1',\n\t\t\t\t\t'Port'        => 6121\n\t\t\t\t),\n\t\t\t\t'MapServer'       => array(\n\t\t\t\t\t'Address'     => '127.0.0.1',\n\t\t\t\t\t'Port'        => 5121\n\t\t\t\t),\n\t\t\t\t// -- WoE days and times --\n\t\t\t\t// First parameter: Starding day 0=Sunday / 1=Monday / 2=Tuesday / 3=Wednesday / 4=Thursday / 5=Friday / 6=Saturday\n\t\t\t\t// Second parameter: Starting hour in 24-hr format.\n\t\t\t\t// Third paramter: Ending day (possible value is same as starting day).\n\t\t\t\t// Fourth (final) parameter: Ending hour in 24-hr format.\n\t\t\t\t// ** (Note, invalid times are ignored silently.)\n\t\t\t\t'WoeDayTimes'   => array(\n\t\t\t\t\t//array(0, '12:00', 0, '14:00'), // Example: Starts Sunday 12:00 PM and ends Sunday 2:00 PM\n\t\t\t\t\t//array(3, '14:00', 3, '15:00')  // Example: Starts Wednesday 2:00 PM and ends Wednesday 3:00 PM\n\t\t\t\t),\n\t\t\t\t// Modules and/or actions to disallow access to during WoE.\n\t\t\t\t'WoeDisallow'   => array(\n\t\t\t\t\tarray('module' => 'character', 'action' => 'online'),  // Disallow access to \"Who's Online\" page during WoE.\n\t\t\t\t\tarray('module' => 'character', 'action' => 'mapstats') // Disallow access to \"Map Statistics\" page during WoE.\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t)\n);\n?>\n"
  },
  {
    "path": "config/shopcategories.php",
    "content": "<?php\n// These are categories for the item shop. Pay close attention to the numbers,\n// as these numbers are stored in the database when you add an item to a specific\n// category, so it knows which category the item belongs to.\n// You may add/remove categories from here as you see fit.\nreturn array(\n\t0 => 'Headgears',      // Headgears category, most likely doesn't include wings.\n\t1 => 'Wings',          // Wings category, though most of the time wings are headgear, this is more dedicated.\n\t2 => 'Armors',         // Armors category, most likely doesn't include headgears.\n\t3 => 'Weapons',        // Weapons category.\n\t4 => 'Healing Items',  // Good category to place healing items under, e.g., Yggdrasil Berries and the like.\n\t5 => 'Pets',           // Some people may choose to sell pet eggs or pet-related items under here.\n\t6 => 'Miscellaneous',  // Anything you can't really categorize, you can put under this category.\n\t7 => 'Cards'           // Cards category.\n);\n?>\n"
  },
  {
    "path": "config/sizes.php",
    "content": "<?php\n// rA monster sizes.\nreturn array(\n\t 'Small' => 'Small',\n\t 'Medium' => 'Medium',\n\t 'Large' => 'Large'\n)\n?>\n"
  },
  {
    "path": "config/trade_restrictions.php",
    "content": "<?php\nreturn array(\n\t'trade_nodrop'\t\t\t=> 'Can\\'t be dropped',\n\t'trade_notrade'\t\t\t=> 'Can\\'t be traded with player',\n\t'trade_tradepartner'\t=> 'Can\\'t be traded with partner',\n\t'trade_nosell'\t\t\t=> 'Can\\'t be sold to NPC',\n\t'trade_nocart'\t\t\t=> 'Can\\'t be put in Cart',\n\t'trade_nostorage'\t\t=> 'Can\\'t be put in Storage',\n\t'trade_noguildstorage'\t=> 'Can\\'t be put in Guild Storage',\n\t'trade_nomail'\t\t\t=> 'Can\\'t be attached in Mail',\n\t'trade_noauction'\t\t=> 'Can\\'t be auctioned'\n)\n?>\n"
  },
  {
    "path": "data/captcha/fonts/index.html",
    "content": ""
  },
  {
    "path": "data/captcha/index.html",
    "content": ""
  },
  {
    "path": "data/emblem/index.html",
    "content": ""
  },
  {
    "path": "data/index.html",
    "content": ""
  },
  {
    "path": "data/items/icons/index.html",
    "content": ""
  },
  {
    "path": "data/items/images/index.html",
    "content": ""
  },
  {
    "path": "data/items/index.html",
    "content": ""
  },
  {
    "path": "data/itemshop/index.html",
    "content": ""
  },
  {
    "path": "data/jobs/images/F/index.html",
    "content": ""
  },
  {
    "path": "data/jobs/images/M/index.html",
    "content": ""
  },
  {
    "path": "data/jobs/images/index.html",
    "content": ""
  },
  {
    "path": "data/jobs/index.html",
    "content": ""
  },
  {
    "path": "data/logs/index.html",
    "content": ""
  },
  {
    "path": "data/monsters/index.html",
    "content": ""
  },
  {
    "path": "data/npc/DonationNPC.txt",
    "content": "map,x,y,d\tscript\tDonor Rewards Redeemer\t987,{\n\t// ----------------- NPC Settings -----------------\n\t// --- SET THESE BEFORE LOADING THE SCRIPT! ---\n\t\n\t// Server Name\n\tset .serverName$,\"FluxRO\";\n\t\n\t// NPC Name to display during chat.\n\t// Default: \"[Donor Rewards Redeemer]\"\n\tset .npcName$,\"[Donor Rewards Redeemer]\";\n\t\n\t// DO NOT CHANGE THIS!\n\t// Default: \"cp_redeemlog\"\n\tset .redeemTable$,\"cp_redeemlog\";\n\t\n\t// Display Credits to FluxCP Creators?\n\t// Help promote our product if its useful.\n\t// 0 = Disable. 1 = Enable.\n\t// Default: 1\n\tset .showCredits,1;\n\t\n\t// Max number of unique items to redeem at a time.\n\t// DO NOT RAISE THIS VALUE ABOVE 128 WITHOUT\n\t// MAKING THE NECESSARY SCRIPT ENGINE MODS\n\t// FOR SCRIPT ARRAY SIZING! DANGEROUS!\n\t// Default: 128\n\tset .numRedemptionsSimul,128; \n\t// --------------- End NPC Settings ---------------\n\n\t// ----------------- Begin Script -----------------\n\tmes .npcName$;\n\tmes \"Well hello there \" + (Sex ? \"good sir!\" : \"young madam!\");\n\tmes \"How may I be of assistance to you on this fine day?\";\n\tnext;\n\tprompt(\"I wish to redeem items:Who might you be?:I am merely perusing the area\");\n\tmes .npcName$;\n\tswitch(@menu) {\n\t\tcase 1:\n\t\t\tquery_sql \"SELECT `id`, `nameid`, `quantity` FROM `\" + escape_sql(.redeemTable$) + \"` WHERE `account_id` = \" + getcharid(3) + \" AND `redeemed` = 0 LIMIT \" + .numRedemptionsSimul,.@id,.@nameid,.@quantity;\n\t\t\tif (getarraysize(.@id) > 0) {\n\t\t\t\tmes \"Items Pending Redemption: \" + getarraysize(.@id);\n\t\t\t\tfor (set .@i,0; .@i < getarraysize(.@id); set .@i,.@i+1)\n\t\t\t\t\tif (checkweight(.@nameid[.@i],.@quantity[.@i]) == 0) {\n\t\t\t\t\t\tmes \"I'm terribly sorry, but you are carrying too much to accept \" + (.@i ? \"any more of \" : \" \") + \"your rewards at this time.\";\n\t\t\t\t\t\tmes \"Please come back with fewer items.\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tquery_sql \"UPDATE `\" + escape_sql(.redeemTable$) + \"` SET `char_id` = \" + getcharid(0) + \", `redeemed` = 1, `redemption_date` = NOW() WHERE `id` = \" + .@id[.@i];\n\t\t\t\t\t\tgetitem .@nameid[.@i],.@quantity[.@i];\n\t\t\t\t\t\tmes .@quantity[.@i] + \"x \" + getitemname(.@nameid[.@i]);\n\t\t\t\t\t}\n\t\t\t\tif (.@i == getarraysize(.@id)) {\n\t\t\t\t\tmes \"Thank you for your patronage \" + (Sex ? \"fine sir.\" : \"ma'am.\");\n\t\t\t\t\tmes \"Please enjoy your stay on \" + .serverName$ + \"!\";\n\t\t\t\t}\n\t\t\t\tif (.showCredits)\n\t\t\t\t\tcallfunc \"F_FluxCredits\";\n\t\t\t} else {\n\t\t\t\tmes \"My records indicate that there are no rewards awaiting to be redeemed.\";\n\t\t\t\tmes \"My deepest apologies for the misunderstanding.\";\n\t\t\t}\n\t\tbreak;\n\t\tcase 2:\n\t\t\tmes \"I am here to allow for the redemption of rewards for donations to \" + .serverName$ + \".\";\n\t\t\tmes \"Donations may be made to the server via the control panel.\";\n\t\tbreak;\n\t\tdefault:\n\t\t\tmes \"Very well then.\";\n\t\t\tmes \"Good day to you.\";\n\t\tbreak;\n\t}\n\tclose;\n\t// ------------------ End Script ------------------\n}\n\n// ------------ Credits to FluxCP Creators ------------\n// - Please do not modify or delete this function or  -\n// - its contents. To disable the credits from being  -\n// - shown, set .showCredits to 0 in the NPC Settings -\n// - at the top of this file.                         -\n// ----------------------------------------------------\n\nfunction\tscript\tF_FluxCredits\t{\n\tmes \"-----------------------------------\";\n\tmes \"Powered by Flux Control Panel.\";\n\tmes \"Copyright � 2008-2012 Matthew Harris and Nikunj Mehta.\";\n\tmes \"http://fluxcp.googlecode.com/\";\n\treturn;\n}\n"
  },
  {
    "path": "data/npc/PeakNPC.txt",
    "content": "-\tscript\tHighest Peak\t-1,{\n\nOnPCLoginEvent:\n\n// Assign current number of online players\nsleep 1000;\n.onlineusers = getusers(1);\n\n// Today's date\n.date$ = gettime(DT_YEAR)+\"-\"+gettime(DT_MONTH)+\"-\"+gettime(DT_DAYOFMONTH);\n\n// Query for the highest peak in the database\nquery_sql(\"SELECT `users` FROM `\" + .sqltable$ + \"` ORDER BY `users` LIMIT 1\",.@countusers);\n\nif(getarraysize(.@countusers) == 0) {\n\t// There doesn't seem to be a row in our table, so lets create one\n\tquery_sql(\"INSERT INTO `\" + .sqltable$ + \"` (`users`, `date`) VALUES (\" + .onlineusers + \", '\" + .date$ + \"')\");\n} else {\n\tif(.onlineusers > .@countusers[0]) {\n\t\t// This is where we check if we want to announce a new peak\n\t\tif(.displaypeakannounce == 1){\n\t\t\tannounce \"We have reached a new player peak! We now have \"+.onlineusers+\" online!\",bc_all;\n\t\t}\n\t\t// Now lets update the table with our new player peak\n\t\tquery_sql(\"UPDATE `\" + .sqltable$ + \"` SET `users` = '\" + .onlineusers + \"', `date` = '\" + .date$ + \"'\");\n\t}\n}\nend;\n\nOnInit:\n// CONFIGS\n\t// We need an SQL table name first\n\t.sqltable$ = \"cp_onlinepeak\";\n\t\n\t// Would you like an announcement when you reach a higher peak?\n\t// 1 = Yes\n\t// 0 = No\n\t.displaypeakannounce = 1;\n\n// END CONFIGS\n\n}\n"
  },
  {
    "path": "data/npc/index.html",
    "content": ""
  },
  {
    "path": "data/npc/support_cmd.txt",
    "content": "//===== rAthena Script =======================================\n//= @support\n//===== By: ==================================================\n//= Akkarin\n//===== Current Version: =====================================\n//= 1.00.01\n//===== Description: ========================================= \n//= Script control over @support\n//============================================================\n\n-\tscript\tatcmd_support\t-1,{\nOnInit:\n\tbindatcmd(\"support\",\"atcmd_support::Onsupport\");\n\tend;\n\nOnsupport:\n\tquery_sql \"SELECT `cat_id`, `name` FROM `cp_servicedeskcat` WHERE `display` = 1 ORDER BY `name`\", @cat_id, @cat_name$;\n\tmes \"Please select one of the following categories\";\n\tset @j,0;\n\tfor(set @i, 0; @i < getarraysize(@cat_id); set @i, @i + 1){\tset @menulist$[@j],@cat_name$[@i]; set @menureference[@j],@i; set @j,@j+1; }\n\tmenu @menulist$[0],-,@menulist$[1],-,@menulist$[2],-,@menulist$[3],-,@menulist$[4],-,@menulist$[5],-,@menulist$[6],-,@menulist$[7],-,@menulist$[8],-,@menulist$[9],-,@menulist$[10],-,@menulist$[11],-,@menulist$[12],-,@menulist$[13],-,@menulist$[14],-,@menulist$[15],-,@menulist$[16],-,@menulist$[17],-,@menulist$[18],-,@menulist$[19],-,@menulist$[20],-,@menulist$[21],-,@menulist$[22],-,@menulist$[23],-,@menulist$[24],-,@menulist$[25],-,@menulist$[26],-,@menulist$[27],-,@menulist$[28],-,@menulist$[29],-,@menulist$[30],-;\n\tnext;\n\tmes \"Next, please type in a subject line\";\n\tinput @subject$;\n\tnext;\n\tmes \"Please tell us what the problem is. You must make sure that you keep this brief so all the text fits into the box!\";\n\tinput @body$;\n\tnext;\n\tmes \"This is what we have so far.\", \"Click 'Next' to view each entry, then submit your ticket.\";\n\tnext;\n\tmes \"^FF0000Category^000000\", \"You selected \"+@cat_name$[@menureference[@menu-1]]; next;\n\tmes \"^FF0000Subject^000000\", @subject$; next;\n\tmes \"^FF0000Body^000000\", @body$; next;\n\tmes \"If this is all correct, your ticket will be created.\", \"Continue?\";\n\tif(select(\"Yes:No\")==1) {\n\t\tquery_sql \"SELECT `email`, `last_ip` FROM `login` WHERE `account_id` = '\"+getcharid(3)+\"'\", @player_email$, @player_lastip$;\n\t\tquery_sql(\"INSERT INTO `cp_servicedesk` (`account_id`, `category`, `char_id`, `timestamp`, `sslink`, `chatlink`, `videolink`, `subject`, `text`, `ip`, `curemail`) VALUES ('\"+getcharid(3)+\"', '\"+@cat_id[@menureference[@menu-1]]+\"', '\"+getcharid(0)+\"', NOW(), '0', '0', '0', '\"+@subject$+\"', '\"+@body$+\"', '\"+@player_lastip$+\"', '\"+@player_email$+\"')\");\n\t\tmes \"Ticket created.\";\n\t\tclose;\n\t} else {\n\t\tmes \"Submission terminated.\";\n\t\tclose;\n\t\tend;\n\t}\n\tend;\n}"
  },
  {
    "path": "data/npc/web_commands.txt",
    "content": "//===== rAthena Script =======================================\n//= Web Commander\n//===== By: ==================================================\n//= Akkarin, rAthena FluxCP\n//===== Description: =========================================\n//= Simple script to check sql table for commands to process.\n//= Data is input via FluxCP module and checked for unexecuted\n//= commands every 2 seconds.\n//===== Additional Comments: =================================\n//= 1.0 First Version.\n//= 1.1 Fixed code to prevent single-run senarios.\n//============================================================\n\n-\tscript\tCommands\t-1,{\nOnInit:\nstart:\n\tinitnpctimer;\n\tend;\n\nOnTimer2000:\n\t.@nb2 = query_sql(\"SELECT COUNT(*) FROM cp_commands WHERE done=0\",.@count);\n\tif(.@count != 0) {\n\t\t.@nb = query_sql(\"SELECT command,id,account_id FROM cp_commands WHERE done=0 ORDER BY id LIMIT 1\",.@command$,.@id,.@account_id);\n\t\tif(compare(.@command$,\"@\")) {\n\t\t\tattachrid(.@account_id[0]);\n\t\t\tatcommand .@command$[0];\n\t\t} else charcommand .@command$[0];\n\t\tquery_sql(\"UPDATE cp_commands SET done='1' WHERE command='\"+.@command$[0]+\"' AND id='\"+.@id[0]+\"'\");\n\t\t.@nb = 0; .@nb2 = 0; .@count = 0; .@command$ = 0; .@id = 0; .@account_id = 0;\n\t}\n\tstopnpctimer;\n\tgoto start;\n}\n"
  },
  {
    "path": "data/paypal/button.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\nif (empty($amount)) {\n\treturn false;\n}\n\n$session            = Flux::$sessionData;\n$customDataArray    = array('server_name' => $session->loginAthenaGroup->serverName, 'account_id' => $session->account->account_id);\n$customDataEscaped  = htmlspecialchars(base64_encode(serialize($customDataArray)));\n$businessEmail      = htmlspecialchars(Flux::config('PayPalBusinessEmail'));\n$donationCurrency   = htmlspecialchars(Flux::config('DonationCurrency'));\n$creditExchangeRate = Flux::config('CreditExchangeRate');\n$donationCredits    = floor($amount / $creditExchangeRate);\n$itemName           = htmlspecialchars(sprintf('Donation Credits: %s CREDIT(s)', number_format($donationCredits)));\n?>\n<form action=\"https://<?php echo Flux::config('PayPalIpnUrl') ?>/cgi-bin/webscr\" method=\"post\">\n<input type=\"hidden\" name=\"cmd\" value=\"_donations\" />\n<input type=\"hidden\" name=\"notify_url\" value=\"<?php echo $this->url('donate', 'notify', array('_host' => true)) ?>\" />\n<input type=\"hidden\" name=\"return\" value=\"<?php echo $this->url('main', 'index', array('_host' => true)) ?>\" />\n<input type=\"hidden\" name=\"custom\" value=\"<?php echo $customDataEscaped ?>\" />\n<input type=\"hidden\" name=\"business\" value=\"<?php echo $businessEmail ?>\" />\n<input type=\"hidden\" name=\"item_name\" value=\"<?php echo $itemName ?>\" />\n<input type=\"hidden\" name=\"amount\" value=\"<?php echo (float)$amount ?>\" />\n<input type=\"hidden\" name=\"no_shipping\" value=\"0\" />\n<input type=\"hidden\" name=\"no_note\" value=\"1\" />\n<input type=\"hidden\" name=\"currency_code\" value=\"<?php echo $donationCurrency ?>\" />\n<input type=\"hidden\" name=\"tax\" value=\"0\" />\n<input type=\"hidden\" name=\"lc\" value=\"US\" />\n<input type=\"hidden\" name=\"bn\" value=\"PP-DonationsBF\" />\n<p style=\"text-align: center\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif\"\n\tname=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" /></p>\n<img alt=\"\" border=\"0\" src=\"https://www.paypal.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\" />\n</form>\n"
  },
  {
    "path": "data/paypal/index.html",
    "content": ""
  },
  {
    "path": "data/schemas/charmapdb/cp_charprefs.20080929191525.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_charprefs` (\n  `id` int(10) unsigned NOT NULL auto_increment,\n  `account_id` int(11) unsigned NOT NULL,\n  `char_id` int(11) unsigned NOT NULL,\n  `name` varchar(80) NOT NULL,\n  `value` varchar(255) default NULL,\n  `create_date` datetime default NULL,\n  PRIMARY KEY  (`id`)\n) ENGINE=MyISAM COMMENT='Character preferences.';\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_charprefs.20081109093448.sql",
    "content": "ALTER TABLE  `cp_charprefs` ADD INDEX (  `account_id` ,  `char_id` ) ;\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_charprefs.20120816150540.sql",
    "content": "ALTER TABLE `cp_charprefs` ADD INDEX (`char_id`);\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_commands.20160608065501.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_commands` (\n  `id` int(6) NOT NULL AUTO_INCREMENT,\n  `command` varchar(128) NOT NULL DEFAULT '0',\n  `issuer` varchar(32) NOT NULL DEFAULT '0',\n  `account_id` int(12) NOT NULL DEFAULT '0',\n  `done` int(1) NOT NULL DEFAULT '0',\n  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_itemdesc.20170210033400.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_itemdesc` (\n  `itemid` int(10) unsigned NOT NULL auto_increment,\n  `itemdesc` text NOT NULL,\n  PRIMARY KEY  (`itemid`)\n) ENGINE=MyISAM COMMENT='Stored item descriptions from parsed itemInfo.';\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_itemshop.20080928225124.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_itemshop` (\n  `id` int(11) unsigned NOT NULL auto_increment,\n  `nameid` int(11) unsigned NOT NULL default '0',\n  `quantity` int(11) unsigned NOT NULL default '0',\n  `cost` int(11) unsigned NOT NULL,\n  `info` text,\n  `create_date` datetime NOT NULL,\n  PRIMARY KEY  (`id`)\n) ENGINE=MyISAM COMMENT='Item shop';\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_itemshop.20081109093448.sql",
    "content": "DROP PROCEDURE IF EXISTS cp_itemshop_20081109093448;\nCREATE PROCEDURE cp_itemshop_20081109093448() BEGIN\n    DECLARE CONTINUE HANDLER FOR 1060 BEGIN END;\n    ALTER TABLE `cp_itemshop` ADD `use_existing` TINYINT NOT NULL DEFAULT '0' AFTER `info`;\nEND;\nCALL cp_itemshop_20081109093448();\nDROP PROCEDURE cp_itemshop_20081109093448;\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_itemshop.20081128093449.sql",
    "content": "ALTER TABLE  `cp_itemshop` ADD INDEX (  `nameid` ) ;\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_itemshop.20090104190020.sql",
    "content": "DROP PROCEDURE IF EXISTS cp_itemshop_20090104190020;\nCREATE PROCEDURE cp_itemshop_20090104190020() BEGIN\n    DECLARE CONTINUE HANDLER FOR 1060 BEGIN END;\n    ALTER TABLE `cp_itemshop` ADD `category` INT(11) NULL AFTER `nameid`;\nEND;\nCALL cp_itemshop_20090104190020();\nDROP PROCEDURE cp_itemshop_20090104190020;\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_onlinepeak.20131120120201.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_onlinepeak` (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `users` int(10) unsigned NOT NULL DEFAULT '0',\n  `date` date NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE = MYISAM;\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_redeemlog.20080928225124.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_redeemlog` (\n  `id` int(11) unsigned NOT NULL auto_increment,\n  `nameid` int(11) unsigned NOT NULL default '0',\n  `quantity` int(11) unsigned NOT NULL default '0',\n  `cost` int(11) unsigned NOT NULL,\n  `account_id` int(11) unsigned NOT NULL,\n  `char_id` int(11) unsigned default NULL,\n  `redeemed` tinyint(1) unsigned NOT NULL,\n  `redemption_date` datetime default NULL,\n  `purchase_date` datetime NOT NULL,\n  PRIMARY KEY  (`id`)\n) ENGINE=MyISAM COMMENT='Log of redeemed donation items.';\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_redeemlog.20081001054354.sql",
    "content": "DROP PROCEDURE IF EXISTS cp_redeemlog_20081001054354;\nCREATE PROCEDURE cp_redeemlog_20081001054354() BEGIN\n    DECLARE CONTINUE HANDLER FOR 1060 BEGIN END;\nALTER TABLE `cp_redeemlog`\n\tADD `credits_before` INT( 10 ) NOT NULL ,\n\tADD `credits_after` INT( 10 ) NOT NULL;END;\nCALL cp_redeemlog_20081001054354();\nDROP PROCEDURE cp_redeemlog_20081001054354;\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_redeemlog.20081109093448.sql",
    "content": "ALTER TABLE  `cp_redeemlog` ADD INDEX (  `nameid` ,  `account_id` ,  `char_id` ) ;\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_xferlog.20080928225124.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_xferlog` (\n  `id` int(10) unsigned NOT NULL auto_increment,\n  `from_account_id` int(10) unsigned NOT NULL,\n  `target_account_id` int(10) unsigned NOT NULL,\n  `target_char_id` int(11) unsigned NOT NULL,\n  `amount` int(10) unsigned NOT NULL,\n  `for_free` tinyint(1) unsigned NOT NULL default '0',\n  `transfer_date` datetime NOT NULL,\n  PRIMARY KEY  (`id`)\n) ENGINE=MyISAM COMMENT='Credit transfer log.';\n"
  },
  {
    "path": "data/schemas/charmapdb/cp_xferlog.20081109093448.sql",
    "content": "ALTER TABLE  `cp_xferlog` ADD INDEX (  `from_account_id` ,  `target_account_id` ,  `target_char_id` ) ;\n"
  },
  {
    "path": "data/schemas/charmapdb/index.html",
    "content": ""
  },
  {
    "path": "data/schemas/index.html",
    "content": ""
  },
  {
    "path": "data/schemas/logindb/cp_banlog.20131213174201.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_banlog` (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `account_id` int(11) unsigned NOT NULL,\n  `banned_by` int(11) unsigned DEFAULT NULL,\n  `ban_type` tinyint(1) NOT NULL,\n  `ban_until` datetime NOT NULL,\n  `ban_date` datetime NOT NULL,\n  `ban_reason` text NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `account_id` (`account_id`,`banned_by`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_cmsnews.20131120145701.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_cmsnews` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `title` varchar(100) NOT NULL,\n  `body` text NOT NULL,\n  `link` varchar(100) NOT NULL,\n  `author` varchar(100) NOT NULL,\n  `created` datetime NOT NULL,\n  `modified` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE = MYISAM;\n"
  },
  {
    "path": "data/schemas/logindb/cp_cmspages.20131120161901.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_cmspages` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `path` varchar(100) NOT NULL,\n  `title` varchar(100) NOT NULL,\n  `body` text NOT NULL,\n  `modified` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;\n\nINSERT INTO `cp_cmspages` (`id`, `path`, `title`, `body`, `modified`) VALUES\n(1, 'rules', 'Rules', 'This is a rules page.', '2013-11-20 00:00:00'),\n(2, 'downloads', 'Downloads', 'This is a download page.', '2017-07-20 00:00:00');\n"
  },
  {
    "path": "data/schemas/logindb/cp_cmssettings.20131120145801.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_cmssettings` (\n  `name` varchar(128) NOT NULL,\n  `value` varchar(128) NOT NULL,\n  UNIQUE KEY `name` (`name`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1;\n"
  },
  {
    "path": "data/schemas/logindb/cp_createlog.20131213174201.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_createlog` (\n  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n  `account_id` int(11) unsigned NOT NULL,\n  `userid` varchar(23) NOT NULL,\n  `user_pass` varchar(32) NOT NULL,\n  `sex` enum('M','F','S') NOT NULL DEFAULT 'M',\n  `email` varchar(39) NOT NULL,\n  `reg_date` datetime NOT NULL,\n  `reg_ip` varchar(100) NOT NULL,\n  `delete_date` datetime DEFAULT NULL,\n  `confirmed` tinyint(1) NOT NULL DEFAULT '1',\n  `confirm_code` varchar(32) DEFAULT NULL,\n  `confirm_expire` datetime DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `name` (`userid`),\n  KEY `account_id` (`account_id`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_createlog.20170720151901.sql",
    "content": "ALTER TABLE `cp_createlog` CHANGE `reg_date` `reg_date` DATETIME NOT NULL;\n"
  },
  {
    "path": "data/schemas/logindb/cp_createlog.20250614124331.sql",
    "content": "ALTER TABLE cp_createlog MODIFY COLUMN reg_ip VARCHAR(39) NOT NULL;\n"
  },
  {
    "path": "data/schemas/logindb/cp_credits.20131213174201.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_credits` (\n  `account_id` int(11) unsigned NOT NULL,\n  `balance` int(11) unsigned NOT NULL DEFAULT '0',\n  `last_donation_date` datetime DEFAULT NULL,\n  `last_donation_amount` float unsigned DEFAULT NULL,\n  PRIMARY KEY (`account_id`),\n  KEY `account_id` (`account_id`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Donation credits balance for a given account.';\n"
  },
  {
    "path": "data/schemas/logindb/cp_emailchange.20131213174201.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_emailchange` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `code` varchar(32) NOT NULL,\n  `account_id` int(10) NOT NULL,\n  `old_email` varchar(39) NOT NULL,\n  `new_email` varchar(39) NOT NULL,\n  `request_date` datetime NOT NULL,\n  `request_ip` varchar(15) NOT NULL,\n  `change_date` datetime DEFAULT NULL,\n  `change_ip` varchar(15) DEFAULT NULL,\n  `change_done` tinyint(4) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`id`),\n  KEY `account_id` (`account_id`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_emailchange.20250609133400.sql",
    "content": "ALTER TABLE cp_emailchange\nMODIFY COLUMN request_ip VARCHAR(39) NOT NULL,\nMODIFY COLUMN change_ip VARCHAR(39) DEFAULT NULL;\n"
  },
  {
    "path": "data/schemas/logindb/cp_ipbanlog.20120816150540.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_ipbanlog` (\n  `id` int(10) unsigned NOT NULL auto_increment,\n  `ip_address` varchar(15) NOT NULL,\n  `banned_by` int(11) unsigned default NULL,\n  `ban_type` tinyint(1) NOT NULL,\n  `ban_until` datetime NOT NULL,\n  `ban_date` datetime NOT NULL,\n  `ban_reason` text NOT NULL,\n  PRIMARY KEY  (`id`),\n  INDEX (`ip_address`),\n  INDEX (`banned_by`)\n) ENGINE=MyISAM ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_ipbanlog.20250609133400.sql",
    "content": "ALTER TABLE cp_ipbanlog MODIFY COLUMN ip_address VARCHAR(39) NOT NULL;\n"
  },
  {
    "path": "data/schemas/logindb/cp_loginlog.20131213174201.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_loginlog` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `account_id` int(10) DEFAULT NULL,\n  `username` varchar(23) NOT NULL,\n  `password` varchar(32) NOT NULL,\n  `ip` varchar(15) NOT NULL,\n  `login_date` datetime NOT NULL,\n  `error_code` tinyint(1) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `account_id` (`account_id`)\n) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_loginlog.20250609133400.sql",
    "content": "ALTER TABLE cp_loginlog MODIFY COLUMN ip VARCHAR(39) NOT NULL;\n"
  },
  {
    "path": "data/schemas/logindb/cp_loginprefs.20131213174201.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_loginprefs` (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `account_id` int(11) unsigned NOT NULL,\n  `name` varchar(80) NOT NULL,\n  `value` varchar(255) DEFAULT NULL,\n  `create_date` datetime DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `account_id` (`account_id`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Account preferences' AUTO_INCREMENT=1 ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_pwchange.20131213174201.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_pwchange` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `account_id` int(10) NOT NULL,\n  `old_password` varchar(32) NOT NULL,\n  `new_password` varchar(32) DEFAULT NULL,\n  `change_date` datetime NOT NULL,\n  `change_ip` varchar(15) NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `account_id` (`account_id`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_pwchange.20250609133400.sql",
    "content": "ALTER TABLE cp_pwchange MODIFY COLUMN change_ip VARCHAR(39) NOT NULL;\n"
  },
  {
    "path": "data/schemas/logindb/cp_resetpass.20131213174201.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_resetpass` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `code` varchar(32) NOT NULL,\n  `account_id` int(10) NOT NULL,\n  `old_password` varchar(32) NOT NULL,\n  `new_password` varchar(32) DEFAULT NULL,\n  `request_date` datetime NOT NULL,\n  `request_ip` varchar(15) NOT NULL,\n  `reset_date` datetime DEFAULT NULL,\n  `reset_ip` varchar(15) DEFAULT NULL,\n  `reset_done` tinyint(4) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`id`),\n  KEY `account_id` (`account_id`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_resetpass.20250609133400.sql",
    "content": "ALTER TABLE cp_resetpass\nMODIFY COLUMN request_ip VARCHAR(39) NOT NULL,\nMODIFY COLUMN reset_ip VARCHAR(39) DEFAULT NULL;\n"
  },
  {
    "path": "data/schemas/logindb/cp_servicedesk.20131122010001.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_servicedesk` (\n  `ticket_id` int(6) NOT NULL AUTO_INCREMENT,\n  `account_id` int(7) NOT NULL,\n  `category` int(6) NOT NULL,\n  `status` varchar(12) NOT NULL DEFAULT 'Pending',\n  `char_id` text NOT NULL,\n  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  `sslink` text NOT NULL,\n  `chatlink` text NOT NULL,\n  `videolink` text NOT NULL,\n  `subject` varchar(64) NOT NULL DEFAULT '0',\n  `text` text NOT NULL,\n  `ip` varchar(15) NOT NULL DEFAULT '0',\n  `team` int(1) NOT NULL DEFAULT '1',\n  `curemail` text NOT NULL,\n  `lastreply` varchar(24) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`ticket_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1000 ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_servicedesk.20250609133400.sql",
    "content": "ALTER TABLE cp_servicedesk MODIFY COLUMN ip VARCHAR(39) NOT NULL DEFAULT '0';\n"
  },
  {
    "path": "data/schemas/logindb/cp_servicedeska.20131122010001.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_servicedeska` (\n  `action_id` int(6) NOT NULL AUTO_INCREMENT,\n  `ticket_id` int(6) NOT NULL,\n  `author` varchar(32) NOT NULL,\n  `text` text NOT NULL,\n  `action` text NOT NULL,\n  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  `ip` varchar(15) NOT NULL DEFAULT '0',\n  `isstaff` int(1) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`action_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_servicedeska.20250609133400.sql",
    "content": "ALTER TABLE cp_servicedeska MODIFY COLUMN ip VARCHAR(39) NOT NULL DEFAULT '0';\n"
  },
  {
    "path": "data/schemas/logindb/cp_servicedeskcat.20131122010001.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_servicedeskcat` (\n  `cat_id` int(3) NOT NULL AUTO_INCREMENT,\n  `name` varchar(32) NOT NULL,\n  `display` int(1) NOT NULL DEFAULT '1',\n  PRIMARY KEY (`cat_id`)\n) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;\n\nINSERT INTO `cp_servicedeskcat` (`cat_id`, `name`, `display`) VALUES\n(1, 'Technical Support', 1),\n(2, 'General Support', 1),\n(3, 'Report an Abuse', 1);\n"
  },
  {
    "path": "data/schemas/logindb/cp_servicedesksettings.20131122010001.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_servicedesksettings` (\n  `account_id` int(7) NOT NULL,\n  `account_name` varchar(32) NOT NULL,\n  `prefered_name` varchar(32) NOT NULL,\n  `team` int(1) NOT NULL,\n  `emailalerts` int(1) NOT NULL DEFAULT '0',\n  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n  PRIMARY KEY (`account_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1;\n"
  },
  {
    "path": "data/schemas/logindb/cp_trusted.20131213174201.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_trusted` (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `account_id` int(11) unsigned NOT NULL,\n  `email` varchar(255) NOT NULL,\n  `create_date` datetime NOT NULL,\n  `delete_date` datetime DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `account_id` (`account_id`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_txnlog.20131213174201.sql",
    "content": "CREATE TABLE IF NOT EXISTS `cp_txnlog` (\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `account_id` int(11) unsigned DEFAULT '0',\n  `server_name` varchar(255) DEFAULT NULL,\n  `credits` int(11) DEFAULT '0',\n  `receiver_email` varchar(60) DEFAULT NULL,\n  `item_name` varchar(100) DEFAULT NULL,\n  `item_number` varchar(10) DEFAULT NULL,\n  `quantity` varchar(6) DEFAULT NULL,\n  `payment_status` varchar(20) DEFAULT NULL,\n  `pending_reason` varchar(20) DEFAULT NULL,\n  `payment_date` varchar(40) DEFAULT NULL,\n  `mc_gross` varchar(20) DEFAULT NULL,\n  `mc_fee` varchar(20) DEFAULT NULL,\n  `tax` varchar(20) DEFAULT NULL,\n  `mc_currency` varchar(3) DEFAULT NULL,\n  `parent_txn_id` varchar(20) DEFAULT NULL,\n  `txn_id` varchar(20) DEFAULT NULL,\n  `txn_type` varchar(20) DEFAULT NULL,\n  `first_name` varchar(30) DEFAULT NULL,\n  `last_name` varchar(40) DEFAULT NULL,\n  `address_street` varchar(50) DEFAULT NULL,\n  `address_city` varchar(30) DEFAULT NULL,\n  `address_state` varchar(30) DEFAULT NULL,\n  `address_zip` varchar(20) DEFAULT NULL,\n  `address_country` varchar(30) DEFAULT NULL,\n  `address_status` varchar(10) DEFAULT NULL,\n  `payer_email` varchar(60) DEFAULT NULL,\n  `payer_status` varchar(10) DEFAULT NULL,\n  `payment_type` varchar(10) DEFAULT NULL,\n  `notify_version` varchar(10) DEFAULT NULL,\n  `verify_sign` varchar(255) DEFAULT NULL,\n  `referrer_id` varchar(10) DEFAULT NULL,\n  `process_date` datetime DEFAULT NULL,\n  `hold_until` datetime DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `account_id` (`account_id`),\n  KEY `parent_txn_id` (`parent_txn_id`),\n  KEY `txn_id` (`txn_id`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='All PayPal transactions that go through the IPN handler.' AUTO_INCREMENT=1 ;\n"
  },
  {
    "path": "data/schemas/logindb/cp_txnlog.20170217073601.sql",
    "content": "ALTER TABLE `cp_txnlog` CHANGE `referrer_id` `referrer_id` VARCHAR(13) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;\n"
  },
  {
    "path": "data/schemas/logindb/cp_txnlog.20170221184601.sql",
    "content": "ALTER TABLE `cp_txnlog` CHANGE `address_status` `address_status` VARCHAR(11) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;\n"
  },
  {
    "path": "data/schemas/logindb/index.html",
    "content": ""
  },
  {
    "path": "data/templates/changemail.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$siteTitle  = Flux::config('SiteTitle');\n$emailTitle = sprintf('%s: Change E-mail', $siteTitle);\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<title><?php echo htmlspecialchars($emailTitle) ?></title>\n\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\tbody, table {\n\t\t\t\tfont-family: sans-serif;\n\t\t\t\tfont-size: 10pt;\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<h2><?php echo htmlspecialchars($emailTitle) ?></h2>\n\t\t\n\t\t<p>You have received this e-mail because someone has filled in the \"change e-mail\" form after logging into your account.\n\t\t\tIf you are the one who requested this action, then please click the below link to proceed with the e-mail change.</p>\n\t\t\n\t\t<p>\n\t\t\t<table style=\"margin-left: 18px\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Account:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{AccountUsername}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Old E-mail:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{OldEmail}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">New E-mail:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{NewEmail}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Change E-mail:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\"><a href=\"{ChangeLink}\" title=\"Change e-mail for this account.\">{ChangeLink}</a></th>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</p>\n\t\t\n\t\t<p><em><strong>Note:</strong> This is an automated e-mail, please do not reply to this address.</em></p>\n\t</body>\n</html>\n"
  },
  {
    "path": "data/templates/confirm.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$siteTitle  = Flux::config('SiteTitle');\n$emailTitle = sprintf('%s Account Confirmation', $siteTitle);\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<title><?php echo htmlspecialchars($emailTitle) ?></title>\n\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\tbody, table {\n\t\t\t\tfont-family: sans-serif;\n\t\t\t\tfont-size: 10pt;\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<h2><?php echo htmlspecialchars($emailTitle) ?></h2>\n\t\t\n\t\t<p>You have received this e-mail because you or someone else has created an account\n\t\t\twith <strong><?php echo htmlspecialchars($siteTitle) ?></strong> using this\n\t\t\te-mail address. Point your browser to the below link to activate the account.</p>\n\t\t\n\t\t<?php if ($expire=Flux::config('EmailConfirmExpire')): ?>\n\t\t<p>All unconfirmed accounts will be deleted from our system within <?php echo (int)$expire ?> hour(s) of registration.</p>\n\t\t<?php endif ?>\n\t\t\n\t\t<p>\n\t\t\t<table style=\"margin-left: 18px\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Account:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{AccountUsername}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Confirm:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\"><a href=\"{ConfirmationLink}\" title=\"Activate this account.\">{ConfirmationLink}</a></th>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</p>\n\t\t\n\t\t<p><em><strong>Note:</strong> This is an automated e-mail, please do not reply to this address.</em></p>\n\t</body>\n</html>\n"
  },
  {
    "path": "data/templates/contactform.php",
    "content": "<?php\n/* Contact Form Addon\n * Created and maintained by Akkarin\n * Current Version: 1.00.01\n */\n \nif (!defined('FLUX_ROOT')) exit;\n$emailTitle = sprintf('Contact Form Submission');\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<title><?php echo htmlspecialchars($emailTitle) ?></title>\n\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\tbody, table {\n\t\t\t\tfont-family: sans-serif;\n\t\t\t\tfont-size: 10pt;\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<h2><?php echo htmlspecialchars($emailTitle) ?></h2>\n\t\t\n\t\t<p>A member of our site has submitted a question/query.</p>\n\t\t\n\t\t<p>\n\t\t\t<table style=\"margin-left: 18px\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">AccountID:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{AccountID}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Name:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{Name}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Email:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{Email}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Subject:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{Subject}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Body:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{Body}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">IP:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{IP}</th>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</p>\n\t\t<br />\n\t\t<p><em><strong>Note:</strong> This is an automated e-mail, please do not reply to this address.</em></p>\n\t</body>\n</html>\n"
  },
  {
    "path": "data/templates/index.html",
    "content": ""
  },
  {
    "path": "data/templates/marketing1.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n?>\n<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<meta charset=\"UTF-8\" />\n\t\t<title>{emailtitle}</title>\n\t\t<meta name=\"description\" content=\"\" /> \n\t</head>\n\t<body>\n\t\t\n\t\t<h2>New to Server</h2>\n\t\t<p>\n\t\t\t<ul>\n\t\t\t\t<li><a href=\"#\">Alliance System</a></li>\n\t\t\t\t<li><a href=\"#\">Achievement System</a></li>\n\t\t\t\t<li><a href=\"#\">Floating Rates</a></li>\n\t\t\t\t<li><a href=\"#\">Gathering System</a></li>\n\t\t\t\t<li><a href=\"#\">Housing / Accomodation</a></li>\n\t\t\t\t<li><a href=\"#\">Hero's Initiative</a></li>\n\t\t\t</ul>\n\t\t</p>\n\n\n\t\t<h2>{emailtitle}</h2>\n        <p>Greetings Adventurer!<br /><br />\n\t\tWe're pleased to announce that Server is back online with brand new updates and content to ... <br /><br />\n\n\t\t<em>The FluxCP Team</em>\n\t\t</p>\n\n\n\n\n\n\t\t<h2>Email Jargen</h2>\n\t\t<p>This email was sent by FluxCP to {username} ({email}) because you have a player account with us. We will <strong>never</strong> give your details to anyone, not even a real marketing company - so we sent this email directly to you from our website!<br /><br />\n\n\t\tYou can unsubscribe from receiving these emails by changing your preferences on <a href=\"#\">our website</a>.\n\t\t</p>\n\n\n\n\t\t<h2>Useful Links</h2>\n\t\t<p><a href=\"#\">Website Home</a> || <a href=\"#\">Forums</a> || <a href=\"#\">Service Desk</a> || <a href=\"#\">Wiki</a></p>\n\t</body>\n</html>\n"
  },
  {
    "path": "data/templates/newpass.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$siteTitle  = Flux::config('SiteTitle');\n$emailTitle = sprintf('%s: Password Has Been Reset', $siteTitle);\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<title><?php echo htmlspecialchars($emailTitle) ?></title>\n\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\tbody, table {\n\t\t\t\tfont-family: sans-serif;\n\t\t\t\tfont-size: 10pt;\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<h2><?php echo htmlspecialchars($emailTitle) ?></h2>\n\t\t\n\t\t<p>Here are the details outlining your new password.</p>\n\t\t\n\t\t<p>\n\t\t\t<table style=\"margin-left: 18px\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Account:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{AccountUsername}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">New Password:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{NewPassword}</th>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</p>\n\t\t\n\t\t<p><em><strong>Note:</strong> This is an automated e-mail, please do not reply to this address.</em></p>\n\t</body>\n</html>\n"
  },
  {
    "path": "data/templates/newticket.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$emailTitle = sprintf('New Ticket Created');\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<title><?php echo htmlspecialchars($emailTitle) ?></title>\n\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\tbody, table {\n\t\t\t\tfont-family: sans-serif;\n\t\t\t\tfont-size: 10pt;\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<h2><?php echo htmlspecialchars($emailTitle) ?></h2>\n\t\t\n\t\t<p>You have received this e-mail because you have enabled email alerts for new tickets.</p>\n\t\t\n\t\t<p>\n\t\t\t<table style=\"margin-left: 18px\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Category:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{Category}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Subject:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{Subject}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Ticket Body:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{Text}</th>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</p>\n\t\t<br />\n\t\t<p><em><strong>Note:</strong> This is an automated e-mail, please do not reply to this address.</em></p>\n\t</body>\n</html>\n"
  },
  {
    "path": "data/templates/resetpass.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$siteTitle  = Flux::config('SiteTitle');\n$emailTitle = sprintf('%s: Reset Password', $siteTitle);\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<title><?php echo htmlspecialchars($emailTitle) ?></title>\n\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\tbody, table {\n\t\t\t\tfont-family: sans-serif;\n\t\t\t\tfont-size: 10pt;\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<h2><?php echo htmlspecialchars($emailTitle) ?></h2>\n\t\t\n\t\t<p>You have received this e-mail because you or someone else has filled in our \"reset password\" form,\n\t\t\trequesting to reset the password of your account on our server.</p>\n\t\t\n\t\t<p>\n\t\t\t<table style=\"margin-left: 18px\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Account:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{AccountUsername}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Reset Link:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\"><a href=\"{ResetLink}\" title=\"Reset password for this account.\">{ResetLink}</a></th>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</p>\n\t\t\n\t\t<p><em><strong>Note:</strong> This is an automated e-mail, please do not reply to this address.</em></p>\n\t</body>\n</html>\n"
  },
  {
    "path": "data/templates/ticketreply.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$siteTitle  = Flux::config('SiteTitle');\n$emailTitle = sprintf('%s: Ticket Reply', $siteTitle);\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<title><?php echo htmlspecialchars($emailTitle) ?></title>\n\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\tbody, table {\n\t\t\t\tfont-family: sans-serif;\n\t\t\t\tfont-size: 10pt;\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<h2><?php echo htmlspecialchars($emailTitle) ?></h2>\n\t\t\n\t\t<p>You have received this e-mail because a member of the support team has replied to your ticket on the Service Desk.</p>\n\t\t\n\t\t<p>\n\t\t\t<table style=\"margin-left: 18px\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Ticket ID:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{TicketID}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"right\">Updated By:&nbsp;&nbsp;</td>\n\t\t\t\t\t<th align=\"left\">{Staff}</th>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</p>\n\t\t<br />\n\t\t<p><em><strong>Note:</strong> This is an automated e-mail, please do not reply to this address.</em></p>\n\t</body>\n</html>\n"
  },
  {
    "path": "data/tmp/index.html",
    "content": ""
  },
  {
    "path": "data/tmp/transactions/Refunded/index.html",
    "content": ""
  },
  {
    "path": "data/tmp/transactions/Reversed/index.html",
    "content": ""
  },
  {
    "path": "data/tmp/transactions/web_accept/Completed/index.html",
    "content": ""
  },
  {
    "path": "data/tmp/transactions/web_accept/Denied/index.html",
    "content": ""
  },
  {
    "path": "data/tmp/transactions/web_accept/Pending/index.html",
    "content": ""
  },
  {
    "path": "doc/user_lang.md",
    "content": "Language Files\n======\n\nHow do they work?\n---------\nThe **lang/** directory contains translations for use with FluxCP. The language used is controlled by the 'DefaultLanguage' setting in config/application.php.\n\nSimply put, `'DefaultLanguage' => 'en_us'` will load the American English language file and use the contained strings wherever `Flux::message()` is used within theme files. There are a few others within the `lang/` directory, but unfortunately they aren't maintained.\n\n\nHow do we use them?\n---------\nFor example, in a theme file that is displaying whether a players' character is male or female, you would see `<?php echo Flux::message('GenderTypeMale') ?>` or `<?php echo Flux::message('GenderTypeFemale') ?>`.\n\nThe menus that are defined in `config/application.php` are set to automatically use the language files. For example, lets look at this specific menu:\n\n```\n'MenuItems'\t\t=> array(\n\t\t'MainMenuLabel'\t\t=> array(\n\t\t\t'HomeLabel'\t\t\t=> array('module' => 'main'),\n\t\t\t'NewsLabel'\t\t\t=> array('module' => 'news'),\n\t\t),\n),\n```\n\nWhen the page is rendered, you will see that these strings are replaced with their counterparts from the language file.\n'MainMenuLabel' becomes 'Main Menu', 'HomeLabel' becomes 'Home', 'NewsLabel' becomes 'News'.\n\n\nCommon Misuse\n---------\nMany people still think that the 'Label' portion of these strings should be removed within the config file as it's outputting 'HomeLabel' to the page instead of 'Home'. **This is incorrect.** This simply means that the theme you're using was built earlier than August 2014 and you shouldn't be using it.\n"
  },
  {
    "path": "doc/user_theme.md",
    "content": "Using a Custom Theme\n======\n\nHow does it work?\n---------\nThe Theme System in FluxCP is based on an \"inheritance structure\". In simple terms, this means you only need to add files to your new theme folder that you want to change.\n\nIt all works similar to the config import system in rAthena. The default theme is read first, then if there are any files matching the required view in the custom theme, then it gets loaded instead. This means that that **you don't need to copy/paste the default theme every time you create a new custom theme**.\n\nThe manifest.php file controls inheritance with `'inherit'     => 'default',`.\n\nHow should my theme look?\n---------\nThis is an example directory structure for a custom theme in a fresh install of FluxCP:\n```\n.\n├── addons\n├── config\n├── data\n├── doc\n├── lang\n├── lib\n├── modules\n├── themes\n|   ├── bootstrap\n|   └── cust_theme1\n|       └── css\n|           ├── flux.css\n|           └── customstyle.css\n|       └── img\n|           ├── bg.jpg\n|           └── logo.png\n|       └── js\n|           ├── flux.unitip.js\n|           └── ie9.js\n|       └── main\n|           ├── index.php\n|           └── sidebar.php\n|       ├── footer.php\n|       ├── header.php\n|       └── manifest.php\n|   ├── default\n|   └── installer\n├── .gitignore\n├── .htaccess\n├── LICENSE\n├── README.md\n├── error.php\n└── index.php\n```\n\nAs you can see, there are only a few files in the **cust_theme1** folder.\n\n\nHow do I make it display on my website?\n---------\nTo enable your theme, simply add it to the theme array in /config/application.php:\n```'ThemeName'\t\t\t\t\t=> array('default', 'bootstrap', 'cust_theme1'),```\n\nIf you want your new theme to always display and remove the theme selection box in the footer, remove the other themes from this array so it looks like:\n```'ThemeName'\t\t\t\t\t=> array('cust_theme1'),```\n\n\nHow do I know if a theme I downloaded will work?\n---------\nAs a general rule of thumb, if your new theme has a `manifest.php` file in the theme folder, it will work with current versions of FluxCP just fine.\n\nIf it doesn't have `manifest.php`, you will need to create one. This will make the new theme able to load, but you will still have problems.\n\nIn the past, even after this theme system was introduced, theme designers have still opted to create themes reliant on old versions of FluxCP. They are lazy. Use at your own risk.\n"
  },
  {
    "path": "error.php",
    "content": "<?php if (defined('__ERROR__') && $showExceptions): ?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n\t\t<title>rA's Flux Control Panel: Critical Error</title>\n\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\tbody {\n\t\t\t\tmargin: 10px;\n\t\t\t\tpadding: 0;\n\t\t\t\tfont-family: \"Lucida Grande\", \"Lucida Sans\", sans-serif;\n\t\t\t}\n\t\t\t\n\t\t\tp {\n\t\t\t\tfont-size: 85%;\n\t\t\t}\n\t\t\t\n\t\t\tpre {\n\t\t\t\tfont-family: Monaco, \"Lucida Console\", monospace;\n\t\t\t}\n\t\t\t\n\t\t\t.heading {\n\t\t\t\tfont-family: \"Gill Sans\", \"Gill Sans MT\", \"Lucida Grande\", \"Lucida Sans\", sans-serif;\n\t\t\t\tfont-weight: normal;\n\t\t\t\tborder-bottom: 1px solid #ddd;\n\t\t\t}\n\t\t\t\n\t\t\t.backtrace {\n\t\t\t\tfont-size: 85%;\n\t\t\t\tborder-spacing: 0;\n\t\t\t\tborder-collapse: collapse;\n\t\t\t\tbackground-color: #fefefe;\n\t\t\t}\n\t\t\t\n\t\t\t.backtrace th, .backtrace td {\n\t\t\t\tpadding: 5px;\n\t\t\t\tborder: 1px solid #ccc;\n\t\t\t}\n\t\t\t\n\t\t\t.backtrace th {\n\t\t\t\tbackground-color: #eee;\n\t\t\t}\n\t\t</style>\n\t</head>\n\t\n\t<body>\n\t\t<h2 class=\"heading\">Critical Error</h2>\n\t\t\n\t\t<p>An error was encountered during the lifetime of the application.</p>\n\t\t<p>This could be due to a variety of problems, such as a bug in the application.</p>\n\t\t<p><strong>However, normally it is caused by <em>misconfiguration</em>.</strong></p>\n\t\t\n\t\t<h2 class=\"heading\">Exception Details</h2>\n\t\t<p>Error: <strong><?php echo get_class($e) ?></strong></p>\n\t\t<p>Message: <em><?php echo nl2br(htmlspecialchars($e->getMessage())) ?></em></p>\n\t\t<p>File: <?php echo $e->getFile() ?>:<?php echo $e->getLine() ?></p>\n\t\t\n\t\t<?php if (count($e->getTrace())): ?>\n\t\t<!-- Exception Backtrace -->\n\t\t<table class=\"backtrace\">\n\t\t\t<tr>\n\t\t\t\t<th>File</th>\n\t\t\t\t<th>Line</th>\n\t\t\t\t<th>Function/Method</th>\n\t\t\t</tr>\n\t\t\t<?php foreach ($e->getTrace() as $trace): ?>\n\t\t\t<tr>\n\t\t\t\t<td><?php echo $trace['file'] ?></td>\n\t\t\t\t<td><?php echo $trace['line'] ?></td>\n\t\t\t\t<td><?php echo isset($trace['class']) ? \"$trace[class]::$trace[function]\" : $trace['function'] ?>()</td>\n\t\t\t</tr>\n\t\t\t<?php endforeach ?>\n\t\t</table>\n\t\t\n\t\t<h2 class=\"heading\">Exception Trace As String</h2>\n\t\t<pre><?php echo htmlspecialchars(preg_replace('/PDO->__construct\\\\((.+?)\\\\)/', 'PDO->__construct(*hidden*)', $e->getTraceAsString())) ?></pre>\n\t\t<?php endif ?>\n\t</body>\n</html>\n<?php else: ?>\n<h2>Error</h2>\n<p>An error occurred while trying to process your request.</p>\n<p>Please try contacting an administrator: <a href=\"mailto:<?php echo htmlspecialchars($adminEmail) ?>\"><?php echo htmlspecialchars($adminEmail) ?></a></p>\n<?php endif ?>\n"
  },
  {
    "path": "index.php",
    "content": "<?php\n\nif( version_compare( PHP_VERSION, '7.3.0', '<' ) ){\n\texit(\n\t\tsprintf(\n\t\t\t'FluxCP requires PHP 7.3.0 or higher. You are using PHP %s.',\n\t\t\tPHP_VERSION\n\t\t)\n\t);\n}\n\n// Time started.\ndefine('__START__', microtime(true));\n\ndefine('FLUX_ROOT',\t\t\tstr_replace('\\\\', '/', dirname(__FILE__)));\ndefine('FLUX_DATA_DIR',\t\t'data');\ndefine('FLUX_CONFIG_DIR',\t'config');\ndefine('FLUX_LIB_DIR',\t\t'lib');\ndefine('FLUX_MODULE_DIR',\t'modules');\ndefine('FLUX_THEME_DIR',\t'themes');\ndefine('FLUX_ADDON_DIR',\t'addons');\ndefine('FLUX_LANG_DIR',\t\t'lang');\n\n// Clean GPC arrays in the event magic_quotes_gpc is enabled.\nif (ini_get('magic_quotes_gpc')) {\n\t$gpc = array(&$_GET, &$_POST, &$_REQUEST, &$_COOKIE);\n\tforeach ($gpc as &$arr) {\n\t\tforeach ($arr as $key => $value) {\n\t\t\tif (is_string($value)) {\n\t\t\t\t$arr[$key] = stripslashes($value);\n\t\t\t}\n\t\t}\n\t}\n}\n\nset_include_path(FLUX_LIB_DIR.PATH_SEPARATOR.get_include_path());\n\n// Default account group IDs.\nrequire_once FLUX_CONFIG_DIR.'/groups.php';\n\n// Some necessary Flux core libraries.\nrequire_once 'Flux.php';\nrequire_once 'Flux/Dispatcher.php';\nrequire_once 'Flux/SessionData.php';\nrequire_once 'Flux/DataObject.php';\nrequire_once 'Flux/Authorization.php';\nrequire_once 'Flux/Installer.php';\nrequire_once 'Flux/PermissionError.php';\n\n// Vendor libraries.\n\ntry {\n\t// Initialize Flux.\n\tFlux::initialize(array(\n\t\t'appConfigFile'           => FLUX_CONFIG_DIR.'/application.php',\n\t\t'serversConfigFile'       => FLUX_CONFIG_DIR.'/servers.php',\n\t\t'appConfigFileImport'     => FLUX_CONFIG_DIR.'/import/application.php',\n\t\t'serversConfigFileImport' => FLUX_CONFIG_DIR.'/import/servers.php',\n\t));\n\n\t// Set time limit.\n\tset_time_limit((int)Flux::config('ScriptTimeLimit'));\n\n\t// Set default timezone for entire app.\n\t$timezone = Flux::config('DateDefaultTimezone');\n\tif ($timezone && !@date_default_timezone_set($timezone)) {\n\t\tthrow new Flux_Error(\"'$timezone' is not a valid timezone.  Consult http://php.net/timezones for a list of valid timezones.\");\n\t}\n\n\t// Create some basic directories.\n\t$directories = array(\n\t\tFLUX_DATA_DIR.'/logs/schemas',\n\t\tFLUX_DATA_DIR.'/logs/schemas/logindb',\n\t\tFLUX_DATA_DIR.'/logs/schemas/charmapdb',\n\t\tFLUX_DATA_DIR.'/logs/transactions',\n\t\tFLUX_DATA_DIR.'/logs/mail',\n\t\tFLUX_DATA_DIR.'/logs/mysql',\n\t\tFLUX_DATA_DIR.'/logs/mysql/errors',\n\t\tFLUX_DATA_DIR.'/logs/errors',\n\t\tFLUX_DATA_DIR.'/logs/errors/exceptions',\n\t\tFLUX_DATA_DIR.'/logs/errors/mail',\n\t);\n\n\t// Schema log directories.\n\tforeach (Flux::$loginAthenaGroupRegistry as $serverName => $loginAthenaGroup) {\n\t\t$directories[] = FLUX_DATA_DIR.\"/logs/schemas/logindb/$serverName\";\n\t\t$directories[] = FLUX_DATA_DIR.\"/logs/schemas/charmapdb/$serverName\";\n\n\t\tforeach ($loginAthenaGroup->athenaServers as $athenaServer)\n\t\t\t$directories[] = FLUX_DATA_DIR.\"/logs/schemas/charmapdb/$serverName/{$athenaServer->serverName}\";\n\t}\n\n\tforeach ($directories as $directory) {\n\t\tif (is_writable(dirname($directory)) && !is_dir($directory)) {\n\t\t\tif (Flux::config('RequireOwnership'))\n\t\t\t\tmkdir($directory, 0700);\n\t\t\telse\n\t\t\t\tmkdir($directory, 0777);\n\t\t}\n\t}\n\n\tif (Flux::config('RequireOwnership') && function_exists('posix_getuid'))\n\t\t$uid = posix_getuid();\n\n\t$directories = array(\n\t\tFLUX_DATA_DIR.'/logs'\t\t=> 'log storage',\n\t\tFLUX_DATA_DIR.'/itemshop'\t=> 'item shop image',\n\t\tFLUX_DATA_DIR.'/tmp'\t\t=> 'temporary'\n\t);\n\n\tforeach ($directories as $directory => $directoryFunction) {\n\t\t$directory = realpath($directory);\n\t\tif (!is_dir($directory))\n\t\t\tmkdir($directory, 0600);\n\t\tif (!is_writable($directory) && is_dir($directory))\n\t\t\tthrow new Flux_PermissionError(\"The $directoryFunction directory '$directory' is not writable.  Remedy with `chmod 0600 $directory`\");\n\t\tif (Flux::config('RequireOwnership') && function_exists('posix_getuid') && fileowner($directory) != $uid)\n\t\t\tthrow new Flux_PermissionError(\"The $directoryFunction directory '$directory' is not owned by the executing user.  Remedy with `chown -R \".posix_geteuid().\":\".posix_geteuid().\" $directory`\");\n\t}\n\n\tif (ini_get('session.use_trans_sid'))\n\t\tthrow new Flux_Error(\"The 'session.use_trans_sid' php.ini configuration must be turned off for Flux to work.\");\n\n\t// Installer library.\n\t$installer = Flux_Installer::getInstance();\n\tif ($hasUpdates=$installer->updateNeeded())\n\t\tFlux::config('ThemeName', array('installer'));\n\n\t$sessionKey = Flux::config('SessionKey');\n\t$sessionExpireDuration = Flux::config('SessionCookieExpire') * 60 * 60;\n\n\t$cookie_options = array(\n\t\t// Session timeout\n\t\t'lifetime' => $sessionExpireDuration,\n\t\t// Flux URL\n\t\t'path' => Flux::config( 'BaseURI' ),\n\t\t// Domain name for the cookie\n\t\t'domain' => preg_replace( '/:\\d+$/', '', Flux::config( 'ServerAddress' ) ), // Remove port number if present (e.g. \"example.com:80\")\n\t\t// Only transfer the cookie via HTTPS\n\t\t'secure' => Flux::config( 'ForceHTTPS' ),\n\t\t// Only include the cookie in HTTP requests, making it inaccessible by Javascript\n\t\t'httponly' => true,\n\t\t// Only send the cookie to the domain+path defined above\n\t\t'samesite' => 'Strict'\n\t);\n\t\n\tif( !session_set_cookie_params( $cookie_options ) ){\n\t\tthrow new Flux_Error( \"Unable to configure the session cookie correctly\" );\n\t}\n\tini_set('session.gc_maxlifetime', $sessionExpireDuration);\n\tini_set('session.name', $sessionKey);\n\t@session_start();\n\n\tif (empty($_SESSION[$sessionKey]) || !is_array($_SESSION[$sessionKey])) {\n\t\t$_SESSION[$sessionKey] = array();\n\t}\n\n\t// Initialize session data.\n\tFlux::$sessionData = new Flux_SessionData($_SESSION[$sessionKey], $hasUpdates);\n\n\t// Initialize authorization component.\n\t$accessConfig = Flux::parseConfigFile(FLUX_CONFIG_DIR.'/access.php');\n\n\t// Merge with add-on configs.\n\tforeach (Flux::$addons as $addon) {\n\t\t$accessConfig->merge($addon->accessConfig);\n\t}\n\n\t$accessConfig->set('unauthorized.index', AccountLevel::ANYONE);\n\t$authComponent = Flux_Authorization::getInstance($accessConfig, Flux::$sessionData);\n\n\tif (Flux::config('DebugMode')) {\n\t\terror_reporting(E_ALL);\n\t\tini_set('display_errors', 1);\n\t}\n\n\t// Dispatch requests->modules->actions->views.\n\t$dispatcher = Flux_Dispatcher::getInstance();\n\t$dispatcher->setDefaultModule(Flux::config('DefaultModule'));\n\t$dispatcher->dispatch(array(\n\t\t'basePath'\t\t\t\t\t=> Flux::config('BaseURI'),\n\t\t'useCleanUrls'\t\t\t\t=> Flux::config('UseCleanUrls'),\n\t\t'modulePath'\t\t\t\t=> FLUX_MODULE_DIR,\n\t\t'themePath'\t\t\t\t\t=> FLUX_THEME_DIR,\n\t\t'themeName'                 => Flux::$sessionData->theme,\n\t\t'missingActionModuleAction'\t=> Flux::config('DebugMode') ? array('errors', 'missing_action') : array('main', 'page_not_found'),\n\t\t'missingViewModuleAction'\t=> Flux::config('DebugMode') ? array('errors', 'missing_view')   : array('main', 'page_not_found')\n\t));\n}\ncatch (Exception $e) {\n\t$exceptionDir = FLUX_DATA_DIR.'/logs/errors/exceptions';\n\tif (is_writable($exceptionDir)) {\n\t\trequire_once 'Flux/LogFile.php';\n\t\t$today = date('Ymd');\n\t\t$eLog  = new Flux_LogFile(\"$exceptionDir/$today.log\");\n\n\t\t// Log exception.\n\t\t$eLog->puts('(%s) Exception %s: %s', get_class($e), get_class($e), $e->getMessage());\n\t\tforeach (explode(\"\\n\", $e->getTraceAsString()) as $traceLine) {\n\t\t\t$eLog->puts('(%s) **TRACE** %s', get_class($e), $traceLine);\n\t\t}\n\t}\n\n\tif(Flux::config('DiscordUseWebhook')) {\n\t\tif(Flux::config('DiscordSendOnErrorException')) {\n\t\t\tsendtodiscord(Flux::config('DiscordWebhookURL'), '```ansi\n\u001b[2;31mERROR\u001b[0m\nError: '. get_class($e) .'\nException: '. $e->getMessage() .'\nFile: '. $e->getFile() .':'. $e->getLine() .'```');\n\t\t}\n\t}\n\n\trequire_once FLUX_CONFIG_DIR.'/error.php';\n\tdefine('__ERROR__', 1);\n\tinclude $errorFile;\n}\n?>\n"
  },
  {
    "path": "lang/en_us.php",
    "content": "<?php\nreturn array(\n\t// Generic/Misc.\n\t'Language'                => 'English',\n\t'YesLabel'                => 'Yes',\n\t'NoLabel'                 => 'No',\n\t'NoteLabel'               => 'Note',\n\t'GenderTypeMale'          => 'Male',\n\t'GenderTypeFemale'        => 'Female',\n\t'GenderTypeServer'        => 'Server',\n\t'RefreshSecurityCode'     => 'Refresh Security Code',\n\t'NoneLabel'               => 'None',\n\t'NeverLabel'              => 'Never',\n\t'NotApplicableLabel'      => 'Not Applicable',\n\t'UnknownLabel'            => 'Unknown',\n\t'IsEqualToLabel'          => 'is equal to',\n\t'IsGreaterThanLabel'      => 'is greater than',\n\t'IsLessThanLabel'         => 'is less than',\n\t'AllLabel'                => 'All',\n\t'SearchLabel'             => 'Search…',\n\t'GoBackLabel'             => 'Go back to previous page…',\n\t'SearchButton'            => 'Search',\n\t'ResetButton'             => 'Reset',\n\t'FilterButton'            => 'Filter',\n\t'NotAcceptingDonations'   => \"We're sorry, but we are currently not accepting any donations.  We apologize for the inconvenience.\",\n\t//'NotAcceptingDonations'   => \"We're sorry, but our donation system is currently undergoing maintenance, please try again later.\",\n\t'FoundSearchResults'      => 'Found a total of %d record(s) across %d page(s).  Displaying result(s) %d-%d.',\n\t'LoginToDonate'           => 'Please log-in to make a donation.',\n\t'UnknownCharacter'        => 'No such character found.',\n\t'AccountIdLabel'          => 'Account ID',\n\t'AccountGroupIDLabel'     => 'Group ID',\n\t'AccountStateLabel'       => 'State',\n\t'CreditBalanceLabel'      => 'Credit Balance',\n\t'UsernameLabel'           => 'Username',\n\t'PasswordLabel'           => 'Password',\n\t'EmailAddressLabel'       => 'E-mail',\n\t'GenderLabel'             => 'Gender',\n\t'LoginCountLabel'         => 'Login Count',\n\t'LastLoginDateLabel'      => 'Last Login Date',\n\t'LastUsedIpLabel'         => 'Last Used IP',\n\t'AccountStateNormal'      => 'Normal',\n\t'AccountStatePending'     => 'Pending',\n\t'AccountStatePermBanned'  => 'Permanently Banned',\n\t'AccountStateTempBanLbl'  => 'Temporarily Banned',\n\t'AccountStateTempBanned'  => 'Temp. Banned (unban: %s)',\n\t'OnlineLabel'             => 'Online',\n\t'OfflineLabel'            => 'Offline',\n\t'ItemIdLabel'             => 'Item ID',\n\t'ItemNameLabel'           => 'Item Name',\n\t'ItemAmountLabel'         => 'Amount',\n\t'ItemIdentifyLabel'       => 'Identified',\n\t'ItemRefineLabel'         => 'Refine',\n\t'ItemBrokenLabel'         => 'Broken',\n\t'ItemCard0Label'          => 'Slot 1',\n\t'ItemCard1Label'          => 'Slot 2',\n\t'ItemCard2Label'          => 'Slot 3',\n\t'ItemCard3Label'          => 'Slot 4',\n \t'ItemRandOptionsLabel'    => 'Random options',\n\n    //SIDEBAR\n    //FluxCP Menu Items\n    //Categories\n    'MainMenuLabel'           => 'Main Menu',\n    'ForumLabel'              => 'Forum',\n    'AccountLabel'            => 'Account',\n    'CharacterLabel'          => 'Character',\n    'ServiceDeskLabel'        => 'Service Desk',\n    'CPLogsLabel'             => 'CP Logs',\n    'FluxAdminLabel'          => 'Flux Admin',\n    'PagesLabel'              => 'Pages',\n    'IPBanListLabel'          => 'IP Ban List',\n    'GuildsLabel'             => 'Guilds',\n    'rALogsLabel'             => 'rA Logs',\n    'SendMailLabel'           => 'Send Mail',\n    'ReInstallLabel'          => 'Re-Install',\n    'TaskListLabel'           => 'Task List',\n    'DonationsLabel'          => 'Donations',\n    'InformationLabel'        => 'Information',\n    'DatabaseLabel'           => 'Database',\n    'SocialLabel'             => 'Social',\n    //SubMenus\n    'HomeLabel'               => 'Home',\n    'NewsLabel'               => 'News',\n    'DownloadsLabel'          => 'Downloads',\n    'RulesLabel'              => 'Rules',\n    'ContactUsLabel'          => 'Contact Us',\n    'MyAccountLabel'          => 'My Account',\n    'HistoryLabel'            => 'History',\n    'PurchaseLabel'           => 'Purchase',\n    'DonateLabel'             => 'Donate',\n    'ServerInfoLabel'         => 'Server Info',\n    'ServerStatusLabel'       => 'Server Status',\n    'WoeHoursLabel'           => 'WOE Hours',\n    'CastlesLabel'            => 'Castles',\n    'WhosOnlineLabel'         => \"Who's Online\",\n    'MapStaticsLabel'         => 'Map Statics',\n    'RankingInfoLabel'        => 'Ranking Info',\n    'VendingInfoLabel'        => 'Vending Info',\n    'BuyingstoreInfoLabel'    => 'Buyingstore Info',\n    'ItemDatabaseLabel'       => 'Item Database',\n    'MobDatabaseLabel'        => 'Mob Database',\n    'JoinUsInFacebookLabel'   => 'Join us on Facebook!',\n    'RateUsOnRMSLabel'        => 'Rate us on RMS!',\n\n\t// Module: account\n\t// - account/changemail\n\t'EmailChangeTitle'        => 'Change E-mail',\n\t'EnterEmailAddress'       => 'Please enter an e-mail address.',\n\t'EmailCannotBeSame'       => 'Your new e-mail cannot be the same as your current.',\n\t'EmailInvalid'            => 'Invalid e-mail address.',\n\t'EmailAlreadyRegistered'  => \"The e-mail address you've entered is already registered to another account.\",\n\t'EmailChangeSent'         => 'An e-mail has been sent to your new address with a link that will confirm the change.',\n\t'EmailAddressChanged'     => 'Your e-mail address has been changed!',\n\t'EmailChangeFailed'       => 'Failed to change e-mail address.  Please try again later.',\n\t'EmailChangeHeading'      => 'Change E-mail',\n\t'EmailChangeInfo'         => 'If you would like to change the e-mail address registered under your account, you can fill out the below form.',\n\t'EmailChangeInfo2'        => 'After submitting the form, you will be required to confirm your new e-mail address (an e-mail will be sent to the new address with a link).',\n\t'EmailChangeLabel'        => 'New E-mail Address',\n\t'EmailChangeInputNote'    => 'Must be a valid e-mail address!',\n\t'EmailChangeButton'       => 'Change E-mail Address',\n\t// - account/changepass\n\t'PasswordChangeTitle'     => 'Change Password',\n\t'NeedCurrentPassword'     => 'Please enter your current password.',\n\t'NeedNewPassword'         => 'Please enter your new password.',\n\t'OldPasswordInvalid'      => \"The password you provided doesn't match the one we have on record.\",\n\t'ConfirmNewPassword'      => 'Please confirm your new password.',\n\t'NewPasswordHasUsername'  => 'Your new password must not contain your username.',\n\t'NewPasswordInvalid'      => 'Your new password contains invalid characters.',\n\t'NewPasswordSameAsOld'    => 'New password cannot be the same as your current password.',\n\t'NewPasswordNeedUpper'    => 'Your new password must contain at least %d uppercase letter(s).',\n\t'NewPasswordNeedLower'    => 'Your new password must contain at least %d lowercase letter(s).',\n\t'NewPasswordNeedNumber'   => 'Your new password must contain at least %d number(s).',\n\t'NewPasswordNeedSymbol'   => 'Your new password must contain at least %d symbol(s).',\n\t'PasswordHasBeenChanged'  => 'Your password has been changed, please log-in again.',\n\t'FailedToChangePassword'  => 'Failed to change your password.  Please contact an admin.',\n\t'PasswordChangeHeading'   => 'Change Your Password',\n\t'PasswordChangeInfo'      => 'Please enter your current password, then enter the new password you would like to use and re-enter it to confirm.',\n\t'CurrentPasswordLabel'    => 'Current Password',\n\t'NewPasswordLabel'        => 'New Password',\n\t'NewPasswordConfirmLabel' => 'Re-enter New Password',\n\t'PasswordChangeNote'      => 'Please be sure to enter the correct information.',\n\t'PasswordChangeNote2'     => 'After changing your password, you will be logged out.',\n\t'PasswordChangeButton'    => 'Change Password',\n\t// - account/changesex\n\t'GenderChangeTitle'       => 'Change Gender',\n\t'GenderChangeBadChars'    => 'You cannot change your gender if any of your characters is a: %s',\n\t'GenderChanged'           => 'Your gender has been changed and %d credit(s) have been deducted from your account.',\n\t'GenderChangedForFree'    => 'Your gender has been changed.',\n\t'GenderChangeHeading'     => 'Change Your Gender',\n\t'GenderChangeCost'        => 'Gender changes cost %s credit(s).',\n\t'GenderChangeBalance'     => 'Your current balance is %s credit(s).',\n\t'GenderChangeNoFunds'     => 'You do not have enough credits to perform a gender change at this time.',\n\t'GenderChangeNoCost'      => 'For you, gender changes are free.',\n\t'GenderChangeCharInfo'    => 'You cannot change gender if you have the follow character jobs: %s',\n\t'GenderChangeSubHeading'  => 'Please make sure you want to really change!',\n\t'GenderChangeFormText'    => 'Would you like to change your gender to %s?',\n\t'GenderChangeConfirm'     => 'Are you absolutely sure you want to change your gender?',\n\t'GenderChangeButton'      => 'Yes, do it please.',\n\t// - account/confirm\n\t'AccountConfirmTitle'     => 'Confirm Account',\n\t'AccountConfirmUnban'     => 'Account has been confirmed and activated.',\n\t'AccountConfirmMessage'   => 'Your account has been confirmed and activated, you may now log-in.',\n\t// - account/confirmemail\n\t'EmailConfirmTitle'       => 'Confirm E-mail',\n\t'EmailConfirmFailed'      => 'There has been a technical difficulty while updating your e-mail address, please contact an admin.',\n\t'EmailConfirmChanged'     => 'Your e-mail address has been changed!',\n\t// - account/create\n\t'AccountCreateTitle'      => 'Create an Account',\n\t'AccountConfirmBan'       => 'Awaiting account activation: %s',\n\t'AccountCreateEmailSent'  => 'An e-mail has been sent containing account activation details, please check your e-mail and activate your account to log-in.',\n\t'AccountCreateFailed'     => 'Your account has been created, but unfortunately we failed to send an e-mail due to technical difficulties. Please contact a staff member and request for assistance.',\n\t'AccountCreated'          => 'Congratulations, you have been registered successfully and automatically logged in.',\n\t'AccountCreateHeading'    => 'Register',\n\t'AccountCreateTerms'      => 'Terms of Service',\n\t'AccountCreateInfo'       => 'Please read our %s (ToS) before registering for an account, to ensure that you understand the rules of holding an account with our private Ragnarok Online game server.',\n\t'AccountCreateInfo2'      => 'By clicking \"Create My Account\", you agree to be bound by our %s.',\n\t'AccountCreateGenderInfo' => \"The gender you choose here will affect your in-game character's gender!\",\n\t'AccountServerLabel'      => 'Server',\n\t'AccountUsernameLabel'    => 'Your Username',\n\t'AccountPasswordLabel'    => 'Your Password',\n\t'AccountPassConfirmLabel' => 'Confirm Password',\n\t'AccountEmailLabel'       => 'E-mail Address',\n    'AccountEmailLabel2'      => 'Confirm E-mail Address',\n\t'AccountGenderLabel'      => 'Gender',\n\t'AccountBirthdateLabel'   => 'Birthdate',\n\t'AccountSecurityLabel'    => 'Security Code',\n\t'AccountCreateButton'     => 'Create My Account',\n\t'AccountInvalidChars'     => \"A username can only contain these characters: '%s'\",\n    'AccountRecaptchaKey'     => 'You need Recaptcha keys, see more in config/applications.php (ReCaptchaPublicKey/ReCaptchaPrivateKey)',\n\t'InvalidLoginServer'      => 'Invalid login server selected, please try again with a valid server.',\n\t'InvalidLoginCredentials' => 'Invalid login credentials, please verify that you typed the correct info and try again.',\n\t'UnexpectedLoginError'    => 'Unexpected error occurred, please try again or report to an admin.',\n\t'CriticalLoginError'      => 'Something bad happened.  Report to an administrator ASAP.',\n\t'UsernameAlreadyTaken'    => \"The username you've chosen has already been taken by another user.\",\n\t'UsernameTooShort'        => sprintf('Your username should be around %d to %d characters long.', Flux::config('MinUsernameLength'), Flux::config('MaxUsernameLength')),\n\t'UsernameTooLong'         => sprintf('Your username should be around %d to %d characters long.', Flux::config('MinUsernameLength'), Flux::config('MaxUsernameLength')),\n\t'PasswordContainsUser'    => 'Your password cannot contain your username.',\n\t'PasswordHasUsername'     => 'Your password must not contain your username.',\n\t'PasswordTooShort'        => 'Your password should be around %d to %d characters long.',\n\t'PasswordTooLong'         => 'Your password should be around %d to %d characters long.',\n\t'PasswordsDoNotMatch'     => \"Your passwords do not match, please make sure that you've typed them both correctly.\",\n\t'PasswordNeedUpper'       => 'Your password must contain at least %d uppercase letter(s).',\n\t'PasswordNeedLower'       => 'Your password must contain at least %d lowercase letter(s).',\n\t'PasswordNeedNumber'      => 'Your password must contain at least %d number(s).',\n\t'PasswordNeedSymbol'      => 'Your password must contain at least %d symbol(s).',\n\t'EmailAddressInUse'       => \"The e-mail address you've entered is already registered to another account.  Please use a different e-mail address.\",\n\t'InvalidEmailAddress'     => \"The e-mail address you've entered is not in a valid e-mail address format.\",\n    'InvalidEmailconf'        => \"E-mail addresses do not match.\",\n\t'InvalidGender'           => 'Gender should be \"M\" or \"F\"',\n\t'InvalidServer'           => \"The server you've selected does not exist.\",\n\t'InvalidSecurityCode'     => 'Please enter the security code correctly.',\n\t'InvalidPassword'         => 'Your password contains invalid characters.',\n\t'InvalidBirthdate'        => 'Invalid birthdate input.',\n\t'CriticalRegisterError'   => 'Something bad happened.  Report to an administrator ASAP.',\n\t// - account/edit\n\t'AccountEditTitle'        => 'Modify Account',\n\t'AccountEditTitle2'       => 'Modifying My Account',\n\t'AccountEditTitle3'       => 'Modifiying Account (%s)',\n\t'CannotModifyOwnGroupID'  => 'You cannot modify your own account group ID.',\n\t'CannotModifyAnyGroupID'  => 'You cannot modify account group IDs.',\n\t'CannotModifyGroupIDHigh' => 'You cannot set an account group ID to be higher than your own.',\n\t'InvalidGroupID'          => 'Invalid group ID.',\n\t'CannotModifyBalance'     => 'You cannot modify account balances.',\n\t'InvalidLastLoginDate'    => 'Invalid last login date.',\n\t'InvalidVIPTime'          => 'Invalid VIP Time.',\n\t'AccountModified'         => 'Account has been modified.',\n\t'AccountEditHeading'      => 'Modify Account',\n\t'AccountEditButton'       => 'Modify Account',\n\t'AccountEditNotFound'     => 'No such account.',\n\t'VIPTimeDateLabel'        => 'VIP Until',\n\t// - account/index\n\t'AccountIndexTitle'       => 'List Accounts',\n\t'AccountIndexHeading'     => 'Accounts',\n\t'LoginBetweenLabel'       => 'Login Between',\n\t'BirthdateBetweenLabel'   => 'Birthdate Between',\n\t'AccountIndexNotFound'    => 'No such account.',\n\t// - account/login\n\t'LoginTitle'              => 'Log In',\n\t'LoginHeading'            => 'Log In',\n\t'LoginButton'             => 'Log In',\n\t'LoginPageMakeAccount'    => 'Don\\'t have an account? <a href=\"%s\">Create one!</a>',\n\t'TemporarilyBanned'       => 'Your account is temporarily banned.',\n\t'PermanentlyBanned'       => 'Your account is permanently banned.',\n\t'IpBanned'                => 'The IP address you are behind is banned.',\n\t'PendingConfirmation'     => 'Your account is pending e-mail confirmation.',\n\t// - account/logout\n\t'LogoutTitle'             => 'Logout',\n\t'LogoutHeading'           => 'Logout',\n\t'LogoutInfo'              => 'You are now logged out.',\n\t'LogoutInfo2'             => 'Please wait a moment while you are <a href=\"%s\">redirected</a>…',\n\t// - account/resend\n\t'ResendTitle'             => 'Resend Confirmation E-mail',\n\t'ResendEnterUsername'     => 'Please enter your account username.',\n\t'ResendEnterEmail'        => 'Please enter your e-mail address.',\n\t'ResendFailed'            => 'Failed to resend confirmation code.',\n\t'ResendEmailSent'         => 'Your confirmation code has been resent, please check your e-mail and proceed to activate your account.',\n\t'ResendHeading'           => 'Resend Confirmation E-mail',\n\t'ResendInfo'              => 'Please enter your account name and e-mail address you used during the registration of the account to have us resend your confirmation e-mail.',\n\t'ResendServerLabel'       => 'Registered Server',\n\t'ResendAccountLabel'      => 'Account Username',\n\t'ResendEmailLabel'        => 'E-mail Address',\n\t'ResendServerInfo'        => 'This is the server the account was registered on.',\n\t'ResendAccountInfo'       => 'This is the account name you registered.',\n\t'ResendEmailInfo'         => 'This is the e-mail address you used during the registration of the above account.',\n\t'ResendButton'            => 'Resend Confirmation E-mail',\n\t// - account/resetpass\n\t'ResetPassTitle'          => 'Reset Password',\n\t'ResetPassEnterAccount'   => 'Please enter your account username.',\n\t'ResetPassEnterEmail'     => 'Please enter your e-mail address.',\n\t'ResetPassDisallowed'     => 'Password recovery cannot be used for this account.',\n\t'ResetPassFailed'         => 'Failed to send reset password e-mail.',\n\t'ResetPassEmailSent'      => 'An e-mail has been sent with details on how to reset your password.',\n\t'ResetPassInfo'           => 'If you lost your password, you can re-set it by entering the e-mail address you used to register your account.',\n\t'ResetPassInfo2'          => 'An e-mail will then be sent to the specified address with a link allowing you to reset your password, therefore a valid e-mail address is required.',\n\t'ResetPassServerLabel'    => 'Registered Server',\n\t'ResetPassAccountLabel'   => 'Account Username',\n\t'ResetPassEmailLabel'     => 'E-mail Address',\n\t'ResetPassServerInfo'     => 'This is the server the account was registered on.',\n\t'ResetPassAccountInfo'    => 'This is the account name you registered.',\n\t'ResetPassEmailInfo'      => 'This is the e-mail address you used during the registration of the above account.',\n\t'ResetPassButton'         => 'Send Reset Password E-mail',\n\t// - account/resetpw\n\t'ResetPwTitle'            => 'Reset Password',\n\t'ResetPwFailed'           => 'Failed to re-set password, please try again later.',\n\t'ResetPwDone'             => 'Your password has been reset and an e-mail containing your new password has been sent to you.',\n\t'ResetPwDone2'            => 'Your password has been reset, but we failed to deliver the e-mail containing your new password.  Please reset again to resolve this issue.',\n\t// - account/transfer\n\t'TransferTitle'           => 'Transfer Donation Credits',\n\t'TransferGreaterThanOne'  => 'You can only transfer credits in amounts greater than 1.',\n\t'TransferEnterCharName'   => 'You must input the character name of who will receive the credits.',\n\t'TransferNoCharExists'    => \"Character '%s' does not exist. Please make sure you typed it correctly.\",\n\t'TransferNoBalance'       => 'You do not have a sufficient balance to make the transfer.',\n\t'TransferUnexpectedError' => 'Unexpected error occurred.',\n\t'TransferSuccessful'      => 'Credits have been transferred!',\n\t'TransferHeading'         => 'Transfer Donation Credits',\n\t'TransferSubHeading'      => 'Credits will be transferred to a character on the %s server.',\n\t'TransferInfo'            => 'You currently have %s credit(s).',\n\t'TransferInfo2'           => 'Enter the amount you would like to transfer and the character name belonging to the account you would like your credits transferred to.',\n\t'TransferAmountLabel'     => 'Amount of Credits',\n\t'TransferCharNameLabel'   => 'Character Name',\n\t'TransferAmountInfo'      => 'This is the amount of credits you would like to send.',\n\t'TransferCharNameInfo'    => 'This is the character name of who will be receiving the credits.',\n\t'TransferConfirm'         => 'Are you sure you want to do this?',\n\t'TransferButton'          => 'Transfer',\n\t'TransferNoCredits'       => 'You have no credits available in your account.',\n\t// - account/view\n\t'VIPStateLabel'           => 'VIP Status',\n\t// * account/view submenus\n\t'ModifyAccountLink'       => 'Modify Account',\n\t'AccountViewTitle'        => 'View Account',\n\t'AccountViewTitle2'       => 'Viewing Account (%s)',\n\t'AccountViewTitle3'       => 'Viewing My Account',\n\t'AccountTempBanFailed'    => 'Failed to temporarily ban account.',\n\t'AccountPermBanFailed'    => 'Failed to permanently ban account.',\n\t'AccountTempBanUnauth'    => 'You are unauthorized to place temporary bans on this account.',\n\t'AccountPermBanUnauth'    => 'You are unauthorized to place permanent bans on this account.',\n\t'AccountLiftTempBan'      => 'Account has been unbanned.',\n\t'AccountLiftPermBan'      => 'Account has been unbanned.',\n\t'AccountLiftBanUnauth'    => \"You are unauthorized to remove this account's ban status.\",\n\t'AccountViewHeading'      => 'Viewing Account',\n\t'AccountViewDonateLink'   => '(Donate!)',\n\t'AccountViewTempBanLabel' => 'Temporary Ban',\n\t'AccountViewPermBanLabel' => 'Permanent Ban',\n\t'AccountViewUnbanLabel'   => 'Remove Ban',\n\t'AccountBanReasonLabel'   => 'Reason:',\n\t'AccountBanUntilLabel'    => 'Ban Until:',\n\t'AccountTempBanButton'    => 'Ban Account',\n\t'AccountPermBanButton'    => 'Permanently Ban Account',\n\t'AccountTempUnbanButton'  => 'Remove Temporary Ban',\n\t'AccountPermUnbanButton'  => 'Remove Permanent Ban',\n\t'AccountBanConfirm'       => 'Are you sure?',\n\t'AccountBanLogSubHeading' => 'Ban Log for %s (recent to oldest)',\n\t'BanLogBanTypeLabel'      => 'Ban Type',\n\t'BanLogBanDateLabel'      => 'Ban Date',\n\t'BanLogBanReasonLabel'    => 'Ban Reason',\n\t'BanLogBannedByLabel'     => 'Banned By',\n\t'BanLogBannedByCP'        => 'Control Panel',\n\t'BanTypeUnbanned'         => 'Unbanned',\n\t'BanTypePermBanned'       => 'Permanently Banned',\n\t'BanTypeTempBanned'       => 'Temporarily Banned',\n\t'AccountViewCharSubHead'  => 'Characters on %s',\n\t'AccountViewSlotLabel'    => 'Slot',\n\t'AccountViewCharLabel'    => 'Character Name',\n\t'AccountViewClassLabel'   => 'Job Class',\n\t'AccountViewLvlLabel'     => 'Base Level',\n\t'AccountViewJlvlLabel'    => 'Job Level',\n\t'AccountViewZenyLabel'    => 'Zeny',\n\t'AccountViewGuildLabel'   => 'Guild',\n\t'AccountViewStatusLabel'  => 'Status',\n\t'AccountViewPrefsLabel'   => 'Preferences',\n\t'CharModifyPrefsLink'     => 'Modify Preferences',\n\t'AccountViewNoChars'      => 'This account has no characters on %s.',\n\t'AccountViewStorage'      => 'Storage Items of %s',\n\t'AccountViewStorageCount' => '%s has %s storage item(s).',\n\t'AccountViewNoStorage'    => 'There are no storage items on this account.',\n\t'AccountViewNotFound'     => \"Records indicate that the account you're trying to view does not exist.\",\n\t// - account/xferlog\n\t'XferLogTitle'            => 'Credit Transfer History',\n\t'XferLogHeading'          => 'Credit Transfer History',\n\t'XferLogReceivedSubHead'  => 'Transfers: Received',\n\t'XferLogSentSubHead'      => 'Transfers: Sent',\n\t'XferLogCreditsLabel'     => 'Credits',\n\t'XferLogFromLabel'        => 'From E-mail',\n\t'XferLogDateLabel'        => 'Transfer Date',\n\t'XferLogCharNameLabel'    => 'To Character',\n\t'XferLogNotReceived'      => 'You have not received any credit transfers.',\n\t'XferLogNotSent'          => 'You have not sent any credit transfers.',\n\n\t// Module: character\n\t// - character/changeslot\n\t// - character/index\n\t// - character/mapstats\n\t// - character/online\n\t// - character/prefs\n\t// - character/resetlook\n\t'CantResetLookWhenOnline' => 'Cannot reset look while %s is online.',\n\t'ResetLookSuccessful'     => \"%s's look has been reset!\",\n\t'ResetLookFailed'         => \"Failed to reset %s's look.\",\n\t// - character/resetpos\n\t'CantResetPosWhenOnline'  => 'Cannot reset position while %s is online.',\n\t'CantResetFromCurrentMap' => \"You cannot reset %s's position from the current map.\",\n\t'ResetPositionSuccessful' => \"%s's position has been reset!\",\n\t'ResetPositionFailed'     => \"Failed to reset %s's position.\",\n\t// - character/view\n\t// - character/divorce\n\t'DivorceTitle'            => 'Divorce',\n\t'DivorceHeading'          => 'Divorce',\n\t'DivorceNotMarried'       => '%s is not married.',\n\t'DivorceInvalidPartner'   => 'Invalid partner ID.',\n\t'DivorceInvalidChild'     => 'Invalid child ID.',\n\t'DivorceMustBeOffline'    => 'Both %s and his/her partner must be off-line.',\n\t'DivorceMustBeOffline2'   => '%s, his/her partner and their child must be off-line.',\n\t'DivorceText1'            => \"Are you sure you want to divorce %s and his/her partner?\",\n\t'DivorceText2'            => 'If %s has a child, the child will also be orphaned.',\n\t'DivorceText3'            => 'Wedding rings will also be deleted.',\n\t'DivorceButton'           => 'Yes, do it please.',\n\t'DivorceSuccessful'       => '%s has been divorced!',\n\n\t// Module: cplog\n\t// - cplog/index.php\n\t// - cplog/login.php\n\t// - cplog/paypal.php\n\t// - cplog/resetpass.php\n\t// - cplog/txnview.php\n\n\t// Module: donate\n\t// - donate/complete\n\t// - donate/history\n\t// - donate/index\n\t// - donate/trusted\n\n\t// Module: errors\n\t// - errors/missing_action\n\t'MissingActionTitle'      => 'Missing Action',\n\t'MissingActionHeading'    => 'Missing Action!',\n\t'MissingActionModLabel'   => 'Module:',\n\t'MissingActionActLabel'   => 'Action:',\n\t'MissingActionReqLabel'   => 'Request URI:',\n\t'MissingActionLocLabel'   => 'File system location:',\n\t// - errors/missing_view\n\t'MissingViewTitle'        => 'Missing View',\n\t'MissingViewHeading'      => 'Missing View!',\n\t'MissingViewModLabel'     => 'Module:',\n\t'MissingViewActLabel'     => 'Action:',\n\t'MissingViewReqLabel'     => 'Request URI:',\n\t'MissingViewLocLabel'     => 'File system location:',\n\n\t// Module: guild\n\t// - guild/export\n\t// - guild/index\n\t// - guild/view\n\n\t// Module: history\n\t// - history/cplogin\n\t'HistoryCpLoginTitle'     => 'Control Panel Logins',\n\t'HistoryCpLoginHeading'   => 'Control Panel Logins',\n\t'HistoryLoginDateLabel'   => 'Login Date/Time',\n\t'HistoryIpAddrLabel'      => 'IP Address',\n\t'HistoryErrorCodeLabel'   => 'Error Code',\n\t'HistoryNoCpLogins'       => 'No control panel login attempts found.',\n\t// -history/emailchange\n\t'HistoryEmailTitle'       => 'E-Mail Changes',\n\t'HistoryEmailHeading'     => 'E-Mail Changes',\n\t'HistoryEmailRequestDate' => 'Request Date/Time',\n\t'HistoryEmailRequestIp'   => 'Request IP',\n\t'HistoryEmailOldAddress'  => 'Old E-Mail',\n\t'HistoryEmailNewAddress'  => 'New E-Mail',\n\t'HistoryEmailChangeDate'  => 'Change Date',\n\t'HistoryEmailChangeIp'    => 'Change IP',\n\t'HistoryNoEmailChanges'   => 'No e-mail change attempts found.',\n\t// - history/gamelogin\n\t'HistoryGameLoginTitle'   => 'Game Logins',\n\t'HistoryGameLoginHeading' => 'Game Logins',\n\t'HistoryRepsCodeLabel'    => 'Response Code',\n\t'HistoryLogMessageLabel'  => 'Log Message',\n\t'HistoryNoGameLogins'     => 'No in-game login attempts found.',\n\t// - history/index\n\t'HistoryIndexTitle'       => 'My Account History',\n\t'HistoryIndexHeading'     => 'My Account History',\n\t'HistoryIndexInfo'        => 'Here you can view past account activity of your account.',\n\t'HistoryIndexInfo2'       => 'Please select an action from the menu.',\n\t// - history/passchange\n\t'HistoryPassChangeTitle'      => 'Password Changes',\n\t'HistoryPassChangeHeading'    => 'Password Changes',\n\t'HistoryPassChangeChangeDate' => 'Change Date',\n\t'HistoryPassChangeChangeIp'   => 'Change IP',\n\t'HistoryNoPassChanges'        => 'No password changes found.',\n\t// -history/passreset\n\t'HistoryPassResetTitle'       => 'Password Resets',\n\t'HistoryPassResetHeading'     => 'Password Resets',\n\t'HistoryPassResetRequestDate' => 'Request Date/Time',\n\t'HistoryPassResetRequestIp'   => 'Request IP',\n\t'HistoryPassResetResetDate'   => 'Reset Date',\n\t'HistoryPassResetResetIp'     => 'Reset IP',\n\t'HistoryNoPassResets'         => 'No password reset attempts found.',\n\n\t// Module: ipban\n\t// - ipban/add\n\t'IpbanAddTitle'           => 'Add IP Ban',\n\t'IpbanEnterIpPattern'     => 'Please input an IP address or pattern.',\n\t'IpbanInvalidPattern'     => 'Invalid IP address or pattern.',\n\t'IpbanWhitelistedPattern' => 'This pattern is whitelisted and cannot be blocked.',\n\t'IpbanEnterReason'        => 'Please enter a reason for the IP ban.',\n\t'IpbanSelectUnbanDate'    => 'Unban date is required.',\n\t'IpbanFutureDate'         => 'Unban date must be specified to a future date.',\n\t'IpbanAlreadyBanned'      => 'A matching IP (%s) has already been banned.',\n\t'IpbanPatternBanned'      => \"The IP address/pattern '%s' has been banned.\",\n\t'IpbanAddFailed'          => 'Failed to add IP ban.',\n\t'IpbanAddHeading'         => 'Add IP Ban',\n\t'IpbanIpAddressLabel'     => 'IP Address',\n\t'IpbanReasonLabel'        => 'Ban Reason',\n\t'IpbanUnbanDateLabel'     => 'Unban Date',\n\t'IpbanIpAddressInfo'      => 'You may specify a pattern such as 218.139.*.*',\n\t'IpbanAddButton'          => 'Add IP Ban',\n\t// - ipban/edit\n\t'IpbanEditTitle'          => 'Modify IP Ban',\n\t'IpbanEnterEditReason'    => 'Please enter a reason for the IP ban modification.',\n\t'IpbanEditFailed'         => 'Failed to modify IP ban.',\n\t'IpbanEditHeading'        => 'Modify IP Ban',\n\t'IpbanEditReasonLabel'    => 'Edit Reason',\n\t'IpbanEditButton'         => 'Modify IP Ban',\n\t// - ipban/index\n\t'IpbanListTitle'          => 'IP Ban List',\n\t'IpbanListHeading'        => 'IP Ban List',\n\t'IpbanBannedIpLabel'      => 'Banned IP',\n\t'IpbanBanDateLabel'       => 'Ban Date',\n\t'IpbanBanReasonLabel'     => 'Ban Reason',\n\t'IpbanBanExpireLabel'     => 'Ban Expiration Date',\n\t'IpbanModifyLink'         => 'Modify',\n\t'IpbanRemoveLink'         => 'Remove',\n\t'IpbanUnbanButton'        => 'Unban Selected',\n\t'IpbanListNoBans'         => 'There are currently no IP bans.',\n\t// - ipban/remove\n\t'IpbanRemoveTitle'        => 'Remove IP Ban',\n\t'IpbanEnterRemoveReason'  => 'Please enter a reason for the IP ban removal.',\n\t'IpbanNotBanned'          => 'No matching IP (%s) is currently banned.',\n\t'IpbanPatternUnbanned'    => \"The IP address/pattern '%s' has been unbanned.\",\n\t'IpbanRemoveFailed'       => 'Failed to remove IP ban.',\n\t'IpbanRemoveHeading'      => 'Remove IP Ban',\n\t'IpbanRemoveReasonLabel'  => 'Unban Reason',\n\t'IpbanRemoveButton'       => 'Remove IP Ban',\n\t// - ipban/unban\n\t'IpbanNothingToUnban'     => 'Nothing to unban.',\n\t'IpbanEnterUnbanReason'   => 'Please enter a reason for lifting the IP ban(s).',\n\t'IpbanUnbanned'           => 'Lifted selected IP ban(s)!',\n\t'IpbanUnbanFailed'        => 'Failed to lift %d of the specified IP unban(s)!',\n\n\t// Module: item\n\t// - item/add\n\t// - item/copy\n\t// - item/edit\n\t// - item/index\n\t// - item/view\n\n\t// Module: itemshop\n\t// - itemshop/add\n\t// - itemshop/delete\n\t// - itemshop/edit\n\t// - itemshop/imagedel\n\n\t// Module: logdata\n\t// - logdata/chat\n\t// - logdata/cashpoints\n\t'CashLogTitle'            => 'List CashPoints Log',\n\t'CashLogHeading'          => 'CashPoint Log',\n\t'CashLogNotFound'         => 'No cash logs found.',\n\t'CashLogDateLabel'        => 'Date/Time',\n\t'CashLogCharacterLabel'   => 'Character',\n\t'CashLogTypeLabel'        => 'Type',\n\t'CashLogCashTypeLabel'    => 'Cash Type',\n\t'CashLogAmountLabel'      => 'Amount',\n\t'CashLogMapLabel'         => 'Map',\n\t// - logdata/command\n\t'CommandLogTitle'         => 'List Commands',\n\t'CommandLogHeading'       => 'Commands',\n\t'CommandLogNotFound'      => 'No commands found.',\n\t'CommandLogDateLabel'     => 'Date/Time',\n\t'CommandLogAccountIdLabel'=> 'Account ID',\n\t'CommandLogCharIdLabel'   => 'Character ID',\n\t'CommandLogCharNameLabel' => 'Character Name',\n\t'CommandLogCommandLabel'  => 'Command',\n\t'CommandLogMapLabel'      => 'Map',\n\t// - logdata/index\n\t// - logdata/login\n\t// - logdata/pick\n\t'PickLogTitle'            => 'List Item Picks',\n\t'PickLogHeading'          => 'Item Picks',\n\t'PickLogNotFound'         => 'No item picks found.',\n\t'PickLogDateLabel'        => 'Date/Time',\n\t'PickLogCharacterLabel'   => 'Character',\n\t'PickLogTypeLabel'        => 'Type',\n\t'PickLogItemLabel'        => 'Item Name',\n\t'PickLogAmountLabel'      => 'Amount',\n\t'PickLogRefineLabel'      => 'Refine',\n\t'PickLogCard0Label'       => 'Slot 1',\n\t'PickLogCard1Label'       => 'Slot 2',\n\t'PickLogCard2Label'       => 'Slot 3',\n\t'PickLogCard3Label'       => 'Slot 4',\n\t'PickLogMapLabel'         => 'Map',\n\t//\t- logdata/branch\n\t'BranchLogTitle'            => 'List Branch Log',\n\t'BranchLogHeading'          => 'Branch Log',\n\t'BranchLogNotFound'         => 'No branch logs found.',\n\t'BranchLogIDLabel'          => 'Branch Log ID',\n\t'BranchLogDateLabel'        => 'Date / Time',\n\t'BranchLogAccountIDLabel'   => 'Account ID',\n\t'BranchLogCharIDLabel'      => 'Char ID',\n\t'BranchLogCharNameLabel'    => 'Char Name',\n\t'BranchLogMapLabel'         => 'Map',\n\t// - logdata/char\n\t'CharLogTitle'            => 'List Character Log',\n\t'CharLogHeading'          => 'Character Log',\n\t'CharLogNotFound'         => 'No character logs found.',\n\t'CharLogDateLabel'        => 'Date / Time',\n\t'CharLogMsgLabel'         => 'Action',\n\t'CharLogAccountIDLabel'   => 'Account ID',\n\t'CharLogCharNumLabel'     => 'Character slot',\n\t'CharLogCharNameLabel'    => 'Character Name',\n\t//\t- logdata/inter\n\t'InterLogTitle'            => 'List of Interactions Log',\n\t'InterLogHeading'          => 'Interactions Log',\n\t'InterLogNotFound'         => 'No Interactions logs found.',\n\t'InterLogDateLabel'        => 'Date / Time',\n\t'InterLogLabel'            => 'Interactions Log',\n\t//\t- logdata/mvp\n\t'MVPLogTitle'            => 'List MVP Log',\n\t'MVPLogHeading'          => 'MVP Log',\n\t'MVPLogNotFound'         => 'No MVP logs found.',\n\t'MVPLogIDLabel'          => 'MVP Log ID',\n\t'MVPLogDateLabel'        => 'Date / Time',\n\t'MVPLogCharacterLabel'   => 'Character ID',\n\t'MVPLogMonsterLabel'     => 'MVP Monster',\n\t'MVPLogPrizeLabel'       => 'MVP Prize',\n\t'MVPLogExpLabel'         => 'MVP Experience',\n\t'MVPLogMapLabel'         => 'Map',\n\t//\t- logdata/npc\n\t'NPCLogTitle'            => 'List NPC Log',\n\t'NPCLogHeading'          => 'NPC Log',\n\t'NPCLogNotFound'         => 'No npc logs found.',\n\t'NPCLogIDLabel'          => 'NPC ID',\n\t'NPCLogDateLabel'        => 'Date / Time',\n\t'NPCLogAccountIDLabel'   => 'Account ID',\n\t'NPCLogCharIDLabel'      => 'Character ID',\n\t'NPCLogCharNameLabel'    => 'Character Name',\n\t'NPCLogMapLabel'         => 'Map',\n\t'NPCLogMsgLabel'         => 'Message',\n\t// - logdata/zeny\n\t'ZenyLogTitle'            => 'List Zeny Log',\n\t'ZenyLogHeading'          => 'Zeny Log',\n\t'ZenyLogNotFound'         => 'No zeny logs found.',\n\t'ZenyLogDateLabel'        => 'Date/Time',\n\t'ZenyLogCharacterLabel'   => 'Character',\n\t'ZenyLogSourceLabel'      => 'Source',\n\t'ZenyLogTypeLabel'        => 'Type',\n\t'ZenyLogAmountLabel'      => 'Amount',\n\t'ZenyLogMapLabel'         => 'Map',\n\t// - logdata/feeding\n\t'FeedingLogTitle' => 'Feeding Log',\n\n\t// Module: mail\n\t// - mail/index\n\t'MailerTitle'             => 'Form Mailer',\n\t'MailerHeading'           => 'Form Mailer',\n\t'MailerEnterToAddress'    => 'Please enter a \"to\" address.',\n\t'MailerEnterSubject'      => 'Please enter a subject.',\n\t'MailerEnterBodyText'     => 'Please enter some body text.',\n\t'MailerEmailHasBeenSent'  => 'Your e-mail has been successfully sent.',\n\t'MailerFailedToSend'      => 'The mailer system failed to send the e-mail.  This could be a misconfiguration.',\n\t'MailerInfo'              => 'You may use the below mail form to send an e-mail using the control panel.',\n\t'MailerFromLabel'         => 'From',\n\t'MailerToLabel'           => 'Where are we sending this?',\n\t'MailerSubjectLabel'      => 'Subject',\n\t'MailerBodyLabel'         => 'Body',\n\t'MailerSelectTemplateLabel'   => 'Select Template',\n\n\t// Module: main\n\t// - main/index\n\t'MainPageHeading'         => 'Flux Control Panel',\n\t'MainPageInfo'            => \"If you are seeing this page, it's likely that you've successfully installed Flux.\",\n\t'MainPageInfo2'           => \"Would you like to change this page? Well, here's how you can:\",\n\t'MainPageStep1'           => 'Open \"%s\" in your text editor.',\n\t'MainPageStep2'           => 'Edit the file from your editor and save your changes.',\n\t'MainPageThanks'          => 'Thanks for using Flux!',\n\t'MainPageWelcome'         => 'Welcome to %s!',\n\t// - main/pagenotfound\n\t'PageNotFoundTitle'       => '404 Page Not Found',\n\t'PageNotFoundHeading'     => 'Page Not Found',\n\t'PageNotFoundInfo'        => 'The page you have requested was not found on our server.  Please check the address and make sure it is correct, and try again.',\n\t// - main/preprocess\n\t'DisallowedDuringWoE'     => 'The page you have requested is not accessible during WoE.',\n\n\t// Module: monster\n\t// - monster/index\n\t// - monster/view\n\n\t// Module: purchase\n\t// - purchase/add\n\t// - purchase/cart\n\t// - purchase/checkout\n\t// - purchase/clear\n\t// - purchase/index\n\t// - purchase/pending\n\t// - purchase/remove\n\n\t// Module: ranking\n\t// - ranking/character\n\t// - ranking/guild\n\t// - ranking/zeny\n\n\t// Module: server\n\t// - server/info\n\t'ServerInfoTitle'         => 'Server Information',\n\t'ServerInfoHeading'       => 'Server Information',\n\t'ServerInfoText'          => \"Here you'll find various server information.\",\n\t'ServerInfoSubHeading'    => 'Information for %s',\n\t'ServerInfoSubHeading2'   => 'Job Class Information for %s',\n\t'ServerInfoAccountLabel'  => 'Accounts',\n\t'ServerInfoCharLabel'     => 'Characters',\n\t'ServerInfoGuildLabel'    => 'Guilds',\n\t'ServerInfoPartyLabel'    => 'Parties',\n\t'ServerInfoZenyLabel'     => 'Zeny',\n\t// - server/status\n\t'ServerStatusTitle'       => 'Current Server Status',\n\t'ServerStatusHeading'     => 'Server Status',\n\t'ServerStatusInfo'        => \"Understanding the online and offline status of each server can help you understand how an issue can relate to your problem. For example, if the login server is offline it means that you won't be able to log into the game. The character server and map servers are necessary for the actual gameplay past the point of logging in.\",\n\t'ServerStatusServerLabel' => 'Server',\n\t'ServerStatusLoginLabel'  => 'Login Server',\n\t'ServerStatusCharLabel'   => 'Character Server',\n\t'ServerStatusMapLabel'    => 'Map Server',\n\t'ServerStatusOnlineLabel' => 'Players Online',\n\t'ServerStatusPeakLabel'   => 'Player Peak',\n\n\t// Module: service\n\t// - service/tos\n\t'TermsTitle'              => 'Terms of Service',\n\t'TermsHeading'            => 'Terms of Service',\n\t'TermsInfo'               => 'Please read before creating an account!',\n\t'TermsInfo2'              => \"FOR CONTROL PANEL ADMINISTRATOR:  You may add your server's ToS in this view file directly.  The location of the view file is: %s\",\n\n\t// Module: unauthorized\n\t// - unauthorized/index\n\t'UnauthorizedTitle'       => 'Unauthorized',\n\t'UnauthorizedHeading'     => 'Unauthorized',\n\t'UnauthorizedInfo'        => 'You are unauthorized to view this page. <a href=\"%s\">Redirecting…</a>',\n\n\t// Module: woe\n\t// - woe/index\n\t'WoeTitle'                => 'WoE Hours',\n\t'WoeHeading'              => 'War of Emperium Hours',\n\t'WoeInfo'                 => \"Below are the WoE hours for %s.  These hours are subject to change at anytime, but let's hope not.\",\n\t'WoeServerTimeInfo'       => 'The current server time is:',\n\t'WoeServerLabel'          => 'Servers',\n\t'WoeTimesLabel'           => 'War of Emperium Times',\n\t'WoeNotScheduledInfo'     => 'There are no scheduled WoE hours.',\n\n\t// Module: contactform\n\t'CFTitleSubmit'\t\t\t=> 'Contact Us',\n\n\t// Module: News and Pages\n\t'CMSNewsHeader'\t\t\t=> 'Announcements',\n\t'CMSPageHeader'\t\t\t=> 'Content Management System',\n\t'CMSPageText'\t\t\t=> 'This module enables server admins and staff to create pages within their website with no prior flux/coding knowledge. The built-in news system can also be swapped out for an rss feed by modifying the application settings.',\n\t'CMSNewsTitleError'\t\t=> 'News title is required!',\n\t'CMSNewsBodyError'\t\t=> 'News body is required!',\n\t'CMSPageTitleError'\t\t=> 'Page Title is required!',\n\t'CMSPageBodyError'\t\t=> 'Page body is required!',\n\t'CMSPagePathError'\t\t=> 'Page path is required!',\n\t'CMSNewsAdded'\t\t\t=> 'News added to system',\n\t'CMSPagesAdded'\t\t\t=> 'Your new page has been added',\n\t'CMSNewsUpdated'\t\t=> 'News updated',\n\t'CMSPageUpdated'\t\t=> 'Your page has been updated',\n\t'CMSNewsAddTitle'\t\t=> 'Add a news item',\n\t'CMSPageAddTitle'\t\t=> 'Add a new page',\n\t'CMSNewsEditTitle'\t\t=> 'Edit news',\n\t'CMSPageEditTitle'\t\t=> 'Edit page',\n\t'CMSNewsNotFound'\t\t=> 'News not found!',\n\t'CMSPageNotFound'\t\t=> 'Page not found!',\n\t'CMSNewsDeleted'\t\t=> 'News deleted',\n\t'CMSPageDeleted'\t\t=> 'Your page has been deleted',\n\t'CMSNewsEmpty'\t\t\t=> 'No news articles have been found. Are you using the correct News Type? (CMSNewsType setting)',\n\t'CMSNewsRSSNotFound'\t=> 'RSS feed can\\'t be found. Make sure the CMSNewsRSS setting is correct, or switch CMSNewsType to 1 to use built-in news system!',\n\t'CMSPageEmpty'\t\t\t=> 'No page added',\n\t'CMSNewsLink'\t\t\t=> 'read more...',\n\t'CMSEdit'\t\t\t\t=> 'Edit',\n\t'CMSDelete'\t\t\t\t=> 'Delete',\n\t'CMSNewsTitleLabel'\t\t=> 'News Title',\n\t'CMSNewsBodyLabel'\t\t=> 'News Body',\n\t'CMSNewsLinkLabel'\t\t=> 'News Link',\n\t'CMSNewsAuthorLabel'\t=> 'News Author',\n\t'CMSPageTitleLabel'\t\t=> 'Page Title',\n\t'CMSPageBodyLabel'\t\t=> 'Page Body',\n\t'CMSPagePathLabel'\t\t=> 'Page Path',\n\t'CMSCreatedLabel'\t\t=> 'Date Created',\n\t'CMSModifiedLabel'\t\t=> 'Date Modified',\n\t'CMSActionLabel'\t\t=> 'Action',\n\t'CMSConfirmDeleteLabel'\t=> 'Are you sure you want to delete?',\n\t'CMSPageCreate'\t\t\t=> 'Create now?',\n\t'CMSOptionalLabel'\t\t=> '(Optional)',\n\t'CMSRequiredLabel'\t\t=> '(Required)',\n\t'CMSCreateLabel'\t\t=> 'Add News',\n\n\t// Module: vending\n\t'TLHeaderTasks'\t\t\t=> 'Tasks',\n\t'TLHeaderOwner'\t\t\t=> 'Owner',\n\t'TLHeaderPriority'\t\t=> 'Priority',\n\t'TLHeaderStatus'\t\t=> 'Status',\n\t'TLHeaderCreated'\t\t=> 'Created',\n\t'TLHeaderModified'\t\t=> 'Modified',\n\t'TLHeaderResources'\t\t=> 'Additional Resources',\n\t'TLHeaderBody'\t\t\t=> 'Body',\n\n\t// Module: servicedesk\n\t'SDHeader'\t\t\t\t=> 'Service Desk',\n\t'SDCreateNew'\t\t\t=> 'Create a new ticket',\n\t'SDWelcomeText'\t\t\t=> 'Welcome to the Service Desk',\n\t'SDNoTickets'\t\t\t=> 'You have not created any tickets.',\n\t'SDNoBlankResponse'\t\t=> 'For a response to register, you must type something into the box!',\n\t'SDNoCatsAvailable'\t\t=> 'No Categories Available',\n\t'SDNoOpenTickets'\t\t=> 'There are no Open tickets in the database.',\n\t'SDNoInactiveTickets'\t=> 'You have no in-active tickets at the moment.',\n\t'SDNoClosedTickets'\t\t=> 'There are no Closed tickets in the database.',\n\t'SDNoCats'\t\t\t\t=> 'There are no categories within the database.',\n\t'SDHuh'\t\t\t\t\t=> 'You should not be here o.O',\n\t'SDPointerChatLog'\t\t=> 'We recommend pasting to <a href=\"http://pastebin.com\" target=\"_blank\">pastebin.com</a> then putting the link in here.',\n\t'SDPointerScreenShot'\t=> 'Provide image links as evidence',\n\t'SDPointerVideoLink'\t=> 'We recommend uploading to youtube then putting the link in here.',\n\t'SDHeaderID'\t\t\t=> 'Ticket #',\n\t'SDHeaderSubject'\t\t=> 'Subject',\n\t'SDHeaderCategory'\t\t=> 'Category',\n\t'SDHeaderStatus'\t\t=> 'Current Status',\n\t'SDHeaderLastAuthor'\t=> 'Last Author',\n\t'SDHeaderTimestamp'\t\t=> 'Created',\n\t'SDHeaderAccount'\t\t=> 'Account',\n\t'SDHeaderTeam'\t\t\t=> 'Team',\n\t'SDH3ActiveTickets'\t\t=> 'Active Tickets',\n\t'SDH3InActiveTickets'\t=> 'In-Active Tickets',\n\t'SDH3ClosedTickets'\t\t=> 'Closed Tickets',\n\t'SDH3CurrentCat'\t\t=> 'Current Categories',\n\t'SDH3CreateCat'\t\t\t=> 'Create New Category',\n\t'SDH3StaffList'\t\t\t=> 'Current Staff Settings',\n\t'SDH3StaffCreate'\t\t=> 'Add Staff Settings',\n\t'SDReOpenPlayer'\t\t=> 'Ticket Re-Opened by player',\n\t'SDReOpenStaff'\t\t\t=> '',\n\t'SDRespTable1'\t\t\t=> 'Respond and Return to Ticket',\n\t'SDRespTable2'\t\t\t=> 'Respond and Return to List',\n\t'SDRespTable3'\t\t\t=> 'Respond and Resolve Ticket',\n\t'SDRespTable4'\t\t\t=> 'Respond and Escalate',\n\t'SDRespTable5'\t\t\t=> 'Close Ticket',\n\t'SDRespTable6'\t\t\t=> 'Respond and Re-Open Ticket',\n\t'SDRespTable7'\t\t\t=> 'Resolve Ticket and Credit Account',\n\t'SDGroup1'\t\t\t\t=> 'Support Staff',\n\t'SDGroup2'\t\t\t\t=> 'Head of Support',\n\t'SDGroup3'\t\t\t\t=> 'Administration',\n\t'SDLinkOpenNew'\t\t\t=> 'Open a new ticket',\n\n\t// Module: webcommands\n\t'WCTitleLabel'\t\t\t=> 'Web Commands',\n\n);\n?>\n"
  },
  {
    "path": "lang/es_es.php",
    "content": "<?php\n// Translation by: jaBote\n// Revised by: -\n// Translator Notes:\n// This is a Spanish/Spain translation. However, my efforts were towards the most neutral\n// translation I've been able to achieve.\n// In case of dispute or suggestions about this translation, please contact me (jaBote in Hercules\n// forums), you can use Spanish if you want.\n// Also, please avoid disrespectful destructive criticism towards this translation. I've used a\n// translation criteria that should fit most Spanish-speaking servers. Expect translations of some\n// RO slang to Spanish when possible but don't expect any forced overzealous mindless translations\n// where it simply won't fit. Arbitrary? Maybe. Results? Better than mindlessly translating everything.\n// Example: storage -> almacén ? No! That'd require scripts to be translated for that!\n// Example: ban -> expulsión -> bloqueo ? Yes! No scripts to be translated and it's widely understood!\n//          ip ban -> IP con acceso prohibido ?\n\nreturn array(\n\t// Generic/Misc.\n\t'Language'                => 'Spanish',\n\t'YesLabel'                => 'Sí',\n\t'NoLabel'                 => 'No',\n\t'NoteLabel'               => 'Nota',\n\t'GenderTypeMale'          => 'Hombre',\n\t'GenderTypeFemale'        => 'Mujer',\n\t'GenderTypeServer'        => 'Servidor',\n\t'RefreshSecurityCode'     => 'Actualizar Código de Seguridad',\n\t'NoneLabel'               => 'Ninguno',\n\t'NeverLabel'              => 'Nunca',\n\t'NotApplicableLabel'      => 'No Aplicable',\n\t'UnknownLabel'            => 'Desconocido',\n\t'IsEqualToLabel'          => 'es igual que',\n\t'IsGreaterThanLabel'      => 'es mayor que',\n\t'IsLessThanLabel'         => 'es menor que',\n\t'AllLabel'                => 'Todo',\n\t'SearchLabel'             => 'Buscar…',\n\t'GoBackLabel'             => 'Volver a la página anterior…',\n\t'SearchButton'            => 'Buscar',\n\t'ResetButton'             => 'Reiniciar',\n\t'FilterButton'            => 'Filtrar',\n\t'NotAcceptingDonations'   => \"En estos momentos no aceptamos donacioes. Disculpa las molestias.\",\n\t//'NotAcceptingDonations'   => \"We're sorry, but our donation system is currently undergoing maintenance, please try again later.\",\n\t'FoundSearchResults'      => 'Se han encontrado un total de %d registro(s) en %d página(s).  Mostrando el/los resultado(s) %d-%d.',\n\t'LoginToDonate'           => 'Por favor, inicia sesión para hacer donaciones.',\n\t'UnknownCharacter'        => 'No se ha encontrado el personaje.',\n\t'AccountIdLabel'          => 'ID de Cuenta',\n\t'AccountGroupIDLabel'     => 'ID de Grupo',\n\t'AccountStateLabel'       => 'Estado de la Cuenta',\n\t'CreditBalanceLabel'      => 'Balance de Crédito',\n\t'UsernameLabel'           => 'Nombre de Usuario',\n\t'PasswordLabel'           => 'Contraseña',\n\t'EmailAddressLabel'       => 'Correo Electrónico',\n\t'GenderLabel'             => 'Sexo',\n\t'LoginCountLabel'         => 'Número de Conexiones',\n\t'LastLoginDateLabel'      => 'Fecha de la Última Conexión',\n\t'LastUsedIpLabel'         => 'Última IP Usada',\n\t'AccountStateNormal'      => 'Normal',\n\t'AccountStatePending'     => 'Pendiente',\n\t'AccountStatePermBanned'  => 'Bloqueado Permanentemente',\n\t'AccountStateTempBanLbl'  => 'Bloqueado Temporalmente',\n\t'AccountStateTempBanned'  => 'Bloqueado Temp. (hasta: %s)',\n\t'OnlineLabel'             => 'Conectado',\n\t'OfflineLabel'            => 'Desconectado',\n\t'ItemIdLabel'             => 'ID del Objeto',\n\t'ItemNameLabel'           => 'Nombre del Objeto',\n\t'ItemAmountLabel'         => 'Cantidad',\n\t'ItemIdentifyLabel'       => 'Identificado',\n\t'ItemRefineLabel'         => 'Refinado',\n\t'ItemBrokenLabel'         => 'Roto',\n\t'ItemCard0Label'          => 'Carta 1',\n\t'ItemCard1Label'          => 'Carta 2',\n\t'ItemCard2Label'          => 'Carta 3',\n\t'ItemCard3Label'          => 'Carta 4',\n\n    //SIDEBAR\n    //FluxCP Menu Items\n    //Categories\n    'MainMenuLabel'           => 'Menú Principal',\n    'ForumLabel'              => 'Forum',\n    'AccountLabel'            => 'Cuenta',\n    'CharacterLabel'          => 'Personaje',\n    'ServiceDeskLabel'        => 'Service Desk',\n    'CPLogsLabel'             => 'CP Logs',\n    'FluxAdminLabel'          => 'Flux Admin',\n    'PagesLabel'              => 'Pages',\n    'IPBanListLabel'          => 'IP Ban List',\n    'GuildsLabel'             => 'Guilds',\n    'rALogsLabel'             => 'rA Logs',\n    'SendMailLabel'           => 'Send Mail',\n    'ReInstallLabel'          => 'Re-Install',\n    'TaskListLabel'           => 'Task List',\n    'DonationsLabel'          => 'Donaciones',\n    'InformationLabel'        => 'Informaciones',\n    'DatabaseLabel'           => 'Base de datos',\n    'SocialLabel'             => 'Social',\n\n    //SubMenus\n    'HomeLabel'               => 'Inicio',\n    'NewsLabel'               => 'Noticias',\n    'DownloadsLabel'          => 'Descargas',\n    'RulesLabel'              => 'Reglas',\n    'ContactUsLabel'          => 'Contáctanos',\n    'MyAccountLabel'            => 'Mi Cuenta',\n    'HistoryLabel'            => 'Historial',\n    'ServiceDeskLabel'            => 'Centro de Soporte',\n    'PurchaseLabel'            => 'Canjear',\n    'DonateLabel'            => 'Donar',\n    'ServerInfoLabel'            => 'Info. del Servidor',\n    'ServerStatusLabel'            => 'Estado del Servidor',\n    'WoeHoursLabel'            => 'Horarios WOE',\n    'CastlesLabel'            => 'Castillos',\n    'WhosOnlineLabel'            => 'Jugadores Conectados',\n    'MapStaticsLabel'            => 'Estadísticas de Mapas',\n    'RankingInfoLabel'            => 'Ranking',\n    'VendingInfoLabel'            => 'Vending',\n    'ItemDatabaseLabel'            => 'Item DB',\n    'MobDatabaseLabel'            => 'Mob DB',\n    'JoinUsInFacebookLabel'            => '¡Encuéntranos en Facebook!',\n    'RateUsOnRMSLabel'            => '¡Califícanos en RMS!',\n\n\t// Security\n\t'SecuritySessionInvalid'  => 'Lo sentimos, pero tu tiempo de sesión ha expirado. Inténtalo de nuevo.',\n\t'SecurityNeedSession'     => 'Lo sentimos, pero no se ha encontrado la sesión del formulario (¿intento de hack?)',\n\t'SecurityNeedToken'       => 'Lo sentimos, pero no se ha encontrado la identificación del formulario (¿intento de hack?)',\n\n\t// Module: account\n\t// - account/changemail\n\t'EmailChangeTitle'        => 'Cambiar Correo Electrónico',\n\t'EnterEmailAddress'       => 'Introduce una dirección de correo electrónico.',\n\t'EmailCannotBeSame'       => 'Tu nuevo correo electrónico no puede ser el mismo que el actual.',\n\t'EmailInvalid'            => 'Dirección de correo electrónico no válida.',\n\t'EmailAlreadyRegistered'  => \"El correo electrónico especificado ya pertenece a otra cuenta.\",\n\t'EmailChangeSent'         => 'Se ha enviado un correo electrónico a la nueva dirección, con un enlace para confirmar el cambio.',\n\t'EmailAddressChanged'     => '¡Se ha cambiado tu dirección de correo electrónico!',\n\t'EmailChangeFailed'       => 'No se pudo cambiar la dirección de correo electrónico. Inténtalo de nuevo más tarde.',\n\t'EmailChangeHeading'      => 'Cambiar correo electrónico',\n\t'EmailChangeInfo'         => 'Si quieres cambiar la dirección de correo electrónico registrada en tu cuenta, debes rellenar el formulario de abajo.',\n\t'EmailChangeInfo2'        => 'Tras enviar el formulario, se requerirá que confirmes tu nuevo correo electrónico (se enviará un correo electrónico a la nueva dirección con un enlace).',\n\t'EmailChangeLabel'        => 'Dirección de Correo Electrónico nueva',\n\t'EmailChangeInputNote'    => '¡Debe ser una dirección de correo electrónico correcta!!',\n\t'EmailChangeButton'       => 'Cambiar Dirección de Correo Electrónico',\n\t// - account/changepass\n\t'PasswordChangeTitle'     => 'Cambiar Contraseña',\n\t'NeedCurrentPassword'     => 'Introduce tu contraseña actual.',\n\t'NeedNewPassword'         => 'Introduce tu nueva contraseña.',\n\t'OldPasswordInvalid'      => \"La contraseña introducida no coincide con la que tenemos guardada.\",\n\t'ConfirmNewPassword'      => 'Confirma tu nueva contraseña.',\n\t'NewPasswordHasUsername'  => 'Tu nueva contraseña no debe contener tu nombre de usuario.',\n\t'NewPasswordInvalid'      => 'Tu nueva contraseña contiene caracteres no válidos.',\n\t'NewPasswordSameAsOld'    => 'La nueva contraseña no puede ser la misma que tu contraseña actual.',\n\t'NewPasswordNeedUpper'    => 'Tu nueva contraseña debe tener al menos %d letra(s) mayúscula(s).',\n\t'NewPasswordNeedLower'    => 'Tu nueva contraseña debe tener al menos %d letra(s) minúscula(s).',\n\t'NewPasswordNeedNumber'   => 'Tu nueva contraseña debe tener al menos %d número(s).',\n\t'NewPasswordNeedSymbol'   => 'Tu nueva contraseña debe tener al menos %d símbolo(s).',\n\t'PasswordHasBeenChanged'  => 'Se ha cambiado tu contraseña. Por favor, identifícate de nuevo.',\n\t'FailedToChangePassword'  => 'No se pudo cambiar tu contraseña. Por favor, contacta con un administrador.',\n\t'PasswordChangeHeading'   => 'Cambiar Contraseña',\n\t'PasswordChangeInfo'      => 'Por favor, introduce tu contraseña actual, después la nueva contraseña que desees usar y vuélvela a introducir para confirmarla.',\n\t'CurrentPasswordLabel'    => 'Contraseña Actual',\n\t'NewPasswordLabel'        => 'Nueva Contraseña',\n\t'NewPasswordConfirmLabel' => 'Vuelve a introducir la Nueva Contraseña',\n\t'PasswordChangeNote'      => 'Asegúrate de introducir información correcta.',\n\t'PasswordChangeNote2'     => 'Tras cambiar tu contraseña, serás deslogueado.',\n\t'PasswordChangeButton'    => 'Cambiar Contraseña',\n\t// - account/changesex\n\t'GenderChangeTitle'       => 'Cambiar Sexo',\n\t'GenderChangeBadChars'    => 'No puedes cambiar de sexo si alguno de tus personajes es: %s',\n\t'GenderChanged'           => 'Se ha cambiado tu sexo. Además, se han descontado %d crédito(s) de tu cuenta.',\n\t'GenderChangedForFree'    => 'Se ha cambiado tu sexo.',\n\t'GenderChangeHeading'     => 'Cambiar Sexo',\n\t'GenderChangeCost'        => 'Los cambios de sexo cuestan %s crédito(s).',\n\t'GenderChangeBalance'     => 'Tu balance actual es de %s crédito(s).',\n\t'GenderChangeNoFunds'     => 'No tienes suficientes créditos para cambiar de sexo en estos momentos.',\n\t'GenderChangeNoCost'      => 'Los cambios de sexo son gratis para ti.',\n\t'GenderChangeCharInfo'    => 'No puedes cambiar de sexo si alguno de tus personajes es: %s',\n\t'GenderChangeSubHeading'  => '¡Asegúrate de que realmente quieres cambiar de sexo!',\n\t'GenderChangeFormText'    => '¿Quieres cambiar tu sexo a %s?',\n\t'GenderChangeConfirm'     => '¿Estás totalmente seguro de que quieres cambiar de sexo?',\n\t'GenderChangeButton'      => 'Sí, seguro.',\n\t// - account/confirm\n\t'AccountConfirmTitle'     => 'Confirma la Cuenta',\n\t'AccountConfirmUnban'     => 'Se ha confirmado y activado la cuenta.',\n\t'AccountConfirmMessage'   => 'Tu cuenta ha sido confirmada y activada. Ya puedes iniciar sesión.',\n\t// - account/confirmemail\n\t'EmailConfirmTitle'       => 'Confirmar Correo Electrónico',\n\t'EmailConfirmFailed'      => 'Ha habido un problema técnico al cambiar tu dirección de correo electrónico. Por favor, contacta con un administrador.',\n\t'EmailConfirmChanged'     => '¡Se ha cambiado tu dirección de correo electrónico!',\n\t// - account/create\n\t'AccountCreateTitle'      => 'Crear Cuenta',\n\t'AccountConfirmBan'       => 'Esperando activación de la cuenta: %s',\n\t'AccountCreateEmailSent'  => 'Se ha enviado un correo electrónico con detalles para la activación de tu cuenta. Por favor, comprueba tu correo electrónico y activa tu cuenta para iniciar sesión.',\n\t'AccountCreateFailed'     => 'Se ha creado tu cuenta, pero no hemos podido enviarte un correo electrónico debido a problemas técnicos. Por favor, contacta con algún miembro del equipo del servidor y pide ayuda.',\n\t'AccountCreated'          => 'Enhorabuena, te has registrado con éxito y logueado automáticamente.',\n\t'AccountCreateHeading'    => 'Registrarse',\n\t'AccountCreateTerms'      => 'Términos del Servicio',\n\t'AccountCreateInfo'       => 'Por favor, lee nuestros %s antes de registrar una cuenta para asegurarte de entender las normas respecto a tener una cuenta en nuestro servidor privado de Ragnarok Online.',\n\t'AccountCreateInfo2'      => 'Al hacer click en \"Crear Cuenta\", estarás de acuerdo en aceptar nuestros %s.',\n\t'AccountCreateGenderInfo' => \"¡El sexo que escojas aquí afectará al sexo de tus personajes en el juego!\",\n\t'AccountServerLabel'      => 'Servidor',\n\t'AccountUsernameLabel'    => 'Tu Nombre de Usuario',\n\t'AccountPasswordLabel'    => 'Tu Contraseña',\n\t'AccountPassConfirmLabel' => 'Confirmar Contraseña',\n\t'AccountEmailLabel'       => 'Dirección de Correo Electrónico',\n    'AccountEmailLabel2'       => 'Confirmar dirección de E-mail',\n\t'AccountGenderLabel'      => 'Sexo',\n\t'AccountBirthdateLabel'   => 'Fecha de Cumpleaños',\n\t'AccountSecurityLabel'    => 'Código de Seguridad',\n\t'AccountCreateButton'     => 'Crear Cuenta',\n\t'AccountInvalidChars'     => \"El nombre de usuario solo puede contener los siguientes caracteres: '%s'\",\n    'AccountRecaptchaKey'     => 'Necesitas claves de Recaptcha, ver más en config/applications.php (ReCaptchaPublicKey/ReCaptchaPrivateKey)',\n\t'InvalidLoginServer'      => 'Has seleccionado un login server no válido. Inténtalo de nuevo seleccionando un servidor válido.',\n\t'InvalidLoginCredentials' => 'Las credenciales introducidas no son válidas. Asegúrate de haber escrito la información correcta e inténtalo de nuevo.',\n\t'UnexpectedLoginError'    => 'Ha ocurrido un fallo inesperado. Inténtalo de nuevo o contacta con un administrador.',\n\t'CriticalLoginError'      => 'Ha ocurrido algo malo. Contacta con un administrador cuanto antes.',\n\t'UsernameAlreadyTaken'    => \"El nombre de usuario que has escogido ya ha sido tomado por otro usuario.\",\n\t'UsernameTooShort'        => sprintf('Tu nombre de usuario debe tener entre %d y %d caracteres.', Flux::config('MinUsernameLength'), Flux::config('MaxUsernameLength')),\n\t'UsernameTooLong'         => sprintf('Tu nombre de usuario debe tener entre %d y %d caracteres.', Flux::config('MinUsernameLength'), Flux::config('MaxUsernameLength')),\n\t'PasswordContainsUser'    => 'Tu contraseña no puede contener tu nombre de usuario.',\n\t'PasswordHasUsername'     => 'Tu contraseña no puede contener tu nombre de usuario.',\n\t'PasswordTooShort'        => 'Tu contraseña debe tener entre %d y %d caracteres.',\n\t'PasswordTooLong'         => 'Tu contraseña debe tener entre %d y %d caracteres.',\n\t'PasswordsDoNotMatch'     => \"Las contraseñas no coinciden. Asegúrate de haberlas escrito correctamente.\",\n\t'PasswordNeedUpper'       => 'Tu contraseña debe contener al menos %d letra(s) mayúscula(s).',\n\t'PasswordNeedLower'       => 'Tu contraseña debe contener al menos %d letra(s) minúscula(s).',\n\t'PasswordNeedNumber'      => 'Tu contraseña debe contener al menos %d número(s).',\n\t'PasswordNeedSymbol'      => 'Tu contraseña debe contener al menos %d símbolo(s).',\n\t'EmailAddressInUse'       => \"La dirección de correo electrónico que has introducido ya está registrada por otra cuenta. Utiliza otra dirección de correo electrónico.\",\n\t'InvalidEmailAddress'     => \"La dirección de correo electrónico que has introducido no tiene un formato válido.\",\n    'InvalidEmailconf'        => \"Las direcciones de E-mail no coinciden.\",\n\t'InvalidGender'           => 'El sexo de la cuenta debe ser \"M\" o \"F\"',\n\t'InvalidServer'           => \"El servidor que has seleccionado no existe.\",\n\t'InvalidSecurityCode'     => 'Por favor, introduce correctamente el código de seguridad.',\n\t'InvalidPassword'         => 'Tu contraseña contiene caracteres no válidos.',\n\t'InvalidBirthdate'        => 'Has introducido una fecha de cumpleaños no válida.',\n\t'CriticalRegisterError'   => 'Ha ocurrido algo malo. Contacta con un administrador cuanto antes.',\n\t// - account/edit\n\t'AccountEditTitle'        => 'Modifcar Cuenta',\n\t'AccountEditTitle2'       => 'Modificando Mi Cuenta',\n\t'AccountEditTitle3'       => 'Modificando Cuenta (%s)',\n\t'CannotModifyOwnGroupID'  => 'No puedes modificar el ID de grupo de tu cuenta.',\n\t'CannotModifyAnyGroupID'  => 'No puedes modificar ID de grupo de las cuentas.',\n\t'CannotModifyGroupIDHigh' => 'No puedes asignar a otra cuenta una ID de grupo mayor que el que tienes.',\n\t'InvalidGroupID'          => 'ID de grupo no válido.',\n\t'CannotModifyBalance'     => 'No puedes modificar los balances de las cuentas.',\n\t'InvalidLastLoginDate'    => 'La última fecha de conexión no es válida.',\n\t'AccountModified'         => 'Se ha modificado la cuenta.',\n\t'AccountEditHeading'      => 'Modificar Cuenta',\n\t'AccountEditButton'       => 'Modificar Cuenta',\n\t'AccountEditNotFound'     => 'No se ha encontrado la cuenta.',\n\t// - account/index\n\t'AccountIndexTitle'       => 'Lista de Cuentas',\n\t'AccountIndexHeading'     => 'Cuentas',\n\t'LoginBetweenLabel'       => 'Con Actividad Entre',\n\t'BirthdateBetweenLabel'   => 'Fecha de Nacimiento Entre',\n\t'AccountIndexNotFound'    => 'No se ha encontrado la cuenta.',\n\t// - account/login\n\t'LoginTitle'              => 'Iniciar Sesión',\n\t'LoginHeading'            => 'Iniciar Sesión',\n\t'LoginButton'             => 'Acceder',\n\t'LoginPageMakeAccount'    => '¿Aún no tienes una cuenta? <a href=\"%s\">¡Hazte una!</a>',\n\t'TemporarilyBanned'       => 'Tu cuenta se encuentra bloqueada temporalmente.',\n\t'PermanentlyBanned'       => 'Tu cuenta se encuentra bloqueada permanentemente.',\n\t'IpBanned'                => 'La dirección IP desde la que te encuentras tiene el acceso prohibido.',\n\t'PendingConfirmation'     => 'Tu cuenta está aún no ha sido activada por correo electrónico.',\n\t// - account/logout\n\t'LogoutTitle'             => 'Cerrar Sesión',\n\t'LogoutHeading'           => 'Cerrar Sesión',\n\t'LogoutInfo'              => 'Has cerrado tu sesión.',\n\t'LogoutInfo2'             => 'Por favor, espera un momento mientras te <a href=\"%s\">redireccionamos</a>…',\n\t// - account/resend\n\t'ResendTitle'             => 'Volver a Enviar Correo Electrónico de Confirmación',\n\t'ResendEnterUsername'     => 'Introduce el nombre de usuario de tu cuenta.',\n\t'ResendEnterEmail'        => 'Introduce tu dirección de correo electrónico.',\n\t'ResendFailed'            => 'No se pudo volver a enviar el código de confirmación.',\n\t'ResendEmailSent'         => 'Se ha vuelto a enviar tu código de confirmación. Por favor, comprueba tu correo electrónico para proceder con la activación de tu cuenta.',\n\t'ResendHeading'           => 'Volver a Enviar Correo Electrónico de Confirmación',\n\t'ResendInfo'              => 'Introduce el nombre de cuenta y la dirección de correo electrónico que has usado durante el registro para poder volver a enviar un correo electrónico de confirmación.',\n\t'ResendServerLabel'       => 'Servidor del Registro',\n\t'ResendAccountLabel'      => 'Nombre de Usuario de la Cuenta',\n\t'ResendEmailLabel'        => 'Dirección de Correo Electrónico',\n\t'ResendServerInfo'        => 'Se trata del servidor en el que has registrado la cuenta.',\n\t'ResendAccountInfo'       => 'Se trata del nombre de cuenta que has registrado.',\n\t'ResendEmailInfo'         => 'Se trata de la dirección de correo electrónico que usaste cuando registraste la cuenta del campo anterior.',\n\t'ResendButton'            => 'Volver a Enviar Correo Electrónico de Confirmación',\n\t// - account/resetpass\n\t'ResetPassTitle'          => 'Recuperar Contraseña',\n\t'ResetPassEnterAccount'   => 'Introduce el nombre de usuario de tu cuenta.',\n\t'ResetPassEnterEmail'     => 'Introduce tu dirección de correo electrónico.',\n\t'ResetPassDisallowed'     => 'No se puede hacer uso de la recuperación de contraseña para esta cuenta.',\n\t'ResetPassFailed'         => 'No se pudo enviar el correo electrónico para recuperar tu contraseña.',\n\t'ResetPassEmailSent'      => 'Se ha enviado un correo electrónico con detalles para recuperar tu contraseña.',\n\t'ResetPassTitle'          => 'Recuperar Contraseña',\n\t'ResetPassInfo'           => 'Si has perdido tu contraseña, puedes recuperarla introduciendo la dirección de correo electrónico que utilizaste para registrar tu cuenta.',\n\t'ResetPassInfo2'          => 'Entonces, se enviará un correo electrónico a la dirección especificada con un enlace que te permitirá recuperar tu contraseña, por lo que se requiere una dirección de correo electrónico válida.',\n\t'ResetPassServerLabel'    => 'Servidor del Registro',\n\t'ResetPassAccountLabel'   => 'Nombre de Usuario de la Cuenta',\n\t'ResetPassEmailLabel'     => 'Dirección de Correo Electrónico',\n\t'ResetPassServerInfo'     => 'Se trata del servidor en el que has registrado la cuenta.',\n\t'ResetPassAccountInfo'    => 'Se trata del nombre de cuenta que has registrado.',\n\t'ResetPassEmailInfo'      => 'Se trata de la dirección de correo electrónico que usaste cuando registraste la cuenta del campo anterior.',\n\t'ResetPassButton'         => 'Enviar Correo Electrónico de Recuperación de Contraseña',\n\t// - account/resetpw\n\t'ResetPwTitle'            => 'Recuperar Contraseña',\n\t'ResetPwFailed'           => 'No se pudo recuperar la contraseña. Inténtalo de nuevo más tarde.',\n\t'ResetPwDone'             => 'Se ha cambiado tu contraseña y se te ha enviado un correo electrónico con tu nueva contraseña.',\n\t'ResetPwDone2'            => 'Se ha cambiado tu contraseña, pero no hemos podido enviar el correo electrónico que contiene tu nueva contraseña. Por favor, repite el proceso de recuperar tu contraseña para resolver este problema.',\n\t// - account/transfer\n\t'TransferTitle'           => 'Transferir Créditos de Donación',\n\t'TransferGreaterThanOne'  => 'Solo puedes transferir créditos en cantidades mayores que 1.',\n\t'TransferEnterCharName'   => 'Debes introducir el nombre del personaje que recibirá los créditos.',\n\t'TransferNoCharExists'    => \"El personaje '%s' no existe. Asegúrate de haberlo escrito correctamente.\",\n\t'TransferNoBalance'       => 'No tienes suficiente saldo para realizar la transferencia.',\n\t'TransferUnexpectedError' => 'Ha ocurrido un error inesperado.',\n\t'TransferSuccessful'      => '¡Se han transferido los créditos!',\n\t'TransferHeading'         => 'Transferir Créditos de Donación',\n\t'TransferSubHeading'      => 'Se transferirán los créditos a un personaje del servidor %s.',\n\t'TransferInfo'            => 'Tienes %s crédito(s) en estos instantes.',\n\t'TransferInfo2'           => 'Introduce la cantidad de créditos que te gustaría transferir y el nombre de un personaje que pertenezca a la cuenta a la que quieras transferir tus créditos.',\n\t'TransferAmountLabel'     => 'Cantidad de Créditos',\n\t'TransferCharNameLabel'   => 'Nombre de Personaje',\n\t'TransferAmountInfo'      => 'Se trata de la cantidad de créditos que deseas transferir.',\n\t'TransferCharNameInfo'    => 'Se trata del nombre del personaje que recibirá los créditos enviados.',\n\t'TransferConfirm'         => '¿Estás seguro de que quieres hacer la transferencia?',\n\t'TransferButton'          => 'Sí, transferir',\n\t'TransferNoCredits'       => 'No tienes créditos disponibles en tu cuenta.',\n\t// - account/view\n\t// * account/view submenus\n\t'ModifyAccountLink'       => 'Modificar Cuenta',\n\t'AccountViewTitle'        => 'Ver Cuenta',\n\t'AccountViewTitle2'       => 'Viendo Cuenta (%s)',\n\t'AccountViewTitle3'       => 'Viendo Mi Cuenta',\n\t'AccountTempBanFailed'    => 'No se pudo bloquear temporalmente la cuenta.',\n\t'AccountPermBanFailed'    => 'No se pudo bloquear permanentemente la cuenta.',\n\t'AccountTempBanUnauth'    => 'No estás autorizado para bloquear temporalmente a esta cuenta.',\n\t'AccountPermBanUnauth'    => 'No estás autorizado para bloquear permanentemente a esta cuenta.',\n\t'AccountLiftTempBan'      => 'Se ha desbloqueado el accedo de la cuenta.',\n\t'AccountLiftPermBan'      => 'Se ha desbloqueado el acceso de la cuenta.',\n\t'AccountLiftBanUnauth'    => \"No estás autorizado para desbloquear el acceso de esta cuenta.\",\n\t'AccountViewHeading'      => 'Viendo Cuenta',\n\t'AccountViewDonateLink'   => '(¡Donar!)',\n\t'AccountViewTempBanLabel' => 'Bloquear Temporalmente',\n\t'AccountViewPermBanLabel' => 'Bloquear Permanentemente',\n\t'AccountViewUnbanLabel'   => 'Desbloquear acceso',\n\t'AccountBanReasonLabel'   => 'Razón:',\n\t'AccountBanUntilLabel'    => 'Bloquear Hasta:',\n\t'AccountTempBanButton'    => 'Bloquear Cuenta',\n\t'AccountPermBanButton'    => 'Bloquear Cuenta Permanentemente',\n\t'AccountTempUnbanButton'  => 'Deshacer Bloqueo Temporal',\n\t'AccountPermUnbanButton'  => 'Deshacer Bloqueo Permanente',\n\t'AccountBanConfirm'       => '¿Estás seguro?',\n\t'AccountBanLogSubHeading' => 'Registro de bloqueos de %s (más recientes primero)',\n\t'BanLogBanTypeLabel'      => 'Tipo de Bloqueo',\n\t'BanLogBanDateLabel'      => 'Fecha de Bloqueo',\n\t'BanLogBanReasonLabel'    => 'Razón del Bloqueo',\n\t'BanLogBannedByLabel'     => 'Bloqueado Por',\n\t'BanLogBannedByCP'        => 'Panel de Control',\n\t'BanTypeUnbanned'         => 'Sin Bloqueo',\n\t'BanTypePermBanned'       => 'Bloqueado Permanentemente',\n\t'BanTypeTempBanned'       => 'Bloqueado Temporalmente',\n\t'AccountViewCharSubHead'  => 'Personajes en %s',\n\t'AccountViewSlotLabel'    => 'Slot',\n\t'AccountViewCharLabel'    => 'Nombre de Personaje',\n\t'AccountViewClassLabel'   => 'Clase',\n\t'AccountViewLvlLabel'     => 'Nivel Base',\n\t'AccountViewJlvlLabel'    => 'Nivel Job',\n\t'AccountViewZenyLabel'    => 'Zeny',\n\t'AccountViewGuildLabel'   => 'Guild',\n\t'AccountViewStatusLabel'  => 'Estado',\n\t'AccountViewPrefsLabel'   => 'Preferencias',\n\t'CharModifyPrefsLink'     => 'Modificar Preferencias',\n\t'AccountViewNoChars'      => 'Esta cuenta no tiene personajes en %s.',\n\t'AccountViewStorage'      => 'Objetos en el Storage de %s',\n\t'AccountViewStorageCount' => '%s tiene %s objeto(s) en su Storage.',\n\t'AccountViewNoStorage'    => 'No hay objetos en el Storage de esta cuenta.',\n\t'AccountViewNotFound'     => \"La cuenta que estás intentando ver no existe.\",\n\t// - account/xferlog\n\t'XferLogTitle'            => 'Historial de Transferencia de Crédito',\n\t'XferLogHeading'          => 'Historial de Transferencia de Crédito',\n\t'XferLogReceivedSubHead'  => 'Transferencias: Recibidas',\n\t'XferLogSentSubHead'      => 'Transferencias: Enviadas',\n\t'XferLogCreditsLabel'     => 'Créditos',\n\t'XferLogFromLabel'        => 'Correo Electrónico Remitente',\n\t'XferLogDateLabel'        => 'Fecha de Transferencia',\n\t'XferLogCharNameLabel'    => 'Para el Personaje',\n\t'XferLogNotReceived'      => 'No has recibido ninguna transferencia de crédito.',\n\t'XferLogNotSent'          => 'No has hecho ninguna transferencia de crédito.',\n\n\t// Module: character\n\t// - character/changeslot\n\t// - character/index\n\t// - character/mapstats\n\t// - character/online\n\t// - character/prefs\n\t// - character/resetlook\n\t'CantResetLookWhenOnline' => 'No se puede restaurar la apariencia de %s mientras está conectado.',\n\t'ResetLookSuccessful'     => \"¡Se ha restaurado la apariencia de %s!\",\n\t'ResetLookFailed'         => \"No se pudo restaurar la apariencia de %s.\",\n\t// - character/resetpos\n\t'CantResetPosWhenOnline'  => 'No se puede restaurar la posición de %s mientras está conectado.',\n\t'CantResetFromCurrentMap' => \"No puedes restaurar la posición de %s en su mapa actual.\",\n\t'ResetPositionSuccessful' => \"¡Se ha restaurado la posición de %s!\",\n\t'ResetPositionFailed'     => \"No se pudo restaurar la posición de %s.\",\n\t// - character/view\n\t// - character/divorce\n\t'DivorceTitle'            => 'Divorciar',\n\t'DivorceHeading'          => 'Divorciar',\n\t'DivorceNotMarried'       => '%s no se encuentra casado.',\n\t'DivorceInvalidPartner'   => 'El ID del cónyuge no es válido.',\n\t'DivorceInvalidChild'     => 'El ID del hijo(a) no es válido.',\n\t'DivorceMustBeOffline'    => 'Tanto %s como el cónyuge deben estar desconectados.',\n\t'DivorceMustBeOffline2'   => '%s, su cónyuge y su hijo deben estar desconectados.',\n\t'DivorceText1'            => \"¿Estás seguro de que deseas el divorcio entre %s y su cónyuge?\",\n\t'DivorceText2'            => 'Si %s tiene un hijo, éste se volverá huérfano.',\n\t'DivorceText3'            => 'Además, sus Anillos de matrimonio serán eliminados.',\n\t'DivorceButton'           => 'Sí, hazlo por favor.',\n\t'DivorceSuccessful'       => '¡Se ha divorciado a %s!',\n\n\t// Module: cplog\n\t// - cplog/index.php\n\t// - cplog/login.php\n\t// - cplog/paypal.php\n\t// - cplog/resetpass.php\n\t// - cplog/txnview.php\n\n\t// Module: donate\n\t// - donate/complete\n\t// - donate/history\n\t// - donate/index\n\t// - donate/trusted\n\n\t// Module: errors\n\t// - errors/missing_action\n\t'MissingActionTitle'      => 'Acción Faltante', // Nociones de Programación Orientada a Objetos: Acción = \"Página\"\n\t'MissingActionHeading'    => 'Acción Faltante!', // Una acción es un conjunto de Vistas, cada elemento de la acción\n\t'MissingActionModLabel'   => 'Módulo:',\n\t'MissingActionActLabel'   => 'Acción:',\n\t'MissingActionReqLabel'   => 'URI de petición:',\n\t'MissingActionLocLabel'   => 'Localización en el sistema de archivos:',\n\t// - errors/missing_view\n\t'MissingViewTitle'        => 'Vista Faltante',\n\t'MissingViewHeading'      => 'Vista Faltante!',\n\t'MissingViewModLabel'     => 'Módulo:',\n\t'MissingViewActLabel'     => 'Acción:',\n\t'MissingViewReqLabel'     => 'URI de petición:',\n\t'MissingViewLocLabel'     => 'Localización en el sistema de archivos:',\n\n\t// Module: guild\n\t// - guild/export\n\t// - guild/index\n\t// - guild/view\n\n\t// Module: history\n\t// - history/cplogin\n\t'HistoryCpLoginTitle'     => 'Accesos al Panel de Control',\n\t'HistoryCpLoginHeading'   => 'Accesos al Panel de Control',\n\t'HistoryLoginDateLabel'   => 'Fecha/Hora de Acceso',\n\t'HistoryIpAddrLabel'      => 'Dirección IP',\n\t'HistoryErrorCodeLabel'   => 'Código de Error',\n\t'HistoryNoCpLogins'       => 'No se ha encontrado ningún intento de acceso al panel de control.',\n\t// -history/emailchange\n\t'HistoryEmailTitle'       => 'Cambios de Correo Electrónico',\n\t'HistoryEmailHeading'     => 'Cambios de Correo Electrónico',\n\t'HistoryEmailRequestDate' => 'Fecha/Hora de la petición',\n\t'HistoryEmailRequestIp'   => 'IP de la petición',\n\t'HistoryEmailOldAddress'  => 'Correo Electrónico Antiguo',\n\t'HistoryEmailNewAddress'  => 'Correo Electrónico Nuevo',\n\t'HistoryEmailChangeDate'  => 'Fecha del Cambio',\n\t'HistoryEmailChangeIp'    => 'IP del Cambio',\n\t'HistoryNoEmailChanges'   => 'No se ha encontrado ningún intento de cambio de correo electrónico.',\n\t// - history/gamelogin\n\t'HistoryGameLoginTitle'   => 'Conexiones en el Juego',\n\t'HistoryGameLoginHeading' => 'Conexiones en el Juego',\n\t'HistoryRepsCodeLabel'    => 'Código de Respuesta',\n\t'HistoryLogMessageLabel'  => 'Mensaje en el Registro',\n\t'HistoryNoGameLogins'     => 'No se ha encontrado ningún intento de conexión en el juego.',\n\t// - history/index\n\t'HistoryIndexTitle'       => 'Historial de Mi Cuenta',\n\t'HistoryIndexHeading'     => 'Historial de Mi Cuenta',\n\t'HistoryIndexInfo'        => 'Aquí puedes ver la actividad de tu cuenta en el pasado.',\n\t'HistoryIndexInfo2'       => 'Por favor, selecciona una acción en el menú.',\n\t// - history/passchange\n\t'HistoryPassChangeTitle'      => 'Cambios de Contraseña',\n\t'HistoryPassChangeHeading'    => 'Cambios de Contraseña',\n\t'HistoryPassChangeChangeDate' => 'Fecha del Cambio',\n\t'HistoryPassChangeChangeIp'   => 'IP del Cambio',\n\t'HistoryNoPassChanges'        => 'No se ha encontrado ningún cambio de contraseña.',\n\t// -history/passreset\n\t'HistoryPassResetTitle'       => 'Recuperaciones de Contraseña',\n\t'HistoryPassResetHeading'     => 'Recuperaciones de Contraseña',\n\t'HistoryPassResetRequestDate' => 'Fecha/Hora de la Petición',\n\t'HistoryPassResetRequestIp'   => 'IP de la Petición',\n\t'HistoryPassResetResetDate'   => 'Fecha de la Recuperación',\n\t'HistoryPassResetResetIp'     => 'IP de la Recuperación',\n\t'HistoryNoPassResets'         => 'No se ha encontrado ningún intento de recuperar la contraseña.',\n\n\t// Module: ipban\n\t// - ipban/add\n\t'IpbanAddTitle'           => 'Añadir Bloqueos de IP',\n\t'IpbanEnterIpPattern'     => 'Introduce una dirección o un rango de IP.',\n\t'IpbanInvalidPattern'     => 'La dirección o el rango de IP introducido no es válido/a.',\n\t'IpbanWhitelistedPattern' => 'Este rango de IP está en la lista blanca, por lo que no puede ser bloqueado.',\n\t'IpbanEnterReason'        => 'Introduce una razón para el bloqueo.',\n\t'IpbanSelectUnbanDate'    => 'Se requiere una fecha de desbloqueo.',\n\t'IpbanFutureDate'         => 'La fecha de readmisión debe ser una fecha futura.',\n\t'IpbanAlreadyBanned'      => 'La IP (%s) ya está bloqueada.',\n\t'IpbanPatternBanned'      => \"Se ha bloqueado la dirección o rango de IP '%s'.\",\n\t'IpbanAddFailed'          => 'No se pudo añadir este bloqueo de IP.',\n\t'IpbanAddHeading'         => 'Añadir Bloqueos de IP',\n\t'IpbanIpAddressLabel'     => 'Dirección IP',\n\t'IpbanReasonLabel'        => 'Razón del Bloqueo',\n\t'IpbanUnbanDateLabel'     => 'Fecha de Desbloqueo',\n\t'IpbanIpAddressInfo'      => 'Puedes especificar un rango de IP, como por ejemplo 218.139.*.*',\n\t'IpbanAddButton'          => 'Añadir Bloqueos de IP',\n\t// - ipban/edit\n\t'IpbanEditTitle'          => 'Modificar Bloqueos de IP',\n\t'IpbanEnterEditReason'    => 'Introduce una razón para la modificación del bloqueo de IP.',\n\t'IpbanEditFailed'         => 'No se pudo modificar el bloqueo de IP.',\n\t'IpbanEditHeading'        => 'Modifcar Bloqueos de IP',\n\t'IpbanEditReasonLabel'    => 'Razón de la Edición',\n\t'IpbanEditButton'         => 'Modifcar Bloqueo de IP',\n\t// - ipban/index\n\t'IpbanListTitle'          => 'Lista de Bloqueos de IP',\n\t'IpbanListHeading'        => 'Lista de Bloqueos de IP',\n\t'IpbanBannedIpLabel'      => 'IP Bloqueada',\n\t'IpbanBanDateLabel'       => 'Fecha de Bloqueo',\n\t'IpbanBanReasonLabel'     => 'Razón de Bloqueo',\n\t'IpbanBanExpireLabel'     => 'Fecha de Expiración',\n\t'IpbanModifyLink'         => 'Modificar',\n\t'IpbanRemoveLink'         => 'Eliminar',\n\t'IpbanUnbanButton'        => 'Desbloquear Seleccionados',\n\t'IpbanListNoBans'         => 'En estos momentos no hay ningún bloqueo de IP.',\n\t// - ipban/remove\n\t'IpbanRemoveTitle'        => 'Deshacer Bloqueo de IP',\n\t'IpbanEnterRemoveReason'  => 'Introduce una razón para desbloquear esta IP o rango.',\n\t'IpbanNotBanned'          => 'La IP (%s) no está bloqueada.',\n\t'IpbanPatternUnbanned'    => \"Se ha desbloqueado la IP o rango '%s'.\",\n\t'IpbanRemoveFailed'       => 'No se pudo deshacer el bloqueo de IP.',\n\t'IpbanRemoveHeading'      => 'Deshacer Bloqueo de IP',\n\t'IpbanRemoveReasonLabel'  => 'Razón de Desbloqueo',\n\t'IpbanRemoveButton'       => 'Desbloquear IP o rango',\n\t// - ipban/unban\n\t'IpbanNothingToUnban'     => 'No hay nada que se pueda desbloquear.',\n\t'IpbanEnterUnbanReason'   => 'Introduce un motivo para desbloquear esta(s) IP.',\n\t'IpbanUnbanned'           => '¡Se ha(n) desbloqueado la(s) IP seleccionada(s)!',\n\t'IpbanUnbanFailed'        => '¡No se pudo/pudieron desbloquear %d IP especificada(s)!',\n\n\t// Module: item\n\t// - item/add\n\t// - item/copy\n\t// - item/edit\n\t// - item/index\n\t// - item/view\n\n\t// Module: itemshop\n\t// - itemshop/add\n\t// - itemshop/delete\n\t// - itemshop/edit\n\t// - itemshop/imagedel\n\n\t// Module: logdata\n\t// - logdata/chat\n\t// - logdata/command\n\t'CommandLogTitle'         => 'Lista de Comandos',\n\t'CommandLogHeading'       => 'Comandos Registrados',\n\t'CommandLogNotFound'      => 'No se ha registrado ningún comandos.',\n\t'CommandLogDateLabel'     => 'Fecha/Hora',\n\t'CommandLogAccountIdLabel'=> 'ID de Cuenta',\n\t'CommandLogCharIdLabel'   => 'ID de Personaje',\n\t'CommandLogCharNameLabel' => 'Nombre del Personaje',\n\t'CommandLogCommandLabel'  => 'Comando',\n\t'CommandLogMapLabel'      => 'Mapa',\n\t// - logdata/index\n\t// - logdata/login\n\t// - logdata/pick\n\t'PickLogTitle'            => 'Lista de Transacciones de Objetos',\n\t'PickLogHeading'          => 'Transacciones Registradas de Objetos',\n\t'PickLogNotFound'         => 'No se ha registrado ninguna transacción de objetos.',\n\t'PickLogDateLabel'        => 'Fecha/Hora',\n\t'PickLogCharacterLabel'   => 'Personaje',\n\t'PickLogTypeLabel'        => 'Tipo',\n\t'PickLogItemLabel'        => 'Nombre de Objeto',\n\t'PickLogAmountLabel'      => 'Cantidad',\n\t'PickLogRefineLabel'      => 'Refinado',\n\t'PickLogCard0Label'       => 'Carta 1',\n\t'PickLogCard1Label'       => 'Carta 2',\n\t'PickLogCard2Label'       => 'Carta 3',\n\t'PickLogCard3Label'       => 'Carta 4',\n\t'PickLogMapLabel'         => 'Mapa',\n\t// - logdata/zeny\n\t'ZenyLogTitle'            => 'Lista de Transacciones de Zeny',\n\t'ZenyLogHeading'          => 'Transacciones Registradas de Zeny',\n\t'ZenyLogNotFound'         => 'No se ha registrado ninguna transacción de zeny.',\n\t'ZenyLogDateLabel'        => 'Fecha/Hora',\n\t'ZenyLogCharacterLabel'   => 'Personaje',\n\t'ZenyLogSourceLabel'      => 'ID de Personaje', // No estoy seguro, tomado de la traducción portuguesa de JulioCF\n\t'ZenyLogTypeLabel'        => 'Tipo',\n\t'ZenyLogAmountLabel'      => 'Cantidad',\n\t'ZenyLogMapLabel'         => 'Mapa',\n\n\t// Module: mail\n\t// - mail/index\n\t'MailerTitle'             => 'Enviar Correo Electrónico',\n\t'MailerHeading'           => 'Enviar Correo Electrónico',\n\t'MailerEnterToAddress'    => 'Introduce el destinatario.',\n\t'MailerEnterSubject'      => 'Introduce el asunto.',\n\t'MailerEnterBodyText'     => 'Introduce el cuerpo del mensaje.',\n\t'MailerEmailHasBeenSent'  => 'Se ha enviado satisfactoriamente tu correo electrónico a %s.',\n\t'MailerFailedToSend'      => 'El sistema de envío de correo electrónico no pudo enviar este mensaje. Es posible que esto ocurra debido a un fallo en la configuración.',\n\t'MailerInfo'              => 'Utiliza el formulario de abajo para enviar un correo electrónico mediante el panel de control.',\n\t'MailerFromLabel'         => 'De',\n\t'MailerToLabel'           => 'Para',\n\t'MailerSubjectLabel'      => 'Asunto',\n\t'MailerBodyLabel'         => 'Cuerpo del mensaje',\n\n\t// Module: main\n\t// - main/index\n\t'MainPageHeading'         => 'Panel de Control Flux',\n\t'MainPageInfo'            => \"Si puedes ver esta página, significa que has instalado Flux correctamente.\",\n\t'MainPageInfo2'           => \"¿Quieres cambiar esta página? Muy bien, puedes hacerlo así:\",\n\t'MainPageStep1'           => 'Abre \"%s\" en un editor de texto.',\n\t'MainPageStep2'           => 'Edita el archivo desde el propio editor y guarda los cambios.',\n\t'MainPageThanks'          => '¡Gracias por usar Flux!',\n\t// - main/pagenotfound\n\t'PageNotFoundTitle'       => 'Error 404: Página No Encontrada.<br>:(',\n\t'PageNotFoundHeading'     => 'Página No Encontrada',\n\t'PageNotFoundInfo'        => 'No se ha encontrado la página que buscas en nuestro servidor. Verifica que la dirección es correcta e inténtalo de nuevo.',\n\t// - main/preprocess\n\t'DisallowedDuringWoE'     => 'No se puede acceder a la página que buscas en horario de WoE.',\n\n\t// Module: monster\n\t// - monster/index\n\t// - monster/view\n\n\t// Module: purchase\n\t// - purchase/add\n\t// - purchase/cart\n\t// - purchase/checkout\n\t// - purchase/clear\n\t// - purchase/index\n\t// - purchase/pending\n\t// - purchase/remove\n\n\t// Module: ranking\n\t// - ranking/character\n\t// - ranking/guild\n\t// - ranking/zeny\n\n\t// Module: server\n\t// - server/info\n\t'ServerInfoTitle'         => 'Información del Servidor',\n\t'ServerInfoHeading'       => 'Información del Servidor',\n\t'ServerInfoText'          => \"Aquí puedes encontrar informaciones varias sobre el servidor.\",\n\t'ServerInfoSubHeading'    => 'Información de %s',\n\t'ServerInfoSubHeading2'   => 'Información de Clases en %s',\n\t'ServerInfoAccountLabel'  => 'Cuentas',\n\t'ServerInfoCharLabel'     => 'Personajes',\n\t'ServerInfoGuildLabel'    => 'Guilds',\n\t'ServerInfoPartyLabel'    => 'Parties',\n\t'ServerInfoZenyLabel'     => 'Zeny',\n\t// - server/status\n\t'ServerStatusTitle'       => 'Estado Actual del Servidor',\n\t'ServerStatusHeading'     => 'Estado del Servidor',\n\t'ServerStatusInfo'        => \"Entender el estado online u offline de cada servidor puede servirte de ayuda para entender cómo un fallo del servidor puede relacionarse con un problema que puedas tener. Por ejemplo, si el login server aparece offline, significa que no podrás conectarte al juego. El character server y el/los map server(s) son necesarios para el juego una vez te has conectado e identificado.\",\n\t'ServerStatusServerLabel' => 'Servidor',\n\t'ServerStatusLoginLabel'  => 'Login Server',\n\t'ServerStatusCharLabel'   => 'Character Server',\n\t'ServerStatusMapLabel'    => 'Map Server',\n\t'ServerStatusOnlineLabel' => 'Jugadores Conectados',\n\n\t// Module: service\n\t// - service/tos\n\t'TermsTitle'              => 'Términos del Servicio',\n\t'TermsHeading'            => 'Términos del Servicio',\n\t'TermsInfo'               => '¡Por favor, léelos atentamente antes de crearte una cuenta!',\n\t'TermsInfo2'              => \"PARA EL ADMINISTRADOR DEL PANEL DE CONTROL:  Puedes añadir los Términos del Servicio de tu servidor directamente en este archivo. Su localización es: %s\",\n\n\t// Module: unauthorized\n\t// - unauthorized/index\n\t'UnauthorizedTitle'       => 'No estás autorizado',\n\t'UnauthorizedHeading'     => 'No estás autorizado',\n\t'UnauthorizedInfo'        => 'No estás autorizado para ver esta página. <a href=\"%s\">Redireccionando…</a>',\n\n\t// Module: woe\n\t// - woe/index\n\t'WoeTitle'                => 'Horario de WoE',\n\t'WoeHeading'              => 'Horario de War of Emperium',\n\t'WoeInfo'                 => \"Abajo se encuentra el horario de WoE en %s. Este horario está sujeto a cambios en cualquier momento, pero esperemos que no sea así.\",\n\t'WoeServerTimeInfo'       => 'La hora actual del servidor es:',\n\t'WoeServerLabel'          => 'Servidores',\n\t'WoeTimesLabel'           => 'Horarios de War of Emperium',\n\t'WoeNotScheduledInfo'     => 'No se ha asignado ningún horario para WoE.',\n\n\n\t// Module: webcommands\n\t'WCTitleLabel'            => 'Web Commands',\n\n\n\t'InvalidVIPTime'          => 'Invalid VIP Time.',\n\t'VIPTimeDateLabel'        => 'VIP Until',\n\t'VIPStateLabel'           => 'VIP Status',\n\t'CashLogTitle'            => 'List CashPoints Log',\n\t'CashLogHeading'          => 'CashPoint Log',\n\t'CashLogNotFound'         => 'No cash logs found.',\n\t'CashLogDateLabel'     => 'Date/Time',\n\t'CashLogCharacterLabel'     => 'Character',\n\t'CashLogTypeLabel'     => 'Type',\n\t'CashLogCashTypeLabel'     => 'Cash Type',\n\t'CashLogAmountLabel'     => 'Amount',\n\t'CashLogMapLabel'     => 'Map',\n\t'BranchLogTitle'     => 'List Branch Log',\n\t'BranchLogHeading'     => 'Branch Log',\n\t'BranchLogNotFound'     => 'No branch logs found.',\n\t'BranchLogIDLabel'     => 'Branch Log ID',\n\t'BranchLogDateLabel'     => 'Date / Time',\n\t'BranchLogAccountIDLabel'     => 'Account ID',\n\t'BranchLogCharIDLabel'     => 'Char ID',\n\t'BranchLogCharNameLabel'     => 'Char Name',\n\t'BranchLogMapLabel'     => 'Map',\n\t'CharLogTitle'     => 'List Character Log',\n\t'CharLogHeading'     => 'Character Log',\n\t'CharLogNotFound'     => 'No character logs found.',\n\t'CharLogDateLabel'     => 'Date / Time',\n\t'CharLogMsgLabel'     => 'Action',\n\t'CharLogAccountIDLabel'     => 'Account ID',\n\t'CharLogCharNumLabel'     => 'Character slot',\n\t'CharLogCharNameLabel'     => 'Character Name',\n\t'InterLogTitle'     => 'List of Interactions Log',\n\t'InterLogHeading'     => 'Interactions Log',\n\t'InterLogNotFound'     => 'No Interactions logs found.',\n\t'InterLogDateLabel'     => 'Date / Time',\n\t'InterLogLabel'     => 'Interactions Log',\n\t'MVPLogTitle'     => 'List MVP Log',\n\t'MVPLogHeading'     => 'MVP Log',\n\t'MVPLogNotFound'     => 'No MVP logs found.',\n\t'MVPLogIDLabel'     => 'MVP Log ID',\n\t'MVPLogDateLabel'     => 'Date / Time',\n\t'MVPLogCharacterLabel'     => 'Character ID',\n\t'MVPLogMonsterLabel'     => 'MVP Monster',\n\t'MVPLogPrizeLabel'     => 'MVP Prize',\n\t'MVPLogExpLabel'     => 'MVP Experience',\n\t'MVPLogMapLabel'     => 'Map',\n\t'NPCLogTitle'     => 'List NPC Log',\n\t'NPCLogHeading'     => 'NPC Log',\n\t'NPCLogNotFound'     => 'No npc logs found.',\n\t'NPCLogIDLabel'     => 'NPC ID',\n\t'NPCLogDateLabel'     => 'Date / Time',\n\t'NPCLogAccountIDLabel'     => 'Account ID',\n\t'NPCLogCharIDLabel'     => 'Character ID',\n\t'NPCLogCharNameLabel'     => 'Character Name',\n\t'NPCLogMapLabel'     => 'Map',\n\t'NPCLogMsgLabel'     => 'Message',\n\t'MailerSelectTemplateLabel'     => 'Select Template',\n\t'MainPageWelcome'     => 'Welcome to %s!',\n\t'ServerStatusPeakLabel'     => 'Player Peak',\n\t'CFTitleSubmit'     => 'Contact Us',\n\t'CMSNewsHeader'     => 'Announcements',\n\t'CMSPageHeader'     => 'Content Management System',\n\t'CMSPageText'     => 'This module enables server admins and staff to create pages within their website with no prior flux/coding knowledge. The built-in news system can also be swapped out for an rss feed by modifying the application settings.',\n\t'CMSNewsTitleError'     => 'News title is required!',\n\t'CMSNewsBodyError'     => 'News body is required!',\n\t'CMSPageTitleError'     => 'Page Title is required!',\n\t'CMSPageBodyError'     => 'Page body is required!',\n\t'CMSPagePathError'     => 'Page path is required!',\n\t'CMSNewsAdded'     => 'News added to system',\n\t'CMSPagesAdded'     => 'Your new page has been added',\n\t'CMSNewsUpdated'     => 'News updated',\n\t'CMSPageUpdated'     => 'Your page has been updated',\n\t'CMSNewsAddTitle'     => 'Add a news item',\n\t'CMSPageAddTitle'     => 'Add a new page',\n\t'CMSNewsEditTitle'     => 'Edit news',\n\t'CMSPageEditTitle'     => 'Edit page',\n\t'CMSNewsNotFound'     => 'News not found!',\n\t'CMSPageNotFound'     => 'Page not found!',\n\t'CMSNewsDeleted'     => 'News deleted',\n\t'CMSPageDeleted'     => 'Your page has been deleted',\n\t'CMSNewsEmpty'     => 'No news articles have been found. Are you using the correct News Type? (CMSNewsType setting)',\n\t'CMSNewsRSSNotFound'     => \"RSS feed can't be found. Make sure the CMSNewsRSS setting is correct, or switch CMSNewsType to 1 to use built-in news system!\",\n\t'CMSPageEmpty'     => 'No page added',\n\t'CMSNewsLink'     => 'read more...',\n\t'CMSEdit'     => 'Edit',\n\t'CMSDelete'     => 'Delete',\n\t'CMSNewsTitleLabel'     => 'News Title',\n\t'CMSNewsBodyLabel'     => 'News Body',\n\t'CMSNewsLinkLabel'     => 'News Link',\n\t'CMSNewsAuthorLabel'     => 'News Author',\n\t'CMSPageTitleLabel'     => 'Page Title',\n\t'CMSPageBodyLabel'     => 'Page Body',\n\t'CMSPagePathLabel'     => 'Page Path',\n\t'CMSCreatedLabel'     => 'Date Created',\n\t'CMSModifiedLabel'     => 'Date Modified',\n\t'CMSActionLabel'     => 'Action',\n\t'CMSConfirmDeleteLabel'     => 'Are you sure you want to delete?',\n\t'CMSPageCreate'     => 'Create now?',\n\t'CMSOptionalLabel'     => '(Optional)',\n\t'CMSRequiredLabel'     => '(Required)',\n\t'CMSCreateLabel'     => 'Add News',\n\t'TLHeaderTasks'     => 'Tasks',\n\t'TLHeaderOwner'     => 'Owner',\n\t'TLHeaderPriority'     => 'Priority',\n\t'TLHeaderStatus'     => 'Status',\n\t'TLHeaderCreated'     => 'Created',\n\t'TLHeaderModified'     => 'Modified',\n\t'TLHeaderResources'     => 'Additional Resources',\n\t'TLHeaderBody'     => 'Body',\n\t'SDHeader'     => 'Service Desk',\n\t'SDCreateNew'     => 'Create a new ticket',\n\t'SDWelcomeText'     => 'Welcome to the Service Desk',\n\t'SDNoTickets'     => 'You have not created any tickets.',\n\t'SDNoBlankResponse'     => 'For a response to register, you must type something into the box!',\n\t'SDNoCatsAvailable'     => 'No Categories Available',\n\t'SDNoOpenTickets'     => 'There are no Open tickets in the database.',\n\t'SDNoInactiveTickets'     => 'You have no in-active tickets at the moment.',\n\t'SDNoClosedTickets'     => 'There are no Closed tickets in the database.',\n\t'SDNoCats'     => 'There are no categories within the database.',\n\t'SDHuh'     => 'You should not be here o.O',\n\t'SDPointerChatLog'     => 'We recommend pasting to pastebin.com then putting the link in here.',\n\t'SDPointerScreenShot'     => 'Provide image links as evidence',\n\t'SDPointerVideoLink'     => 'We recommend uploading to youtube then putting the link in here.',\n\t'SDHeaderID'     => 'Ticket #',\n\t'SDHeaderSubject'     => 'Subject',\n\t'SDHeaderCategory'     => 'Category',\n\t'SDHeaderStatus'     => 'Current Status',\n\t'SDHeaderLastAuthor'     => 'Last Author',\n\t'SDHeaderTimestamp'     => 'Created',\n\t'SDHeaderAccount'     => 'Account',\n\t'SDHeaderTeam'     => 'Team',\n\t'SDH3ActiveTickets'     => 'Active Tickets',\n\t'SDH3InActiveTickets'     => 'In-Active Tickets',\n\t'SDH3ClosedTickets'     => 'Closed Tickets',\n\t'SDH3CurrentCat'     => 'Current Categories',\n\t'SDH3CreateCat'     => 'Create New Category',\n\t'SDH3StaffList'     => 'Current Staff Settings',\n\t'SDH3StaffCreate'     => 'Add Staff Settings',\n\t'SDReOpenPlayer'     => 'Ticket Re-Opened by player',\n\t'SDReOpenStaff'     => '',\n\t'SDRespTable1'     => 'Respond and Return to Ticket',\n\t'SDRespTable2'     => 'Respond and Return to List',\n\t'SDRespTable3'     => 'Respond and Resolve Ticket',\n\t'SDRespTable4'     => 'Respond and Escalate',\n\t'SDRespTable5'     => 'Close Ticket',\n\t'SDRespTable6'     => 'Respond and Re-Open Ticket',\n\t'SDRespTable7'     => 'Resolve Ticket and Credit Account',\n\t'SDGroup1'     => 'Support Staff',\n\t'SDGroup2'     => 'Head of Support',\n\t'SDGroup3'     => 'Administration',\n\t'SDLinkOpenNew'     => 'Open a new ticket',\n\n);\n?>\n"
  },
  {
    "path": "lang/id_id.php",
    "content": "<?php\n// rAthena FluxCP Language Library\n//\n// Mempersembahkan, dukungan Bahasa Indonesia (id_id.php)\n//\n// Oleh:\n// Cydh, nanakiwurtz, <YOU>\n\nreturn array(\n\t// Generic/Misc.\n\t'Language'                => 'Indonesian',\n\t'YesLabel'\t\t\t\t=> 'Ya',\n\t'NoLabel'\t\t\t\t => 'Tidak',\n\t'NoteLabel'\t\t\t   => 'Catatan',\n\t'GenderTypeMale'\t\t  => 'Pria',\n\t'GenderTypeFemale'\t\t=> 'Wanita',\n\t'GenderTypeServer'\t\t=> 'Server',\n\t'RefreshSecurityCode'\t => 'Muat Ulang Kode Keamanan',\n\t'NoneLabel'\t\t\t   => 'Kosong',\n\t'NeverLabel'\t\t\t  => 'Jangan Pernah',\n\t'NotApplicableLabel'\t  => 'Tidak Dapat Digunakan',\n\t'UnknownLabel'\t\t\t=> 'Tidak Diketahui',\n\t'IsEqualToLabel'\t\t  => 'sama dengan',\n\t'IsGreaterThanLabel'\t  => 'lebih besar dari',\n\t'IsLessThanLabel'\t\t => 'lebih kecil dari',\n\t'AllLabel'\t\t\t\t=> 'Semua',\n\t'SearchLabel'\t\t\t => 'Cari…',\n\t'GoBackLabel'\t\t\t => 'Kembali ke halaman sebelumnya…',\n\t'SearchButton'\t\t\t=> 'Cari',\n\t'ResetButton'\t\t\t => 'Reset',\n\t'FilterButton'\t\t\t=> 'Penyaringan',\n\t'NotAcceptingDonations'   => \"Kami mohon maaf, tapi saat ini kami sedang tidak menerima donasi. Maaf untuk ketidaknyamanannya.\",\n\t//'NotAcceptingDonations'   => \"Kami mohon maaf, tapi sistem donasi kami saat ini sedang dalam perbaikan, mohon ulangi beberapa saat lagi.\",\n\t'FoundSearchResults'\t  => 'Ditemukan. Total %d dari %d halaman.  Menampilkan hasil %d-%d.',\n\t'LoginToDonate'\t\t   => 'Harap login untuk melakukan donasi.',\n\t'UnknownCharacter'\t\t=> 'Karakter tidak ditemukan.',\n\t'AccountIdLabel'\t\t  => 'ID Akun',\n\t'AccountGroupIDLabel'\t => 'ID Grup',\n\t'AccountStateLabel'\t   => 'State',\n\t'CreditBalanceLabel'\t  => 'Saldo Kredit',\n\t'UsernameLabel'\t\t   => 'Nama Pengguna',\n\t'PasswordLabel'\t\t   => 'Sandi',\n\t'EmailAddressLabel'\t   => 'E-mail',\n\t'GenderLabel'\t\t\t => 'Jenis Kelamin',\n\t'LoginCountLabel'\t\t => 'Jumlah Login', //bukan \"Jumlah\". xD jumlah = sum(), itu count() :P\n\t'LastLoginDateLabel'\t  => 'Terakhir Login',\n\t'LastUsedIpLabel'\t\t => 'IP Terakhir',\n\t'AccountStateNormal'\t  => 'Normal',\n\t'AccountStatePending'\t => 'Pending',\n\t'AccountStatePermBanned'  => 'Ban Permanen',\n\t'AccountStateTempBanLbl'  => 'Ban Sementara',\n\t'AccountStateTempBanned'  => 'Ban Sementara (unban: %s)',\n\t'OnlineLabel'\t\t\t => 'Online',\n\t'OfflineLabel'\t\t\t=> 'Offline',\n\t'ItemIdLabel'\t\t\t => 'ID Barang',\n\t'ItemNameLabel'\t\t   => 'Nama Barang',\n\t'ItemAmountLabel'\t\t => 'Jumlah',\n\t'ItemIdentifyLabel'\t   => 'Teridentifikasi',\n\t'ItemRefineLabel'\t\t => 'Tempa',\n\t'ItemBrokenLabel'\t\t => 'Rusak',\n\t'ItemCard0Label'\t\t  => 'Kartu 1',\n\t'ItemCard1Label'\t\t  => 'Kartu 2',\n\t'ItemCard2Label'\t\t  => 'Kartu 3',\n\t'ItemCard3Label'\t\t  => 'Kartu 4',\n\n\t//SIDEBAR\n\t//FluxCP Menu Items\n\t//Categories\n\t'MainMenuLabel'\t\t   => 'Menu Utama',\n\t'ForumLabel'\t\t\t  => 'Forum',\n\t'AccountLabel'\t\t\t=> 'Akun',\n\t'CharacterLabel'\t\t  => 'Character',\n\t'ServiceDeskLabel'\t\t=> 'Service Desk',\n\t'CPLogsLabel'\t\t\t => 'CP Logs',\n\t'FluxAdminLabel'\t\t  => 'Flux Admin',\n\t'PagesLabel'\t\t\t  => 'Pages',\n\t'IPBanListLabel'\t\t  => 'IP Ban List',\n\t'GuildsLabel'\t\t\t => 'Guilds',\n\t'rALogsLabel'\t\t\t => 'rA Logs',\n\t'SendMailLabel'\t\t   => 'Send Mail',\n\t'ReInstallLabel'\t\t  => 'Re-Install',\n\t'TaskListLabel'\t\t   => 'Task List',\n\t'DonationsLabel'\t\t  => 'Donasi',\n\t'InformationLabel'\t\t=> 'Informasi',\n\t'DatabaseLabel'\t\t   => 'Database',\n\t'SocialLabel'\t\t\t => 'Social',\n\t//SubMenus\n\t'HomeLabel'\t\t\t   => 'Beranda',\n\t'NewsLabel'\t\t\t   => 'Berita',\n\t'DownloadsLabel'\t\t  => 'Download',\n\t'RulesLabel'\t\t\t  => 'Peraturan',\n\t'ContactUsLabel'\t\t  => 'Hubungi Kami',\n\t'MyAccountLabel'\t\t  => 'Akun Saya',\n\t'HistoryLabel'\t\t\t=> 'History',\n\t'ServiceDeskLabel'\t\t=> 'Bantuan',\n\t'PurchaseLabel'\t\t   => 'Pembelian',\n\t'DonateLabel'\t\t\t => 'Berikan Donasi',\n\t'ServerInfoLabel'\t\t => 'Info Server',\n\t'ServerStatusLabel'\t   => 'Status Server',\n\t'WoeHoursLabel'\t\t   => 'Jadwal WOE',\n\t'CastlesLabel'\t\t\t=> 'Kastil',\n\t'WhosOnlineLabel'\t\t => 'Pemain Online',\n\t'MapStaticsLabel'\t\t => 'Informasi Map',\n\t'RankingInfoLabel'\t\t=> 'Informasi Peringkat',\n\t'VendingInfoLabel'\t\t=> 'Informasi Vending',\n\t'ItemDatabaseLabel'\t   => 'Database Barang',\n\t'MobDatabaseLabel'\t\t=> 'Database Monster',\n\t'JoinUsInFacebookLabel'   => 'Kunjungi kami di Facebook!',\n\t'RateUsOnRMSLabel'\t\t=> 'Kunjungi kami di RMS!',\n\n\t// Module: account\n\t// - account/changemail\n\t'EmailChangeTitle'\t\t=> 'Ubah E-mail',\n\t'EnterEmailAddress'\t   => 'Masukkan alamat e-mail.',\n\t'EmailCannotBeSame'\t   => 'E-mail baru Anda tidak boleh sama dengan yang ada saat ini.',\n\t'EmailInvalid'\t\t\t=> 'Alamat e-mail tidak diizinkan.',\n\t'EmailAlreadyRegistered'  => 'Alamat e-mail yang Anda masukkan sudah digunakan untuk akun lain',\n\t'EmailChangeSent'\t\t => 'Sebuah e-mail telah dikirim ke alamat e-mail Anda yang baru dengan tautan yang akan mengkonfirmasi penggantian.',\n\t'EmailAddressChanged'\t => 'Alamat e-mail Anda telah diubah!',\n\t'EmailChangeFailed'\t   => 'Gagal untuk mengubah alamat e-mail. Harap ulangi beberapa saat lagi.',\n\t'EmailChangeHeading'\t  => 'Ubah E-mail',\n\t'EmailChangeInfo'\t\t => 'Jika Anda ingin mengubah alamat e-mail, Anda dapat mengisi formulir di bawah ini.',\n\t'EmailChangeInfo2'\t\t=> 'Setelah mengirim formulir, Anda akan diminta untuk mengkonfimasi alamat e-mail baru Anda (sebuah e-mail akan dikirimkan ke alamat e-mail baru berisi sebuah tautan).',\n\t'EmailChangeLabel'\t\t=> 'Alamat e-mail baru',\n\t'EmailChangeInputNote'\t=> 'Harus alamat e-mail yang benar!',\n\t'EmailChangeButton'\t   => 'Ubah alamat e-mail',\n\t// - account/changepass\n\t'PasswordChangeTitle'\t => 'Ubah Sandi',\n\t'NeedCurrentPassword'\t => 'Masukkan sandi yang digunakan.',\n\t'NeedNewPassword'\t\t => 'Masukkan sandi baru.',\n\t'OldPasswordInvalid'\t  => 'Kata sandi yang Anda berikan tidak sesuai.',\n\t'ConfirmNewPassword'\t  => 'Konfirmasi kata sandi baru Anda.',\n\t'NewPasswordHasUsername'  => 'Tidak boleh ada nama pengguna di kata sandi yang baru.',\n\t'NewPasswordInvalid'\t  => 'Terdapat karakter yang tidak diizinkan di kata sandi yang baru.',\n\t'NewPasswordSameAsOld'\t=> 'Kata sandi yang baru tidak boleh sama dengan kata sandi yang ada saat ini.',\n\t'NewPasswordNeedUpper'\t=> 'Kata sandi yang baru harus menggunakan minimal %d huruf kapital.',\n\t'NewPasswordNeedLower'\t=> 'Kata sandi yang baru harus menggunakan minimal %d huruf kecil.',\n\t'NewPasswordNeedNumber'   => 'Kata sandi yang baru harus menggunakan minimal %d angka.',\n\t'NewPasswordNeedSymbol'   => 'Kata sandi yang baru harus menggunakan minimal %d simbol.',\n\t'PasswordHasBeenChanged'  => 'Kata sandi Anda telah diubah, silakan login kembali.',\n\t'FailedToChangePassword'  => 'Penggantian kata sandi tidak berhasil. Harap menghubungi admin.',\n\t'PasswordChangeHeading'   => 'Ubah Kata Sandi',\n\t'PasswordChangeInfo'\t  => 'Silakan masukkan kata sandi Anda, lalu masukkan kata sandi yang baru.',\n\t'CurrentPasswordLabel'\t=> 'Kata Sandi Saat Ini',\n\t'NewPasswordLabel'\t\t=> 'Kata Sandi Baru',\n\t'NewPasswordConfirmLabel' => 'Konfirmasi Kata Sandi Baru',\n\t'PasswordChangeNote'\t  => 'Harap gunakan informasi yang benar.',\n\t'PasswordChangeNote2'\t => 'Setelah mengganti kata sandi, Anda akan logout.',\n\t'PasswordChangeButton'\t=> 'Ganti Kata Sandi',\n\t// - account/changesex\n\t'GenderChangeTitle'\t   => 'Ubah Jenis Kelamin', //swt -_-\n\t'GenderChangeBadChars'\t=> 'Anda tidak dapat mengubah jenis kelamin jika ada karakter yang Anda miliki: %s',\n\t'GenderChanged'\t\t   => 'Jenis kelamin Anda telah diganti dan %d kredit telah dikurangi dari akun Anda.',\n\t'GenderChangedForFree'\t=> 'Jenis kelamin Anda telah diganti.',\n\t'GenderChangeHeading'\t => 'Ubah Jenis Kelamin',\n\t'GenderChangeCost'\t\t=> 'Biaya penggantian jenis kelamin = %s kredit.',\n\t'GenderChangeBalance'\t => 'Kredit yang Anda miliki = %s .',\n\t'GenderChangeNoFunds'\t => 'Anda tidak memiliki kredit yang cukup untuk mengganti jenis kelamin.',\n\t'GenderChangeNoCost'\t  => 'Untuk Anda, gratis untuk mengganti jenis kelamin.',\n\t'GenderChangeCharInfo'\t=> 'Anda tidak dapat mengganti jenis kelamin jika Anda memiliki karakter dengan job: %s',\n\t'GenderChangeSubHeading'  => 'Yakinkan jika Anda ingin benar-benar mengganti!',\n\t'GenderChangeFormText'\t=> 'Akankah Anda mengganti jenis kelamin menjadi %s?',\n\t'GenderChangeConfirm'\t => 'Apa Anda yakin untuk mengganti jenis kelamin Anda?',\n\t'GenderChangeButton'\t  => 'Ya.',\n\t// - account/confirm\n\t'AccountConfirmTitle'\t => 'Konfirmasi akun',\n\t'AccountConfirmUnban'\t => 'Akun telah dikonfirmasi dan diaktifkan.',\n\t'AccountConfirmMessage'   => 'Akun anda telah dikonfirmasi dan diaktifkan, Anda dipersilahkan untuk log-in.',\n\t// - account/confirmemail\n\t'EmailConfirmTitle'\t   => 'Konfirmasi E-mail',\n\t'EmailConfirmFailed'\t  => 'Terdapat masalah teknis ketika memperbaruhi alamat e-mail baru, harap hubungi admin.',\n\t'EmailConfirmChanged'\t => 'Alamat e-mail Anda telah diganti!',\n\t// - account/create\n\t'AccountCreateTitle'\t  => 'Buat Akun',\n\t'AccountConfirmBan'\t   => 'Menunggu aktivasi akun: %s',\n\t'AccountCreateEmailSent'  => 'Sebuah e-mail telah dikirimkan dan berisi keterangan tentang detail akun Anda, harap periksa e-mail Anda untuk aktifasi.',\n\t'AccountCreateFailed'\t => 'Akun Anda telah dibuat, tetapi kami gagal untuk mengirimkan e-mail kepada Anda. Harap hubungi admin untuk mendapatkan bantuan.',\n\t'AccountCreated'\t\t  => 'Selamat, Anda telah terdaftar dan login secara otomatis.',\n\t'AccountCreateHeading'\t=> 'Pendaftaran Akun Baru',\n\t'AccountCreateTerms'\t  => 'Syarat dan Ketentuan',\n\t'AccountCreateInfo'\t   => 'Anda diharapkan untuk membaca %s sebelum membuat akun baru, untuk memastikan bahwa Anda mengerti semua ketentuan  yang berlaku di private server kami.',\n\t'AccountCreateInfo2'\t  => 'Dengan menekan tombol \"Buat Akun Baru\", Anda setuju untuk taat dan mengikuti %s kami.',\n\t'AccountCreateGenderInfo' => \"Jenis kelamin yang Anda pilih akan menentukan karakter Anda di dalam game!\",\n\t'AccountServerLabel'\t  => 'Server',\n\t'AccountUsernameLabel'\t=> 'Nama Pengguna',\n\t'AccountPasswordLabel'\t=> 'Kata Sandi',\n\t'AccountPassConfirmLabel' => 'Konfirmasi Kata Sandi',\n\t'AccountEmailLabel'\t   => 'Alamat E-mail',\n\t'AccountEmailLabel2'\t  => 'Konfirmasi alamat e-mail',\n\t'AccountGenderLabel'\t  => 'Jenis Kelamin',\n\t'AccountBirthdateLabel'   => 'Tanggal Lahir',\n\t'AccountSecurityLabel'\t=> 'Kode Keamanan',\n\t'AccountCreateButton'\t => 'Buat Akun Baru', // \"Create My Account?\" bukan \"new\" ya?\n\t'AccountInvalidChars'\t => \"Nama pengguna hanya diperbolehkan menggunakan karakter: '%s'\",\n\t'InvalidLoginServer'\t  => 'Login-server salah, ulangi lagi dengan memilih login-sevrer yang benar.',\n\t'InvalidLoginCredentials' => 'Data login tidak sesuai, verifikasi data yang dimasukkan dan ulangi.',\n\t'UnexpectedLoginError'\t=> 'Terjadi kesalahan yang tidak diinginkan, ulangi beberapa saat lagi atau laporkan kepada admin.',\n\t'CriticalLoginError'\t  => 'Sesuatu yang buruk telah terjadi.  Laporkan ke administartor SEGERA!',\n\t'UsernameAlreadyTaken'\t=> 'Nama pengguna yang Anda pilih sudah digunakan oleh orang lain',\n\t'UsernameTooShort'\t\t=> sprintf('Nama pengguna Anda harus %d sampai %d karakter.', Flux::config('MinUsernameLength'), Flux::config('MaxUsernameLength')),\n\t'UsernameTooLong'\t\t => sprintf('Nama pengguna Anda harus %d sampai %d karakter.', Flux::config('MinUsernameLength'), Flux::config('MaxUsernameLength')),\n\t'PasswordContainsUser'\t=> 'Tidak boleh terdapat nama pengguna di kata sandi.',\n\t'PasswordHasUsername'\t => 'Tidak boleh terdapat nama pengguna di kata sandi.',\n\t'PasswordTooShort'\t\t=> 'Kata sandi harus %d sampai %d karakter.',\n\t'PasswordTooLong'\t\t => 'Kata sandi harus %d sampai %d karakter.',\n\t'PasswordsDoNotMatch'\t => 'Kata sandi tidak cocok, harap masukkan kedua kata sandi dengan benar',\n\t'PasswordNeedUpper'\t   => 'Kata sandi harus memiliki huruf BESAR setidaknya %d huruf.',\n\t'PasswordNeedLower'\t   => 'Kata sandi harus memiliki huruf kecil setidaknya %d huruf.',\n\t'PasswordNeedNumber'\t  => 'Kata sandi harus memiliki angka setidaknya %d digit.',\n\t'PasswordNeedSymbol'\t  => 'Kata sandi harus memiliki simbol setidaknya %d simbol.',\n\t'EmailAddressInUse'\t   => 'Alamat e-mail yang Anda masukkan sudah digunakan oleh pengguna lain. Masukkan alamat e-mail yang lain',\n\t'InvalidEmailAddress'\t => 'Alamat e-mail yang Anda masukkan memiliki format yang tidak diizinkan',\n\t'InvalidEmailconf'\t\t=> \"Alamat e-mail Anda tidak cocok.\",\n\t'InvalidGender'\t\t   => 'Jenis kelamin yang diperbolehkan adalah \"M\" atau \"F\"',\n\t'InvalidServer'\t\t   => \"Server yang Anda pilih tidak tersedia.\",\n\t'InvalidSecurityCode'\t => 'Silakan masukkan kode keamanan dengan benar.',\n\t'InvalidPassword'\t\t => 'Kata sandi Anda mengandung karakter yang tidak diperbolehkan.',\n\t'InvalidBirthdate'\t\t=> 'Tanggal lahir Anda tidak benar.',\n\t'CriticalRegisterError'   => 'Error. Harap hubungi admin secepatnya.',\n\t// - account/edit\n\t'AccountEditTitle'\t\t=> 'Ubah Akun',\n\t'AccountEditTitle2'\t   => 'Ubah Akun Saya',\n\t'AccountEditTitle3'\t   => 'Mengubah Akun (%s)',\n\t'CannotModifyOwnGroupID'  => 'Anda tidak bisa mengubah grup ID Anda sendiri.',\n\t'CannotModifyAnyGroupID'  => 'Anda tidak bisa mengubah grup ID.',\n\t'CannotModifyGroupIDHigh' => 'Anda tidak bisa mengubah grup ID menjadi ID yang lebih tinggi dari akun Anda sendiri.',\n\t'InvalidGroupID'\t\t  => 'Grup ID salah.',\n\t'CannotModifyBalance'\t => 'Anda tidak bisa mengubah jumlah kredit.',\n\t'InvalidLastLoginDate'\t=> 'Tanggal login terakhir salah.',\n\t'InvalidVIPTime'\t\t  => 'Waktu VIP salah.',\n\t'AccountModified'\t\t => 'Akun telah berhasil diubah.',\n\t'AccountEditHeading'\t  => 'Ubah Akun',\n\t'AccountEditButton'\t   => 'Ubah Akun',\n\t'AccountEditNotFound'\t => 'Akun tidak ditemukan.',\n\t'VIPTimeDateLabel'\t\t=> 'VIP Aktif Hingga',\n\t// - account/index\n\t'AccountIndexTitle'\t   => 'Daftar Akun',\n\t'AccountIndexHeading'\t => 'Akun',\n\t'LoginBetweenLabel'\t   => 'Login di antara',\n\t'BirthdateBetweenLabel'   => 'Tanggal lahir di antara',\n\t'AccountIndexNotFound'\t=> 'Akun tidak ditemukan.',\n\t// - account/login\n\t'LoginTitle'\t\t\t  => 'Masuk Akun',\n\t'LoginHeading'\t\t\t=> 'Masuk Akun',\n\t'LoginButton'\t\t\t => 'Masuk',\n\t'LoginPageMakeAccount'\t=> 'Belum punya akun? <a href=\"%s\">Daftarkan akun baru!</a>',\n\t'TemporarilyBanned'\t   => 'Akun Anda telah diban untuk sementara.',\n\t'PermanentlyBanned'\t   => 'Akun Anda telah diban secara permanen.',\n\t'IpBanned'\t\t\t\t=> 'Alamat IP Anda telah diban.',\n\t'PendingConfirmation'\t => 'Akun Anda masih menunggu aktivasi.',\n\t// - account/logout\n\t'LogoutTitle'\t\t\t => 'Logout',\n\t'LogoutHeading'\t\t   => 'Logout',\n\t'LogoutInfo'\t\t\t  => 'Anda telah logged out.',\n\t'LogoutInfo2'\t\t\t => 'Harap tunggu beberapa saat, halaman sedang <a href=\"%s\">dialihkan</a>…',\n\t// - account/resend\n\t'ResendTitle'\t\t\t => 'Kirim Ulang E-mail Konfirmasi',\n\t'ResendEnterUsername'\t => 'Masukkan nama pengguna anda.',\n\t'ResendEnterEmail'\t\t=> 'Masukkan alamat e-mail.',\n\t'ResendFailed'\t\t\t=> 'Gagal mengirim ulang kode konfirmasi.',\n\t'ResendEmailSent'\t\t => 'Kode konfirmasi anda telah dikirim ulang, silahkan cek e-mail dan ikuti langkah berikutnya untuk mengaktifkan akun.',\n\t'ResendHeading'\t\t   => 'Kirim Ulang E-mail Konfirmasi',\n\t'ResendInfo'\t\t\t  => 'Masukkan nama pengguna dan alamat e-mail yang digunakan ketika melakukan pendaftaran untuk pengiriman ulang e-mail konfirmasi',\n\t'ResendServerLabel'\t   => 'Server Terdaftar',\n\t'ResendAccountLabel'\t  => 'Nama Pengguna',\n\t'ResendEmailLabel'\t\t=> 'Alamat E-Mail',\n\t'ResendServerInfo'\t\t=> 'Server tempat akun didaftarkan.',\n\t'ResendAccountInfo'\t   => 'Nama pengguna yang didaftarkan.',\n\t'ResendEmailInfo'\t\t => 'Alamat e-mail ini digunakan ketika Anda melakukan pendaftaran akun di atas.',\n\t'ResendButton'\t\t\t=> 'Kirim Ulang E-Mail Konfirmasi',\n\t// - account/resetpass\n\t'ResetPassTitle'\t\t  => 'Reset Kata Sandi',\n\t'ResetPassEnterAccount'   => 'Masukkan nama pengguna.',\n\t'ResetPassEnterEmail'\t => 'Masukkan alamat e-mail.',\n\t'ResetPassDisallowed'\t => 'Pemulihan kata sandi tidak dapat digunakan untuk akun ini.',\n\t'ResetPassFailed'\t\t => 'Gagal untuk mengirim e-mail pemulihan akun.',\n\t'ResetPassEmailSent'\t  => 'E-mail berisi detail untuk menyetel ulang kata sandi sudah dikiriman.',\n\t'ResetPassInfo'\t\t   => 'Jika Anda lupa kata sandi, Anda dapat menyetel ulang dengan cara memasukkan alamat e-mail yang digunakan ketika mendaftarkan akun.',\n\t'ResetPassInfo2'\t\t  => 'Alamat e-mail harus benar untuk melakukan pengiriman sebuah e-mail ke alamat yang dicantumkan yang berisi tautan untuk menyetel ulang kata sandi akun Anda.',\n\t'ResetPassServerLabel'\t=> 'Server Terdaftar',\n\t'ResetPassAccountLabel'   => 'Nama Pengguna',\n\t'ResetPassEmailLabel'\t => 'Alamat E-Mail',\n\t'ResetPassServerInfo'\t => 'Server tempat akun didaftarkan.',\n\t'ResetPassAccountInfo'\t=> 'Nama pengguna yang didaftarkan.',\n\t'ResetPassEmailInfo'\t  => 'Alamat e-mail ini digunakan ketika Anda melakukan pendaftaran akun di atas.',\n\t'ResetPassButton'\t\t => 'Kirim E-mail Penyetelan Ulang Kata Sandi',\n\t// - account/resetpw\n\t'ResetPwTitle'\t\t\t=> 'Reset Kata Sandi',\n\t'ResetPwFailed'\t\t   => 'Gagal untuk menyetel ulang kata sandi, ulangi beberapa saat lagi.',\n\t'ResetPwDone'\t\t\t => 'Kata sandi telah disetel ulang. Sebuah e-mail berisi kata sandi baru telah dikirimkan, silahkan cek e-mail Anda.',\n\t'ResetPwDone2'\t\t\t=> 'Kata sandi sudah disetel ulang, tetapi e-mail yang berisi kata sandi baru gagal untuk dikirim. Silahkan ulangi menyetel ulang kata sandi.',\n\t// - account/transfer\n\t'TransferTitle'\t\t   => 'Transfer Kredit',\n\t'TransferGreaterThanOne'  => 'Anda harus mengirimkan jumlah kredit yang lebih besar dari 1.',\n\t'TransferEnterCharName'   => 'Anda harus mengisi nama karakter penerima kredit.',\n\t'TransferNoCharExists'\t=> \"Karakter '%s' tidak ditemukan. Harap periksa kembali nama karakter tersebut.\",\n\t'TransferNoBalance'\t   => 'Anda tidak memiliki jumlah kredit yang cukup untuk melakukan transfer.',\n\t'TransferUnexpectedError' => 'Error! Harap hubungi admin.',\n\t'TransferSuccessful'\t  => 'Kredit telah dikirim!',\n\t'TransferHeading'\t\t => 'Transfer Kredit',\n\t'TransferSubHeading'\t  => 'Kredit akan ditransfer kepada karakter di server %s .',\n\t'TransferInfo'\t\t\t=> 'Kredit sekarang %s .',\n\t'TransferInfo2'\t\t   => 'Masukkan jumlah yang ingin Anda transfer dan nama karakter yang berada di akun yang ingin Anda tuju.',\n\t'TransferAmountLabel'\t => 'Jumlah Kredit',\n\t'TransferCharNameLabel'   => 'Nama Karakter',\n\t'TransferAmountInfo'\t  => 'Jumlah kredit yang akan Anda kirim.',\n\t'TransferCharNameInfo'\t=> 'Nama karakter penerima kredit.',\n\t'TransferConfirm'\t\t => 'Apakah Anda yakin?',\n\t'TransferButton'\t\t  => 'Transfer',\n\t'TransferNoCredits'\t   => 'Anda tidak memiliki kredit di akun Anda.',\n\t// - account/view\n\t'VIPStateLabel'\t\t   => 'Status VIP',\n\t// * account/view submenus\n\t'ModifyAccountLink'\t   => 'Ubah Akun',\n\t'AccountViewTitle'\t\t=> 'Lihat Akun',\n\t'AccountViewTitle2'\t   => 'Sedang Melihat Akun (%s)',\n\t'AccountViewTitle3'\t   => 'Akun Saya',\n\t'AccountTempBanFailed'\t=> 'Gagal melakukan ban sementara pada akun.',\n\t'AccountPermBanFailed'\t=> 'Gagal melakukan ban permanen pada akun.',\n\t'AccountTempBanUnauth'\t=> 'Anda tidak dapat melakukan ban sementara pada akun ini.',\n\t'AccountPermBanUnauth'\t=> 'Anda tidak dapat melakukan ban permanen pada akun ini.',\n\t'AccountLiftTempBan'\t  => 'Ban sementara pada akun ini telah dibatalkan.',\n\t'AccountLiftPermBan'\t  => 'Ban permanen pada akun ini telah dibatalkan.',\n\t'AccountLiftBanUnauth'\t=> \"Anda tidak dapat menghapus status ban pada akun ini.\",\n\t'AccountViewHeading'\t  => 'Melihat Akun',\n\t'AccountViewDonateLink'   => '(Donasi!)',\n\t'AccountViewTempBanLabel' => 'Ban Sementara',\n\t'AccountViewPermBanLabel' => 'Ban Permanen',\n\t'AccountViewUnbanLabel'   => 'Hapus Ban',\n\t'AccountBanReasonLabel'   => 'Alasan:',\n\t'AccountBanUntilLabel'\t=> 'Ban Sampai:',\n\t'AccountTempBanButton'\t=> 'Ban Sementara',\n\t'AccountPermBanButton'\t=> 'Ban Permanen',\n\t'AccountTempUnbanButton'  => 'Hapus Ban Sementara',\n\t'AccountPermUnbanButton'  => 'Hapus Ban Permanen',\n\t'AccountBanConfirm'\t   => 'Apakah Anda yakin?',\n\t'AccountBanLogSubHeading' => 'Catatan Ban Untuk %s (Baru ke Lama)',\n\t'BanLogBanTypeLabel'\t  => 'Jenis Ban',\n\t'BanLogBanDateLabel'\t  => 'Tanggal Ban',\n\t'BanLogBanReasonLabel'\t=> 'Alasan Ban',\n\t'BanLogBannedByLabel'\t => 'Pemberi Ban',\n\t'BanLogBannedByCP'\t\t=> 'Control Panel',\n\t'BanTypeUnbanned'\t\t => 'Tidak di Ban',\n\t'BanTypePermBanned'\t   => 'Ban Permanen',\n\t'BanTypeTempBanned'\t   => 'Ban Sementara',\n\t'AccountViewCharSubHead'  => 'Karakter Pada %s',\n\t'AccountViewSlotLabel'\t=> 'Slot',\n\t'AccountViewCharLabel'\t=> 'Nama Karakter',\n\t'AccountViewClassLabel'   => 'Job Class',\n\t'AccountViewLvlLabel'\t => 'Base Level',\n\t'AccountViewJlvlLabel'\t=> 'Job Level',\n\t'AccountViewZenyLabel'\t=> 'Zeny',\n\t'AccountViewGuildLabel'   => 'Guild',\n\t'AccountViewStatusLabel'  => 'Status',\n\t'AccountViewPrefsLabel'   => 'Pengaturan',\n\t'CharModifyPrefsLink'\t => 'Ubah Pengaturan',\n\t'AccountViewNoChars'\t  => 'Akun ini tidak memiliki karakter di %s.',\n\t'AccountViewStorage'\t  => 'Penyimpanan Barang Milik %s',\n\t'AccountViewStorageCount' => '%s memiliki %s barang di penyimpanan.',\n\t'AccountViewNoStorage'\t=> 'Tidak ada apapun di dalam penyimpanan barang.',\n\t'AccountViewNotFound'\t => \"Akun yang Anda cari tidak ditemukan.\",\n\t// - account/xferlog\n\t'XferLogTitle'\t\t\t=> 'Catatan Transfer Kredit',\n\t'XferLogHeading'\t\t  => 'Catatan Transfer Kredit',\n\t'XferLogReceivedSubHead'  => 'Transfer: Diterima',\n\t'XferLogSentSubHead'\t  => 'Transfer: Dikirim',\n\t'XferLogCreditsLabel'\t => 'Kredit',\n\t'XferLogFromLabel'\t\t=> 'Dari E-mail',\n\t'XferLogDateLabel'\t\t=> 'Tanggal Transfer',\n\t'XferLogCharNameLabel'\t=> 'Untuk Karakter',\n\t'XferLogNotReceived'\t  => 'Anda tidak menerima pengiriman kredit.',\n\t'XferLogNotSent'\t\t  => 'Anda tidak mengirim pengiriman kredit.',\n\n\t// Module: character\n\t// - character/changeslot\n\t// - character/index\n\t// - character/mapstats\n\t// - character/online\n\t// - character/prefs\n\t// - character/resetlook\n\t'CantResetLookWhenOnline' => 'Tidak dapat menyetel ulang penampilan %s ketika sedang online.',\n\t'ResetLookSuccessful'\t => 'Penampilan %s telah disetel ulang!',\n\t'ResetLookFailed'\t\t => 'Gagal untuk menyetel ulang penampilan %s.',\n\t// - character/resetpos\n\t'CantResetPosWhenOnline'  => 'Tidak dapat menyetel ulang posisi %s ketika sedang online.',\n\t'CantResetFromCurrentMap' => 'Anda tidak dapat menyetel ulang posisi %s di map saat ini.',\n\t'ResetPositionSuccessful' => 'Posisi %s telah disetel ulang!',\n\t'ResetPositionFailed'\t => 'Gagal untuk menyetel ulang posisi %s.',\n\t// - character/view\n\t// - character/divorce\n\t'DivorceTitle'\t\t\t=> 'Bercerai',\n\t'DivorceHeading'\t\t  => 'Bercerai',\n\t'DivorceNotMarried'\t   => '%s belum menikah dengan siapapun.',\n\t'DivorceInvalidPartner'   => 'ID pasangan tidak ditemukan.',\n\t'DivorceInvalidChild'\t => 'ID adopsi tidak ditemukan.',\n\t'DivorceMustBeOffline'\t=> '%s dan pasangannya harus dalam keadaan offline.',\n\t'DivorceMustBeOffline2'   => '%s, pasangan, dan anaknya harus dalam keadaan offline.',\n\t'DivorceText1'\t\t\t=> \"Apakah Anda ingin menceraikan dengan %s dan pasangannya?\",\n\t'DivorceText2'\t\t\t=> 'Apabila %s memiliki adopsi, status adopsi akan hilang.',\n\t'DivorceText3'\t\t\t=> \"Item 'Wedding ring' akan dihapus.\",\n\t'DivorceButton'\t\t   => 'Ya.',\n\t'DivorceSuccessful'\t   => '%s telah bercerai!',\n\n\t// Module: cplog\n\t// - cplog/index.php\n\t// - cplog/login.php\n\t// - cplog/paypal.php\n\t// - cplog/resetpass.php\n\t// - cplog/txnview.php\n\n\t// Module: donate\n\t// - donate/complete\n\t// - donate/history\n\t// - donate/index\n\t// - donate/trusted\n\n\t// Module: errors\n\t// - errors/missing_action\n\t'MissingActionTitle'\t  => 'Aksi Tidak Ditemukan',\n\t'MissingActionHeading'\t=> 'Aksi Tidak Ditemukan!',\n\t'MissingActionModLabel'   => 'Modul:',\n\t'MissingActionActLabel'   => 'Aksi:',\n\t'MissingActionReqLabel'   => 'URI Diminta:',\n\t'MissingActionLocLabel'   => 'Lokasi file:',\n\t// - errors/missing_view\n\t'MissingViewTitle'\t\t=> 'View Tidak Ditemukan',\n\t'MissingViewHeading'\t  => 'View Tidak Ditemukan!',\n\t'MissingViewModLabel'\t => 'Modul:',\n\t'MissingViewActLabel'\t => 'Aksi:',\n\t'MissingViewReqLabel'\t => 'URI Diminta:',\n\t'MissingViewLocLabel'\t => 'Lokasi file:',\n\n\t// Module: guild\n\t// - guild/export\n\t// - guild/index\n\t// - guild/view\n\n\t// Module: history\n\t// - history/cplogin\n\t'HistoryCpLoginTitle'\t => 'Login Control Panel',\n\t'HistoryCpLoginHeading'   => 'Login Control Panel',\n\t'HistoryLoginDateLabel'   => 'Waktu/Tanggal Login',\n\t'HistoryIpAddrLabel'\t  => 'Alamat IP',\n\t'HistoryErrorCodeLabel'   => 'Error Code',\n\t'HistoryNoCpLogins'\t   => 'Tidak ada percobaan login ke Control Panel.',\n\t// -history/emailchange\n\t'HistoryEmailTitle'\t   => 'Perubahan E-Mail',\n\t'HistoryEmailHeading'\t => 'Perubahan E-Mail',\n\t'HistoryEmailRequestDate' => 'Waktu/Tanggal Permohonan',\n\t'HistoryEmailRequestIp'   => 'IP Pemohon',\n\t'HistoryEmailOldAddress'  => 'E-Mail Lama',\n\t'HistoryEmailNewAddress'  => 'E-Mail Baru',\n\t'HistoryEmailChangeDate'  => 'Tanggal Perubahan',\n\t'HistoryEmailChangeIp'\t=> 'IP Perubahan',\n\t'HistoryNoEmailChanges'   => 'Tidak ada percobaan perubahan e-mail.',\n\t// - history/gamelogin\n\t'HistoryGameLoginTitle'   => 'Masuk ke Game',\n\t'HistoryGameLoginHeading' => 'Masuk ke Game',\n\t'HistoryRepsCodeLabel'\t=> 'Kode Respon',\n\t'HistoryLogMessageLabel'  => 'Catatan',\n\t'HistoryNoGameLogins'\t => 'Tidak ada percobaan Masuk ke Game.',\n\t// - history/index\n\t'HistoryIndexTitle'\t   => 'Aktivitas Akun',\n\t'HistoryIndexHeading'\t => 'Aktivitas Akun',\n\t'HistoryIndexInfo'\t\t=> 'Anda dapat melihat aktivitas yang telah lalu untuk akun Anda.',\n\t'HistoryIndexInfo2'\t   => 'Harap pilih aksi pada menu.',\n\t// - history/passchange\n\t'HistoryPassChangeTitle'\t  => 'Perubahan Kata Sandi',\n\t'HistoryPassChangeHeading'\t=> 'Perubahan Kata Sandi',\n\t'HistoryPassChangeChangeDate' => 'Tanggal Perubahan',\n\t'HistoryPassChangeChangeIp'   => 'IP Perubahan',\n\t'HistoryNoPassChanges'\t\t=> 'Tidak ada perubahan kata sandi.',\n\t// -history/passreset\n\t'HistoryPassResetTitle'\t   => 'Penyetelan Ulang Kata Sandi',\n\t'HistoryPassResetHeading'\t => 'Penyetelan Ulang Kata Sandi',\n\t'HistoryPassResetRequestDate' => 'Tanggal Meminta',\n\t'HistoryPassResetRequestIp'   => 'IP Peminta',\n\t'HistoryPassResetResetDate'   => 'Tanggal Penyetelan',\n\t'HistoryPassResetResetIp'\t => 'IP Penyetelan',\n\t'HistoryNoPassResets'\t\t => 'Tidak ada percobaan merubah kata sandi.',\n\n\t// Module: ipban\n\t// - ipban/add\n\t'IpbanAddTitle'\t\t   => 'Tambah Ban IP',\n\t'IpbanEnterIpPattern'\t => 'Harap masukkan alamat IP atau pola.',\n\t'IpbanInvalidPattern'\t => 'Alamat IP atau pola tidak sesuai.',\n\t'IpbanWhitelistedPattern' => 'Pola ini ada di whitelist dan tidak dapat diblokir.',\n\t'IpbanEnterReason'\t\t=> 'Harap masukkan alasan',\n\t'IpbanSelectUnbanDate'\t=> 'Tanggal unban dibutuhkan.',\n\t'IpbanFutureDate'\t\t => 'Tanggal unban harus tanggal yang akan datang.',\n\t'IpbanAlreadyBanned'\t  => 'IP yang sesuai dengan (%s) telah diban.',\n\t'IpbanPatternBanned'\t  => \"Pola/alamat IP '%s' telah diban.\",\n\t'IpbanAddFailed'\t\t  => 'Gagal menambahkan IP yang diban.',\n\t'IpbanAddHeading'\t\t => 'Tambahkan Ban IP',\n\t'IpbanIpAddressLabel'\t => 'Alamat IP',\n\t'IpbanReasonLabel'\t\t=> 'Alasan Ban',\n\t'IpbanUnbanDateLabel'\t => 'Tanggal Unban',\n\t'IpbanIpAddressInfo'\t  => 'Anda boleh memasukkan pola serperti 218.139.*.*',\n\t'IpbanAddButton'\t\t  => 'Tambahkan Ban IP',\n\t// - ipban/edit\n\t'IpbanEditTitle'\t\t  => 'Ubah Ban IP',\n\t'IpbanEnterEditReason'\t=> 'Harap masukkan alasan untuk perubahan ban IP',\n\t'IpbanEditFailed'\t\t => 'Gagal untuk mengubah ban IP.',\n\t'IpbanEditHeading'\t\t=> 'Ubah Ban IP',\n\t'IpbanEditReasonLabel'\t=> 'Ubah Alasan',\n\t'IpbanEditButton'\t\t => 'Modifikasi Ban IP',\n\t// - ipban/index\n\t'IpbanListTitle'\t\t  => 'Daftar Ban IP',\n\t'IpbanListHeading'\t\t=> 'Daftar Ban IP Ban',\n\t'IpbanBannedIpLabel'\t  => 'Banned IP',\n\t'IpbanBanDateLabel'\t   => 'Tanggal Ban',\n\t'IpbanBanReasonLabel'\t => 'Alasan Ban',\n\t'IpbanBanExpireLabel'\t => 'Tanggal Berakhir Ban',\n\t'IpbanModifyLink'\t\t => 'Ubah',\n\t'IpbanRemoveLink'\t\t => 'Hilangkan',\n\t'IpbanUnbanButton'\t\t=> 'Unban yang dipilih',\n\t'IpbanListNoBans'\t\t => 'Tidak ada ban IP saat ini.',\n\t// - ipban/remove\n\t'IpbanRemoveTitle'\t\t=> 'Hilangkan Ban IP',\n\t'IpbanEnterRemoveReason'  => 'Harap masukkan alasan untuk penghilangan ban IP.',\n\t'IpbanNotBanned'\t\t  => 'IP (%s) tidak ditemukan.',\n\t'IpbanPatternUnbanned'\t=> \"Pola/alamat IP '%s' telah di-unban.\",\n\t'IpbanRemoveFailed'\t   => 'Gagal untuk menghilangkan ban IP.',\n\t'IpbanRemoveHeading'\t  => 'Hilangkan Ban IP',\n\t'IpbanRemoveReasonLabel'  => 'Alasan Unban',\n\t'IpbanRemoveButton'\t   => 'Hilangkan Ban IP',\n\t// - ipban/unban\n\t'IpbanNothingToUnban'\t => 'Tidak ada yang di-unban.',\n\t'IpbanEnterUnbanReason'   => 'Harap masukkan alasan untuk pengangkatan ban IP.',\n\t'IpbanUnbanned'\t\t   => 'Ban IP telah dihilangkan!',\n\t'IpbanUnbanFailed'\t\t=> 'Gagal untuk menghilangkan %d ban IP!',\n\n\t// Module: item\n\t// - item/add\n\t// - item/copy\n\t// - item/edit\n\t// - item/index\n\t// - item/view\n\n\t// Module: itemshop\n\t// - itemshop/add\n\t// - itemshop/delete\n\t// - itemshop/edit\n\t// - itemshop/imagedel\n\n\t// Module: logdata\n\t// - logdata/chat\n\t// - logdata/cashpoints\n\t'CashLogTitle'\t => 'Daftar Log CashPoints',\n\t'CashLogHeading'\t => 'Log CashPoint',\n\t'CashLogNotFound'\t => 'Tidak ada log CashPoint.',\n\t'CashLogDateLabel'\t => 'Tanggal/Jam',\n\t'CashLogCharacterLabel'\t => 'Karakter',\n\t'CashLogTypeLabel'\t => 'Tipe',\n\t'CashLogCashTypeLabel'\t => 'Tipe Cash',\n\t'CashLogAmountLabel'\t => 'Jumlah',\n\t'CashLogMapLabel'\t => 'Map',\n\t// - logdata/command\n\t'CommandLogTitle'\t\t => 'Daftar Perintah',\n\t'CommandLogHeading'\t   => 'Perintah',\n\t'CommandLogNotFound'\t  => 'Perintah tidak ditemukan.',\n\t'CommandLogDateLabel'\t => 'Tanggal/Jam',\n\t'CommandLogAccountIdLabel'=> 'ID Akun',\n\t'CommandLogCharIdLabel'   => 'ID Karakter',\n\t'CommandLogCharNameLabel' => 'Nama Karakter',\n\t'CommandLogCommandLabel'  => 'Perintah',\n\t'CommandLogMapLabel'\t  => 'Map',\n\t// - logdata/index\n\t// - logdata/login\n\t// - logdata/pick\n\t'PickLogTitle'\t\t\t=> 'Daftar Barang yang Diambil',\n\t'PickLogHeading'\t\t  => 'Barang Diambil',\n\t'PickLogNotFound'\t\t => 'Tidak ada barang yang diambil.',\n\t'PickLogDateLabel'\t\t=> 'Tanggal/Jam',\n\t'PickLogCharacterLabel'   => 'Karakter',\n\t'PickLogTypeLabel'\t\t=> 'Tipe',\n\t'PickLogItemLabel'\t\t=> 'Nama Barang',\n\t'PickLogAmountLabel'\t  => 'Jumlah',\n\t'PickLogRefineLabel'\t  => 'Tempa',\n\t'PickLogCard0Label'\t   => 'Kartu 1',\n\t'PickLogCard1Label'\t   => 'Kartu 2',\n\t'PickLogCard2Label'\t   => 'Kartu 3',\n\t'PickLogCard3Label'\t   => 'Kartu 4',\n\t'PickLogMapLabel'\t\t => 'Map',\n\t//\t\t- logdata/branch\n\t'BranchLogTitle'\t\t\t=> 'Daftar Branch',\n\t'BranchLogHeading'\t\t  => 'Branch Log',\n\t'BranchLogNotFound'\t\t => 'Tidak ada log branch yang ditemukan.',\n\t'BranchLogIDLabel'\t\t  => 'ID Branch Log',\n\t'BranchLogDateLabel'\t\t=> 'Tanggal/Jam',\n\t'BranchLogAccountIDLabel'   => 'ID Akun',\n\t'BranchLogCharIDLabel'\t  => 'ID Karakter',\n\t'BranchLogCharNameLabel'\t=> 'Nama Karakter',\n\t'BranchLogMapLabel'\t\t => 'Map',\n\t// - logdata/char\n\t'CharLogTitle'\t\t\t=> 'Dafatr Log Karakter',\n\t'CharLogHeading'\t\t  => 'Log Karakter',\n\t'CharLogNotFound'\t\t => 'Tidak ada log karakter yang ditemukan.',\n\t'CharLogDateLabel'\t\t=> 'Tanggal/Jam',\n\t'CharLogMsgLabel'\t\t => 'Aksi',\n\t'CharLogAccountIDLabel'   => 'ID Akun',\n\t'CharLogCharNumLabel'\t => 'Slot karakter',\n\t'CharLogCharNameLabel'\t=> 'Nama Karakter',\n\t// - logdata/inter\n\t'InterLogTitle'\t\t\t=> 'Daftar Log Interaksi',\n\t'InterLogHeading'\t\t  => 'Log Interaksi',\n\t'InterLogNotFound'\t\t => 'Tidak ada log interaksi yang diteukan.',\n\t'InterLogDateLabel'\t\t=> 'Tanggal/Jam',\n\t'InterLogLabel'\t\t\t=> 'Log Interaksi',\n\t// - logdata/mvp\n\t'MVPLogTitle'\t\t\t=> 'Daftar Log MVP',\n\t'MVPLogHeading'\t\t  => 'Log MVP',\n\t'MVPLogNotFound'\t\t => 'Tidak ada log MVP yang ditemukan.',\n\t'MVPLogIDLabel'\t\t  => 'ID Log MVP',\n\t'MVPLogDateLabel'\t\t=> 'Tanggal/Jam',\n\t'MVPLogCharacterLabel'   => 'ID Karakter',\n\t'MVPLogMonsterLabel'\t => 'Monster MVP',\n\t'MVPLogPrizeLabel'\t   => 'Hadiah MVP',\n\t'MVPLogExpLabel'\t\t => 'Exp. MVP',\n\t'MVPLogMapLabel'\t\t => 'Map',\n\t//\t\t- logdata/npc\n\t'NPCLogTitle'\t\t\t=> 'Daftar Log NPC',\n\t'NPCLogHeading'\t\t  => 'Log NPC',\n\t'NPCLogNotFound'\t\t => 'Tidak ada log NPC yang ditemukan.',\n\t'NPCLogIDLabel'\t\t  => 'ID NPC',\n\t'NPCLogDateLabel'\t\t=> 'Tanggal/Jam',\n\t'NPCLogAccountIDLabel'   => 'ID Akun',\n\t'NPCLogCharIDLabel'\t  => 'ID Karakter',\n\t'NPCLogCharNameLabel'\t=> 'Nama Karakter',\n\t'NPCLogMapLabel'\t\t => 'Map',\n\t'NPCLogMsgLabel'\t\t => 'Pesan',\n\t// - logdata/zeny\n\t'ZenyLogTitle'\t\t\t=> 'Dafatr Log Zeny',\n\t'ZenyLogHeading'\t\t  => 'Log Zeny',\n\t'ZenyLogNotFound'\t\t => 'Tidak ada log Zeny yang ditenukan.',\n\t'ZenyLogDateLabel'\t\t=> 'Tanggal/Jam',\n\t'ZenyLogCharacterLabel'   => 'Karakter',\n\t'ZenyLogSourceLabel'\t  => 'Sumber',\n\t'ZenyLogTypeLabel'\t\t=> 'Tipe',\n\t'ZenyLogAmountLabel'\t  => 'Jumlah',\n\t'ZenyLogMapLabel'\t\t => 'Map',\n\n\t// Module: mail\n\t// - mail/index\n\t'MailerTitle'\t\t\t => 'Formulir Pesan (Form Mailer)',\n\t'MailerHeading'\t\t   => 'Formulir Pesan',\n\t'MailerEnterToAddress'\t=> 'Harap masukkan alamat tujuan.',\n\t'MailerEnterSubject'\t  => 'Harap masukkan judul.',\n\t'MailerEnterBodyText'\t => 'Harap masukkan beberapa isi pesan.',\n\t'MailerEmailHasBeenSent'  => 'E-mail anda telah sukses dikirim ke %s.',\n\t'MailerFailedToSend'\t  => 'Sistem pengiriman pesan gagal untuk mengirim e-mail. Mungkin terjadi karena kesalahan konfigurasi.',\n\t'MailerInfo'\t\t\t  => 'Anda diperbolehkan menggunakan formulir pesan di bawah ini untuk mengirimkan e-mail menggunakan control panel.',\n\t'MailerFromLabel'\t\t => 'Dari',\n\t'MailerToLabel'\t\t   => 'Tujuan',\n\t'MailerSubjectLabel'\t  => 'Judul',\n\t'MailerBodyLabel'\t\t => 'isi',\n\t'MailerSelectTemplateLabel'\t => 'Pilih Template',\n\n\t// Module: main\n\t// - main/index\n\t'MainPageHeading'\t\t => 'Flux Control Panel',\n\t'MainPageInfo'\t\t\t=> 'Jika Anda melihat halaman ini, berarti Flux telah berhasil diinstal.',\n\t'MainPageInfo2'\t\t   => 'Yakin untuk mengubah halaman ini?',\n\t'MainPageStep1'\t\t   => 'Membuka \"%s\" di teks editor.',\n\t'MainPageStep2'\t\t   => 'Ubah file dari editor dan simpan perubahan.',\n\t'MainPageThanks'\t\t  => 'Terima kasih telah menggunakan Flux!',\n\t'MainPageWelcome'\t => 'Selamat datang di %s!',\n\t// - main/pagenotfound\n\t'PageNotFoundTitle'\t   => '404 Page Not Found',\n\t'PageNotFoundHeading'\t => 'Halaman Tidak Ditemukan',\n\t'PageNotFoundInfo'\t\t=> 'Halaman yang diminta tidak ditemukan. Harap periksa kembali alamat yang dimasukkan.',\n\t// - main/preprocess\n\t'DisallowedDuringWoE'\t => 'Halaman yang diminta tidak dapat diakses ketika WoE.',\n\n\t// Module: monster\n\t// - monster/index\n\t// - monster/view\n\n\t// Module: purchase\n\t// - purchase/add\n\t// - purchase/cart\n\t// - purchase/checkout\n\t// - purchase/clear\n\t// - purchase/index\n\t// - purchase/pending\n\t// - purchase/remove\n\n\t// Module: ranking\n\t// - ranking/character\n\t// - ranking/guild\n\t// - ranking/zeny\n\n\t// Module: server\n\t// - server/info\n\t'ServerInfoTitle'\t\t => 'Informasi Server',\n\t'ServerInfoHeading'\t   => 'Informasi Server',\n\t'ServerInfoText'\t\t  => 'Di sini Anda akan menemukan berbagai informasi tentang server.',\n\t'ServerInfoSubHeading'\t=> 'Informasi untuk %s',\n\t'ServerInfoSubHeading2'   => 'Informasi Class untuk %s',\n\t'ServerInfoAccountLabel'  => 'Akun',\n\t'ServerInfoCharLabel'\t => 'Karakter',\n\t'ServerInfoGuildLabel'\t=> 'Guild',\n\t'ServerInfoPartyLabel'\t=> 'Parties',\n\t'ServerInfoZenyLabel'\t => 'Zeny',\n\t// - server/status\n\t'ServerStatusTitle'\t   => 'Status Server Saat Ini',\n\t'ServerStatusHeading'\t => 'Status Server',\n\t'ServerStatusInfo'\t\t=> \"Berikut ini adalah status dari tiap server.\",\n\t'ServerStatusServerLabel' => 'Server',\n\t'ServerStatusLoginLabel'  => 'Login Server',\n\t'ServerStatusCharLabel'   => 'Character Server',\n\t'ServerStatusMapLabel'\t=> 'Map Server',\n\t'ServerStatusOnlineLabel' => 'Pemain Online',\n\t'ServerStatusPeakLabel'   => 'Pemain Terbanyak',\n\n\t// Module: service\n\t// - service/tos\n\t'TermsTitle'\t\t\t  => 'Syarat dan Ketentuan',\n\t'TermsHeading'\t\t\t=> 'Syarat dan Ketentuan',\n\t'TermsInfo'\t\t\t   => 'Harap dibaca sebelum Anda membuat akun!',\n\t'TermsInfo2'\t\t\t  => \"FOR CONTROL PANEL ADMINISTRATOR:  Anda harus menambahkan server ToS pada tampilan ini secara langsung. Lokasi dari file ini adalah: %s\",\n\n\t// Module: unauthorized\n\t// - unauthorized/index\n\t'UnauthorizedTitle'\t   => 'Tidak Diperbolehkan',\n\t'UnauthorizedHeading'\t => 'Tidak Diperbolehkan',\n\t'UnauthorizedInfo'\t\t=> 'Anda tidak diperbolehkan untuk melihat halaman ini. <a href=\"%s\">Kembali ke sebelumnya…</a>',\n\n\t// Module: woe\n\t// - woe/index\n\t'WoeTitle'\t\t\t\t=> 'Jadwal WoE',\n\t'WoeHeading'\t\t\t  => 'Jadwal War of Emperium',\n\t'WoeInfo'\t\t\t\t => 'Di bawah ini adalah jadwal WoE untuk %d. Jadwal berikut mungkin bisa berubah sewaktu-waktu.',\n\t'WoeServerTimeInfo'\t   => 'Waktu server saat ini adalah:',\n\t'WoeServerLabel'\t\t  => 'Server',\n\t'WoeTimesLabel'\t\t   => 'Jadwal War of Emperium',\n\t'WoeNotScheduledInfo'\t => 'Tidak ada jadwal WoE saat ini.',\n\n\t// Module: contactform\n\t'CFTitleSubmit'\t\t\t\t\t\t=> 'Hubungi Kami',\n\n\t// Module: News and Pages\n\t'CMSNewsHeader'\t => 'Pengumuman',\n\t'CMSPageHeader'\t => 'Content Management System',\n\t'CMSPageText'\t => 'Modul ini mengizinkan admin dan staff untuk membuat halaman pada website tanpa perlu pengetahuan tentang Flux/pemrograman. Sistem berita internal juga dapat ekspor untuk RSS Feed dengan mengubah pengaturan aplikasi.',\n\t'CMSNewsTitleError'\t => 'Judul Berita harus diisi!',\n\t'CMSNewsBodyError'\t => 'Isi Berita harus diisi!',\n\t'CMSPageTitleError'\t => 'Judul Halaman harus diisi!',\n\t'CMSPageBodyError'\t => 'Isi Halaman harus diisi!',\n\t'CMSPagePathError'\t => 'Lokasi Halaman harus diisi!',\n\t'CMSNewsAdded'\t => 'Berita telah ditambahkan',\n\t'CMSPagesAdded'\t => 'Halaman telah ditambahkan',\n\t'CMSNewsUpdated'\t => 'Berita telah diperbaruhi',\n\t'CMSPageUpdated'\t => 'Halaman telah diperbaruhi',\n\t'CMSNewsAddTitle'\t => 'Menambahkan isi beritaAdd a news item',\n\t'CMSPageAddTitle'\t => 'Membuat halaman baru',\n\t'CMSNewsEditTitle'\t => 'Mengubah berita',\n\t'CMSPageEditTitle'\t => 'Mengubah halaman',\n\t'CMSNewsNotFound'\t => 'Berita tidak ditemukan!',\n\t'CMSPageNotFound'\t => 'Halaman tidak ditemukan!',\n\t'CMSNewsDeleted'\t => 'Berita telah dihapus',\n\t'CMSPageDeleted'\t => 'Halamna telah dihapus',\n\t'CMSNewsEmpty'\t => 'Tidak ada bertia yang ditemukan. Cek kembali Tipe Berita di pengaturan? (pengaturan CMSNewsType)',\n\t'CMSNewsRSSNotFound'\t => \"RSS feed tidak dapat ditemukan. Cek kembali pengaturan CMSNewsRSS, atau ganti tipe CMSNewsType menjadi 1 untuk menggunakan sistem berita internal!\",\n\t'CMSPageEmpty'\t => 'Tidak ada halaman',\n\t'CMSNewsLink'\t => 'baca selengkapnya...',\n\t'CMSEdit'\t => 'Perbaruhi',\n\t'CMSDelete'\t => 'Hapus',\n\t'CMSNewsTitleLabel'\t => 'Judul Berita',\n\t'CMSNewsBodyLabel'\t => 'Isi Berita',\n\t'CMSNewsLinkLabel'\t => 'Tautan Berita',\n\t'CMSNewsAuthorLabel'\t => 'Penulis Berita',\n\t'CMSPageTitleLabel'\t => 'Judul Halaman',\n\t'CMSPageBodyLabel'\t => 'Isi Halaman',\n\t'CMSPagePathLabel'\t => 'Lokasi Halaman',\n\t'CMSCreatedLabel'\t => 'Tanggal Pembuatan',\n\t'CMSModifiedLabel'\t => 'Tanggal Diperbaruhi',\n\t'CMSActionLabel'\t => 'Tindakan',\n\t'CMSConfirmDeleteLabel'\t => 'Apakah yakin untuk menghapus?',\n\t'CMSPageCreate'\t => 'Apakah yakin membuat halaman?',\n\t'CMSOptionalLabel'\t => '(Opsional)',\n\t'CMSRequiredLabel'\t => '(Harus Diisi)',\n\t'CMSCreateLabel'\t => 'Buat Berita Baru',\n\n\t// Module: vending\n\t'TLHeaderTasks'\t\t\t\t\t\t=> 'Tugas',\n\t'TLHeaderOwner'\t\t\t\t\t\t=> 'Pemilik',\n\t'TLHeaderPriority'\t\t\t\t=> 'Prioritas',\n\t'TLHeaderStatus'\t\t\t\t=> 'Status',\n\t'TLHeaderCreated'\t\t\t\t=> 'Dibuat',\n\t'TLHeaderModified'\t\t\t\t=> 'Diubah',\n\t'TLHeaderResources'\t\t\t\t=> 'Bahan Tambahan',\n\t'TLHeaderBody'\t\t\t\t\t\t=> 'Isi',\n\n\t// Module: servicedesk\n\t'SDHeader'\t\t\t\t\t\t\t\t=> 'Layanan Bantuan',\n\t'SDCreateNew'\t\t\t\t\t\t=> 'Kirim Laporan',\n\t'SDWelcomeText'\t\t\t\t\t\t=> 'Selamat datang di Layanan Bantuan',\n\t'SDNoTickets'\t\t\t\t\t\t=> 'Anda tidak memiliki laporan apapun.',\n\t'SDNoBlankResponse'\t\t\t\t=> 'Anda harus mengisi data ke dalam formulir!',\n\t'SDNoCatsAvailable'\t\t\t\t=> 'Tidak ada kategori yang tersedia',\n\t'SDNoOpenTickets'\t\t\t\t=> 'Tidak ada laporan di database.',\n\t'SDNoInactiveTickets'\t\t=> \"Tidak ada laporan yang 'tidak aktif' di database.\",\n\t'SDNoClosedTickets'\t\t\t\t=> \"Tidak ada laporan yang 'ditutup' di database.\",\n\t'SDNoCats'\t\t\t\t\t\t\t\t=> 'Tidak ada kategori di database.',\n\t'SDHuh'\t\t\t\t\t\t\t\t\t\t=> 'Error',\n\t'SDPointerChatLog'\t\t\t\t=> 'Kami sarankan untuk menggunakan <a href=\"http://pastebin.com\" target=\"_blank\">pastebin.com</a> lalu kirimkan tautannya pada kami.',\n\t'SDPointerScreenShot'\t\t=> 'Kirimkan juga tautan dari gambar atau screenshot yang Anda punya',\n\t'SDPointerVideoLink'\t\t=> 'Kami sarankan untuk mengunggah video Anda ke YouTube, lalu kirimkan tautannya pada kami.',\n\t'SDHeaderID'\t\t\t\t\t\t=> 'Laporan #',\n\t'SDHeaderSubject'\t\t\t\t=> 'Subjek',\n\t'SDHeaderCategory'\t\t\t\t=> 'Kategori',\n\t'SDHeaderStatus'\t\t\t\t=> 'Status',\n\t'SDHeaderLastAuthor'\t\t=> 'Penulis Terakhir',\n\t'SDHeaderTimestamp'\t\t\t\t=> 'Dibuat',\n\t'SDHeaderAccount'\t\t\t\t=> 'Akun',\n\t'SDHeaderTeam'\t\t\t\t\t\t=> 'Tim',\n\t'SDH3ActiveTickets'\t\t\t\t=> 'Laporan Aktif',\n\t'SDH3InActiveTickets'\t\t=> 'Laporan Tidak Aktif',\n\t'SDH3ClosedTickets'\t\t\t\t=> 'Laporan Ditutup',\n\t'SDH3CurrentCat'\t\t\t\t=> 'Kategori',\n\t'SDH3CreateCat'\t\t\t\t\t\t=> 'Buat Kategori Baru',\n\t'SDH3StaffList'\t\t\t\t\t\t=> 'Pengaturan Staf',\n\t'SDH3StaffCreate'\t\t\t\t=> 'Tambah Staf',\n\t'SDReOpenPlayer'\t\t\t\t=> 'Laporan diaktifkan kembali oleh pemain',\n\t'SDReOpenStaff'\t\t\t\t\t\t=> '',\n\t'SDRespTable1'\t\t\t\t\t\t=> 'Balas dan Kembali ke Laporan',\n\t'SDRespTable2'\t\t\t\t\t\t=> 'Balas dan Kembali ke Daftar Laporan',\n\t'SDRespTable3'\t\t\t\t\t\t=> 'Balas dan Tutup Laporan',\n\t'SDRespTable4'\t\t\t\t\t\t=> 'Balas dan Tingkatkan Status',\n\t'SDRespTable5'\t\t\t\t\t\t=> 'Tutup Laporan',\n\t'SDRespTable6'\t\t\t\t\t\t=> 'Balas dan Aktifkan Laporan',\n\t'SDRespTable7'\t => 'Resolve Ticket dan Credit Account',\n\t'SDGroup1'\t\t\t\t\t\t\t\t=> 'Staf Layanan Bantuan',\n\t'SDGroup2'\t\t\t\t\t\t\t\t=> 'Kepala Staf Layanan Bantuan',\n\t'SDGroup3'\t\t\t\t\t\t\t\t=> 'Administrasi',\n\t'SDLinkOpenNew'\t\t\t\t\t\t=> 'Buat laporan baru',\n\n\t// Module: webcommands\n\t'WCTitleLabel'\t\t=> 'Web Commands',\n\n);\n?>\n"
  },
  {
    "path": "lang/pt_br.php",
    "content": "<?php\nreturn array(\n\t// Generic/Misc.\n\t'Language'                => 'Portuguese',\n\t'YesLabel'                => 'Sim',\n\t'NoLabel'                 => 'Não',\n\t'NoteLabel'               => 'Nota',\n\t'GenderTypeMale'          => 'Masculino',\n\t'GenderTypeFemale'        => 'Feminino',\n\t'GenderTypeServer'        => 'Servidor',\n\t'RefreshSecurityCode'     => 'Atualizar Código de Segurança',\n\t'NoneLabel'               => 'Nada',\n\t'NeverLabel'              => 'Nunca',\n\t'NotApplicableLabel'      => 'Não Aplicável',\n\t'UnknownLabel'            => 'Desconhecido',\n\t'IsEqualToLabel'          => 'é igual a',\n\t'IsGreaterThanLabel'      => 'é maior que',\n\t'IsLessThanLabel'         => 'é menor que',\n\t'AllLabel'                => 'Tudo',\n\t'SearchLabel'             => 'Procurar…',\n\t'GoBackLabel'             => 'Voltar à página anterior…',\n\t'SearchButton'            => 'Procurar',\n\t'ResetButton'             => 'Resetar',\n\t'FilterButton'            => 'Filtrar',\n\t'NotAcceptingDonations'   => \"Desculpe, mas nós não estamos aceitando doações no momento. Desculpas pela inconveniência.\",\n\t//'NotAcceptingDonations'   => \"We're sorry, but our donation system is currently undergoing maintenance, please try again later.\",\n\t'FoundSearchResults'      => 'Encontrado um total de %d registro(s) em %d páginas(s).  Mostrando %d-%d.',\n\t'LoginToDonate'           => 'Por favor, faça login para poder doar.',\n\t'UnknownCharacter'        => 'Nenhum personagem encontrado.',\n\t'AccountIdLabel'          => 'ID da Conta',\n\t'AccountGroupIDLabel'     => 'Level do Grupo',\n\t'AccountStateLabel'       => 'Status da Conta',\n\t'CreditBalanceLabel'      => 'Balanço de Crédito',\n\t'UsernameLabel'           => 'Usuário',\n\t'PasswordLabel'           => 'Senha',\n\t'EmailAddressLabel'       => 'E-mail',\n\t'GenderLabel'             => 'Gênero',\n\t'LoginCountLabel'         => 'Contagem de Login',\n\t'LastLoginDateLabel'      => 'Data do último Login',\n\t'LastUsedIpLabel'         => 'Último IP registrado',\n\t'AccountStateNormal'      => 'Normal',\n\t'AccountStatePending'     => 'Pendente',\n\t'AccountStatePermBanned'  => 'Banido Permanentemente',\n\t'AccountStateTempBanLbl'  => 'Banido Temporariamente',\n\t'AccountStateTempBanned'  => 'Banido Temp. (Desbanir: %s)',\n\t'OnlineLabel'             => 'Online',\n\t'OfflineLabel'            => 'Offline',\n\t'ItemIdLabel'             => 'ID do Item',\n\t'ItemNameLabel'           => 'Nome do Item',\n\t'ItemAmountLabel'         => 'Quantidade',\n\t'ItemIdentifyLabel'       => 'Identificado',\n\t'ItemRefineLabel'         => 'Refinado',\n\t'ItemBrokenLabel'         => 'Quebrado',\n\t'ItemCard0Label'          => 'Carta 1',\n\t'ItemCard1Label'          => 'Carta 2',\n\t'ItemCard2Label'          => 'Carta 3',\n\t'ItemCard3Label'          => 'Carta 4',\n\n\t// Security\n\t'SecuritySessionInvalid'  => 'Desculpe, a sessão expirou, tente novamente.',\n\t'SecurityNeedSession'     => 'Desculpe, nenhuma sessão foi encontrada (tentativa de hack?)',\n\t'SecurityNeedToken'       => 'Desculpe, nenhum sinal encontrado para identificar esta forma (tentativa de hack?)',\n\n\t// Module: account\n\t// - account/changemail\n\t'EmailChangeTitle'        => 'Alterar E-mail',\n\t'EnterEmailAddress'       => 'Insira um E-mail.',\n\t'EmailCannotBeSame'       => 'Seu novo e-mail não pode ser igual ao atual.',\n\t'EmailInvalid'            => 'Endereço de e-mail inválido.',\n\t'EmailAlreadyRegistered'  => \"Esse e-mail já está registrado para outra conta, insira outro.\",\n\t'EmailChangeSent'         => 'Uma mensagem foi enviada para o seu novo email com um link para confirmar a alteração.',\n\t'EmailAddressChanged'     => 'Seu e-mail foi alterado com sucesso!',\n\t'EmailChangeFailed'       => 'Falha ao alterar e-mail. Tente novamente mais tarde.',\n\t'EmailChangeHeading'      => 'Alterar E-mail',\n\t'EmailChangeInfo'         => 'Se você quer alterar o e-mail cadastrado na sua conta, preencha o formulário abaixo.',\n\t'EmailChangeInfo2'        => 'Depois de enviar o formulário, você receberá uma mensagem no seu novo email contendo um link para você confirmar a sua alteração.',\n\t'EmailChangeLabel'        => 'Novo E-mail',\n\t'EmailChangeInputNote'    => 'Deve ser um e-mail válido!',\n\t'EmailChangeButton'       => 'Alterar E-mail',\n\t// - account/changepass\n\t'PasswordChangeTitle'     => 'Alterar Senha',\n\t'NeedCurrentPassword'     => 'Insira a sua senha atual.',\n\t'NeedNewPassword'         => 'Insira a sua nova senha.',\n\t'OldPasswordInvalid'      => \"A senha que você digitou não bate com a sua senha real.\",\n\t'ConfirmNewPassword'      => 'Confirme sua nova senha.',\n\t'NewPasswordHasUsername'  => 'Sua nova senha não deve conter seu nome de usuário..',\n\t'NewPasswordInvalid'      => 'Senha alterada com sucesso, favor faça login novamente.',\n\t'NewPasswordSameAsOld'    => 'Nova senha não pode ser a mesma que sua senha atual.',\n\t'NewPasswordNeedUpper'    => 'Sua nova senha deve conter pelo menos %d letra(s) maiúsculas.',\n\t'NewPasswordNeedLower'    => 'Sua nova senha deve conter pelo menos %d letra(s) minúsculas.',\n\t'NewPasswordNeedNumber'   => 'Sua nova senha deve conter pelo menos %d número(s).',\n\t'NewPasswordNeedSymbol'   => 'Sua nova senha deve conter pelo menos %d símbolo (s).',\n\t'PasswordHasBeenChanged'  => 'Sua senha foi alterada, por favor, faça log-in novamente.',\n\t'FailedToChangePassword'  => 'Falha ao alterar sua senha. Por favor, contate um administrador.',\n\t'PasswordChangeHeading'   => 'Alterar sua Senha',\n\t'PasswordChangeInfo'      => 'Por favor, digite sua senha atual e, em seguida, digite a nova senha que deseja usar e digite novamente para confirmar.',\n\t'CurrentPasswordLabel'    => 'Senha Atual',\n\t'NewPasswordLabel'        => 'Nova Senha',\n\t'NewPasswordConfirmLabel' => 'Re-digite a nova senha',\n\t'PasswordChangeNote'      => 'Por favor, certifique-se de digitar as informações corretas.',\n\t'PasswordChangeNote2'     => 'Após alterar sua senha, você será registrado.',\n\t'PasswordChangeButton'    => 'Alterar Senha',\n\t// - account/changesex\n\t'GenderChangeTitle'       => 'Alterar Gênero',\n\t'GenderChangeBadChars'    => 'Você não pode trocar de gênero se algum dos seus personagens é um %s',\n\t'GenderChanged'           => 'Seu gênero foi alterado com sucesso e $d créditos foram debitados sua conta.',\n\t'GenderChangedForFree'    => 'Gênero alterado com sucesso.',\n\t'GenderChangeHeading'     => 'Altere Seu Gênero',\n\t'GenderChangeCost'        => 'Mudança de Gênero vai custar %s créditos para você.',\n\t'GenderChangeBalance'     => 'Você possui atualmente %s créditos.',\n\t'GenderChangeNoFunds'     => 'Você não possui créditos suficiente para completar a sua troca de gênero.',\n\t'GenderChangeNoCost'      => 'Para você, as mudanças de sexo são livres.',\n\t'GenderChangeCharInfo'    => 'Você não pode alterar seu gênero se você tiver um personagem que for um: %s',\n\t'GenderChangeSubHeading'  => 'Tenha certeza que você quer realmente alterar!',\n\t'GenderChangeFormText'    => 'Você deseja mudar seu gênero para %s?',\n\t'GenderChangeConfirm'     => 'Você tem certeza que quer alterar seu gênero?',\n\t'GenderChangeButton'      => 'Sim, por favor.',\n\t// - account/confirm\n\t'AccountConfirmTitle'     => 'Confirmar Conta',\n\t'AccountConfirmUnban'     => 'A conta foi confirmada e ativada.',\n\t'AccountConfirmMessage'   => 'Sua conta foi confirmada e ativada, agora você pode fazer login.',\n\t// - account/confirmemail\n\t'EmailConfirmTitle'       => 'Confirmar E-mail',\n\t'EmailConfirmFailed'      => 'Tivemos um problema técnico durante sua alteração de email, por favor entre em contato com algum Administrador.',\n\t'EmailConfirmChanged'     => 'Seu e-mail foi alterado com sucesso!',\n\t// - account/create\n\t'AccountCreateTitle'      => 'Criar Uma Conta',\n\t'AccountConfirmBan'       => 'Esperando ativação da conta: %s',\n\t'AccountCreateEmailSent'  => 'Um e-mail foi enviado contendo as informações de ativação da conta, por favor, cheque seu email e ative a sua conta para poder fazer login.',\n\t'AccountCreateFailed'     => 'Sua conta foi criada, mas infelizmente houve uma falha ao lhe enviar o email de confirmação devido a problemas técnicos. Por favor, procure algum GM ou Administrador para resolver o seu problema.',\n\t'AccountCreated'          => 'Parabéns! Você foi registrado com sucesso e você já está logado!',\n\t'AccountCreateHeading'    => 'Registrar',\n\t'AccountCreateTerms'      => 'Termos de Serviço',\n\t'AccountCreateInfo'       => 'Por favor, leia os nossos %s antes de criar uma conta, tenha certeza que você entendeu as regras para poder ter uma conta no nosso servidor.',\n\t'AccountCreateInfo2'      => 'Clicando em \"Criar Minha Conta\", você estará concordando com os nossos %s.',\n\t'AccountCreateGenderInfo' => \"O gênero que você escolheu irá afetar o gênero do seu personagem in-game!\",\n\t'AccountServerLabel'      => 'Servidor',\n\t'AccountUsernameLabel'    => 'Seu Usuário',\n\t'AccountPasswordLabel'    => 'Sua Senha',\n\t'AccountPassConfirmLabel' => 'Confirmar Senha',\n\t'AccountEmailLabel'       => 'E-mail',\n\t'AccountGenderLabel'      => 'Gênero',\n\t'AccountBirthdateLabel'   => 'Data de nascimento',\n\t'AccountSecurityLabel'    => 'Código de Segurança',\n\t'AccountCreateButton'     => 'Criar Minha Conta',\n\t'AccountInvalidChars'     => \"Um nome de usuário pode conter somente estes caracteres: ' %s'\",\n    'AccountRecaptchaKey'     => 'Você precisa das chaves de Recaptcha, veja mais em config/applications.php (ReCaptchaPublicKey/ReCaptchaPrivateKey)',\n\t'InvalidLoginServer'      => 'Login inválido para servidor selecionado, por favor, tente novamente com um servidor válido.',\n\t'InvalidLoginCredentials' => 'Login inválido credenciais, verifique se você digitou as informações corretas e tente novamente.',\n\t'UnexpectedLoginError'    => 'Ocorreu um erro inesperado, tente novamente ou reporte ao administrador.',\n\t'CriticalLoginError'      => 'Algo ruim aconteceu. Comunicar ao administrador o mais cedo possível.',\n\t'UsernameAlreadyTaken'    => \"O nome de usuário que você escolheu já está em uso por outro usuário.\",\n\t'UsernameTooShort'        => sprintf('Seu nome de usuário deve ser em torno de %d a %d caracteres longos.', Flux::config('MinUsernameLength'), Flux::config('MaxUsernameLength')),\n\t'UsernameTooLong'         => sprintf('Seu nome de usuário deve ser em torno de %d a %d caracteres longos.', Flux::config('MinUsernameLength'), Flux::config('MaxUsernameLength')),\n\t'PasswordContainsUser'    => 'Sua senha não pode conter seu nome de usuário.',\n\t'PasswordHasUsername'     => 'Sua senha não deve conter seu nome de usuário.',\n\t'PasswordTooShort'        => 'Sua senha deve ser em torno de %d a %d caracteres longo.',\n\t'PasswordTooLong'         => 'Sua senha deve ser em torno de %d a %d caracteres longo.',\n\t'PasswordsDoNotMatch'     => \"Suas senhas não coincidem, por favor, certifique-se de que você digitou corretamente.\",\n\t'PasswordNeedUpper'       => 'Sua senha deve conter pelo menos %d letra(s) maiúscula.',\n\t'PasswordNeedLower'       => 'Sua senha deve conter pelo menos %d letra(s) minúsculas.',\n\t'PasswordNeedNumber'      => 'Sua senha deve conter pelo menos %d número(s).',\n\t'PasswordNeedSymbol'      => 'Sua senha deve conter pelo menos %d símbolo(s).',\n\t'EmailAddressInUse'       => \"Você digitou o endereço de e-mail já está registrado para outra conta. Por favor use um endereço de e-mail diferente.\",\n\t'InvalidEmailAddress'     => \"O endereço de email que você digitou não está em um formato de endereço de email válido.\",\n\t'InvalidGender'           => 'Sexo deve ser \"M\" ou \"F\"',\n\t'InvalidServer'           => \"O servidor que você selecionou não existe.\",\n\t'InvalidSecurityCode'     => 'Por favor introduza o código de segurança corretamente.',\n\t'InvalidPassword'         => 'A senha contém caracteres inválidos.',\n\t'InvalidBirthdate'        => 'Entrada de Data de nascimento inválida.',\n\t'CriticalRegisterError'   => 'Algo ruim aconteceu. Comunicar ao administrador o mais cedo possível.',\n\t// - account/edit\n\t'AccountEditTitle'        => 'Modificar Conta',\n\t'AccountEditTitle2'       => 'Modificando Minha Conta',\n\t'AccountEditTitle3'       => 'Modificando Conta (%s)',\n\t'CannotModifyOwnGroupID'  => 'Você não pode modificar seu próprio ID do grupo da conta.',\n\t'CannotModifyAnyGroupID'  => 'Você não pode modificar IDs do grupo de contas.',\n\t'CannotModifyGroupIDHigh' => 'Você não pode definir um ID do grupo de conta para ser maior do que o seu próprio.',\n\t'InvalidGroupID'          => 'ID do grupo inválido.',\n\t'CannotModifyBalance'     => 'Você não pode mudar o balanço da conta.',\n\t'InvalidLastLoginDate'    => 'Última data e hora de login inválidos.',\n\t'AccountModified'         => 'Conta modificada com sucesso.',\n\t'AccountEditHeading'      => 'Modificar Conta',\n\t'AccountEditButton'       => 'Modificar Conta',\n\t'AccountEditNotFound'     => 'Conta não encontrada.',\n\t// - account/index\n\t'AccountIndexTitle'       => 'Listar Contas',\n\t'AccountIndexHeading'     => 'Contas',\n\t'LoginBetweenLabel'       => 'Login Entre',\n\t'BirthdateBetweenLabel'   => 'Data de nascimento entre',\n\t'AccountIndexNotFound'    => 'Conta não encontrada.',\n\t// - account/login\n\t'LoginTitle'              => 'Login',\n\t'LoginHeading'            => 'Login',\n\t'LoginButton'             => 'Login',\n\t'LoginPageMakeAccount'    => 'Você não possui uma conta? <a href=\"%s\">Faça uma agora!</a>',\n\t'TemporarilyBanned'       => 'Sua conta foi banida temporariamente.',\n\t'PermanentlyBanned'       => 'Sua conta foi banida permanentemente.',\n\t'IpBanned'                => 'O seu IP foi banido.',\n\t'PendingConfirmation'     => 'Sua conta está esperando confirmação de e-mail.',\n\t// - account/logout\n\t'LogoutTitle'             => 'Sair',\n\t'LogoutHeading'           => 'Sair',\n\t'LogoutInfo'              => 'Você saiu da sua conta.',\n\t'LogoutInfo2'             => 'Aguarde um momento enquanto você está sendo <a href=\"%s\">redirecionado</a>…',\n\t// - account/resend\n\t'ResendTitle'             => 'Re-enviar E-mail de Confirmação',\n\t'ResendEnterUsername'     => 'Por favor, insira o seu Usuário.',\n\t'ResendEnterEmail'        => 'Por favor, insira o seu E-mail.',\n\t'ResendFailed'            => 'Falha ao re-enviar código de confirmação.',\n\t'ResendEmailSent'         => 'Seu código de confirmação foi enviado, olhe a sua caixa de entrada para proceder com a ativação da sua conta.',\n\t'ResendHeading'           => 'Re-enviar E-mail de Confirmação',\n\t'ResendInfo'              => 'Por favor, insira o Usuário e E-mail que você utilizou durante o registro da sua conta para podermos re-enviar o seu e-mail de confirmação.',\n\t'ResendServerLabel'       => 'Servidor Registrado',\n\t'ResendAccountLabel'      => 'Usuário',\n\t'ResendEmailLabel'        => 'E-mail',\n\t'ResendServerInfo'        => 'Este é o servidor que a conta está registrada.',\n\t'ResendAccountInfo'       => 'Este é o usuário que você registrou.',\n\t'ResendEmailInfo'         => 'Este é o e-mail que você utilizou no registro da conta acima.',\n\t'ResendButton'            => 'Re-enviar E-mail de Confirmação',\n\t// - account/resetpass\n\t'ResetPassTitle'          => 'Redefinir Senha',\n\t'ResetPassEnterAccount'   => 'Por favor, digite o seu Usuário.',\n\t'ResetPassEnterEmail'     => 'Por favor, digite o seu e-mail.',\n\t'ResetPassDisallowed'     => 'Recuperação de senha não pode ser usada para esta conta.',\n\t'ResetPassFailed'         => 'Falha ao enviar o email de redefinição de senha.',\n\t'ResetPassEmailSent'      => 'Um e-mail foi enviado para você com os detalhes de como proceder para redefinir sua senha.',\n\t'ResetPassInfo'           => 'Se você perder a sua senha, você pode redefiní-la digitando apenas o email que você cadastrou na sua conta.',\n\t'ResetPassInfo2'          => 'Uma mensagem será enviada ao email digitado contendo um link para você poder redefinir a sua senha, por isso é necessário que você possua um e-mail válido.',\n\t'ResetPassServerLabel'    => 'Servidor Registrado',\n\t'ResetPassAccountLabel'   => 'Usuário',\n\t'ResetPassEmailLabel'     => 'E-mail',\n\t'ResetPassServerInfo'     => 'Este é o servidor que a conta está registrada.',\n\t'ResetPassAccountInfo'    => 'Este é o usuário que você registrou.',\n\t'ResetPassEmailInfo'      => 'Este é o e-mail que você utilizou no registro da conta acima.',\n\t'ResetPassButton'         => 'Enviar E-mail para Redefinição de Senha',\n\t// - account/resetpw\n\t'ResetPwTitle'            => 'Redefinir Senha',\n\t'ResetPwFailed'           => 'Falha ao redefinir senha, tente novamente mais tarde.',\n\t'ResetPwDone'             => 'Sua senha foi redefinida e um e-mail contendo a sua nova senha foi enviada para você.',\n\t'ResetPwDone2'            => 'A sua senha foi redefinida, mas houve uma falha ao lhe enviar um e-mail contendo sua nova senha. Por favor, tente redefiní-la novamente para resolver esse problema.',\n\t// - account/transfer\n\t'TransferTitle'           => 'Transferir Créditos de Doação',\n\t'TransferGreaterThanOne'  => 'Você só pode transferir 1 ou mais créditos.',\n\t'TransferEnterCharName'   => 'Você deve digitar o nome do personagem que vai receber os créditos.',\n\t'TransferNoCharExists'    => \"O personagem '%s' não existe. Tenha certeza que você digitou o nome correto.\",\n\t'TransferNoBalance'       => 'Você não tem saldo o suficiente para fazer uma transferência.',\n\t'TransferUnexpectedError' => 'Erro inesperado ocorreu.',\n\t'TransferSuccessful'      => 'Os créditos foram transferidos!',\n\t'TransferHeading'         => 'Transferir Créditos de Doação',\n\t'TransferSubHeading'      => 'Os créditos serão transferidos para um personagem no servidor %s.',\n\t'TransferInfo'            => 'Você possui %s crédito(s).',\n\t'TransferInfo2'           => 'Insira a quantidade que você quer transferir e o nome do personagem pertencente a conta que você quer enviar os créditos.',\n\t'TransferAmountLabel'     => 'Quantidade de Créditos',\n\t'TransferCharNameLabel'   => 'Nome do Personagem',\n\t'TransferAmountInfo'      => 'Esta é a quantidade de crédito que você deseja enviar.',\n\t'TransferCharNameInfo'    => 'Este é o nome do personagem que está recebendo os créditos.',\n\t'TransferConfirm'         => 'Tem certeza que quer transferir?',\n\t'TransferButton'          => 'Transferir',\n\t'TransferNoCredits'       => 'Você não possui créditos disponíveis na sua conta.',\n\t// - account/view\n\t// * account/view submenus\n\t'ModifyAccountLink'       => 'Modificar Conta',\n\t'AccountViewTitle'        => 'Ver Conta',\n\t'AccountViewTitle2'       => 'Vendo Conta (%s)',\n\t'AccountViewTitle3'       => 'Vendo Minha Conta',\n\t'AccountTempBanFailed'    => 'Falha ao banir temporariamente a conta.',\n\t'AccountPermBanFailed'    => 'Falha ao banir permanentemente a conta.',\n\t'AccountTempBanUnauth'    => 'Você não está autorizado a banir temporariamente essa conta.',\n\t'AccountPermBanUnauth'    => 'Você não está autorizado a banir permanentemente essa conta.',\n\t'AccountLiftTempBan'      => 'Conta foi desbanida.',\n\t'AccountLiftPermBan'      => 'Conta foi desbanida.',\n\t'AccountLiftBanUnauth'    => \"Você não está autorizado a desbanir essa conta.\",\n\t'AccountViewHeading'      => 'Vendo Conta',\n\t'AccountViewDonateLink'   => '(Doar!)',\n\t'AccountViewTempBanLabel' => 'Banir Temporariamente',\n\t'AccountViewPermBanLabel' => 'Banir Permanentemente',\n\t'AccountViewUnbanLabel'   => 'Remover Banimento',\n\t'AccountBanReasonLabel'   => 'Razão:',\n\t'AccountBanUntilLabel'    => 'Banido Até:',\n\t'AccountTempBanButton'    => 'Banir Conta',\n\t'AccountPermBanButton'    => 'Banir Conta Permanentemente',\n\t'AccountTempUnbanButton'  => 'Removeer Banimento Temporário',\n\t'AccountPermUnbanButton'  => 'Removeer Banimento Permanente',\n\t'AccountBanConfirm'       => 'Tem certeza?',\n\t'AccountBanLogSubHeading' => 'Log de Banimento para %s (mais novo para mais antigo)',\n\t'BanLogBanTypeLabel'      => 'Tipo do Banimento',\n\t'BanLogBanDateLabel'      => 'Data do Banimento',\n\t'BanLogBanReasonLabel'    => 'Razão do Banimento',\n\t'BanLogBannedByLabel'     => 'Banido Por',\n\t'BanLogBannedByCP'        => 'Painel de Controle',\n\t'BanTypeUnbanned'         => 'Desbanido',\n\t'BanTypePermBanned'       => 'Banido Permanentemente',\n\t'BanTypeTempBanned'       => 'Banido Temporariamente',\n\t'AccountViewCharSubHead'  => 'Personagens em %s',\n\t'AccountViewSlotLabel'    => 'Slot',\n\t'AccountViewCharLabel'    => 'Nome do Personagem',\n\t'AccountViewClassLabel'   => 'Classe',\n\t'AccountViewLvlLabel'     => 'Nível de Base',\n\t'AccountViewJlvlLabel'    => 'Nível de Job',\n\t'AccountViewZenyLabel'    => 'Zeny',\n\t'AccountViewGuildLabel'   => 'Clã',\n\t'AccountViewStatusLabel'  => 'Status',\n\t'AccountViewPrefsLabel'   => 'Preferências',\n\t'CharModifyPrefsLink'     => 'Modificar Preferências',\n\t'AccountViewNoChars'      => 'Essa conta não possui personagens em %s.',\n\t'AccountViewStorage'      => 'Storage de %s',\n\t'AccountViewStorageCount' => '%s tem %s item(s) no storage.',\n\t'AccountViewNoStorage'    => 'Não há itens no storage dessa conta.',\n\t'AccountViewNotFound'     => \"Registros indicam que a conta que você está tentando ver não existe.\",\n\t// - account/xferlog\n\t'XferLogTitle'            => 'Histórico de Transferência de Crédito',\n\t'XferLogHeading'          => 'Histórico de Transferência de Crédito',\n\t'XferLogReceivedSubHead'  => 'Transferências: Recebidas',\n\t'XferLogSentSubHead'      => 'Transferências: Enviadas',\n\t'XferLogCreditsLabel'     => 'Créditos',\n\t'XferLogFromLabel'        => 'Do E-mail',\n\t'XferLogDateLabel'        => 'Data da Transferência',\n\t'XferLogCharNameLabel'    => 'Para o Personagem',\n\t'XferLogNotReceived'      => 'Você não recebeu nenhuma transferência de crédito.',\n\t'XferLogNotSent'          => 'Você não fez nenhuma transferência de crédito.',\n\n\t// Module: character\n\t// - character/changeslot\n\t// - character/index\n\t// - character/mapstats\n\t// - character/online\n\t// - character/prefs\n\t// - character/resetlook\n\t'CantResetLookWhenOnline' => 'Não pode redefinir aparência enquanto %s estiver online.',\n\t'ResetLookSuccessful'     => \"A aparência de %s foi redefinida!\",\n\t'ResetLookFailed'         => \"Falha ao redefinir a aparência de %s\",\n\t// - character/resetpos\n\t'CantResetPosWhenOnline'  => 'Não pode redefinir posição enquanto %s estiver online.',\n\t'CantResetFromCurrentMap' => \"Você não pode redefinir a posição de %s estando no mapa atual.\",\n\t'ResetPositionSuccessful' => \"A posição de %s foi redefinida!\",\n\t'ResetPositionFailed'     => \"Falha ao redefinir a posição de %s.\",\n\t// - character/view\n\t// - character/divorce\n\t'DivorceTitle'            => 'Divórcio',\n\t'DivorceHeading'          => 'Divórcio',\n\t'DivorceNotMarried'       => '%s não é casado.',\n\t'DivorceInvalidPartner'   => 'ID de parceiro inválido.',\n\t'DivorceInvalidChild'     => 'ID de filho inválido.',\n\t'DivorceMustBeOffline'    => 'Ambos s% e seu/sua parceiro(a) deve estar off-line.',\n\t'DivorceMustBeOffline2'   => '%s, seu/sua parceiro(a) e seu filho deve estar off-line.',\n\t'DivorceText1'            => \"Você tem certeza que quer se divorciar de %s seu/sua parceiro(a)?\",\n\t'DivorceText2'            => 'Se %s tem um filho, o filho também vai ser órfão.',\n\t'DivorceText3'            => 'Anéis de casamento também serão excluídos.',\n\t'DivorceButton'           => 'Sim, fazê-lo por favor.',\n\t'DivorceSuccessful'       => '%s já se divorciou!',\n\n\t// Module: cplog\n\t// - cplog/index.php\n\t// - cplog/login.php\n\t// - cplog/paypal.php\n\t// - cplog/resetpass.php\n\t// - cplog/txnview.php\n\n\t// Module: donate\n\t// - donate/complete\n\t// - donate/history\n\t// - donate/index\n\t// - donate/trusted\n\n\t// Module: errors\n\t// - errors/missing_action\n\t'MissingActionTitle'      => 'Ação Inexistente',\n\t'MissingActionHeading'    => 'Ação Inexistente!',\n\t'MissingActionModLabel'   => 'Módulo:',\n\t'MissingActionActLabel'   => 'Ação:',\n\t'MissingActionReqLabel'   => 'URL requerida:',\n\t'MissingActionLocLabel'   => 'Localização do arquivo de sistema:',\n\t// - errors/missing_view\n\t'MissingViewTitle'        => 'Faltando Página', // Precisa de tradução exata, original: \"Missing View\"\n\t'MissingViewHeading'      => 'Faltando Página!', // Precisa de tradução exata, original: \"Missing View!\"\n\t'MissingViewModLabel'     => 'Módulo:',\n\t'MissingViewActLabel'     => 'Ação:',\n\t'MissingViewReqLabel'     => 'URL requerida:',\n\t'MissingViewLocLabel'     => 'Localização do arquivo de sistema:',\n\n\t// Module: guild\n\t// - guild/export\n\t// - guild/index\n\t// - guild/view\n\n\t// Module: history\n\t// - history/cplogin\n\t'HistoryCpLoginTitle'     => 'Logins no Painel de Controle',\n\t'HistoryCpLoginHeading'   => 'Logins no Painel de Controle',\n\t'HistoryLoginDateLabel'   => 'Data/Hora do Login',\n\t'HistoryIpAddrLabel'      => 'Endereço de IP',\n\t'HistoryErrorCodeLabel'   => 'Código de Erro',\n\t'HistoryNoCpLogins'       => 'Não foram feitos logins no Painel de Controle ainda.',\n\t// -history/emailchange\n\t'HistoryEmailTitle'       => 'Mudanças de E-Mail',\n\t'HistoryEmailHeading'     => 'Mudanças de E-Mail',\n\t'HistoryEmailRequestDate' => 'Data/Hora da requisição',\n\t'HistoryEmailRequestIp'   => 'IP que fez a requisição',\n\t'HistoryEmailOldAddress'  => 'E-Mail Antigo',\n\t'HistoryEmailNewAddress'  => 'E-Mail Novo',\n\t'HistoryEmailChangeDate'  => 'Data da Mudança',\n\t'HistoryEmailChangeIp'    => 'IP que fez a mudança',\n\t'HistoryNoEmailChanges'   => 'Nenhuma tentativa de mudança de email encontrada.',\n\t// - history/gamelogin\n\t'HistoryGameLoginTitle'   => 'Logins No Jogo',\n\t'HistoryGameLoginHeading' => 'Logins No Jogo',\n\t'HistoryRepsCodeLabel'    => 'Resposta',\n\t'HistoryLogMessageLabel'  => 'Mensagem de Log',\n\t'HistoryNoGameLogins'     => 'Não foram feitos logins no jogo ainda.',\n\t// - history/index\n\t'HistoryIndexTitle'       => 'Histórico da Minha Conta',\n\t'HistoryIndexHeading'     => 'Histórico da Minha Conta',\n\t'HistoryIndexInfo'        => 'Aqui você pode ver a atividade passada da sua conta.',\n\t'HistoryIndexInfo2'       => 'Por favor, selecione a página desejada no menu.',\n\t// - history/passchange\n\t'HistoryPassChangeTitle'      => 'Alterações de senha',\n\t'HistoryPassChangeHeading'    => 'Alterações de senha',\n\t'HistoryPassChangeChangeDate' => 'Alterar data',\n\t'HistoryPassChangeChangeIp'   => 'Mudar IP',\n\t'HistoryNoPassChanges'        => 'Nenhuma alteração de senha encontrada.',\n\t// -history/passreset\n\t'HistoryPassResetTitle'       => 'Redefinições de senha',\n\t'HistoryPassResetHeading'     => 'Redefinições de senha',\n\t'HistoryPassResetRequestDate' => 'Solicitação de Data/Hora',\n\t'HistoryPassResetRequestIp'   => 'Solicitar IP',\n\t'HistoryPassResetResetDate'   => 'Redefinir a data',\n\t'HistoryPassResetResetIp'     => 'Redefinir o IP',\n\t'HistoryNoPassResets'         => 'Nenhuma senha Redefinida encontradas.',\n\n\t// Module: ipban\n\t// - ipban/add\n\t'IpbanAddTitle'           => 'Banir IP',\n\t'IpbanEnterIpPattern'     => 'Por favor, digite um IP ou um padrão de IP.',\n\t'IpbanInvalidPattern'     => 'IP ou padrão inválido.',\n\t'IpbanWhitelistedPattern' => 'Esse padrão é lista branca e não pode ser bloqueado.',\n\t'IpbanEnterReason'        => 'Digite a razão do banimento para o IP.',\n\t'IpbanSelectUnbanDate'    => 'Data de desbanimento necessária.',\n\t'IpbanFutureDate'         => 'Data de desbanimento deve ser uma data futura.',\n\t'IpbanAlreadyBanned'      => 'O IP (%s) já consta como banido.',\n\t'IpbanPatternBanned'      => \"O IP ou o padrão '%s' foi banido.\",\n\t'IpbanAddFailed'          => 'Falha ao banir IP.',\n\t'IpbanAddHeading'         => 'Banir IP',\n\t'IpbanIpAddressLabel'     => 'Endereço de IP',\n\t'IpbanReasonLabel'        => 'Razão',\n\t'IpbanUnbanDateLabel'     => 'Data de desbanimento',\n\t'IpbanIpAddressInfo'      => 'Você pode especificar um padrão de IP como 218.139.*.*',\n\t'IpbanAddButton'          => 'Banir IP',\n\t// - ipban/edit\n\t'IpbanEditTitle'          => 'Modificar Banimento de IP',\n\t'IpbanEnterEditReason'    => 'Por favor, digite uma razão para a modificação de Banimento de IP .',\n\t'IpbanEditFailed'         => 'Falha ao modificar Banimento de IP.',\n\t'IpbanEditHeading'        => 'Modificar Banimento de IP',\n\t'IpbanEditReasonLabel'    => 'Editar a razão',\n\t'IpbanEditButton'         => 'Modificar Banimento de IP',\n\t// - ipban/index\n\t'IpbanListTitle'          => 'Lista de IP Banidos',\n\t'IpbanListHeading'        => 'Lista de IP Banidos',\n\t'IpbanBannedIpLabel'      => 'IP Banido',\n\t'IpbanBanDateLabel'       => 'Data do Banimento',\n\t'IpbanBanReasonLabel'     => 'Razão',\n\t'IpbanBanExpireLabel'     => 'Data de expiração do Banimento',\n\t'IpbanModifyLink'         => 'Modificar',\n\t'IpbanRemoveLink'         => 'Remover',\n\t'IpbanUnbanButton'        => 'Desbanir Selecionados',\n\t'IpbanListNoBans'         => 'Atualmente não há IPs banidos.',\n\t// - ipban/remove\n\t'IpbanRemoveTitle'        => 'Remover Banimento de IP',\n\t'IpbanEnterRemoveReason'  => 'Por favor, digite uma razão para a remoção do Banimento de IP.',\n\t'IpbanNotBanned'          => 'Nenhum IP correspondente (%s) atualmente é proibido.',\n\t'IpbanPatternUnbanned'    => \"O endereço IP/padrão '%s' foi banido.\",\n\t'IpbanRemoveFailed'       => 'Falha ao remover a Banimento de IP.',\n\t'IpbanRemoveHeading'      => 'Remover Banimento de IP',\n\t'IpbanRemoveReasonLabel'  => 'Razão do desbanimento',\n\t'IpbanRemoveButton'       => 'Remover Banimento de IP',\n\t// - ipban/unban\n\t'IpbanNothingToUnban'     => 'Nada para desbanir.',\n\t'IpbanEnterUnbanReason'   => 'Por favor, digite uma razão para desbanir o(s) IP(s).',\n\t'IpbanUnbanned'           => 'IP(s) selecionado(s) desbanido(s)!',\n\t'IpbanUnbanFailed'        => 'Falha ao desbanir %d IP(s) especificado(s)!',\n\n\t// Module: item\n\t// - item/add\n\t// - item/copy\n\t// - item/edit\n\t// - item/index\n\t// - item/view\n\n\t// Module: itemshop\n\t// - itemshop/add\n\t// - itemshop/delete\n\t// - itemshop/edit\n\t// - itemshop/imagedel\n\n\t// Module: logdata\n\t// - logdata/chat\n\t// - logdata/command\n\t'CommandLogTitle'         => 'Lista de comandos',\n\t'CommandLogHeading'       => 'Log de comandos',\n\t'CommandLogNotFound'      => 'Nenhum comando registrado',\n\t'CommandLogDateLabel'     => 'Comando Data/Hora',\n\t'CommandLogAccountIdLabel'=> 'ID da conta',\n\t'CommandLogCharIdLabel'   => 'ID do char',\n\t'CommandLogCharNameLabel' => 'Personagem',\n\t'CommandLogCommandLabel'  => 'Comando',\n\t'CommandLogMapLabel'      => 'Mapa',\n\t// - logdata/index\n\t// - logdata/login\n\t// - logdata/pick\n\t'PickLogTitle'            => 'Lista de log de itens',\n\t'PickLogHeading'          => 'Log de itens',\n\t'PickLogNotFound'         => 'Nenhum item registrado',\n\t'PickLogDateLabel'        => 'Data/Hora',\n\t'PickLogCharacterLabel'   => 'Personagem',\n\t'PickLogTypeLabel'        => 'Tipo',\n\t'PickLogItemLabel'        => 'Nome do item',\n\t'PickLogAmountLabel'      => 'Quantidade',\n\t'PickLogRefineLabel'      => 'Refino',\n\t'PickLogCard0Label'       => 'Carta 1',\n\t'PickLogCard1Label'       => 'Carta 2',\n\t'PickLogCard2Label'       => 'Carta 3',\n\t'PickLogCard3Label'       => 'Carta 4',\n\t'PickLogMapLabel'         => 'Mapa',\n\t// - logdata/zeny\n\t'ZenyLogTitle'            => 'Lista de log de zeny',\n\t'ZenyLogHeading'          => 'Log de zeny',\n\t'ZenyLogNotFound'         => 'Não há registro de logs de zeny',\n\t'ZenyLogDateLabel'        => 'Data/Hora',\n\t'ZenyLogCharacterLabel'   => 'Personagem',\n\t'ZenyLogSourceLabel'      => 'ID do Personagem',\n\t'ZenyLogTypeLabel'        => 'Tipo',\n\t'ZenyLogAmountLabel'      => 'Valor',\n\t'ZenyLogMapLabel'         => 'Mapa',\n\n\t// Module: mail\n\t// - mail/index\n\t'MailerTitle'             => 'Formulário de Email',\n\t'MailerHeading'           => 'Formulário de Email',\n\t'MailerEnterToAddress'    => 'Digite o destinatário.',\n\t'MailerEnterSubject'      => 'Digite o assunto.',\n\t'MailerEnterBodyText'     => 'Digite o corpo de texto.',\n\t'MailerEmailHasBeenSent'  => 'Seu e-mail foi enviado com sucesso para %s.',\n\t'MailerFailedToSend'      => 'O sistema de e-mail falhou ao enviar a mensagem. Isso pode ser configuração.',\n\t'MailerInfo'              => 'Você pode usar o formulário abaixo para enviar e-mails usando o Painel de Controle.',\n\t'MailerFromLabel'         => 'De',\n\t'MailerToLabel'           => 'Para',\n\t'MailerSubjectLabel'      => 'Assunto',\n\t'MailerBodyLabel'         => 'Corpo da Mensagem',\n\n\t// Module: main\n\t// - main/index\n\t'MainPageHeading'         => 'Flux Control Panel',\n\t'MainPageInfo'            => \"Se você está vendo esta página, é porque você instalou o Flux Control Panel com sucesso!\",\n\t'MainPageInfo2'           => \"Você gostaria de mudar esta página? Então, aqui você pode mudar:\",\n\t'MainPageStep1'           => 'Abra o arquivo \"%s\" no seu editor de texto.',\n\t'MainPageStep2'           => 'E edite o arquivo como você quiser!',\n\t'MainPageThanks'          => 'Obrigado por usar o Flux!',\n\t// - main/pagenotfound\n\t'PageNotFoundTitle'       => '404 Página Não Encontrada',\n\t'PageNotFoundHeading'     => 'Página Não Encontrada',\n\t'PageNotFoundInfo'        => 'A página que você solicitou não foi encontrada. Por favor, verifique se o endereço está correto e tente novamente.',\n\t// - main/preprocess\n\t'DisallowedDuringWoE'     => 'A página que você solicitou não está disponível durante a GdE.',\n\n\t// Module: monster\n\t// - monster/index\n\t// - monster/view\n\n\t// Module: purchase\n\t// - purchase/add\n\t// - purchase/cart\n\t// - purchase/checkout\n\t// - purchase/clear\n\t// - purchase/index\n\t// - purchase/pending\n\t// - purchase/remove\n\n\t// Module: ranking\n\t// - ranking/character\n\t// - ranking/guild\n\t// - ranking/zeny\n\n\t// Module: server\n\t// - server/info\n\t'ServerInfoTitle'         => 'Informação do Servidor',\n\t'ServerInfoHeading'       => 'Informação do Servidor',\n\t'ServerInfoText'          => \"Aqui você encontra várias informações sobre o servidor.\",\n\t'ServerInfoSubHeading'    => 'Informação para %s',\n\t'ServerInfoSubHeading2'   => 'Informação de Classe para %s',\n\t'ServerInfoAccountLabel'  => 'Contas',\n\t'ServerInfoCharLabel'     => 'Personagens',\n\t'ServerInfoGuildLabel'    => 'Clãs',\n\t'ServerInfoPartyLabel'    => 'Grupos',\n\t'ServerInfoZenyLabel'     => 'Zeny',\n\t// - server/status\n\t'ServerStatusTitle'       => 'Status do Servidor',\n\t'ServerStatusHeading'     => 'Status do Servidor',\n\t'ServerStatusInfo'        => \"Entendendo o status de Online e Offline de cada servidor pode lhe ajudar a entender como relatar o seu problema. Por exemplo, se o login server estiver offline, isso quer dizer que não é possível fazer o login no jogo. O character server e o map server são necessários para você entrar na escolha de seu personagem e no mapa do jogo depois que você faz o login.\",\n\t'ServerStatusServerLabel' => 'Servidor',\n\t'ServerStatusLoginLabel'  => 'Login Server',\n\t'ServerStatusCharLabel'   => 'Character Server',\n\t'ServerStatusMapLabel'    => 'Map Server',\n\t'ServerStatusOnlineLabel' => 'Jogadores Online',\n\t'ServerStatusPeakLabel'   => 'Pico de jogador',\n\n\t// Module: service\n\t// - service/tos\n\t'TermsTitle'              => 'Termos de Serviço',\n\t'TermsHeading'            => 'Termos de Serviço',\n\t'TermsInfo'               => 'Por favor, leia tudo antes de criar a sua conta!',\n\t'TermsInfo2'              => \"PARA O ADMINISTRADOR DO PAINEL DE CONTROLE: Você pode adicionar os Termos de Serviço diretamente neste arquivo. A localização do arquivo é: %s\",\n\n\t// Module: unauthorized\n\t// - unauthorized/index\n\t'UnauthorizedTitle'       => 'Não Autorizado',\n\t'UnauthorizedHeading'     => 'Não Autorizado',\n\t'UnauthorizedInfo'        => 'Você não está autrizado a ver essa página. <a href=\"%s\">Redirecionando…</a>',\n\n\t// Module: woe\n\t// - woe/index\n\t'WoeTitle'                => 'Horários da Guerra do Emperium',\n\t'WoeHeading'              => 'Horários da Guerra do Emperium',\n\t'WoeInfo'                 => \"Aqui estão os horários da GdE para o %s. Esses horários estão sujeitos a alteração sem aviso prévio, portanto mantenha-se informado.\",\n\t'WoeServerTimeInfo'       => 'A hora atual do servidor é:',\n\t'WoeServerLabel'          => 'Servidores',\n\t'WoeTimesLabel'           => 'Horários da Guerra do Emperium',\n\t'WoeNotScheduledInfo'     => 'Não há nenhuma Guerra do Emperium agendada.',\n\n\t// Module: tasks\n\t'TaskListHeader'          => 'Lista de tarefas',\n\t'TaskListHeaderCompleted' => 'Tarefas concluídas',\n\t'TaskListAdd'             => 'Adicionar nova tarefa',\n\t'TaskListAdded'           => 'Tarefa adicionada!',\n\t'TaskListSub'             => 'Lista de tarefas dos GM\\'s!',\n\t'TLNotAssigned'           => 'Não atribuído',\n\t'TLNoTasks'               => 'Não há nenhuma tarefa.!',\n\t'TLNoMine'                => 'Você não tem tarefas atribuídas a você.',\n\t'TLNoCompleted'           => 'Não há tarefas concluídas ainda.',\n\t'TLHeaderTasks'           => 'Tarefas',\n\t'TLHeaderOwner'           => 'Atribuido à',\n\t'TLHeaderPriority'        => 'Prioridade',\n\t'TLHeaderStatus'          => 'Estado',\n\t'TLHeaderCreated'         => 'Criado',\n\t'TLHeaderModified'        => 'Modificado',\n\t'TLHeaderResources'       => 'Informações',\n\t'TLHeaderBody'            => 'Caixa de Mensagem',\n\t'TLPriority1'             => 'Urgente',\n\t'TLPriority2'             => 'Alta',\n\t'TLPriority3'             => 'Baixa',\n\t'TLStatus0'               => 'Nova Tarefa',\n\t'TLStatus1'               => 'Em andamento',\n\t'TLStatus2'               => 'Aguardando Implementação',\n\t'TLStatus5'               => 'completo',\n\t'TLHuh'                   => 'Você não deve ser capaz de ver isso!',\n\n\t// Module: contactform\n\t'CFTitleSubmit'\t\t\t  => 'Contate-nos',\n\n\t// Module: logdata/harmony\n\t'HARTitle'\t\t\t\t  => 'Harmony Logs',\n\t'HARSearchLink'\t\t\t  => 'Pesquisar...',\n\t'HARDateBetween'\t\t  => 'Data entre',\n\t'HARIPAddress'\t\t\t  => 'Endereço IP',\n\t'HARCharacter'\t\t\t  => 'Personagem',\n\t'HARAccountID'\t\t\t  => 'ID da conta',\n\t'HARNoData'\t\t\t\t  => 'Nenhum dado foi encontrado.',\n\t'HARGoback'\t\t\t\t  => 'Voltar',\n\n\t// Module: News and Pages\n\t'XCMSNewsHeader'\t\t=> 'Announcements',\n\t'XCMSPageHeader'\t\t=> 'Content Management System',\n\t'XCMSPageText'\t\t\t=> 'This FluxCP addon enables server admins and staff to create pages within their website with no prior flux/coding knowledge. The built-in news system can also be swapped out for an rss feed by modifying the addon settings.',\n\t'XCMSNewsTitleError'\t=> 'News title is required!',\n\t'XCMSNewsBodyError'\t\t=> 'News body is required!',\n\t'XCMSPageTitleError'\t=> 'Page Title is required!',\n\t'XCMSPageBodyError'\t\t=> 'Page body is required!',\n\t'XCMSPagePathError'\t\t=> 'Page path is required!',\n\t'XCMSNewsAdded'\t\t\t=> 'News added to system',\n\t'XCMSPagesAdded'\t\t=> 'Your new page has been added',\n\t'XCMSNewsUpdated'\t\t=> 'News updated',\n\t'XCMSPageUpdated'\t\t=> 'Your page has been updated',\n\t'XCMSNewsAddTitle'\t\t=> 'Add a news item',\n\t'XCMSPageAddTitle'\t\t=> 'Add a new page',\n\t'XCMSNewsEditTitle'\t\t=> 'Edit news',\n\t'XCMSPageEditTitle'\t\t=> 'Edit page',\n\t'XCMSNewsNotFound'\t\t=> 'News not found!',\n\t'XCMSPageNotFound'\t\t=> 'Page not found!',\n\t'XCMSNewsDeleted'\t\t=> 'News deleted',\n\t'XCMSPageDeleted'\t\t=> 'Your page has been deleted',\n\t'XCMSNewsEmpty'\t\t\t=> 'No news articles have been found. Are you using the correct News Type? (XCMSNewsType setting)',\n\t'XCMSNewsRSSNotFound'\t=> 'RSS feed can\\'t be found. Make sure the XCMSNewsRSS setting is correct, or switch XCMSNewsType to 1 to use built-in news system!',\n\t'XCMSNewsTXTNotFound'\t=> 'File import does not work in this version. The addon.php file actually tells you this! Switch XCMSNewsType to 1 to use built-in news system, or 2 to use RSS import feature!',\n\t'XCMSNewsFBNotFound'\t=> 'Facebook feed not found!',\n\t'XCMSPageEmpty'\t\t\t=> 'No page added',\n\t'XCMSNewsLink'\t\t\t=> 'read more...',\n\t'XCMSEdit'\t\t\t\t=> 'Edit',\n\t'XCMSDelete'\t\t\t=> 'Delete',\n\t'XCMSNewsTitleLabel'\t=> 'News Title',\n\t'XCMSNewsBodyLabel'\t\t=> 'News Body',\n\t'XCMSNewsLinkLabel'\t\t=> 'News Link',\n\t'XCMSNewsAuthorLabel'\t=> 'News Author',\n\t'XCMSPageTitleLabel'\t=> 'Page Title',\n\t'XCMSPageBodyLabel'\t\t=> 'Page Body',\n\t'XCMSPagePathLabel'\t\t=> 'Page Path',\n\t'XCMSCreatedLabel'\t\t=> 'Date Created',\n\t'XCMSModifiedLabel'\t\t=> 'Date Modified',\n\t'XCMSActionLabel'\t\t=> 'Action',\n\t'XCMSConfirmDelete'\t\t=> 'Are you sure you want to delete?',\n\t'XCMSPageCreate'\t\t=> 'Create now?',\n\t'XCMSOptionalLabel'\t\t=> '(Optional)',\n\t'XCMSRequiredLabel'\t\t=> '(Required)',\n\n\t// Module: servicedesk\n\t'SDHeader'\t\t\t\t=> 'Serviço de tickets',\n\t'SDCreateNew'\t\t\t=> 'Criar um novo ticket',\n\t'SDWelcomeText'\t\t\t=> 'Bem vindo ao serviço de Ticket',\n\t'SDNoTickets'\t\t\t=> 'Você ainda não criou nenhum ticket.',\n\t'SDNoBlankResponse'\t\t=> 'É necessario digitar uma resposta para enviar.',\n\t'SDNoCatsAvailable'\t\t=> 'Nenhuma categoria ativa',\n\t'SDNoOpenTickets'\t\t=> 'Não existem tickets abertos.',\n\t'SDNoInactiveTickets'\t=> 'Não existem tickets inativos.',\n\t'SDNoClosedTickets'\t\t=> 'Não existem tickets fechados.',\n\t'SDNoCats'\t\t\t\t=> 'Não existem categorias.',\n\t'SDHuh'\t\t\t\t\t=> 'Você não deveria estar aqui o.O',\n\t'SDPointerChatLog'\t\t=> 'Nós recomendamos que você cole o log aqui <a href=\"http://pastebin.com\" target=\"_blank\">pastebin.com</a> e nos envie o erro.',\n\t'SDPointerScreenShot'\t=> 'Nos envie links de imagens para serem utilizados como provas',\n\t'SDPointerVideoLink'\t=> 'Recomendamos que envie para o youtube e coloque o link aqui',\n\t'SDHeaderID'\t\t\t=> 'Ticket #',\n\t'SDHeaderSubject'\t\t=> 'Resposta',\n\t'SDHeaderCategory'\t\t=> 'Categoria',\n\t'SDHeaderStatus'\t\t=> 'Status atual',\n\t'SDHeaderLastAuthor'\t=> 'Última resposta',\n\t'SDHeaderTimestamp'\t\t=> 'Criado',\n\t'SDHeaderAccount'\t\t=> 'Conta',\n\t'SDHeaderTeam'\t\t\t=> 'Equipe',\n\t'SDH3ActiveTickets'\t\t=> 'Tickets ativos',\n\t'SDH3InActiveTickets'\t=> 'Tickets inativos',\n\t'SDH3ClosedTickets'\t\t=> 'Tickets fechados',\n\t'SDH3CurrentCat'\t\t=> 'Categorias',\n\t'SDH3CreateCat'\t\t\t=> 'Criar nova categoria',\n\t'SDH3StaffList'\t\t\t=> 'Current Staff Settings',\n\t'SDH3StaffCreate'\t\t=> 'Add Staff Settings',\n\t'SDReOpenPlayer'\t\t=> 'Ticket reaberto pelo jogador',\n\t'SDReOpenStaff'\t\t\t=> 'Ticket reaberto pela equipe',\n\t'SDRespTable1'\t\t\t=> 'Responder e retornar para o Ticket',\n\t'SDRespTable2'\t\t\t=> 'Responder e retornar para a lista',\n\t'SDRespTable3'\t\t\t=> 'Responder e fechar o Ticket',\n\t'SDRespTable4'\t\t\t=> 'Responder e enviar para outro GM',\n\t'SDRespTable5'\t\t\t=> 'Fechar Ticket',\n\t'SDRespTable6'\t\t\t=> 'Responder e reabrir o Ticket',\n\t'SDGroup1'\t\t\t\t=> 'GM',\n\t'SDGroup2'\t\t\t\t=> 'GM Chefe',\n\t'SDGroup3'\t\t\t\t=> 'Admin',\n\t'SDLinkOpenNew'\t\t\t=> 'Abrir novo ticket',\n\n\n\t// Module: webcommands\n\t'WCTitleLabel'\t\t\t=> 'Web Commands',\n\n\t//Menus\n\t'NewsLabel'\t\t\t=> 'Novidades',\n\t'MyAccountLabel'\t\t=> 'Minha Conta',\n\t'HistoryLabel'\t\t\t=> 'Logs da conta',\n\t'ServiceDeskLabel'\t\t=> 'Abrir ticket',\n\t'ServerInfoLabel'\t\t=> 'Informações do servidor',\n\t'ServerStatusLabel'\t\t=> 'Status do servidor',\n\t'WoeHoursLabel'\t\t\t=> 'Horário da WoE',\n\t'CastlesLabel'\t\t\t=> 'Castelos',\n\t'WhosOnlineLabel'\t\t=> 'Quem está online',\n\t'MapStatisticsLabel'\t\t=> 'Estatisticas de mapa',\n\t'RankingInfoLabel'\t\t=> 'Informações dos Rankings',\n\t'VendingInfoLabel'\t\t=> 'Lojas abertas',\n\t'JoinUsInFacebookLabel'\t\t=> 'Pagina no facebook',\n\n\t'MainMenuLabel'     => 'Main Menu',\n\t'ForumLabel'     => 'Forum',\n\t'AccountLabel'     => 'Account',\n\t'CharacterLabel'     => 'Character',\n\t'CPLogsLabel'     => 'CP Logs',\n\t'FluxAdminLabel'     => 'Flux Admin',\n\t'PagesLabel'     => 'Pages',\n\t'IPBanListLabel'     => 'IP Ban List',\n\t'GuildsLabel'     => 'Guilds',\n\t'rALogsLabel'     => 'rA Logs',\n\t'SendMailLabel'     => 'Send Mail',\n\t'ReInstallLabel'     => 'Re-Install',\n\t'TaskListLabel'     => 'Task List',\n\t'DonationsLabel'     => 'Donations',\n\t'InformationLabel'     => 'Information',\n\t'DatabaseLabel'     => 'Database',\n\t'SocialLabel'     => 'Social',\n\t'HomeLabel'     => 'Home',\n\t'DownloadsLabel'     => 'Downloads',\n\t'RulesLabel'     => 'Rules',\n\t'ContactUsLabel'     => 'Contact Us',\n\t'PurchaseLabel'     => 'Purchase',\n\t'DonateLabel'     => 'Donate',\n\t'MapStaticsLabel'     => 'Map Statics',\n\t'ItemDatabaseLabel'     => 'Item Database',\n\t'MobDatabaseLabel'     => 'Mob Database',\n\t'RateUsOnRMSLabel'     => 'Rate us on RMS!',\n\t'AccountEmailLabel2'     => 'Confirm E-mail Address',\n\t'InvalidEmailconf'     => 'E-mail addresses do not match.',\n\t'InvalidVIPTime'     => 'Invalid VIP Time.',\n\t'VIPTimeDateLabel'     => 'VIP Until',\n\t'VIPStateLabel'     => 'VIP Status',\n\t'CashLogTitle'     => 'List CashPoints Log',\n\t'CashLogHeading'     => 'CashPoint Log',\n\t'CashLogNotFound'     => 'No cash logs found.',\n\t'CashLogDateLabel'     => 'Date/Time',\n\t'CashLogCharacterLabel'     => 'Character',\n\t'CashLogTypeLabel'     => 'Type',\n\t'CashLogCashTypeLabel'     => 'Cash Type',\n\t'CashLogAmountLabel'     => 'Amount',\n\t'CashLogMapLabel'     => 'Map',\n\t'BranchLogTitle'     => 'List Branch Log',\n\t'BranchLogHeading'     => 'Branch Log',\n\t'BranchLogNotFound'     => 'No branch logs found.',\n\t'BranchLogIDLabel'     => 'Branch Log ID',\n\t'BranchLogDateLabel'     => 'Date / Time',\n\t'BranchLogAccountIDLabel'     => 'Account ID',\n\t'BranchLogCharIDLabel'     => 'Char ID',\n\t'BranchLogCharNameLabel'     => 'Char Name',\n\t'BranchLogMapLabel'     => 'Map',\n\t'CharLogTitle'     => 'List Character Log',\n\t'CharLogHeading'     => 'Character Log',\n\t'CharLogNotFound'     => 'No character logs found.',\n\t'CharLogDateLabel'     => 'Date / Time',\n\t'CharLogMsgLabel'     => 'Action',\n\t'CharLogAccountIDLabel'     => 'Account ID',\n\t'CharLogCharNumLabel'     => 'Character slot',\n\t'CharLogCharNameLabel'     => 'Character Name',\n\t'InterLogTitle'     => 'List of Interactions Log',\n\t'InterLogHeading'     => 'Interactions Log',\n\t'InterLogNotFound'     => 'No Interactions logs found.',\n\t'InterLogDateLabel'     => 'Date / Time',\n\t'InterLogLabel'     => 'Interactions Log',\n\t'MVPLogTitle'     => 'List MVP Log',\n\t'MVPLogHeading'     => 'MVP Log',\n\t'MVPLogNotFound'     => 'No MVP logs found.',\n\t'MVPLogIDLabel'     => 'MVP Log ID',\n\t'MVPLogDateLabel'     => 'Date / Time',\n\t'MVPLogCharacterLabel'     => 'Character ID',\n\t'MVPLogMonsterLabel'     => 'MVP Monster',\n\t'MVPLogPrizeLabel'     => 'MVP Prize',\n\t'MVPLogExpLabel'     => 'MVP Experience',\n\t'MVPLogMapLabel'     => 'Map',\n\t'NPCLogTitle'     => 'List NPC Log',\n\t'NPCLogHeading'     => 'NPC Log',\n\t'NPCLogNotFound'     => 'No npc logs found.',\n\t'NPCLogIDLabel'     => 'NPC ID',\n\t'NPCLogDateLabel'     => 'Date / Time',\n\t'NPCLogAccountIDLabel'     => 'Account ID',\n\t'NPCLogCharIDLabel'     => 'Character ID',\n\t'NPCLogCharNameLabel'     => 'Character Name',\n\t'NPCLogMapLabel'     => 'Map',\n\t'NPCLogMsgLabel'     => 'Message',\n\t'MailerSelectTemplateLabel'     => 'Select Template',\n\t'MainPageWelcome'     => 'Welcome to %s!',\n\t'CMSNewsHeader'     => 'Announcements',\n\t'CMSPageHeader'     => 'Content Management System',\n\t'CMSPageText'     => 'This module enables server admins and staff to create pages within their website with no prior flux/coding knowledge. The built-in news system can also be swapped out for an rss feed by modifying the application settings.',\n\t'CMSNewsTitleError'     => 'News title is required!',\n\t'CMSNewsBodyError'     => 'News body is required!',\n\t'CMSPageTitleError'     => 'Page Title is required!',\n\t'CMSPageBodyError'     => 'Page body is required!',\n\t'CMSPagePathError'     => 'Page path is required!',\n\t'CMSNewsAdded'     => 'News added to system',\n\t'CMSPagesAdded'     => 'Your new page has been added',\n\t'CMSNewsUpdated'     => 'News updated',\n\t'CMSPageUpdated'     => 'Your page has been updated',\n\t'CMSNewsAddTitle'     => 'Add a news item',\n\t'CMSPageAddTitle'     => 'Add a new page',\n\t'CMSNewsEditTitle'     => 'Edit news',\n\t'CMSPageEditTitle'     => 'Edit page',\n\t'CMSNewsNotFound'     => 'News not found!',\n\t'CMSPageNotFound'     => 'Page not found!',\n\t'CMSNewsDeleted'     => 'News deleted',\n\t'CMSPageDeleted'     => 'Your page has been deleted',\n\t'CMSNewsEmpty'     => 'No news articles have been found. Are you using the correct News Type? (CMSNewsType setting)',\n\t'CMSNewsRSSNotFound'     => \"RSS feed can't be found. Make sure the CMSNewsRSS setting is correct, or switch CMSNewsType to 1 to use built-in news system!\",\n\t'CMSPageEmpty'     => 'No page added',\n\t'CMSNewsLink'     => 'read more...',\n\t'CMSEdit'     => 'Edit',\n\t'CMSDelete'     => 'Delete',\n\t'CMSNewsTitleLabel'     => 'News Title',\n\t'CMSNewsBodyLabel'     => 'News Body',\n\t'CMSNewsLinkLabel'     => 'News Link',\n\t'CMSNewsAuthorLabel'     => 'News Author',\n\t'CMSPageTitleLabel'     => 'Page Title',\n\t'CMSPageBodyLabel'     => 'Page Body',\n\t'CMSPagePathLabel'     => 'Page Path',\n\t'CMSCreatedLabel'     => 'Date Created',\n\t'CMSModifiedLabel'     => 'Date Modified',\n\t'CMSActionLabel'     => 'Action',\n\t'CMSConfirmDeleteLabel'     => 'Are you sure you want to delete?',\n\t'CMSPageCreate'     => 'Create now?',\n\t'CMSOptionalLabel'     => '(Optional)',\n\t'CMSRequiredLabel'     => '(Required)',\n\t'CMSCreateLabel'     => 'Add News',\n\t'SDRespTable7'     => 'Resolve Ticket and Credit Account',\n\n);\n?>\n"
  },
  {
    "path": "lib/Flux/Addon.php",
    "content": "<?php\nrequire_once 'Flux/Config.php';\n\nclass Flux_Addon {\n\tpublic $name;\n\tpublic $addonDir;\n\tpublic $configDir;\n\tpublic $moduleDir;\n\tpublic $themeDir;\n\tpublic $addonConfig;\n\tpublic $accessConfig;\n\tpublic $messagesConfig;\n\t\n\tpublic function __construct($name, $addonDir = null)\n\t{\n\t\t$this->name       = $name;\n\t\t$this->addonDir   = is_null($addonDir) ? FLUX_ADDON_DIR.\"/$name\" : $addonDir;\n\t\t$this->configDir  = \"{$this->addonDir}/config\";\n\t\t$this->moduleDir  = \"{$this->addonDir}/modules\";\n\t\t$this->themeDir   = \"{$this->addonDir}/themes\";\n\t\t\n\t\t$files = array(\n\t\t\t'addonConfig'    => \"{$this->configDir}/addon.php\",\n\t\t\t'accessConfig'   => \"{$this->configDir}/access.php\",\n\t\t\t//'messagesConfig' => \"{$this->configDir}/messages.php\" // Deprecated.\n\t\t);\n\t\t\n\t\tforeach ($files as $configName => $filename) {\n\t\t\tif (file_exists($filename)) {\n\t\t\t\t$this->{$configName} = Flux::parseConfigFile($filename);\n\t\t\t}\n\t\t\t\n\t\t\tif (!($this->{$configName} instanceOf Flux_Config)) {\n\t\t\t\t$tempArr = array();\n\t\t\t\t$this->{$configName} = new Flux_Config($tempArr);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Use new language system for messages (also supports addons).\n\t\t$this->messagesConfig = Flux::parseLanguageConfigFile($name);\n\t}\n\t\n\tpublic function respondsTo($module, $action = null)\n\t{\n\t\t$path = is_null($action) ? \"{$this->moduleDir}/$module\" : \"{$this->moduleDir}/$module/$action.php\";\n\t\tif ((is_null($action) && is_dir($path)) || file_exists($path)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic function getView(Flux_Template $template, $module, $action)\n\t{\n\t\t$path = \"{$this->themeDir}/\". $template->getName() . \"/{$module}/{$action}.php\";\n\n\t\tif (file_exists($path)) {\n\t\t\treturn $path;\n\t\t}\n\n\t\tif (!empty($template->parentTemplate)) {\n\t\t\treturn $this->getView( $template->parentTemplate, $module, $action);\n\t\t}\n\n\t\treturn false;\n\t}\n\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Athena.php",
    "content": "<?php\nrequire_once 'Flux/Config.php';\n\n/**\n * The Athena class is used for all database interactions with each rA server,\n * hence its name.\n *\n * All methods related to creating/modifying any data in the Ragnarok databases\n * and tables shall always go into this class.\n */\nclass Flux_Athena {\t\n\t/**\n\t * Connection object for saving and retrieving data to the rA databases.\n\t *\n\t * @access public\n\t * @var Flux_Connection\n\t */\n\tpublic $connection;\n\t\n\t/**\n\t * Server name, normally something like 'My Cool High-Rate'.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $serverName;\n\t\n\t/**\n\t * Experience rates for base, job, and mvp bonus. Values in percents.\n\t * For example, 100 means 100% which is 1x offical rates.\n\t *\n\t * @access public\n\t * @var int\n\t */\n\tpublic $expRates = array();\n\t\n\t/**\n\t * Drop rate. Same rules as $expRates apply.\n\t *\n\t * @access public\n\t * @var int\n\t */\n\tpublic $dropRates = array();\n\t\n\t/**\n\t * Database used for the login-related SQL operations.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $loginDatabase;\n\t\n\t/**\n\t * Logs database. (is not set until setConnection() is called.)\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $logsDatabase;\n\t\n\t/**\n\t * Web server database. (is not set until setConnection() is called.)\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $webDatabase;\n\t\n\t/**\n\t * Database used for the char/map (aka everything else) SQL operations.\n\t * This does not include log-related tasks.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $charMapDatabase;\n\t\n\t/**\n\t * Login server object tied to this collective rA server.\n\t *\n\t * @access public\n\t * @var Flux_LoginServer\n\t */\n\tpublic $loginServer;\n\t\n\t/**\n\t * Character server object tied to this collective rA server.\n\t *\n\t * @access public\n\t * @var Flux_CharServer\n\t */\n\tpublic $charServer;\n\t\n\t/**\n\t * Map server object tied to this collective rA server.\n\t *\n\t * @access public\n\t * @var Flux_MapServer\n\t */\n\tpublic $mapServer;\n\t\n\t/**\n\t * Item shop cart.\n\t *\n\t * @access public\n\t * @var Flux_ItemShop_Cart\n\t */\n\tpublic $cart;\n\t\n\t/**\n\t * @access public\n\t * @var Flux_LoginAthenaGroup\n\t */\n\tpublic $loginAthenaGroup;\n\t\n\t/**\n\t * Max character slots for this char/map server.\n\t *\n\t * @access public\n\t * @var int\n\t */\n\tpublic $maxCharSlots;\n\t\n\t/**\n\t * Boolean to signify if server is running a renewal environment or not.\n\t *\n\t * @access public\n\t * @var bool\n\t */\n\tpublic $isRenewal;\n\t\n\t/**\n\t * Timezone of this char/map server pair.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $dateTimezone;\n\t\n\t/**\n\t * Array of maps which prohibit the use of \"reset position\" feature.\n\t *\n\t * @access public\n\t * @var array\n\t */\n\tpublic $resetDenyMaps;\n\t\n\t/**\n\t * Array of WoE times.\n\t *\n\t * @access public\n\t * @var array\n\t */\n\tpublic $woeDayTimes = array();\n\t\n\t/**\n\t * Config of disallowed module/actions during WoE hours.\n\t *\n\t * @access public\n\t * @var Flux_Config\n\t */\n\tpublic $woeDisallow;\n\t\n\t/**\n\t * Initialize char/map pair Flux_Athena pair.\n\t *\n\t * @param Flux_Connection $connection\n\t * @param Flux_Config $charMapConfig\n\t * @param Flux_LoginServer $loginServer\n\t * @param Flux_CharServer $charServer\n\t * @param Flux_MapServer $mapServer\n\t * @access public\n\t */\n\tpublic function __construct(Flux_Config $charMapConfig, Flux_LoginServer $loginServer, Flux_CharServer $charServer, Flux_MapServer $mapServer)\n\t{\n\t\t$this->loginServer     = $loginServer;\n\t\t$this->charServer      = $charServer;\n\t\t$this->mapServer       = $mapServer;\n\t\t$this->loginDatabase   = $loginServer->config->getDatabase();\n\t\t\n\t\t$this->serverName      = $charMapConfig->getServerName();\n\t\t$this->expRates        = $charMapConfig->getExpRates()->toArray();\n\t\t$this->dropRates       = $charMapConfig->getDropRates()->toArray();\n\t\t$this->isRenewal       = (boolean)$charMapConfig->getRenewal();\n\t\t$this->maxCharSlots    = (int)$charMapConfig->getMaxCharSlots();\n\t\t$this->dateTimezone    = $charMapConfig->getDateTimezone();\n\t\t$this->charMapDatabase = $charMapConfig->getDatabase();\n\t\t\n\t\t$resetDenyMaps = $charMapConfig->getResetDenyMaps();\n\t\tif (!$resetDenyMaps) {\n\t\t\t$this->resetDenyMaps = array('sec_pri');\n\t\t}\n\t\telseif (!is_array($resetDenyMaps)) {\n\t\t\t$this->resetDenyMaps = array($resetDenyMaps);\n\t\t}\n\t\telse {\n\t\t\t$this->resetDenyMaps = $resetDenyMaps->toArray();\n\t\t}\n\t\t\n\t\t// Get WoE times specific in servers config.\n\t\t$woeDayTimes = $charMapConfig->getWoeDayTimes();\n\t\tif ($woeDayTimes instanceOf Flux_Config) {\n\t\t\t$woeDayTimes = $woeDayTimes->toArray();\n\t\t\tforeach ($woeDayTimes as $dayTime) {\n\t\t\t\tif (!is_array($dayTime) || count($dayTime) < 4) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlist ($sDay, $sTime, $eDay, $eTime) = array_slice($dayTime, 0, 4);\n\t\t\t\t$sTime = trim($sTime);\n\t\t\t\t$eTime = trim($eTime);\n\t\t\t\t\n\t\t\t\tif ($sDay < 0 || $sDay > 6 || $eDay < 0 || $eDay > 6 ||\n\t\t\t\t\t!preg_match('/^\\d{2}:\\d{2}$/', $sTime) || !preg_match('/^\\d{2}:\\d{2}$/', $eTime)) {\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->woeDayTimes[] = array(\n\t\t\t\t\t'startingDay'  => $sDay,\n\t\t\t\t\t'startingTime' => $sTime,\n\t\t\t\t\t'endingDay'    => $eDay,\n\t\t\t\t\t'endingTime'   => $eTime\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Config used for disallowing access to certain modules during WoE.\n\t\t$woeDisallow       = $charMapConfig->getWoeDisallow();\n\t\t$_tempArray        = array();\n\t\t$this->woeDisallow = new Flux_Config($_tempArray);\n\t\t\n\t\tif ($woeDisallow instanceOf Flux_Config) {\n\t\t\t$woeDisallow  = $woeDisallow->toArray();\n\t\t\t\n\t\t\tforeach ($woeDisallow as $disallow) {\n\t\t\t\tif (array_key_exists('module', $disallow)) {\n\t\t\t\t\t$module = $disallow['module'];\n\t\t\t\t\tif (array_key_exists('action', $disallow)) {\n\t\t\t\t\t\t$action = $disallow['action'];\n\t\t\t\t\t\t$this->woeDisallow->set(\"$module.$action\", true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->woeDisallow->set($module, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/**\n\t * Set connection object.\n\t *\n\t * @param Flux_Connection $connection\n\t * @return Flux_Connection\n\t */\n\tpublic function setConnection(Flux_Connection $connection)\n\t{\n\t\t$this->connection   = $connection;\n\t\t$this->logsDatabase = $connection->logsDbConfig->getDatabase();\n\t\t$this->webDatabase  = $connection->webDbConfig->getDatabase();\n\t\t\n\t\treturn $connection;\n\t}\n\t\n\t/**\n\t * Set cart object.\n\t *\n\t * @param Flux_ItemShop_Cart $cart\n\t * @return Flux_ItemShop_Cart\n\t */\n\tpublic function setCart(Flux_ItemShop_Cart $cart)\n\t{\n\t\t$this->cart = $cart;\n\t\treturn $cart;\n\t}\n\t\n\t/**\n\t * When casted to a string, the server name should be used.\n\t *\n\t * @return string\n\t * @access public\n\t */\n\tpublic function __toString()\n\t{\n\t\treturn $this->serverName;\n\t}\n\t\n\t/**\n\t * Transfer credits from one account to another.\n\t *\n\t * @param int $fromAccountID  Account ID\n\t * @param string $targetCharName Character name of person receiving credits\n\t * @param int $credits Amount of credits\n\t */\n\tpublic function transferCredits($fromAccountID, $targetCharName, $credits)\n\t{\n\t\t//\n\t\t// Return values:\n\t\t// -1 = From or to account, one or the other does not exist. (likely the latter.)\n\t\t// -2 = Sender has an insufficient balance.\n\t\t// -3 = Unknown character.\n\t\t// true = Successful transfer\n\t\t// false = Error\n\t\t//\n\t\t\n\t\t$sql = \"SELECT account_id, char_id, name AS char_name FROM {$this->charMapDatabase}.`char` WHERE `char`.name = ? LIMIT 1\";\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t\n\t\tif (!$sth->execute(array($targetCharName)) || !($char=$sth->fetch())) {\n\t\t\t// Unknown character.\n\t\t\treturn -3;\n\t\t}\n\t\t\n\t\t$targetAccountID = $char->account_id;\n\t\t$targetCharID    = $char->char_id;\n\t\t\n\t\t\n\t\t$sql  = \"SELECT COUNT(account_id) AS accounts FROM {$this->loginDatabase}.login WHERE \";\n\t\t$sql .= \"account_id = ? OR account_id = ? LIMIT 2\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif (!$sth->execute(array($fromAccountID, $targetAccountID)) || $sth->fetch()->accounts != 2) {\n\t\t\t// One or the other, from or to, are non-existent accounts.\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\tif (!$this->loginServer->hasCreditsRecord($fromAccountID)) {\n\t\t\t// Sender has a zero balance.\n\t\t\treturn -2;\n\t\t}\n\t\t\n\t\t$creditsTable = Flux::config('FluxTables.CreditsTable');\n\t\t$xferTable    = Flux::config('FluxTables.CreditTransferTable');\n\t\t\n\t\t// Get balance of sender.\n\t\t$sql = \"SELECT balance FROM {$this->loginDatabase}.$creditsTable WHERE account_id = ? LIMIT 1\";\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t\n\t\tif (!$sth->execute(array($fromAccountID))) {\n\t\t\t// Error.\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($sth->fetch()->balance < $credits) {\n\t\t\t// Insufficient balance.\n\t\t\treturn -2;\n\t\t}\n\t\t\n\t\t// Take credits from fromAccount first.\n\t\tif ($this->loginServer->depositCredits($fromAccountID, -$credits)) {\n\t\t\t// Then deposit to targetAccount next.\n\t\t\tif (!$this->loginServer->depositCredits($targetAccountID, $credits)) {\n\t\t\t\t// Attempt to restore credits if deposit to toAccount failed.\n\t\t\t\t$this->loginServer->depositCredits($fromAccountID, $credits);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql  = \"INSERT INTO {$this->charMapDatabase}.$xferTable \";\n\t\t\t\t$sql .= \"(from_account_id, target_account_id, target_char_id, amount, transfer_date) \";\n\t\t\t\t$sql .= \"VALUES (?, ?, ?, ?, NOW())\";\n\t\t\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\t\t\n\t\t\t\t// Log transfer.\n\t\t\t\t$sth->execute(array($fromAccountID, $targetAccountID, $targetCharID, $credits));\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Set loginAthenaGroup object.\n\t *\n\t * @param Flux_LoginAthenaGroup $loginAthenaGroup\n\t * @return Flux_LoginAthenaGroup\n\t */\n\tpublic function setLoginAthenaGroup(Flux_LoginAthenaGroup $loginAthenaGroup)\n\t{\n\t\t$this->loginAthenaGroup = $loginAthenaGroup;\n\t\treturn $loginAthenaGroup;\n\t}\n\t\n\t/**\n\t * Check if a character exists with a particular char ID.\n\t *\n\t * @param int $charID\n\t * @return bool True/false if char exists or doesn't.\n\t */\n\tpublic function charExists($charID)\n\t{\n\t\t$sql  = \"SELECT char_id FROM {$this->charMapDatabase}.`char` WHERE \";\n\t\t$sql .= \"`char`.char_id = ? LIMIT 1\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($charID)) && ($char=$sth->fetch()) && $char->char_id) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Check if a charID belongs to an accountID.\n\t *\n\t * @param int $charID\n\t * @param int $accountID\n\t * @return bool\n\t */\n\tpublic function charBelongsToAccount($charID, $accountID)\n\t{\n\t\t$sql  = \"SELECT char_id FROM {$this->charMapDatabase}.`char` WHERE \";\n\t\t$sql .= \"`char`.char_id = ? AND `char`.account_id = ? LIMIT 1\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($charID, $accountID)) && ($char=$sth->fetch()) && $char->char_id) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Check if char with charID is online.\n\t *\n\t * @param int $charID\n\t * @return bool\n\t */\n\tpublic function charIsOnline($charID)\n\t{\n\t\t$sql  = \"SELECT char_id FROM {$this->charMapDatabase}.`char` WHERE `char`.online > 0 \";\n\t\t$sql .= \"AND `char`.char_id = ? LIMIT 1\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($charID)) && ($char=$sth->fetch()) && $char->char_id) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Check if account has any online characters at the moment.\n\t *\n\t * @param int $accountId\n\t * @return bool\n\t */\n\tpublic function accountHasOnlineChars($accountID)\n\t{\n\t\t$sql  = \"SELECT char_id FROM {$this->charMapDatabase}.`char` WHERE `char`.online > 0 \";\n\t\t$sql .= \"AND `char`.account_id = ? ORDER BY `char`.online DESC LIMIT 1\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($accountID)) && ($char=$sth->fetch()) && $char->char_id) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Get character data of charID.\n\t *\n\t * @param int $charID\n\t * @return mixed Returns Flux_DataObject or false.\n\t */\n\tpublic function getCharacter($charID)\n\t{\n\t\t$sql  = \"SELECT `char`.* FROM {$this->charMapDatabase}.`char` WHERE \";\n\t\t$sql .= \"`char`.char_id = ? LIMIT 1\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($charID)) && ($char=$sth->fetch())) {\n\t\t\treturn $char;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Get character prefs.\n\t *\n\t * @param int $charID Character ID\n\t * @param array $prefs Only these prefs?\n\t * @return mixed Flux_Config or false.\n\t */\n\tpublic function getPrefs($charID, array $prefs = array())\n\t{\n\t\t$sql = \"SELECT account_id FROM {$this->charMapDatabase}.`char` WHERE char_id = ? LIMIT 1\";\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($charID)) && ($char=$sth->fetch())) {\n\t\t\t$charPrefsTable = Flux::config('FluxTables.CharacterPrefsTable');\n\t\t\t\n\t\t\t$pref = array();\n\t\t\t$bind = array($char->account_id, $charID);\n\t\t\t$sql  = \"SELECT name, value FROM {$this->charMapDatabase}.$charPrefsTable \";\n\t\t\t$sql .= \"WHERE account_id = ? AND char_id = ?\";\n\t\t\t\n\t\t\tif ($prefs) {\n\t\t\t\tforeach ($prefs as $p) {\n\t\t\t\t\t$pref[] = \"name = ?\";\n\t\t\t\t\t$bind[] = $p;\n\t\t\t\t}\n\t\t\t\t$sql .= sprintf(' AND (%s)', implode(' OR ', $pref));\n\t\t\t}\n\t\t\t\n\t\t\t$sth = $this->connection->getStatement($sql);\n\t\t\t\n\t\t\tif ($sth->execute($bind)) {\n\t\t\t\t$prefsArray = array();\n\t\t\t\tforeach ($sth->fetchAll() as $p) {\n\t\t\t\t\t$prefsArray[$p->name] = $p->value;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn new Flux_Config($prefsArray);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Set character prefs.\n\t *\n\t * @param int $charID\n\t * @param array $prefsArray pref=>value pairs.\n\t * @return bool\n\t */\n\tpublic function setPrefs($charID, array $prefsArray)\n\t{\n\t\t$sql = \"SELECT account_id FROM {$this->charMapDatabase}.`char` WHERE char_id = ? LIMIT 1\";\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($charID)) && ($char=$sth->fetch())) {\n\t\t\t$charPrefsTable = Flux::config('FluxTables.CharacterPrefsTable');\n\t\t\t\n\t\t\t$pref = array();\n\t\t\t$bind = array($char->account_id, $charID);\n\t\t\t$sql  = \"SELECT id, name, value FROM {$this->charMapDatabase}.$charPrefsTable \";\n\t\t\t$sql .= \"WHERE account_id = ? AND char_id = ?\";\n\t\t\t\n\t\t\tif ($prefsArray) {\n\t\t\t\tforeach ($prefsArray as $prefName => $prefValue) {\n\t\t\t\t\t$pref[] = \"name = ?\";\n\t\t\t\t\t$bind[] = $prefName;\n\t\t\t\t}\n\t\t\t\t$sql .= sprintf(' AND (%s)', implode(' OR ', $pref));\n\t\t\t}\n\t\t\t\n\t\t\t$sth = $this->connection->getStatement($sql);\n\t\t\t\n\t\t\tif ($sth->execute($bind)) {\n\t\t\t\t$prefs  = $sth->fetchAll();\n\t\t\t\t$update = array();\n\t\t\t\t\n\t\t\t\t$usql   = \"UPDATE {$this->charMapDatabase}.$charPrefsTable \";\n\t\t\t\t$usql  .= \"SET value = ? WHERE id = ?\";\n\t\t\t\t$usth   = $this->connection->getStatement($usql);\n\t\t\t\t       \n\t\t\t\t$isql   = \"INSERT INTO {$this->charMapDatabase}.$charPrefsTable \";\n\t\t\t\t$isql  .= \"(account_id, char_id, name, value, create_date) \";\n\t\t\t\t$isql  .= \"VALUES (?, ?, ?, ?, NOW())\";\n\t\t\t\t$isth   = $this->connection->getStatement($isql);\n\t\t\t\t\n\t\t\t\tforeach ($prefs as $p) {\n\t\t\t\t\t$update[$p->name] = $p->id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($prefsArray as $pref => $value) {\n\t\t\t\t\tif (array_key_exists($pref, $update)) {\n\t\t\t\t\t\t$id = $update[$pref];\n\t\t\t\t\t\t$usth->execute(array($value, $id));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$isth->execute(array($char->account_id, $charID, $pref, $value));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Get a single character pref.\n\t *\n\t * @param int $charID\n\t * @param string $pref\n\t * @return mixed string or false.\n\t */\n\tpublic function getPref($charID, $pref)\n\t{\n\t\t$prefs = $this->getPrefs($charID, array($pref));\n\t\tif ($prefs instanceOf Flux_Config) {\n\t\t\treturn $prefs->get($pref);\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Set a single character pref.\n\t *\n\t * @param int $charID\n\t * @param string $pref\n\t * @param string $value\n\t * @return bool\n\t */\n\tpublic function setPref($charID, $pref, $value)\n\t{\n\t\treturn $this->setPrefs($charID, array($pref => $value));\n\t}\n\t\n\t/**\n\t * Re-set the appearance of a character.\n\t *\n\t * @param int $charID\n\t * @return mixed\n\t */\n\tpublic function resetLook($charID)\n\t{\n\t\t// Return values:\n\t\t// -1 = Character is online, cannot reset.\n\t\t// -2 = Unknown character.\n\t\t// false = Failed to reset.\n\t\t// true  = Successfully reset.\n\t\t\n\t\t$char = $this->getCharacter($charID);\n\t\t\n\t\tif (!$char) {\n\t\t\treturn -2;\n\t\t}\n\t\tif ($char->online) {\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\t$sql  = \"UPDATE {$this->charMapDatabase}.inventory SET \";\n\t\t$sql .= \"equip = 0 WHERE char_id = ?\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif (!$sth->execute(array($charID))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$sql  = \"UPDATE {$this->charMapDatabase}.`char` SET \";\n\t\t$sql .= \"hair = 1, hair_color = 0, clothes_color = 0, weapon = 0, shield = 0, \";\n\t\t$sql .= \"head_top = 0, head_mid = 0, head_bottom = 0, body = `class` \";\n\t\t$sql .= \"WHERE char_id = ?\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif (!$sth->execute(array($charID))) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}\n\t\n\t/**\n\t * Re-set the position of a character.\n\t *\n\t * @param int $charID\n\t * @return mixed\n\t */\n\tpublic function resetPosition($charID)\n\t{\n\t\t// Return values:\n\t\t// -1 = Character is online, cannot reset.\n\t\t// -2 = Reset cannot be done from current map.\n\t\t// -3 = Unknown character.\n\t\t// false = Failed to reset.\n\t\t// true  = Successfully reset.\n\t\t\n\t\t$char = $this->getCharacter($charID);\n\t\t\n\t\tif (!$char) {\n\t\t\treturn -3;\n\t\t}\n\t\tif ($char->online) {\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\t$charMap = basename($char->last_map, '.gat');\n\t\tforeach ($this->resetDenyMaps as $map) {\n\t\t\t$denyMap = basename($map, '.gat');\n\t\t\tif ($charMap == $denyMap) {\n\t\t\t\treturn -2;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sql  = \"UPDATE {$this->charMapDatabase}.`char` AS ch SET \";\n\t\t$sql .= \"ch.last_map = ch.save_map, ch.last_x = ch.save_x, ch.last_y = ch.save_y \";\n\t\t$sql .= \"WHERE ch.char_id = ?\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($charID))) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Get the current server time, based on the DateTimezone servers.php config.\n\t *\n\t * @param string $format Similar to that of PHP's date() function.\n\t * @return string\n\t */\n\tpublic function getServerTime($format = 'U')\n\t{\n\t\t$dateTime = date_create('now');\n\t\tif ($this->dateTimezone) {\n\t\t\t$dateTime->setTimeZone(new DateTimeZone($this->dateTimezone));\n\t\t}\n\t\treturn $dateTime->format($format);\n\t}\n\t\n\t/**\n\t * Check if it currently WoE according to the configured hours and timezone.\n\t *\n\t * @return bool\n\t */\n\tpublic function isWoe()\n\t{\n\t\t$serverTime = (int)$this->getServerTime();\n\t\t$dayNames   = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');\n\t\t\t\n\t\tforeach ($this->woeDayTimes as $woeDayTime) {\n\t\t\t$sDay  = $dayNames[$woeDayTime['startingDay']];\n\t\t\t$eDay  = $dayNames[$woeDayTime['endingDay']];\n\t\t\t$start = strtotime(\"$sDay {$woeDayTime['startingTime']}\");\n\t\t\t$end   = strtotime(\"$eDay {$woeDayTime['endingTime']}\");\n\t\t\t\n\t\t\tif ($serverTime > $start && $serverTime < $end) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Authorization.php",
    "content": "<?php\nrequire_once 'Flux/Error.php';\n\n/**\n * The authorization component allows you to find out whether or not the\n * the current user is allowed to perform a certain task based on his account\n * group level.\n */\nclass Flux_Authorization {\n\t/**\n\t * Authorization instance.\n\t *\n\t * @access private\n\t * @var Flux_Authorization\n\t */\n\tprivate static $auth;\n\t\n\t/**\n\t * Access configuration.\n\t *\n\t * @access private\n\t * @var Flux_Config\n\t */\n\tprivate $config;\n\t\n\t/**\n\t * Session data object.\n\t *\n\t * @access private\n\t * @var Flux_SessionData\n\t */\n\tprivate $session;\n\t\n\t/**\n\t * Construct new Flux_Authorization instance.\n\t *\n\t * @param Flux_Config $accessConfig\n\t * @param Flux_SessionData $sessionData\n\t * @access private\n\t */\n\tprivate function __construct(Flux_Config $accessConfig, Flux_SessionData $sessionData)\n\t{\n\t\t$this->config  = $accessConfig;\n\t\t$this->session = $sessionData;\n\t}\n\t\n\t/**\n\t * Get authorization instance, creates one if it doesn't already exist.\n\t *\n\t * @param Flux_Config $accessConfig\n\t * @param Flux_SessionData $sessionData\n\t * @return Flux_Authorization\n\t * @access public\n\t */\n\tpublic static function getInstance($accessConfig = null, $sessionData = null)\n\t{\n\t\tif (!self::$auth) {\n\t\t\tself::$auth = new Flux_Authorization($accessConfig, $sessionData);\n\t\t}\n\t\treturn self::$auth;\t\n\t}\n\t\n\t/**\n\t * Checks whether or not the current user is able to perform a particular\n\t * action based on his/her group level and id.\n\t *\n\t * @param string $moduleName\n\t * @param string $actionName\n\t * @return bool\n\t * @access public\n\t */\n\tpublic function actionAllowed($moduleName, $actionName = 'index')\n\t{\n\t\t$accessConfig = $this->config->get('modules');\n\t\t$accessKeys   = array(\"$moduleName.$actionName\", \"$moduleName.*\");\n\t\t$accountLevel = $this->session->account->group_level;\n\t\t$existentKeys = array();\n\n\t\tif ($accessConfig instanceOf Flux_Config) {\n\t\t\tforeach ($accessKeys as $accessKey) {\n\t\t\t\t$accessLevel = $accessConfig->get($accessKey);\n\t\t\t\n\t\t\t\tif (!is_null($accessLevel)) {\n\t\t\t\t\t$existentKeys[] = $accessKey;\n\t\t\t\t\t\n\t\t\t\t\tif ($accessLevel == AccountLevel::ANYONE || $accessLevel == $accountLevel ||\n\t\t\t\t\t\t($accessLevel != AccountLevel::UNAUTH && $accessLevel <= $accountLevel)) {\n\t\t\t\t\t\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (empty($existentKeys)) {\n\t\t\treturn -1;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Checks whether or not the current user is allowed to use a particular\n\t * feature based on his/her group level and id.\n\t *\n\t * @param string $featureName\n\t * @return bool\n\t * @access public\n\t */\n\tpublic function featureAllowed($featureName)\n\t{\n\t\t$accessConfig = $this->config->get('features');\n\t\t$accountLevel = $this->session->account->group_level;\n\t\t\n\t\tif (($accessConfig instanceOf Flux_Config)) {\n\t\t\t$accessLevel = $accessConfig->get($featureName);\n\t\t\t\n\t\t\tif (!is_null($accessLevel) &&\n\t\t\t\t($accessLevel == AccountLevel::ANYONE || $accessLevel == $accountLevel ||\n\t\t\t\t($accessLevel != AccountLevel::UNAUTH && $accessLevel <= $accountLevel))) {\n\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t\n\t/**\n\t * Provides convenient getters such as `allowedTo<FeatureName>' and\n\t * `getGroupLevelTo<FeatureName>'.\n\t *\n\t * @access public\n\t */\n\tpublic function __get($prop)\n\t{\n\t\tif (preg_match(\"/^allowedTo(.+)/i\", $prop, $m)) {\n\t\t\treturn $this->featureAllowed($m[1]);\n\t\t}\n\t\telseif (preg_match(\"/^getGroupLevelTo(.+)/i\", $prop, $m)) {\n\t\t\t$accessConfig = $this->config->get('features');\n\t\t\tif ($accessConfig instanceOf Flux_Config) {\n\t\t\t\treturn $accessConfig->get($m[1]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/**\n\t * Wrapper method for setting and getting values from the access config.\n\t *\n\t * @param string $key\n\t * @param mixed $value\n\t * @param arary $options\n\t * @access public\n\t */\n\tpublic function config($key, $value = null, $options = array())\n\t{\n\t\tif (!is_null($value)) {\n\t\t\treturn $this->config->set($key, $value, $options);\n\t\t}\n\t\telse {\n\t\t\treturn $this->config->get($key);\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/BaseServer.php",
    "content": "<?php\n/**\n * The BaseServer implementation is used for containing methods and properties\n * directly related to the server itself, such as checking its upstatus.\n */\nclass Flux_BaseServer {\n\t/**\n\t * The configuration object for this server. For a login server this would\n\t * be the Flux_Config instance of the LoginServer section, for a character\n\t * server it would be CharServer and so on.\n\t *\n\t * @access public\n\t * @var Flux_Config\n\t */\n\tpublic $config;\n\t\n\t/**\n\t * Construct new server object. Should be overridden by child class.\n\t *\n\t * @access public\n\t */\n\tpublic function __construct(Flux_Config $config)\n\t{\n\t\t$this->config = $config;\n\t}\n\t\n\t/**\n\t * Checks whether the server is up and running (accepting connections).\n\t * Will return true/false based on the server status.\n\t *\n\t * @return bool Returns true if server is running, false if not.\n\t * @access public\n\t */\n\tpublic function isUp()\n\t{\n\t\t$addr = $this->config->getAddress();\n\t\t$port = $this->config->getPort();\n\t\t$sock = @fsockopen($addr, $port, $errno, $errstr, (int)Flux::config('ServerStatusTimeout'));\n\t\t\n\t\tif (is_resource($sock)) {\n\t\t\tfclose($sock);\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Captcha.php",
    "content": "<?php\n/**\n * Draws a CAPTCHA image for use in forms such as the registration form.\n */\nclass Flux_Captcha {\n\t/**\n\t * GD image resource.\n\t *\n\t * @access protected\n\t * @var resource\n\t */\n\tprotected $gd;\n\t\n\t/**\n\t * CAPTCHA options.\n\t *\n\t * @access public\n\t * @var array\n\t */\n\tpublic $options;\n\t\n\t/**\n\t * Security code.\n\t *\n\t * @access public\n\t * @var code\n\t */\n\tpublic $code;\n\t\n\t/**\n\t * Create new CAPTCHA.\n\t */\n\tpublic function __construct($options = array())\n\t{\n\t\t$this->options = array_merge(\n\t\t\tarray(\n\t\t\t\t'chars'      => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWWXYZ0123456789',\n\t\t\t\t'length'     => 5,\n\t\t\t\t'background' => FLUX_DATA_DIR.'/captcha/background.png',\n\t\t\t\t'fontPath'   => realpath(FLUX_DATA_DIR.'/captcha/fonts'),\n\t\t\t\t'fontName'   => 'default.ttf',\n\t\t\t\t'fontSize'   => 28,\n\t\t\t\t'yPosition'  => 40,\n\t\t\t\t'useDistort' => true,\n\t\t\t\t'distortion' => 10\n\t\t\t),\n\t\t\t$options\n\t\t);\n\t\t\n\t\t// Let GD know where our fonts are.\n\t\t//putenv(\"GDFONTPATH={$this->options['fontPath']}\"); // Possibly breaks on Windows?\n\t\t\n\t\t// Generate security code.\n\t\t$this->generateCode();\n\t\t\n\t\t// Generate CAPTCHA image.\n\t\t$this->generateImage();\n\t}\n\t\n\t/**\n\t * Generate the security code to be used.\n\t *\n\t * @access protected\n\t */\n\tprotected function generateCode()\n\t{\n\t\t$code  = '';\n\t\t$chars = str_split($this->options['chars']);\n\t\t\n\t\tfor ($i = 0; $i < $this->options['length']; ++$i) {\n\t\t\t$code .= $chars[array_rand($chars)];\n\t\t}\n\t\t\n\t\t$this->code = $code;\n\t\treturn $code;\n\t}\n\t\n\t/**\n\t * Generate the image.\n\t *\n\t * @access protected\n\t */\n\tprotected function generateImage()\n\t{\n\t\t$this->gd = imagecreatefrompng($this->options['background']);\n\t\t$yPos   = $this->options['yPosition'];\n\t\t$font   = \"{$this->options['fontPath']}/{$this->options['fontName']}\";\n\t\t$size   = $this->options['fontSize'];\n\t\t$shade1 = imagecolorallocate($this->gd, 240, 240, 240);\n\t\t$shade2 = imagecolorallocate($this->gd, 60, 60, 60);\n\t\t$shade3 = imagecolorallocate($this->gd, 0, 0, 0);\n\t\t\n\t\tif (function_exists('imagettftext')) {\n\t\t\t$distA = -$this->options['distortion'];\n\t\t\t$distB = +$this->options['distortion'];\n\t\t\t\n\t\t\tforeach (str_split($this->code, 1) as $i => $char) {\n\t\t\t\timagettftext($this->gd, $size + 2, $this->options['useDistort'] ? rand($distA, $distB) : 0, ((28 * $i) + 10), $yPos, $shade3, $font, $char);\n\t\t\t\timagettftext($this->gd, $size + 4, $this->options['useDistort'] ? rand($distA, $distB) : 0, ((28 * $i) + 10), $yPos, $shade2, $font, $char);\n\t\t\t\timagettftext($this->gd, $size    , $this->options['useDistort'] ? rand($distA, $distB) : 0, ((28 * $i) + 10), $yPos, $shade1, $font, $char);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$text  = \"FreeType2 is needed\\n\";\n\t\t\t$text .= \"for CAPTCHA support.\\n\";\n\t\t\tforeach (explode(\"\\n\", $text) as $i => $line) {\n\t\t\t\timagestring($this->gd, 3, 5, (12 * ($i + 1)), $line, $shade1);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/**\n\t * Display image.\n\t *\n\t * @access public\n\t */\n\tpublic function display()\n\t{\n\t\theader('Content-Type: image/png');\n\t\timagepng($this->gd);\n\t\texit;\n\t}\n\t\n\tpublic function __destruct()\n\t{\n\t\timagedestroy($this->gd);\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/CharServer.php",
    "content": "<?php\nrequire_once 'Flux/BaseServer.php';\n\n/**\n * Represents an rAthena Character Server.\n */\nclass Flux_CharServer extends Flux_BaseServer {\n\t\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Config.php",
    "content": "<?php\n// You don't need this line if you decided to specify a custom $exceptionClass\n// property in your version of Flux_Config.\nrequire_once 'Flux/Error.php';\n\n/**\n * Flux_Config acts as a convenient way to access arrays which are used as a\n * means of storing and retrieving configuration values to the application.\n */\nclass Flux_Config {\n\t/**\n\t * Configuration array.\n\t *\n\t * @access private\n\t * @var array\n\t */\n\tprivate $configArr;\n\t\n\t/**\n\t * Default options for setter.\n\t *\n\t * @access private\n\t * @var array\n\t */\n\tprivate $defaultSetOptions = array('overwrite' => true, 'force' => true);\n\t\n\t/**\n\t * This is here for any developer's convenience, just in case he/she would\n\t * like to re-use this library without having to depend on the Flux_Error\n\t * class to do so. This will cause Flux_Config to raise the exception class\n\t * of your choice.\n\t *\n\t * It's preferable that the developer change the value directly from the\n\t * class, instead of finding ways to do it from code.\n\t *\n\t * @access private\n\t * @var string\n\t */\n\tprivate $exceptionClass = 'Flux_Error';\n\n\t/**\n\t * The list of configuration keys that are cleared if found in the import config.\n\t * These are used for \"normal\" arrays, not associative arrays. This way is faster than\n\t * checking if each array in the config is associative or not.\n\t * @access private\n\t * @var array\n\t */\n\tprivate $clearKeysOnImport = array(\n\t\t'ThemeName',\n\t\t'PayPalReceiverEmails',\n\t\t'PayPalAllowedHosts',\n\t\t'BanPaymentStatuses',\n\t\t'ShopImageExtensions',\n\t);\n\n\t\n\t/**\n\t * Construct a Flux_Config instance which acts as a more convenient\n\t * accessor to the specified configuration array.\n\t *\n\t * @param array $configArray Configuration array.\n\t * @access public\n\t */\n\tpublic function __construct(array &$configArr)\n\t{\n\t\t$this->configArr = &$configArr;\n\t}\n\t\n\t/**\n\t * This is here... for no real GOOD reason, but should the need arise, at\n\t * least you aren't deprived of access to it.\n\t *\n\t * @return array Configuration array.\n\t * @access public\n\t */\n\tpublic function &toArray()\n\t{\n\t\treturn $this->configArr;\n\t}\n\t\n\t/**\n\t * Goes through each child in the array which is also an array, and returns\n\t * them collectively as an array of Flux_Config instances.\n\t *\n\t * @return array Array of Flux_Config instances of all children arrays.\n\t * @access public\n\t */\n\tpublic function &getChildrenConfigs()\n\t{\n\t\t$children = array();\n\t\tforeach ($this->configArr as $key => &$child) {\n\t\t\tif (is_array($child)) {\n\t\t\t\t$children[$key] = new Flux_Config($child);\n\t\t\t}\n\t\t}\n\t\treturn $children;\n\t}\n\t\n\t/**\n\t * Get the value held by the specified key. If the value is an array it\n\t * will be returned as an instance of Flux_Config by default, unless\n\t * $configObjectIfArray is set to false.\n\t *\n\t * Keys are specified in an object-like format, such as: 'Foo.Bar.Baz'\n\t * where each dot would denote the difference in depth from key-to-key.\n\t *\n\t * @param string $key Key sequence.\n\t * @param bool $configObjectIfArray True/false whether or not to return Flux_Config instances for values that are an array.\n\t * @access public\n\t */\n\tpublic function get($key, $configObjectIfArray = true)\n\t{\n\t\tif (!is_string($key) || empty($key)) {\n\t\t\treturn null;\n\t\t}\n\t\t$keys = explode('.', $key);\n\t\t$base = &$this->configArr;\n\t\t$size = count($keys) - 1;\n\t\t\n\t\tfor ($i = 0; $i < $size; ++$i) {\n\t\t\t$currentKey = $keys[$i];\n\t\t\tif (is_array($base) && array_key_exists($currentKey, $base)) {\n\t\t\t\t$base = &$base[$currentKey];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Short-circuit and return null.\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$currentKey = $keys[$size];\n\t\tif (array_key_exists($currentKey, $base)) {\n\t\t\t$value = &$base[$currentKey];\n\t\t\tif (is_array($value) && $configObjectIfArray) {\n\t\t\t\t$configClassName = get_class($this);\n\t\t\t\treturn new $configClassName($value);\n\t\t\t}\n\t\t\telseif ($value instanceOf Flux_Config && !$configObjectIfArray) {\n\t\t\t\treturn $value->toArray();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// We want to avoid a traditional PHP error when referencing\n\t\t\t// non-existent keys, so we'll silently return null as an\n\t\t\t// alternative ;)\n\t\t\treturn null;\n\t\t}\n\t}\n\t\n\t/**\n\t * Set a key to hold the specified value. The format for specifying a key\n\t * is 100% identical to Flux_Config::get().\n\t *\n\t * Options outline:\n\t *   overwrite - true/false to overwrite existing keys.\n\t *     force   - true/false to force the creation of the key hierarchy.\n\t *\n\t * @param string $key Key sequence.\n\t * @param mixed $value Value to set in the key.\n\t * @param array $options Array of options.\n\t * @access public\n\t */\n\tpublic function set($key, $value, $options = array())\n\t{\n\t\t$opts = array_merge($this->defaultSetOptions, $options);\n\t\t$keys = explode('.', $key);\n\t\t$base = &$this->configArr;\n\t\t$size = count($keys) - 1;\n\t\t\n\t\tfor ($i = 0; $i < $size; ++$i) {\n\t\t\t$currentKey = $keys[$i];\n\t\t\tif (is_array($base) && array_key_exists($currentKey, $base)) {\n\t\t\t\t$base = &$base[$currentKey];\n\t\t\t}\n\t\t\telseif ($opts['force']) {\n\t\t\t\t$base[$currentKey] = array();\n\t\t\t\t$base = &$base[$currentKey];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Short-circuit and return false.\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$currentKey = $keys[$size];\n\t\tif (array_key_exists($currentKey, $base) && !$opts['overwrite']) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$base[$currentKey] = $value;\n\t\treturn $value;\n\t}\n\t\n\t/**\n\t * Convenience method for raising an internal exception.\n\t *\n\t * @param string $message Error message.\n\t * @access public\n\t */\n\tpublic function raise($message)\n\t{\n\t\t$exceptionClass = $this->exceptionClass;\n\t\tthrow new $exceptionClass($message);\n\t}\n\t\n\t/**\n\t * Adds the ability to call set<ConfigDirective>(<Value>) as native methods.\n\t *\n\t * @param string $method\n\t * @param array $args\n\t * @access public\n\t */\n\tpublic function __call($method, $args = array())\n\t{\n\t\tif (preg_match('/^get(\\S+)$/', $method, $m)) {\n\t\t\treturn $this->get($m[1]);\n\t\t}\n\t\telseif (preg_match('/^set(\\S+)$/', $method, $m)) {\n\t\t\t$options = array();\n\t\t\t$argc    = count($args);\n\t\t\tif ($argc > 1) {\n\t\t\t\t$options = $args[1];\n\t\t\t}\n\t\t\telseif ($argc < 1) {\n\t\t\t\t$class = get_class($this);\n\t\t\t\t$this->raise(\"Missing value argument in $class::$method()\");\n\t\t\t}\n\t\t\treturn $this->set($m[1], $args[0], $options);\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function merge(Flux_Config $config, $recursive = true, $distinct = false)\n\t{\n\t\tif (!$recursive && $distinct) {\n\t\t\t$this->raise('Cannot merge non-recursively and distinctively at the same time.');\n\t\t}\n\t\tif ($distinct) {\n\t\t\t$this->configArr = $this->array_merge_recursive_distinct($this->configArr, $config->toArray());\n\t\t} else if ($recursive) {\n\t\t\t$this->configArr = array_merge_recursive($this->configArr, $config->toArray());\n\t\t} else {\n\t\t\t$this->configArr = array_merge($this->configArr, $config->toArray());\n\t\t}\n\t}\n\n\t/**\n\t * array_merge_recursive does indeed merge arrays, but it converts values with duplicate\n\t * keys to arrays rather than overwriting the value in the first array with the duplicate\n\t * value in the second array, as array_merge does. I.e., with array_merge_recursive,\n\t * this happens (documented behavior):\n\t *\n\t * array_merge_recursive(array('key' => 'org value'), array('key' => 'new value'));\n\t *     => array('key' => array('org value', 'new value'));\n\t *\n\t * array_merge_recursive_distinct does not change the datatypes of the values in the arrays.\n\t * Matching keys' values in the second array overwrite those in the first array, as is the\n\t * case with array_merge, i.e.:\n\t *\n\t * array_merge_recursive_distinct(array('key' => 'org value'), array('key' => 'new value'));\n\t *     => array('key' => array('new value'));\n\t *\n\t * Because arrays are appended, not overwritten, we check each key against $clearKeysOnImport,\n\t * and if it matches, we clear the array before importing the new values.\n\t *\n\t * @param array $array1\n\t * @param array $array2\n\t * @return array\n\t * @author Daniel <daniel (at) danielsmedegaardbuus (dot) dk>\n\t * @author Gabriel Sobrinho <gabriel (dot) sobrinho (at) gmail (dot) com>\n\t */\n\tpublic function array_merge_recursive_distinct(array $base, array $import) {\n\t\t$merged = $base;\n\n\t\tforeach ($import as $key => &$value) {\n\t\t\tif (in_array($key, $this->clearKeysOnImport)) {\n\t\t\t\t$merged[$key] = array();\n\t\t\t}\n\t\t\tif (is_array($value) && isset($merged[$key]) && is_array($merged[$key])) {\n\t\t\t\t$merged[$key] = $this->array_merge_recursive_distinct($merged[$key], $value);\n\t\t\t} else {\n\t\t\t\t$merged[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $merged;\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Connection/Statement.php",
    "content": "<?php\nrequire_once 'Flux/LogFile.php';\nrequire_once 'Flux/Error.php';\n\nclass Flux_Connection_Statement {\n\tpublic $stmt;\n\tprivate static $errorLog;\n\n\tpublic function __construct(PDOStatement $stmt)\n\t{\n\t\t$this->stmt = $stmt;\n\n\t\tif (!self::$errorLog) {\n\t\t\tself::$errorLog = new Flux_LogFile(FLUX_DATA_DIR.'/logs/mysql/errors/'.date('Ymd').'.log', 'a');\n\t\t}\n\t}\n\n\tprivate function getParamType($param)\n\t{\n\t\tswitch (true) {\n\t\t\tcase is_bool($param):\n\t\t\t\treturn PDO::PARAM_BOOL;\n\t\t\tcase is_int($param):\n\t\t\t\treturn PDO::PARAM_INT;\n\t\t\tcase is_null($param):\n\t\t\t\treturn PDO::PARAM_NULL;\n\t\t}\n\t\treturn PDO::PARAM_STR;\n\t}\n\n\tpublic function execute(array $inputParameters = array(), $bind_param = false)\n\t{\n\t\tif ($bind_param) {\n\t\t\tforeach ($inputParameters as $key => &$param) {\n\t\t\t\tif (is_string($key) && $key[0] == \":\") {\n\t\t\t\t\tif (is_array($param)) {\n\t\t\t\t\t\t// $params = [ :param => [ val, PDO::PARAM_ ], ... ];\n\t\t\t\t\t\t$this->stmt->bindParam($key, $param[0], $param[1]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// $params = [ :param => val, ... ];\n\t\t\t\t\t\t$this->stmt->bindParam($key, $param, $this->getParamType($param));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// $params = [ val, ... ];\n\t\t\t\t\t$this->stmt->bindParam($key+1, $param, $this->getParamType($param));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$res = $this->stmt->execute();\n\t\t} else {\n\t\t\t$res = $this->stmt->execute(empty($inputParameters) ? null : $inputParameters);\n\t\t}\n\n\t\tFlux::$numberOfQueries++;\n\t\tif ((int)$this->stmt->errorCode()) {\n\t\t\t$info = $this->stmt->errorInfo();\n\t\t\tself::$errorLog->puts('[SQLSTATE=%s] Err %s: %s', $info[0], $info[1], $info[2]);\n\t\t\tif (Flux::config('DebugMode')) {\n\t\t\t\t$message = sprintf('MySQL error (SQLSTATE: %s, ERROR: %s): %s', $info[0], $info[1], $info[2]);\n\t\t\t\tthrow new Flux_Error($message);\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}\n\n\tpublic function __call($method, $args)\n\t{\n\t\treturn call_user_func_array(array($this->stmt, $method), $args);\n\t}\n}\n"
  },
  {
    "path": "lib/Flux/Connection/index.html",
    "content": ""
  },
  {
    "path": "lib/Flux/Connection.php",
    "content": "<?php\nrequire_once 'Flux/Connection/Statement.php';\nrequire_once 'Flux/DataObject.php';\n\n/**\n * The connection class acts more like a container, or connection manager and\n * anything else, really. It's true that it does establish connections to the\n * database, but it exists for the purpose of containing and separating the\n * connections to TWO databases, the logs database from which all the rA logs\n * are stored, and the main database where everything else is stored.\n */\nclass Flux_Connection {\n\t/**\n\t * Main database configuration object.\n\t *\n\t * @access public\n\t * @var Flux_Config\n\t */\n\tpublic $dbConfig;\n\t\n\t/**\n\t * Logs database configuration object.\n\t *\n\t * @access public\n\t * @var Flux_Config\n\t */\n\tpublic $logsDbConfig;\n\t\n\t/**\n\t * Logs database configuration object.\n\t *\n\t * @access public\n\t * @var Flux_Config\n\t */\n\tpublic $webDbConfig;\n\t\n\t/**\n\t * @access private\n\t * @var PDO\n\t */\n\tprivate $pdoMain;\n\t\n\t/**\n\t * @access private\n\t * @var PDO\n\t */\n\tprivate $pdoLogs;\n\t\n\t/**\n\t * @access private\n\t * @var PDO\n\t */\n\tprivate $pdoWeb;\n\t\n\t/**\n\t * @param Flux_Config $dbConfig\n\t * @param Flux_Config $logsDbConfig\n\t * @param Flux_Config $webDbConfig\n\t * @access public\n\t */\n\tpublic function __construct(Flux_Config $dbConfig, Flux_Config $logsDbConfig, Flux_Config $webDbConfig)\n\t{\n\t\t$this->dbConfig     = $dbConfig;\n\t\t$this->logsDbConfig = $logsDbConfig;\n\t\t$this->webDbConfig  = $webDbConfig;\n\t}\n\t\n\t/**\n\t * Establish connection to server based on config.\n\t *\n\t * @param Flux_Config $dbConfig\n\t * @return PDO\n\t * @access private\n\t */\n\tprivate function connect(Flux_Config $dbConfig)\n\t{\n\t\t$dsn = 'mysql:';\n\t\t\n\t\t// Differentiate between a socket-type connection or an ip:port\n\t\t// connection.\n\t\tif ($sock=$dbConfig->getSocket()) {\n\t\t\t$dsn .= \"unix_socket=$sock\";\n\t\t}\n\t\telse {\n\t\t\t$dsn .= 'host='.$dbConfig->getHostname();\n\t\t\tif ($port=$dbConfig->getPort()) {\n\t\t\t\t$dsn .= \";port=$port\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t// May or may not have a database name specified.\n\t\tif ($dbName=$dbConfig->getDatabase()) {\n\t\t\t$dsn .= \";dbname=$dbName\";\n\t\t}\n\t\t\n\t\t$persistent = array(PDO::ATTR_PERSISTENT => (bool)$dbConfig->getPersistent());\n\t\treturn new PDO($dsn, $dbConfig->getUsername(), $dbConfig->getPassword(), $persistent);\n\t}\n\t\n\t/**\n\t * Get the PDO instance for the main database server connection.\n\t *\n\t * @return PDO\n\t * @access private\n\t */\n\tprivate function getConnection()\n\t{\n\t\tif (!$this->pdoMain) {\n\t\t\t// Establish connection for main databases.\n\t\t\t$pdoMain       = $this->connect($this->dbConfig);\n\t\t\t$this->pdoMain = $pdoMain;\n\t\t\t\n\t\t\tif ($encoding=$this->dbConfig->getEncoding()) {\n\t\t\t\t$sth = $this->getStatement(\"SET NAMES ?\");\n\t\t\t\t$sth->execute(array($encoding));\n\t\t\t}\n\t\t\tif ($timezone=$this->dbConfig->getTimezone()) {\n\t\t\t\t$sth = $this->getStatement(\"SET time_zone = ?\");\n\t\t\t\t$sth->execute(array($timezone));\n\t\t\t}\n\t\t}\n\t\treturn $this->pdoMain;\n\t}\n\t\n\t/**\n\t * Get the PDO instance for the logs database server connection.\n\t *\n\t * @return PDO\n\t * @access private\n\t */\n\tprivate function getLogsConnection()\n\t{\n\t\tif (!$this->pdoLogs) {\n\t\t\t// Establish separate connection just for the log database.\n\t\t\t$pdoLogs       = $this->connect($this->logsDbConfig);\n\t\t\t$this->pdoLogs = $pdoLogs;\n\t\t\t\n\t\t\tif ($encoding=$this->logsDbConfig->getEncoding()) {\n\t\t\t\t$sth = $this->getStatementForLogs(\"SET NAMES ?\");\n\t\t\t\t$sth->execute(array($encoding));\n\t\t\t}\n\t\t\tif ($timezone=$this->logsDbConfig->getTimezone()) {\n\t\t\t\t$sth = $this->getStatementForLogs(\"SET time_zone = ?\");\n\t\t\t\t$sth->execute(array($timezone));\n\t\t\t}\n\t\t}\n\t\treturn $this->pdoLogs;\n\t}\n\t\n\t/**\n\t * Get the PDO instance for the web server database server connection.\n\t *\n\t * @return PDO\n\t * @access private\n\t */\n\tprivate function getWebConnection()\n\t{\n\t\tif (!$this->pdoWeb) {\n\t\t\t// Establish separate connection just for the web server database.\n\t\t\t$pdoWeb       = $this->connect($this->webDbConfig);\n\t\t\t$this->pdoWeb = $pdoWeb;\n\t\t\t\n\t\t\tif ($encoding=$this->webDbConfig->getEncoding()) {\n\t\t\t\t$sth = $this->getStatementForWeb(\"SET NAMES ?\");\n\t\t\t\t$sth->execute(array($encoding));\n\t\t\t}\n\t\t\tif ($timezone=$this->webDbConfig->getTimezone()) {\n\t\t\t\t$sth = $this->getStatementForWeb(\"SET time_zone = ?\");\n\t\t\t\t$sth->execute(array($timezone));\n\t\t\t}\n\t\t}\n\t\treturn $this->pdoWeb;\n\t}\n\t\n\t/**\n\t * Select database to use.\n\t *\n\t * @param string $dbName\n\t * @return mixed\n\t * @access public\n\t */\n\tpublic function useDatabase($dbName)\n\t{\n\t\tif ($this->pdoMain) {\n\t\t\treturn $this->getStatement(\"USE $dbName\")->execute();\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Instanciate a PDOStatement without obtaining a PDO handler before-hand.\n\t *\n\t * @return PDOStatement\n\t * @access public\n\t */\n\tpublic function getStatement($statement, $options = array())\n\t{\n\t\t$dbh = $this->getConnection();\n\t\t$sth = $dbh->prepare($statement, $options);\n\t\t@$sth->setFetchMode(PDO::FETCH_CLASS, 'Flux_DataObject', array(null, array('dbconfig' => $this->dbConfig)));\n\t\t\n\t\tif ($sth) {\n\t\t\treturn new Flux_Connection_Statement($sth);\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Instanciate a PDOStatement without obtaining a PDO handler before-hand.\n\t *\n\t * @return PDOStatement\n\t * @access public\n\t */\n\tpublic function getStatementForLogs($statement, $options = array())\n\t{\n\t\t$dbh = $this->getLogsConnection();\n\t\t$sth = $dbh->prepare($statement, $options);\n\t\t@$sth->setFetchMode(PDO::FETCH_CLASS, 'Flux_DataObject', array(null, array('dbconfig' => $this->logsDbConfig)));\n\t\t\n\t\tif ($sth) {\n\t\t\treturn new Flux_Connection_Statement($sth);\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Instanciate a PDOStatement without obtaining a PDO handler before-hand.\n\t *\n\t * @return PDOStatement\n\t * @access public\n\t */\n\tpublic function getStatementForWeb($statement, $options = array())\n\t{\n\t\t$dbh = $this->getWebConnection();\n\t\t$sth = $dbh->prepare($statement, $options);\n\t\t@$sth->setFetchMode(PDO::FETCH_CLASS, 'Flux_DataObject', array(null, array('dbconfig' => $this->webDbConfig)));\n\t\t\n\t\tif ($sth) {\n\t\t\treturn new Flux_Connection_Statement($sth);\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function reconnectAs($username, $password)\n\t{\n\t\tif ($this->pdoMain) {\n\t\t\t$this->pdoMain = null;\n\t\t}\n\t\t\n\t\t$this->dbConfig->setPersistent(false);\n\t\t$this->dbConfig->setUsername($username);\n\t\t$this->dbConfig->setPassword($password);\n\n\t\treturn true;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function isCaseSensitive($database, $table, $column, $useLogsConnection = false)\n\t{\n\t\t$stm = $useLogsConnection ? 'getStatementForLogs' : 'getStatement';\n\t\t$sql = 'SELECT COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? AND COLUMN_NAME = ?';\n\t\t$sth = $this->$stm($sql);\n\t\t$sth->execute(array($database, $table, $column));\n\t\t\n\t\t$row = $sth->fetch();\n\t\tif (preg_match('/_ci$/', $row->COLLATION_NAME)) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/DataObject.php",
    "content": "<?php\nrequire_once 'Flux/Config.php';\nrequire_once 'Flux/Error.php';\n\n/**\n * Objectifies a given object.\n */\nclass Flux_DataObject {\n\t/**\n\t * Storage object.\n\t *\n\t * @access protected\n\t * @var array\n\t */\n\tprotected $_data = array();\n\t\n\t/**\n\t *\n\t */\n\tprotected $_dbConfig;\n\t\n\t/**\n\t *\n\t */\n\tprotected $_encFrom;\n\t\n\t/**\n\t *\n\t */\n\tprotected $_encTo;\n\t\n\t/**\n\t * Create new DataObject.\n\t *\n\t * @param StdClass $object\n\t * @param array $default Default values\n\t * @access public\n\t */ \n\tpublic function __construct(array $data = null, $defaults = array())\n\t{\n\t\tif (array_key_exists('dbconfig', $defaults) && $defaults['dbconfig'] instanceOf Flux_Config) {\n\t\t\t$this->_dbConfig = $defaults['dbconfig'];\n\t\t\tunset($defaults['dbconfig']);\n\t\t}\n\t\telse {\n\t\t\t$tmpArr = array();\n\t\t\t$this->_dbConfig = new Flux_Config($tmpArr);\n\t\t}\n\t\t\n\t\t$this->_encFrom = $this->_dbConfig->getEncoding();\n\t\t$this->_encTo   = $this->_encFrom ? $this->_dbConfig->get('Convert') : false;\n\n\t\tif (!is_null($data)) {\n\t\t\t$this->_data = $data;\n\t\t}\n\t\t\n\t\tforeach ($defaults as $prop => $value) {\n\t\t\tif (!isset($this->_data[$prop])) {\n\t\t\t\t$this->_data[$prop] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->_encTo) {\n\t\t\tforeach ($this->_data as $prop => $value) {\n\t\t\t\t$this->_data[$prop] = iconv($this->_encFrom, $this->_encTo, $value);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tpublic function __set($prop, $value)\n\t{\n\t\t$this->_data[$prop] = $value;\n\t\treturn $value;\n\t}\n\t\n\tpublic function __get($prop)\n\t{\n\t\tif (isset($this->_data[$prop])) {\n\t\t\treturn $this->_data[$prop];\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Dispatcher.php",
    "content": "<?php\nrequire_once 'Flux/Config.php';\nrequire_once 'Flux/Template.php';\n\n/**\n * The dispatcher is used to handle the current request to the application and\n * forward it to the correct module/action, after which point the view should\n * be rendered.\n *\n * Currently all the \"important\" behavior is done from Flux_Template.\n */\nclass Flux_Dispatcher {\n\t/**\n\t * Dispatcher instance.\n\t *\n\t * @access private\n\t * @var Flux_Dispatcher\n\t */\n\tprivate static $dispatcher;\n\t\n\t/**\n\t * Default module.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $defaultModule;\n\t\n\t/**\n\t * Default action.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $defaultAction = 'index';\n\t\n\t/**\n\t * See Flux_Dispatcher::getInstance().\n\t *\n\t * @access private\n\t */\n\tprivate function __construct()\n\t{\n\t\t\n\t}\n\t\n\t/**\n\t * Construct new dispatcher instance of one doesn't exist. But there can\n\t * only be a single instance of the dispatcher.\n\t *\n\t * @return Flux_Dispatcher\n\t * @access public\n\t */\n\tpublic static function getInstance()\n\t{\n\t\tif (!self::$dispatcher) {\n\t\t\tself::$dispatcher = new Flux_Dispatcher();\n\t\t}\n\t\treturn self::$dispatcher;\n\t}\n\t\n\t/**\n\t * Dispatch current request to the correct action and render the view.\n\t *\n\t * @param array $options Options for the dispatcher.\n\t * @access public\n\t */\n\tpublic function dispatch($options = array())\n\t{\n\t\t$config                    = new Flux_Config($options);\n\t\t$basePath                  = $config->get('basePath');\n\t\t$paramsArr                 = $config->get('params');\n\t\t$modulePath                = $config->get('modulePath');\n\t\t$themePath                 = $config->get('themePath');\n\t\t$defaultModule             = $config->get('defaultModule');\n\t\t$themeName                 = $config->get('themeName');\n\t\t$defaultAction             = $config->get('defaultAction');\n\t\t$missingActionModuleAction = $config->get('missingActionModuleAction');\n\t\t$missingViewModuleAction   = $config->get('missingViewModuleAction');\n\t\t$useCleanUrls              = $config->get('useCleanUrls');\n\t\t\n\t\tif (!$defaultModule && $this->defaultModule) {\n\t\t\t$defaultModule = $this->defaultModule;\n\t\t}\n\t\tif (!$defaultAction && $this->defaultAction) {\n\t\t\t$defaultAction = $this->defaultAction;\n\t\t}\n\t\t\n\t\tif (!$defaultModule) {\n\t\t\tthrow new Flux_Error('Please set the default module with $dispatcher->setDefaultModule()');\n\t\t}\n\t\telseif (!$defaultAction) {\n\t\t\tthrow new Flux_Error('Please set the default action with $dispatcher->setDefaultAction()');\n\t\t}\n\t\t\n\t\tif (!$paramsArr) {\n\t\t\t$paramsArr = &$_REQUEST;\n\t\t}\n\t\t\n\t\t// Provide easier access to parameters.\n\t\t$params  = new Flux_Config($paramsArr);\n\t\t$baseURI = Flux::config('BaseURI');\n\t\t\n\t\tif ($params->get('module')) {\n\t\t\t$safetyArr  = array('..', '/', '\\\\');\n\t\t\t$moduleName = str_replace($safetyArr, '', $params->get('module'));\n\t\t\tif ($params->get('action')) {\n\t\t\t\t$actionName = str_replace($safetyArr, '', $params->get('action'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$actionName = $defaultAction;\n\t\t\t}\n\t\t}\n\t\telseif (Flux::config('UseCleanUrls')) {\n\t\t\t$baseURI    = preg_replace('&/+&', '/', rtrim($baseURI, '/')).'/';\n\t\t\t$requestURI = preg_replace('&/+&', '/', rtrim($_SERVER['REQUEST_URI'], '/')).'/';\n\t\t\t$requestURI = preg_replace('&\\?.*?$&', '', $requestURI);\n\t\t\t$components = explode('/', trim((string)substr($requestURI, strlen($baseURI)), '/'));\n\t\t\t$moduleName = empty($components[0]) ? $defaultModule : $components[0];\n\t\t\t$actionName = empty($components[1]) ? $defaultAction : $components[1];\n\t\t}\n\t\telseif (!$params->get('module') && !$params->get('action')) {\n\t\t\t$moduleName = $defaultModule;\n\t\t\t$actionName = $defaultAction;\n\t\t}\n\t\t\n\t\t// Authorization handling.\n\t\t$auth = Flux_Authorization::getInstance();\n\t\tif ($auth->actionAllowed($moduleName, $actionName) === false) {\n\t\t\tif (!Flux::$sessionData->isLoggedIn()) {\n\t\t\t\tFlux::$sessionData->setMessageData('Please log-in to continue.');\n\t\t\t\t$this->loginRequired($baseURI);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$moduleName = 'unauthorized';\n\t\t\t\t$actionName = $this->defaultAction;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$params->set('module', $moduleName);\n\t\t$params->set('action', $actionName);\n\t\t\n\t\t$templateArray  = array(\n\t\t\t'params'                    => $params,\n\t\t\t'basePath'                  => $basePath,\n\t\t\t'modulePath'                => $modulePath,\n\t\t\t'moduleName'                => $moduleName,\n\t\t\t'themePath'                 => $themePath,\n\t\t\t'themeName'                 => $themeName,\n\t\t\t'actionName'                => $actionName,\n\t\t\t'viewName'                  => $actionName,\n\t\t\t'headerName'                => 'header',\n\t\t\t'footerName'                => 'footer',\n\t\t\t'missingActionModuleAction' => $missingActionModuleAction,\n\t\t\t'missingViewModuleAction'   => $missingViewModuleAction,\n\t\t\t'useCleanUrls'              => $useCleanUrls\n\t\t);\n\t\t$templateConfig = new Flux_Config($templateArray);\n\t\t$template       = new Flux_Template($templateConfig);\n\t\t\n\t\t// Default data available to all actions and views.\n\t\t$data = array(\n\t\t\t'auth'    => Flux_Authorization::getInstance(),\n\t\t\t'session' => Flux::$sessionData,\n\t\t\t'params'  => $params\n\t\t);\n\t\t$template->setDefaultData($data);\n\t\t\n\t\t// Render template! :D\n\t\t$template->render();\n\t}\n\t\n\t/**\n\t * This usually needs to be called after instanciating the dispatcher, as\n\t * it's very necessary to the dispatcher's failsafe functionality.\n\t *\n\t * @param string $module Module name\n\t * @return string\n\t * @access public\n\t */\n\tpublic function setDefaultModule($module)\n\t{\n\t\t$this->defaultModule = $module;\n\t\treturn $module;\n\t}\n\t\n\t/**\n\t * (DEPRECATED) By default, 'index' is the default action for any module, but you may\n\t * override that by using this method.\n\t *\n\t * @param string $action Action name\n\t * @return string\n\t * @access public\n\t */\n\tpublic function setDefaultAction($action)\n\t{\n\t\t$this->defaultAction = $action;\n\t\treturn $action;\n\t}\n\t\n\t/**\n\t * Redirect to login page if the user is not currently logged in.\n\t *\n\t * @param string $baseURI\n\t * @param string $loginModule\n\t * @param string $loginAction\n\t * @access private\n\t */\n\tpublic function loginRequired($baseURI, $message = null, $loginModule = 'account', $loginAction = 'login')\n\t{\n\t\t$session = Flux::$sessionData;\n\t\tif (!$message) {\n\t\t\t$message = 'Please login to continue.';\n\t\t}\n\t\t\n\t\tif (!$session->isLoggedIn()) {\n\t\t\tif (Flux::config('UseCleanUrls')) {\n\t\t\t\t$loginURL = sprintf('%s/%s/%s/?return_url=%s',\n\t\t\t\t\t$baseURI, $loginModule, $loginAction, rawurlencode($_SERVER['REQUEST_URI']));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$loginURL = sprintf('%s/?module=%s&action=%s&return_url=%s',\n\t\t\t\t\t$baseURI, rawurlencode($loginModule), rawurlencode($loginAction), rawurlencode($_SERVER['REQUEST_URI']));\n\t\t\t}\n\t\t\t\n\t\t\t$session->setMessageData($message);\n\t\t\theader('Location: '.preg_replace('&/{2,}&', '/', $loginURL));\n\t\t\texit;\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/EmblemExporter.php",
    "content": "<?php\nrequire_once 'functions/imagecreatefrombmpstring.php';\n\n/**\n *\n */\nclass Flux_EmblemExporter {\n\t/**\n\t *\n\t */\n\tpublic $loginAthenaGroup;\n\t\n\t/**\n\t *\n\t */\n\tpublic $athenaServers = array();\n\t\n\t/**\n\t *\n\t */\n\tpublic function __construct(Flux_LoginAthenaGroup $loginAthenaGroup)\n\t{\n\t\t$this->loginAthenaGroup = $loginAthenaGroup;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function addAthenaServer(Flux_Athena $athenaServer)\n\t{\n\t\tif (!in_array($athenaServer, $this->loginAthenaGroup->athenaServers, true)) {\n\t\t\tthrow new Flux_Error(\n\t\t\t\t\"{$athenaServer->serverName} is not a valid char/map server defined in the {$this->loginAthenaGroup->serverName} group.\");\n\t\t}\n\t\t\n\t\t$this->athenaServers[$athenaServer->serverName] = $athenaServer;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function exportArchive()\n\t{\n\t\t$topDir  = $this->sanitizePathName($this->loginAthenaGroup->serverName);\n\t\t$tmpDir  = FLUX_DATA_DIR.'/tmp';\n\t\t$tmpFile = tempnam($tmpDir, 'zip');\n\t\t\n\t\t// Create zip archive.\n\t\t$zip = new ZipArchive();\n\t\t$zip->open($tmpFile, ZIPARCHIVE::OVERWRITE);\n\t\t$zip->addEmptyDir($topDir);\n\t\t\n\t\tforeach ($this->athenaServers as $athenaServer) {\n\t\t\t$athenaDir = $this->sanitizePathName($athenaServer->serverName);\n\t\t\t$zip->addEmptyDir(\"$topDir/$athenaDir\");\n\t\t\t\n\t\t\t$sql = \"SELECT name, emblem_data FROM {$athenaServer->charMapDatabase}.guild WHERE emblem_len > 0 ORDER BY name ASC\";\n\t\t\t$sth = $athenaServer->connection->getStatement($sql);\n\t\t\t$sth->execute();\n\t\t\t\n\t\t\t$guilds = $sth->fetchAll();\n\t\t\tif ($guilds) {\n\t\t\t\tforeach ($guilds as $guild) {\n\t\t\t\t\t$emblemData  = @gzuncompress(pack('H*', $guild->emblem_data));\n\t\t\t\t\t$emblemImage = imagecreatefrombmpstring($emblemData);\n\t\t\t\t\t\n\t\t\t\t\tob_start();\n\t\t\t\t\timagepng($emblemImage);\n\t\t\t\t\t$data = ob_get_clean();\n\t\t\t\t\t\n\t\t\t\t\t$emblemName = sprintf('%s.png', $this->sanitizePathName($guild->name)); \n\t\t\t\t\t$zip->addFromString(\"$topDir/$athenaDir/$emblemName\", $data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Close archive.\n\t\t$zip->close();\n\t\t\n\t\t// Send out appropriate HTTP headers.\n\t\t$filename = urlencode(sprintf('%s-%s-emblems.zip', strtolower($topDir), date('Ymd')));\n\t\theader('Content-Type: application/zip');\n\t\theader('Content-Length: '.filesize($tmpFile));\n\t\theader(\"Content-Disposition: attachment; filename=$filename\");\n\t\t\n\t\t// Read contents of the file.\n\t\treadfile($tmpFile);\n\t\t\n\t\t// Remove temporary file.\n\t\tunlink($tmpFile);\n\t\texit;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tprivate function sanitizePathName($pathName)\n\t{\n\t\treturn preg_replace('/[^\\w\\d ]+/', '', $pathName);\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Error.php",
    "content": "<?php\n/**\n * All exceptions raised by Flux should be this or children of this base\n * exception class.\n */\nclass Flux_Error extends Exception {\n\t\n}\n?>\n"
  },
  {
    "path": "lib/Flux/FileLoad.php",
    "content": "<?php\n\n\nclass FileLoad{\n\n    protected $path;\n    protected $errorCodeMessages = array(\n        1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini',\n        2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',\n        3 => 'The uploaded file was only partially uploaded',\n        4 => 'No file was uploaded',\n        6 => 'Missing a temporary folder',\n        7 => 'Failed to write file to disk',\n        8 => 'A PHP extension stopped the file upload'\n    );\n\n    public function load($file, $path){\n        $this->path = $path;\n        if($file->get('error')){\n            return $this->errorCodeMessages[$file->get('error')];\n        }\n        if(is_uploaded_file($file->get('tmp_name'))) {\n            if(move_uploaded_file($file->get('tmp_name'), $path)) {\n                return true;\n            }\n        }\n        return 'During the boot file error occurred';\n    }\n\n    public function delete(){\n        unlink($this->path);\n    }\n}\n"
  },
  {
    "path": "lib/Flux/Installer/CharMapServer.php",
    "content": "<?php\nrequire_once 'Flux/Installer/Schema.php';\n\n/**\n *\n */\nclass Flux_Installer_CharMapServer {\n\t/**\n\t *\n\t */\n\tpublic $mainServer;\n\t\n\t/**\n\t *\n\t */\n\tpublic $athena;\n\t\n\t/**\n\t *\n\t */\n\tpublic $schemas;\n\t\n\t/**\n\t *\n\t */\n\tpublic function __construct(Flux_Installer_MainServer $mainServer, Flux_Athena $athena)\n\t{\n\t\t$this->mainServer = $mainServer;\n\t\t$this->athena     = $athena;\n\t\t$this->schemas    = Flux_Installer_Schema::getSchemas($mainServer, $this);\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Installer/MainServer.php",
    "content": "<?php\nrequire_once 'Flux/Installer/Schema.php';\nrequire_once 'Flux/Installer/CharMapServer.php';\n\n/**\n *\n */\nclass Flux_Installer_MainServer {\n\t/**\n\t *\n\t */\n\tpublic $loginAthenaGroup;\n\t\n\t/**\n\t *\n\t */\n\tpublic $charMapServers = array();\n\t\n\t/**\n\t *\n\t */\n\tpublic $schemas;\n\t\n\t/**\n\t *\n\t */\n\tpublic function __construct(Flux_LoginAthenaGroup $loginAthenaGroup)\n\t{\n\t\t$this->loginAthenaGroup  = $loginAthenaGroup;\n\t\t$this->schemas           = Flux_Installer_Schema::getSchemas($this);\n\t\t\n\t\tif (array_key_exists($loginAthenaGroup->serverName, Flux::$athenaServerRegistry)) {\n\t\t\tforeach (Flux::$athenaServerRegistry[$loginAthenaGroup->serverName] as $athena) {\n\t\t\t\t$this->charMapServers[$athena->serverName] = new Flux_Installer_CharMapServer($this, $athena);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function updateAll()\n\t{\n\t\tforeach ($this->schemas as $schema) {\n\t\t\tif (!$schema->isLatest()) {\n\t\t\t\t$schema->update();\n\t\t\t}\n\t\t}\n\t\tforeach ($this->charMapServers as $charMapServer) {\n\t\t\tforeach ($charMapServer->schemas as $schema) {\n\t\t\t\tif (!$schema->isLatest()) {\n\t\t\t\t\t$schema->update();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Installer/Schema.php",
    "content": "<?php\nrequire_once 'Flux/Installer/SchemaPermissionError.php';\n\n/**\n *\n */\nclass Flux_Installer_Schema {\t\n\t/**\n\t *\n\t */\n\tpublic $mainServerName;\n\t\n\t/**\n\t *\n\t */\n\tpublic $charMapServerName;\n\t\n\t/**\n\t *\n\t */\n\tpublic $databaseName;\n\t\n\t/**\n\t *\n\t */\n\tpublic $connection;\n\t\n\t/**\n\t *\n\t */\n\tpublic $availableSchemaDir;\n\t\n\t/**\n\t *\n\t */\n\tpublic $installedSchemaDir;\n\t\n\t/**\n\t *\n\t */\n\tpublic $schemaInfo;\n\t\n\t/**\n\t *\n\t */\n\tpublic $latestVersion;\n\t\n\t/**\n\t *\n\t */\n\tpublic $latestVersionInstalled;\n\t\n\t/**\n\t *\n\t */\n\tpublic $versionInstalled = false;\n\t\n\t/**\n\t *\n\t */\n\tprivate function __construct(array $dataArray)\n\t{\n\t\t$this->mainServerName     = $dataArray['mainServerName'];\n\t\t$this->charMapServerName  = $dataArray['charMapServerName'];\n\t\t$this->databaseName       = $dataArray['databaseName'];\n\t\t$this->connection         = $dataArray['connection'];\n\t\t$this->availableSchemaDir = $dataArray['availableSchemaDir'];\n\t\t$this->installedSchemaDir = $dataArray['installedSchemaDir'];\n\t\t$this->schemaInfo         = $dataArray['schemaInfo'];\n\t\t\n\t\tksort($this->schemaInfo['versions']);\n\t\t$this->determineInstalledVersions();\n\t}\n\t\n\t/**\n\t *\n\t */\n\tprotected function determineInstalledVersions()\n\t{\n\t\tforeach ($this->schemaInfo['versions'] as $version => $installed) {\n\t\t\tif ($installed) {\n\t\t\t\t$this->versionInstalled = $version;\n\t\t\t}\n\t\t\t\n\t\t\t$this->latestVersion = $version;\n\t\t\t$this->latestVersionInstalled = $installed;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function install($version)\n\t{\n\t\tif (!array_key_exists($version, $this->schemaInfo['versions']) || !$this->schemaInfo['versions'][$version]) {\n\t\t\t// Switch database.\n\t\t\t$this->connection->useDatabase($this->databaseName);\n\t\t\t\n\t\t\t// Get schema content.\n\t\t\t$sql = file_get_contents($this->schemaInfo['files'][$version]);\n\t\t\t$sth = $this->connection->getStatement($sql);\n\t\t\t\n\t\t\t// Execute.\n\t\t\t$sth->execute();\n\t\t\t\n\t\t\tif ($sth->errorCode()) {\n\t\t\t\t$errorInfo = $sth->errorInfo();\n\t\t\t\tif (count($errorInfo) > 1) {\n\t\t\t\t\tlist ($sqlstate, $errnum, $errmsg) = $errorInfo;\n\t\t\t\t} else {\n\t\t\t\t\t$errmsg = implode(', ', $errorInfo);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!empty($errnum) && $errnum == 1045) {\n\t\t\t\t\tthrow new Flux_Error(\"Critical MySQL error in Installer/Updater: $errnum: $errmsg\");\n\t\t\t\t}\n\t\t\t\telseif (!empty($errnum) && $errnum == 1142) {\n\t\t\t\t\t// Bail-out.\n\t\t\t\t\t$message = \"MySQL error: $errmsg\\n\\n\";\n\t\t\t\t\tthrow new Flux_Installer_SchemaPermissionError(\n\t\t\t\t\t\t$message,\n\t\t\t\t\t\t$this->schemaInfo['files'][$version],\n\t\t\t\t\t\t$this->databaseName,\n\t\t\t\t\t\t$this->mainServerName,\n\t\t\t\t\t\t$this->charMapServerName,\n\t\t\t\t\t\t$sql\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telseif (!empty($errmsg) && strcmp($errmsg,'00000') != 0) {\n\t\t\t\t\t// Only quit with an error if there is actually an error.\n\t\t\t\t\tthrow new Flux_Error(\"Critical MySQL error in Installer/Updater: $errmsg\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->schemaInfo['versions'][$version] = true;\n\t\t\t$this->determineInstalledVersions();\n\t\t\t\n\t\t\t// Create file indicating schema is installed.\n\t\t\t$file = \"{$this->schemaInfo['name']}.$version.txt\";\n\t\t\tfclose(fopen(\"{$this->installedSchemaDir}/{$file}\", 'w'));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function update()\n\t{\n\t\tif (!$this->isLatest()) {\n\t\t\tforeach ($this->schemaInfo['versions'] as $version => $installed) {\n\t\t\t\tif (!$installed) {\n\t\t\t\t\t$this->install($version);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function versionInstalled($version)\n\t{\n\t\t$installed = array_key_exists($version, $this->schemaInfo['versions']) && $this->schemaInfo['versions'][$version];\n\t\treturn $installed;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function isLatest()\n\t{\n\t\treturn $this->latestVersionInstalled;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic static function getSchemas(Flux_Installer_MainServer $mainServer, Flux_Installer_CharMapServer $charMapServer = null)\n\t{\n\t\t$mainServerName = $mainServer->loginAthenaGroup->serverName;\n\t\t\n\t\tif (is_null($charMapServer)) {\n\t\t\t$charMapServerName  = null;\n\t\t\t$databaseName       = $mainServer->loginAthenaGroup->loginDatabase;\n\t\t\t$connection         = $mainServer->loginAthenaGroup->connection;\n\t\t\t$availableSchemaDir = array(FLUX_DATA_DIR.\"/schemas/logindb\");\n\t\t\t$installedSchemaDir = FLUX_DATA_DIR.\"/logs/schemas/logindb/$mainServerName\";\n\t\t\t\n\t\t\tforeach (Flux::$addons as $addon) {\n\t\t\t\t$_schemaDir = \"{$addon->addonDir}/schemas/logindb\";\n\t\t\t\tif (file_exists($_schemaDir) && is_dir($_schemaDir)) {\n\t\t\t\t\t$availableSchemaDir[] = $_schemaDir;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$charMapServerName  = $charMapServer->athena->serverName;\n\t\t\t$databaseName       = $charMapServer->athena->charMapDatabase;\n\t\t\t$connection         = $charMapServer->athena->connection;\n\t\t\t$availableSchemaDir = array(FLUX_DATA_DIR.\"/schemas/charmapdb\");\n\t\t\t$installedSchemaDir = FLUX_DATA_DIR.\"/logs/schemas/charmapdb/$mainServerName/{$charMapServer->athena->serverName}\";\n\t\t\t\n\t\t\tforeach (Flux::$addons as $addon) {\n\t\t\t\t$_schemaDir = \"{$addon->addonDir}/schemas/charmapdb\";\n\t\t\t\tif (file_exists($_schemaDir) && is_dir($_schemaDir)) {\n\t\t\t\t\t$availableSchemaDir[] = $_schemaDir;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$dataArray = array(\n\t\t\t'mainServerName'     => $mainServerName,\n\t\t\t'charMapServerName'  => $charMapServerName,\n\t\t\t'databaseName'       => $databaseName,\n\t\t\t'connection'         => $connection,\n\t\t\t//'availableSchemaDir' => $availableSchemaDir,\n\t\t\t'installedSchemaDir' => $installedSchemaDir,\n\t\t);\n\t\t\n\t\t$availableSchemas = array();\n\t\t$installedSchemas = array();\n\t\t\n\t\t$directories = array();\n\t\tforeach ($availableSchemaDir as $dir) {\n\t\t\t$directories[] = array($dir, 'availableSchemas', 'sql');\n\t\t}\n\t\t$directories[] = array($installedSchemaDir, 'installedSchemas', 'txt');\n\t\t\n\t\tforeach ($directories as $directory) {\n\t\t\tlist ($schemaDir, $schemaArray, $fileExt) = $directory;\n\t\t\t$schemas = &$$schemaArray;\n\t\t\t$sFiles  = glob(\"$schemaDir/*.$fileExt\");\n\t\t\t\n\t\t\tif (!$sFiles) {\n\t\t\t\t$sFiles = array();\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($sFiles as $schemaFilePath) {\n\t\t\t\t$schemaName = basename($schemaFilePath, \".$fileExt\");\n\t\t\t\tif (preg_match('/^(\\w+)\\.(\\d+)$/', $schemaName, $m)) {\n\t\t\t\t\t$schemaName    = $m[1];\n\t\t\t\t\t$schemaVersion = $m[2];\n\t\t\t\t\t\n\t\t\t\t\t// Dynamically set schema directory.\n\t\t\t\t\t$dataArray['availableSchemaDir'] = $directory;\n\t\t\t\t\t\n\t\t\t\t\tif (!array_key_exists($schemaName, $schemas)) {\n\t\t\t\t\t\t$schemas[$schemaName] = array(\n\t\t\t\t\t\t\t'name'     => $schemaName,\n\t\t\t\t\t\t\t'versions' => array(),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$schemas[$schemaName]['versions'][$schemaFilePath] = $schemaVersion;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$objects = array();\n\t\tforeach ($availableSchemas as $schemaName => $schema) {\n\t\t\t$schemaInfo = array(\n\t\t\t\t'name'     => $schemaName,\n\t\t\t\t'versions' => array_flip($schema['versions']),\n\t\t\t\t'files'    => array_flip($schema['versions'])\n\t\t\t);\n\t\t\t\n\t\t\tforeach ($schemaInfo['versions'] as $key => $value) {\n\t\t\t\t$schemaInfo['versions'][$key] = false;\n\t\t\t}\n\t\t\t\n\t\t\tif (array_key_exists($schemaName, $installedSchemas)) {\n\t\t\t\tforeach ($installedSchemas[$schemaName]['versions'] as $key => $value) {\n\t\t\t\t\t$schemaInfo['versions'][$value] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$dataArray['schemaInfo'] = $schemaInfo;\n\t\t\t$objects[] = new Flux_Installer_Schema($dataArray);\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Installer/SchemaPermissionError.php",
    "content": "<?php\nrequire_once 'Flux/Error.php';\n\nclass Flux_Installer_SchemaPermissionError extends Flux_Error {\n\tpublic $schemaFile;\n\tpublic $databaseName;\n\tpublic $mainServerName;\n\tpublic $charMapServerName;\n\tpublic $query;\n\t\n\tpublic function __construct($message, $schemaFile, $databaseName, $mainServerName, $charMapServerName, $query)\n\t{\n\t\tparent::__construct($message);\n\t\t\n\t\t$this->schemaFile         = $schemaFile;\n\t\t$this->databaseName       = $databaseName;\n\t\t$this->mainServerName     = $mainServerName;\n\t\t$this->charMapServerName  = $charMapServerName;\n\t\t$this->query              = $query;\n\t}\n\t\n\tpublic function isLoginDbSchema()\n\t{\n\t\treturn $this->mainServerName && !$this->charMapServerName;\n\t}\n\t\n\tpublic function isCharMapDbSchema()\n\t{\n\t\treturn $this->mainServerName && $this->charMapServerName;\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Installer/index.html",
    "content": ""
  },
  {
    "path": "lib/Flux/Installer.php",
    "content": "<?php\nrequire_once 'Flux/Installer/MainServer.php';\n\n/**\n *\n */\nclass Flux_Installer {\n\t/**\n\t *\n\t */\n\tprivate static $installer;\n\t\n\t/**\n\t *\n\t */\n\tpublic $servers = array();\n\t\n\t/**\n\t *\n\t */\n\tprivate function __construct()\n\t{\n\t\tforeach (Flux::$loginAthenaGroupRegistry as $serverName => $loginAthenaGroup) {\n\t\t\t$this->servers[$serverName] = new Flux_Installer_MainServer($loginAthenaGroup);\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic static function getInstance()\n\t{\n\t\tif (!self::$installer) {\n\t\t\tself::$installer = new Flux_Installer();\n\t\t}\n\t\treturn self::$installer;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function updateNeeded()\n\t{\n\t\tforeach ($this->servers as $mainServer) {\n\t\t\tforeach ($mainServer->schemas as $schema) {\n\t\t\t\tif (!$schema->isLatest()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($mainServer->charMapServers as $charMapServer) {\n\t\t\t\tforeach ($charMapServer->schemas as $schema) {\n\t\t\t\t\tif (!$schema->isLatest()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function updateAll()\n\t{\n\t\tforeach ($this->servers as $mainServer) {\n\t\t\tforeach ($mainServer->schemas as $schema) {\n\t\t\t\tif (!$schema->isLatest()) {\n\t\t\t\t\t$schema->update();\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($mainServer->charMapServers as $charMapServer) {\n\t\t\t\tforeach ($charMapServer->schemas as $schema) {\n\t\t\t\t\tif (!$schema->isLatest()) {\n\t\t\t\t\t\t$schema->update();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/ItemExistsError.php",
    "content": "<?php\nrequire_once 'Flux/Error.php';\n\nclass Flux_ItemExistsError extends Flux_Error {\n\t\n}\n?>\n"
  },
  {
    "path": "lib/Flux/ItemShop/Cart.php",
    "content": "<?php\nrequire_once 'Flux/Error.php';\n\nclass Flux_ItemShop_Cart {\n\t/**\n\t *\n\t */\n\tpublic $account;\n\t\n\t/**\n\t *\n\t */\n\tprivate $cart = array();\n\t\n\tpublic function setAccount(Flux_DataObject $account)\n\t{\n\t\t$this->account = $account;\n\t\treturn $account;\n\t}\n\t\n\tpublic function requiresAccount()\n\t{\n\t\tif (!$this->account) {\n\t\t\tthrow new Flux_Error('Account is required to use the shopping cart.');\n\t\t}\n\t}\n\t\n\tpublic function add(Flux_DataObject $item)\n\t{\n\t\t$this->cart[] = $item;\n\t\treturn $item;\n\t}\n\t\n\tpublic function delete(Flux_DataObject $item, $deleteAll = false)\n\t{\n\t\t$deleted = array();\n\t\t\n\t\tforeach ($this->cart as $cartItem) {\n\t\t\tif ($cartItem == $item) {\n\t\t\t\tif ($deleteAll) {\n\t\t\t\t\t$deleted[] = $cartItem;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn $cartItem;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($deleted) {\n\t\t\treturn $deleted;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\tpublic function deleteAll(Flux_DataObject $item)\n\t{\n\t\treturn $this->delete($item, true);\n\t}\n\t\n\tpublic function clear()\n\t{\n\t\t$itemCount  = count($this->cart);\n\t\t$this->cart = array();\n\t\treturn $itemCount;\n\t}\n\t\n\tpublic function buy(Flux_ItemShop $fromShop)\n\t{\n\t\tif (!$this->hasFunds()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$successful = array();\n\t\t\n\t\tforeach ($this->cart as $cartItem) {\n\t\t\t$successful[] = array(\n\t\t\t\t'item'     => $cartItem,\n\t\t\t\t'name'     => $cartItem->shop_item_name,\n\t\t\t\t'cost'     => $cartItem->shop_item_cost,\n\t\t\t\t'quantity' => $cartItem->shop_item_qty,\n\t\t\t\t'success'  => $fromShop->buy($cartItem->shop_item_id)\n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->clear();\n\t\treturn $successful;\n\t}\n\t\n\tpublic function getCartItems()\n\t{\n\t\treturn $this->cart;\n\t}\n\t\n\tpublic function getCartItemNames()\n\t{\n\t\t$names = array();\n\t\tforeach ($this->cart as $cartItem) {\n\t\t\t$names[] = $cartItem->shop_item_name;\n\t\t}\n\t\treturn $names;\n\t}\n\t\n\tpublic function getTotal()\n\t{\n\t\t$total = 0;\n\t\tforeach ($this->cart as $cartItem) {\n\t\t\t$total += $cartItem->shop_item_cost;\n\t\t}\n\t\treturn $total;\n\t}\n\t\n\tpublic function hasFunds()\n\t{\n\t\t$this->requiresAccount();\n\t\t$creditsAvailable = $this->account->balance;\n\t\t$creditsNeeded    = $this->getTotal();\n\t\t\n\t\tif ($creditsAvailable < $creditsNeeded) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}\n\t\n\t/**\n\t * Check if the cart is empty.\n\t */\n\tpublic function isEmpty()\n\t{\n\t\t$empty = !count($this->cart);\n\t\treturn $empty;\n\t}\n\t\n\tpublic function deleteByItemNum($num)\n\t{\n\t\tif (!is_array($num)) {\n\t\t\t$num = array((int)$num);\n\t\t}\n\t\telse {\n\t\t\t$num = array_map('intval', $num);\n\t\t}\n\t\t\n\t\t$nDeleted = 0;\n\t\t\n\t\tforeach ($num as $n) {\n\t\t\tif (array_key_exists($n, $this->cart)) {\n\t\t\t\tunset($this->cart[$n]);\n\t\t\t\t$nDeleted += 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $nDeleted;\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/ItemShop/index.html",
    "content": ""
  },
  {
    "path": "lib/Flux/ItemShop.php",
    "content": "<?php\nrequire_once 'Flux/TemporaryTable.php';\nrequire_once 'Flux/ItemExistsError.php';\n\nclass Flux_ItemShop {\n\t/**\n\t * @access public\n\t * @var Flux_Athena\n\t */\n\tpublic $server;\n\t\n\tpublic function __construct(Flux_Athena $server)\n\t{\n\t\t$this->server = $server;\n\t}\n\t\n\t/**\n\t * Add an item to the shop.\n\t */\n\tpublic function add($itemID, $categoryID, $cost, $quantity, $info, $useExisting = 0)\n\t{\n\t\t$db    = $this->server->charMapDatabase;\n\t\t$table = Flux::config('FluxTables.ItemShopTable');\n\t\t$sql   = \"INSERT INTO $db.$table (nameid, category, quantity, cost, info, use_existing, create_date) VALUES (?, ?, ?, ?, ?, ?, NOW())\";\n\t\t$sth   = $this->server->connection->getStatement($sql);\n\t\t$res   = $sth->execute(array($itemID, $categoryID, $quantity, $cost, $info, $useExisting));\n\t\t$sth2  = $this->server->connection->getStatement('SELECT LAST_INSERT_ID() AS insID');\n\t\t$res2  = $sth2->execute();\n\t\t\n\t\tif ($res && $res2 && ($insertID=$sth2->fetch()->insID)) {\n\t\t\treturn $insertID;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Modify item info in the shop.\n\t */\n\tpublic function edit($shopItemID, $categoryID = null, $cost = null, $quantity = null, $info = null, $useExisting = null)\n\t{\n\t\t$catQ = '';\n\t\t$crdQ = '';\n\t\t$qtyQ = '';\n\t\t$infQ = '';\n\t\t$imgQ = '';\n\t\t$bind = array();\n\t\t\n\t\tif (!is_null($categoryID)) {\n\t\t\t$catQ   = \"category = ? \";\n\t\t\t$bind[] = (int)$categoryID;\n\t\t}\n\t\t\n\t\tif (!is_null($cost)) {\n\t\t\tif ($catQ) {\n\t\t\t\t$crdQ   = \", cost = ? \";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$crdQ   = \"cost = ? \";\n\t\t\t}\n\t\t\t\n\t\t\t$bind[] = (int)$cost;\n\t\t}\n\t\t\n\t\tif (!is_null($quantity)) {\n\t\t\tif ($crdQ) {\n\t\t\t\t$qtyQ = ', quantity = ? ';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$qtyQ = \"quantity = ? \";\n\t\t\t}\n\t\t\t\n\t\t\t$bind[] = (int)$quantity;\n\t\t}\n\t\t\n\t\tif (!is_null($info)) {\n\t\t\tif ($qtyQ) {\n\t\t\t\t$infQ = ', info = ? ';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$infQ = \"info = ? \";\n\t\t\t}\n\t\t\t\n\t\t\t$bind[] = trim($info);\n\t\t}\n\t\t\n\t\tif (!is_null($useExisting)) {\n\t\t\tif ($infQ) {\n\t\t\t\t$imgQ = ', use_existing = ? ';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$imgQ = \"use_existing = ? \";\n\t\t\t}\n\t\t\t\n\t\t\t$bind[] = (int)$useExisting;\n\t\t}\n\t\t\n\t\tif (empty($bind)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$db    = $this->server->charMapDatabase;\n\t\t$table = Flux::config('FluxTables.ItemShopTable');\n\t\t$sql   = \"UPDATE $db.$table SET $catQ $crdQ $qtyQ $infQ $imgQ WHERE id = ?\";\n\t\t$sth   = $this->server->connection->getStatement($sql);\n\t\t\n\t\t$bind[] = $shopItemID;\n\t\treturn $sth->execute($bind);\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function delete($shopItemID)\n\t{\n\t\t$db    = $this->server->charMapDatabase;\n\t\t$table = Flux::config('FluxTables.ItemShopTable');\n\t\t$sql   = \"DELETE FROM $db.$table WHERE id = ?\";\n\t\t$sth   = $this->server->connection->getStatement($sql);\n\t\t\n\t\treturn $sth->execute(array($shopItemID));\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function buy(Flux_DataObject $account, $shopItemID)\n\t{\n\t\t\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function getItem($shopItemID)\n\t{\n\t\t$db = $this->server->charMapDatabase;\n\t\t\n\t\tif($this->server->isRenewal) {\n\t\t\t$fromTables = array(\"$db.item_db_re\", \"$db.item_db2_re\");\n\t\t} else {\n\t\t\t$fromTables = array(\"$db.item_db\", \"$db.item_db2\");\n\t\t}\n\t\t\n\t\t$temp  = new Flux_TemporaryTable($this->server->connection, \"$db.items\", $fromTables);\n\t\t$shop  = Flux::config('FluxTables.ItemShopTable');\n\t\t$col   = \"$shop.id AS shop_item_id, $shop.category AS shop_item_category, $shop.cost AS shop_item_cost, $shop.quantity AS shop_item_qty, $shop.use_existing AS shop_item_use_existing, \";\n\t\t$col  .= \"$shop.nameid AS shop_item_nameid, $shop.info AS shop_item_info, items.name_english AS shop_item_name\";\n\t\t$sql   = \"SELECT $col FROM $db.$shop LEFT OUTER JOIN $db.items ON items.id = $shop.nameid WHERE $shop.id = ?\";\n\t\t$sth   = $this->server->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($shopItemID))) {\n\t\t\treturn $sth->fetch();\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function getItems($paginator, $categoryID = null)\n\t{\n\t\t$sqlpartial = \"\";\n\t\t$bind = array();\n\t\t$db   = $this->server->charMapDatabase;\n\t\t\n\t\tif($this->server->isRenewal) {\n\t\t\t$fromTables = array(\"$db.item_db_re\", \"$db.item_db2_re\");\n\t\t} else {\n\t\t\t$fromTables = array(\"$db.item_db\", \"$db.item_db2\");\n\t\t}\n\t\t\n\t\t$temp  = new Flux_TemporaryTable($this->server->connection, \"$db.items\", $fromTables);\n\t\t$shop  = Flux::config('FluxTables.ItemShopTable');\n\t\t$col   = \"$shop.id AS shop_item_id, $shop.cost AS shop_item_cost, $shop.quantity AS shop_item_qty, $shop.use_existing AS shop_item_use_existing, \";\n\t\t$col  .= \"$shop.nameid AS shop_item_nameid, $shop.info AS shop_item_info, items.name_english AS shop_item_name\";\n\t\tif (!is_null($categoryID)) {\n\t\t\t$sqlpartial = \" WHERE $shop.category = ?\";\n\t\t\t$bind[]     = $categoryID;\n\t\t}\n\t\t$sql   = $paginator->getSQL(\"SELECT $col FROM $db.$shop LEFT OUTER JOIN $db.items ON items.id = $shop.nameid $sqlpartial\");\n\t\t$sth   = $this->server->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute($bind)) {\n\t\t\treturn $sth->fetchAll();\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function deleteShopItemImage($shopItemID)\n\t{\n\t\t$serverName       = $this->server->loginAthenaGroup->serverName;\n\t\t$athenaServerName = $this->server->serverName;\n\t\t$dir              = FLUX_DATA_DIR.\"/itemshop/$serverName/$athenaServerName\";\n\t\t$files            = glob(\"$dir/$shopItemID.*\");\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\tunlink($file);\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function uploadShopItemImage($shopItemID, Flux_Config $file)\n\t{\n\t\tif ($file->get('error')) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$validexts = array_map('strtolower', Flux::config('ShopImageExtensions')->toArray());\n\t\t$extension = strtolower(pathinfo($file->get('name'), PATHINFO_EXTENSION));\n\t\t\n\t\tif (!in_array($extension, $validexts)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$serverName       = $this->server->loginAthenaGroup->serverName;\n\t\t$athenaServerName = $this->server->serverName;\n\t\t$dir              = FLUX_DATA_DIR.\"/itemshop/$serverName/$athenaServerName\";\n\t\t\n\t\tif (!is_dir(FLUX_DATA_DIR.\"/itemshop/$serverName\")) {\n\t\t\tmkdir(FLUX_DATA_DIR.\"/itemshop/$serverName\");\n\t\t}\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tmkdir($dir);\n\t\t}\n\t\t\n\t\t$this->deleteShopItemImage($shopItemID);\n\t\t\n\t\tif (move_uploaded_file($file->get('tmp_name'), \"$dir/$shopItemID.$extension\")) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/LogFile.php",
    "content": "<?php\n/**\n * Convenient way to log information to files.\n */\nclass Flux_LogFile {\n\t/**\n\t * File handler for open log file.\n\t *\n\t * @access public\n\t * @var resource\n\t */\n\tprivate $fp;\n\n\t/**\n\t * Log file name.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $filename;\n\n\t/**\n\t * Date format used to indicate when the action was logged.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $dateFormat = '[Y-m-d H:i:s] ';\n\n\t/**\n\t * Create new LogFile instance.\n\t *\n\t * @param string $filename\n\t * @param string $mode (see: http://www.php.net/fopen)\n\t * @access public\n\t */\n\tpublic function __construct($filename, $mode = 'a')\n\t{\n\t\t$this->filename  = \"$filename.php\";\n\t\t$isNewFile       = !file_exists($this->filename);\n\n\t\tif ($isNewFile) {\n\t\t\ttouch($this->filename);\n\t\t\tchmod($this->filename, 0600);\n\t\t}\n\n\t\t$this->fp = fopen($this->filename, $mode);\n\t\tif ($isNewFile) {\n\t\t\tfputs($this->fp, \"<?php exit('Forbidden'); ?>\\n\");\n\t\t}\n\t}\n\n\t/**\n\t * Close file handle.\n\t */\n\tpublic function __destruct()\n\t{\n\t\tif ($this->fp) {\n\t\t\tfclose($this->fp);\n\t\t}\n\t}\n\n\t/**\n\t * Write a line to the log file.\n\t *\n\t * @param string $format\n\t * @param string $var, ...\n\t * @access public\n\t */\n\tpublic function puts()\n\t{\n\t\t$args = func_get_args();\n\t\tif (count($args) > 0) {\n\t\t\t$args[0]   = sprintf(\"%s%s\\n\", date($this->dateFormat), $args[0]);\n\t\t\t$arguments = array_merge(array($this->fp), $args);\n\t\t\treturn call_user_func_array('fprintf', $arguments);\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/LoginAthenaGroup.php",
    "content": "<?php\n/**\n * Basically acts as an uppermost container holding the LoginServer and Athena\n * instances on a top level.\n */\nclass Flux_LoginAthenaGroup {\n\t/**\n\t * Global server name, representing all Athena servers.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $serverName;\n\t\n\t/**\n\t * Connection to the MySQL server.\n\t *\n\t * @access public\n\t * @var Flux_Connection\n\t */\n\tpublic $connection;\n\t\n\t/**\n\t * Main login server for the contained Athena servers.\n\t *\n\t * @access public\n\t * @var Flux_LoginServer\n\t */\n\tpublic $loginServer;\n\t\n\t/**\n\t * Database used for the login-related SQL operations.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $loginDatabase;\n\t\n\t/**\n\t * Logs database.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $logsDatabase;\n\t\n\t/**\n\t * Web server database.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $webDatabase;\n\t\n\t/**\n\t * Array of Flux_Athena instances.\n\t *\n\t * @access public\n\t * @var array\n\t */\n\tpublic $athenaServers = array();\n\t\n\t/**\n\t * Construct new Flux_LoginAthenaGroup instance.\n\t *\n\t * @access public\n\t */\n\tpublic function __construct($serverName, Flux_Connection $connection, Flux_LoginServer $loginServer, array $athenaServers = array())\n\t{\n\t\t$this->serverName    = $serverName;\n\t\t$this->connection    = $connection;\n\t\t$this->loginServer   = $loginServer;\n\t\t$this->loginDatabase = $loginServer->config->getDatabase();\n\t\t$this->logsDatabase  = $connection->logsDbConfig->getDatabase();\n\t\t$this->webDatabase   = $connection->webDbConfig->getDatabase();\n\t\t\n\t\t// Assign connection to LoginServer, used mainly to enable\n\t\t// authentication feature.\n\t\t$this->loginServer->setConnection($connection);\n\t\t\n\t\tforeach ($athenaServers as $athenaServer) {\n\t\t\t$this->addAthenaServer($athenaServer);\n\t\t}\n\t}\n\t\n\t/**\n\t * Add an Athena instance to the current collection.\n\t *\n\t * @return mixed Returns false if login servers aren't identical.\n\t * @access public\n\t */\n\tpublic function addAthenaServer(Flux_Athena $athenaServer)\n\t{\n\t\tif ($athenaServer->loginServer === $this->loginServer) {\n\t\t\t$athenaServer->setLoginAthenaGroup($this);\n\t\t\t$athenaServer->setConnection($this->connection);\n\t\t\t$this->athenaServers[] = $athenaServer;\n\t\t\treturn $this->athenaServers;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * See Flux_LoginServer->isAuth().\n\t *\n\t * @param string $username\n\t * @param string $password\n\t * @return bool\n\t * @access public\n\t */\n\tpublic function isAuth($username, $password)\n\t{\n\t\treturn $this->loginServer->isAuth($username, $password);\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/LoginError.php",
    "content": "<?php\nrequire_once 'Flux/Error.php';\n\nclass Flux_LoginError extends Flux_Error {\n\tconst UNEXPECTED     = 0;\n\tconst INVALID_SERVER = 1;\n\tconst INVALID_LOGIN  = 2;\n\tconst BANNED         = 3;\n\tconst PERMABANNED    = 4;\n\tconst IPBANNED       = 5;\n\tconst INVALID_SECURITY_CODE = 6;\n\tconst PENDING_CONFIRMATION  = 7;\n}\n?>\n"
  },
  {
    "path": "lib/Flux/LoginServer.php",
    "content": "<?php\nrequire_once 'Flux/BaseServer.php';\nrequire_once 'Flux/RegisterError.php';\n\n/**\n * Represents an rAthena Login Server.\n */\nclass Flux_LoginServer extends Flux_BaseServer {\n\t/**\n\t * Connection to the MySQL server.\n\t *\n\t * @access public\n\t * @var Flux_Connection\n\t */\n\tpublic $connection;\n\t\n\t/**\n\t * Login server database.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $loginDatabase;\n\t\n\t/**\n\t * Logs database. (is not set until setConnection() is called.)\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $logsDatabase;\n\t\n\t/**\n\t * Web server database. (is not set until setConnection() is called.)\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $webDatabase;\n\t\n\t/**\n\t * Overridden to add custom properties.\n\t *\n\t * @access public\n\t */\n\tpublic function __construct(Flux_Config $config)\n\t{\n\t\tparent::__construct($config);\n\t\t$this->loginDatabase = $config->getDatabase();\n\t}\n\t\n\t/**\n\t * Set the connection object to be used for this LoginServer instance.\n\t *\n\t * @param Flux_Connection $connection\n\t * @return Flux_Connection\n\t * @access public\n\t */\n\tpublic function setConnection(Flux_Connection $connection)\n\t{\n\t\t$this->connection   = $connection;\n\t\t$this->logsDatabase = $connection->logsDbConfig->getDatabase();\n\t\t$this->webDatabase  = $connection->webDbConfig->getDatabase();\n\t\t\n\t\treturn $connection;\n\t}\n\t\n\t/**\n\t * Validate credentials against the login server's database information.\n\t *\n\t * @param string $username Ragnarok account username.\n\t * @param string $password Ragnarok account password.\n\t * @return bool True/false if valid or invalid.\n\t * @access public\n\t */\n\tpublic function isAuth($username, $password)\n\t{\n\t\t\n\t\tif (trim($username) == '' || trim($password) == '') {\n\t\t\treturn false;\n\t\t}\n\n     \tif ($this->config->get('UseMD5')) {\n\t\t\t$password = Flux::hashPassword($password);\n\t\t}\n        \n\t\t$sql  = \"SELECT userid FROM {$this->loginDatabase}.login WHERE sex != 'S' AND group_id >= 0 \";\n\t\tif ($this->config->getNoCase()) {\n\t\t\t$sql .= 'AND LOWER(userid) = LOWER(?) ';\n\t\t}\n\t\telse {\n\t\t\t$sql .= 'AND CAST(userid AS BINARY) = ? ';\n\t\t}\n\t\t$sql .= \"AND user_pass = ? LIMIT 1\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t$sth->execute(array($username, $password));\n\t\t\n\t\t$res = $sth->fetch();\n\t\tif ($res) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function register($username, $password, $confirmPassword, $email,$email2, $gender, $birthdate, $securityCode)\n\t{\n\t\tif (preg_match('/[^' . Flux::config('UsernameAllowedChars') . ']/', $username)) {\n\t\t\tthrow new Flux_RegisterError('Invalid character(s) used in username', Flux_RegisterError::INVALID_USERNAME);\n\t\t}\n\t\telseif (strlen($username) < Flux::config('MinUsernameLength')) {\n\t\t\tthrow new Flux_RegisterError('Username is too short', Flux_RegisterError::USERNAME_TOO_SHORT);\n\t\t}\n\t\telseif (strlen($username) > Flux::config('MaxUsernameLength')) {\n\t\t\tthrow new Flux_RegisterError('Username is too long', Flux_RegisterError::USERNAME_TOO_LONG);\n\t\t}\n\t\telseif (!Flux::config('AllowUserInPassword') && stripos($password, $username) !== false) {\n\t\t\tthrow new Flux_RegisterError('Password contains username', Flux_RegisterError::PASSWORD_HAS_USERNAME);\n\t\t}\n\t\telseif (!ctype_graph($password)) {\n\t\t\tthrow new Flux_RegisterError('Invalid character(s) used in password', Flux_RegisterError::INVALID_PASSWORD);\n\t\t}\n\t\telseif (strlen($password) < Flux::config('MinPasswordLength')) {\n\t\t\tthrow new Flux_RegisterError('Password is too short', Flux_RegisterError::PASSWORD_TOO_SHORT);\n\t\t}\n\t\telseif (strlen($password) > Flux::config('MaxPasswordLength')) {\n\t\t\tthrow new Flux_RegisterError('Password is too long', Flux_RegisterError::PASSWORD_TOO_LONG);\n\t\t}\n\t\telseif ($password !== $confirmPassword) {\n\t\t\tthrow new Flux_RegisterError('Passwords do not match', Flux_RegisterError::PASSWORD_MISMATCH);\n\t\t}\n\t\telseif (Flux::config('PasswordMinUpper') > 0 && preg_match_all('/[A-Z]/', $password, $matches) < Flux::config('PasswordMinUpper')) {\n\t\t\tthrow new Flux_RegisterError('Passwords must contain at least ' . intval(Flux::config('PasswordMinUpper')) . ' uppercase letter(s)', Flux_RegisterError::PASSWORD_NEED_UPPER);\n\t\t}\n\t\telseif (Flux::config('PasswordMinLower') > 0 && preg_match_all('/[a-z]/', $password, $matches) < Flux::config('PasswordMinLower')) {\n\t\t\tthrow new Flux_RegisterError('Passwords must contain at least ' . intval(Flux::config('PasswordMinLower')) . ' lowercase letter(s)', Flux_RegisterError::PASSWORD_NEED_LOWER);\n\t\t}\n\t\telseif (Flux::config('PasswordMinNumber') > 0 && preg_match_all('/[0-9]/', $password, $matches) < Flux::config('PasswordMinNumber')) {\n\t\t\tthrow new Flux_RegisterError('Passwords must contain at least ' . intval(Flux::config('PasswordMinNumber')) . ' number(s)', Flux_RegisterError::PASSWORD_NEED_NUMBER);\n\t\t}\n\t\telseif (Flux::config('PasswordMinSymbol') > 0 && preg_match_all('/[^A-Za-z0-9]/', $password, $matches) < Flux::config('PasswordMinSymbol')) {\n\t\t\tthrow new Flux_RegisterError('Passwords must contain at least ' . intval(Flux::config('PasswordMinSymbol')) . ' symbol(s)', Flux_RegisterError::PASSWORD_NEED_SYMBOL);\n\t\t}\n\t\telseif (!preg_match('/^(.+?)@(.+?)$/', $email)) {\n\t\t\tthrow new Flux_RegisterError('Invalid e-mail address', Flux_RegisterError::INVALID_EMAIL_ADDRESS);\n\t\t}\n\t\telseif ($email!==$email2) {\n\t\t\tthrow new Flux_RegisterError('Email do not match', Flux_RegisterError::INVALID_EMAIL_CONF);\n\t\t}\t\t\n\t\telseif (!in_array(strtoupper($gender), array('M', 'F'))) {\n\t\t\tthrow new Flux_RegisterError('Invalid gender', Flux_RegisterError::INVALID_GENDER);\n\t\t}\n\t\telseif (($birthdatestamp = strtotime($birthdate)) === false || date('Y-m-d', $birthdatestamp) != $birthdate) {\n\t\t\tthrow new Flux_RegisterError('Invalid birthdate', Flux_RegisterError::INVALID_BIRTHDATE);\n\t\t}\n\t\telseif (Flux::config('UseCaptcha')) {\n\t\t\tif (Flux::config('EnableReCaptcha')) {\n\t\t\t\tif(isset($_POST['g-recaptcha-response']) && $_POST['g-recaptcha-response'] != \"\"){\n\t\t\t\t\t$response = file_get_contents(\"https://www.google.com/recaptcha/api/siteverify?secret=\".Flux::config('ReCaptchaPrivateKey').\"&response=\".$_POST['g-recaptcha-response'].\"&remoteip=\".$_SERVER['REMOTE_ADDR']);\n\t\t\t\t}\n\t\t\t\t$responseKeys = json_decode($response,true);\n\t\t\t\tif(intval($responseKeys[\"success\"]) !== 1) {\n\t\t\t\t\tthrow new Flux_RegisterError('Invalid security code', Flux_RegisterError::INVALID_SECURITY_CODE);\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (strtolower($securityCode) !== strtolower(Flux::$sessionData->securityCode)) {\n\t\t\t\tthrow new Flux_RegisterError('Invalid security code', Flux_RegisterError::INVALID_SECURITY_CODE);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sql  = \"SELECT userid FROM {$this->loginDatabase}.login WHERE \";\n\t\tif ($this->config->getNoCase()) {\n\t\t\t$sql .= 'LOWER(userid) = LOWER(?) ';\n\t\t}\n\t\telse {\n\t\t\t$sql .= 'BINARY userid = ? ';\n\t\t}\n\t\t$sql .= 'LIMIT 1';\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t$sth->execute(array($username));\n\t\t\n\t\t$res = $sth->fetch();\n\t\tif ($res) {\n\t\t\tthrow new Flux_RegisterError('Username is already taken', Flux_RegisterError::USERNAME_ALREADY_TAKEN);\n\t\t}\n\t\t\n\t\tif (!Flux::config('AllowDuplicateEmails')) {\n\t\t\t$sql = \"SELECT email FROM {$this->loginDatabase}.login WHERE email = ? LIMIT 1\";\n\t\t\t$sth = $this->connection->getStatement($sql);\n\t\t\t$sth->execute(array($email));\n\n\t\t\t$res = $sth->fetch();\n\t\t\tif ($res) {\n\t\t\t\tthrow new Flux_RegisterError('E-mail address is already in use', Flux_RegisterError::EMAIL_ADDRESS_IN_USE);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->config->getUseMD5()) {\n\t\t\t$password = Flux::hashPassword($password);\n\t\t}\n\t\t\n\t\t$sql = \"INSERT INTO {$this->loginDatabase}.login (userid, user_pass, email, sex, group_id, birthdate) VALUES (?, ?, ?, ?, ?, ?)\";\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t$res = $sth->execute(array($username, $password, $email, $gender, (int)$this->config->getGroupID(), date('Y-m-d', $birthdatestamp)));\n\t\t\n\t\tif ($res) {\n\t\t\t$idsth = $this->connection->getStatement(\"SELECT LAST_INSERT_ID() AS account_id\");\n\t\t\t$idsth->execute();\n\t\t\t\n\t\t\t$idres = $idsth->fetch();\n\t\t\t$createTable = Flux::config('FluxTables.AccountCreateTable');\n\t\t\t\n\t\t\t$sql  = \"INSERT INTO {$this->loginDatabase}.{$createTable} (account_id, userid, user_pass, sex, email, reg_date, reg_ip, confirmed) \";\n\t\t\t$sql .= \"VALUES (?, ?, ?, ?, ?, NOW(), ?, 1)\";\n\t\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\t\n\t\t\t$sth->execute(array($idres->account_id, $username, $password, $gender, $email, $_SERVER['REMOTE_ADDR']));\n\t\t\treturn $idres->account_id;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function temporarilyBan($bannedBy, $banReason, $accountID, $until)\n\t{\n\t\t$table = Flux::config('FluxTables.AccountBanTable');\n\t\t\n\t\t$sql  = \"INSERT INTO {$this->loginDatabase}.$table (account_id, banned_by, ban_type, ban_until, ban_date, ban_reason) \";\n\t\t$sql .= \"VALUES (?, ?, 1, ?, NOW(), ?)\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($accountID, $bannedBy, $until, $banReason))) {\n\t\t\t$ts   = strtotime($until);\n\t\t\t$sql  = \"UPDATE {$this->loginDatabase}.login SET state = 0, unban_time = '$ts' WHERE account_id = ?\";\n\t\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\treturn $sth->execute(array($accountID));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function permanentlyBan($bannedBy, $banReason, $accountID)\n\t{\n\t\t$table = Flux::config('FluxTables.AccountBanTable');\n\t\t\n\t\t$sql  = \"INSERT INTO {$this->loginDatabase}.$table (account_id, banned_by, ban_type, ban_until, ban_date, ban_reason) \";\n\t\t$sql .= \"VALUES (?, ?, 2, '9999-12-31 23:59:59', NOW(), ?)\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($accountID, $bannedBy, $banReason))) {\n\t\t\t$sql  = \"UPDATE {$this->loginDatabase}.login SET state = 5, unban_time = 0 WHERE account_id = ?\";\n\t\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\treturn $sth->execute(array($accountID));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function unban($unbannedBy, $unbanReason, $accountID)\n\t{\n\t\t$table = Flux::config('FluxTables.AccountBanTable');\n\t\t$createTable = Flux::config('FluxTables.AccountCreateTable');\n\t\t\n\t\t$sql  = \"INSERT INTO {$this->loginDatabase}.$table (account_id, banned_by, ban_type, ban_until, ban_date, ban_reason) \";\n\t\t$sql .= \"VALUES (?, ?, 0, '1000-01-01 00:00:00', NOW(), ?)\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($accountID, $unbannedBy, $unbanReason))) {\n\t\t\t$sql  = \"UPDATE {$this->loginDatabase}.$createTable SET confirmed = 1, confirm_expire = NULL WHERE account_id = ?\";\n\t\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\t$sth->execute(array($accountID));\n\t\t\t\n\t\t\t$sql  = \"UPDATE {$this->loginDatabase}.login SET state = 0, unban_time = 0 WHERE account_id = ?\";\n\t\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\treturn $sth->execute(array($accountID));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function getBanInfo($accountID)\n\t{\n\t\t$table = Flux::config('FluxTables.AccountBanTable');\n\t\t$col   = \"$table.id, $table.account_id, $table.banned_by, $table.ban_type, \";\n\t\t$col  .= \"$table.ban_until, $table.ban_date, $table.ban_reason, login.userid\";\n\t\t$sql   = \"SELECT $col FROM {$this->loginDatabase}.$table \";\n\t\t$sql  .= \"LEFT OUTER JOIN {$this->loginDatabase}.login ON login.account_id = $table.banned_by \";\n\t\t$sql  .= \"WHERE $table.account_id = ? ORDER BY $table.ban_date DESC \";\n\t\t$sth   = $this->connection->getStatement($sql);\n\t\t$res   = $sth->execute(array($accountID));\n\t\t\n\t\tif ($res) {\n\t\t\t$ban = $sth->fetchAll();\n\t\t\treturn $ban;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function addIpBan($bannedBy, $banReason, $unbanTime, $ipAddress)\n\t{\n\t\t$table = Flux::config('FluxTables.IpBanTable');\n\t\t\n\t\t$sql  = \"INSERT INTO {$this->loginDatabase}.$table (ip_address, banned_by, ban_type, ban_until, ban_date, ban_reason) \";\n\t\t$sql .= \"VALUES (?, ?, 1, ?, NOW(), ?)\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($ipAddress, $bannedBy, $unbanTime, $banReason))) {\n\t\t\t$sql  = \"INSERT INTO {$this->loginDatabase}.ipbanlist (list, reason, rtime, btime) \";\n\t\t\t$sql .= \"VALUES (?, ?, ?, NOW())\";\n\t\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\treturn $sth->execute(array($ipAddress, $banReason, $unbanTime));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function removeIpBan($unbannedBy, $unbanReason, $ipAddress)\n\t{\n\t\t$table = Flux::config('FluxTables.IpBanTable');\n\t\t\n\t\t$sql  = \"INSERT INTO {$this->loginDatabase}.$table (ip_address, banned_by, ban_type, ban_until, ban_date, ban_reason) \";\n\t\t$sql .= \"VALUES (?, ?, 0, '1000-01-01 00:00:00', NOW(), ?)\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($ipAddress, $unbannedBy, $unbanReason))) {\n\t\t\t$sql  = \"DELETE FROM {$this->loginDatabase}.ipbanlist WHERE list = ?\";\n\t\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\treturn $sth->execute(array($ipAddress));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function hasCreditsRecord($accountID)\n\t{\n\t\t$creditsTable = Flux::config('FluxTables.CreditsTable');\n\t\t\n\t\t$sql = \"SELECT COUNT(account_id) AS hasRecord FROM {$this->loginDatabase}.$creditsTable WHERE account_id = ?\";\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t\n\t\t$sth->execute(array($accountID));\n\t\t\n\t\tif ($sth->fetch()->hasRecord) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function depositCredits($targetAccountID, $credits, $donationAmount = null)\n\t{\n\t\t$sql = \"SELECT COUNT(account_id) AS accountExists FROM {$this->loginDatabase}.login WHERE account_id = ?\";\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t\n\t\tif (!$sth->execute(array($targetAccountID)) || !$sth->fetch()->accountExists) {\n\t\t\treturn false; // Account doesn't exist.\n\t\t}\n\t\t\n\t\t$creditsTable = Flux::config('FluxTables.CreditsTable');\n\t\t\n\t\tif (!$this->hasCreditsRecord($targetAccountID)) {\n\t\t\t$fields = 'account_id, balance';\n\t\t\t$values = '?, ?';\n\t\t\t\n\t\t\tif (!is_null($donationAmount)) {\n\t\t\t\t$fields .= ', last_donation_date, last_donation_amount';\n\t\t\t\t$values .= ', NOW(), ?';\n\t\t\t}\n\t\t\t\n\t\t\t$sql  = \"INSERT INTO {$this->loginDatabase}.$creditsTable ($fields) VALUES ($values)\";\n\t\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\t$vals = array($targetAccountID, $credits);\n\t\t\t\n\t\t\tif (!is_null($donationAmount)) {\n\t\t\t\t$vals[] = $donationAmount;\n\t\t\t}\n\t\t\t\n\t\t\treturn $sth->execute($vals);\n\t\t}\n\t\telse {\n\t\t\t$vals = array();\n\t\t\t$sql  = \"UPDATE {$this->loginDatabase}.$creditsTable SET balance = balance + ? \";\n\n\t\t\tif (!is_null($donationAmount)) {\n\t\t\t\t$sql .= \", last_donation_date = NOW(), last_donation_amount = ? \";\n\t\t\t}\n\t\t\t\n\t\t\t$vals[] = $credits;\n\t\t\tif (!is_null($donationAmount)) {\n\t\t\t\t$vals[] = $donationAmount;\n\t\t\t}\n\t\t\t$vals[] = $targetAccountID;\n\t\t\t\n\t\t\t$sql .= \"WHERE account_id = ?\";\n\t\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\t\n\t\t\treturn $sth->execute($vals);\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function getPrefs($accountID, array $prefs = array())\n\t{\n\t\t$sql = \"SELECT account_id FROM {$this->loginDatabase}.`login` WHERE account_id = ? LIMIT 1\";\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($accountID)) && ($char=$sth->fetch())) {\n\t\t\t$accountPrefsTable = Flux::config('FluxTables.AccountPrefsTable');\n\t\t\t\n\t\t\t$pref = array();\n\t\t\t$bind = array($accountID);\n\t\t\t$sql  = \"SELECT name, value FROM {$this->loginDatabase}.$accountPrefsTable \";\n\t\t\t$sql .= \"WHERE account_id = ?\";\n\t\t\t\n\t\t\tif ($prefs) {\n\t\t\t\tforeach ($prefs as $p) {\n\t\t\t\t\t$pref[] = \"name = ?\";\n\t\t\t\t\t$bind[] = $p;\n\t\t\t\t}\n\t\t\t\t$sql .= sprintf(' AND (%s)', implode(' OR ', $pref));\n\t\t\t}\n\t\t\t\n\t\t\t$sth = $this->connection->getStatement($sql);\n\t\t\t\n\t\t\tif ($sth->execute($bind)) {\n\t\t\t\t$prefsArray = array();\n\t\t\t\tforeach ($sth->fetchAll() as $p) {\n\t\t\t\t\t$prefsArray[$p->name] = $p->value;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn new Flux_Config($prefsArray);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function setPrefs($accountID, array $prefsArray)\n\t{\n\t\t$sql = \"SELECT account_id FROM {$this->loginDatabase}.`login` WHERE account_id = ? LIMIT 1\";\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t\n\t\tif ($sth->execute(array($accountID)) && ($char=$sth->fetch())) {\n\t\t\t$accountPrefsTable = Flux::config('FluxTables.AccountPrefsTable');\n\t\t\t\n\t\t\t$pref = array();\n\t\t\t$bind = array($accountID);\n\t\t\t$sql  = \"SELECT id, name, value FROM {$this->loginDatabase}.$accountPrefsTable \";\n\t\t\t$sql .= \"WHERE account_id = ?\";\n\t\t\t\n\t\t\tif ($prefsArray) {\n\t\t\t\tforeach ($prefsArray as $prefName => $prefValue) {\n\t\t\t\t\t$pref[] = \"name = ?\";\n\t\t\t\t\t$bind[] = $prefName;\n\t\t\t\t}\n\t\t\t\t$sql .= sprintf(' AND (%s)', implode(' OR ', $pref));\n\t\t\t}\n\t\t\t\n\t\t\t$sth = $this->connection->getStatement($sql);\n\t\t\t\n\t\t\tif ($sth->execute($bind)) {\n\t\t\t\t$prefs  = $sth->fetchAll();\n\t\t\t\t$update = array();\n\t\t\t\t\n\t\t\t\t$usql   = \"UPDATE {$this->loginDatabase}.$accountPrefsTable \";\n\t\t\t\t$usql  .= \"SET value = ? WHERE id = ?\";\n\t\t\t\t$usth   = $this->connection->getStatement($usql);\n\t\t\t\t       \n\t\t\t\t$isql   = \"INSERT INTO {$this->loginDatabase}.$accountPrefsTable \";\n\t\t\t\t$isql  .= \"(account_id, name, value, create_date) \";\n\t\t\t\t$isql  .= \"VALUES (?, ?, ?, NOW())\";\n\t\t\t\t$isth   = $this->connection->getStatement($isql);\n\t\t\t\t\n\t\t\t\tforeach ($prefs as $p) {\n\t\t\t\t\t$update[$p->name] = $p->id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($prefsArray as $pref => $value) {\n\t\t\t\t\tif (array_key_exists($pref, $update)) {\n\t\t\t\t\t\t$id = $update[$pref];\n\t\t\t\t\t\t$usth->execute(array($value, $id));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$isth->execute(array($accountID, $pref, $value));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function getPref($accountID, $pref)\n\t{\n\t\t$prefs = $this->getPrefs($accountID, array($pref));\n\t\tif ($prefs instanceOf Flux_Config) {\n\t\t\treturn $prefs->get($pref);\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function setPref($accountID, $pref, $value)\n\t{\n\t\treturn $this->setPrefs($accountID, array($pref => $value));\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function isIpBanned($ip = null)\n\t{\n\t\tif (is_null($ip)) {\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t\t}\n\t\t\n\t\t$ip = trim($ip);\n\t\tif (!preg_match('/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/', $ip, $m)) {\n\t\t\t// Invalid IP.\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$sql  = \"SELECT list FROM {$this->loginDatabase}.ipbanlist WHERE \";\n\t\t$sql .= \"rtime > NOW() AND (list = ? OR list = ? OR list = ? OR list = ?) LIMIT 1\";\n\t\t$sth  = $this->connection->getStatement($sql);\n\t\t\n\t\t$list = array(\n\t\t\tsprintf('%u.*.*.*', $m[1]),\n\t\t\tsprintf('%u.%u.*.*', $m[1], $m[2]),\n\t\t\tsprintf('%u.%u.%u.*', $m[1], $m[2], $m[3]),\n\t\t\tsprintf('%u.%u.%u.%u', $m[1], $m[2], $m[3], $m[4])\n\t\t);\n\t\t\n\t\t$sth->execute($list);\n\t\t$ipban = $sth->fetch();\n\t\t\n\t\tif ($ipban) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Mailer.php",
    "content": "<?php\nrequire 'phpmailer/PHPMailerAutoload.php';\nrequire_once 'Flux/LogFile.php';\n\nclass Flux_Mailer {\n\tprotected $pm;\n\tprotected static $errLog;\n\tprotected static $log;\n\t\n\tpublic function __construct()\n\t{\n\t\tif (!self::$errLog) {\n\t\t\tself::$errLog = new Flux_LogFile(FLUX_DATA_DIR.'/logs/errors/mail/'.date('Ymd').'.log');\n\t\t}\n\t\tif (!self::$log) {\n\t\t\tself::$log = new Flux_LogFile(FLUX_DATA_DIR.'/logs/mail/'.date('Ymd').'.log');\n\t\t}\n\t\t\n\t\t$this->pm     = $pm = new PHPMailer();\n\t\t$this->errLog = self::$errLog;\n\t\t$this->log    = self::$log;\n\t\t\n\t\tif (Flux::config('MailerUseSMTP')) {\n\t\t\t$pm->IsSMTP();\n\t\t\t\n\t\t\tif (is_array($hosts=Flux::config('MailerSMTPHosts'))) {\n\t\t\t\t$hosts = implode(';', $hosts);\n\t\t\t}\n\t\t\t\n\t\t\t$pm->Host = $hosts;\n\t\t\t\n\t\t\tif ($user=Flux::config('MailerSMTPUsername')) {\n\t\t\t\t$pm->SMTPAuth = true;\n\t\t\t\t\n\t\t\t\tif (Flux::config('MailerSMTPUseTLS')) {\n\t\t\t\t\t$pm->SMTPSecure = 'tls';\n\t\t\t\t}\n\t\t\t\tif (Flux::config('MailerSMTPUseSSL')) {\n\t\t\t\t\t$pm->SMTPSecure = 'ssl';\n\t\t\t\t}\n\t\t\t\tif ($port=Flux::config('MailerSMTPPort')) {\n\t\t\t\t\t$pm->Port = (int)$port;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$pm->Username = $user;\n\t\t\t\t\n\t\t\t\tif ($pass=Flux::config('MailerSMTPPassword')) {\n\t\t\t\t\t$pm->Password = $pass;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// From address.\n        $pm->setFrom(Flux::config('MailerFromAddress'), Flux::config('MailerFromName'));\n\t}\n\t\n\tpublic function send($recipient, $subject, $template, array $templateVars = array())\n\t{\n\t\tif (array_key_exists('_ignoreTemplate', $templateVars) && $templateVars['_ignoreTemplate']) {\n\t\t\t$content = $template;\n\t\t} else {\n\t\t\t$templatePath = FLUX_DATA_DIR.\"/templates/$template.php\";\n\t\t\tif (!file_exists($templatePath)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$find = array();\n\t\t\t$repl = array();\n\n\t\t\tforeach ($templateVars as $key => $value) {\n\t\t\t\t$find[] = '{'.$key.'}';\n\t\t\t\t$repl[] = $value;\n\t\t\t}\n\n\t\t\tob_start();\n\t\t\tinclude $templatePath;\n\t\t\t$content = ob_get_clean();\n\t\t\t\n\t\t\tif (!empty($find) && !empty($repl)) {\n\t\t\t\t$content = str_replace($find, $repl, $content);\n\t\t\t}\n\t\t}\n\t\t$this->pm->isHTML(true);\n\t\t$this->pm->CharSet = 'UTF-8';\n\t\t$this->pm->AddAddress($recipient);\n\t\t$this->pm->Subject = $subject;\n\t\t$this->pm->msgHTML($content);\n\t\t\n\t\tif ($sent=$this->pm->Send()) {\n\t\t\tself::$log->puts(\"sent e-mail -- Recipient: $recipient, Subject: $subject\");\n\t\t}\n\t\telse {\n\t\t\tself::$errLog->puts(\"{$this->pm->ErrorInfo} (while attempting -- Recipient: $recipient, Subject: $subject)\");\n\t\t}\n\t\treturn $sent;\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/MapServer.php",
    "content": "<?php\nrequire_once 'Flux/BaseServer.php';\n\n/**\n * Represents an rAthena Map Server.\n */\nclass Flux_MapServer extends Flux_BaseServer {\n\t\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Paginator.php",
    "content": "<?php\n/**\n * The paginator helps in creating pages for SQL-stored data.\n */\nclass Flux_Paginator {\n\t/**\n\t * Number of records.\n\t *\n\t * @access public\n\t * @var int\n\t */\n\tpublic $total = 0;\n\t\n\t/**\n\t * Current page.\n\t *\n\t * @access public\n\t * @var int\n\t */\n\tpublic $currentPage = 1;\n\t\n\t/**\n\t * Total number of pages.\n\t *\n\t * @access public\n\t * @var int\n\t */\n\tpublic $numberOfPages = 1;\n\t\n\t/**\n\t * Whether or not to show the page numbers even if there's only one page.\n\t *\n\t * @access public\n\t * @var bool\n\t */\n\tpublic $showSinglePage;\n\t\n\t/**\n\t * Records per-age.\n\t *\n\t * @access public\n\t * @var int\n\t */\n\tpublic $perPage;\n\t\n\t/**\n\t * The number of pages to display at once in the HTML pages output.\n\t *\n\t * @access public\n\t * @var int\n\t */\n\tpublic $pagesToShow;\n\t\n\t/**\n\t * GET variable holding the current page number.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $pageVariable;\n\t\n\t/**\n\t * Page separator used in the HTML pages generator.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $pageSeparator;\n\t\n\t/**\n\t * Array of sortable column names.\n\t *\n\t * @access protected\n\t * @var array\n\t */\n\tprotected $sortableColumns = array();\n\t\n\t/**\n\t * Current column sort order.\n\t *\n\t * @access public\n\t * @var array\n\t */\n\tpublic $currentSortOrder = array();\n\t\n\t/**\n\t * Original request URI.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $requestURI;\n\t\n\t/**\n\t * Create new paginator instance.\n\t *\n\t * @param int $total Number of record.\n\t * @param string $requestURI Original request URI.\n\t * @param array $options Paginator options.\n\t * @access public\n\t */\n\tpublic function __construct($total, $requestURI = null, array $options = array())\n\t{\n\t\tif (!$requestURI) {\n\t\t\t$requestURI = $_SERVER['REQUEST_URI'];\n\t\t}\n\t\t\n\t\t$this->requestURI = $requestURI;\n\t\t\n\t\t$perPage = Flux::config('ResultsPerPage');\n\t\tif (!$perPage) {\n\t\t\t$perPage = 20;\n\t\t}\n\t\t\n\t\t$pagesToShow = Flux::config('PagesToShow');\n\t\tif (!$pagesToShow) {\n\t\t\t$pagesToShow = 10;\n\t\t}\n\t\t\n\t\t$showSinglePage = (bool)Flux::config('ShowSinglePage');\n\t\t\n\t\t$options = array_merge(\n\t\t\tarray(\n\t\t\t\t'showSinglePage' => $showSinglePage,\n\t\t\t\t'perPage'        => $perPage,\n\t\t\t\t'pagesToShow'    => $pagesToShow,\n\t\t\t\t'pageVariable'   => 'p',\n\t\t\t\t'pageSeparator'  => '|'),\n\t\t\t$options\n\t\t);\n\t\t\n\t\t$this->total          = (int)$total;\n\t\t$this->showSinglePage = $options['showSinglePage'];\n\t\t$this->perPage        = $options['perPage'];\n\t\t$this->pagesToShow    = $options['pagesToShow'];\n\t\t$this->pageVariable   = $options['pageVariable'];\n\t\t$this->pageSeparator  = $options['pageSeparator'];\n\t\t$this->currentPage    = isset($_GET[$this->pageVariable]) && $_GET[$this->pageVariable] > 0 ? $_GET[$this->pageVariable] : 1;\n\t\t\n\t\t$this->calculatePages();\n\t}\n\t\n\t/**\n\t * Calculate the number of pages.\n\t *\n\t * @access private\n\t */\n\tprivate function calculatePages()\n\t{\n\t\t$this->numberOfPages = (int)ceil($this->total / $this->perPage);\n\t}\n\t\n\t/**\n\t * Get an SQL query with the \"LIMIT offset,num\" and appropriate \"ORDER BY\"\n\t * strings appended to the end.\n\t *\n\t * @param string $sql\n\t * @return string\n\t * @access public\n\t */\n\tpublic function getSQL($sql)\n\t{\n\t\t$orderBy = false;\n\t\t\n\t\tforeach ($this->sortableColumns as $column => $value) {\n\t\t\tif (strpos($column, '.') !== false) {\n\t\t\t\tlist ($table, $column) = explode('.', $column, 2);\n\t\t\t\t$param = \"{$table}_{$column}_order\";\n\t\t\t\t$columnName = \"`{$table}`.`{$column}`\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$table = false;\n\t\t\t\t$param = \"{$column}_order\";\n\t\t\t\t$columnName = \"`$column`\";\n\t\t\t}\n\t\t\t\n\t\t\t$sortValues = array('ASC', 'DESC', 'NONE');\n\t\t\t\n\t\t\t// First, check if a GET parameter was passed for this column.\n\t\t\tif (isset($_GET[$param]) && in_array(strtoupper($_GET[$param]), $sortValues)) {\n\t\t\t\t$value = $_GET[$param];\n\t\t\t}\n\t\t\t\n\t\t\t// Check again just in case we're working with the default here.\n\t\t\tif (!is_null($value) && in_array( ($value=strtoupper($value)), $sortValues ) && $value != 'NONE') {\n\t\t\t\t$this->currentSortOrder[str_replace(\"`\", \"\", $columnName)] = $value;\n\t\t\t\t\n\t\t\t\tif (!$orderBy) {\n\t\t\t\t\t$sql .= ' ORDER BY';\n\t\t\t\t\t$orderBy = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($value == 'ASC') {\n\t\t\t\t\t$sql .= \" (CASE WHEN $columnName IS NULL THEN 1 ELSE 0 END) ASC, $columnName ASC,\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$sql .= \" $columnName $value,\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($orderBy) {\n\t\t\t$sql = rtrim($sql, ',');\n\t\t}\n\t\t\n\t\t$offset = ($this->perPage * $this->currentPage) - $this->perPage;\n\t\treturn \"$sql LIMIT $offset,{$this->perPage}\";\n\t}\n\t\n\t/**\n\t * Generate some basic HTML which creates a list of page numbers. Will\n\t * return an empty string if DisplaySinglePages config is set to false.\n\t *\n\t * @return string\n\t * @access public\n\t */\n\tpublic function getHTML()\n\t{\n\t\tif (!Flux::config('DisplaySinglePages') && $this->numberOfPages === 1) {\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t$pages = array();\n\t\t$start = (floor(($this->currentPage - 1) / $this->pagesToShow) * $this->pagesToShow) + 1;\n\t\t$end   = $start + $this->pagesToShow + 1;\n\t\t\n\t\tif ($end > $this->numberOfPages) {\n\t\t\t$end = $this->numberOfPages + 1;\n\t\t}\n\t\telse {\n\t\t\t$end = $end - 1;\n\t\t}\n\t\t\n\t\t$hasPrev = $start > 1;\n\t\t$hasNext = $end < $this->numberOfPages;\n\t\t\n\t\tfor ($i = $start; $i < $end; ++$i) {\n\t\t\t$request = $this->getPageURI($i);\n\t\t\t\n\t\t\tif ($i == $this->currentPage) {\n\t\t\t\t$pages[] = sprintf(\n\t\t\t\t\t'<a title=\"Page #%d\" class=\"page-num current-page\">%d</a>',\n\t\t\t\t\t$i, $i\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$pages[] = sprintf(\n\t\t\t\t\t'<a href=\"%s\" title=\"Page #%d\" class=\"page-num\">%d</a>',\n\t\t\t\t\t$request, $i, $i\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($hasPrev) {\n\t\t\tarray_unshift($pages, sprintf('<a href=\"%s\" title=\"Previous Pane (p#%d)\" class=\"page-prev\">Prev.</a> ', $this->getPageURI($start - 1), $start - 1));\n\t\t}\n\t\t\n\t\tif ($hasNext) {\n\t\t\tarray_push($pages, sprintf(' <a href=\"%s\" title=\"Next Pane (p#%d)\" class=\"page-next\">Next</a>', $this->getPageURI($end), $end));\n\t\t}\n\t\t\n\t\t$links  = sprintf('<div class=\"pages\">%s</div>', implode(\" {$this->pageSeparator} \", $pages)).\"\\n\";\n\t\t\n\t\tif (Flux::config('ShowPageJump') && $this->numberOfPages > Flux::config('PageJumpMinimumPages')) {\n\t\t\t// This is some tricky shit.  Don't even attempt to understand it =(\n\t\t\t// Page jumping is entirely JavaScript dependent.\n\t\t\t$pageVar = preg_quote($this->pageVariable);\n\t\t\t$event   = \"location.href='\".$this->getPageURI(0).\"'\";\n\t\t\t$event   = preg_replace(\"/$pageVar=0/\", \"{$this->pageVariable}='+this.value+'\", $event);\n\t\t\t$jump    = '<label>Page Jump: <input type=\"text\" name=\"jump_to_page\" id=\"jump_to_page\" size=\"4\" onkeypress=\"if (event.keyCode == 13) { %s }\" /></label>';\n\t\t\t$jump    = sprintf($jump, $event);\n\t\t\t$links  .= sprintf('<div class=\"jump-to-page\">%s</div>', $jump);\n\t\t}\n\t\t\n\t\tif (!$this->showSinglePage && $this->numberOfPages === 1) {\n\t\t\treturn null;\n\t\t}\n\t\telse {\n\t\t\treturn $links;\n\t\t}\n\t}\n\t\n\t/**\n\t * Create a link to the current request with a different page number.\n\t *\n\t * @param int $pageNumber\n\t * @return string\n\t * @access protected\n\t */\n\tprotected function getPageURI($pageNumber)\n\t{\n\t\t$request = preg_replace('/(\\?.*)$/', '', $this->requestURI);\n\t\t$qString = $_SERVER['QUERY_STRING'];\n\t\t$pageVar = preg_quote($this->pageVariable);\n\t\t$pageNum = (int)$pageNumber;\n\t\t\n\t\t$qStringVars  = array();\n\t\t$qStringLines = preg_split('/&/', $qString, -1, PREG_SPLIT_NO_EMPTY);\n\t\t\n\t\tforeach ($qStringLines as $qStringVar) {\n\t\t\tif (strpos($qStringVar, '=') !== false) {\n\t\t\t\tlist($qStringKey, $qStringVal) = explode('=', $qStringVar, 2);\n\t\t\t\t$qStringVars[$qStringKey] = $qStringVal;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$qStringVars[$pageVar] = $pageNum;\n\t\t$qStringLines = array();\n\t\t\n\t\tforeach ($qStringVars as $qStringKey => $qStringVal) {\n\t\t\t$qStringLines[] = sprintf('%s=%s', $qStringKey, $qStringVal);\n\t\t}\n\t\t\n\t\treturn sprintf('%s?%s', $request, implode('&', $qStringLines));\n\t}\n\t\n\t/**\n\t * Specify an array (or a string single column name) of columns that are\n\t * sortable by the paginator's features.\n\t *\n\t * @param array $columns\n\t * @return array\n\t * @access public\n\t */\n\tpublic function setSortableColumns($columns)\n\t{\n\t\tif (!is_array($columns)) {\n\t\t\t$columns = array($columns);\n\t\t}\n\t\t\n\t\tforeach ($columns as $key => $column) {\n\t\t\t\n\t\t\tif (!is_numeric($key)) {\n\t\t\t\t$value  = $column;\n\t\t\t\t$column = $key;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$value  = null;\n\t\t\t}\n\t\t\t\n\t\t\t$this->sortableColumns[$column] = $value;\n\t\t}\n\t\t\n\t\treturn $this->sortableColumns;\n\t}\n\t\n\t/**\n\t * Get an HTML anchor which automatically links to the current request\n\t * based on current sorting conditions and sets ascending/descending\n\t * sorting parameters accordingly.\n\t *\n\t * @param string $column\n\t * @param string $name\n\t * @return string\n\t * @access public\n\t */\n\tpublic function sortableColumn($column, $name = null)\n\t{\n\t\tif (!$name) {\n\t\t\t$name = $column;\n\t\t}\n\t\t\n\t\tif (!array_key_exists($column, $this->sortableColumns)) {\n\t\t\treturn htmlspecialchars($name);\n\t\t}\n\t\telse {\n\t\t\tif (strpos($column, '.') !== false) {\n\t\t\t\tlist ($_table, $_column) = explode('.', $column, 2);\n\t\t\t\t$param = \"{$_table}_{$_column}_order\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$param = \"{$column}_order\";\n\t\t\t}\n\t\t\t\n\t\t\t$order   = 'asc';\n\t\t\t$format  = '<a href=\"%s\" class=\"sortable\">%s</a>';\n\t\t\t$name    = htmlspecialchars($name);\n\t\t\t$request = $_SERVER['REQUEST_URI'];\n\t\t\t\n\t\t\tif (isset($this->currentSortOrder[$column])) {\n\t\t\t\tswitch (strtolower($this->currentSortOrder[$column])) {\n\t\t\t\t\tcase 'asc':\n\t\t\t\t\t\t$order = 'desc';\n\t\t\t\t\t\t$name .= Flux::config('ColumnSortAscending');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'desc':\n\t\t\t\t\t\t$order = is_null($this->sortableColumns[$column]) ? false : 'none';\n\t\t\t\t\t\t$name .= Flux::config('ColumnSortDescending');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$order = 'asc';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($order) {\n\t\t\t\t$value = \"$param=$order\";\n\t\t\t\tif (preg_match(\"/$param=(\\w*)/\", $request)) {\n\t\t\t\t\t$request = preg_replace(\"/$param=(\\w*)/\", $value, $request);\n\t\t\t\t}\n\t\t\t\telseif (empty($_SERVER['QUERY_STRING'])) {\n\t\t\t\t\t$request = \"$request?$value\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$request = \"$request&$value\";\n\t\t\t\t}\n\t\t\t\treturn sprintf($format, $request, $name);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$request = rtrim(preg_replace(\"%(?:(\\?)$param=(?:\\w*)&?|&?$param=(?:\\w*))%\", '$1', $request), '?');\n\t\t\t\treturn sprintf($format, $request, $name);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function infoText()\n\t{\n\t\t$currPage = $this->currentPage;\n\t\t$results  = $this->perPage;\n\t\t$infoText = sprintf(\n\t\t\tFlux::message('FoundSearchResults'),\n\t\t\t$this->total, $this->numberOfPages, ($currPage*$results-($results - 1)), $currPage * $results < $this->total ? ($currPage*$results) : ($this->total)\n\t\t);\n\t\treturn sprintf('<p class=\"info-text\">%s</p>', $infoText);\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/PaymentNotifyRequest.php",
    "content": "<?php\nrequire_once 'Flux/LogFile.php';\nrequire_once 'Flux/Config.php';\nrequire_once 'Flux/Error.php';\n\n/**\n * Handles PayPal instant payment notifications.\n */\nclass Flux_PaymentNotifyRequest {\n\t/**\n\t * Logger class for logging to the PayPal log stored on disk.\n\t *\n\t * @access private\n\t * @var Flux_LogFile\n\t */\n\tprivate $ppLogFile;\n\n\t/**\n\t * Set to true after the notification has been verified by PayPal.\n\t *\n\t * @access private\n\t * @var bool\n\t */\n\tprivate $txnIsValid = false;\n\n\t/**\n\t * PayPal server name to use for verification.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $ppServer;\n\n\t/**\n\t * Your currently configured PayPal business email.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $myBusinessEmail;\n\n\t/**\n\t * Your currently configured currency code.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $myCurrencyCode;\n\n\t/**\n\t * PayPal's IPN variables organized into a Flux_Config instance.\n\t *\n\t * @access public\n\t * @var Flux_Config\n\t */\n\tpublic $ipnVariables;\n\n\t/**\n\t * Transactions log table.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $txnLogTable;\n\n\t/**\n\t * Account credit balance table.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $creditsTable;\n\n\t/**\n\t * Construct new PaymentNotifyRequest instance from specified IPN variables.\n\t *\n\t * @param array $ipnPostVars\n\t * @access public\n\t */\n\tpublic function __construct(array $ipnPostVars)\n\t{\n\t\t$this->ppLogFile       = new Flux_LogFile(FLUX_DATA_DIR.'/logs/paypal.log');\n\t\t$this->ppServer        = Flux::config('PayPalIpnUrl');\n\t\t$this->myBusinessEmail = Flux::config('PayPalBusinessEmail');\n\t\t$this->myCurrencyCode  = strtoupper(Flux::config('DonationCurrency'));\n\t\t$this->ipnVariables    = new Flux_Config($ipnPostVars);\n\t\t$this->txnLogTable     = Flux::config('FluxTables.TransactionTable');\n\t\t$this->creditsTable    = Flux::config('FluxTables.CreditsTable');\n\t}\n\n\t/**\n\t * Log to PayPal log file. Works like printf().\n\t *\n\t * @param string $format\n\t * @param mixed ...\n\t * @return string\n\t * @access protected\n\t */\n\tprotected function logPayPal()\n\t{\n\t\t$args = func_get_args();\n\t\t$func = array($this->ppLogFile, 'puts');\n\t\treturn call_user_func_array($func, $args);\n\t}\n\t\n\t/**\n     * Get user IP.\n     * Checks if CloudFlare used to get real IP.\n     *\n     * @access public\n     */\n    protected function fetchIP()\n    {\n        $alt_ip = $_SERVER['REMOTE_ADDR'];\n        if (isset($_SERVER['HTTP_X_REAL_IP'])) {\n            $alt_ip = $_SERVER['HTTP_X_REAL_IP'];\n        } elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n            $alt_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n        } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {\n            $alt_ip = $_SERVER['HTTP_CLIENT_IP'];\n        } elseif (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {\n            $alt_ip = $_SERVER['HTTP_CF_CONNECTING_IP'];\n        }\n\n        return $alt_ip;\n    }\n\n\t/**\n\t * Process transaction.\n\t *\n\t * @access public\n\t */\n\tpublic function process()\n\t{\n\t\t$allowed_hosts = Flux::config('PayPalAllowedHosts')->toArray();\n\t\t$received_from = gethostbyaddr($this->fetchIP());\n\t\t$this->logPayPal('Received notification from %s (%s)', $this->fetchIP(), $received_from);\n\n\t\tif ((in_array($received_from, $allowed_hosts) && $this->verify()) || $this->verifyiprange($received_from)) {\n\t\t\t$this->logPayPal('Proceeding to validate the authenticity of the transaction...');\n\n\t\t\t$accountEmails = Flux::config('PayPalReceiverEmails');\n\t\t\t$accountEmails = array_merge(array($this->myBusinessEmail), $accountEmails->toArray());\n\t\t\t$receiverEmail = $this->ipnVariables->get('receiver_email');\n\t\t\t$transactionID = $this->ipnVariables->get('txn_id');\n\t\t\t$paymentStatus = $this->ipnVariables->get('payment_status');\n\t\t\t$payerEmail    = $this->ipnVariables->get('payer_email');\n\t\t\t$currencyCode  = strtoupper(substr($this->ipnVariables->get('mc_currency'), 0, 3));\n\t\t\t$trusted       = true;\n\n\t\t\t// Identify transaction number.\n\t\t\t$this->logPayPal('Transaction identified as %s.', $transactionID);\n\n\t\t\tif (!in_array($receiverEmail, $accountEmails)) {\n\t\t\t\t$this->logPayPal('Receiver e-mail (%s) is not recognized, unauthorized to continue.', $receiverEmail);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$customArray  = @unserialize(base64_decode((string)$this->ipnVariables->get('custom')));\n\t\t\t\t$customArray  = $customArray && is_array($customArray) ? $customArray : array();\n\t\t\t\t$customData   = new Flux_Config($customArray);\n\t\t\t\t$accountID    = $customData->get('account_id');\n\t\t\t\t$serverName   = $customData->get('server_name');\n\n\t\t\t\tif ($currencyCode != $this->myCurrencyCode) {\n\t\t\t\t\t$this->logPayPal('Transaction currency not exchangeable, accepting anyways. (recv: %s, expected: %s)',\n\t\t\t\t\t\t$currencyCode, $this->myCurrencyCode);\n\n\t\t\t\t\t$exchangeableCurrency = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$exchangeableCurrency = true;\n\t\t\t\t}\n\n\t\t\t\t// How much was received? (and in what currency?)\n\t\t\t\t$this->logPayPal('Received %s (%s).', $this->ipnVariables->get('mc_gross'), $currencyCode);\n\n\t\t\t\t// How much will be deposited?\n\t\t\t\t$settleAmount   = $this->ipnVariables->get('settle_amount');\n\t\t\t\t$settleCurrency = $this->ipnVariables->get('settle_currency');\n\n\t\t\t\tif ($settleAmount && $settleCurrency) {\n\t\t\t\t\t$this->logPayPal('Deposited into PayPal account: %s %s.', $settleAmount, $settleCurrency);\n\t\t\t\t}\n\n\t\t\t\t// Let's see where the donation credits should go to.\n\t\t\t\t$this->logPayPal('Game server name: %s, account ID: %s',\n\t\t\t\t\t($serverName ? $serverName : '(absent)'), ($accountID ? $accountID : '(absent)'));\n\n\t\t\t\tif (!$accountID || !$serverName) {\n\t\t\t\t\t$this->logPayPal('Account ID and/or game server name absent, cannot exchange for credits.');\n\t\t\t\t}\n\t\t\t\telseif ($this->ipnVariables->get('txn_type') != 'web_accept') {\n\t\t\t\t\t$this->logPayPal('Transaction type is not web_accept, amount will not be exchanged for credits.');\n\t\t\t\t}\n\t\t\t\telseif (!($servGroup = Flux::getServerGroupByName($serverName))) {\n\t\t\t\t\t$this->logPayPal('Unknown game server \"%s\", cannot process donation for credits.', $serverName);\n\t\t\t\t}\n\n\t\t\t\tif ($paymentStatus == 'Completed') {\n\t\t\t\t\t$this->logPayPal('Payment for txn_id#%s has been completed.', $transactionID);\n\n\t\t\t\t\tif ($servGroup && $exchangeableCurrency) {\n\t\t\t\t\t\t$sql = \"SELECT COUNT(account_id) AS acc_id_count FROM {$servGroup->loginDatabase}.login WHERE sex != 'S' AND group_id >= 0 AND account_id = ?\";\n\t\t\t\t\t\t$sth = $servGroup->connection->getStatement($sql);\n\t\t\t\t\t\t$sth->execute(array($accountID));\n\t\t\t\t\t\t$res = $sth->fetch();\n\n\t\t\t\t\t\tif (!$res) {\n\t\t\t\t\t\t\t$this->logPayPal('Unknown account #%s on server %s, cannot exchange for credits.', $accountID, $serverName);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (!$servGroup->loginServer->hasCreditsRecord($accountID)) {\n\t\t\t\t\t\t\t\t$this->logPayPal('Identified as first-time donation to the server from this account.');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$amount  = (float)$this->ipnVariables->get('mc_gross');\n\t\t\t\t\t\t\t$minimum = (float)Flux::config('MinDonationAmount');\n\n\t\t\t\t\t\t\tif ($amount >= $minimum) {\n\t\t\t\t\t\t\t\t$trustTable = Flux::config('FluxTables.DonationTrustTable');\n\t\t\t\t\t\t\t\t$holdHours  = +(int)Flux::config('HoldUntrustedAccount');\n\n\t\t\t\t\t\t\t\tif ($holdHours) {\n\t\t\t\t\t\t\t\t\t$sql = \"SELECT account_id, email FROM {$servGroup->loginDatabase}.$trustTable WHERE account_id = ? AND email = ? LIMIT 1\";\n\t\t\t\t\t\t\t\t\t$sth = $servGroup->connection->getStatement($sql);\n\t\t\t\t\t\t\t\t\t$sth->execute(array($accountID, $payerEmail));\n\t\t\t\t\t\t\t\t\t$res = $sth->fetch();\n\n\t\t\t\t\t\t\t\t\tif ($res && $res->account_id) {\n\t\t\t\t\t\t\t\t\t\t$this->logPayPal('Account ID and e-mail are trusted.');\n\t\t\t\t\t\t\t\t\t\t$trusted = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t$trusted = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$rate    = Flux::config('CreditExchangeRate');\n\t\t\t\t\t\t\t\t$credits = floor($amount / $rate);\n\n\t\t\t\t\t\t\t\tif ($trusted) {\n\t\t\t\t\t\t\t\t\t$sql = \"SELECT * FROM {$servGroup->loginDatabase}.{$this->creditsTable} WHERE account_id = ?\";\n\t\t\t\t\t\t\t\t\t$sth = $servGroup->connection->getStatement($sql);\n\t\t\t\t\t\t\t\t\t$sth->execute(array($accountID));\n\t\t\t\t\t\t\t\t\t$acc = $sth->fetch();\n\n\t\t\t\t\t\t\t\t\t$this->logPayPal('Updating account credit balance from %s to %s', (int)$acc->balance, $acc->balance + $credits);\n\t\t\t\t\t\t\t\t\t$res = $servGroup->loginServer->depositCredits($accountID, $credits, $amount);\n\n\t\t\t\t\t\t\t\t\tif ($res) {\n\t\t\t\t\t\t\t\t\t\t$this->logPayPal('Deposited credits.');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t$this->logPayPal('Failed to deposit credits.');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t$this->logPayPal('Account/e-mail is not trusted, holding donation credits for %d hours.', $holdHours);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$this->logPayPal('User has donated less than the configured minimum, not exchanging credits.');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->logPayPal('Incomplete payment status: %s (exchanging for credits will not take place)', $paymentStatus);\n\n\t\t\t\t\t$banStatuses = Flux::config('BanPaymentStatuses');\n\n\t\t\t\t\tif ($banStatuses instanceOf Flux_Config) {\n\t\t\t\t\t\t$banStatuses = $banStatuses->toArray();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$banStatuses = array();\n\t\t\t\t\t}\n\n\t\t\t\t\t$pymntStatus = strtolower($paymentStatus);\n\t\t\t\t\t$banStatuses = array_map('strtolower', $banStatuses);\n\n\t\t\t\t\tif (in_array($pymntStatus, $banStatuses)) {\n\t\t\t\t\t\t$this->logPayPal('Auto-ban payment status detected: %s', $paymentStatus);\n\n\t\t\t\t\t\tif ($servGroup && $serverName && $accountID) {\n\t\t\t\t\t\t\t$this->logPayPal('Banning account! (serv: %s, account_id: %s)', $serverName, $accountID);\n\t\t\t\t\t\t\t$servGroup->loginServer->permanentlyBan(\n\t\t\t\t\t\t\t\tnull, \"Banned for invalid payment status: $paymentStatus\",\n\t\t\t\t\t\t\t\t$accountID\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$this->logPayPal(\"Couldn't ban account, it's unknown.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!$servGroup) {\n\t\t\t\t\tforeach (Flux::$loginAthenaGroupRegistry as $servGroup) {\n\t\t\t\t\t\t$this->logToPayPalTable($servGroup, $accountID, $serverName, $trusted);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (empty($credits)) {\n\t\t\t\t\t\t$credits = 0;\n\t\t\t\t\t}\n\t\t\t\t\t$this->logToPayPalTable($servGroup, $accountID, $serverName, $trusted, $credits);\n\t\t\t\t}\n\n\t\t\t\t$this->logPayPal('Saving transaction details for %s...', $transactionID);\n\n\t\t\t\tif ($logFile=$this->saveDetailsToFile()) {\n\t\t\t\t\t$this->logPayPal('Saved transaction details for %s to: %s', $transactionID, $logFile);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->logPayPal('Failed to save transaction details for %s to file.', $transactionID);\n\t\t\t\t}\n\n\t\t\t\t$this->logPayPal('Done processing %s.', $transactionID);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->logPayPal('Transaction invalid, aborting.');\n\t\t\t\n\t\t\tif(!in_array($received_from, $allowed_hosts) && Flux::config('PaypalHackNotify')){\n\t\t\t\trequire_once 'Flux/Mailer.php';\n\t\t\t\t\n\t\t\t\t$customArray  = @unserialize(base64_decode((string)$this->ipnVariables->get('custom')));\n\t\t\t\t$customArray  = $customArray && is_array($customArray) ? $customArray : array();\n\t\t\t\t$customData   = new Flux_Config($customArray);\n\t\t\t\t$accountID    = $customData->get('account_id');\n\t\t\t\t$serverName   = $customData->get('server_name');\n\t\t\t\t\n\t\t\t\t$mail = new Flux_Mailer();\n\t\t\t\t\n\t\t\t\t$tmpl = \"<p>Paypal hack detected!</p>\";\n\t\t\t\t$tmpl .= \"<p>Account: \".$accountID.\"</p>\";\n\t\t\t\t$tmpl .= \"<p>serverName: \".$serverName.\"</p>\";\n\t\t\t\t\n\t\t\t\t$tmpl .= \"<br><br><br>\";\n\t\t\t\t$tmpl .= \"<p>======= IP Info ========</p>\";\n\t\t\t\t$tmpl .= nl2br(var_export(['ip' => $this->fetchIP(), 'host' => $received_from], true));\n\t\t\t\t$tmpl .= \"<p>======= End IP Info ========</p>\";\n\t\t\t\t$tmpl .= \"<br><br><br>\";\n\t\t\t\t$tmpl .= \"<p>======= Account Info ========</p>\";\n\t\t\t\t$tmpl .= nl2br(var_export($customData, true));\n\t\t\t\t$tmpl .= \"<p>======= End Account Info ========</p>\";\n\t\t\t\t$tmpl .= \"<br><br><br>\";\n\t\t\t\t$tmpl .= \"<p>======= Transaction Info ========</p>\";\n\t\t\t\t$tmpl .= nl2br(var_export($this->ipnVariables->toArray(), true));\n\t\t\t\t$tmpl .= \"<p>======= End Transaction Info ========</p>\";\n\t\t\t\t\n\t\t\t\t$accountEmails = Flux::config('PayPalReceiverEmails');\n\t\t\t\t$accountEmails = array_merge(array($this->myBusinessEmail), $accountEmails->toArray());\n\t\t\t\t\n\t\t\t\tforeach($accountEmails as $email) {\n\t\t\t\t\t$sent = $mail->send($email, '['.Flux::config('SiteTitle').'] Paypal hack', $tmpl, array('_ignoreTemplate' => true));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->logPayPal('Hack detected!');\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Translate the IPN variables into a query string for use in a POST\n\t * request.\n\t *\n\t * @return string\n\t * @access private\n\t */\n\tprivate function ipnVarsToQueryString()\n\t{\n\t\t$ipnVars = $this->ipnVariables->toArray();\n\t\t$qString = '';\n\t\tforeach ($ipnVars as $key => $value) {\n\t\t\t$qString .= sprintf('&%s=%s', $key, urlencode($value));\n\t\t}\n\t\t$qString = ltrim($qString, '&');\n\t\treturn $qString;\n\t}\n\n\t/**\n\t * Verify IPN variables against PayPal server.\n\t *\n\t * Updated to comply with changes being implemented Feb 1, 2013\n\t * https://www.x.com/node/320404\n\t *\n\t * @return bool True if verified, false if not.\n\t * @access private\n\t */\n\tprivate function verify()\n\t{\n\t\t$qString  = 'cmd=_notify-validate&'.$this->ipnVarsToQueryString();\n\t\t$request  = \"POST /cgi-bin/webscr HTTP/1.1\\r\\n\";\n\t\t$request .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n\t\t$request .= 'Content-Length: '.strlen($qString).\"\\r\\n\";\n\t\t$request .= 'Host: '.$this->ppServer.\"\\r\\n\";\n\t\t$request .= \"Connection: close\\r\\n\\r\\n\";\n\t\t$request .= $qString;\n\n\t\t$this->logPayPal('Query string: %s', $qString);\n\t\t$this->logPayPal('Establishing connection to PayPal server at %s:443...', $this->ppServer);\n\n\t\t$fp = @fsockopen('ssl://'.$this->ppServer, 443, $errno, $errstr, 20);\n\t\tif (!$fp) {\n\t\t\t$this->logPayPal(\"Failed to connect to PayPal server: [%d] %s\", $errno, $errstr);\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t$this->logPayPal('Connected. Sending request back to PayPal...');\n\n\t\t\t// Send POST request just as PayPal sent it.\n\n\t\t\t$this->logPayPal('Sent %d bytes of transaction data. Request size: %d bytes.', strlen($qString), fputs($fp, $request));\n\t\t\t$this->logPayPal('Reading back response from PayPal...');\n\n\t\t\t// Read until body starts\n\t\t\twhile (!feof($fp) && ($line = trim(fgets($fp))) != '');\n\t\t\t\n\t\t\t$line = '';\n\n\t\t\t// Read until EOF, contains VERIFIED or INVALID.\n\t\t\twhile (!feof($fp)) {\n\t\t\t\t$line .= strtoupper(trim(fgets($fp)));\n\t\t\t}\n\n\t\t\t// Close connection.\n\t\t\tfclose($fp);\n\n\t\t\t// Check verification status of the notify request.\n\t\t\tif (strpos($line, 'VERIFIED') !== false) {\n\t\t\t\t$this->logPayPal('Notification verified. (recv: %s)', $line);\n\t\t\t\t$this->txnIsValid = true;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->logPayPal('Notification failed to verify. (recv: %s)', $line);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\n\t*/\n\tprivate function verifyiprange($received_from)\n\t{\n\t\t$allowed_hosts = Flux::config('PayPalAllowedHosts')->toArray();\n\t\t$ip_long = ip2long ( $received_from );\n\n\t\tfor ($i = 0; $i < 72; $i++)\n\t\t{\n\t\t\tif(strpos($allowed_hosts[$i], '/') !== false) {\n\t\t\t\t$ip_arr = explode ( '/' , $allowed_hosts[$i] );\n\n\t\t\t\t$network_long = ip2long ( $ip_arr[0] );\n\t\t \n\t\t\t\t$x = ip2long ( $ip_arr [1]);\n\t\t\t\t$mask = long2ip ( $x ) == $ip_arr [ 1 ] ? $x : 0xffffffff << ( 32 - $ip_arr [ 1 ]);\n\t\t\t   \n\t\t\t\tif(( $ip_long & $mask ) == ( $network_long & $mask ))\n\t\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tif($allowed_hosts[$i] == $received_from)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n    }\n\n\t/**\n\t * Save the transaction details to disk in the file name format of:\n\t * data/logs/transactions/TXN_TYPE/PAYMENT_STATUS.log\n\t *\n\t * @return string File name\n\t * @access private\n\t */\n\tprivate function saveDetailsToFile()\n\t{\n\t\tif ($this->txnIsValid) {\n\t\t\t$logDir1 = realpath(FLUX_DATA_DIR.'/logs/transactions');\n\t\t\t$logDir2 = $logDir1.'/'.$this->ipnVariables->get('txn_type');\n\t\t\t$logDir3 = $logDir2.'/'.$this->ipnVariables->get('payment_status');\n\t\t\t$logFile = $logDir3.'/'.$this->ipnVariables->get('txn_id').'.log.php';\n\n\t\t\tif (!is_dir($logDir2)) {\n\t\t\t\tmkdir($logDir2, 0600);\n\t\t\t}\n\t\t\tif (!is_dir($logDir3)) {\n\t\t\t\tmkdir($logDir3, 0600);\n\t\t\t}\n\n\t\t\t$fp = fopen($logFile, 'w');\n\t\t\tif ($fp) {\n\t\t\t\tfwrite($fp, \"<?php exit('Forbidden'); ?>\\n\");\n\t\t\t\tforeach ($this->ipnVariables->toArray() as $key => $value) {\n\t\t\t\t\tfwrite($fp, \"$key: $value\\n\");\n\t\t\t\t}\n\t\t\t\tfclose($fp);\n\t\t\t\treturn $logFile;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Log the transaction details into the flux_paypal_transactions table.\n\t *\n\t * @param Flux_LoginAthenaGroup $servGroup\n\t * @param string $accountID\n\t * @param string $serverName\n\t * @access private\n\t */\n\tprivate function logToPayPalTable(Flux_LoginAthenaGroup $servGroup, $accountID, $serverName, $trusted, $credits = 0)\n\t{\n\t\tif ($this->txnIsValid) {\n\t\t\t$holdUntil = null;\n\t\t\tif (!$trusted) {\n\t\t\t\t$email = $this->ipnVariables->get('payer_email');\n\t\t\t\t$sql   = \"SELECT hold_until FROM {$servGroup->loginDatabase}.{$this->txnLogTable} \";\n\t\t\t\t$sql  .= \"WHERE account_id = ? AND payer_email = ? AND hold_until > NOW() AND payment_status = 'Completed' LIMIT 1\";\n\t\t\t\t$sth   = $sth = $servGroup->connection->getStatement($sql);\n\n\t\t\t\t$sth->execute(array($accountID, $email));\n\t\t\t\t$row = $sth->fetch();\n\n\t\t\t\tif ($row && $row->hold_until) {\n\t\t\t\t\t$holdUntil = $row->hold_until;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$hours     = +(int)Flux::config('HoldUntrustedAccount');\n\t\t\t\t\t$holdUntil = date('Y-m-d H:i:s', time()+($hours*60*60));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->logPayPal('Saving transaction details to PayPal transactions table...');\n\t\t\t$sql = \"\n\t\t\t\tINSERT INTO {$servGroup->loginDatabase}.{$this->txnLogTable} (\n\t\t\t\t\taccount_id,\n\t\t\t\t\tserver_name,\n\t\t\t\t\tcredits,\n\t\t\t\t\treceiver_email,\n\t\t\t\t\titem_name,\n\t\t\t\t\titem_number,\n\t\t\t\t\tquantity,\n\t\t\t\t\tpayment_status,\n\t\t\t\t\tpending_reason,\n\t\t\t\t\tpayment_date,\n\t\t\t\t\tmc_gross,\n\t\t\t\t\tmc_fee,\n\t\t\t\t\ttax,\n\t\t\t\t\tmc_currency,\n\t\t\t\t\tparent_txn_id,\n\t\t\t\t\ttxn_id,\n\t\t\t\t\ttxn_type,\n\t\t\t\t\tfirst_name,\n\t\t\t\t\tlast_name,\n\t\t\t\t\taddress_street,\n\t\t\t\t\taddress_city,\n\t\t\t\t\taddress_state,\n\t\t\t\t\taddress_zip,\n\t\t\t\t\taddress_country,\n\t\t\t\t\taddress_status,\n\t\t\t\t\tpayer_email,\n\t\t\t\t\tpayer_status,\n\t\t\t\t\tpayment_type,\n\t\t\t\t\tnotify_version,\n\t\t\t\t\tverify_sign,\n\t\t\t\t\treferrer_id,\n\t\t\t\t\tprocess_date,\n\t\t\t\t\thold_until\n\t\t\t\t) VALUES (\n\t\t\t\t\t?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,\n\t\t\t\t\t?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW(),\n\t\t\t\t\t?\n\t\t\t\t)\n\t\t\t\";\n\t\t\t$var = $this->ipnVariables;\n\t\t\t$sth = $servGroup->connection->getStatement($sql);\n\t\t\t$ret = $sth->execute(array(\n\t\t\t\t$accountID,\n\t\t\t\t$serverName,\n\t\t\t\t$credits,\n\t\t\t\t$var->get('receiver_email'),\n\t\t\t\t$var->get('item_name'),\n\t\t\t\t$var->get('item_number'),\n\t\t\t\t$var->get('quantity'),\n\t\t\t\t$var->get('payment_status'),\n\t\t\t\t$var->get('pending_reason'),\n\t\t\t\t$var->get('payment_date'),\n\t\t\t\t$var->get('mc_gross'),\n\t\t\t\t$var->get('mc_fee'),\n\t\t\t\t$var->get('tax'),\n\t\t\t\t$var->get('mc_currency'),\n\t\t\t\t$var->get('parent_txn_id'),\n\t\t\t\t$var->get('txn_id'),\n\t\t\t\t$var->get('txn_type'),\n\t\t\t\t$var->get('first_name'),\n\t\t\t\t$var->get('last_name'),\n\t\t\t\t$var->get('address_street'),\n\t\t\t\t$var->get('address_city'),\n\t\t\t\t$var->get('address_state'),\n\t\t\t\t$var->get('address_zip'),\n\t\t\t\t$var->get('address_country'),\n\t\t\t\t$var->get('address_status'),\n\t\t\t\t$var->get('payer_email'),\n\t\t\t\t$var->get('payer_status'),\n\t\t\t\t$var->get('payment_type'),\n\t\t\t\t$var->get('notify_version'),\n\t\t\t\t$var->get('verify_sign'),\n\t\t\t\t$var->get('receiver_id'),\n\t\t\t\t$holdUntil\n\t\t\t));\n\n\t\t\tif ($ret) {\n\t\t\t\tif (!trim($serverName)) {\n\t\t\t\t\t$serverName = '(unknown)';\n\t\t\t\t}\n\t\t\t\t$this->logPayPal('Stored information in PayPal transactions table for server %s.', $serverName);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$errorInfo = implode('/', $sth->errorInfo());\n\t\t\t\t$this->logPayPal('Failed to save information in PayPal transactions table. (%s)', $errorInfo);\n\t\t\t}\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/PermissionError.php",
    "content": "<?php\nrequire_once 'Flux/Error.php';\n\nclass Flux_PermissionError extends Flux_Error {\n\t\n}\n?>\n"
  },
  {
    "path": "lib/Flux/RegisterError.php",
    "content": "<?php\nrequire_once 'Flux/Error.php';\n\nclass Flux_RegisterError extends Flux_Error {\n\tconst USERNAME_ALREADY_TAKEN = 0;\n\tconst USERNAME_TOO_SHORT     = 1;\n\tconst USERNAME_TOO_LONG      = 2;\n\tconst PASSWORD_TOO_SHORT     = 4;\n\tconst PASSWORD_TOO_LONG      = 5;\n\tconst PASSWORD_MISMATCH      = 6;\n\tconst PASSWORD_NEED_UPPER    = 7;\n\tconst PASSWORD_NEED_LOWER    = 8;\n\tconst PASSWORD_NEED_NUMBER   = 9;\n\tconst PASSWORD_NEED_SYMBOL   = 10;\n\tconst PASSWORD_HAS_USERNAME  = 11;\n\tconst EMAIL_ADDRESS_IN_USE   = 12;\n\tconst INVALID_EMAIL_ADDRESS  = 13;\n\tconst INVALID_GENDER         = 14;\n\tconst INVALID_SERVER         = 15;\n\tconst INVALID_SECURITY_CODE  = 16;\n\tconst INVALID_USERNAME       = 17;\n\tconst INVALID_PASSWORD       = 18;\n\tconst INVALID_BIRTHDATE      = 19;\n\tconst INVALID_EMAIL_CONF     = 20;\n}\n?>\n"
  },
  {
    "path": "lib/Flux/SessionData.php",
    "content": "<?php\nrequire_once 'Flux/DataObject.php';\nrequire_once 'Flux/ItemShop/Cart.php';\nrequire_once 'Flux/LoginError.php';\n\n/**\n * Contains all of Flux's session data.\n */\nclass Flux_SessionData {\n\t/**\n\t * Actual session data array.\n\t *\n\t * @access private\n\t * @var array\n\t */\n\tprivate $sessionData;\n\t\n\t/**\n\t * Session data filters.\n\t *\n\t * @access private\n\t * @var array\n\t */\n\tprivate $dataFilters = array();\n\t\n\t/**\n\t * Selected login server group.\n\t *\n\t * @access public\n\t * @var Flux_LoginAthenaGroup\n\t */\n\tpublic $loginAthenaGroup;\n\t\n\t/**\n\t * Selected login server.\n\t *\n\t * @access public\n\t * @var Flux_LoginServer\n\t */\n\tpublic $loginServer;\n\t\n\t/**\n\t * Account object.\n\t *\n\t * @access public\n\t * @var Flux_DataObject\n\t */\n\tpublic $account;\n\n\t\n\t/**\n\t * Create new SessionData instance.\n\t *\n\t * @param array $sessionData\n\t * @access public\n\t */\n\tpublic function __construct(array &$sessionData, $logout = false)\n\t{\n\t\t$this->sessionData = &$sessionData;\n\t\tif ($logout) {\n\t\t\t$this->logout();\n\t\t}\n\t\telse {\n\t\t\t$this->initialize();\n\t\t}\n\t}\n\t\n\t/**\n\t * Initialize session data.\n\t *\n\t * @param bool $force\n\t * @return bool\n\t * @access private\n\t */\n\tprivate function initialize($force = false)\n\t{\t\n\t\t$keysToInit = array('username', 'serverName', 'athenaServerName', 'securityCode', 'theme');\n\t\tforeach ($keysToInit as $key) {\n\t\t\tif ($force || !$this->{$key}) {\n\t\t\t\t$method = ucfirst($key);\n\t\t\t\t$method = \"set{$method}Data\";\n\t\t\t\t$this->$method(null);\n\t\t\t}\n\t\t}\n\n\t\t$loggedIn = true;\n\t\tif (!$this->username) {\n\t\t\t$loggedIn = false;\n\t\t\t$cfgAthenaServerName = Flux::config('DefaultCharMapServer');\n\t\t\t$cfgLoginAthenaGroup = Flux::config('DefaultLoginGroup');\n\t\t\t\n\t\t\tif (Flux::getServerGroupByName($cfgLoginAthenaGroup)){\n\t\t\t\t$this->setServerNameData($cfgLoginAthenaGroup);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$defaultServerName = current(array_keys(Flux::$loginAthenaGroupRegistry));\n\t\t\t\t$this->setServerNameData($defaultServerName);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif ($this->serverName && ($this->loginAthenaGroup = Flux::getServerGroupByName($this->serverName))) {\n\t\t\t$this->loginServer = $this->loginAthenaGroup->loginServer;\n\t\t\t\n\t\t\tif (!$loggedIn && $cfgAthenaServerName && $this->getAthenaServer($cfgAthenaServerName)) {\n\t\t\t\t$this->setAthenaServerNameData($cfgAthenaServerName);\n\t\t\t}\n\t\t\t\n\t\t\tif (!$this->athenaServerName || ((!$loggedIn && !$this->getAthenaServer($cfgAthenaServerName)) || !$this->getAthenaServer($this->athenaServerName))) {\n\t\t\t\t$this->setAthenaServerNameData(current($this->getAthenaServerNames()));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Get new account data every request.\n\t\tif ($this->loginAthenaGroup && $this->username && ($account = $this->getAccount($this->loginAthenaGroup, $this->username))) {\t\n\t\t\t$this->account = $account;\n\t\t\t$this->account->group_level = AccountLevel::getGroupLevel($account->group_id);\n\t\t\t\n\t\t\t// Automatically log out of account when detected as banned.\n\t\t\t$permBan = ($account->state == 5 && !Flux::config('AllowPermBanLogin'));\n\t\t\t$tempBan = (($account->unban_time > 0 && $account->unban_time < time()) && !Flux::config('AllowTempBanLogin'));\n\t\t\t\n\t\t\tif ($permBan || $tempBan) {\n\t\t\t\t$this->logout();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->account = new Flux_DataObject(null, array('group_level' => AccountLevel::UNAUTH));\n\t\t}\n\t\t\n\t\tif (!is_array($this->cart)) {\n\t\t\t$this->setCartData(array());\n\t\t}\n\t\t\n\t\tif ($this->account->account_id && $this->loginAthenaGroup) {\n\t\t\tif (!array_key_exists($this->loginAthenaGroup->serverName, $this->cart)) {\n\t\t\t\t$this->cart[$this->loginAthenaGroup->serverName] = array();\n\t\t\t}\n\n\t\t\tforeach ($this->getAthenaServerNames() as $athenaServerName) {\n\t\t\t\t$athenaServer = $this->getAthenaServer($athenaServerName);\n\t\t\t\t$cartArray    = &$this->cart[$this->loginAthenaGroup->serverName];\n\t\t\t\t$accountID    = $this->account->account_id;\n\t\t\t\t\n\t\t\t\tif (!array_key_exists($accountID, $cartArray)) {\n\t\t\t\t\t$cartArray[$accountID] = array();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!array_key_exists($athenaServerName, $cartArray[$accountID])) {\n\t\t\t\t\t$cartArray[$accountID][$athenaServerName] = new Flux_ItemShop_Cart();\n\t\t\t\t}\n\t\t\t\t$cartArray[$accountID][$athenaServerName]->setAccount($this->account);\n\t\t\t\t$athenaServer->setCart($cartArray[$accountID][$athenaServerName]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!$this->theme || $this->theme === 'installer') { // always update if coming from installer\n\t\t\t$this->setThemeData(Flux::config('ThemeName.0'));\n\t\t}\n\n\t\treturn true;\n\t}\n\t\n\t/**\n\t * Log current user out.\n\t * \n\t * @return bool\n\t * @access public\n\t */\n\tpublic function logout()\n\t{\n\t\t$this->loginAthenaGroup = null;\n\t\t$this->loginServer = null;\n\t\treturn $this->initialize(true);\n\t}\n\t\n\tpublic function __call($method, $args)\n\t{\n\t\tif (count($args) && preg_match('/set(.+?)Data/', $method, $m)) {\n\t\t\t$arg     = current($args);\n\t\t\t$meth    = $m[1];\n\t\t\t$meth[0] = strtolower($meth[0]);\n\t\t\t\n\t\t\tif (array_key_exists($meth, $this->dataFilters)) {\n\t\t\t\tforeach ($this->dataFilters[$meth] as $callback) {\n\t\t\t\t\t$arg = call_user_func($callback, $arg);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->sessionData[$meth] = $arg;\n\t\t}\n\t}\n\t\n\tpublic function &__get($prop)\n\t{\n\t\t$value = null;\n\t\tif (array_key_exists($prop, $this->sessionData)) {\n\t\t\t$value = &$this->sessionData[$prop];\n\t\t}\n\t\treturn $value;\n\t}\n\t\n\t/**\n\t * Set session data.\n\t *\n\t * @param array $keys Session keys to be affected.\n\t * @param mixed $value Value to be assigned to all specified keys.\n\t * @return mixed whatever was set\n\t * @access public\n\t */\n\tpublic function setData(array $keys, $value)\n\t{\n\t\tforeach ($keys as $key) {\n\t\t\t$key = ucfirst($key);\n\t\t\t$this->{\"set{$key}Data\"}($value);\n\t\t}\n\t\treturn $value;\n\t}\n\t\n\t/**\n\t * Add a session data setter filter.\n\t *\n\t * @param string $key Which session key\n\t * @param string $callback Function callback.\n\t * @return string Callback\n\t * @access public\n\t */\n\tpublic function addDataFilter($key, $callback)\n\t{\n\t\tif (!array_key_exists($key, $this->dataFilters)) {\n\t\t\t$this->dataFilters[$key] = array();\n\t\t}\n\t\t\n\t\t$this->dataFilters[$key][] = $callback;\n\t\treturn $callback;\n\t}\n\t\n\t/**\n\t * Checks whether the current user is logged in.\n\t */\n\tpublic function isLoggedIn()\n\t{\n\t\treturn $this->account->group_level >= AccountLevel::NORMAL;\n\t}\n\t\n\t/**\n\t * Check securityCode from user with $this->securityCode or reCaptcha\n\t * @param $securityCode Code from user\n\t * @param $recaptcha True if check using recaptcha\n\t * @return true on success and false on failure\n\t */\n\tpublic function checkSecurityCode($securityCode, $recaptcha = false) {\n\t\tif ($recaptcha) {\n\t\t\tif (Flux::config('ReCaptchaPrivateKey') && Flux::config('ReCaptchaPublicKey')) {\n\t\t\t\t$responseKeys = array();\n\t\t\t\tif (isset($_POST['g-recaptcha-response']) && $_POST['g-recaptcha-response'] != \"\") {\n\t\t\t\t\t$response = file_get_contents(\"https://www.google.com/recaptcha/api/siteverify?secret=\".Flux::config('ReCaptchaPrivateKey').\"&response=\".$_POST['g-recaptcha-response'].\"&remoteip=\".$_SERVER['REMOTE_ADDR']);\n\t\t\t\t\t$responseKeys = json_decode($response,true);\n\t\t\t\t}\n\t\t\t\tif (count($responseKeys) && intval($responseKeys[\"success\"]) == 1) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if ($securityCode && !empty($securityCode) && strtolower($securityCode) == strtolower($this->securityCode)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t\n\t/**\n\t * User login.\n\t *\n\t * @param string $server Server name\n\t * @param string $username\n\t * @param string $password\n\t * @throws Flux_LoginError\n\t * @access public\n\t */\n\tpublic function login($server, $username, $password, $securityCode = null)\n\t{\n\t\t$loginAthenaGroup = Flux::getServerGroupByName($server);\n\t\tif (!$loginAthenaGroup) {\n\t\t\tthrow new Flux_LoginError('Invalid server.', Flux_LoginError::INVALID_SERVER);\n\t\t}\n\t\t\n\t\tif ($loginAthenaGroup->loginServer->isIpBanned() && !Flux::config('AllowIpBanLogin')) {\n\t\t\tthrow new Flux_LoginError('IP address is banned', Flux_LoginError::IPBANNED);\n\t\t}\n\t\t\n\t\tif (Flux::config('UseLoginCaptcha') && !self::checkSecurityCode($securityCode, Flux::config('EnableReCaptcha'))) {\n\t\t\tthrow new Flux_LoginError('Invalid security code', Flux_LoginError::INVALID_SECURITY_CODE);\n\t\t}\n\t\t\n\t\tif (!$loginAthenaGroup->isAuth($username, $password)) {\n\t\t\tthrow new Flux_LoginError('Invalid login', Flux_LoginError::INVALID_LOGIN);\n\t\t}\n\t\t\n\t\t$creditsTable  = Flux::config('FluxTables.CreditsTable');\n\t\t$creditColumns = 'credits.balance, credits.last_donation_date, credits.last_donation_amount';\n\t\t\n\t\t$sql  = \"SELECT login.*, {$creditColumns} FROM {$loginAthenaGroup->loginDatabase}.login \";\n\t\t$sql .= \"LEFT OUTER JOIN {$loginAthenaGroup->loginDatabase}.{$creditsTable} AS credits ON login.account_id = credits.account_id \";\n\t\t$sql .= \"WHERE login.sex != 'S' AND login.group_id >= 0 AND login.userid = ? LIMIT 1\";\n\t\t$smt  = $loginAthenaGroup->connection->getStatement($sql);\n\t\t$res  = $smt->execute(array($username));\n\t\t\n\t\tif ($res && ($row = $smt->fetch())) {\n\t\t\tif ($row->unban_time > 0) {\n\t\t\t\tif (time() >= $row->unban_time) {\n\t\t\t\t\t$row->unban_time = 0;\n\t\t\t\t\t$sql = \"UPDATE {$loginAthenaGroup->loginDatabase}.login SET unban_time = 0 WHERE account_id = ?\";\n\t\t\t\t\t$sth = $loginAthenaGroup->connection->getStatement($sql);\n\t\t\t\t\t$sth->execute(array($row->account_id));\n\t\t\t\t}\n\t\t\t\telseif (!Flux::config('AllowTempBanLogin')) {\n\t\t\t\t\tthrow new Flux_LoginError('Temporarily banned', Flux_LoginError::BANNED);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($row->state == 5) {\n\t\t\t\t$createTable = Flux::config('FluxTables.AccountCreateTable');\n\t\t\t\t$sql  = \"SELECT id FROM {$loginAthenaGroup->loginDatabase}.$createTable \";\n\t\t\t\t$sql .= \"WHERE account_id = ? AND confirmed = 0\";\n\t\t\t\t$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\t\t\t\t$sth->execute(array($row->account_id));\n\t\t\t\t$row2 = $sth->fetch();\n\t\t\t\t\n\t\t\t\tif ($row2 && $row2->id) {\n\t\t\t\t\tthrow new Flux_LoginError('Pending confirmation', Flux_LoginError::PENDING_CONFIRMATION);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!Flux::config('AllowPermBanLogin') && $row->state == 5) {\n\t\t\t\tthrow new Flux_LoginError('Permanently banned', Flux_LoginError::PERMABANNED);\n\t\t\t}\n\t\t\t\n\t\t\t$this->setServerNameData($server);\n\t\t\t$this->setUsernameData($username);\n\t\t\t$this->initialize(false);\n\t\t}\n\t\telse {\n\t\t\t$message  = \"Unexpected error during login.\\n\";\n\t\t\t$message .= 'PDO error info, if any: '.print_r($smt->errorInfo(), true);\n\t\t\tthrow new Flux_LoginError($message, Flux_LoginError::UNEXPECTED);\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\t/**\n\t * Get account object for a particular user name.\n\t *\n\t * @param Flux_LoginAthenaGroup $loginAthenaGroup\n\t * @param string $username\n\t * @return mixed\n\t * @access private\n\t */\n\tprivate function getAccount(Flux_LoginAthenaGroup $loginAthenaGroup, $username)\n\t{\n\t\t$creditsTable  = Flux::config('FluxTables.CreditsTable');\n\t\t$creditColumns = 'credits.balance, credits.last_donation_date, credits.last_donation_amount';\n\t\t\n\t\t$sql  = \"SELECT login.*, {$creditColumns} FROM {$loginAthenaGroup->loginDatabase}.login \";\n\t\t$sql .= \"LEFT OUTER JOIN {$loginAthenaGroup->loginDatabase}.{$creditsTable} AS credits ON login.account_id = credits.account_id \";\n\t\t$sql .= \"WHERE login.sex != 'S' AND login.group_id >= 0 AND login.userid = ? LIMIT 1\";\n\t\t$smt  = $loginAthenaGroup->connection->getStatement($sql);\n\t\t$res  = $smt->execute(array($username));\n\t\t\n\t\tif ($res && ($row = $smt->fetch())) {\n\t\t\treturn $row;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Get available server names.\n\t *\n\t * @access public\n\t */\n\tpublic function getAthenaServerNames()\n\t{\n\t\tif ($this->loginAthenaGroup) {\n\t\t\t$names = array();\n\t\t\tforeach ($this->loginAthenaGroup->athenaServers as $server) {\n\t\t\t\t$names[] = $server->serverName;\n\t\t\t}\n\t\t\treturn $names;\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t}\n\t}\n\t\n\t/**\n\t * Get a Flux_Athena instance by its name based on current server settings.\n\t * \n\t * @param string $name\n\t * @access public\n\t */\n\tpublic function getAthenaServer($name = null)\n\t{\n\t\tif (is_null($name) && $this->athenaServerName) {\n\t\t\treturn $this->getAthenaServer($this->athenaServerName);\n\t\t}\n\t\t\n\t\tif ($this->loginAthenaGroup && ($server = Flux::getAthenaServerByName($this->serverName, $name))) {\n\t\t\treturn $server;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Get flash message.\n\t *\n\t * @return string\n\t * @access public\n\t */\n\tpublic function getMessage()\n\t{\n\t\t$message = $this->message;\n\t\t$this->setMessageData(null);\n\t\treturn $message;\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/Template.php",
    "content": "<?php\nrequire_once 'Flux/Paginator.php';\n\n/**\n * The template is mostly responsible for the presentation logic of things, but\n * currently it also carries the task of executing the action files, which are\n * responsible for the business logic of the application. Maybe this will\n * change in the future, but I'm not sure yet. As long as the developers are\n * forced to adhere to the separation of business logic and presentation logic\n * then I don't think I'll be motivated enough to change this part.\n *\n * Views are rendered within the scope of the template instance, thus $this can\n * be used to access the template instance's methods, and is also how helpers\n * are currently implemented.\n */\nclass Flux_Template {\n\t/**\n\t * Default data which gets exposed as globals to the templates, and may be\n\t * set with the setDefaultData() method.\n\t *\n\t * @access private\n\t * @var array\n\t */\n\tprivate $defaultData = array();\n\t\n\t/**\n\t * Request parameters.\n\t *\n\t * @access protected\n\t * @var Flux_Config\n\t */\n\tprotected $params;\n\t\n\t/**\n\t * Base URI of the entire application.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $basePath;\n\t\n\t/**\n\t * Module path.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $modulePath;\n\t\n\t/**\n\t * Module name.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $moduleName;\n\t\n\t/**\n\t * Theme path.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $themePath;\n\t\n\t/**\n\t * Theme name.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $themeName;\n\t\n\t/**\n\t * Action name. Actions exist as modulePath/moduleName/actionName.php.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $actionName;\n\t\n\t/**\n\t * Action path, would be the path format documented in $actionName.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $actionPath;\n\t\n\t/**\n\t * View name, this is usually the same as the actionName.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $viewName;\n\t\n\t/**\n\t * View path, follows a similar (or rather, exact) format like actionPath,\n\t * except there would be a themePath and viewName instead.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $viewPath;\n\t\n\t/**\n\t * Header name. The header file would exist under the themePath's top level\n\t * and the headerName would simply be the file's basename without the .php\n\t * extension. This name is usually 'header'.\n\t *\n\t * @access protected\n\t * @var string\n\t */\t\n\tprotected $headerName;\n\t\n\t/**\n\t * The actual path to the header file.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $headerPath;\n\t\n\t/**\n\t * The footer name.\n\t * Similar to headerName. This name is usually 'footer'.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $footerName;\n\t\n\t/**\n\t * The actual path to the footer file.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $footerPath;\n\t\n\t/**\n\t * Whether or not to use mod_rewrite-powered clean URLs or just plain old\n\t * query strings.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $useCleanUrls;\n\t\n\t/**\n\t * URL of the current module/action being viewed.\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $url;\n\t\n\t/**\n\t * URL of the current module/action being viewed. (including query string)\n\t *\n\t * @access protected\n\t * @var string\n\t */\n\tprotected $urlWithQs;\n\tprotected $urlWithQS; // compatibility.\n\t\n\t/**\n\t * Module/action for missing action's event.\n\t *\n\t * @access protected\n\t * @var array\n\t */\n\tprotected $missingActionModuleAction;\n\t\n\t/**\n\t * Module/action for missing view's event.\n\t *\n\t * @access protected\n\t * @var array\n\t */\n\tprotected $missingViewModuleAction;\n\t\n\t/**\n\t * Inherit view / controllers from another theme ?\n\t *\n\t * @access public\n\t * @var Flux_Template\n\t */\n\tpublic $parentTemplate;\n\t\n\t/**\n\t * List of themes loaded, use for avoid circular dependencies\n\t *\n\t * @access public\n\t * @var array\n\t */\n\tstatic public $themeLoaded = array();\n\t\n\t/**\n\t * HTTP referer.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $referer;\n\t\n\t/**\n\t * Construct new template onbject.\n\t *\n\t * @param Flux_Config $config\n\t * @access public\n\t */\n\tpublic function __construct(Flux_Config $config)\n\t{\n\t\t$this->params                    = $config->get('params');\n\t\t$this->basePath                  = $config->get('basePath');\n\t\t$this->modulePath                = $config->get('modulePath');\n\t\t$this->moduleName                = $config->get('moduleName');\n\t\t$this->themePath                 = $config->get('themePath');\n\t\t$this->themeName                 = $config->get('themeName');\n\t\t$this->actionName                = $config->get('actionName');\n\t\t$this->viewName                  = $config->get('viewName');\n\t\t$this->headerName                = $config->get('headerName');\n\t\t$this->footerName                = $config->get('footerName');\n\t\t$this->useCleanUrls              = $config->get('useCleanUrls');\n\t\t$this->missingActionModuleAction = $config->get('missingActionModuleAction', false);\n\t\t$this->missingViewModuleAction   = $config->get('missingViewModuleAction', false);\n\t\t$this->referer                   = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';\n\n\t\t// Read manifest file if exists\n\t\tif (file_exists($this->themePath.'/'.$this->themeName.'/manifest.php')) {\n\t\t\t$manifest = include($this->themePath.'/'.$this->themeName.'/manifest.php');\n\n\t\t\t// Inherit views and controllers from another template\n\t\t\tif (!empty($manifest['inherit'])) {\n\n\t\t\t\tif (in_array($manifest['inherit'], self::$themeLoaded)) {\n\t\t\t\t\tthrow new Flux_Error('Circular dependencies in themes : ' . implode(' -> ', self::$themeLoaded) . ' -> ' .  $manifest['inherit']);\n\t\t\t\t}\n\n\t\t\t\t$config->set('themeName', $manifest['inherit']);\n\t\t\t\tself::$themeLoaded[]    = $manifest['inherit'];\n\t\t\t\t$this->parentTemplate   = new Flux_Template($config);\n\t\t\t}\n\t\t}\n\n\t}\n\n\t/**\n\t * Any data that gets set here will be available to all templates as global\n\t * variables unless they are overridden by variables of the same name set\n\t * in the render() method.\n\t *\n\t * @return array\n\t * @access public\n\t */\n\tpublic function setDefaultData(array &$data)\n\t{\n\t\t$this->defaultData = $data;\n\t\treturn $data;\n\t}\n\n\t/**\n\t * Render a template, but before doing so, call the action file and render\n\t * the header->view->footer in that order.\n\t *\n\t * @param array $dataArr Key=>value pairs of variables to be exposed to the template as globals.\n\t * @access public\n\t */\n\tpublic function render(array $dataArr = array())\n\t{\n\t\t// GZip compression.\n\t\tif (Flux::config('GzipCompressOutput')) {\n\t\t\theader('Accept-Encoding: gzip');\n\t\t\tini_set('zlib.output_handler', '');\n\t\t\tini_set('zlib.output_compression', 'On');\n\t\t\tini_set('zlib.output_compression_level', (int)Flux::config('GzipCompressionLevel'));\n\t\t}\n\t\t\n\t\t$addon = false;\n\t\t$this->actionPath = sprintf('%s/%s/%s.php', $this->modulePath, $this->moduleName, $this->actionName);\n\t\t\n\t\tif (!file_exists($this->actionPath)) {\n\t\t\tforeach (Flux::$addons as $_tmpAddon) {\n\t\t\t\tif ($_tmpAddon->respondsTo($this->moduleName, $this->actionName)) {\n\t\t\t\t\t$addon = $_tmpAddon;\n\t\t\t\t\t$this->actionPath = sprintf('%s/%s/%s.php', $addon->moduleDir, $this->moduleName, $this->actionName);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (!$addon) {\n\t\t\t\t$this->moduleName = $this->missingActionModuleAction[0];\n\t\t\t\t$this->actionName = $this->missingActionModuleAction[1];\n\t\t\t\t$this->viewName   = $this->missingActionModuleAction[1];\n\t\t\t\t$this->actionPath = sprintf('%s/%s/%s.php', $this->modulePath, $this->moduleName, $this->actionName);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->viewPath = $this->themePath(sprintf('%s/%s.php', $this->moduleName, $this->actionName), true);\n\t\t\n\t\tif (!file_exists($this->viewPath) && $addon) {\n\t\t\t$this->viewPath = $addon->getView( $this, $this->moduleName, $this->actionName);\n\t\t\t\n\t\t\tif ( $this->viewPath === false ) {\n\t\t\t\t$this->moduleName = $this->missingViewModuleAction[0];\n\t\t\t\t$this->actionName = $this->missingViewModuleAction[1];\n\t\t\t\t$this->viewName   = $this->missingViewModuleAction[1];\n\t\t\t\t$this->actionPath = sprintf('%s/%s/%s.php', $this->modulePath, $this->moduleName, $this->actionName);\n\t\t\t\t$this->viewPath   = $this->themePath(sprintf('%s/%s.php', $this->moduleName, $this->viewName), true);\n\t\t\t}\n\t\t}\n\n\t\t$this->headerPath = $this->themePath($this->headerName.'.php', true);\n\t\t$this->footerPath = $this->themePath($this->footerName.'.php', true);\n\t\t$this->url        = $this->url($this->moduleName, $this->actionName);\n\t\t$this->urlWithQS  = $this->url;\n\t\t\n\t\tif (!empty($_SERVER['QUERY_STRING'])) {\n\t\t\tif ($this->useCleanUrls) {\n\t\t\t\t$this->urlWithQS .= \"?{$_SERVER['QUERY_STRING']}\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tforeach (explode('&', trim($_SERVER['QUERY_STRING'], '&')) as $line) {\n\t\t\t\t\tlist ($key,$val) = explode('=', $line, 2);\n\t\t\t\t\t$key = urldecode($key);\n\t\t\t\t\t$val = urldecode($val);\n\t\t\t\t\t\n\t\t\t\t\tif ($key != 'module' && $key != 'action') {\n\t\t\t\t\t\t$this->urlWithQS .= sprintf('&%s=%s', urlencode($key), urlencode($val));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Compatibility.\n\t\t$this->urlWithQs  = $this->urlWithQS;\n\t\t\n\t\t// Tidy up!\n\t\tif (Flux::config('OutputCleanHTML')) {\n\t\t\t$dispatcher = Flux_Dispatcher::getInstance();\n\t\t\t$tidyIgnore = false;\n\t\t\tif (($tidyIgnores = Flux::config('TidyIgnore')) instanceOf Flux_Config) {\n\t\t\t\tforeach ($tidyIgnores->getChildrenConfigs() as $ignore) {\n\t\t\t\t\t$ignore = $ignore->toArray();\n\t\t\t\t\tif (is_array($ignore) && array_key_exists('module', $ignore)) {\n\t\t\t\t\t\t$module = $ignore['module'];\n\t\t\t\t\t\t$action = array_key_exists('action', $ignore) ? $ignore['action'] : $dispatcher->defaultAction;\n\t\t\t\t\t\tif ($this->moduleName == $module && $this->actionName == $action) {\n\t\t\t\t\t\t\t$tidyIgnore = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!$tidyIgnore) {\n\t\t\t\tob_start();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Merge with default data.\n\t\t$data = array_merge($this->defaultData, $dataArr);\n\t\t\n\t\t// Extract data array and make them appear as though they were global\n\t\t// variables from the template.\n\t\textract($data, EXTR_REFS);\n\t\t\n\t\t// Files object.\n\t\t$files = new Flux_Config($_FILES);\n\t\t\n\t\t$preprocessorPath = sprintf('%s/main/preprocess.php', $this->modulePath);\n\t\tif (file_exists($preprocessorPath)) {\n\t\t\tinclude $preprocessorPath;\n\t\t}\n\t\t\n\t\tinclude $this->actionPath;\n\t\t\n\t\t$pageMenuFile   = FLUX_ROOT.\"/modules/{$this->moduleName}/pagemenu/{$this->actionName}.php\";\n\t\t$pageMenuItems  = array();\n\t\t\n\t\t// Get the main menu file first (located in the actual module).\n\t\tif (file_exists($pageMenuFile)) {\n\t\t\tob_start();\n\t\t\t$pageMenuItems = include $pageMenuFile;\n\t\t\tob_end_clean();\n\t\t}\n\t\t\n\t\t$addonPageMenuFiles = glob(FLUX_ADDON_DIR.\"/*/modules/{$this->moduleName}/pagemenu/{$this->actionName}.php\");\n\t\tif ($addonPageMenuFiles) {\n\t\t\tforeach ($addonPageMenuFiles as $addonPageMenuFile) {\n\t\t\t\tob_start();\n\t\t\t\t$pageMenuItems = array_merge($pageMenuItems, include $addonPageMenuFile);\n\t\t\t\tob_end_clean();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (file_exists($this->headerPath)) {\n\t\t\tinclude $this->headerPath;\n\t\t}\n\t\n\t\tinclude $this->viewPath;\n\t\n\t\tif (file_exists($this->footerPath)) {\n\t\t\tinclude $this->footerPath;\n\t\t}\n\t\t\n\t\t// Really, tidy up!\n\t\tif (Flux::config('OutputCleanHTML') && !$tidyIgnore && function_exists('tidy_repair_string')) {\n\t\t\t$content = ob_get_clean();\n\t\t\t$content = tidy_repair_string($content, array('indent' => true, 'wrap' => false, 'output-xhtml' => true), 'utf8');\n\t\t\techo $content;\n\t\t}\n\t}\n\t\n\t/**\n\t * Returns an array of menu items that should be diplayed from the theme.\n\t * Only menu items the current user (and their group level) have access to\n\t * will be returned as part of the array;\n\t *\n\t * @return array\n\t */\n\tpublic function getMenuItems($adminMenus = false)\n\t{\n\t\t$auth              = Flux_Authorization::getInstance();\n\t\t$adminMenuLevel    = Flux::config('AdminMenuGroupLevel');\n\t\t$defaultAction     = Flux_Dispatcher::getInstance()->defaultAction;\n\t\t$menuItems         = Flux::config('MenuItems');\n\t\t$allowedItems      = array();\n\t\t\n\t\tif (!($menuItems instanceOf Flux_Config)) {\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\tforeach ($menuItems->toArray() as $categoryName => $menu) {\n\t\t\tforeach ($menu as $menuName => $menuItem) {\n\t\t\t\t$module = array_key_exists('module', $menuItem) ? $menuItem['module'] : false;\n\t\t\t\t$action = array_key_exists('action', $menuItem) ? $menuItem['action'] : $defaultAction;\n\t\t\t\t$param = array_key_exists('param', $menuItem) ? $menuItem['param'] : array();\n\t\t\t\t$exturl = array_key_exists('exturl', $menuItem) ? $menuItem['exturl'] : null;\n\n\t\t\t\tif ($adminMenus) {\n\t\t\t\t\tif ($auth->actionAllowed($module, $action) && $auth->config(\"modules.$module.$action\") >= $adminMenuLevel) {\n\t\t\t\t\t\t$allowedItems[] = array(\n\t\t\t\t\t\t\t'name'   => $menuName,\n\t\t\t\t\t\t\t'exturl' => null,\n\t\t\t\t\t\t\t'module' => $module,\n\t\t\t\t\t\t\t'action' => $action,\n\t\t\t\t\t\t\t'url'    => $this->url($module, $action, $param)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (empty($allowedItems[$categoryName])) {\n\t\t\t\t\t\t$allowedItems[$categoryName] = array();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($exturl) {\n\t\t\t\t\t\t$allowedItems[$categoryName][] = array(\n\t\t\t\t\t\t\t'name'   => $menuName,\n\t\t\t\t\t\t\t'exturl' => $exturl,\n\t\t\t\t\t\t\t'module' => null,\n\t\t\t\t\t\t\t'action' => null,\n\t\t\t\t\t\t\t'url'    => $exturl\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telseif ($auth->actionAllowed($module, $action) && $auth->config(\"modules.$module.$action\") < $adminMenuLevel) {\n\t\t\t\t\t\t$allowedItems[$categoryName][] = array(\n\t\t\t\t\t\t\t'name'   => $menuName,\n\t\t\t\t\t\t\t'exturl' => null,\n\t\t\t\t\t\t\t'module' => $module,\n\t\t\t\t\t\t\t'action' => $action,\n\t\t\t\t\t\t\t'url'    => $this->url($module, $action, $param)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $allowedItems;\n\t}\n\t\n\t/**\n\t * @see Flux_Template::getMenuItems()\n\t */\n\tpublic function getAdminMenuItems()\n\t{\n\t\treturn $this->getMenuItems(true);\n\t}\n\t\n\t/**\n\t * Get sub-menu items for a particular module.\n\t *\n\t * @param string $moduleName\n\t * @return array\n\t */\n\tpublic function getSubMenuItems($moduleName = null)\n\t{\n\t\t$auth         = Flux_Authorization::getInstance();\n\t\t$moduleName   = $moduleName ? $moduleName : $this->moduleName;\n\t\t$subMenuItems = Flux::config('SubMenuItems');\n\t\t$allowedItems = array();\n\t\t\n\t\tif (!($subMenuItems instanceOf Flux_Config) || !( ($menus = $subMenuItems->get($moduleName)) instanceOf Flux_Config )) {\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\tforeach ($menus->toArray() as $actionName => $menuName) {\n\t\t\tif ($auth->actionAllowed($moduleName, $actionName)) {\n\t\t\t\t$allowedItems[] = array('name' => $menuName, 'module' => $moduleName, 'action' => $actionName);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $allowedItems;\n\t}\n\t\n\t/**\n\t * Get an array of login server names.\n\t *\n\t * @return array\n\t */\n\tpublic function getServerNames()\n\t{\n\t\treturn array_keys(Flux::$loginAthenaGroupRegistry);\n\t}\n\t\n\t/**\n\t * Determine if more than 1 server exists.\n\t *\n\t * @return bool\n\t */\n\tpublic function hasManyServers()\n\t{\n\t\treturn count(Flux::$loginAthenaGroupRegistry) > 1;\n\t}\n\t\n\t/**\n\t * Obtain the absolute web path of the specified user path. Specify the\n\t * path as a relative path.\n\t *\n\t * @param string $path Relative path from basePath.\n\t * @param boolean $included\n\t * @access public\n\t */\n\tpublic function path($path, $included = false)\n\t{\n\t\tif (is_array($path)) {\n\t\t\t$path = implode('/', $path);\n\t\t}\n\n\t\tif ($included === false) {\n\t\t\t$path = \"{$this->basePath}/$path\";\n\t\t}\n\n\t\treturn preg_replace('&/{2,}&', '/', $path);\n\t}\n\n\t/**\n\t * Similar to the path() method, but uses the $themePath as the path from\n\t * which the user-specified path is relative.\n\t *\n\t * @param string $path Relative path from themePath.\n\t * @access public\n\t */\n\tpublic function themePath($path, $included = false)\n\t{\n\t\tif (is_array($path)) {\n\t\t\t$path = implode('/', $path);\n\t\t}\n\n\t\t// Remove frag for file checking.\n\t\t$frag = \"\";\n\t\tpreg_match(\"/(\\?|\\#).*/\", $path, $matches);\n\t\tif (count($matches)) {\n\t\t\t$frag = $matches[0];\n\t\t\t$path = substr($path, 0, -strlen($frag));\n\t\t}\n\n\t\t$uri  = $this->path(\"{$this->themePath}/{$this->themeName}/{$path}\", $included);\n\n\t\t// normalized basePath.\n\t\t$base = preg_replace('/(\\/+)$/', '', $this->basePath ) . '/'; \n\t\t$base = preg_quote( $base, '/' );\n\t\t$chk  = FLUX_ROOT .'/'. preg_replace('/^('.$base.')/', '', $uri );\n\n\t\t// If file not found, search in parent's template.\n\t\tif (!file_exists($chk) && !empty($this->parentTemplate)) {\n\t\t\t$path = $this->parentTemplate->themePath($path, $included);\n\t\t\t$chk  = FLUX_ROOT .'/'. preg_replace('/^('.$base.')/', '', $path );\n\n\t\t\tif (file_exists($chk)) {\n\t\t\t\t$uri = $path;\n\t\t\t}\n\t\t} elseif (!file_exists($chk))  {\n\t\t\tforeach (Flux::$addons as $_tmpAddon_key => $_tmpAddon) {\n\t\t\t\t$chk  = FLUX_ROOT .'/'. FLUX_ADDON_DIR .'/'. $_tmpAddon_key .'/'. preg_replace('/^('.$base.')/', '', $uri );\n\t\t\t\tif (file_exists($chk)) {\n\t\t\t\t\t$path = sprintf('%s/%s/%s', FLUX_ADDON_DIR, $_tmpAddon_key, preg_replace('/^('.$base.')/', '', $uri ));\n\t\t\t\t\t$uri = $path;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $uri . $frag;\n\t}\n\t\n\t/**\n\t * Create a URI based on the setting of $useCleanUrls. This will determine\n\t * whether or not we will create a mod_rewrite-based clean URL or just a\n\t * regular query string based one.\n\t *\n\t * @param string $moduleName\n\t * @param string $actionName\n\t * @access public\n\t */\n\tpublic function url($moduleName, $actionName = null, $params = array())\n\t{\n\t\t$defaultAction  = Flux_Dispatcher::getInstance()->defaultAction;\n\t\t$serverProtocol = '';\n\t\t$serverAddress  = '';\n\t\t\n\t\tif ($params instanceOf Flux_Config) {\n\t\t\t$params = $params->toArray();\n\t\t}\n\t\t\n\t\tif (array_key_exists('_host', $params)) {\n\t\t\t$_host  = $params['_host'];\n\t\t\t$_https = false;\n\t\t\t\n\t\t\tif ($_host && ($addr=Flux::config('ServerAddress'))) {\n\t\t\t\tif (array_key_exists('_https', $params)) {\n\t\t\t\t\t$_https = $params['_https'];\n\t\t\t\t}\n\t\t\t\telseif (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== \"off\") {\n\t\t\t\t\t$_https = true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$_https = false;\n\t\t\t\t}\n\n\t\t\t\t$serverProtocol = $_https ? 'https://' : 'http://';\n\t\t\t\t$serverAddress  = $addr;\n\t\t\t}\n\t\t\t\n\t\t\tunset($params['_host']);\n\t\t\t\n\t\t\tif (array_key_exists('_https', $params)) {\n\t\t\t\tunset($params['_https']);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$queryString = '';\n\t\t\n\t\tif (count($params)) {\n\t\t\t$queryString .= Flux::config('UseCleanUrls') ? '?' : '&';\n\t\t\tforeach ($params as $param => $value) {\n\t\t\t\t$queryString .= sprintf('%s=%s&', $param, urlencode($value ?: ''));\n\t\t\t}\n\t\t\t$queryString = rtrim($queryString, '&');\n\t\t}\n\t\t\n\t\tif ($this->useCleanUrls) {\n\t\t\tif ($actionName && $actionName != $defaultAction) {\n\t\t\t\t$url = sprintf('%s/%s/%s/%s', $this->basePath, $moduleName, $actionName, $queryString);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$url = sprintf('%s/%s/%s', $this->basePath, $moduleName, $queryString);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ($actionName && $actionName != $defaultAction) {\n\t\t\t\t$url = sprintf('%s/?module=%s&action=%s%s', $this->basePath, $moduleName, $actionName, $queryString);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$url = sprintf('%s/?module=%s%s', $this->basePath, $moduleName, $queryString);\n\t\t\t}\n\t\t}\n\t\treturn $serverProtocol.preg_replace('&/{2,}&', '/', \"$serverAddress/$url\");\n\t}\n\t\n\t/**\n\t * Format currency strings.\n\t *\n\t * @param float $number Amount\n\t * @return string Formatted amount\n\t */\n\tpublic function formatCurrency($number)\n\t{\n\t\t$number = (float)$number;\n\t\t$amount = number_format(\n\t\t\t$number,\n\t\t\tFlux::config('MoneyDecimalPlaces'),\n\t\t\tFlux::config('MoneyDecimalSymbol'),\n\t\t\tFlux::config('MoneyThousandsSymbol')\n\t\t);\n\t\treturn $amount;\n\t}\n\t\n\t/**\n\t * Format a MySQL DATE column according to the DateFormat config.\n\t *\n\t * @param string $data\n\t * @return string\n\t * @access public\n\t */\n\tpublic function formatDate($date = null)\n\t{\n\t\t$ts = $date ? strtotime($date) : time();\n\t\treturn date(Flux::config('DateFormat'), $ts);\n\t}\n\t\n\t/**\n\t * Format a MySQL DATETIME column according to the DateTimeFormat config.\n\t *\n\t * @param string $dataTime\n\t * @return string\n\t * @access public\n\t */\n\tpublic function formatDateTime($dateTime = null)\n\t{\n\t\t$ts = $dateTime ? strtotime($dateTime) : time();\n\t\treturn date(Flux::config('DateTimeFormat'), $ts);\n\t}\n\t\n\t/**\n\t * Create a series of select fields matching a MySQL DATE format.\n\t *\n\t * @param string $name\n\t * @param string $value DATE formatted string.\n\t * @param int $fowardYears\n\t * @param int $backwardYears\n\t * @return string\n\t */\n\tpublic function dateField($name, $value = null, $fowardYears = null, $backwardYears = null)\n\t{\n\t\tif(!isset($fowardYears)) {\n\t\t\t$fowardYears = (int)Flux::config('ForwardYears');\n\t\t}\n\t\tif(!isset($backwardYears)) {\n\t\t\t$backwardYears = (int)Flux::config('BackwardYears');\n\t\t}\n\t\t\n\t\t$ts    = $value && !preg_match('/^0000-00-00(?: 00:00:00)?$/', $value) ? strtotime($value) : time();\n\t\t$year  = ($year =$this->params->get(\"{$name}_year\"))  ? $year  : date('Y', $ts);\n\t\t$month = ($month=$this->params->get(\"{$name}_month\")) ? $month : date('m', $ts);\n\t\t$day   = ($day  =$this->params->get(\"{$name}_day\"))   ? $day   : date('d', $ts);\n\t\t$fw    = $year + $fowardYears;\n\t\t$bw    = $year - $backwardYears;\n\t\t\n\t\t// Get years.\n\t\t$years = sprintf('<select name=\"%s_year\">', $name);\n\t\tfor ($i = $fw; $i >= $bw; --$i) {\n\t\t\tif ($year == $i) {\n\t\t\t\t$years .= sprintf('<option value=\"%04d\" selected=\"selected\">%04d</option>', $i, $i);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$years .= sprintf('<option value=\"%04d\">%04d</option>', $i, $i);\n\t\t\t}\n\t\t}\n\t\t$years .= '</select>';\n\t\t\n\t\t// Get months.\n\t\t$months = sprintf('<select name=\"%s_month\">', $name);\n\t\tfor ($i = 1; $i <= 12; ++$i) {\n\t\t\tif ($month == $i) {\n\t\t\t\t$months .= sprintf('<option value=\"%02d\" selected=\"selected\">%02d</option>', $i, $i);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$months .= sprintf('<option value=\"%02d\">%02d</option>', $i, $i);\n\t\t\t}\n\t\t}\n\t\t$months .= '</select>';\n\t\t\n\t\t// Get days.\n\t\t$days = sprintf('<select name=\"%s_day\">', $name);\n\t\tfor ($i = 1; $i <= 31; ++$i) {\n\t\t\tif ($day == $i) {\n\t\t\t\t$days .= sprintf('<option value=\"%02d\" selected=\"selected\">%02d</option>', $i, $i);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$days .= sprintf('<option value=\"%02d\">%02d</option>', $i, $i);\n\t\t\t}\n\t\t}\n\t\t$days .= '</select>';\n\t\t\n\t\treturn sprintf('<span class=\"date-field\">%s-%s-%s</span>', $years, $months, $days);\n\t}\n\t\n\t/**\n\t * Create a series of select fields matching a MySQL DATETIME format.\n\t *\n\t * @param string $name\n\t * @param string $value DATETIME formatted string.\n\t * @return string\n\t */\n\tpublic function dateTimeField($name, $value = null)\n\t{\n\t\t$dateField = $this->dateField($name, $value);\n\t\t$ts        = $value ? strtotime($value) : strtotime('00:00:00');\n\t\t$hour      = date('H', $ts);\n\t\t$minute    = date('i', $ts);\n\t\t$second    = date('s', $ts);\n\t\t\n\t\t// Get hours.\n\t\t$hours = sprintf('<select name=\"%s_hour\">', $name);\n\t\tfor ($i = 0; $i <= 23; ++$i) {\n\t\t\tif ($hour == $i) {\n\t\t\t\t$hours .= sprintf('<option value=\"%02d\" selected=\"selected\">%02d</option>', $i, $i);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$hours .= sprintf('<option value=\"%02d\">%02d</option>', $i, $i);\n\t\t\t}\n\t\t}\n\t\t$hours .= '</select>';\n\t\t\n\t\t// Get minutes.\n\t\t$minutes = sprintf('<select name=\"%s_minute\">', $name);\n\t\tfor ($i = 0; $i <= 59; ++$i) {\n\t\t\tif ($minute == $i) {\n\t\t\t\t$minutes .= sprintf('<option value=\"%02d\" selected=\"selected\">%02d</option>', $i, $i);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$minutes .= sprintf('<option value=\"%02d\">%02d</option>', $i, $i);\n\t\t\t}\n\t\t}\n\t\t$minutes .= '</select>';\n\t\t\n\t\t// Get seconds.\n\t\t$seconds = sprintf('<select name=\"%s_second\">', $name);\n\t\tfor ($i = 0; $i <= 59; ++$i) {\n\t\t\tif ($second == $i) {\n\t\t\t\t$seconds .= sprintf('<option value=\"%02d\" selected=\"selected\">%02d</option>', $i, $i);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$seconds .= sprintf('<option value=\"%02d\">%02d</option>', $i, $i);\n\t\t\t}\n\t\t}\n\t\t$seconds .= '</select>';\n\t\t\n\t\treturn sprintf('<span class=\"date-time-field\">%s @ %s:%s:%s</span>', $dateField, $hours, $minutes, $seconds);\n\t}\n\t\n\t/**\n\t * Returns \"up\" or \"down\" in a span HTML element with either the class\n\t * .up or .down, based on the value of $bool. True returns up, false\n\t * returns down.\n\t *\n\t * @param bool $bool True/false value\n\t * @return string Up/down\n\t */\n\tpublic function serverUpDown($bool)\n\t{\n\t\t$class = $bool ? 'up' : 'down';\n\t\treturn sprintf('<span class=\"%s\">%s</span>', $class, $bool ? 'Online' : 'Offline');\n\t}\n\t\n\t/**\n\t * Redirect client to another location. Script execution is terminated\n\t * after instructing the client to redirect.\n\t *\n\t * @param string $location\n\t */\n\tpublic function redirect($location = null)\n\t{\n\t\tif (is_null($location)) {\n\t\t\t$location = $this->basePath;\n\t\t}\n\t\t\n\t\theader(\"Location: $location\");\n\t\texit;\n\t}\n\t\n\t/**\n\t * Guess the HTTP server's current full URL.\n\t *\n\t * @param bool $withRequest True to include REQUEST_URI, false if not.\n\t * @return string URL\n\t */\n\tpublic function entireUrl($withRequest = true)\n\t{\n\t\t$proto    = empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === \"off\" ? 'http://' : 'https://';\n\t\t$hostname = empty($_SERVER['HTTP_HOST']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];\n\t\t$request  = $_SERVER['REQUEST_URI'];\n\t\t\n\t\tif ($withRequest) {\n\t\t\t$url = $proto.$hostname.$request;\n\t\t}\n\t\telse {\n\t\t\t$url = $proto.$hostname.'/'.$this->basePath;\n\t\t}\n\t\t\n\t\t$url = rtrim(preg_replace('&/{2,}&', '/', $url), '/');\n\t\treturn $url;\n\t}\n\t\n\t/**\n\t * Convenience method for retrieving a paginator instance.\n\t *\n\t * @param int $total Total number of records.\n\t * @param array $options Paginator options.\n\t * @return Flux_Paginator\n\t * @access public\n\t */\n\tpublic function getPaginator($total, array $options = array())\n\t{\n\t\t$paginator = new Flux_Paginator($total, $this->url($this->moduleName, $this->actionName, array('_host' => false)), $options);\n\t\treturn $paginator;\n\t}\n\t\n\t/**\n\t * Link to an account view page.\n\t *\n\t * @param int $accountID\n\t * @param string $text\n\t * @return mixed\n\t * @access public\n\t */\n\tpublic function linkToAccount($accountID, $text)\n\t{\n\t\tif ($accountID) {\n\t\t\t$url = $this->url('account', 'view', array('id' => $accountID));\n\t\t\treturn sprintf('<a href=\"%s\" class=\"link-to-account\">%s</a>', $url, htmlspecialchars($text));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Link to an account search.\n\t *\n\t * @param array $params\n\t * @param string $text\n\t * @return mixed\n\t * @access public\n\t */\n\tpublic function linkToAccountSearch($params, $text)\n\t{\n\t\tif (is_array($params) && count($params)) {\n\t\t\t$url = $this->url('account', 'index', $params);\n\t\t\treturn sprintf('<a href=\"%s\" class=\"link-to-account-search\">%s</a>', $url, htmlspecialchars($text));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Link to a character view page.\n\t *\n\t * @param int $charID\n\t * @param string $text\n\t * @return mixed\n\t * @access public\n\t */\n\tpublic function linkToCharacter($charID, $text, $server = null)\n\t{\n\t\tif ($charID) {\n\t\t\t$params = array('id' => $charID);\n\t\t\tif ($server) {\n\t\t\t\t$params['preferred_server'] = $server;\n\t\t\t}\n\t\t\t\n\t\t\t$url = $this->url('character', 'view', $params);\n\t\t\treturn sprintf('<a href=\"%s\" class=\"link-to-character\">%s</a>', $url, htmlspecialchars($text));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Deny entry to a page if called. This method should be used from a module\n\t * script, and no where else.\n\t */\n\tpublic function deny()\n\t{\n\t\t$location = $this->url('unauthorized');\n\t\t$this->redirect($location);\n\t}\n\t\n\t/**\n\t * Get the full gender string from a gender letter (e.g. M for Male).\n\t *\n\t * @param string $gender\n\t * @return string\n\t * @access public\n\t */\n\tpublic function genderText($gender)\n\t{\n\t\tswitch (strtoupper($gender)) {\n\t\t\tcase 'M':\n\t\t\t\treturn Flux::message('GenderTypeMale');\n\t\t\t\tbreak;\n\t\t\tcase 'F':\n\t\t\t\treturn Flux::message('GenderTypeFemale');\n\t\t\t\tbreak;\n\t\t\tcase 'S':\n\t\t\t\treturn Flux::message('GenderTypeServer');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t/**\n\t * Get the account state name corresponding to the state number.\n\t *\n\t * @param int $state\n\t * @return mixed State name or false.\n\t * @access public\n\t */\n\tpublic function accountStateText($state)\n\t{\n\t\t$text  = false;\n\t\t$state = (int)$state;\n\t\t\n\t\tswitch ($state) {\n\t\t\tcase 0:\n\t\t\t\t$text  = Flux::message('AccountStateNormal');\n\t\t\t\t$class = 'state-normal';\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$text  = Flux::message('AccountStatePermBanned');\n\t\t\t\t$class = 'state-permanently-banned';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif ($text) {\n\t\t\t$text = htmlspecialchars($text);\n\t\t\treturn sprintf('<span class=\"account-state %s\">%s<span>', $class, $text);\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t * Get the job class name from a job ID.\n\t *\n\t * @param int $id\n\t * @return mixed Job class or false.\n\t * @access public\n\t */\n\tpublic function jobClassText($id)\n\t{\n\t\treturn Flux::getJobClass($id);\n\t}\n\t\n\t/**\n\t * Return hidden input fields containing module and action names based on\n\t * the setting of UseCleanUrls.\n\t *\n\t * @param string $moduleName\n\t * @param string $actionName\n\t * @return string\n\t * @access public\n\t */\n\tpublic function moduleActionFormInputs($moduleName, $actionName = null)\n\t{\t\n\t\t$inputs = '';\n\t\tif (!Flux::config('UseCleanUrls')) {\n\t\t\tif (!$actionName) {\n\t\t\t\t$dispatcher = Flux_Dispatcher::getInstance();\n\t\t\t\t$actionName = $dispatcher->defaultAction;\n\t\t\t}\n\t\t\t$inputs .= sprintf('<input type=\"hidden\" name=\"module\" value=\"%s\" />', htmlspecialchars($moduleName)).\"\\n\";\n\t\t\t$inputs .= sprintf('<input type=\"hidden\" name=\"action\" value=\"%s\" />', htmlspecialchars($actionName));\n\t\t}\n\t\treturn $inputs;\n\t}\n\t\n\t/**\n\t * Get the homun class name from a class ID.\n\t *\n\t * @param int $id\n\t * @return mixed Job class or false.\n\t * @access public\n\t */\n\tpublic function homunClassText($id)\n\t{\n\t\treturn Flux::getHomunClass($id);\n\t}\n\n\t/**\n\t * Get the item type name from an item type.\n\t *\n\t * @return Item type or false.\n\t * @access public\n\t */\n\tpublic function itemTypeText($id)\n\t{\n\t\treturn Flux::getItemType($id);\n\t}\n\t\n\tpublic function itemSubTypeText($id1, $id2)\n\t{\n\t\tif($id1 == 'Weapon' || $id1 == 'Ammo' || $id1 == 'Card')\n\t\t\treturn Flux::getItemSubType(strtolower($id1), strtolower($id2));\n\t\telse\n\t\t\treturn false;\n\t}\n\t\n\tpublic function itemRandOption($id, $value)\n\t{\n\t\treturn sprintf(Flux::getRandOption($id), $value);\n\t}\n\t\n\t/**\n\t * Get the item information from splitting a delimiter\n\t * Used for renewal ATK and MATK as well as equip_level_min and equip_level_max.\n\t *\n\t * @param PDOStatement $object\n\t * @param string $field\n\t * @param string $delimiter\n\t * @param array $inputs\n\t * @return PDOStatement $object\n\t * @access public\n\t */\n\tpublic function itemFieldExplode($object, $field, $delimiter, $inputs)\n\t{\n\t\t$fields = explode($delimiter, $object->$field);\n\t\tforeach($inputs as $i => $input) {\n\t\t\t$object->$input = isset($fields[$i]) ? $fields[$i] : NULL;\n\t\t}\n\t\treturn $object;\n\t}\n\t\n\t/**\n\t * Get the equip location combination name from an equip location combination.\n\t *\n\t * @param int $id\n\t * @return mixed Equip location combination or false.\n\t * @access public\n\t */\n\tpublic function equipLocationCombinationText($id)\n\t{\n\t\treturn Flux::getEquipLocationCombination($id);\n\t}\n\t\n\t/**\n\t *\n\t *\n\t */\n\tpublic function emblem($guildID, $serverName = null, $athenaServerName = null)\n\t{\n\t\tif (!$serverName) {\n\t\t\t$serverName = Flux::$sessionData->loginAthenaGroup->serverName;\n\t\t}\n\t\t\n\t\tif (!$athenaServerName) {\n\t\t\t$athenaServerName = Flux::$sessionData->getAthenaServer(Flux::$sessionData->athenaServerName);\n\t\t}\n\t\t\n\t\treturn $this->url('guild', 'emblem',\n\t\t\tarray('login' => $serverName, 'charmap' => $athenaServerName, 'id' => $guildID));\n\t}\n\t\n\t/**\n\t * Redirect to login page if the user is not currently logged in.\n\t */\n\tpublic function loginRequired($message = null)\n\t{\n\t\t$dispatcher = Flux_Dispatcher::getInstance();\n\t\t$dispatcher->loginRequired($this->basePath, $message);\n\t}\n\t\n\t/**\n\t * Link to a item view page.\n\t *\n\t * @param int $itemID\n\t * @param string $text\n\t * @return mixed\n\t * @access public\n\t */\n\tpublic function linkToItem($itemID, $text, $server = null)\n\t{\n\t\tif ($itemID) {\n\t\t\t$params = array('id' => $itemID);\n\t\t\tif ($server) {\n\t\t\t\t$params['preferred_server'] = $server;\n\t\t\t}\n\t\t\t\n\t\t\t$url = $this->url('item', 'view', $params);\n\t\t\treturn sprintf('<a href=\"%s\" class=\"link-to-item\">%s</a>', $url, htmlspecialchars($text));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function displayScript($scriptText)\n\t{\n\t\t$lines  = !empty($scriptText) ? preg_split('/\\s+|<|>|\\[|\\]/', $scriptText, -1, PREG_SPLIT_NO_EMPTY) : [];\n\t\t$text   = '';\n\t\t$script = array();\n\t\t\n\t\tforeach ($lines as $num => $line) {\n\t\t\t$text    .= \"$line\\n\";\n\t\t\t$lineNum  = sprintf('<span class=\"script-line-num\">%d</span>', $num + 1);\n\t\t\t$lineCode = sprintf('<span class=\"script-line-code\">%s</span>', htmlspecialchars($line));\n\t\t\t$script[] = sprintf('<p class=\"script-line\">%s %s</p>', $lineNum, $lineCode);\n\t\t}\n\t\t\n\t\treturn trim($text) == '' ? '' : implode(\"\\n\", $script);\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function banTypeText($banType)\n\t{\n\t\t$banType = (int)$banType;\n\t\tif (!$banType) {\n\t\t\treturn Flux::message('BanTypeUnbanned');\n\t\t}\n\t\telseif ($banType === 2) {\n\t\t\treturn Flux::message('BanTypePermBanned');\n\t\t}\n\t\telseif ($banType === 1) {\n\t\t\treturn Flux::message('BanTypeTempBanned');\n\t\t}\n\t\telse {\n\t\t\treturn Flux::message('UnknownLabel');\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function equippableJobs($equipJob)\n\t{\n\t\t$jobs      = array();\n\t\t$equipJobs = Flux::getEquipJobsList();\n\t\t\n\t\tforeach ($equipJob as $name) {\n\t\t\t\t$jobs[] = $equipJobs[$name];\n\t\t\t\tif($name == 'job_all') break;\n\t\t}\n\t\t\n\t\treturn $jobs;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function GetJobsList($isRenewal)\n\t{\n\t\t$jobs = Flux::getEquipJobsList($isRenewal);\n\t\t\t\t\n\t\treturn $jobs;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function GetClassList($isRenewal)\n\t{\n\t\t$jobs = Flux::getEquipUpperList($isRenewal);\n\t\t\t\t\n\t\treturn $jobs;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function tradeRestrictions($list)\n\t{\n\t\t$restrictions = array();\n\t\t$Restrictions = Flux::getTradeRestrictionList();\n\t\t\n\t\tforeach ($list as $name) {\n\t\t\t\t$restrictions[] = $Restrictions[$name];\n\t\t}\n\t\t\n\t\treturn $restrictions;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function itemsFlags($list)\n\t{\n\t\t$flags = array();\n\t\t$Flags = Flux::getItemFlagList();\n\t\t\n\t\tforeach ($list as $name) {\n\t\t\t\t$flags[] = $Flags[$name];\n\t\t}\n\t\t\n\t\treturn $flags;\n\t}\n\n\t/**\n\t * Link to a monster view page.\n\t *\n\t * @param int $monsterID\n\t * @param string $text\n\t * @return mixed\n\t * @access public\n\t */\n\tpublic function linkToMonster($monsterID, $text, $server = null)\n\t{\n\t\tif ($monsterID) {\n\t\t\t$params = array('id' => $monsterID);\n\t\t\tif ($server) {\n\t\t\t\t$params['preferred_server'] = $server;\n\t\t\t}\n\t\t\t\n\t\t\t$url = $this->url('monster', 'view', $params);\n\t\t\treturn sprintf('<a href=\"%s\" class=\"link-to-monster\">%s</a>', $url, htmlspecialchars($text));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function equipLocations($equipLoc)\n\t{\n\t\t$locations = array();\n\t\tasort($equipLoc);\n\t\tif(count($equipLoc) > 1) {\n\t\t\t$equipLocs = Flux::getEquipLocationCombination();\n\t\t\t$equipLoc = array(htmlspecialchars(implode('/', $equipLoc)));\n\t\t} else {\n\t\t\t$equipLocs = Flux::getEquipLocationList();\n\t\t}\n\t\tforeach ($equipLoc as $key => $name) {\n\t\t\t\t$locations[] = $equipLocs[$name];\n\t\t}\n\t\tif(is_array($equipLoc))\n\t\t\treturn htmlspecialchars(implode(' / ', $locations));\n\t\telse\n\t\t\treturn false;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function equipUpper($equipUpper, $isRenewal = 1)\n\t{\n\t\t$upper      = array();\n\t\t$table      = Flux::getEquipUpperList($isRenewal);\n\t\t\n\t\tforeach ($equipUpper as $name) {\n\t\t\t\t$upper[] = $table[$name];\n\t\t\t\tif($name == 'class_all') break;\n\t\t}\n\t\t\n\t\treturn $upper;\n\t}\n\n\t/**\n\t * Link to a guild view page.\n\t *\n\t * @param int $guildID\n\t * @param string $text\n\t * @return mixed\n\t * @access public\n\t */\n\tpublic function linkToGuild($guild_id, $text, $server = null)\n\t{\n\t\tif ($guild_id) {\n\t\t\t$params = array('id' => $guild_id);\n\t\t\tif ($server) {\n\t\t\t\t$params['preferred_server'] = $server;\n\t\t\t}\n\t\t\t\n\t\t\t$url = $this->url('guild', 'view', $params);\n\t\t\treturn sprintf('<a href=\"%s\" class=\"link-to-guild\">%s</a>', $url, htmlspecialchars($text));\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function donateButton($amount)\n\t{\n\t\tob_start();\n\t\tinclude FLUX_DATA_DIR.'/paypal/button.php';\n\t\t$button = ob_get_clean();\n\t\treturn $button;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function shopItemImage($shopItemID, $serverName = null, $athenaServerName = null)\n\t{\n\t\tif (!$serverName) {\n\t\t\t$serverName = Flux::$sessionData->loginAthenaGroup->serverName;\n\t\t}\n\t\t\n\t\tif (!$athenaServerName) {\n\t\t\t$athenaServerName = Flux::$sessionData->getAthenaServer(Flux::$sessionData->athenaServerName);\n\t\t}\n\t\t\n\t\tif (!$serverName || !$athenaServerName) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$dir   = FLUX_DATA_DIR.\"/itemshop/$serverName/$athenaServerName\";\n\t\t$exts  = implode('|', array_map('preg_quote', Flux::config('ShopImageExtensions')->toArray()));\n\t\t$imgs  = glob(\"$dir/$shopItemID.*\");\n\t\t\n\t\tif (is_array($imgs)) {\n\t\t\t$files = preg_grep(\"/\\.($exts)$/\", $imgs);\n\t\t}\n\t\telse {\n\t\t\t$files = array();\n\t\t}\n\t\t\n\t\tif (empty($files)) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treset($files);\n\t\t\t$imageFile = current($files);\n\t\t\treturn preg_replace('&/{2,}&', '/', \"{$this->basePath}/$imageFile\");\n\t\t}\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function iconImage($itemID)\n\t{\n\t\t$path = sprintf(FLUX_DATA_DIR.\"/items/icons/\".Flux::config('ItemIconNameFormat'), $itemID);\n\t\t$link = preg_replace('&/{2,}&', '/', \"{$this->basePath}/$path\");\n\t\t\n\t\tif(Flux::config('DivinePrideIntegration') && !file_exists($path)) {\n\t\t\t$download_link = \"https://static.divine-pride.net/images/items/item/$itemID.png\";\n\t\t\t$data = get_headers($download_link, true);\n\t\t\t$size = isset($data['Content-Length']) ? (int)$data['Content-Length'] : 0;\n\t\t\tif($size != 0)\n\t\t\t\tfile_put_contents(sprintf(FLUX_DATA_DIR.\"/items/icons/\".Flux::config('ItemIconNameFormat'), $itemID), file_get_contents($download_link));\n\t\t}\n        return file_exists($path) ? $link : false;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function itemImage($itemID)\n\t{\n\t\t$path = sprintf(FLUX_DATA_DIR.\"/items/images/\".Flux::config('ItemImageNameFormat'), $itemID);\n\t\t$link = preg_replace('&/{2,}&', '/', \"{$this->basePath}/$path\");\n\t\t\n\t\tif(Flux::config('DivinePrideIntegration') && !file_exists($path)) {\n\t\t\t$download_link = \"https://static.divine-pride.net/images/items/collection/$itemID.png\";\n\t\t\t$data = get_headers($download_link, true);\n\t\t\t$size = isset($data['Content-Length']) ? (int)$data['Content-Length'] : 0;\n\t\t\tif($size != 0)\n\t\t\t\tfile_put_contents(sprintf(FLUX_DATA_DIR.\"/items/images/\".Flux::config('ItemImageNameFormat'), $itemID), file_get_contents($download_link));\n\t\t}\n        return file_exists($path) ? $link : false;\n\t}\n\n \t/**\n \t *\n \t */\n\tpublic function monsterImage($monsterID)\n\t{\n\t\t$path = sprintf(FLUX_DATA_DIR.\"/monsters/\".Flux::config('MonsterImageNameFormat'), $monsterID);\n\t\t$link = preg_replace('&/{2,}&', '/', \"{$this->basePath}/$path\");\n\t\t\n\t\tif(Flux::config('DivinePrideIntegration') && !file_exists($path)) {\n\t\t\t$download_link = \"https://static.divine-pride.net/images/mobs/png/$monsterID.png\";\n\t\t\t$data = get_headers($download_link, true);\n\t\t\t$size = isset($data['Content-Length']) ? (int)$data['Content-Length'] : 0;\n\t\t\tif($size != 0)\n\t\t\t\tfile_put_contents(sprintf(FLUX_DATA_DIR.\"/monsters/\".Flux::config('MonsterImageNameFormat'), $monsterID), file_get_contents($download_link));\n\t\t}\n        return file_exists($path) ? $link : false;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function jobImage($gender, $jobID)\n\t{\n\t\t$path = sprintf(FLUX_DATA_DIR.\"/jobs/images/%s/\".Flux::config('JobImageNameFormat'), $gender, $jobID);\n\t\t$link = preg_replace('&/{2,}&', '/', \"{$this->basePath}/$path\");\n\t\treturn file_exists($path) ? $link : false;\n\t}\n\t\n\t/**\n\t *\n\t */\n\tpublic function monsterMode($modes, $ai)\n\t{\n\t\t$monsterModes\t= Flux::config('MonsterModes')->toArray();\n\t\t$monsterAI\t\t= Flux::config('MonsterAI')->toArray();\n\t\t$array = array();\n\t\tif($ai)\n\t\t\tforeach ($monsterAI[$ai] as $mode) {\n\t\t\t\tif(isset($monsterModes[$mode]))\n\t\t\t\t\t$array[] = $monsterModes[$mode];\n\t\t\t}\n\t\tif($modes)\n\t\t\tforeach ($modes as $mode) {\n\t\t\t\tif(isset($monsterModes[$mode]))\n\t\t\t\t\t$array[] = $monsterModes[$mode];\n\t\t\t}\n\t\treturn array_unique($array);\n \t}\n\n\t/**\n\t * Return the template name (\"default\")\n\t * @access public\n\t */\n\tpublic function getName()\n\t{\n\t\treturn $this->themeName;\n\t}\n\n\t/**\n\t * Caps values to min/max\n\t * @access public\n\t */\n\tpublic function cap_value($amount, $min, $max)\n\t{\n\t\treturn ($amount >= $max) ? $max : (($amount <= $min) ? $min : $amount);\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/TemporaryTable.php",
    "content": "<?php\nrequire_once 'Flux/Error.php';\n\n/**\n * This library provides a means of creating a temporary table in MySQL and\n * populating it with the rows from various other tables.\n *\n * This is particularly useful when you need to merge the data in a\n * destructive manner allowing you to view a result set that has been\n * overridden by following tables.\n *\n * Use-case in Flux would be combining item_db/item_db_re/item_db2, mob_db/mob_db2, \n * and mob_skill_db/mob_skill_db2.\n */\nclass Flux_TemporaryTable {\n\t/**\n\t * Connection object used to create table.\n\t *\n\t * @access public\n\t * @var Flux_Connection\n\t */\n\tpublic $connection;\n\t\n\t/**\n\t * Temporary table name.\n\t *\n\t * @access public\n\t * @var string\n\t */\n\tpublic $tableName;\n\t\n\t/**\n\t * Array of table names to select from and re-populate the temporary table\n\t * with, overriding each duplicate record.\n\t *\n\t * @access public\n\t * @var array\n\t */\n\tpublic $fromTables;\n\t\n\t/**\n\t * Exception class to raise when an error occurs.\n\t *\n\t * @static\n\t * @access public\n\t * @var array\n\t */\n\tpublic static $exceptionClass = 'Flux_Error';\n\t\n\t/**\n\t * Create new temporary table.\n\t *\n\t * @param Flux_Connection $connection\n\t * @param string $tableName\n\t * @param array $fromTables\n\t * @access public\n\t */\n\tpublic function __construct(Flux_Connection $connection, $tableName, array $fromTables)\n\t{\n\t\t$this->connection = $connection;\n\t\t$this->tableName  = $tableName;\n\t\t$this->fromTables = $fromTables;\n\t\t\n\t\tif (empty($fromTables)) {\n\t\t\tself::raise(\"One or more tables must be specified to import into the temporary table '$tableName'\");\n\t\t}\n\t\t\n\t\t// Find the first table.\n\t\treset($this->fromTables);\n\t\t$firstTable = $this->fromTables[0];\n\t\t$secondTable = $this->fromTables[1];\n\t\t\n\t\tif ($this->create($secondTable)) {\n\t\t\t// Insert initial row set.\n\t\t\t// Rows imported from the following tables should overwrite these rows.\n\t\t\tif (!$this->import($firstTable, false)) {\n\t\t\t\tself::raise(\"Failed to import rows from initial table '$firstTable'\");\n\t\t\t}\n\t\t\t\n\t\t\tforeach (array_slice($this->fromTables, 1) as $table) {\n\t\t\t\tif (!$this->import($table)) {\n\t\t\t\t\tself::raise(\"Failed to import/replace rows from table '$table'\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/**\n\t * Create actual temporary table in the database.\n\t *\n\t * @param string $firstTable\n\t * @return bool\n\t * @access private\n\t */\n\tprivate function create($firstTable)\n\t{\n\t\t// Drop temporary table before hand.\n\t\t$this->drop();\n\t\t\n\t\t$sth = $this->connection->getStatement(\"DESCRIBE $firstTable\");\n\t\t$res = $sth->execute();\n\t\t\n\t\tif (!$res) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$cols    = $sth->fetchAll();\n\t\t$bind    = array();\n\t\t$sql     = \"CREATE TEMPORARY TABLE {$this->tableName} (\";\n\t\t$primary = false;\n\t\t$uniques = array();\n\t\t$indices = array();\n\n\t\t// Origin column, indicates which table the record came from.\n\t\t$varcharLength   = $this->findVarcharLength();\n\t\t$origin          = new Flux_DataObject();\n\t\t$origin->Field   = 'origin_table';\n\t\t$origin->Type    = \"varchar($varcharLength)\";\n\t\t$origin->Null    = 'YES';\n\t\t$origin->Key     = '';\n\t\t$origin->Default = null;\n\t\t$origin->Extra   = '';\n\n\t\t// Add origin column.\n\t\t$cols[] = $origin;\n\n\t\tforeach ($cols as $col) {\n\t\t\t// Determine default value.\t\n\t\t\tif ($col->Default) {\n\t\t\t\t$default = 'DEFAULT ?';\n\t\t\t\t$bind[]  = $col->Default;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$default = '';\n\t\t\t}\n\t\t\t// Find primary key.\n\t\t\tif ($col->Key == 'PRI') {\n\t\t\t\t$primary = $col->Field;\n\t\t\t}\n\t\t\t// Find any unique keys.\n\t\t\telseif ($col->Key == 'UNI') {\n\t\t\t\t$uniques[] = $col->Field;\n\t\t\t}\n\t\t\t// Find any indexed keys.\n\t\t\telseif ($col->Key == 'MUL') {\n\t\t\t\t$indices[] = $col->Field;\n\t\t\t}\n\t\t\t$null = $col->Null == 'YES' ? 'NULL' : 'NOT NULL'; // Determine NULL status.\n\t\t\t$sql .= rtrim(\"\\n\\t`{$col->Field}` {$col->Type} $null $default {$col->Extra},\");\n\t\t}\n\t\t// Add primary key.\n\t\tif ($primary) {\n\t\t\t$sql .= \"\\n\\tPRIMARY KEY( `$primary` ),\";\n\t\t}\n\t\t// Add unique keys.\n\t\tif ($uniques) {\n\t\t\tforeach ($uniques as $unique) {\n\t\t\t\t$sql .= \"\\n\\tUNIQUE KEY `$unique` ( `$unique` ),\";\n\t\t\t}\n\t\t}\n\t\t// Add index keys.\n\t\tif ($indices) {\n\t\t\tforeach ($indices as $index) {\n\t\t\t\t$sql .= \"\\n\\tKEY `$index` (`$index`),\";\n\t\t\t}\n\t\t}\n\n\t\t$sql  = rtrim($sql, ', ');\n\t\t$sql .= \"\\n);\";\n\t\t\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t$res = $sth->execute($bind);\n\t\t\n\t\tif (!$res) {\n\t\t\t$message  = \"Failed to create temporary table '{$this->tableName}'.\\n\";\n\t\t\t$message .= sprintf('Error info: %s', print_r($sth->errorInfo(), true));\n\t\t\tself::raise($message);\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\t/**\n\t * Import rows from a specified table into the temporary table, optionally\n\t * overwriting duplicate primay key rows.\n\t *\n\t * @param string $table\n\t * @param bool $overwrite\n\t * @return bool\n\t * @access private\n\t */\n\tprivate function import($table, $overwrite = true)\n\t{\n\t\t$act = $overwrite ? 'REPLACE' : 'INSERT';\n\t\t$sql = \"$act INTO $this->tableName SELECT $table.*, '$table' FROM $table\";\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t\n\t\treturn $sth->execute();\n\t}\n\t\n\t/**\n\t * Find the length of the longest table name, which should be used to\n\t * determine the length of the VARCHAR field in the temporary table.\n\t *\n\t * @return int\n\t * @access private\n\t */\n\tprivate function findVarcharLength()\n\t{\n\t\t$length = 0;\n\t\tforeach ($this->fromTables as $table) {\n\t\t\tif (($strlen=strlen($table)) > $length) {\n\t\t\t\t$length = $strlen;\n\t\t\t}\n\t\t}\n\t\treturn $length;\n\t}\n\t\n\t/**\n\t * Throw an exception.\n\t *\n\t * @param string $message\n\t * @throws Flux_Error\n\t * @access private\n\t * @static\n\t */\n\tprivate static function raise($message = '')\n\t{\n\t\t$class = self::$exceptionClass;\n\t\tthrow new $class($message);\n\t}\n\t\n\t/**\n\t * Drop temporary table.\n\t *\n\t * @return bool\n\t * @access public\n\t */\n\tpublic function drop()\n\t{\n\t\t$sql = \"DROP TEMPORARY TABLE IF EXISTS {$this->tableName}\";\n\t\t$sth = $this->connection->getStatement($sql);\n\t\t\n\t\treturn $sth->execute();\n\t}\n\t\n\tpublic function __destruct()\n\t{\n\t\t$this->drop();\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/Flux/index.html",
    "content": ""
  },
  {
    "path": "lib/Flux.php",
    "content": "<?php\nrequire_once 'Flux/Config.php';\nrequire_once 'Flux/Error.php';\nrequire_once 'Flux/Connection.php';\nrequire_once 'Flux/LoginServer.php';\nrequire_once 'Flux/CharServer.php';\nrequire_once 'Flux/MapServer.php';\nrequire_once 'Flux/Athena.php';\nrequire_once 'Flux/LoginAthenaGroup.php';\nrequire_once 'Flux/Addon.php';\nrequire_once 'functions/getReposVersion.php';\nrequire_once 'functions/discordwebhook.php';\n\n// Get the SVN revision or GIT hash of the top-level directory (FLUX_ROOT).\ndefine('FLUX_REPOSVERSION', getReposVersion());\n\n/**\n * The Flux class contains methods related to the application on the larger\n * scale. For the most part, it handles application initialization such as\n * parsing the configuration files and whatnot.\n */\nclass Flux {\n\t/**\n\t * Current version.\n\t */\n\tconst VERSION = '2.0.0';\n\n\t/**\n\t * Repository SVN version or GIT hash of the top-level revision.\n\t */\n\tconst REPOSVERSION = FLUX_REPOSVERSION;\n\n\t/**\n\t * Application-specific configuration object.\n\t *\n\t * @access public\n\t * @var Flux_Config\n\t */\n\tpublic static $appConfig;\n\n\t/**\n\t * Servers configuration object.\n\t *\n\t * @access public\n\t * @var Flux_Config\n\t */\n\tpublic static $serversConfig;\n\n\t/**\n\t * Messages configuration object.\n\t *\n\t * @access public\n\t * @var Flux_Config\n\t */\n\tpublic static $messagesConfig;\n\n\t/**\n\t * Collection of Flux_Athena objects.\n\t *\n\t * @access public\n\t * @var array\n\t */\n\tpublic static $servers = array();\n\n\t/**\n\t * Registry where Flux_LoginAthenaGroup instances are kept for easy\n\t * searching.\n\t *\n\t * @access public\n\t * @var array\n\t */\n\tpublic static $loginAthenaGroupRegistry = array();\n\n\t/**\n\t * Registry where Flux_Athena instances are kept for easy searching.\n\t *\n\t * @access public\n\t * @var array\n\t */\n\tpublic static $athenaServerRegistry = array();\n\n\t/**\n\t * Object containing all of Flux's session data.\n\t *\n\t * @access public\n\t * @var Flux_SessionData\n\t */\n\tpublic static $sessionData;\n\n\t/**\n\t *\n\t */\n\tpublic static $numberOfQueries = 0;\n\n\t/**\n\t *\n\t */\n\tpublic static $addons = array();\n\n\t/**\n\t * Initialize Flux application. This will handle configuration parsing and\n\t * instanciating of objects crucial to the control panel.\n\t *\n\t * @param array $options Options to pass to initializer.\n\t * @throws Flux_Error Raised when missing required options.\n\t * @access public\n\t */\n\tpublic static function initialize($options = array())\n\t{\n\t\t$required = array('appConfigFile', 'serversConfigFile');\n\t\tforeach ($required as $option) {\n\t\t\tif (!array_key_exists($option, $options)) {\n\t\t\t\tself::raise(\"Missing required option `$option' in Flux::initialize()\");\n\t\t\t}\n\t\t}\n\n\t\t// Parse application and server configuration files, this will also\n\t\t// handle configuration file normalization. See the source for the\n\t\t// below methods for more details on what's being done.\n\t\tself::$appConfig      = self::parseAppConfigFile($options['appConfigFile']);\n\t\tself::$serversConfig  = self::parseServersConfigFile($options['serversConfigFile']);\n\n\t\tif (array_key_exists('appConfigFileImport', $options) && file_exists($options['appConfigFileImport'])) {\n\t\t\t$importAppConfig = self::parseAppConfigFile($options['appConfigFileImport'], true);\n\t\t\tself::$appConfig->merge($importAppConfig, true, true);\n\t\t}\n\n\t\t// Server configuration files are not merged, instead they replace the original.\n\t\tif (array_key_exists('serversConfigFileImport', $options) && file_exists($options['serversConfigFileImport'])) {\n\t\t\t$importServersConfig = self::parseServersConfigFile($options['serversConfigFileImport'], true);\n\t\t\tself::$serversConfig = $importServersConfig;\n\t\t}\n\n\t\t// Using newer language system.\n\t\tself::$messagesConfig = self::parseLanguageConfigFile();\n\n\t\t// Initialize server objects.\n\t\tself::initializeServerObjects();\n\n\t\t// Initialize add-ons.\n\t\tself::initializeAddons();\n\t}\n\n\t/**\n\t * Initialize each Login/Char/Map server object and contain them in their\n\t * own collective Athena object.\n\t *\n\t * This is also part of the Flux initialization phase.\n\t *\n\t * @access public\n\t */\n\tpublic static function initializeServerObjects()\n\t{\n\t\tforeach (self::$serversConfig->getChildrenConfigs() as $key => $config) {\n\t\t\t$connection  = new Flux_Connection($config->getDbConfig(), $config->getLogsDbConfig(), $config->getWebDbConfig());\n\t\t\t$loginServer = new Flux_LoginServer($config->getLoginServer());\n\n\t\t\t// LoginAthenaGroup maintains the grouping of a central login\n\t\t\t// server and its underlying Athena objects.\n\t\t\tself::$servers[$key] = new Flux_LoginAthenaGroup($config->getServerName(), $connection, $loginServer);\n\n\t\t\t// Add into registry.\n\t\t\tself::registerServerGroup($config->getServerName(), self::$servers[$key]);\n\n\t\t\tforeach ($config->getCharMapServers()->getChildrenConfigs() as $charMapServer) {\n\t\t\t\t$charServer = new Flux_CharServer($charMapServer->getCharServer());\n\t\t\t\t$mapServer  = new Flux_MapServer($charMapServer->getMapServer());\n\n\t\t\t\t// Create the collective server object, Flux_Athena.\n\t\t\t\t$athena = new Flux_Athena($charMapServer, $loginServer, $charServer, $mapServer);\n\t\t\t\tself::$servers[$key]->addAthenaServer($athena);\n\n\t\t\t\t// Add into registry.\n\t\t\t\tself::registerAthenaServer($config->getServerName(), $charMapServer->getServerName(), $athena);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t *\n\t */\n\tpublic static function initializeAddons()\n\t{\n\t\tif (!is_dir(FLUX_ADDON_DIR)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach (glob(FLUX_ADDON_DIR.'/*') as $addonDir) {\n\t\t\tif (is_dir($addonDir)) {\n\t\t\t\t$addonName   = basename($addonDir);\n\t\t\t\t$addonObject = new Flux_Addon($addonName, $addonDir);\n\t\t\t\tself::$addons[$addonName] = $addonObject;\n\n\t\t\t\t// Merge configurations.\n\t\t\t\tself::$appConfig->merge($addonObject->addonConfig);\n\t\t\t\tself::$messagesConfig->merge($addonObject->messagesConfig, false);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Wrapper method for setting and getting values from the appConfig.\n\t *\n\t * @param string $key\n\t * @param mixed $value\n\t * @param array $options\n\t * @access public\n\t */\n\tpublic static function config($key, $value = null, $options = array())\n\t{\n\t\tif (!is_null($value)) {\n\t\t\treturn self::$appConfig->set($key, $value, $options);\n\t\t}\n\t\telse {\n\t\t\treturn self::$appConfig->get($key);\n\t\t}\n\t}\n\n\t/**\n\t * Wrapper method for setting and getting values from the messagesConfig.\n\t *\n\t * @param string $key\n\t * @param mixed $value\n\t * @param array $options\n\t * @access public\n\t */\n\tpublic static function message($key, $value = null, $options = array())\n\t{\n\t\tif (!is_null($value)) {\n\t\t\treturn self::$messagesConfig->set($key, $value, $options);\n\t\t}\n\t\tif (!is_null($tmp=self::$messagesConfig->get($key)))\n\t\t\treturn $tmp;\n\t\telse\n\t\t\treturn ' '.$key;\n\t}\n\n\t/**\n\t * Convenience method for raising Flux_Error exceptions.\n\t *\n\t * @param string $message Message to pass to constructor.\n\t * @throws Flux_Error\n\t * @access public\n\t */\n\tpublic static function raise($message)\n\t{\n\t\tthrow new Flux_Error($message);\n\t}\n\n\t/**\n\t * Parse PHP array into Flux_Config instance.\n\t *\n\t * @param array $configArr\n\t * @access public\n\t */\n\tpublic static function parseConfig(array $configArr)\n\t{\n\t\treturn new Flux_Config($configArr);\n\t}\n\n\t/**\n\t * Parse a PHP array returned as the result of an included file into a\n\t * Flux_Config configuration object.\n\t *\n\t * @param string $filename\n\t * @access public\n\t */\n\tpublic static function parseConfigFile($filename, $cache=true)\n\t{\n\t\t$basename  = basename(str_replace(' ', '', ucwords(str_replace(array('/', '\\\\', '_'), ' ', $filename))), '.php').'.cache.php';\n\t\t$cachefile = FLUX_DATA_DIR.\"/tmp/$basename\";\n\t\t$directory = FLUX_DATA_DIR.'/tmp';\n\t\tif (!is_dir($directory))\n\t\t\tmkdir($directory, 0600);\n\t\tif ($cache && file_exists($cachefile) && filemtime($cachefile) > filemtime($filename)) {\n\t\t\treturn unserialize(file_get_contents($cachefile, false, null, 28));\n\t\t}\n\t\telse {\n\t\t\tob_start();\n\t\t\t// Uses require, thus assumes the file returns an array.\n\t\t\t$config = require $filename;\n\t\t\tob_end_clean();\n\n\t\t\t// Cache config file.\n\t\t\t$cf = self::parseConfig($config);\n\n\t\t\tif ($cache) {\n\t\t\t\t$fp = fopen($cachefile, 'w');\n\t\t\t\tif ( !$fp ){\n\t\t\t\t\tself::raise(\"Failed to write \".$cachefile.\" permission error or data/tmp not exist in Flux::parseConfigFile()\");\n\t\t\t\t}\n\t\t\t\tfwrite($fp, '<?php exit(\"Forbidden.\"); ?>');\n\t\t\t\tfwrite($fp, $s=serialize($cf), strlen($s));\n\t\t\t\tfclose($fp);\n\t\t\t}\n\n\t\t\treturn $cf;\n\t\t}\n\t}\n\n\t/**\n\t * Parse a file in an application-config specific manner.\n\t *\n\t * @param string $filename\n\t * @param bool $import Whether this is an import config or not\n\t * @access public\n\t */\n\tpublic static function parseAppConfigFile($filename, $import = false)\n\t{\n\t\t$config = self::parseConfigFile($filename, false);\n\n\t\tif (!$config->getServerAddress() && !$import) {\n\t\t\tself::raise(\"ServerAddress must be specified in your application config.\");\n\t\t}\n\t\t$themes = $config->get('ThemeName', false);\n\t\tif ((!$themes || count($themes) < 1) && !$import) {\n\t\t\tself::raise('ThemeName is required in application configuration.');\n\t\t}\n\t\tif ($themes) {\n\t\t\tforeach ($themes as $themeName) {\n\t\t\t\tif (!self::themeExists($themeName)) {\n\t\t\t\t\tself::raise(\"The selected theme '$themeName' does not exist.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!($config->getPayPalReceiverEmails() instanceof Flux_Config)\n\t\t\t&& !($import && $config->getPayPalReceiverEmails() === null)) {\n\t\t\tself::raise(\"PayPalReceiverEmails must be an array.\");\n\t\t}\n\n\t\t// Sanitize BaseURI. (leading forward slash is mandatory.)\n\t\t$baseURI = $config->get('BaseURI');\n\t\tif (!is_null($baseURI)) {\n\t\t\tif (strlen($baseURI) && $baseURI[0] != '/') {\n\t\t\t\t$config->set('BaseURI', \"/$baseURI\");\n\t\t\t}\n\t\t\telseif (trim($baseURI) === '') {\n\t\t\t\t$config->set('BaseURI', '/');\n\t\t\t}\n\t\t}\n\n\t\treturn $config;\n\t}\n\n\t/**\n\t * Parse a file in a servers-config specific manner. This method gets a bit\n\t * nasty so beware of ugly code ;)\n\t *\n\t * @param string $filename\n\t * @param bool $import Whether this is an import config or not\n\t * @access public\n\t */\n\tpublic static function parseServersConfigFile($filename, $import = false)\n\t{\n\t\t$config            = self::parseConfigFile($filename);\n\t\t$options           = array('overwrite' => false, 'force' => true); // Config::set() options.\n\t\t$serverNames       = array();\n\t\t$athenaServerNames = array();\n\n\t\tif (!count($config->toArray()) && !$import) {\n\t\t\tself::raise('At least one server configuration must be present.');\n\t\t}\n\n\t\tforeach ($config->getChildrenConfigs() as $topConfig) {\n\t\t\t//\n\t\t\t// Top-level normalization.\n\t\t\t//\n\n\t\t\tif (!($serverName = $topConfig->getServerName())) {\n\t\t\t\tself::raise('ServerName is required for each top-level server configuration, check your servers configuration file.');\n\t\t\t}\n\t\t\telseif (in_array($serverName, $serverNames)) {\n\t\t\t\tself::raise(\"The server name '$serverName' has already been configured. Please use another name.\");\n\t\t\t}\n\n\t\t\t$serverNames[] = $serverName;\n\t\t\t$athenaServerNames[$serverName] = array();\n\n\t\t\t$topConfig->setDbConfig(array(), $options);\n\t\t\t$topConfig->setLogsDbConfig(array(), $options);\n\t\t\t$topConfig->setWebDbConfig(array(), $options);\n\t\t\t$topConfig->setLoginServer(array(), $options);\n\t\t\t$topConfig->setCharMapServers(array(), $options);\n\n\t\t\t$dbConfig     = $topConfig->getDbConfig();\n\t\t\t$logsDbConfig = $topConfig->getLogsDbConfig();\n\t\t\t$webDbConfig  = $topConfig->getWebDbConfig();\n\t\t\t$loginServer  = $topConfig->getLoginServer();\n\n\t\t\tforeach (array($dbConfig, $logsDbConfig, $webDbConfig) as $_dbConfig) {\n\t\t\t\t$_dbConfig->setHostname('localhost', $options);\n\t\t\t\t$_dbConfig->setUsername('ragnarok', $options);\n\t\t\t\t$_dbConfig->setPassword('ragnarok', $options);\n\t\t\t\t$_dbConfig->setPersistent(true, $options);\n\t\t\t}\n\n\t\t\t$loginServer->setDatabase($dbConfig->getDatabase(), $options);\n\t\t\t$loginServer->setUseMD5(true, $options);\n\n\t\t\t// Raise error if missing essential configuration directives.\n\t\t\tif (!$loginServer->getAddress()) {\n\t\t\t\tself::raise('Address is required for each LoginServer section in your servers configuration.');\n\t\t\t}\n\t\t\telseif (!$loginServer->getPort()) {\n\t\t\t\tself::raise('Port is required for each LoginServer section in your servers configuration.');\n\t\t\t}\n\n\t\t\tif (!$topConfig->getCharMapServers() || !count($topConfig->getCharMapServers()->toArray())) {\n\t\t\t\tself::raise('CharMapServers must be an array and contain at least 1 char/map server entry.');\n\t\t\t}\n\n\t\t\tforeach ($topConfig->getCharMapServers()->getChildrenConfigs() as $charMapServer) {\n\t\t\t\t//\n\t\t\t\t// Char/Map normalization.\n\t\t\t\t//\n\t\t\t\t$expRates = array(\n\t\t\t\t\t'Base'        => 100,\n\t\t\t\t\t'Job'         => 100,\n\t\t\t\t\t'Mvp'         => 100\n\t\t\t\t);\n\t\t\t\t$dropRates = array(\n\t\t\t\t\t'DropRateCap' => 9000,\n\t\t\t\t\t'Common'      => 100,\n\t\t\t\t\t'CommonBoss'  => 100,\n\t\t\t\t\t'CommonMVP'   => 100,\n\t\t\t\t\t'CommonMin'   => 1,\n\t\t\t\t\t'CommonMax'   => 10000,\n\t\t\t\t\t'Heal'        => 100,\n\t\t\t\t\t'HealBoss'    => 100,\n\t\t\t\t\t'HealMVP'     => 100,\n\t\t\t\t\t'HealMin'     => 1,\n\t\t\t\t\t'HealMax'     => 10000,\n\t\t\t\t\t'Useable'     => 100,\n\t\t\t\t\t'UseableBoss' => 100,\n\t\t\t\t\t'UseableMVP'  => 100,\n\t\t\t\t\t'UseableMin'  => 1,\n\t\t\t\t\t'UseableMax'  => 10000,\n\t\t\t\t\t'Equip'       => 100,\n\t\t\t\t\t'EquipBoss'   => 100,\n\t\t\t\t\t'EquipMVP'    => 100,\n\t\t\t\t\t'EquipMin'    => 1,\n\t\t\t\t\t'EquipMax'    => 10000,\n\t\t\t\t\t'Card'        => 100,\n\t\t\t\t\t'CardBoss'    => 100,\n\t\t\t\t\t'CardMVP'     => 100,\n\t\t\t\t\t'CardMin'     => 1,\n\t\t\t\t\t'CardMax'     => 10000,\n\t\t\t\t\t'MvpItem'     => 100,\n\t\t\t\t\t'MvpItemMin'  => 1,\n\t\t\t\t\t'MvpItemMax'  => 10000,\n\t\t\t\t\t'MvpItemMode' => 0\n\t\t\t\t);\n\t\t\t\t$charMapServer->setExpRates($expRates, $options);\n\t\t\t\t$charMapServer->setDropRates($dropRates, $options);\n\t\t\t\t$charMapServer->setRenewal(true, $options);\n\t\t\t\t$charMapServer->setCharServer(array(), $options);\n\t\t\t\t$charMapServer->setMapServer(array(), $options);\n\t\t\t\t$charMapServer->setDatabase($dbConfig->getDatabase(), $options);\n\n\t\t\t\tif (!($athenaServerName = $charMapServer->getServerName())) {\n\t\t\t\t\tself::raise('ServerName is required for each CharMapServers pair in your servers configuration.');\n\t\t\t\t}\n\t\t\t\telseif (in_array($athenaServerName, $athenaServerNames[$serverName])) {\n\t\t\t\t\tself::raise(\"The server name '$athenaServerName' under '$serverName' has already been configured. Please use another name.\");\n\t\t\t\t}\n\n\t\t\t\t$athenaServerNames[$serverName][] = $athenaServerName;\n\t\t\t\t$charServer = $charMapServer->getCharServer();\n\n\t\t\t\tif (!$charServer->getAddress()) {\n\t\t\t\t\tself::raise('Address is required for each CharServer section in your servers configuration.');\n\t\t\t\t}\n\t\t\t\telseif (!$charServer->getPort()) {\n\t\t\t\t\tself::raise('Port is required for each CharServer section in your servers configuration.');\n\t\t\t\t}\n\n\t\t\t\t$mapServer = $charMapServer->getMapServer();\n\t\t\t\tif (!$mapServer->getAddress()) {\n\t\t\t\t\tself::raise('Address is required for each MapServer section in your servers configuration.');\n\t\t\t\t}\n\t\t\t\telseif (!$mapServer->getPort()) {\n\t\t\t\t\tself::raise('Port is required for each MapServer section in your servers configuration.');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $config;\n\t}\n\n\t/**\n\t * Parses a messages configuration file. (Deprecated)\n\t *\n\t * @param string $filename\n\t * @access public\n\t */\n\tpublic static function parseMessagesConfigFile($filename)\n\t{\n\t\t$config = self::parseConfigFile($filename);\n\t\t// Nothing yet.\n\t\treturn $config;\n\t}\n\n\t/**\n\t * Parses a language configuration file, can also parse a language config\n\t * for any addon.\n\t *\n\t * @param string $addonName\n\t * @access public\n\t */\n\tpublic static function parseLanguageConfigFile($addonName=null)\n\t{\n\t\t$default = $addonName ? FLUX_ADDON_DIR.\"/$addonName/lang/en_us.php\" : FLUX_LANG_DIR.'/en_us.php';\n\t\t$current = $default;\n\n\t\tif ($lang=self::config('DefaultLanguage')) {\n\t\t\t$current = $addonName ? FLUX_ADDON_DIR.\"/$addonName/lang/$lang.php\" : FLUX_LANG_DIR.\"/$lang.php\";\n\t\t}\n\n\t\t$languages = self::getAvailableLanguages();\n\n\t\tif(!empty($_COOKIE[\"language\"]) && array_key_exists($_COOKIE[\"language\"], $languages))\n\t\t{\n\t\t\t$lang = $_COOKIE[\"language\"];\n\t\t\t$current = $addonName ? FLUX_ADDON_DIR.\"/$addonName/lang/$lang.php\" : FLUX_LANG_DIR.\"/$lang.php\";\n\t\t}\n\n\t\tif (file_exists($default)) {\n\t\t\t$def = self::parseConfigFile($default);\n\t\t}\n\t\telse {\n\t\t\t$tmp = array();\n\t\t\t$def = new Flux_Config($tmp);\n\t\t}\n\n\t\tif ($current != $default && file_exists($current)) {\n\t\t\t$cur = self::parseConfigFile($current);\n\t\t\t$def->merge($cur, false);\n\t\t}\n\n\t\treturn $def;\n\t}\n\n\t/**\n\t * Check whether or not a theme exists.\n\t *\n\t * @return bool\n\t * @access public\n\t */\n\tpublic static function themeExists($themeName)\n\t{\n\t\treturn is_dir(FLUX_THEME_DIR.\"/$themeName\");\n\t}\n\n\t/**\n\t * Register the server group into the registry.\n\t *\n\t * @param string $serverName Server group's name.\n\t * @param Flux_LoginAthenaGroup Server group object.\n\t * @return Flux_LoginAthenaGroup\n\t * @access private\n\t */\n\tprivate static function registerServerGroup($serverName, Flux_LoginAthenaGroup $serverGroup)\n\t{\n\t\tself::$loginAthenaGroupRegistry[$serverName] = $serverGroup;\n\t\treturn $serverGroup;\n\t}\n\n\t/**\n\t * Register the Athena server into the registry.\n\t *\n\t * @param string $serverName Server group's name.\n\t * @param string $athenaServerName Athena server's name.\n\t * @param Flux_Athena $athenaServer Athena server object.\n\t * @return Flux_Athena\n\t * @access private\n\t */\n\tprivate static function registerAthenaServer($serverName, $athenaServerName, Flux_Athena $athenaServer)\n\t{\n\t\tif (!array_key_exists($serverName, self::$athenaServerRegistry) || !is_array(self::$athenaServerRegistry[$serverName])) {\n\t\t\tself::$athenaServerRegistry[$serverName] = array();\n\t\t}\n\n\t\tself::$athenaServerRegistry[$serverName][$athenaServerName] = $athenaServer;\n\t\treturn $athenaServer;\n\t}\n\n\t/**\n\t * Get Flux_LoginAthenaGroup server object by its ServerName.\n\t *\n\t * @param string $serverName Server group name.\n\t * @return mixed Returns Flux_LoginAthenaGroup instance or false on failure.\n\t * @access public\n\t */\n\tpublic static function getServerGroupByName($serverName)\n\t{\n\t\t$registry = &self::$loginAthenaGroupRegistry;\n\n\t\tif (array_key_exists($serverName, $registry) && $registry[$serverName] instanceOf Flux_LoginAthenaGroup) {\n\t\t\treturn $registry[$serverName];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Get Flux_Athena instance by its group/server names.\n\t *\n\t * @param string $serverName Server group name.\n\t * @param string $athenaServerName Athena server name.\n\t * @return mixed Returns Flux_Athena instance or false on failure.\n\t * @access public\n\t */\n\tpublic static function getAthenaServerByName($serverName, $athenaServerName)\n\t{\n\t\t$registry = &self::$athenaServerRegistry;\n\t\tif (array_key_exists($serverName, $registry) && array_key_exists($athenaServerName, $registry[$serverName]) &&\n\t\t\t$registry[$serverName][$athenaServerName] instanceOf Flux_Athena) {\n\n\t\t\treturn $registry[$serverName][$athenaServerName];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Hashes a password for use in comparison with the login.user_pass column.\n\t *\n\t * @param string $password Plain text password.\n\t * @return string Returns hashed password.\n\t * @access public\n\t */\n\tpublic static function hashPassword($password)\n\t{\n\t\t// Default hashing schema is MD5.\n\t\treturn md5($password);\n\t}\n\n\t/**\n\t * Get the job class name from a job ID.\n\t *\n\t * @param int $id\n\t * @return mixed Job class or false.\n\t * @access public\n\t */\n\tpublic static function getJobClass($id)\n\t{\n\t\t$key   = \"JobClasses.$id\";\n\t\t$class = self::config($key);\n\n\t\tif ($class) {\n\t\t\treturn $class;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Get the job ID from a job class name.\n\t *\n\t * @param string $class\n\t * @return mixed Job ID or false.\n\t * @access public\n\t */\n\tpublic static function getJobID($class)\n\t{\n\t\t$index = self::config('JobClassIndex')->toArray();\n\t\tif (array_key_exists($class, $index)) {\n\t\t\treturn $index[$class];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Get the homunculus class name from a homun class ID.\n\t *\n\t * @param int $id\n\t * @return mixed Class name or false.\n\t * @access public\n\t */\n\tpublic static function getHomunClass($id)\n\t{\n\t\t$key   = \"HomunClasses.$id\";\n\t\t$class = self::config($key);\n\n\t\tif ($class) {\n\t\t\treturn $class;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Get the item type name from an item type.\n\t *\n\t * @return Item Type or false.\n\t * @access public\n\t */\n\tpublic static function getItemType($id1)\n\t{\n\t\tif (is_null($id1))\n\t\t\treturn false;\n\n\t\t$type = self::config(\"ItemTypes\")->toArray();\n\n\t\tif ($type[strtolower($id1)] != NULL) {\n\t\t\treturn $type[strtolower($id1)];\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\tpublic static function getItemSubType($id1, $id2)\n\t{\n\t\t$subtype = \"ItemSubTypes.$id1.$id2\";\n\t\t$result = self::config($subtype);\n\n\t\tif ($result) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * return random option description.\n\t */\n\tpublic static function getRandOption($id1)\n\t{\n\t\t$key   = \"RandomOptions.$id1\";\n\t\t$option = self::config($key);\n\n\t\tif ($option) {\n\t\t\treturn $option;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Get the equip location combination name from an equip location combination type.\n\t *\n\t * @param int $id\n\t * @return mixed Equip Location Combination or false.\n\t * @access public\n\t */\n\tpublic static function getEquipLocationCombination()\n\t{\n\t\t$equiplocations = Flux::config('EquipLocationCombinations')->toArray();\n\t\treturn $equiplocations;\n\t}\n\n\t/**\n\t * Process donations that have been put on hold.\n\t */\n\tpublic static function processHeldCredits()\n\t{\n\t\t$txnLogTable            = self::config('FluxTables.TransactionTable');\n\t\t$trustTable             = self::config('FluxTables.DonationTrustTable');\n\t\t$loginAthenaGroups      = self::$loginAthenaGroupRegistry;\n\t\tlist ($cancel, $accept) = array(array(), array());\n\n\t\tforeach ($loginAthenaGroups as $loginAthenaGroup) {\n\t\t\t$sql  = \"SELECT account_id, payer_email, credits, mc_gross, txn_id, hold_until \";\n\t\t\t$sql .= \"FROM {$loginAthenaGroup->loginDatabase}.$txnLogTable \";\n\t\t\t$sql .= \"WHERE account_id > 0 AND hold_until IS NOT NULL AND payment_status = 'Completed'\";\n\t\t\t$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\n\t\t\tif ($sth->execute() && ($txn=$sth->fetchAll())) {\n\t\t\t\tforeach ($txn as $t) {\n\t\t\t\t\t$sql  = \"SELECT id FROM {$loginAthenaGroup->loginDatabase}.$txnLogTable \";\n\t\t\t\t\t$sql .= \"WHERE payment_status IN ('Cancelled_Reversed', 'Reversed', 'Refunded') AND parent_txn_id = ? LIMIT 1\";\n\t\t\t\t\t$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\n\t\t\t\t\tif ($sth->execute(array($t->txn_id)) && ($r=$sth->fetch()) && $r->id) {\n\t\t\t\t\t\t$cancel[] = $t->txn_id;\n\t\t\t\t\t}\n\t\t\t\t\telseif (strtotime($t->hold_until) <= time()) {\n\t\t\t\t\t\t$accept[] = $t;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($cancel)) {\n\t\t\t\t$ids  = implode(', ', array_fill(0, count($cancel), '?'));\n\t\t\t\t$sql  = \"UPDATE {$loginAthenaGroup->loginDatabase}.$txnLogTable \";\n\t\t\t\t$sql .= \"SET credits = 0, hold_until = NULL WHERE txn_id IN ($ids)\";\n\t\t\t\t$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\t\t\t\t$sth->execute($cancel);\n\t\t\t}\n\n\t\t\t$sql2   = \"INSERT INTO {$loginAthenaGroup->loginDatabase}.$trustTable (account_id, email, create_date)\";\n\t\t\t$sql2  .= \"VALUES (?, ?, NOW())\";\n\t\t\t$sth2   = $loginAthenaGroup->connection->getStatement($sql2);\n\n\t\t\t$sql3   = \"SELECT id FROM {$loginAthenaGroup->loginDatabase}.$trustTable WHERE \";\n\t\t\t$sql3  .= \"delete_date IS NULL AND account_id = ? AND email = ? LIMIT 1\";\n\t\t\t$sth3   = $loginAthenaGroup->connection->getStatement($sql3);\n\n\t\t\t$idvals = array();\n\n\t\t\tforeach ($accept as $txn) {\n\t\t\t\t$loginAthenaGroup->loginServer->depositCredits($txn->account_id, $txn->credits, $txn->mc_gross);\n\t\t\t\t$sth3->execute(array($txn->account_id, $txn->payer_email));\n\t\t\t\t$row = $sth3->fetch();\n\n\t\t\t\tif (!$row) {\n\t\t\t\t\t$sth2->execute(array($txn->account_id, $txn->payer_email));\n\t\t\t\t}\n\n\t\t\t\t$idvals[] = $txn->txn_id;\n\t\t\t}\n\n\t\t\tif (!empty($idvals)) {\n\t\t\t\t$ids  = implode(', ', array_fill(0, count($idvals), '?'));\n\t\t\t\t$sql  = \"UPDATE {$loginAthenaGroup->loginDatabase}.$txnLogTable \";\n\t\t\t\t$sql .= \"SET hold_until = NULL WHERE txn_id IN ($ids)\";\n\t\t\t\t$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\n\t\t\t\t$sth->execute($idvals);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t *\n\t */\n\tpublic static function pruneUnconfirmedAccounts()\n\t{\n\t\t$tbl    = Flux::config('FluxTables.AccountCreateTable');\n\n\t\tforeach (self::$loginAthenaGroupRegistry as $loginAthenaGroup) {\n\t\t\t$db   = $loginAthenaGroup->loginDatabase;\n\t\t\t$sql  = \"DELETE $db.login, $db.$tbl FROM $db.login INNER JOIN $db.$tbl \";\n\t\t\t$sql .= \"WHERE login.account_id = $tbl.account_id AND $tbl.confirmed = 0 \";\n\t\t\t$sql .= \"AND $tbl.confirm_code IS NOT NULL AND $tbl.confirm_expire <= NOW()\";\n\t\t\t$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\n\t\t\t$sth->execute();\n\t\t}\n\t}\n\n\t/**\n\t * Get array of equip_location bits. (bit => loc_name pairs)\n\t * @return array\n\t */\n\tpublic static function getEquipLocationList()\n\t{\n\t\t$equiplocations = Flux::config('EquipLocations')->toArray();\n\t\treturn $equiplocations;\n\t}\n\n\t/**\n\t * Get array of equip_upper bits. (bit => upper_name pairs)\n\t * @return array\n\t */\n\tpublic static function getEquipUpperList($isRenewal = 1)\n\t{\n\t\t$equipupper = Flux::config('EquipUpper.0')->toArray();\n\n\t\tif($isRenewal)\n\t\t\t$equipupper = array_merge($equipupper, Flux::config('EquipUpper.1')->toArray());\n\n\t\treturn $equipupper;\n\t}\n\n\t/**\n\t * Get array of equip_jobs bits. (bit => job_name pairs)\n\t */\n\tpublic static function getEquipJobsList($isRenewal = 1)\n\t{\n\t\t$equipjobs = Flux::config('EquipJobs.0')->toArray();\n\n\t\tif($isRenewal)\n\t\t\t$equipjobs = array_merge($equipjobs, Flux::config('EquipJobs.1')->toArray());\n\n\t\treturn $equipjobs;\n\t}\n\n\t/**\n\t * Get array of trade restrictions\n\t */\n\tpublic static function getTradeRestrictionList()\n\t{\n\t\t$restrictions = Flux::config('TradeRestriction')->toArray();\n\t\treturn $restrictions;\n\t}\n\n\t/**\n\t * Get array of item flags\n\t */\n\tpublic static function getItemFlagList()\n\t{\n\t\t$flags = Flux::config('ItemFlags')->toArray();\n\t\treturn $flags;\n\t}\n\n\t/**\n\t * Check whether a particular item type is stackable.\n\t * @param int $type\n\t * @return bool\n\t */\n\tpublic static function isStackableItemType($type)\n\t{\n\t\t$nonstackables = array(1, 4, 5, 7, 8, 9);\n\t\treturn !in_array($type, $nonstackables);\n\t}\n\n\t/**\n\t * Perform a bitwise AND from each bit in getEquipUpperList() on $bitmask\n\t * to determine which bits have been set.\n\t * @param int $bitmask\n\t * @return array\n\t */\n\tpublic static function equipUpperToArray($bitmask, $isRenewal = 1)\n\t{\n\t\t$arr  = array();\n\t\t$bits = self::getEquipUpperList($isRenewal);\n\n\t\tforeach ($bits as $bit => $name) {\n\t\t\tif ($bitmask & $bit) {\n\t\t\t\t$arr[] = $bit;\n\t\t\t}\n\t\t}\n\n\t\treturn $arr;\n\t}\n\n\t/**\n\t * Perform a bitwise AND from each bit in getEquipJobsList() on $bitmask\n\t * to determine which bits have been set.\n\t * @param int $bitmask\n\t * @return array\n\t */\n\tpublic static function equipJobsToArray($bitmask)\n\t{\n\t\t$arr  = array();\n\t\t$bits = self::getEquipJobsList();\n\n\t\tforeach ($bits as $bit => $name) {\n\t\t\tif ($bitmask & $bit) {\n\t\t\t\t$arr[] = $bit;\n\t\t\t}\n\t\t}\n\n\t\treturn $arr;\n\t}\n\n\t/**\n\t *\n\t */\n\tpublic static function monsterModeToArray($bitmask)\n\t{\n\t\t$arr  = array();\n\t\t$bits = self::config('MonsterModes')->toArray();\n\n\t\tforeach ($bits as $name) {\n\t\t\t\t$arr[] = $name;\n\t\t}\n\n\t\treturn $arr;\n\t}\n\n\t/**\n\t *\n\t */\n\tpublic static function elementName($ele)\n\t{\n\t\t$element = Flux::config(\"Elements\")->toArray();\n\t\treturn is_null($element[$ele]) ? $element['Neutral'] : $element[$ele];\n\t}\n\n\t/**\n\t *\n\t */\n\tpublic static function monsterRaceName($race)\n\t{\n\t\t$races = Flux::config(\"MonsterRaces\")->toArray();\n\t\treturn is_null($races[$race]) ? $races['Formless'] : $races[$race];\n\t}\n\n\t/**\n\t *\n\t */\n\tpublic static function monsterSizeName($size)\n\t{\n\t\t$sizes = Flux::config(\"MonsterSizes\")->toArray();\n\t\treturn is_null($sizes[$size]) ? $sizes['Small'] : $sizes[$size];\n\t}\n\n\tpublic static function getAvailableLanguages()\n\t{\n\t\t$langs_available = array_diff(scandir(FLUX_LANG_DIR), array('..', '.'));\n\n\t\t$dictionary = [];\n\t\tforeach($langs_available as $lang_file) {\n\t\t\t$lang_key = str_replace('.php', '', $lang_file);\n\t\t\t$lang_conf = self::parseConfigFile(FLUX_LANG_DIR.'/'.$lang_file);\n\t\t\t$lang_name = $lang_conf->get('Language');\n\n\t\t\t$dictionary[$lang_key] = $lang_name;\n\t\t}\n\n\t\treturn $dictionary;\n\t}\n}\n?>\n"
  },
  {
    "path": "lib/functions/discordwebhook.php",
    "content": "<?php\n/**\n *\tDiscord Webhook\n *\tFunction does not include \"username\" or \"avatar_url\" and relies on the setting configured on Discord.\n **/\n\nfunction    sendtodiscord($url, $message) {\n    $data = array(\"content\" => $message);\n    $curl = curl_init($url);\n    curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-type: application/json'));\n    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n    curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));\n    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n    return curl_exec($curl);\n}\n?>\n"
  },
  {
    "path": "lib/functions/getReposVersion.php",
    "content": "<?php\n/**\n * Get the repository version from the GIT hash or SVN revision\n *\n * @return int Revision number\n */\nfunction getReposVersion()\n{\n\t$gitDir = FLUX_ROOT.'/.git';\n\n\tif(is_dir($gitDir)) {\n\t\treturn git_hash();\n\t} else {\n\t\treturn null;\n\t}\n}\n\n/**\n * Get the GIT hash of a directory.\n *\n * @param string file name.\n * @return int GIT hash\n */\nfunction git_hash() {\n\t$file = FLUX_ROOT.'/.git/refs/heads/master';\n\tif (file_exists($file) && is_readable($file)) {\n\t\t$lines = implode('', file($file, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES));\n\t\tif(isset($lines)) {\n\t\t\treturn trim(substr($lines, 0, 10));\n\t\t}\n\t\treturn null;\n\t} else {\n\t\treturn null;\n\t}\n}\n\n?>\n"
  },
  {
    "path": "lib/functions/imagecreatefrombmpstring.php",
    "content": "<?php\n/**\n * Code taken from https://cerescp.svn.sourceforge.net/svnroot/cerescp/emblema.php\n * under the GNU General Public license version 2.\n *\n * @license GPLv2 <http://www.gnu.org/licenses/gpl-2.0.txt>\n */\nfunction imagecreatefrombmpstring($im) {\n\t$header = unpack(\"vtype/Vsize/v2reserved/Voffset\", substr($im, 0, 14));\n\t$info = unpack(\"Vsize/Vwidth/Vheight/vplanes/vbits/Vcompression/Vimagesize/Vxres/Vyres/Vncolor/Vimportant\", substr($im, 14, 40));\n\textract($info);\n\textract($header);\n\tif($type != 0x4D42)\n\t\treturn false;\n\t$palette_size = $offset - 54;\n\t$imres=imagecreatetruecolor($width, $height);\n\timagealphablending($imres, false);\n\timagesavealpha($imres, true);\n\t$pal=array();\n\tif($palette_size) {\n\t\t$palette = substr($im, 54, $palette_size);\n\t\t$j = 0; $n = 0;\n\t\twhile($j < $palette_size) {\n\t\t\t$b = ord($palette[$j++]);\n\t\t\t$g = ord($palette[$j++]);\n\t\t\t$r = ord($palette[$j++]);\n\t\t\t$a = ord($palette[$j++]);\n\t\t\tif ($a > 127)\n\t\t\t\t$a = 127; // alpha = 255 on 0xFF00FF\n\t\t\tif ( ($r & 0xf8 == 0xf8) && ($g == 0) && ($b & 0xf8 == 0xf8))\n\t\t\t\t$a = 127; // alpha = 255 on 0xFF00FF\n\t\t\t$pal[$n++] = imagecolorallocatealpha($imres, $r, $g, $b, $a);\n\t\t}\n\t}\n\t$scan_line_size = (($bits * $width) + 7) >> 3;\n\t$scan_line_align = ($scan_line_size & 0x03) ? 4 - ($scan_line_size & 0x03): 0;\n\tfor($i = 0, $l = $height - 1; $i < $height; $i++, $l--) {\n\t\t$scan_line = substr($im, $offset + (($scan_line_size + $scan_line_align) * $l), $scan_line_size);\n\t\tif($bits == 24) {\n\t\t\t$j = 0; $n = 0;\n\t\t\twhile($j < $scan_line_size) {\n\t\t\t\t$b = ord($scan_line[$j++]);\n\t\t\t\t$g = ord($scan_line[$j++]);\n\t\t\t\t$r = ord($scan_line[$j++]);\n\t\t\t\t$a = 0;\n\t\t\t\tif ( ($r & 0xf8 == 0xf8) && ($g == 0) && ($b & 0xf8 == 0xf8))\n\t\t\t\t\t$a = 127; // alpha = 255 on 0xFF00FF\n\t\t\t\t$col=imagecolorallocatealpha($imres, $r, $g, $b, $a);\n\t\t\t\timagesetpixel($imres, $n++, $i, $col);\n\t\t\t}\n\t\t}\n\t\telse if($bits == 8) {\n\t\t\t$j = 0;\n\t\t\twhile($j < $scan_line_size) {\n\t\t\t\t$col = $pal[ord($scan_line[$j++])];\n\t\t\t\timagesetpixel($imres, $j-1, $i, $col);\n\t\t\t}\n\t\t}\n\t\telse if($bits == 4) {\n\t\t\t$j = 0; $n = 0;\n\t\t\twhile($j < $scan_line_size) {\n\t\t\t\t$byte = ord($scan_line[$j++]);\n\t\t\t\t$p1 = $byte >> 4;\n\t\t\t\t$p2 = $byte & 0x0F;\n\t\t\t\timagesetpixel($imres, $n++, $i, $pal[$p1]);\n\t\t\t\timagesetpixel($imres, $n++, $i, $pal[$p2]);\n\t\t\t}\n\t\t}\n\t\telse if($bits == 1) {\n\t\t\t$j = 0; $n = 0;\n\t\t\twhile($j < $scan_line_size) {\n\t\t\t\t$byte = ord($scan_line[$j++]);\n\t\t\t\t$p1 = (int) (($byte & 0x80) != 0);\n\t\t\t\t$p2 = (int) (($byte & 0x40) != 0);\n\t\t\t\t$p3 = (int) (($byte & 0x20) != 0);\n\t\t\t\t$p4 = (int) (($byte & 0x10) != 0);\n\t\t\t\t$p5 = (int) (($byte & 0x08) != 0);\n\t\t\t\t$p6 = (int) (($byte & 0x04) != 0);\n\t\t\t\t$p7 = (int) (($byte & 0x02) != 0);\n\t\t\t\t$p8 = (int) (($byte & 0x01) != 0);\n\t\t\t\timagesetpixel($imres, $n++, $i, $pal[$p1]);\n\t\t\t\timagesetpixel($imres, $n++, $i, $pal[$p2]);\n\t\t\t\timagesetpixel($imres, $n++, $i, $pal[$p3]);\n\t\t\t\timagesetpixel($imres, $n++, $i, $pal[$p4]);\n\t\t\t\timagesetpixel($imres, $n++, $i, $pal[$p5]);\n\t\t\t\timagesetpixel($imres, $n++, $i, $pal[$p6]);\n\t\t\t\timagesetpixel($imres, $n++, $i, $pal[$p7]);\n\t\t\t\timagesetpixel($imres, $n++, $i, $pal[$p8]);\n\t\t\t}\n\t\t}\n\t}\n\treturn $imres;\n}\n\n?>\n"
  },
  {
    "path": "lib/functions/index.html",
    "content": ""
  },
  {
    "path": "lib/index.html",
    "content": ""
  },
  {
    "path": "lib/phpmailer/LICENSE",
    "content": "\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n\t\t       Version 2.1, February 1999\n\n Copyright (C) 1991, 1999 Free Software Foundation, Inc.\n     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n[This is the first released version of the Lesser GPL.  It also counts\n as the successor of the GNU Library Public License, version 2, hence\n the version number 2.1.]\n\n\t\t\t    Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicenses are intended to guarantee your freedom to share and change\nfree software--to make sure the software is free for all its users.\n\n  This license, the Lesser General Public License, applies to some\nspecially designated software packages--typically libraries--of the\nFree Software Foundation and other authors who decide to use it.  You\ncan use it too, but we suggest you first think carefully about whether\nthis license or the ordinary General Public License is the better\nstrategy to use in any particular case, based on the explanations below.\n\n  When we speak of free software, we are referring to freedom of use,\nnot price.  Our General Public Licenses are designed to make sure that\nyou have the freedom to distribute copies of free software (and charge\nfor this service if you wish); that you receive source code or can get\nit if you want it; that you can change the software and use pieces of\nit in new free programs; and that you are informed that you can do\nthese things.\n\n  To protect your rights, we need to make restrictions that forbid\ndistributors to deny you these rights or to ask you to surrender these\nrights.  These restrictions translate to certain responsibilities for\nyou if you distribute copies of the library or if you modify it.\n\n  For example, if you distribute copies of the library, whether gratis\nor for a fee, you must give the recipients all the rights that we gave\nyou.  You must make sure that they, too, receive or can get the source\ncode.  If you link other code with the library, you must provide\ncomplete object files to the recipients, so that they can relink them\nwith the library after making changes to the library and recompiling\nit.  And you must show them these terms so they know their rights.\n\n  We protect your rights with a two-step method: (1) we copyright the\nlibrary, and (2) we offer you this license, which gives you legal\npermission to copy, distribute and/or modify the library.\n\n  To protect each distributor, we want to make it very clear that\nthere is no warranty for the free library.  Also, if the library is\nmodified by someone else and passed on, the recipients should know\nthat what they have is not the original version, so that the original\nauthor's reputation will not be affected by problems that might be\nintroduced by others.\n\n  Finally, software patents pose a constant threat to the existence of\nany free program.  We wish to make sure that a company cannot\neffectively restrict the users of a free program by obtaining a\nrestrictive license from a patent holder.  Therefore, we insist that\nany patent license obtained for a version of the library must be\nconsistent with the full freedom of use specified in this license.\n\n  Most GNU software, including some libraries, is covered by the\nordinary GNU General Public License.  This license, the GNU Lesser\nGeneral Public License, applies to certain designated libraries, and\nis quite different from the ordinary General Public License.  We use\nthis license for certain libraries in order to permit linking those\nlibraries into non-free programs.\n\n  When a program is linked with a library, whether statically or using\na shared library, the combination of the two is legally speaking a\ncombined work, a derivative of the original library.  The ordinary\nGeneral Public License therefore permits such linking only if the\nentire combination fits its criteria of freedom.  The Lesser General\nPublic License permits more lax criteria for linking other code with\nthe library.\n\n  We call this license the \"Lesser\" General Public License because it\ndoes Less to protect the user's freedom than the ordinary General\nPublic License.  It also provides other free software developers Less\nof an advantage over competing non-free programs.  These disadvantages\nare the reason we use the ordinary General Public License for many\nlibraries.  However, the Lesser license provides advantages in certain\nspecial circumstances.\n\n  For example, on rare occasions, there may be a special need to\nencourage the widest possible use of a certain library, so that it becomes\na de-facto standard.  To achieve this, non-free programs must be\nallowed to use the library.  A more frequent case is that a free\nlibrary does the same job as widely used non-free libraries.  In this\ncase, there is little to gain by limiting the free library to free\nsoftware only, so we use the Lesser General Public License.\n\n  In other cases, permission to use a particular library in non-free\nprograms enables a greater number of people to use a large body of\nfree software.  For example, permission to use the GNU C Library in\nnon-free programs enables many more people to use the whole GNU\noperating system, as well as its variant, the GNU/Linux operating\nsystem.\n\n  Although the Lesser General Public License is Less protective of the\nusers' freedom, it does ensure that the user of a program that is\nlinked with the Library has the freedom and the wherewithal to run\nthat program using a modified version of the Library.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.  Pay close attention to the difference between a\n\"work based on the library\" and a \"work that uses the library\".  The\nformer contains code derived from the library, whereas the latter must\nbe combined with the library in order to run.\n\n\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License Agreement applies to any software library or other\nprogram which contains a notice placed by the copyright holder or\nother authorized party saying it may be distributed under the terms of\nthis Lesser General Public License (also called \"this License\").\nEach licensee is addressed as \"you\".\n\n  A \"library\" means a collection of software functions and/or data\nprepared so as to be conveniently linked with application programs\n(which use some of those functions and data) to form executables.\n\n  The \"Library\", below, refers to any such software library or work\nwhich has been distributed under these terms.  A \"work based on the\nLibrary\" means either the Library or any derivative work under\ncopyright law: that is to say, a work containing the Library or a\nportion of it, either verbatim or with modifications and/or translated\nstraightforwardly into another language.  (Hereinafter, translation is\nincluded without limitation in the term \"modification\".)\n\n  \"Source code\" for a work means the preferred form of the work for\nmaking modifications to it.  For a library, complete source code means\nall the source code for all modules it contains, plus any associated\ninterface definition files, plus the scripts used to control compilation\nand installation of the library.\n\n  Activities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning a program using the Library is not restricted, and output from\nsuch a program is covered only if its contents constitute a work based\non the Library (independent of the use of the Library in a tool for\nwriting it).  Whether that is true depends on what the Library does\nand what the program that uses the Library does.\n  \n  1. You may copy and distribute verbatim copies of the Library's\ncomplete source code as you receive it, in any medium, provided that\nyou conspicuously and appropriately publish on each copy an\nappropriate copyright notice and disclaimer of warranty; keep intact\nall the notices that refer to this License and to the absence of any\nwarranty; and distribute a copy of this License along with the\nLibrary.\n\n  You may charge a fee for the physical act of transferring a copy,\nand you may at your option offer warranty protection in exchange for a\nfee.\n\n  2. You may modify your copy or copies of the Library or any portion\nof it, thus forming a work based on the Library, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) The modified work must itself be a software library.\n\n    b) You must cause the files modified to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    c) You must cause the whole of the work to be licensed at no\n    charge to all third parties under the terms of this License.\n\n    d) If a facility in the modified Library refers to a function or a\n    table of data to be supplied by an application program that uses\n    the facility, other than as an argument passed when the facility\n    is invoked, then you must make a good faith effort to ensure that,\n    in the event an application does not supply such function or\n    table, the facility still operates, and performs whatever part of\n    its purpose remains meaningful.\n\n    (For example, a function in a library to compute square roots has\n    a purpose that is entirely well-defined independent of the\n    application.  Therefore, Subsection 2d requires that any\n    application-supplied function or table used by this function must\n    be optional: if the application does not supply it, the square\n    root function must still compute square roots.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Library,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Library, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Library.\n\nIn addition, mere aggregation of another work not based on the Library\nwith the Library (or with a work based on the Library) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may opt to apply the terms of the ordinary GNU General Public\nLicense instead of this License to a given copy of the Library.  To do\nthis, you must alter all the notices that refer to this License, so\nthat they refer to the ordinary GNU General Public License, version 2,\ninstead of to this License.  (If a newer version than version 2 of the\nordinary GNU General Public License has appeared, then you can specify\nthat version instead if you wish.)  Do not make any other change in\nthese notices.\n\n  Once this change is made in a given copy, it is irreversible for\nthat copy, so the ordinary GNU General Public License applies to all\nsubsequent copies and derivative works made from that copy.\n\n  This option is useful when you wish to copy part of the code of\nthe Library into a program that is not a library.\n\n  4. You may copy and distribute the Library (or a portion or\nderivative of it, under Section 2) in object code or executable form\nunder the terms of Sections 1 and 2 above provided that you accompany\nit with the complete corresponding machine-readable source code, which\nmust be distributed under the terms of Sections 1 and 2 above on a\nmedium customarily used for software interchange.\n\n  If distribution of object code is made by offering access to copy\nfrom a designated place, then offering equivalent access to copy the\nsource code from the same place satisfies the requirement to\ndistribute the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  5. A program that contains no derivative of any portion of the\nLibrary, but is designed to work with the Library by being compiled or\nlinked with it, is called a \"work that uses the Library\".  Such a\nwork, in isolation, is not a derivative work of the Library, and\ntherefore falls outside the scope of this License.\n\n  However, linking a \"work that uses the Library\" with the Library\ncreates an executable that is a derivative of the Library (because it\ncontains portions of the Library), rather than a \"work that uses the\nlibrary\".  The executable is therefore covered by this License.\nSection 6 states terms for distribution of such executables.\n\n  When a \"work that uses the Library\" uses material from a header file\nthat is part of the Library, the object code for the work may be a\nderivative work of the Library even though the source code is not.\nWhether this is true is especially significant if the work can be\nlinked without the Library, or if the work is itself a library.  The\nthreshold for this to be true is not precisely defined by law.\n\n  If such an object file uses only numerical parameters, data\nstructure layouts and accessors, and small macros and small inline\nfunctions (ten lines or less in length), then the use of the object\nfile is unrestricted, regardless of whether it is legally a derivative\nwork.  (Executables containing this object code plus portions of the\nLibrary will still fall under Section 6.)\n\n  Otherwise, if the work is a derivative of the Library, you may\ndistribute the object code for the work under the terms of Section 6.\nAny executables containing that work also fall under Section 6,\nwhether or not they are linked directly with the Library itself.\n\n  6. As an exception to the Sections above, you may also combine or\nlink a \"work that uses the Library\" with the Library to produce a\nwork containing portions of the Library, and distribute that work\nunder terms of your choice, provided that the terms permit\nmodification of the work for the customer's own use and reverse\nengineering for debugging such modifications.\n\n  You must give prominent notice with each copy of the work that the\nLibrary is used in it and that the Library and its use are covered by\nthis License.  You must supply a copy of this License.  If the work\nduring execution displays copyright notices, you must include the\ncopyright notice for the Library among them, as well as a reference\ndirecting the user to the copy of this License.  Also, you must do one\nof these things:\n\n    a) Accompany the work with the complete corresponding\n    machine-readable source code for the Library including whatever\n    changes were used in the work (which must be distributed under\n    Sections 1 and 2 above); and, if the work is an executable linked\n    with the Library, with the complete machine-readable \"work that\n    uses the Library\", as object code and/or source code, so that the\n    user can modify the Library and then relink to produce a modified\n    executable containing the modified Library.  (It is understood\n    that the user who changes the contents of definitions files in the\n    Library will not necessarily be able to recompile the application\n    to use the modified definitions.)\n\n    b) Use a suitable shared library mechanism for linking with the\n    Library.  A suitable mechanism is one that (1) uses at run time a\n    copy of the library already present on the user's computer system,\n    rather than copying library functions into the executable, and (2)\n    will operate properly with a modified version of the library, if\n    the user installs one, as long as the modified version is\n    interface-compatible with the version that the work was made with.\n\n    c) Accompany the work with a written offer, valid for at\n    least three years, to give the same user the materials\n    specified in Subsection 6a, above, for a charge no more\n    than the cost of performing this distribution.\n\n    d) If distribution of the work is made by offering access to copy\n    from a designated place, offer equivalent access to copy the above\n    specified materials from the same place.\n\n    e) verify that the user has already received a copy of these\n    materials or that you have already sent this user a copy.\n\n  For an executable, the required form of the \"work that uses the\nLibrary\" must include any data and utility programs needed for\nreproducing the executable from it.  However, as a special exception,\nthe materials to be distributed need not include anything that is\nnormally distributed (in either source or binary form) with the major\ncomponents (compiler, kernel, and so on) of the operating system on\nwhich the executable runs, unless that component itself accompanies\nthe executable.\n\n  It may happen that this requirement contradicts the license\nrestrictions of other proprietary libraries that do not normally\naccompany the operating system.  Such a contradiction means you cannot\nuse both them and the Library together in an executable that you\ndistribute.\n\n  7. You may place library facilities that are a work based on the\nLibrary side-by-side in a single library together with other library\nfacilities not covered by this License, and distribute such a combined\nlibrary, provided that the separate distribution of the work based on\nthe Library and of the other library facilities is otherwise\npermitted, and provided that you do these two things:\n\n    a) Accompany the combined library with a copy of the same work\n    based on the Library, uncombined with any other library\n    facilities.  This must be distributed under the terms of the\n    Sections above.\n\n    b) Give prominent notice with the combined library of the fact\n    that part of it is a work based on the Library, and explaining\n    where to find the accompanying uncombined form of the same work.\n\n  8. You may not copy, modify, sublicense, link with, or distribute\nthe Library except as expressly provided under this License.  Any\nattempt otherwise to copy, modify, sublicense, link with, or\ndistribute the Library is void, and will automatically terminate your\nrights under this License.  However, parties who have received copies,\nor rights, from you under this License will not have their licenses\nterminated so long as such parties remain in full compliance.\n\n  9. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Library or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Library (or any work based on the\nLibrary), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n  10. Each time you redistribute the Library (or any work based on the\nLibrary), the recipient automatically receives a license from the\noriginal licensor to copy, distribute, link with or modify the Library\nsubject to these terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties with\nthis License.\n\n  11. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Library at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Library by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  12. If the distribution and/or use of the Library is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Library under this License may add\nan explicit geographical distribution limitation excluding those countries,\nso that distribution is permitted only in or among countries not thus\nexcluded.  In such case, this License incorporates the limitation as if\nwritten in the body of this License.\n\n  13. The Free Software Foundation may publish revised and/or new\nversions of the Lesser General Public License from time to time.\nSuch new versions will be similar in spirit to the present version,\nbut may differ in detail to address new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Library\nspecifies a version number of this License which applies to it and\n\"any later version\", you have the option of following the terms and\nconditions either of that version or of any later version published by\nthe Free Software Foundation.  If the Library does not specify a\nlicense version number, you may choose any version ever published by\nthe Free Software Foundation.\n\n  14. If you wish to incorporate parts of the Library into other free\nprograms whose distribution conditions are incompatible with these,\nwrite to the author to ask for permission.  For software which is\ncopyrighted by the Free Software Foundation, write to the Free\nSoftware Foundation; we sometimes make exceptions for this.  Our\ndecision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\n\t\t\t    NO WARRANTY\n\n  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\nWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\nOTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\nKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\nLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\nWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\nAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\nFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\nLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\nRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\nFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\nSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGES.\n\n\t\t     END OF TERMS AND CONDITIONS\n\n           How to Apply These Terms to Your New Libraries\n\n  If you develop a new library, and you want it to be of the greatest\npossible use to the public, we recommend making it free software that\neveryone can redistribute and change.  You can do so by permitting\nredistribution under these terms (or, alternatively, under the terms of the\nordinary General Public License).\n\n  To apply these terms, attach the following notices to the library.  It is\nsafest to attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least the\n\"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the library's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n\nAlso add information on how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the library, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the\n  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\n\n  <signature of Ty Coon>, 1 April 1990\n  Ty Coon, President of Vice\n\nThat's all there is to it!\n\n\n"
  },
  {
    "path": "lib/phpmailer/PHPMailerAutoload.php",
    "content": "<?php\n/**\n * PHPMailer SPL autoloader.\n * PHP Version 5\n * @package PHPMailer\n * @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project\n * @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>\n * @author Jim Jagielski (jimjag) <jimjag@gmail.com>\n * @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>\n * @author Brent R. Matzelle (original founder)\n * @copyright 2012 - 2014 Marcus Bointon\n * @copyright 2010 - 2012 Jim Jagielski\n * @copyright 2004 - 2009 Andy Prevost\n * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License\n * @note This program is distributed in the hope that it will be useful - WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE.\n */\n\n/**\n * PHPMailer SPL autoloader.\n * @param string $classname The name of the class to load\n */\nfunction PHPMailerAutoload($classname)\n{\n    //Can't use __DIR__ as it's only in PHP 5.3+\n    $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';\n    if (is_readable($filename)) {\n        require $filename;\n    }\n}\n\nif (version_compare(PHP_VERSION, '5.1.2', '>=')) {\n    //SPL autoloading was introduced in PHP 5.1.2\n    if (version_compare(PHP_VERSION, '5.3.0', '>=')) {\n        spl_autoload_register('PHPMailerAutoload', true, true);\n    } else {\n        spl_autoload_register('PHPMailerAutoload');\n    }\n\t// Removed fallback to older versions due to deprecated command [Everade]\n}\n"
  },
  {
    "path": "lib/phpmailer/VERSION",
    "content": "5.2.26\n"
  },
  {
    "path": "lib/phpmailer/class.phpmailer.php",
    "content": "<?php\n/**\n * PHPMailer - PHP email creation and transport class.\n * PHP Version 5\n * @package PHPMailer\n * @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project\n * @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>\n * @author Jim Jagielski (jimjag) <jimjag@gmail.com>\n * @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>\n * @author Brent R. Matzelle (original founder)\n * @copyright 2012 - 2014 Marcus Bointon\n * @copyright 2010 - 2012 Jim Jagielski\n * @copyright 2004 - 2009 Andy Prevost\n * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License\n * @note This program is distributed in the hope that it will be useful - WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE.\n */\n\n/**\n * PHPMailer - PHP email creation and transport class.\n * @package PHPMailer\n * @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>\n * @author Jim Jagielski (jimjag) <jimjag@gmail.com>\n * @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>\n * @author Brent R. Matzelle (original founder)\n */\nclass PHPMailer\n{\n    /**\n     * The PHPMailer Version number.\n     * @var string\n     */\n    public $Version = '5.2.26';\n\n    /**\n     * Email priority.\n     * Options: null (default), 1 = High, 3 = Normal, 5 = low.\n     * When null, the header is not set at all.\n     * @var integer\n     */\n    public $Priority = null;\n\n    /**\n     * The character set of the message.\n     * @var string\n     */\n    public $CharSet = 'iso-8859-1';\n\n    /**\n     * The MIME Content-type of the message.\n     * @var string\n     */\n    public $ContentType = 'text/plain';\n\n    /**\n     * The message encoding.\n     * Options: \"8bit\", \"7bit\", \"binary\", \"base64\", and \"quoted-printable\".\n     * @var string\n     */\n    public $Encoding = '8bit';\n\n    /**\n     * Holds the most recent mailer error message.\n     * @var string\n     */\n    public $ErrorInfo = '';\n\n    /**\n     * The From email address for the message.\n     * @var string\n     */\n    public $From = 'root@localhost';\n\n    /**\n     * The From name of the message.\n     * @var string\n     */\n    public $FromName = 'Root User';\n\n    /**\n     * The Sender email (Return-Path) of the message.\n     * If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.\n     * @var string\n     */\n    public $Sender = '';\n\n    /**\n     * The Return-Path of the message.\n     * If empty, it will be set to either From or Sender.\n     * @var string\n     * @deprecated Email senders should never set a return-path header;\n     * it's the receiver's job (RFC5321 section 4.4), so this no longer does anything.\n     * @link https://tools.ietf.org/html/rfc5321#section-4.4 RFC5321 reference\n     */\n    public $ReturnPath = '';\n\n    /**\n     * The Subject of the message.\n     * @var string\n     */\n    public $Subject = '';\n\n    /**\n     * An HTML or plain text message body.\n     * If HTML then call isHTML(true).\n     * @var string\n     */\n    public $Body = '';\n\n    /**\n     * The plain-text message body.\n     * This body can be read by mail clients that do not have HTML email\n     * capability such as mutt & Eudora.\n     * Clients that can read HTML will view the normal Body.\n     * @var string\n     */\n    public $AltBody = '';\n\n    /**\n     * An iCal message part body.\n     * Only supported in simple alt or alt_inline message types\n     * To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator\n     * @link http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/\n     * @link http://kigkonsult.se/iCalcreator/\n     * @var string\n     */\n    public $Ical = '';\n\n    /**\n     * The complete compiled MIME message body.\n     * @access protected\n     * @var string\n     */\n    protected $MIMEBody = '';\n\n    /**\n     * The complete compiled MIME message headers.\n     * @var string\n     * @access protected\n     */\n    protected $MIMEHeader = '';\n\n    /**\n     * Extra headers that createHeader() doesn't fold in.\n     * @var string\n     * @access protected\n     */\n    protected $mailHeader = '';\n\n    /**\n     * Word-wrap the message body to this number of chars.\n     * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance.\n     * @var integer\n     */\n    public $WordWrap = 0;\n\n    /**\n     * Which method to use to send mail.\n     * Options: \"mail\", \"sendmail\", or \"smtp\".\n     * @var string\n     */\n    public $Mailer = 'mail';\n\n    /**\n     * The path to the sendmail program.\n     * @var string\n     */\n    public $Sendmail = '/usr/sbin/sendmail';\n\n    /**\n     * Whether mail() uses a fully sendmail-compatible MTA.\n     * One which supports sendmail's \"-oi -f\" options.\n     * @var boolean\n     */\n    public $UseSendmailOptions = true;\n\n    /**\n     * Path to PHPMailer plugins.\n     * Useful if the SMTP class is not in the PHP include path.\n     * @var string\n     * @deprecated Should not be needed now there is an autoloader.\n     */\n    public $PluginDir = '';\n\n    /**\n     * The email address that a reading confirmation should be sent to, also known as read receipt.\n     * @var string\n     */\n    public $ConfirmReadingTo = '';\n\n    /**\n     * The hostname to use in the Message-ID header and as default HELO string.\n     * If empty, PHPMailer attempts to find one with, in order,\n     * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value\n     * 'localhost.localdomain'.\n     * @var string\n     */\n    public $Hostname = '';\n\n    /**\n     * An ID to be used in the Message-ID header.\n     * If empty, a unique id will be generated.\n     * You can set your own, but it must be in the format \"<id@domain>\",\n     * as defined in RFC5322 section 3.6.4 or it will be ignored.\n     * @see https://tools.ietf.org/html/rfc5322#section-3.6.4\n     * @var string\n     */\n    public $MessageID = '';\n\n    /**\n     * The message Date to be used in the Date header.\n     * If empty, the current date will be added.\n     * @var string\n     */\n    public $MessageDate = '';\n\n    /**\n     * SMTP hosts.\n     * Either a single hostname or multiple semicolon-delimited hostnames.\n     * You can also specify a different port\n     * for each host by using this format: [hostname:port]\n     * (e.g. \"smtp1.example.com:25;smtp2.example.com\").\n     * You can also specify encryption type, for example:\n     * (e.g. \"tls://smtp1.example.com:587;ssl://smtp2.example.com:465\").\n     * Hosts will be tried in order.\n     * @var string\n     */\n    public $Host = 'localhost';\n\n    /**\n     * The default SMTP server port.\n     * @var integer\n     * @TODO Why is this needed when the SMTP class takes care of it?\n     */\n    public $Port = 25;\n\n    /**\n     * The SMTP HELO of the message.\n     * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find\n     * one with the same method described above for $Hostname.\n     * @var string\n     * @see PHPMailer::$Hostname\n     */\n    public $Helo = '';\n\n    /**\n     * What kind of encryption to use on the SMTP connection.\n     * Options: '', 'ssl' or 'tls'\n     * @var string\n     */\n    public $SMTPSecure = '';\n\n    /**\n     * Whether to enable TLS encryption automatically if a server supports it,\n     * even if `SMTPSecure` is not set to 'tls'.\n     * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid.\n     * @var boolean\n     */\n    public $SMTPAutoTLS = true;\n\n    /**\n     * Whether to use SMTP authentication.\n     * Uses the Username and Password properties.\n     * @var boolean\n     * @see PHPMailer::$Username\n     * @see PHPMailer::$Password\n     */\n    public $SMTPAuth = false;\n\n    /**\n     * Options array passed to stream_context_create when connecting via SMTP.\n     * @var array\n     */\n    public $SMTPOptions = array();\n\n    /**\n     * SMTP username.\n     * @var string\n     */\n    public $Username = '';\n\n    /**\n     * SMTP password.\n     * @var string\n     */\n    public $Password = '';\n\n    /**\n     * SMTP auth type.\n     * Options are CRAM-MD5, LOGIN, PLAIN, NTLM, XOAUTH2, attempted in that order if not specified\n     * @var string\n     */\n    public $AuthType = '';\n\n    /**\n     * SMTP realm.\n     * Used for NTLM auth\n     * @var string\n     */\n    public $Realm = '';\n\n    /**\n     * SMTP workstation.\n     * Used for NTLM auth\n     * @var string\n     */\n    public $Workstation = '';\n\n    /**\n     * The SMTP server timeout in seconds.\n     * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2\n     * @var integer\n     */\n    public $Timeout = 300;\n\n    /**\n     * SMTP class debug output mode.\n     * Debug output level.\n     * Options:\n     * * `0` No output\n     * * `1` Commands\n     * * `2` Data and commands\n     * * `3` As 2 plus connection status\n     * * `4` Low-level data output\n     * @var integer\n     * @see SMTP::$do_debug\n     */\n    public $SMTPDebug = 0;\n\n    /**\n     * How to handle debug output.\n     * Options:\n     * * `echo` Output plain-text as-is, appropriate for CLI\n     * * `html` Output escaped, line breaks converted to `<br>`, appropriate for browser output\n     * * `error_log` Output to error log as configured in php.ini\n     *\n     * Alternatively, you can provide a callable expecting two params: a message string and the debug level:\n     * <code>\n     * $mail->Debugoutput = function($str, $level) {echo \"debug level $level; message: $str\";};\n     * </code>\n     * @var string|callable\n     * @see SMTP::$Debugoutput\n     */\n    public $Debugoutput = 'echo';\n\n    /**\n     * Whether to keep SMTP connection open after each message.\n     * If this is set to true then to close the connection\n     * requires an explicit call to smtpClose().\n     * @var boolean\n     */\n    public $SMTPKeepAlive = false;\n\n    /**\n     * Whether to split multiple to addresses into multiple messages\n     * or send them all in one message.\n     * Only supported in `mail` and `sendmail` transports, not in SMTP.\n     * @var boolean\n     */\n    public $SingleTo = false;\n\n    /**\n     * Storage for addresses when SingleTo is enabled.\n     * @var array\n     * @TODO This should really not be public\n     */\n    public $SingleToArray = array();\n\n    /**\n     * Whether to generate VERP addresses on send.\n     * Only applicable when sending via SMTP.\n     * @link https://en.wikipedia.org/wiki/Variable_envelope_return_path\n     * @link http://www.postfix.org/VERP_README.html Postfix VERP info\n     * @var boolean\n     */\n    public $do_verp = false;\n\n    /**\n     * Whether to allow sending messages with an empty body.\n     * @var boolean\n     */\n    public $AllowEmpty = false;\n\n    /**\n     * The default line ending.\n     * @note The default remains \"\\n\". We force CRLF where we know\n     *        it must be used via self::CRLF.\n     * @var string\n     */\n    public $LE = \"\\n\";\n\n    /**\n     * DKIM selector.\n     * @var string\n     */\n    public $DKIM_selector = '';\n\n    /**\n     * DKIM Identity.\n     * Usually the email address used as the source of the email.\n     * @var string\n     */\n    public $DKIM_identity = '';\n\n    /**\n     * DKIM passphrase.\n     * Used if your key is encrypted.\n     * @var string\n     */\n    public $DKIM_passphrase = '';\n\n    /**\n     * DKIM signing domain name.\n     * @example 'example.com'\n     * @var string\n     */\n    public $DKIM_domain = '';\n\n    /**\n     * DKIM private key file path.\n     * @var string\n     */\n    public $DKIM_private = '';\n\n    /**\n     * DKIM private key string.\n     * If set, takes precedence over `$DKIM_private`.\n     * @var string\n     */\n    public $DKIM_private_string = '';\n\n    /**\n     * Callback Action function name.\n     *\n     * The function that handles the result of the send email action.\n     * It is called out by send() for each email sent.\n     *\n     * Value can be any php callable: http://www.php.net/is_callable\n     *\n     * Parameters:\n     *   boolean $result        result of the send action\n     *   array   $to            email addresses of the recipients\n     *   array   $cc            cc email addresses\n     *   array   $bcc           bcc email addresses\n     *   string  $subject       the subject\n     *   string  $body          the email body\n     *   string  $from          email address of sender\n     * @var string\n     */\n    public $action_function = '';\n\n    /**\n     * What to put in the X-Mailer header.\n     * Options: An empty string for PHPMailer default, whitespace for none, or a string to use\n     * @var string\n     */\n    public $XMailer = '';\n\n    /**\n     * Which validator to use by default when validating email addresses.\n     * May be a callable to inject your own validator, but there are several built-in validators.\n     * @see PHPMailer::validateAddress()\n     * @var string|callable\n     * @static\n     */\n    public static $validator = 'auto';\n\n    /**\n     * An instance of the SMTP sender class.\n     * @var SMTP\n     * @access protected\n     */\n    protected $smtp = null;\n\n    /**\n     * The array of 'to' names and addresses.\n     * @var array\n     * @access protected\n     */\n    protected $to = array();\n\n    /**\n     * The array of 'cc' names and addresses.\n     * @var array\n     * @access protected\n     */\n    protected $cc = array();\n\n    /**\n     * The array of 'bcc' names and addresses.\n     * @var array\n     * @access protected\n     */\n    protected $bcc = array();\n\n    /**\n     * The array of reply-to names and addresses.\n     * @var array\n     * @access protected\n     */\n    protected $ReplyTo = array();\n\n    /**\n     * An array of all kinds of addresses.\n     * Includes all of $to, $cc, $bcc\n     * @var array\n     * @access protected\n     * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc\n     */\n    protected $all_recipients = array();\n\n    /**\n     * An array of names and addresses queued for validation.\n     * In send(), valid and non duplicate entries are moved to $all_recipients\n     * and one of $to, $cc, or $bcc.\n     * This array is used only for addresses with IDN.\n     * @var array\n     * @access protected\n     * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc\n     * @see PHPMailer::$all_recipients\n     */\n    protected $RecipientsQueue = array();\n\n    /**\n     * An array of reply-to names and addresses queued for validation.\n     * In send(), valid and non duplicate entries are moved to $ReplyTo.\n     * This array is used only for addresses with IDN.\n     * @var array\n     * @access protected\n     * @see PHPMailer::$ReplyTo\n     */\n    protected $ReplyToQueue = array();\n\n    /**\n     * The array of attachments.\n     * @var array\n     * @access protected\n     */\n    protected $attachment = array();\n\n    /**\n     * The array of custom headers.\n     * @var array\n     * @access protected\n     */\n    protected $CustomHeader = array();\n\n    /**\n     * The most recent Message-ID (including angular brackets).\n     * @var string\n     * @access protected\n     */\n    protected $lastMessageID = '';\n\n    /**\n     * The message's MIME type.\n     * @var string\n     * @access protected\n     */\n    protected $message_type = '';\n\n    /**\n     * The array of MIME boundary strings.\n     * @var array\n     * @access protected\n     */\n    protected $boundary = array();\n\n    /**\n     * The array of available languages.\n     * @var array\n     * @access protected\n     */\n    protected $language = array();\n\n    /**\n     * The number of errors encountered.\n     * @var integer\n     * @access protected\n     */\n    protected $error_count = 0;\n\n    /**\n     * The S/MIME certificate file path.\n     * @var string\n     * @access protected\n     */\n    protected $sign_cert_file = '';\n\n    /**\n     * The S/MIME key file path.\n     * @var string\n     * @access protected\n     */\n    protected $sign_key_file = '';\n\n    /**\n     * The optional S/MIME extra certificates (\"CA Chain\") file path.\n     * @var string\n     * @access protected\n     */\n    protected $sign_extracerts_file = '';\n\n    /**\n     * The S/MIME password for the key.\n     * Used only if the key is encrypted.\n     * @var string\n     * @access protected\n     */\n    protected $sign_key_pass = '';\n\n    /**\n     * Whether to throw exceptions for errors.\n     * @var boolean\n     * @access protected\n     */\n    protected $exceptions = false;\n\n    /**\n     * Unique ID used for message ID and boundaries.\n     * @var string\n     * @access protected\n     */\n    protected $uniqueid = '';\n\n    /**\n     * Error severity: message only, continue processing.\n     */\n    const STOP_MESSAGE = 0;\n\n    /**\n     * Error severity: message, likely ok to continue processing.\n     */\n    const STOP_CONTINUE = 1;\n\n    /**\n     * Error severity: message, plus full stop, critical error reached.\n     */\n    const STOP_CRITICAL = 2;\n\n    /**\n     * SMTP RFC standard line ending.\n     */\n    const CRLF = \"\\r\\n\";\n\n    /**\n     * The maximum line length allowed by RFC 2822 section 2.1.1\n     * @var integer\n     */\n    const MAX_LINE_LENGTH = 998;\n\n    /**\n     * Constructor.\n     * @param boolean $exceptions Should we throw external exceptions?\n     */\n    public function __construct($exceptions = null)\n    {\n        if ($exceptions !== null) {\n            $this->exceptions = (boolean)$exceptions;\n        }\n        //Pick an appropriate debug output format automatically\n        $this->Debugoutput = (strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html');\n    }\n\n    /**\n     * Destructor.\n     */\n    public function __destruct()\n    {\n        //Close any open SMTP connection nicely\n        $this->smtpClose();\n    }\n\n    /**\n     * Call mail() in a safe_mode-aware fashion.\n     * Also, unless sendmail_path points to sendmail (or something that\n     * claims to be sendmail), don't pass params (not a perfect fix,\n     * but it will do)\n     * @param string $to To\n     * @param string $subject Subject\n     * @param string $body Message Body\n     * @param string $header Additional Header(s)\n     * @param string $params Params\n     * @access private\n     * @return boolean\n     */\n    private function mailPassthru($to, $subject, $body, $header, $params)\n    {\n        //Check overloading of mail function to avoid double-encoding\n        if (ini_get('mbstring.func_overload') & 1) {\n            $subject = $this->secureHeader($subject);\n        } else {\n            $subject = $this->encodeHeader($this->secureHeader($subject));\n        }\n\n        //Can't use additional_parameters in safe_mode, calling mail() with null params breaks\n        //@link http://php.net/manual/en/function.mail.php\n        if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) {\n            $result = @mail($to, $subject, $body, $header);\n        } else {\n            $result = @mail($to, $subject, $body, $header, $params);\n        }\n        return $result;\n    }\n    /**\n     * Output debugging info via user-defined method.\n     * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).\n     * @see PHPMailer::$Debugoutput\n     * @see PHPMailer::$SMTPDebug\n     * @param string $str\n     */\n    protected function edebug($str)\n    {\n        if ($this->SMTPDebug <= 0) {\n            return;\n        }\n        //Avoid clash with built-in function names\n        if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) {\n            call_user_func($this->Debugoutput, $str, $this->SMTPDebug);\n            return;\n        }\n        switch ($this->Debugoutput) {\n            case 'error_log':\n                //Don't output, just log\n                error_log($str);\n                break;\n            case 'html':\n                //Cleans up output a bit for a better looking, HTML-safe output\n                echo htmlentities(\n                    preg_replace('/[\\r\\n]+/', '', $str),\n                    ENT_QUOTES,\n                    'UTF-8'\n                )\n                . \"<br>\\n\";\n                break;\n            case 'echo':\n            default:\n                //Normalize line breaks\n                $str = preg_replace('/\\r\\n?/ms', \"\\n\", $str);\n                echo gmdate('Y-m-d H:i:s') . \"\\t\" . str_replace(\n                    \"\\n\",\n                    \"\\n                   \\t                  \",\n                    trim($str)\n                ) . \"\\n\";\n        }\n    }\n\n    /**\n     * Sets message type to HTML or plain.\n     * @param boolean $isHtml True for HTML mode.\n     * @return void\n     */\n    public function isHTML($isHtml = true)\n    {\n        if ($isHtml) {\n            $this->ContentType = 'text/html';\n        } else {\n            $this->ContentType = 'text/plain';\n        }\n    }\n\n    /**\n     * Send messages using SMTP.\n     * @return void\n     */\n    public function isSMTP()\n    {\n        $this->Mailer = 'smtp';\n    }\n\n    /**\n     * Send messages using PHP's mail() function.\n     * @return void\n     */\n    public function isMail()\n    {\n        $this->Mailer = 'mail';\n    }\n\n    /**\n     * Send messages using $Sendmail.\n     * @return void\n     */\n    public function isSendmail()\n    {\n        $ini_sendmail_path = ini_get('sendmail_path');\n\n        if (!stristr($ini_sendmail_path, 'sendmail')) {\n            $this->Sendmail = '/usr/sbin/sendmail';\n        } else {\n            $this->Sendmail = $ini_sendmail_path;\n        }\n        $this->Mailer = 'sendmail';\n    }\n\n    /**\n     * Send messages using qmail.\n     * @return void\n     */\n    public function isQmail()\n    {\n        $ini_sendmail_path = ini_get('sendmail_path');\n\n        if (!stristr($ini_sendmail_path, 'qmail')) {\n            $this->Sendmail = '/var/qmail/bin/qmail-inject';\n        } else {\n            $this->Sendmail = $ini_sendmail_path;\n        }\n        $this->Mailer = 'qmail';\n    }\n\n    /**\n     * Add a \"To\" address.\n     * @param string $address The email address to send to\n     * @param string $name\n     * @return boolean true on success, false if address already used or invalid in some way\n     */\n    public function addAddress($address, $name = '')\n    {\n        return $this->addOrEnqueueAnAddress('to', $address, $name);\n    }\n\n    /**\n     * Add a \"CC\" address.\n     * @note: This function works with the SMTP mailer on win32, not with the \"mail\" mailer.\n     * @param string $address The email address to send to\n     * @param string $name\n     * @return boolean true on success, false if address already used or invalid in some way\n     */\n    public function addCC($address, $name = '')\n    {\n        return $this->addOrEnqueueAnAddress('cc', $address, $name);\n    }\n\n    /**\n     * Add a \"BCC\" address.\n     * @note: This function works with the SMTP mailer on win32, not with the \"mail\" mailer.\n     * @param string $address The email address to send to\n     * @param string $name\n     * @return boolean true on success, false if address already used or invalid in some way\n     */\n    public function addBCC($address, $name = '')\n    {\n        return $this->addOrEnqueueAnAddress('bcc', $address, $name);\n    }\n\n    /**\n     * Add a \"Reply-To\" address.\n     * @param string $address The email address to reply to\n     * @param string $name\n     * @return boolean true on success, false if address already used or invalid in some way\n     */\n    public function addReplyTo($address, $name = '')\n    {\n        return $this->addOrEnqueueAnAddress('Reply-To', $address, $name);\n    }\n\n    /**\n     * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer\n     * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still\n     * be modified after calling this function), addition of such addresses is delayed until send().\n     * Addresses that have been added already return false, but do not throw exceptions.\n     * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo'\n     * @param string $address The email address to send, resp. to reply to\n     * @param string $name\n     * @throws phpmailerException\n     * @return boolean true on success, false if address already used or invalid in some way\n     * @access protected\n     */\n    protected function addOrEnqueueAnAddress($kind, $address, $name)\n    {\n        $address = trim($address);\n        $name = trim(preg_replace('/[\\r\\n]+/', '', $name)); //Strip breaks and trim\n        if (($pos = strrpos($address, '@')) === false) {\n            // At-sign is misssing.\n            $error_message = $this->lang('invalid_address') . \" (addAnAddress $kind): $address\";\n            $this->setError($error_message);\n            $this->edebug($error_message);\n            if ($this->exceptions) {\n                throw new phpmailerException($error_message);\n            }\n            return false;\n        }\n        $params = array($kind, $address, $name);\n        // Enqueue addresses with IDN until we know the PHPMailer::$CharSet.\n        if ($this->has8bitChars(substr($address, ++$pos)) and $this->idnSupported()) {\n            if ($kind != 'Reply-To') {\n                if (!array_key_exists($address, $this->RecipientsQueue)) {\n                    $this->RecipientsQueue[$address] = $params;\n                    return true;\n                }\n            } else {\n                if (!array_key_exists($address, $this->ReplyToQueue)) {\n                    $this->ReplyToQueue[$address] = $params;\n                    return true;\n                }\n            }\n            return false;\n        }\n        // Immediately add standard addresses without IDN.\n        return call_user_func_array(array($this, 'addAnAddress'), $params);\n    }\n\n    /**\n     * Add an address to one of the recipient arrays or to the ReplyTo array.\n     * Addresses that have been added already return false, but do not throw exceptions.\n     * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo'\n     * @param string $address The email address to send, resp. to reply to\n     * @param string $name\n     * @throws phpmailerException\n     * @return boolean true on success, false if address already used or invalid in some way\n     * @access protected\n     */\n    protected function addAnAddress($kind, $address, $name = '')\n    {\n        if (!in_array($kind, array('to', 'cc', 'bcc', 'Reply-To'))) {\n            $error_message = $this->lang('Invalid recipient kind: ') . $kind;\n            $this->setError($error_message);\n            $this->edebug($error_message);\n            if ($this->exceptions) {\n                throw new phpmailerException($error_message);\n            }\n            return false;\n        }\n        if (!$this->validateAddress($address)) {\n            $error_message = $this->lang('invalid_address') . \" (addAnAddress $kind): $address\";\n            $this->setError($error_message);\n            $this->edebug($error_message);\n            if ($this->exceptions) {\n                throw new phpmailerException($error_message);\n            }\n            return false;\n        }\n        if ($kind != 'Reply-To') {\n            if (!array_key_exists(strtolower($address), $this->all_recipients)) {\n                array_push($this->$kind, array($address, $name));\n                $this->all_recipients[strtolower($address)] = true;\n                return true;\n            }\n        } else {\n            if (!array_key_exists(strtolower($address), $this->ReplyTo)) {\n                $this->ReplyTo[strtolower($address)] = array($address, $name);\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * Parse and validate a string containing one or more RFC822-style comma-separated email addresses\n     * of the form \"display name <address>\" into an array of name/address pairs.\n     * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available.\n     * Note that quotes in the name part are removed.\n     * @param string $addrstr The address list string\n     * @param bool $useimap Whether to use the IMAP extension to parse the list\n     * @return array\n     * @link http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation\n     */\n    public function parseAddresses($addrstr, $useimap = true)\n    {\n        $addresses = array();\n        if ($useimap and function_exists('imap_rfc822_parse_adrlist')) {\n            //Use this built-in parser if it's available\n            $list = imap_rfc822_parse_adrlist($addrstr, '');\n            foreach ($list as $address) {\n                if ($address->host != '.SYNTAX-ERROR.') {\n                    if ($this->validateAddress($address->mailbox . '@' . $address->host)) {\n                        $addresses[] = array(\n                            'name' => (property_exists($address, 'personal') ? $address->personal : ''),\n                            'address' => $address->mailbox . '@' . $address->host\n                        );\n                    }\n                }\n            }\n        } else {\n            //Use this simpler parser\n            $list = explode(',', $addrstr);\n            foreach ($list as $address) {\n                $address = trim($address);\n                //Is there a separate name part?\n                if (strpos($address, '<') === false) {\n                    //No separate name, just use the whole thing\n                    if ($this->validateAddress($address)) {\n                        $addresses[] = array(\n                            'name' => '',\n                            'address' => $address\n                        );\n                    }\n                } else {\n                    list($name, $email) = explode('<', $address);\n                    $email = trim(str_replace('>', '', $email));\n                    if ($this->validateAddress($email)) {\n                        $addresses[] = array(\n                            'name' => trim(str_replace(array('\"', \"'\"), '', $name)),\n                            'address' => $email\n                        );\n                    }\n                }\n            }\n        }\n        return $addresses;\n    }\n\n    /**\n     * Set the From and FromName properties.\n     * @param string $address\n     * @param string $name\n     * @param boolean $auto Whether to also set the Sender address, defaults to true\n     * @throws phpmailerException\n     * @return boolean\n     */\n    public function setFrom($address, $name = '', $auto = true)\n    {\n        $address = trim($address);\n        $name = trim(preg_replace('/[\\r\\n]+/', '', $name)); //Strip breaks and trim\n        // Don't validate now addresses with IDN. Will be done in send().\n        if (($pos = strrpos($address, '@')) === false or\n            (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and\n            !$this->validateAddress($address)) {\n            $error_message = $this->lang('invalid_address') . \" (setFrom) $address\";\n            $this->setError($error_message);\n            $this->edebug($error_message);\n            if ($this->exceptions) {\n                throw new phpmailerException($error_message);\n            }\n            return false;\n        }\n        $this->From = $address;\n        $this->FromName = $name;\n        if ($auto) {\n            if (empty($this->Sender)) {\n                $this->Sender = $address;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * Return the Message-ID header of the last email.\n     * Technically this is the value from the last time the headers were created,\n     * but it's also the message ID of the last sent message except in\n     * pathological cases.\n     * @return string\n     */\n    public function getLastMessageID()\n    {\n        return $this->lastMessageID;\n    }\n\n    /**\n     * Check that a string looks like an email address.\n     * @param string $address The email address to check\n     * @param string|callable $patternselect A selector for the validation pattern to use :\n     * * `auto` Pick best pattern automatically;\n     * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14;\n     * * `pcre` Use old PCRE implementation;\n     * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;\n     * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements.\n     * * `noregex` Don't use a regex: super fast, really dumb.\n     * Alternatively you may pass in a callable to inject your own validator, for example:\n     * PHPMailer::validateAddress('user@example.com', function($address) {\n     *     return (strpos($address, '@') !== false);\n     * });\n     * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator.\n     * @return boolean\n     * @static\n     * @access public\n     */\n    public static function validateAddress($address, $patternselect = null)\n    {\n        if (is_null($patternselect)) {\n            $patternselect = self::$validator;\n        }\n        if (is_callable($patternselect)) {\n            return call_user_func($patternselect, $address);\n        }\n        //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321\n        if (strpos($address, \"\\n\") !== false or strpos($address, \"\\r\") !== false) {\n            return false;\n        }\n        if (!$patternselect or $patternselect == 'auto') {\n            //Check this constant first so it works when extension_loaded() is disabled by safe mode\n            //Constant was added in PHP 5.2.4\n            if (defined('PCRE_VERSION')) {\n                //This pattern can get stuck in a recursive loop in PCRE <= 8.0.2\n                if (version_compare(PCRE_VERSION, '8.0.3') >= 0) {\n                    $patternselect = 'pcre8';\n                } else {\n                    $patternselect = 'pcre';\n                }\n            } elseif (function_exists('extension_loaded') and extension_loaded('pcre')) {\n                //Fall back to older PCRE\n                $patternselect = 'pcre';\n            } else {\n                //Filter_var appeared in PHP 5.2.0 and does not require the PCRE extension\n                if (version_compare(PHP_VERSION, '5.2.0') >= 0) {\n                    $patternselect = 'php';\n                } else {\n                    $patternselect = 'noregex';\n                }\n            }\n        }\n        switch ($patternselect) {\n            case 'pcre8':\n                /**\n                 * Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains.\n                 * @link http://squiloople.com/2009/12/20/email-address-validation/\n                 * @copyright 2009-2010 Michael Rushton\n                 * Feel free to use and redistribute this code. But please keep this copyright notice.\n                 */\n                return (boolean)preg_match(\n                    '/^(?!(?>(?1)\"?(?>\\\\\\[ -~]|[^\"])\"?(?1)){255,})(?!(?>(?1)\"?(?>\\\\\\[ -~]|[^\"])\"?(?1)){65,}@)' .\n                    '((?>(?>(?>((?>(?>(?>\\x0D\\x0A)?[\\t ])+|(?>[\\t ]*\\x0D\\x0A)?[\\t ]+)?)(\\((?>(?2)' .\n                    '(?>[\\x01-\\x08\\x0B\\x0C\\x0E-\\'*-\\[\\]-\\x7F]|\\\\\\[\\x00-\\x7F]|(?3)))*(?2)\\)))+(?2))|(?2))?)' .\n                    '([!#-\\'*+\\/-9=?^-~-]+|\"(?>(?2)(?>[\\x01-\\x08\\x0B\\x0C\\x0E-!#-\\[\\]-\\x7F]|\\\\\\[\\x00-\\x7F]))*' .\n                    '(?2)\")(?>(?1)\\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' .\n                    '(?>(?1)\\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' .\n                    '|(?!(?:.*[a-f0-9][:\\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' .\n                    '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' .\n                    '|[1-9]?[0-9])(?>\\.(?9)){3}))\\])(?1)$/isD',\n                    $address\n                );\n            case 'pcre':\n                //An older regex that doesn't need a recent PCRE\n                return (boolean)preg_match(\n                    '/^(?!(?>\"?(?>\\\\\\[ -~]|[^\"])\"?){255,})(?!(?>\"?(?>\\\\\\[ -~]|[^\"])\"?){65,}@)(?>' .\n                    '[!#-\\'*+\\/-9=?^-~-]+|\"(?>(?>[\\x01-\\x08\\x0B\\x0C\\x0E-!#-\\[\\]-\\x7F]|\\\\\\[\\x00-\\xFF]))*\")' .\n                    '(?>\\.(?>[!#-\\'*+\\/-9=?^-~-]+|\"(?>(?>[\\x01-\\x08\\x0B\\x0C\\x0E-!#-\\[\\]-\\x7F]|\\\\\\[\\x00-\\xFF]))*\"))*' .\n                    '@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\\.(?![a-z0-9-]{64,})' .\n                    '(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' .\n                    '[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' .\n                    '::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' .\n                    '[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' .\n                    '::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' .\n                    '|[1-9]?[0-9])(?>\\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\\])$/isD',\n                    $address\n                );\n            case 'html5':\n                /**\n                 * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements.\n                 * @link http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email)\n                 */\n                return (boolean)preg_match(\n                    '/^[a-zA-Z0-9.!#$%&\\'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' .\n                    '[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD',\n                    $address\n                );\n            case 'noregex':\n                //No PCRE! Do something _very_ approximate!\n                //Check the address is 3 chars or longer and contains an @ that's not the first or last char\n                return (strlen($address) >= 3\n                    and strpos($address, '@') >= 1\n                    and strpos($address, '@') != strlen($address) - 1);\n            case 'php':\n            default:\n                return (boolean)filter_var($address, FILTER_VALIDATE_EMAIL);\n        }\n    }\n\n    /**\n     * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the\n     * \"intl\" and \"mbstring\" PHP extensions.\n     * @return bool \"true\" if required functions for IDN support are present\n     */\n    public function idnSupported()\n    {\n        // @TODO: Write our own \"idn_to_ascii\" function for PHP <= 5.2.\n        return function_exists('idn_to_ascii') and function_exists('mb_convert_encoding');\n    }\n\n    /**\n     * Converts IDN in given email address to its ASCII form, also known as punycode, if possible.\n     * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet.\n     * This function silently returns unmodified address if:\n     * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form)\n     * - Conversion to punycode is impossible (e.g. required PHP functions are not available)\n     *   or fails for any reason (e.g. domain has characters not allowed in an IDN)\n     * @see PHPMailer::$CharSet\n     * @param string $address The email address to convert\n     * @return string The encoded address in ASCII form\n     */\n    public function punyencodeAddress($address)\n    {\n        // Verify we have required functions, CharSet, and at-sign.\n        if ($this->idnSupported() and\n            !empty($this->CharSet) and\n            ($pos = strrpos($address, '@')) !== false) {\n            $domain = substr($address, ++$pos);\n            // Verify CharSet string is a valid one, and domain properly encoded in this CharSet.\n            if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) {\n                $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet);\n                if (($punycode = defined('INTL_IDNA_VARIANT_UTS46') ?\n                    idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) :\n                    idn_to_ascii($domain)) !== false) {\n                    return substr($address, 0, $pos) . $punycode;\n                }\n            }\n        }\n        return $address;\n    }\n\n    /**\n     * Create a message and send it.\n     * Uses the sending method specified by $Mailer.\n     * @throws phpmailerException\n     * @return boolean false on error - See the ErrorInfo property for details of the error.\n     */\n    public function send()\n    {\n        try {\n            if (!$this->preSend()) {\n                return false;\n            }\n            return $this->postSend();\n        } catch (phpmailerException $exc) {\n            $this->mailHeader = '';\n            $this->setError($exc->getMessage());\n            if ($this->exceptions) {\n                throw $exc;\n            }\n            return false;\n        }\n    }\n\n    /**\n     * Prepare a message for sending.\n     * @throws phpmailerException\n     * @return boolean\n     */\n    public function preSend()\n    {\n        try {\n            $this->error_count = 0; // Reset errors\n            $this->mailHeader = '';\n\n            // Dequeue recipient and Reply-To addresses with IDN\n            foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) {\n                $params[1] = $this->punyencodeAddress($params[1]);\n                call_user_func_array(array($this, 'addAnAddress'), $params);\n            }\n            if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) {\n                throw new phpmailerException($this->lang('provide_address'), self::STOP_CRITICAL);\n            }\n\n            // Validate From, Sender, and ConfirmReadingTo addresses\n            foreach (array('From', 'Sender', 'ConfirmReadingTo') as $address_kind) {\n                $this->$address_kind = trim($this->$address_kind);\n                if (empty($this->$address_kind)) {\n                    continue;\n                }\n                $this->$address_kind = $this->punyencodeAddress($this->$address_kind);\n                if (!$this->validateAddress($this->$address_kind)) {\n                    $error_message = $this->lang('invalid_address') . ' (punyEncode) ' . $this->$address_kind;\n                    $this->setError($error_message);\n                    $this->edebug($error_message);\n                    if ($this->exceptions) {\n                        throw new phpmailerException($error_message);\n                    }\n                    return false;\n                }\n            }\n\n            // Set whether the message is multipart/alternative\n            if ($this->alternativeExists()) {\n                $this->ContentType = 'multipart/alternative';\n            }\n\n            $this->setMessageType();\n            // Refuse to send an empty message unless we are specifically allowing it\n            if (!$this->AllowEmpty and empty($this->Body)) {\n                throw new phpmailerException($this->lang('empty_message'), self::STOP_CRITICAL);\n            }\n\n            // Create body before headers in case body makes changes to headers (e.g. altering transfer encoding)\n            $this->MIMEHeader = '';\n            $this->MIMEBody = $this->createBody();\n            // createBody may have added some headers, so retain them\n            $tempheaders = $this->MIMEHeader;\n            $this->MIMEHeader = $this->createHeader();\n            $this->MIMEHeader .= $tempheaders;\n\n            // To capture the complete message when using mail(), create\n            // an extra header list which createHeader() doesn't fold in\n            if ($this->Mailer == 'mail') {\n                if (count($this->to) > 0) {\n                    $this->mailHeader .= $this->addrAppend('To', $this->to);\n                } else {\n                    $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;');\n                }\n                $this->mailHeader .= $this->headerLine(\n                    'Subject',\n                    $this->encodeHeader($this->secureHeader(trim($this->Subject)))\n                );\n            }\n\n            // Sign with DKIM if enabled\n            if (!empty($this->DKIM_domain)\n                && !empty($this->DKIM_selector)\n                && (!empty($this->DKIM_private_string)\n                   || (!empty($this->DKIM_private) && file_exists($this->DKIM_private))\n                )\n            ) {\n                $header_dkim = $this->DKIM_Add(\n                    $this->MIMEHeader . $this->mailHeader,\n                    $this->encodeHeader($this->secureHeader($this->Subject)),\n                    $this->MIMEBody\n                );\n                $this->MIMEHeader = rtrim($this->MIMEHeader, \"\\r\\n \") . self::CRLF .\n                    str_replace(\"\\r\\n\", \"\\n\", $header_dkim) . self::CRLF;\n            }\n            return true;\n        } catch (phpmailerException $exc) {\n            $this->setError($exc->getMessage());\n            if ($this->exceptions) {\n                throw $exc;\n            }\n            return false;\n        }\n    }\n\n    /**\n     * Actually send a message.\n     * Send the email via the selected mechanism\n     * @throws phpmailerException\n     * @return boolean\n     */\n    public function postSend()\n    {\n        try {\n            // Choose the mailer and send through it\n            switch ($this->Mailer) {\n                case 'sendmail':\n                case 'qmail':\n                    return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody);\n                case 'smtp':\n                    return $this->smtpSend($this->MIMEHeader, $this->MIMEBody);\n                case 'mail':\n                    return $this->mailSend($this->MIMEHeader, $this->MIMEBody);\n                default:\n                    $sendMethod = $this->Mailer.'Send';\n                    if (method_exists($this, $sendMethod)) {\n                        return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody);\n                    }\n\n                    return $this->mailSend($this->MIMEHeader, $this->MIMEBody);\n            }\n        } catch (phpmailerException $exc) {\n            $this->setError($exc->getMessage());\n            $this->edebug($exc->getMessage());\n            if ($this->exceptions) {\n                throw $exc;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * Send mail using the $Sendmail program.\n     * @param string $header The message headers\n     * @param string $body The message body\n     * @see PHPMailer::$Sendmail\n     * @throws phpmailerException\n     * @access protected\n     * @return boolean\n     */\n    protected function sendmailSend($header, $body)\n    {\n        // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.\n        if (!empty($this->Sender) and self::isShellSafe($this->Sender)) {\n            if ($this->Mailer == 'qmail') {\n                $sendmailFmt = '%s -f%s';\n            } else {\n                $sendmailFmt = '%s -oi -f%s -t';\n            }\n        } else {\n            if ($this->Mailer == 'qmail') {\n                $sendmailFmt = '%s';\n            } else {\n                $sendmailFmt = '%s -oi -t';\n            }\n        }\n\n        // TODO: If possible, this should be changed to escapeshellarg.  Needs thorough testing.\n        $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender);\n\n        if ($this->SingleTo) {\n            foreach ($this->SingleToArray as $toAddr) {\n                if (!@$mail = popen($sendmail, 'w')) {\n                    throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);\n                }\n                fputs($mail, 'To: ' . $toAddr . \"\\n\");\n                fputs($mail, $header);\n                fputs($mail, $body);\n                $result = pclose($mail);\n                $this->doCallback(\n                    ($result == 0),\n                    array($toAddr),\n                    $this->cc,\n                    $this->bcc,\n                    $this->Subject,\n                    $body,\n                    $this->From\n                );\n                if ($result != 0) {\n                    throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);\n                }\n            }\n        } else {\n            if (!@$mail = popen($sendmail, 'w')) {\n                throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);\n            }\n            fputs($mail, $header);\n            fputs($mail, $body);\n            $result = pclose($mail);\n            $this->doCallback(\n                ($result == 0),\n                $this->to,\n                $this->cc,\n                $this->bcc,\n                $this->Subject,\n                $body,\n                $this->From\n            );\n            if ($result != 0) {\n                throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);\n            }\n        }\n        return true;\n    }\n\n    /**\n     * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.\n     *\n     * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows.\n     * @param string $string The string to be validated\n     * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report\n     * @access protected\n     * @return boolean\n     */\n    protected static function isShellSafe($string)\n    {\n        // Future-proof\n        if (escapeshellcmd($string) !== $string\n            or !in_array(escapeshellarg($string), array(\"'$string'\", \"\\\"$string\\\"\"))\n        ) {\n            return false;\n        }\n\n        $length = strlen($string);\n\n        for ($i = 0; $i < $length; $i++) {\n            $c = $string[$i];\n\n            // All other characters have a special meaning in at least one common shell, including = and +.\n            // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here.\n            // Note that this does permit non-Latin alphanumeric characters based on the current locale.\n            if (!ctype_alnum($c) && strpos('@_-.', $c) === false) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    /**\n     * Send mail using the PHP mail() function.\n     * @param string $header The message headers\n     * @param string $body The message body\n     * @link http://www.php.net/manual/en/book.mail.php\n     * @throws phpmailerException\n     * @access protected\n     * @return boolean\n     */\n    protected function mailSend($header, $body)\n    {\n        $toArr = array();\n        foreach ($this->to as $toaddr) {\n            $toArr[] = $this->addrFormat($toaddr);\n        }\n        $to = implode(', ', $toArr);\n\n        $params = null;\n        //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver\n        if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {\n            // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.\n            if (self::isShellSafe($this->Sender)) {\n                $params = sprintf('-f%s', $this->Sender);\n            }\n        }\n        if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) {\n            $old_from = ini_get('sendmail_from');\n            ini_set('sendmail_from', $this->Sender);\n        }\n        $result = false;\n        if ($this->SingleTo and count($toArr) > 1) {\n            foreach ($toArr as $toAddr) {\n                $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);\n                $this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From);\n            }\n        } else {\n            $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params);\n            $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From);\n        }\n        if (isset($old_from)) {\n            ini_set('sendmail_from', $old_from);\n        }\n        if (!$result) {\n            throw new phpmailerException($this->lang('instantiate'), self::STOP_CRITICAL);\n        }\n        return true;\n    }\n\n    /**\n     * Get an instance to use for SMTP operations.\n     * Override this function to load your own SMTP implementation\n     * @return SMTP\n     */\n    public function getSMTPInstance()\n    {\n        if (!is_object($this->smtp)) {\n            $this->smtp = new SMTP;\n        }\n        return $this->smtp;\n    }\n\n    /**\n     * Send mail via SMTP.\n     * Returns false if there is a bad MAIL FROM, RCPT, or DATA input.\n     * Uses the PHPMailerSMTP class by default.\n     * @see PHPMailer::getSMTPInstance() to use a different class.\n     * @param string $header The message headers\n     * @param string $body The message body\n     * @throws phpmailerException\n     * @uses SMTP\n     * @access protected\n     * @return boolean\n     */\n    protected function smtpSend($header, $body)\n    {\n        $bad_rcpt = array();\n        if (!$this->smtpConnect($this->SMTPOptions)) {\n            throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);\n        }\n        if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {\n            $smtp_from = $this->Sender;\n        } else {\n            $smtp_from = $this->From;\n        }\n        if (!$this->smtp->mail($smtp_from)) {\n            $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));\n            throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL);\n        }\n\n        // Attempt to send to all recipients\n        foreach (array($this->to, $this->cc, $this->bcc) as $togroup) {\n            foreach ($togroup as $to) {\n                if (!$this->smtp->recipient($to[0])) {\n                    $error = $this->smtp->getError();\n                    $bad_rcpt[] = array('to' => $to[0], 'error' => $error['detail']);\n                    $isSent = false;\n                } else {\n                    $isSent = true;\n                }\n                $this->doCallback($isSent, array($to[0]), array(), array(), $this->Subject, $body, $this->From);\n            }\n        }\n\n        // Only send the DATA command if we have viable recipients\n        if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) {\n            throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL);\n        }\n        if ($this->SMTPKeepAlive) {\n            $this->smtp->reset();\n        } else {\n            $this->smtp->quit();\n            $this->smtp->close();\n        }\n        //Create error message for any bad addresses\n        if (count($bad_rcpt) > 0) {\n            $errstr = '';\n            foreach ($bad_rcpt as $bad) {\n                $errstr .= $bad['to'] . ': ' . $bad['error'];\n            }\n            throw new phpmailerException(\n                $this->lang('recipients_failed') . $errstr,\n                self::STOP_CONTINUE\n            );\n        }\n        return true;\n    }\n\n    /**\n     * Initiate a connection to an SMTP server.\n     * Returns false if the operation failed.\n     * @param array $options An array of options compatible with stream_context_create()\n     * @uses SMTP\n     * @access public\n     * @throws phpmailerException\n     * @return boolean\n     */\n    public function smtpConnect($options = null)\n    {\n        if (is_null($this->smtp)) {\n            $this->smtp = $this->getSMTPInstance();\n        }\n\n        //If no options are provided, use whatever is set in the instance\n        if (is_null($options)) {\n            $options = $this->SMTPOptions;\n        }\n\n        // Already connected?\n        if ($this->smtp->connected()) {\n            return true;\n        }\n\n        $this->smtp->setTimeout($this->Timeout);\n        $this->smtp->setDebugLevel($this->SMTPDebug);\n        $this->smtp->setDebugOutput($this->Debugoutput);\n        $this->smtp->setVerp($this->do_verp);\n        $hosts = explode(';', $this->Host);\n        $lastexception = null;\n\n        foreach ($hosts as $hostentry) {\n            $hostinfo = array();\n            if (!preg_match(\n                '/^((ssl|tls):\\/\\/)*([a-zA-Z0-9\\.-]*|\\[[a-fA-F0-9:]+\\]):?([0-9]*)$/',\n                trim($hostentry),\n                $hostinfo\n            )) {\n                // Not a valid host entry\n                $this->edebug('Ignoring invalid host: ' . $hostentry);\n                continue;\n            }\n            // $hostinfo[2]: optional ssl or tls prefix\n            // $hostinfo[3]: the hostname\n            // $hostinfo[4]: optional port number\n            // The host string prefix can temporarily override the current setting for SMTPSecure\n            // If it's not specified, the default value is used\n            $prefix = '';\n            $secure = $this->SMTPSecure;\n            $tls = ($this->SMTPSecure == 'tls');\n            if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) {\n                $prefix = 'ssl://';\n                $tls = false; // Can't have SSL and TLS at the same time\n                $secure = 'ssl';\n            } elseif ($hostinfo[2] == 'tls') {\n                $tls = true;\n                // tls doesn't use a prefix\n                $secure = 'tls';\n            }\n            //Do we need the OpenSSL extension?\n            $sslext = defined('OPENSSL_ALGO_SHA1');\n            if ('tls' === $secure or 'ssl' === $secure) {\n                //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled\n                if (!$sslext) {\n                    throw new phpmailerException($this->lang('extension_missing').'openssl', self::STOP_CRITICAL);\n                }\n            }\n            $host = $hostinfo[3];\n            $port = $this->Port;\n            $tport = (integer)$hostinfo[4];\n            if ($tport > 0 and $tport < 65536) {\n                $port = $tport;\n            }\n            if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) {\n                try {\n                    if ($this->Helo) {\n                        $hello = $this->Helo;\n                    } else {\n                        $hello = $this->serverHostname();\n                    }\n                    $this->smtp->hello($hello);\n                    //Automatically enable TLS encryption if:\n                    // * it's not disabled\n                    // * we have openssl extension\n                    // * we are not already using SSL\n                    // * the server offers STARTTLS\n                    if ($this->SMTPAutoTLS and $sslext and $secure != 'ssl' and $this->smtp->getServerExt('STARTTLS')) {\n                        $tls = true;\n                    }\n                    if ($tls) {\n                        if (!$this->smtp->startTLS()) {\n                            throw new phpmailerException($this->lang('connect_host'));\n                        }\n                        // We must resend EHLO after TLS negotiation\n                        $this->smtp->hello($hello);\n                    }\n                    if ($this->SMTPAuth) {\n                        if (!$this->smtp->authenticate(\n                            $this->Username,\n                            $this->Password,\n                            $this->AuthType,\n                            $this->Realm,\n                            $this->Workstation\n                        )\n                        ) {\n                            throw new phpmailerException($this->lang('authenticate'));\n                        }\n                    }\n                    return true;\n                } catch (phpmailerException $exc) {\n                    $lastexception = $exc;\n                    $this->edebug($exc->getMessage());\n                    // We must have connected, but then failed TLS or Auth, so close connection nicely\n                    $this->smtp->quit();\n                }\n            }\n        }\n        // If we get here, all connection attempts have failed, so close connection hard\n        $this->smtp->close();\n        // As we've caught all exceptions, just report whatever the last one was\n        if ($this->exceptions and !is_null($lastexception)) {\n            throw $lastexception;\n        }\n        return false;\n    }\n\n    /**\n     * Close the active SMTP session if one exists.\n     * @return void\n     */\n    public function smtpClose()\n    {\n        if (is_a($this->smtp, 'SMTP')) {\n            if ($this->smtp->connected()) {\n                $this->smtp->quit();\n                $this->smtp->close();\n            }\n        }\n    }\n\n    /**\n     * Set the language for error messages.\n     * Returns false if it cannot load the language file.\n     * The default language is English.\n     * @param string $langcode ISO 639-1 2-character language code (e.g. French is \"fr\")\n     * @param string $lang_path Path to the language file directory, with trailing separator (slash)\n     * @return boolean\n     * @access public\n     */\n    public function setLanguage($langcode = 'en', $lang_path = '')\n    {\n        // Backwards compatibility for renamed language codes\n        $renamed_langcodes = array(\n            'br' => 'pt_br',\n            'cz' => 'cs',\n            'dk' => 'da',\n            'no' => 'nb',\n            'se' => 'sv',\n            'sr' => 'rs'\n        );\n\n        if (isset($renamed_langcodes[$langcode])) {\n            $langcode = $renamed_langcodes[$langcode];\n        }\n\n        // Define full set of translatable strings in English\n        $PHPMAILER_LANG = array(\n            'authenticate' => 'SMTP Error: Could not authenticate.',\n            'connect_host' => 'SMTP Error: Could not connect to SMTP host.',\n            'data_not_accepted' => 'SMTP Error: data not accepted.',\n            'empty_message' => 'Message body empty',\n            'encoding' => 'Unknown encoding: ',\n            'execute' => 'Could not execute: ',\n            'file_access' => 'Could not access file: ',\n            'file_open' => 'File Error: Could not open file: ',\n            'from_failed' => 'The following From address failed: ',\n            'instantiate' => 'Could not instantiate mail function.',\n            'invalid_address' => 'Invalid address: ',\n            'mailer_not_supported' => ' mailer is not supported.',\n            'provide_address' => 'You must provide at least one recipient email address.',\n            'recipients_failed' => 'SMTP Error: The following recipients failed: ',\n            'signing' => 'Signing Error: ',\n            'smtp_connect_failed' => 'SMTP connect() failed.',\n            'smtp_error' => 'SMTP server error: ',\n            'variable_set' => 'Cannot set or reset variable: ',\n            'extension_missing' => 'Extension missing: '\n        );\n        if (empty($lang_path)) {\n            // Calculate an absolute path so it can work if CWD is not here\n            $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR;\n        }\n        //Validate $langcode\n        if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {\n            $langcode = 'en';\n        }\n        $foundlang = true;\n        $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';\n        // There is no English translation file\n        if ($langcode != 'en') {\n            // Make sure language file path is readable\n            if (!is_readable($lang_file)) {\n                $foundlang = false;\n            } else {\n                // Overwrite language-specific strings.\n                // This way we'll never have missing translation keys.\n                $foundlang = include $lang_file;\n            }\n        }\n        $this->language = $PHPMAILER_LANG;\n        return (boolean)$foundlang; // Returns false if language not found\n    }\n\n    /**\n     * Get the array of strings for the current language.\n     * @return array\n     */\n    public function getTranslations()\n    {\n        return $this->language;\n    }\n\n    /**\n     * Create recipient headers.\n     * @access public\n     * @param string $type\n     * @param array $addr An array of recipient,\n     * where each recipient is a 2-element indexed array with element 0 containing an address\n     * and element 1 containing a name, like:\n     * array(array('joe@example.com', 'Joe User'), array('zoe@example.com', 'Zoe User'))\n     * @return string\n     */\n    public function addrAppend($type, $addr)\n    {\n        $addresses = array();\n        foreach ($addr as $address) {\n            $addresses[] = $this->addrFormat($address);\n        }\n        return $type . ': ' . implode(', ', $addresses) . $this->LE;\n    }\n\n    /**\n     * Format an address for use in a message header.\n     * @access public\n     * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name\n     *      like array('joe@example.com', 'Joe User')\n     * @return string\n     */\n    public function addrFormat($addr)\n    {\n        if (empty($addr[1])) { // No name provided\n            return $this->secureHeader($addr[0]);\n        } else {\n            return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader(\n                $addr[0]\n            ) . '>';\n        }\n    }\n\n    /**\n     * Word-wrap message.\n     * For use with mailers that do not automatically perform wrapping\n     * and for quoted-printable encoded messages.\n     * Original written by philippe.\n     * @param string $message The message to wrap\n     * @param integer $length The line length to wrap to\n     * @param boolean $qp_mode Whether to run in Quoted-Printable mode\n     * @access public\n     * @return string\n     */\n    public function wrapText($message, $length, $qp_mode = false)\n    {\n        if ($qp_mode) {\n            $soft_break = sprintf(' =%s', $this->LE);\n        } else {\n            $soft_break = $this->LE;\n        }\n        // If utf-8 encoding is used, we will need to make sure we don't\n        // split multibyte characters when we wrap\n        $is_utf8 = (strtolower($this->CharSet) == 'utf-8');\n        $lelen = strlen($this->LE);\n        $crlflen = strlen(self::CRLF);\n\n        $message = $this->fixEOL($message);\n        //Remove a trailing line break\n        if (substr($message, -$lelen) == $this->LE) {\n            $message = substr($message, 0, -$lelen);\n        }\n\n        //Split message into lines\n        $lines = explode($this->LE, $message);\n        //Message will be rebuilt in here\n        $message = '';\n        foreach ($lines as $line) {\n            $words = explode(' ', $line);\n            $buf = '';\n            $firstword = true;\n            foreach ($words as $word) {\n                if ($qp_mode and (strlen($word) > $length)) {\n                    $space_left = $length - strlen($buf) - $crlflen;\n                    if (!$firstword) {\n                        if ($space_left > 20) {\n                            $len = $space_left;\n                            if ($is_utf8) {\n                                $len = $this->utf8CharBoundary($word, $len);\n                            } elseif (substr($word, $len - 1, 1) == '=') {\n                                $len--;\n                            } elseif (substr($word, $len - 2, 1) == '=') {\n                                $len -= 2;\n                            }\n                            $part = substr($word, 0, $len);\n                            $word = substr($word, $len);\n                            $buf .= ' ' . $part;\n                            $message .= $buf . sprintf('=%s', self::CRLF);\n                        } else {\n                            $message .= $buf . $soft_break;\n                        }\n                        $buf = '';\n                    }\n                    while (strlen($word) > 0) {\n                        if ($length <= 0) {\n                            break;\n                        }\n                        $len = $length;\n                        if ($is_utf8) {\n                            $len = $this->utf8CharBoundary($word, $len);\n                        } elseif (substr($word, $len - 1, 1) == '=') {\n                            $len--;\n                        } elseif (substr($word, $len - 2, 1) == '=') {\n                            $len -= 2;\n                        }\n                        $part = substr($word, 0, $len);\n                        $word = substr($word, $len);\n\n                        if (strlen($word) > 0) {\n                            $message .= $part . sprintf('=%s', self::CRLF);\n                        } else {\n                            $buf = $part;\n                        }\n                    }\n                } else {\n                    $buf_o = $buf;\n                    if (!$firstword) {\n                        $buf .= ' ';\n                    }\n                    $buf .= $word;\n\n                    if (strlen($buf) > $length and $buf_o != '') {\n                        $message .= $buf_o . $soft_break;\n                        $buf = $word;\n                    }\n                }\n                $firstword = false;\n            }\n            $message .= $buf . self::CRLF;\n        }\n\n        return $message;\n    }\n\n    /**\n     * Find the last character boundary prior to $maxLength in a utf-8\n     * quoted-printable encoded string.\n     * Original written by Colin Brown.\n     * @access public\n     * @param string $encodedText utf-8 QP text\n     * @param integer $maxLength Find the last character boundary prior to this length\n     * @return integer\n     */\n    public function utf8CharBoundary($encodedText, $maxLength)\n    {\n        $foundSplitPos = false;\n        $lookBack = 3;\n        while (!$foundSplitPos) {\n            $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack);\n            $encodedCharPos = strpos($lastChunk, '=');\n            if (false !== $encodedCharPos) {\n                // Found start of encoded character byte within $lookBack block.\n                // Check the encoded byte value (the 2 chars after the '=')\n                $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2);\n                $dec = hexdec($hex);\n                if ($dec < 128) {\n                    // Single byte character.\n                    // If the encoded char was found at pos 0, it will fit\n                    // otherwise reduce maxLength to start of the encoded char\n                    if ($encodedCharPos > 0) {\n                        $maxLength = $maxLength - ($lookBack - $encodedCharPos);\n                    }\n                    $foundSplitPos = true;\n                } elseif ($dec >= 192) {\n                    // First byte of a multi byte character\n                    // Reduce maxLength to split at start of character\n                    $maxLength = $maxLength - ($lookBack - $encodedCharPos);\n                    $foundSplitPos = true;\n                } elseif ($dec < 192) {\n                    // Middle byte of a multi byte character, look further back\n                    $lookBack += 3;\n                }\n            } else {\n                // No encoded character found\n                $foundSplitPos = true;\n            }\n        }\n        return $maxLength;\n    }\n\n    /**\n     * Apply word wrapping to the message body.\n     * Wraps the message body to the number of chars set in the WordWrap property.\n     * You should only do this to plain-text bodies as wrapping HTML tags may break them.\n     * This is called automatically by createBody(), so you don't need to call it yourself.\n     * @access public\n     * @return void\n     */\n    public function setWordWrap()\n    {\n        if ($this->WordWrap < 1) {\n            return;\n        }\n\n        switch ($this->message_type) {\n            case 'alt':\n            case 'alt_inline':\n            case 'alt_attach':\n            case 'alt_inline_attach':\n                $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap);\n                break;\n            default:\n                $this->Body = $this->wrapText($this->Body, $this->WordWrap);\n                break;\n        }\n    }\n\n    /**\n     * Assemble message headers.\n     * @access public\n     * @return string The assembled headers\n     */\n    public function createHeader()\n    {\n        $result = '';\n\n        $result .= $this->headerLine('Date', $this->MessageDate == '' ? self::rfcDate() : $this->MessageDate);\n\n        // To be created automatically by mail()\n        if ($this->SingleTo) {\n            if ($this->Mailer != 'mail') {\n                foreach ($this->to as $toaddr) {\n                    $this->SingleToArray[] = $this->addrFormat($toaddr);\n                }\n            }\n        } else {\n            if (count($this->to) > 0) {\n                if ($this->Mailer != 'mail') {\n                    $result .= $this->addrAppend('To', $this->to);\n                }\n            } elseif (count($this->cc) == 0) {\n                $result .= $this->headerLine('To', 'undisclosed-recipients:;');\n            }\n        }\n\n        $result .= $this->addrAppend('From', array(array(trim($this->From), $this->FromName)));\n\n        // sendmail and mail() extract Cc from the header before sending\n        if (count($this->cc) > 0) {\n            $result .= $this->addrAppend('Cc', $this->cc);\n        }\n\n        // sendmail and mail() extract Bcc from the header before sending\n        if ((\n                $this->Mailer == 'sendmail' or $this->Mailer == 'qmail' or $this->Mailer == 'mail'\n            )\n            and count($this->bcc) > 0\n        ) {\n            $result .= $this->addrAppend('Bcc', $this->bcc);\n        }\n\n        if (count($this->ReplyTo) > 0) {\n            $result .= $this->addrAppend('Reply-To', $this->ReplyTo);\n        }\n\n        // mail() sets the subject itself\n        if ($this->Mailer != 'mail') {\n            $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject)));\n        }\n\n        // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4\n        // https://tools.ietf.org/html/rfc5322#section-3.6.4\n        if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) {\n            $this->lastMessageID = $this->MessageID;\n        } else {\n            $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname());\n        }\n        $result .= $this->headerLine('Message-ID', $this->lastMessageID);\n        if (!is_null($this->Priority)) {\n            $result .= $this->headerLine('X-Priority', $this->Priority);\n        }\n        if ($this->XMailer == '') {\n            $result .= $this->headerLine(\n                'X-Mailer',\n                'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer)'\n            );\n        } else {\n            $myXmailer = trim($this->XMailer);\n            if ($myXmailer) {\n                $result .= $this->headerLine('X-Mailer', $myXmailer);\n            }\n        }\n\n        if ($this->ConfirmReadingTo != '') {\n            $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>');\n        }\n\n        // Add custom headers\n        foreach ($this->CustomHeader as $header) {\n            $result .= $this->headerLine(\n                trim($header[0]),\n                $this->encodeHeader(trim($header[1]))\n            );\n        }\n        if (!$this->sign_key_file) {\n            $result .= $this->headerLine('MIME-Version', '1.0');\n            $result .= $this->getMailMIME();\n        }\n\n        return $result;\n    }\n\n    /**\n     * Get the message MIME type headers.\n     * @access public\n     * @return string\n     */\n    public function getMailMIME()\n    {\n        $result = '';\n        $ismultipart = true;\n        switch ($this->message_type) {\n            case 'inline':\n                $result .= $this->headerLine('Content-Type', 'multipart/related;');\n                $result .= $this->textLine(\"\\tboundary=\\\"\" . $this->boundary[1] . '\"');\n                break;\n            case 'attach':\n            case 'inline_attach':\n            case 'alt_attach':\n            case 'alt_inline_attach':\n                $result .= $this->headerLine('Content-Type', 'multipart/mixed;');\n                $result .= $this->textLine(\"\\tboundary=\\\"\" . $this->boundary[1] . '\"');\n                break;\n            case 'alt':\n            case 'alt_inline':\n                $result .= $this->headerLine('Content-Type', 'multipart/alternative;');\n                $result .= $this->textLine(\"\\tboundary=\\\"\" . $this->boundary[1] . '\"');\n                break;\n            default:\n                // Catches case 'plain': and case '':\n                $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet);\n                $ismultipart = false;\n                break;\n        }\n        // RFC1341 part 5 says 7bit is assumed if not specified\n        if ($this->Encoding != '7bit') {\n            // RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE\n            if ($ismultipart) {\n                if ($this->Encoding == '8bit') {\n                    $result .= $this->headerLine('Content-Transfer-Encoding', '8bit');\n                }\n                // The only remaining alternatives are quoted-printable and base64, which are both 7bit compatible\n            } else {\n                $result .= $this->headerLine('Content-Transfer-Encoding', $this->Encoding);\n            }\n        }\n\n        if ($this->Mailer != 'mail') {\n            $result .= $this->LE;\n        }\n\n        return $result;\n    }\n\n    /**\n     * Returns the whole MIME message.\n     * Includes complete headers and body.\n     * Only valid post preSend().\n     * @see PHPMailer::preSend()\n     * @access public\n     * @return string\n     */\n    public function getSentMIMEMessage()\n    {\n        return rtrim($this->MIMEHeader . $this->mailHeader, \"\\n\\r\") . self::CRLF . self::CRLF . $this->MIMEBody;\n    }\n\n    /**\n     * Create unique ID\n     * @return string\n     */\n    protected function generateId() {\n        return md5(uniqid(time()));\n    }\n\n    /**\n     * Assemble the message body.\n     * Returns an empty string on failure.\n     * @access public\n     * @throws phpmailerException\n     * @return string The assembled message body\n     */\n    public function createBody()\n    {\n        $body = '';\n        //Create unique IDs and preset boundaries\n        $this->uniqueid = $this->generateId();\n        $this->boundary[1] = 'b1_' . $this->uniqueid;\n        $this->boundary[2] = 'b2_' . $this->uniqueid;\n        $this->boundary[3] = 'b3_' . $this->uniqueid;\n\n        if ($this->sign_key_file) {\n            $body .= $this->getMailMIME() . $this->LE;\n        }\n\n        $this->setWordWrap();\n\n        $bodyEncoding = $this->Encoding;\n        $bodyCharSet = $this->CharSet;\n        //Can we do a 7-bit downgrade?\n        if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) {\n            $bodyEncoding = '7bit';\n            //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit\n            $bodyCharSet = 'us-ascii';\n        }\n        //If lines are too long, and we're not already using an encoding that will shorten them,\n        //change to quoted-printable transfer encoding for the body part only\n        if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) {\n            $bodyEncoding = 'quoted-printable';\n        }\n\n        $altBodyEncoding = $this->Encoding;\n        $altBodyCharSet = $this->CharSet;\n        //Can we do a 7-bit downgrade?\n        if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) {\n            $altBodyEncoding = '7bit';\n            //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit\n            $altBodyCharSet = 'us-ascii';\n        }\n        //If lines are too long, and we're not already using an encoding that will shorten them,\n        //change to quoted-printable transfer encoding for the alt body part only\n        if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) {\n            $altBodyEncoding = 'quoted-printable';\n        }\n        //Use this as a preamble in all multipart message types\n        $mimepre = \"This is a multi-part message in MIME format.\" . $this->LE . $this->LE;\n        switch ($this->message_type) {\n            case 'inline':\n                $body .= $mimepre;\n                $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding);\n                $body .= $this->encodeString($this->Body, $bodyEncoding);\n                $body .= $this->LE . $this->LE;\n                $body .= $this->attachAll('inline', $this->boundary[1]);\n                break;\n            case 'attach':\n                $body .= $mimepre;\n                $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding);\n                $body .= $this->encodeString($this->Body, $bodyEncoding);\n                $body .= $this->LE . $this->LE;\n                $body .= $this->attachAll('attachment', $this->boundary[1]);\n                break;\n            case 'inline_attach':\n                $body .= $mimepre;\n                $body .= $this->textLine('--' . $this->boundary[1]);\n                $body .= $this->headerLine('Content-Type', 'multipart/related;');\n                $body .= $this->textLine(\"\\tboundary=\\\"\" . $this->boundary[2] . '\"');\n                $body .= $this->LE;\n                $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding);\n                $body .= $this->encodeString($this->Body, $bodyEncoding);\n                $body .= $this->LE . $this->LE;\n                $body .= $this->attachAll('inline', $this->boundary[2]);\n                $body .= $this->LE;\n                $body .= $this->attachAll('attachment', $this->boundary[1]);\n                break;\n            case 'alt':\n                $body .= $mimepre;\n                $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding);\n                $body .= $this->encodeString($this->AltBody, $altBodyEncoding);\n                $body .= $this->LE . $this->LE;\n                $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, 'text/html', $bodyEncoding);\n                $body .= $this->encodeString($this->Body, $bodyEncoding);\n                $body .= $this->LE . $this->LE;\n                if (!empty($this->Ical)) {\n                    $body .= $this->getBoundary($this->boundary[1], '', 'text/calendar; method=REQUEST', '');\n                    $body .= $this->encodeString($this->Ical, $this->Encoding);\n                    $body .= $this->LE . $this->LE;\n                }\n                $body .= $this->endBoundary($this->boundary[1]);\n                break;\n            case 'alt_inline':\n                $body .= $mimepre;\n                $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding);\n                $body .= $this->encodeString($this->AltBody, $altBodyEncoding);\n                $body .= $this->LE . $this->LE;\n                $body .= $this->textLine('--' . $this->boundary[1]);\n                $body .= $this->headerLine('Content-Type', 'multipart/related;');\n                $body .= $this->textLine(\"\\tboundary=\\\"\" . $this->boundary[2] . '\"');\n                $body .= $this->LE;\n                $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding);\n                $body .= $this->encodeString($this->Body, $bodyEncoding);\n                $body .= $this->LE . $this->LE;\n                $body .= $this->attachAll('inline', $this->boundary[2]);\n                $body .= $this->LE;\n                $body .= $this->endBoundary($this->boundary[1]);\n                break;\n            case 'alt_attach':\n                $body .= $mimepre;\n                $body .= $this->textLine('--' . $this->boundary[1]);\n                $body .= $this->headerLine('Content-Type', 'multipart/alternative;');\n                $body .= $this->textLine(\"\\tboundary=\\\"\" . $this->boundary[2] . '\"');\n                $body .= $this->LE;\n                $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding);\n                $body .= $this->encodeString($this->AltBody, $altBodyEncoding);\n                $body .= $this->LE . $this->LE;\n                $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding);\n                $body .= $this->encodeString($this->Body, $bodyEncoding);\n                $body .= $this->LE . $this->LE;\n                $body .= $this->endBoundary($this->boundary[2]);\n                $body .= $this->LE;\n                $body .= $this->attachAll('attachment', $this->boundary[1]);\n                break;\n            case 'alt_inline_attach':\n                $body .= $mimepre;\n                $body .= $this->textLine('--' . $this->boundary[1]);\n                $body .= $this->headerLine('Content-Type', 'multipart/alternative;');\n                $body .= $this->textLine(\"\\tboundary=\\\"\" . $this->boundary[2] . '\"');\n                $body .= $this->LE;\n                $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding);\n                $body .= $this->encodeString($this->AltBody, $altBodyEncoding);\n                $body .= $this->LE . $this->LE;\n                $body .= $this->textLine('--' . $this->boundary[2]);\n                $body .= $this->headerLine('Content-Type', 'multipart/related;');\n                $body .= $this->textLine(\"\\tboundary=\\\"\" . $this->boundary[3] . '\"');\n                $body .= $this->LE;\n                $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, 'text/html', $bodyEncoding);\n                $body .= $this->encodeString($this->Body, $bodyEncoding);\n                $body .= $this->LE . $this->LE;\n                $body .= $this->attachAll('inline', $this->boundary[3]);\n                $body .= $this->LE;\n                $body .= $this->endBoundary($this->boundary[2]);\n                $body .= $this->LE;\n                $body .= $this->attachAll('attachment', $this->boundary[1]);\n                break;\n            default:\n                // Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types\n                //Reset the `Encoding` property in case we changed it for line length reasons\n                $this->Encoding = $bodyEncoding;\n                $body .= $this->encodeString($this->Body, $this->Encoding);\n                break;\n        }\n\n        if ($this->isError()) {\n            $body = '';\n        } elseif ($this->sign_key_file) {\n            try {\n                if (!defined('PKCS7_TEXT')) {\n                    throw new phpmailerException($this->lang('extension_missing') . 'openssl');\n                }\n                // @TODO would be nice to use php://temp streams here, but need to wrap for PHP < 5.1\n                $file = tempnam(sys_get_temp_dir(), 'mail');\n                if (false === file_put_contents($file, $body)) {\n                    throw new phpmailerException($this->lang('signing') . ' Could not write temp file');\n                }\n                $signed = tempnam(sys_get_temp_dir(), 'signed');\n                //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197\n                if (empty($this->sign_extracerts_file)) {\n                    $sign = @openssl_pkcs7_sign(\n                        $file,\n                        $signed,\n                        'file://' . realpath($this->sign_cert_file),\n                        array('file://' . realpath($this->sign_key_file), $this->sign_key_pass),\n                        null\n                    );\n                } else {\n                    $sign = @openssl_pkcs7_sign(\n                        $file,\n                        $signed,\n                        'file://' . realpath($this->sign_cert_file),\n                        array('file://' . realpath($this->sign_key_file), $this->sign_key_pass),\n                        null,\n                        PKCS7_DETACHED,\n                        $this->sign_extracerts_file\n                    );\n                }\n                if ($sign) {\n                    @unlink($file);\n                    $body = file_get_contents($signed);\n                    @unlink($signed);\n                    //The message returned by openssl contains both headers and body, so need to split them up\n                    $parts = explode(\"\\n\\n\", $body, 2);\n                    $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE;\n                    $body = $parts[1];\n                } else {\n                    @unlink($file);\n                    @unlink($signed);\n                    throw new phpmailerException($this->lang('signing') . openssl_error_string());\n                }\n            } catch (phpmailerException $exc) {\n                $body = '';\n                if ($this->exceptions) {\n                    throw $exc;\n                }\n            }\n        }\n        return $body;\n    }\n\n    /**\n     * Return the start of a message boundary.\n     * @access protected\n     * @param string $boundary\n     * @param string $charSet\n     * @param string $contentType\n     * @param string $encoding\n     * @return string\n     */\n    protected function getBoundary($boundary, $charSet, $contentType, $encoding)\n    {\n        $result = '';\n        if ($charSet == '') {\n            $charSet = $this->CharSet;\n        }\n        if ($contentType == '') {\n            $contentType = $this->ContentType;\n        }\n        if ($encoding == '') {\n            $encoding = $this->Encoding;\n        }\n        $result .= $this->textLine('--' . $boundary);\n        $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet);\n        $result .= $this->LE;\n        // RFC1341 part 5 says 7bit is assumed if not specified\n        if ($encoding != '7bit') {\n            $result .= $this->headerLine('Content-Transfer-Encoding', $encoding);\n        }\n        $result .= $this->LE;\n\n        return $result;\n    }\n\n    /**\n     * Return the end of a message boundary.\n     * @access protected\n     * @param string $boundary\n     * @return string\n     */\n    protected function endBoundary($boundary)\n    {\n        return $this->LE . '--' . $boundary . '--' . $this->LE;\n    }\n\n    /**\n     * Set the message type.\n     * PHPMailer only supports some preset message types, not arbitrary MIME structures.\n     * @access protected\n     * @return void\n     */\n    protected function setMessageType()\n    {\n        $type = array();\n        if ($this->alternativeExists()) {\n            $type[] = 'alt';\n        }\n        if ($this->inlineImageExists()) {\n            $type[] = 'inline';\n        }\n        if ($this->attachmentExists()) {\n            $type[] = 'attach';\n        }\n        $this->message_type = implode('_', $type);\n        if ($this->message_type == '') {\n            //The 'plain' message_type refers to the message having a single body element, not that it is plain-text\n            $this->message_type = 'plain';\n        }\n    }\n\n    /**\n     * Format a header line.\n     * @access public\n     * @param string $name\n     * @param string $value\n     * @return string\n     */\n    public function headerLine($name, $value)\n    {\n        return $name . ': ' . $value . $this->LE;\n    }\n\n    /**\n     * Return a formatted mail line.\n     * @access public\n     * @param string $value\n     * @return string\n     */\n    public function textLine($value)\n    {\n        return $value . $this->LE;\n    }\n\n    /**\n     * Add an attachment from a path on the filesystem.\n     * Never use a user-supplied path to a file!\n     * Returns false if the file could not be found or read.\n     * @param string $path Path to the attachment.\n     * @param string $name Overrides the attachment name.\n     * @param string $encoding File encoding (see $Encoding).\n     * @param string $type File extension (MIME) type.\n     * @param string $disposition Disposition to use\n     * @throws phpmailerException\n     * @return boolean\n     */\n    public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment')\n    {\n        try {\n            if (!@is_file($path)) {\n                throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE);\n            }\n\n            // If a MIME type is not specified, try to work it out from the file name\n            if ($type == '') {\n                $type = self::filenameToType($path);\n            }\n\n            $filename = basename($path);\n            if ($name == '') {\n                $name = $filename;\n            }\n\n            $this->attachment[] = array(\n                0 => $path,\n                1 => $filename,\n                2 => $name,\n                3 => $encoding,\n                4 => $type,\n                5 => false, // isStringAttachment\n                6 => $disposition,\n                7 => 0\n            );\n\n        } catch (phpmailerException $exc) {\n            $this->setError($exc->getMessage());\n            $this->edebug($exc->getMessage());\n            if ($this->exceptions) {\n                throw $exc;\n            }\n            return false;\n        }\n        return true;\n    }\n\n    /**\n     * Return the array of attachments.\n     * @return array\n     */\n    public function getAttachments()\n    {\n        return $this->attachment;\n    }\n\n    /**\n     * Attach all file, string, and binary attachments to the message.\n     * Returns an empty string on failure.\n     * @access protected\n     * @param string $disposition_type\n     * @param string $boundary\n     * @return string\n     */\n    protected function attachAll($disposition_type, $boundary)\n    {\n        // Return text of body\n        $mime = array();\n        $cidUniq = array();\n        $incl = array();\n\n        // Add all attachments\n        foreach ($this->attachment as $attachment) {\n            // Check if it is a valid disposition_filter\n            if ($attachment[6] == $disposition_type) {\n                // Check for string attachment\n                $string = '';\n                $path = '';\n                $bString = $attachment[5];\n                if ($bString) {\n                    $string = $attachment[0];\n                } else {\n                    $path = $attachment[0];\n                }\n\n                $inclhash = md5(serialize($attachment));\n                if (in_array($inclhash, $incl)) {\n                    continue;\n                }\n                $incl[] = $inclhash;\n                $name = $attachment[2];\n                $encoding = $attachment[3];\n                $type = $attachment[4];\n                $disposition = $attachment[6];\n                $cid = $attachment[7];\n                if ($disposition == 'inline' && array_key_exists($cid, $cidUniq)) {\n                    continue;\n                }\n                $cidUniq[$cid] = true;\n\n                $mime[] = sprintf('--%s%s', $boundary, $this->LE);\n                //Only include a filename property if we have one\n                if (!empty($name)) {\n                    $mime[] = sprintf(\n                        'Content-Type: %s; name=\"%s\"%s',\n                        $type,\n                        $this->encodeHeader($this->secureHeader($name)),\n                        $this->LE\n                    );\n                } else {\n                    $mime[] = sprintf(\n                        'Content-Type: %s%s',\n                        $type,\n                        $this->LE\n                    );\n                }\n                // RFC1341 part 5 says 7bit is assumed if not specified\n                if ($encoding != '7bit') {\n                    $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, $this->LE);\n                }\n\n                if ($disposition == 'inline') {\n                    $mime[] = sprintf('Content-ID: <%s>%s', $cid, $this->LE);\n                }\n\n                // If a filename contains any of these chars, it should be quoted,\n                // but not otherwise: RFC2183 & RFC2045 5.1\n                // Fixes a warning in IETF's msglint MIME checker\n                // Allow for bypassing the Content-Disposition header totally\n                if (!(empty($disposition))) {\n                    $encoded_name = $this->encodeHeader($this->secureHeader($name));\n                    if (preg_match('/[ \\(\\)<>@,;:\\\\\"\\/\\[\\]\\?=]/', $encoded_name)) {\n                        $mime[] = sprintf(\n                            'Content-Disposition: %s; filename=\"%s\"%s',\n                            $disposition,\n                            $encoded_name,\n                            $this->LE . $this->LE\n                        );\n                    } else {\n                        if (!empty($encoded_name)) {\n                            $mime[] = sprintf(\n                                'Content-Disposition: %s; filename=%s%s',\n                                $disposition,\n                                $encoded_name,\n                                $this->LE . $this->LE\n                            );\n                        } else {\n                            $mime[] = sprintf(\n                                'Content-Disposition: %s%s',\n                                $disposition,\n                                $this->LE . $this->LE\n                            );\n                        }\n                    }\n                } else {\n                    $mime[] = $this->LE;\n                }\n\n                // Encode as string attachment\n                if ($bString) {\n                    $mime[] = $this->encodeString($string, $encoding);\n                    if ($this->isError()) {\n                        return '';\n                    }\n                    $mime[] = $this->LE . $this->LE;\n                } else {\n                    $mime[] = $this->encodeFile($path, $encoding);\n                    if ($this->isError()) {\n                        return '';\n                    }\n                    $mime[] = $this->LE . $this->LE;\n                }\n            }\n        }\n\n        $mime[] = sprintf('--%s--%s', $boundary, $this->LE);\n\n        return implode('', $mime);\n    }\n\n    /**\n     * Encode a file attachment in requested format.\n     * Returns an empty string on failure.\n     * @param string $path The full path to the file\n     * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'\n     * @throws phpmailerException\n     * @access protected\n     * @return string\n     */\n    protected function encodeFile($path, $encoding = 'base64')\n    {\n        try {\n            if (!is_readable($path)) {\n                throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);\n            }\n            $magic_quotes = get_magic_quotes_runtime();\n            if ($magic_quotes) {\n                if (version_compare(PHP_VERSION, '5.3.0', '<')) {\n                    set_magic_quotes_runtime(false);\n                } else {\n                    //Doesn't exist in PHP 5.4, but we don't need to check because\n                    //get_magic_quotes_runtime always returns false in 5.4+\n                    //so it will never get here\n                    ini_set('magic_quotes_runtime', false);\n                }\n            }\n            $file_buffer = file_get_contents($path);\n            $file_buffer = $this->encodeString($file_buffer, $encoding);\n            if ($magic_quotes) {\n                if (version_compare(PHP_VERSION, '5.3.0', '<')) {\n                    set_magic_quotes_runtime($magic_quotes);\n                } else {\n                    ini_set('magic_quotes_runtime', $magic_quotes);\n                }\n            }\n            return $file_buffer;\n        } catch (Exception $exc) {\n            $this->setError($exc->getMessage());\n            return '';\n        }\n    }\n\n    /**\n     * Encode a string in requested format.\n     * Returns an empty string on failure.\n     * @param string $str The text to encode\n     * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'\n     * @access public\n     * @return string\n     */\n    public function encodeString($str, $encoding = 'base64')\n    {\n        $encoded = '';\n        switch (strtolower($encoding)) {\n            case 'base64':\n                $encoded = chunk_split(base64_encode($str), 76, $this->LE);\n                break;\n            case '7bit':\n            case '8bit':\n                $encoded = $this->fixEOL($str);\n                // Make sure it ends with a line break\n                if (substr($encoded, -(strlen($this->LE))) != $this->LE) {\n                    $encoded .= $this->LE;\n                }\n                break;\n            case 'binary':\n                $encoded = $str;\n                break;\n            case 'quoted-printable':\n                $encoded = $this->encodeQP($str);\n                break;\n            default:\n                $this->setError($this->lang('encoding') . $encoding);\n                break;\n        }\n        return $encoded;\n    }\n\n    /**\n     * Encode a header string optimally.\n     * Picks shortest of Q, B, quoted-printable or none.\n     * @access public\n     * @param string $str\n     * @param string $position\n     * @return string\n     */\n    public function encodeHeader($str, $position = 'text')\n    {\n        $matchcount = 0;\n        switch (strtolower($position)) {\n            case 'phrase':\n                if (!preg_match('/[\\200-\\377]/', $str)) {\n                    // Can't use addslashes as we don't know the value of magic_quotes_sybase\n                    $encoded = addcslashes($str, \"\\0..\\37\\177\\\\\\\"\");\n                    if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\\'*+\\/=?^_`{|}~ -]/', $str)) {\n                        return ($encoded);\n                    } else {\n                        return (\"\\\"$encoded\\\"\");\n                    }\n                }\n                $matchcount = preg_match_all('/[^\\040\\041\\043-\\133\\135-\\176]/', $str, $matches);\n                break;\n            /** @noinspection PhpMissingBreakStatementInspection */\n            case 'comment':\n                $matchcount = preg_match_all('/[()\"]/', $str, $matches);\n                // Intentional fall-through\n            case 'text':\n            default:\n                $matchcount += preg_match_all('/[\\000-\\010\\013\\014\\016-\\037\\177-\\377]/', $str, $matches);\n                break;\n        }\n\n        //There are no chars that need encoding\n        if ($matchcount == 0) {\n            return ($str);\n        }\n\n        $maxlen = 75 - 7 - strlen($this->CharSet);\n        // Try to select the encoding which should produce the shortest output\n        if ($matchcount > strlen($str) / 3) {\n            // More than a third of the content will need encoding, so B encoding will be most efficient\n            $encoding = 'B';\n            if (function_exists('mb_strlen') && $this->hasMultiBytes($str)) {\n                // Use a custom function which correctly encodes and wraps long\n                // multibyte strings without breaking lines within a character\n                $encoded = $this->base64EncodeWrapMB($str, \"\\n\");\n            } else {\n                $encoded = base64_encode($str);\n                $maxlen -= $maxlen % 4;\n                $encoded = trim(chunk_split($encoded, $maxlen, \"\\n\"));\n            }\n        } else {\n            $encoding = 'Q';\n            $encoded = $this->encodeQ($str, $position);\n            $encoded = $this->wrapText($encoded, $maxlen, true);\n            $encoded = str_replace('=' . self::CRLF, \"\\n\", trim($encoded));\n        }\n\n        $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . \"?$encoding?\\\\1?=\", $encoded);\n        $encoded = trim(str_replace(\"\\n\", $this->LE, $encoded));\n\n        return $encoded;\n    }\n\n    /**\n     * Check if a string contains multi-byte characters.\n     * @access public\n     * @param string $str multi-byte text to wrap encode\n     * @return boolean\n     */\n    public function hasMultiBytes($str)\n    {\n        if (function_exists('mb_strlen')) {\n            return (strlen($str) > mb_strlen($str, $this->CharSet));\n        } else { // Assume no multibytes (we can't handle without mbstring functions anyway)\n            return false;\n        }\n    }\n\n    /**\n     * Does a string contain any 8-bit chars (in any charset)?\n     * @param string $text\n     * @return boolean\n     */\n    public function has8bitChars($text)\n    {\n        return (boolean)preg_match('/[\\x80-\\xFF]/', $text);\n    }\n\n    /**\n     * Encode and wrap long multibyte strings for mail headers\n     * without breaking lines within a character.\n     * Adapted from a function by paravoid\n     * @link http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283\n     * @access public\n     * @param string $str multi-byte text to wrap encode\n     * @param string $linebreak string to use as linefeed/end-of-line\n     * @return string\n     */\n    public function base64EncodeWrapMB($str, $linebreak = null)\n    {\n        $start = '=?' . $this->CharSet . '?B?';\n        $end = '?=';\n        $encoded = '';\n        if ($linebreak === null) {\n            $linebreak = $this->LE;\n        }\n\n        $mb_length = mb_strlen($str, $this->CharSet);\n        // Each line must have length <= 75, including $start and $end\n        $length = 75 - strlen($start) - strlen($end);\n        // Average multi-byte ratio\n        $ratio = $mb_length / strlen($str);\n        // Base64 has a 4:3 ratio\n        $avgLength = floor($length * $ratio * .75);\n\n        for ($i = 0; $i < $mb_length; $i += $offset) {\n            $lookBack = 0;\n            do {\n                $offset = $avgLength - $lookBack;\n                $chunk = mb_substr($str, $i, $offset, $this->CharSet);\n                $chunk = base64_encode($chunk);\n                $lookBack++;\n            } while (strlen($chunk) > $length);\n            $encoded .= $chunk . $linebreak;\n        }\n\n        // Chomp the last linefeed\n        $encoded = substr($encoded, 0, -strlen($linebreak));\n        return $encoded;\n    }\n\n    /**\n     * Encode a string in quoted-printable format.\n     * According to RFC2045 section 6.7.\n     * @access public\n     * @param string $string The text to encode\n     * @param integer $line_max Number of chars allowed on a line before wrapping\n     * @return string\n     * @link http://www.php.net/manual/en/function.quoted-printable-decode.php#89417 Adapted from this comment\n     */\n    public function encodeQP($string, $line_max = 76)\n    {\n        // Use native function if it's available (>= PHP5.3)\n        if (function_exists('quoted_printable_encode')) {\n            return quoted_printable_encode($string);\n        }\n        // Fall back to a pure PHP implementation\n        $string = str_replace(\n            array('%20', '%0D%0A.', '%0D%0A', '%'),\n            array(' ', \"\\r\\n=2E\", \"\\r\\n\", '='),\n            rawurlencode($string)\n        );\n        return preg_replace('/[^\\r\\n]{' . ($line_max - 3) . '}[^=\\r\\n]{2}/', \"$0=\\r\\n\", $string);\n    }\n\n    /**\n     * Backward compatibility wrapper for an old QP encoding function that was removed.\n     * @see PHPMailer::encodeQP()\n     * @access public\n     * @param string $string\n     * @param integer $line_max\n     * @param boolean $space_conv\n     * @return string\n     * @deprecated Use encodeQP instead.\n     */\n    public function encodeQPphp(\n        $string,\n        $line_max = 76,\n        /** @noinspection PhpUnusedParameterInspection */ $space_conv = false\n    ) {\n        return $this->encodeQP($string, $line_max);\n    }\n\n    /**\n     * Encode a string using Q encoding.\n     * @link http://tools.ietf.org/html/rfc2047\n     * @param string $str the text to encode\n     * @param string $position Where the text is going to be used, see the RFC for what that means\n     * @access public\n     * @return string\n     */\n    public function encodeQ($str, $position = 'text')\n    {\n        // There should not be any EOL in the string\n        $pattern = '';\n        $encoded = str_replace(array(\"\\r\", \"\\n\"), '', $str);\n        switch (strtolower($position)) {\n            case 'phrase':\n                // RFC 2047 section 5.3\n                $pattern = '^A-Za-z0-9!*+\\/ -';\n                break;\n            /** @noinspection PhpMissingBreakStatementInspection */\n            case 'comment':\n                // RFC 2047 section 5.2\n                $pattern = '\\(\\)\"';\n                // intentional fall-through\n                // for this reason we build the $pattern without including delimiters and []\n            case 'text':\n            default:\n                // RFC 2047 section 5.1\n                // Replace every high ascii, control, =, ? and _ characters\n                $pattern = '\\000-\\011\\013\\014\\016-\\037\\075\\077\\137\\177-\\377' . $pattern;\n                break;\n        }\n        $matches = array();\n        if (preg_match_all(\"/[{$pattern}]/\", $encoded, $matches)) {\n            // If the string contains an '=', make sure it's the first thing we replace\n            // so as to avoid double-encoding\n            $eqkey = array_search('=', $matches[0]);\n            if (false !== $eqkey) {\n                unset($matches[0][$eqkey]);\n                array_unshift($matches[0], '=');\n            }\n            foreach (array_unique($matches[0]) as $char) {\n                $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded);\n            }\n        }\n        // Replace every spaces to _ (more readable than =20)\n        return str_replace(' ', '_', $encoded);\n    }\n\n    /**\n     * Add a string or binary attachment (non-filesystem).\n     * This method can be used to attach ascii or binary data,\n     * such as a BLOB record from a database.\n     * @param string $string String attachment data.\n     * @param string $filename Name of the attachment.\n     * @param string $encoding File encoding (see $Encoding).\n     * @param string $type File extension (MIME) type.\n     * @param string $disposition Disposition to use\n     * @return void\n     */\n    public function addStringAttachment(\n        $string,\n        $filename,\n        $encoding = 'base64',\n        $type = '',\n        $disposition = 'attachment'\n    ) {\n        // If a MIME type is not specified, try to work it out from the file name\n        if ($type == '') {\n            $type = self::filenameToType($filename);\n        }\n        // Append to $attachment array\n        $this->attachment[] = array(\n            0 => $string,\n            1 => $filename,\n            2 => basename($filename),\n            3 => $encoding,\n            4 => $type,\n            5 => true, // isStringAttachment\n            6 => $disposition,\n            7 => 0\n        );\n    }\n\n    /**\n     * Add an embedded (inline) attachment from a file.\n     * This can include images, sounds, and just about any other document type.\n     * These differ from 'regular' attachments in that they are intended to be\n     * displayed inline with the message, not just attached for download.\n     * This is used in HTML messages that embed the images\n     * the HTML refers to using the $cid value.\n     * Never use a user-supplied path to a file!\n     * @param string $path Path to the attachment.\n     * @param string $cid Content ID of the attachment; Use this to reference\n     *        the content when using an embedded image in HTML.\n     * @param string $name Overrides the attachment name.\n     * @param string $encoding File encoding (see $Encoding).\n     * @param string $type File MIME type.\n     * @param string $disposition Disposition to use\n     * @return boolean True on successfully adding an attachment\n     */\n    public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline')\n    {\n        if (!@is_file($path)) {\n            $this->setError($this->lang('file_access') . $path);\n            return false;\n        }\n\n        // If a MIME type is not specified, try to work it out from the file name\n        if ($type == '') {\n            $type = self::filenameToType($path);\n        }\n\n        $filename = basename($path);\n        if ($name == '') {\n            $name = $filename;\n        }\n\n        // Append to $attachment array\n        $this->attachment[] = array(\n            0 => $path,\n            1 => $filename,\n            2 => $name,\n            3 => $encoding,\n            4 => $type,\n            5 => false, // isStringAttachment\n            6 => $disposition,\n            7 => $cid\n        );\n        return true;\n    }\n\n    /**\n     * Add an embedded stringified attachment.\n     * This can include images, sounds, and just about any other document type.\n     * Be sure to set the $type to an image type for images:\n     * JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'.\n     * @param string $string The attachment binary data.\n     * @param string $cid Content ID of the attachment; Use this to reference\n     *        the content when using an embedded image in HTML.\n     * @param string $name\n     * @param string $encoding File encoding (see $Encoding).\n     * @param string $type MIME type.\n     * @param string $disposition Disposition to use\n     * @return boolean True on successfully adding an attachment\n     */\n    public function addStringEmbeddedImage(\n        $string,\n        $cid,\n        $name = '',\n        $encoding = 'base64',\n        $type = '',\n        $disposition = 'inline'\n    ) {\n        // If a MIME type is not specified, try to work it out from the name\n        if ($type == '' and !empty($name)) {\n            $type = self::filenameToType($name);\n        }\n\n        // Append to $attachment array\n        $this->attachment[] = array(\n            0 => $string,\n            1 => $name,\n            2 => $name,\n            3 => $encoding,\n            4 => $type,\n            5 => true, // isStringAttachment\n            6 => $disposition,\n            7 => $cid\n        );\n        return true;\n    }\n\n    /**\n     * Check if an inline attachment is present.\n     * @access public\n     * @return boolean\n     */\n    public function inlineImageExists()\n    {\n        foreach ($this->attachment as $attachment) {\n            if ($attachment[6] == 'inline') {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * Check if an attachment (non-inline) is present.\n     * @return boolean\n     */\n    public function attachmentExists()\n    {\n        foreach ($this->attachment as $attachment) {\n            if ($attachment[6] == 'attachment') {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * Check if this message has an alternative body set.\n     * @return boolean\n     */\n    public function alternativeExists()\n    {\n        return !empty($this->AltBody);\n    }\n\n    /**\n     * Clear queued addresses of given kind.\n     * @access protected\n     * @param string $kind 'to', 'cc', or 'bcc'\n     * @return void\n     */\n    public function clearQueuedAddresses($kind)\n    {\n        $RecipientsQueue = $this->RecipientsQueue;\n        foreach ($RecipientsQueue as $address => $params) {\n            if ($params[0] == $kind) {\n                unset($this->RecipientsQueue[$address]);\n            }\n        }\n    }\n\n    /**\n     * Clear all To recipients.\n     * @return void\n     */\n    public function clearAddresses()\n    {\n        foreach ($this->to as $to) {\n            unset($this->all_recipients[strtolower($to[0])]);\n        }\n        $this->to = array();\n        $this->clearQueuedAddresses('to');\n    }\n\n    /**\n     * Clear all CC recipients.\n     * @return void\n     */\n    public function clearCCs()\n    {\n        foreach ($this->cc as $cc) {\n            unset($this->all_recipients[strtolower($cc[0])]);\n        }\n        $this->cc = array();\n        $this->clearQueuedAddresses('cc');\n    }\n\n    /**\n     * Clear all BCC recipients.\n     * @return void\n     */\n    public function clearBCCs()\n    {\n        foreach ($this->bcc as $bcc) {\n            unset($this->all_recipients[strtolower($bcc[0])]);\n        }\n        $this->bcc = array();\n        $this->clearQueuedAddresses('bcc');\n    }\n\n    /**\n     * Clear all ReplyTo recipients.\n     * @return void\n     */\n    public function clearReplyTos()\n    {\n        $this->ReplyTo = array();\n        $this->ReplyToQueue = array();\n    }\n\n    /**\n     * Clear all recipient types.\n     * @return void\n     */\n    public function clearAllRecipients()\n    {\n        $this->to = array();\n        $this->cc = array();\n        $this->bcc = array();\n        $this->all_recipients = array();\n        $this->RecipientsQueue = array();\n    }\n\n    /**\n     * Clear all filesystem, string, and binary attachments.\n     * @return void\n     */\n    public function clearAttachments()\n    {\n        $this->attachment = array();\n    }\n\n    /**\n     * Clear all custom headers.\n     * @return void\n     */\n    public function clearCustomHeaders()\n    {\n        $this->CustomHeader = array();\n    }\n\n    /**\n     * Add an error message to the error container.\n     * @access protected\n     * @param string $msg\n     * @return void\n     */\n    protected function setError($msg)\n    {\n        $this->error_count++;\n        if ($this->Mailer == 'smtp' and !is_null($this->smtp)) {\n            $lasterror = $this->smtp->getError();\n            if (!empty($lasterror['error'])) {\n                $msg .= $this->lang('smtp_error') . $lasterror['error'];\n                if (!empty($lasterror['detail'])) {\n                    $msg .= ' Detail: '. $lasterror['detail'];\n                }\n                if (!empty($lasterror['smtp_code'])) {\n                    $msg .= ' SMTP code: ' . $lasterror['smtp_code'];\n                }\n                if (!empty($lasterror['smtp_code_ex'])) {\n                    $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex'];\n                }\n            }\n        }\n        $this->ErrorInfo = $msg;\n    }\n\n    /**\n     * Return an RFC 822 formatted date.\n     * @access public\n     * @return string\n     * @static\n     */\n    public static function rfcDate()\n    {\n        // Set the time zone to whatever the default is to avoid 500 errors\n        // Will default to UTC if it's not set properly in php.ini\n        date_default_timezone_set(@date_default_timezone_get());\n        return date('D, j M Y H:i:s O');\n    }\n\n    /**\n     * Get the server hostname.\n     * Returns 'localhost.localdomain' if unknown.\n     * @access protected\n     * @return string\n     */\n    protected function serverHostname()\n    {\n        $result = 'localhost.localdomain';\n        if (!empty($this->Hostname)) {\n            $result = $this->Hostname;\n        } elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER) and !empty($_SERVER['SERVER_NAME'])) {\n            $result = $_SERVER['SERVER_NAME'];\n        } elseif (function_exists('gethostname') && gethostname() !== false) {\n            $result = gethostname();\n        } elseif (php_uname('n') !== false) {\n            $result = php_uname('n');\n        }\n        return $result;\n    }\n\n    /**\n     * Get an error message in the current language.\n     * @access protected\n     * @param string $key\n     * @return string\n     */\n    protected function lang($key)\n    {\n        if (count($this->language) < 1) {\n            $this->setLanguage('en'); // set the default language\n        }\n\n        if (array_key_exists($key, $this->language)) {\n            if ($key == 'smtp_connect_failed') {\n                //Include a link to troubleshooting docs on SMTP connection failure\n                //this is by far the biggest cause of support questions\n                //but it's usually not PHPMailer's fault.\n                return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';\n            }\n            return $this->language[$key];\n        } else {\n            //Return the key as a fallback\n            return $key;\n        }\n    }\n\n    /**\n     * Check if an error occurred.\n     * @access public\n     * @return boolean True if an error did occur.\n     */\n    public function isError()\n    {\n        return ($this->error_count > 0);\n    }\n\n    /**\n     * Ensure consistent line endings in a string.\n     * Changes every end of line from CRLF, CR or LF to $this->LE.\n     * @access public\n     * @param string $str String to fixEOL\n     * @return string\n     */\n    public function fixEOL($str)\n    {\n        // Normalise to \\n\n        $nstr = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $str);\n        // Now convert LE as needed\n        if ($this->LE !== \"\\n\") {\n            $nstr = str_replace(\"\\n\", $this->LE, $nstr);\n        }\n        return $nstr;\n    }\n\n    /**\n     * Add a custom header.\n     * $name value can be overloaded to contain\n     * both header name and value (name:value)\n     * @access public\n     * @param string $name Custom header name\n     * @param string $value Header value\n     * @return void\n     */\n    public function addCustomHeader($name, $value = null)\n    {\n        if ($value === null) {\n            // Value passed in as name:value\n            $this->CustomHeader[] = explode(':', $name, 2);\n        } else {\n            $this->CustomHeader[] = array($name, $value);\n        }\n    }\n\n    /**\n     * Returns all custom headers.\n     * @return array\n     */\n    public function getCustomHeaders()\n    {\n        return $this->CustomHeader;\n    }\n\n    /**\n     * Create a message body from an HTML string.\n     * Automatically inlines images and creates a plain-text version by converting the HTML,\n     * overwriting any existing values in Body and AltBody.\n     * Do not source $message content from user input!\n     * $basedir is prepended when handling relative URLs, e.g. <img src=\"/images/a.png\"> and must not be empty\n     * will look for an image file in $basedir/images/a.png and convert it to inline.\n     * If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email)\n     * If you don't want to apply these transformations to your HTML, just set Body and AltBody directly.\n     * @access public\n     * @param string $message HTML message string\n     * @param string $basedir Absolute path to a base directory to prepend to relative paths to images\n     * @param boolean|callable $advanced Whether to use the internal HTML to text converter\n     *    or your own custom converter @see PHPMailer::html2text()\n     * @return string $message The transformed message Body\n     */\n    public function msgHTML($message, $basedir = '', $advanced = false)\n    {\n        preg_match_all('/(src|background)=[\"\\'](.*)[\"\\']/Ui', $message, $images);\n        if (array_key_exists(2, $images)) {\n            if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {\n                // Ensure $basedir has a trailing /\n                $basedir .= '/';\n            }\n            foreach ($images[2] as $imgindex => $url) {\n                // Convert data URIs into embedded images\n                if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) {\n                    $data = substr($url, strpos($url, ','));\n                    if ($match[2]) {\n                        $data = base64_decode($data);\n                    } else {\n                        $data = rawurldecode($data);\n                    }\n                    $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2\n                    if ($this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1])) {\n                        $message = str_replace(\n                            $images[0][$imgindex],\n                            $images[1][$imgindex] . '=\"cid:' . $cid . '\"',\n                            $message\n                        );\n                    }\n                    continue;\n                }\n                if (\n                    // Only process relative URLs if a basedir is provided (i.e. no absolute local paths)\n                    !empty($basedir)\n                    // Ignore URLs containing parent dir traversal (..)\n                    && (strpos($url, '..') === false)\n                    // Do not change urls that are already inline images\n                    && substr($url, 0, 4) !== 'cid:'\n                    // Do not change absolute URLs, including anonymous protocol\n                    && !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url)\n                ) {\n                    $filename = basename($url);\n                    $directory = dirname($url);\n                    if ($directory == '.') {\n                        $directory = '';\n                    }\n                    $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2\n                    if (strlen($directory) > 1 && substr($directory, -1) != '/') {\n                        $directory .= '/';\n                    }\n                    if ($this->addEmbeddedImage(\n                        $basedir . $directory . $filename,\n                        $cid,\n                        $filename,\n                        'base64',\n                        self::_mime_types((string)self::mb_pathinfo($filename, PATHINFO_EXTENSION))\n                    )\n                    ) {\n                        $message = preg_replace(\n                            '/' . $images[1][$imgindex] . '=[\"\\']' . preg_quote($url, '/') . '[\"\\']/Ui',\n                            $images[1][$imgindex] . '=\"cid:' . $cid . '\"',\n                            $message\n                        );\n                    }\n                }\n            }\n        }\n        $this->isHTML(true);\n        // Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better\n        $this->Body = $this->normalizeBreaks($message);\n        $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced));\n        if (!$this->alternativeExists()) {\n            $this->AltBody = 'To view this email message, open it in a program that understands HTML!' .\n                self::CRLF . self::CRLF;\n        }\n        return $this->Body;\n    }\n\n    /**\n     * Convert an HTML string into plain text.\n     * This is used by msgHTML().\n     * Note - older versions of this function used a bundled advanced converter\n     * which was been removed for license reasons in #232.\n     * Example usage:\n     * <code>\n     * // Use default conversion\n     * $plain = $mail->html2text($html);\n     * // Use your own custom converter\n     * $plain = $mail->html2text($html, function($html) {\n     *     $converter = new MyHtml2text($html);\n     *     return $converter->get_text();\n     * });\n     * </code>\n     * @param string $html The HTML text to convert\n     * @param boolean|callable $advanced Any boolean value to use the internal converter,\n     *   or provide your own callable for custom conversion.\n     * @return string\n     */\n    public function html2text($html, $advanced = false)\n    {\n        if (is_callable($advanced)) {\n            return call_user_func($advanced, $html);\n        }\n        return html_entity_decode(\n            trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\\/\\\\1>/si', '', $html))),\n            ENT_QUOTES,\n            $this->CharSet\n        );\n    }\n\n    /**\n     * Get the MIME type for a file extension.\n     * @param string $ext File extension\n     * @access public\n     * @return string MIME type of file.\n     * @static\n     */\n    public static function _mime_types($ext = '')\n    {\n        $mimes = array(\n            'xl'    => 'application/excel',\n            'js'    => 'application/javascript',\n            'hqx'   => 'application/mac-binhex40',\n            'cpt'   => 'application/mac-compactpro',\n            'bin'   => 'application/macbinary',\n            'doc'   => 'application/msword',\n            'word'  => 'application/msword',\n            'xlsx'  => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n            'xltx'  => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',\n            'potx'  => 'application/vnd.openxmlformats-officedocument.presentationml.template',\n            'ppsx'  => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\n            'pptx'  => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n            'sldx'  => 'application/vnd.openxmlformats-officedocument.presentationml.slide',\n            'docx'  => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n            'dotx'  => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n            'xlam'  => 'application/vnd.ms-excel.addin.macroEnabled.12',\n            'xlsb'  => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',\n            'class' => 'application/octet-stream',\n            'dll'   => 'application/octet-stream',\n            'dms'   => 'application/octet-stream',\n            'exe'   => 'application/octet-stream',\n            'lha'   => 'application/octet-stream',\n            'lzh'   => 'application/octet-stream',\n            'psd'   => 'application/octet-stream',\n            'sea'   => 'application/octet-stream',\n            'so'    => 'application/octet-stream',\n            'oda'   => 'application/oda',\n            'pdf'   => 'application/pdf',\n            'ai'    => 'application/postscript',\n            'eps'   => 'application/postscript',\n            'ps'    => 'application/postscript',\n            'smi'   => 'application/smil',\n            'smil'  => 'application/smil',\n            'mif'   => 'application/vnd.mif',\n            'xls'   => 'application/vnd.ms-excel',\n            'ppt'   => 'application/vnd.ms-powerpoint',\n            'wbxml' => 'application/vnd.wap.wbxml',\n            'wmlc'  => 'application/vnd.wap.wmlc',\n            'dcr'   => 'application/x-director',\n            'dir'   => 'application/x-director',\n            'dxr'   => 'application/x-director',\n            'dvi'   => 'application/x-dvi',\n            'gtar'  => 'application/x-gtar',\n            'php3'  => 'application/x-httpd-php',\n            'php4'  => 'application/x-httpd-php',\n            'php'   => 'application/x-httpd-php',\n            'phtml' => 'application/x-httpd-php',\n            'phps'  => 'application/x-httpd-php-source',\n            'swf'   => 'application/x-shockwave-flash',\n            'sit'   => 'application/x-stuffit',\n            'tar'   => 'application/x-tar',\n            'tgz'   => 'application/x-tar',\n            'xht'   => 'application/xhtml+xml',\n            'xhtml' => 'application/xhtml+xml',\n            'zip'   => 'application/zip',\n            'mid'   => 'audio/midi',\n            'midi'  => 'audio/midi',\n            'mp2'   => 'audio/mpeg',\n            'mp3'   => 'audio/mpeg',\n            'mpga'  => 'audio/mpeg',\n            'aif'   => 'audio/x-aiff',\n            'aifc'  => 'audio/x-aiff',\n            'aiff'  => 'audio/x-aiff',\n            'ram'   => 'audio/x-pn-realaudio',\n            'rm'    => 'audio/x-pn-realaudio',\n            'rpm'   => 'audio/x-pn-realaudio-plugin',\n            'ra'    => 'audio/x-realaudio',\n            'wav'   => 'audio/x-wav',\n            'bmp'   => 'image/bmp',\n            'gif'   => 'image/gif',\n            'jpeg'  => 'image/jpeg',\n            'jpe'   => 'image/jpeg',\n            'jpg'   => 'image/jpeg',\n            'png'   => 'image/png',\n            'tiff'  => 'image/tiff',\n            'tif'   => 'image/tiff',\n            'eml'   => 'message/rfc822',\n            'css'   => 'text/css',\n            'html'  => 'text/html',\n            'htm'   => 'text/html',\n            'shtml' => 'text/html',\n            'log'   => 'text/plain',\n            'text'  => 'text/plain',\n            'txt'   => 'text/plain',\n            'rtx'   => 'text/richtext',\n            'rtf'   => 'text/rtf',\n            'vcf'   => 'text/vcard',\n            'vcard' => 'text/vcard',\n            'xml'   => 'text/xml',\n            'xsl'   => 'text/xml',\n            'mpeg'  => 'video/mpeg',\n            'mpe'   => 'video/mpeg',\n            'mpg'   => 'video/mpeg',\n            'mov'   => 'video/quicktime',\n            'qt'    => 'video/quicktime',\n            'rv'    => 'video/vnd.rn-realvideo',\n            'avi'   => 'video/x-msvideo',\n            'movie' => 'video/x-sgi-movie'\n        );\n        if (array_key_exists(strtolower($ext), $mimes)) {\n            return $mimes[strtolower($ext)];\n        }\n        return 'application/octet-stream';\n    }\n\n    /**\n     * Map a file name to a MIME type.\n     * Defaults to 'application/octet-stream', i.e.. arbitrary binary data.\n     * @param string $filename A file name or full path, does not need to exist as a file\n     * @return string\n     * @static\n     */\n    public static function filenameToType($filename)\n    {\n        // In case the path is a URL, strip any query string before getting extension\n        $qpos = strpos($filename, '?');\n        if (false !== $qpos) {\n            $filename = substr($filename, 0, $qpos);\n        }\n        $pathinfo = self::mb_pathinfo($filename);\n        return self::_mime_types($pathinfo['extension']);\n    }\n\n    /**\n     * Multi-byte-safe pathinfo replacement.\n     * Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe.\n     * Works similarly to the one in PHP >= 5.2.0\n     * @link http://www.php.net/manual/en/function.pathinfo.php#107461\n     * @param string $path A filename or path, does not need to exist as a file\n     * @param integer|string $options Either a PATHINFO_* constant,\n     *      or a string name to return only the specified piece, allows 'filename' to work on PHP < 5.2\n     * @return string|array\n     * @static\n     */\n    public static function mb_pathinfo($path, $options = null)\n    {\n        $ret = array('dirname' => '', 'basename' => '', 'extension' => '', 'filename' => '');\n        $pathinfo = array();\n        if (preg_match('%^(.*?)[\\\\\\\\/]*(([^/\\\\\\\\]*?)(\\.([^\\.\\\\\\\\/]+?)|))[\\\\\\\\/\\.]*$%im', $path, $pathinfo)) {\n            if (array_key_exists(1, $pathinfo)) {\n                $ret['dirname'] = $pathinfo[1];\n            }\n            if (array_key_exists(2, $pathinfo)) {\n                $ret['basename'] = $pathinfo[2];\n            }\n            if (array_key_exists(5, $pathinfo)) {\n                $ret['extension'] = $pathinfo[5];\n            }\n            if (array_key_exists(3, $pathinfo)) {\n                $ret['filename'] = $pathinfo[3];\n            }\n        }\n        switch ($options) {\n            case PATHINFO_DIRNAME:\n            case 'dirname':\n                return $ret['dirname'];\n            case PATHINFO_BASENAME:\n            case 'basename':\n                return $ret['basename'];\n            case PATHINFO_EXTENSION:\n            case 'extension':\n                return $ret['extension'];\n            case PATHINFO_FILENAME:\n            case 'filename':\n                return $ret['filename'];\n            default:\n                return $ret;\n        }\n    }\n\n    /**\n     * Set or reset instance properties.\n     * You should avoid this function - it's more verbose, less efficient, more error-prone and\n     * harder to debug than setting properties directly.\n     * Usage Example:\n     * `$mail->set('SMTPSecure', 'tls');`\n     *   is the same as:\n     * `$mail->SMTPSecure = 'tls';`\n     * @access public\n     * @param string $name The property name to set\n     * @param mixed $value The value to set the property to\n     * @return boolean\n     * @TODO Should this not be using the __set() magic function?\n     */\n    public function set($name, $value = '')\n    {\n        if (property_exists($this, $name)) {\n            $this->$name = $value;\n            return true;\n        } else {\n            $this->setError($this->lang('variable_set') . $name);\n            return false;\n        }\n    }\n\n    /**\n     * Strip newlines to prevent header injection.\n     * @access public\n     * @param string $str\n     * @return string\n     */\n    public function secureHeader($str)\n    {\n        return trim(str_replace(array(\"\\r\", \"\\n\"), '', $str));\n    }\n\n    /**\n     * Normalize line breaks in a string.\n     * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format.\n     * Defaults to CRLF (for message bodies) and preserves consecutive breaks.\n     * @param string $text\n     * @param string $breaktype What kind of line break to use, defaults to CRLF\n     * @return string\n     * @access public\n     * @static\n     */\n    public static function normalizeBreaks($text, $breaktype = \"\\r\\n\")\n    {\n        return preg_replace('/(\\r\\n|\\r|\\n)/ms', $breaktype, $text);\n    }\n\n    /**\n     * Set the public and private key files and password for S/MIME signing.\n     * @access public\n     * @param string $cert_filename\n     * @param string $key_filename\n     * @param string $key_pass Password for private key\n     * @param string $extracerts_filename Optional path to chain certificate\n     */\n    public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '')\n    {\n        $this->sign_cert_file = $cert_filename;\n        $this->sign_key_file = $key_filename;\n        $this->sign_key_pass = $key_pass;\n        $this->sign_extracerts_file = $extracerts_filename;\n    }\n\n    /**\n     * Quoted-Printable-encode a DKIM header.\n     * @access public\n     * @param string $txt\n     * @return string\n     */\n    public function DKIM_QP($txt)\n    {\n        $line = '';\n        for ($i = 0; $i < strlen($txt); $i++) {\n            $ord = ord($txt[$i]);\n            if (((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E))) {\n                $line .= $txt[$i];\n            } else {\n                $line .= '=' . sprintf('%02X', $ord);\n            }\n        }\n        return $line;\n    }\n\n    /**\n     * Generate a DKIM signature.\n     * @access public\n     * @param string $signHeader\n     * @throws phpmailerException\n     * @return string The DKIM signature value\n     */\n    public function DKIM_Sign($signHeader)\n    {\n        if (!defined('PKCS7_TEXT')) {\n            if ($this->exceptions) {\n                throw new phpmailerException($this->lang('extension_missing') . 'openssl');\n            }\n            return '';\n        }\n        $privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private);\n        if ('' != $this->DKIM_passphrase) {\n            $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);\n        } else {\n            $privKey = openssl_pkey_get_private($privKeyStr);\n        }\n        //Workaround for missing digest algorithms in old PHP & OpenSSL versions\n        //@link http://stackoverflow.com/a/11117338/333340\n        if (version_compare(PHP_VERSION, '5.3.0') >= 0 and\n            in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) {\n            if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {\n                openssl_pkey_free($privKey);\n                return base64_encode($signature);\n            }\n        } else {\n            $pinfo = openssl_pkey_get_details($privKey);\n            $hash = hash('sha256', $signHeader);\n            //'Magic' constant for SHA256 from RFC3447\n            //@link https://tools.ietf.org/html/rfc3447#page-43\n            $t = '3031300d060960864801650304020105000420' . $hash;\n            $pslen = $pinfo['bits'] / 8 - (strlen($t) / 2 + 3);\n            $eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t);\n\n            if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) {\n                openssl_pkey_free($privKey);\n                return base64_encode($signature);\n            }\n        }\n        openssl_pkey_free($privKey);\n        return '';\n    }\n\n    /**\n     * Generate a DKIM canonicalization header.\n     * @access public\n     * @param string $signHeader Header\n     * @return string\n     */\n    public function DKIM_HeaderC($signHeader)\n    {\n        $signHeader = preg_replace('/\\r\\n\\s+/', ' ', $signHeader);\n        $lines = explode(\"\\r\\n\", $signHeader);\n        foreach ($lines as $key => $line) {\n            list($heading, $value) = explode(':', $line, 2);\n            $heading = strtolower($heading);\n            $value = preg_replace('/\\s{2,}/', ' ', $value); // Compress useless spaces\n            $lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value\n        }\n        $signHeader = implode(\"\\r\\n\", $lines);\n        return $signHeader;\n    }\n\n    /**\n     * Generate a DKIM canonicalization body.\n     * @access public\n     * @param string $body Message Body\n     * @return string\n     */\n    public function DKIM_BodyC($body)\n    {\n        if ($body == '') {\n            return \"\\r\\n\";\n        }\n        // stabilize line endings\n        $body = str_replace(\"\\r\\n\", \"\\n\", $body);\n        $body = str_replace(\"\\n\", \"\\r\\n\", $body);\n        // END stabilize line endings\n        while (substr($body, strlen($body) - 4, 4) == \"\\r\\n\\r\\n\") {\n            $body = substr($body, 0, strlen($body) - 2);\n        }\n        return $body;\n    }\n\n    /**\n     * Create the DKIM header and body in a new message header.\n     * @access public\n     * @param string $headers_line Header lines\n     * @param string $subject Subject\n     * @param string $body Body\n     * @return string\n     */\n    public function DKIM_Add($headers_line, $subject, $body)\n    {\n        $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms\n        $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body\n        $DKIMquery = 'dns/txt'; // Query method\n        $DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone)\n        $subject_header = \"Subject: $subject\";\n        $headers = explode($this->LE, $headers_line);\n        $from_header = '';\n        $to_header = '';\n        $date_header = '';\n        $current = '';\n        foreach ($headers as $header) {\n            if (strpos($header, 'From:') === 0) {\n                $from_header = $header;\n                $current = 'from_header';\n            } elseif (strpos($header, 'To:') === 0) {\n                $to_header = $header;\n                $current = 'to_header';\n            } elseif (strpos($header, 'Date:') === 0) {\n                $date_header = $header;\n                $current = 'date_header';\n            } else {\n                if (!empty($$current) && strpos($header, ' =?') === 0) {\n                    $$current .= $header;\n                } else {\n                    $current = '';\n                }\n            }\n        }\n        $from = str_replace('|', '=7C', $this->DKIM_QP($from_header));\n        $to = str_replace('|', '=7C', $this->DKIM_QP($to_header));\n        $date = str_replace('|', '=7C', $this->DKIM_QP($date_header));\n        $subject = str_replace(\n            '|',\n            '=7C',\n            $this->DKIM_QP($subject_header)\n        ); // Copied header fields (dkim-quoted-printable)\n        $body = $this->DKIM_BodyC($body);\n        $DKIMlen = strlen($body); // Length of body\n        $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body\n        if ('' == $this->DKIM_identity) {\n            $ident = '';\n        } else {\n            $ident = ' i=' . $this->DKIM_identity . ';';\n        }\n        $dkimhdrs = 'DKIM-Signature: v=1; a=' .\n            $DKIMsignatureType . '; q=' .\n            $DKIMquery . '; l=' .\n            $DKIMlen . '; s=' .\n            $this->DKIM_selector .\n            \";\\r\\n\" .\n            \"\\tt=\" . $DKIMtime . '; c=' . $DKIMcanonicalization . \";\\r\\n\" .\n            \"\\th=From:To:Date:Subject;\\r\\n\" .\n            \"\\td=\" . $this->DKIM_domain . ';' . $ident . \"\\r\\n\" .\n            \"\\tz=$from\\r\\n\" .\n            \"\\t|$to\\r\\n\" .\n            \"\\t|$date\\r\\n\" .\n            \"\\t|$subject;\\r\\n\" .\n            \"\\tbh=\" . $DKIMb64 . \";\\r\\n\" .\n            \"\\tb=\";\n        $toSign = $this->DKIM_HeaderC(\n            $from_header . \"\\r\\n\" .\n            $to_header . \"\\r\\n\" .\n            $date_header . \"\\r\\n\" .\n            $subject_header . \"\\r\\n\" .\n            $dkimhdrs\n        );\n        $signed = $this->DKIM_Sign($toSign);\n        return $dkimhdrs . $signed . \"\\r\\n\";\n    }\n\n    /**\n     * Detect if a string contains a line longer than the maximum line length allowed.\n     * @param string $str\n     * @return boolean\n     * @static\n     */\n    public static function hasLineLongerThanMax($str)\n    {\n        //+2 to include CRLF line break for a 1000 total\n        return (boolean)preg_match('/^(.{'.(self::MAX_LINE_LENGTH + 2).',})/m', $str);\n    }\n\n    /**\n     * Allows for public read access to 'to' property.\n     * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included.\n     * @access public\n     * @return array\n     */\n    public function getToAddresses()\n    {\n        return $this->to;\n    }\n\n    /**\n     * Allows for public read access to 'cc' property.\n     * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included.\n     * @access public\n     * @return array\n     */\n    public function getCcAddresses()\n    {\n        return $this->cc;\n    }\n\n    /**\n     * Allows for public read access to 'bcc' property.\n     * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included.\n     * @access public\n     * @return array\n     */\n    public function getBccAddresses()\n    {\n        return $this->bcc;\n    }\n\n    /**\n     * Allows for public read access to 'ReplyTo' property.\n     * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included.\n     * @access public\n     * @return array\n     */\n    public function getReplyToAddresses()\n    {\n        return $this->ReplyTo;\n    }\n\n    /**\n     * Allows for public read access to 'all_recipients' property.\n     * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included.\n     * @access public\n     * @return array\n     */\n    public function getAllRecipientAddresses()\n    {\n        return $this->all_recipients;\n    }\n\n    /**\n     * Perform a callback.\n     * @param boolean $isSent\n     * @param array $to\n     * @param array $cc\n     * @param array $bcc\n     * @param string $subject\n     * @param string $body\n     * @param string $from\n     */\n    protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from)\n    {\n        if (!empty($this->action_function) && is_callable($this->action_function)) {\n            $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from);\n            call_user_func_array($this->action_function, $params);\n        }\n    }\n}\n\n/**\n * PHPMailer exception handler\n * @package PHPMailer\n */\nclass phpmailerException extends Exception\n{\n    /**\n     * Prettify error message output\n     * @return string\n     */\n    public function errorMessage()\n    {\n        $errorMsg = '<strong>' . htmlspecialchars($this->getMessage()) . \"</strong><br />\\n\";\n        return $errorMsg;\n    }\n}\n"
  },
  {
    "path": "lib/phpmailer/class.pop3.php",
    "content": "<?php\n/**\n * PHPMailer POP-Before-SMTP Authentication Class.\n * PHP Version 5\n * @package PHPMailer\n * @link https://github.com/PHPMailer/PHPMailer/\n * @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>\n * @author Jim Jagielski (jimjag) <jimjag@gmail.com>\n * @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>\n * @author Brent R. Matzelle (original founder)\n * @copyright 2012 - 2014 Marcus Bointon\n * @copyright 2010 - 2012 Jim Jagielski\n * @copyright 2004 - 2009 Andy Prevost\n * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License\n * @note This program is distributed in the hope that it will be useful - WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE.\n */\n\n/**\n * PHPMailer POP-Before-SMTP Authentication Class.\n * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication.\n * Does not support APOP.\n * @package PHPMailer\n * @author Richard Davey (original author) <rich@corephp.co.uk>\n * @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>\n * @author Jim Jagielski (jimjag) <jimjag@gmail.com>\n * @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>\n */\nclass POP3\n{\n    /**\n     * The POP3 PHPMailer Version number.\n     * @var string\n     * @access public\n     */\n    public $Version = '5.2.26';\n\n    /**\n     * Default POP3 port number.\n     * @var integer\n     * @access public\n     */\n    public $POP3_PORT = 110;\n\n    /**\n     * Default timeout in seconds.\n     * @var integer\n     * @access public\n     */\n    public $POP3_TIMEOUT = 30;\n\n    /**\n     * POP3 Carriage Return + Line Feed.\n     * @var string\n     * @access public\n     * @deprecated Use the constant instead\n     */\n    public $CRLF = \"\\r\\n\";\n\n    /**\n     * Debug display level.\n     * Options: 0 = no, 1+ = yes\n     * @var integer\n     * @access public\n     */\n    public $do_debug = 0;\n\n    /**\n     * POP3 mail server hostname.\n     * @var string\n     * @access public\n     */\n    public $host;\n\n    /**\n     * POP3 port number.\n     * @var integer\n     * @access public\n     */\n    public $port;\n\n    /**\n     * POP3 Timeout Value in seconds.\n     * @var integer\n     * @access public\n     */\n    public $tval;\n\n    /**\n     * POP3 username\n     * @var string\n     * @access public\n     */\n    public $username;\n\n    /**\n     * POP3 password.\n     * @var string\n     * @access public\n     */\n    public $password;\n\n    /**\n     * Resource handle for the POP3 connection socket.\n     * @var resource\n     * @access protected\n     */\n    protected $pop_conn;\n\n    /**\n     * Are we connected?\n     * @var boolean\n     * @access protected\n     */\n    protected $connected = false;\n\n    /**\n     * Error container.\n     * @var array\n     * @access protected\n     */\n    protected $errors = array();\n\n    /**\n     * Line break constant\n     */\n    const CRLF = \"\\r\\n\";\n\n    /**\n     * Simple static wrapper for all-in-one POP before SMTP\n     * @param $host\n     * @param integer|boolean $port The port number to connect to\n     * @param integer|boolean $timeout The timeout value\n     * @param string $username\n     * @param string $password\n     * @param integer $debug_level\n     * @return boolean\n     */\n    public static function popBeforeSmtp(\n        $host,\n        $port = false,\n        $timeout = false,\n        $username = '',\n        $password = '',\n        $debug_level = 0\n    ) {\n        $pop = new POP3;\n        return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level);\n    }\n\n    /**\n     * Authenticate with a POP3 server.\n     * A connect, login, disconnect sequence\n     * appropriate for POP-before SMTP authorisation.\n     * @access public\n     * @param string $host The hostname to connect to\n     * @param integer|boolean $port The port number to connect to\n     * @param integer|boolean $timeout The timeout value\n     * @param string $username\n     * @param string $password\n     * @param integer $debug_level\n     * @return boolean\n     */\n    public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0)\n    {\n        $this->host = $host;\n        // If no port value provided, use default\n        if (false === $port) {\n            $this->port = $this->POP3_PORT;\n        } else {\n            $this->port = (integer)$port;\n        }\n        // If no timeout value provided, use default\n        if (false === $timeout) {\n            $this->tval = $this->POP3_TIMEOUT;\n        } else {\n            $this->tval = (integer)$timeout;\n        }\n        $this->do_debug = $debug_level;\n        $this->username = $username;\n        $this->password = $password;\n        //  Reset the error log\n        $this->errors = array();\n        //  connect\n        $result = $this->connect($this->host, $this->port, $this->tval);\n        if ($result) {\n            $login_result = $this->login($this->username, $this->password);\n            if ($login_result) {\n                $this->disconnect();\n                return true;\n            }\n        }\n        // We need to disconnect regardless of whether the login succeeded\n        $this->disconnect();\n        return false;\n    }\n\n    /**\n     * Connect to a POP3 server.\n     * @access public\n     * @param string $host\n     * @param integer|boolean $port\n     * @param integer $tval\n     * @return boolean\n     */\n    public function connect($host, $port = false, $tval = 30)\n    {\n        //  Are we already connected?\n        if ($this->connected) {\n            return true;\n        }\n\n        //On Windows this will raise a PHP Warning error if the hostname doesn't exist.\n        //Rather than suppress it with @fsockopen, capture it cleanly instead\n        set_error_handler(array($this, 'catchWarning'));\n\n        if (false === $port) {\n            $port = $this->POP3_PORT;\n        }\n\n        //  connect to the POP3 server\n        $this->pop_conn = fsockopen(\n            $host, //  POP3 Host\n            $port, //  Port #\n            $errno, //  Error Number\n            $errstr, //  Error Message\n            $tval\n        ); //  Timeout (seconds)\n        //  Restore the error handler\n        restore_error_handler();\n\n        //  Did we connect?\n        if (false === $this->pop_conn) {\n            //  It would appear not...\n            $this->setError(array(\n                'error' => \"Failed to connect to server $host on port $port\",\n                'errno' => $errno,\n                'errstr' => $errstr\n            ));\n            return false;\n        }\n\n        //  Increase the stream time-out\n        stream_set_timeout($this->pop_conn, $tval, 0);\n\n        //  Get the POP3 server response\n        $pop3_response = $this->getResponse();\n        //  Check for the +OK\n        if ($this->checkResponse($pop3_response)) {\n            //  The connection is established and the POP3 server is talking\n            $this->connected = true;\n            return true;\n        }\n        return false;\n    }\n\n    /**\n     * Log in to the POP3 server.\n     * Does not support APOP (RFC 2828, 4949).\n     * @access public\n     * @param string $username\n     * @param string $password\n     * @return boolean\n     */\n    public function login($username = '', $password = '')\n    {\n        if (!$this->connected) {\n            $this->setError('Not connected to POP3 server');\n        }\n        if (empty($username)) {\n            $username = $this->username;\n        }\n        if (empty($password)) {\n            $password = $this->password;\n        }\n\n        // Send the Username\n        $this->sendString(\"USER $username\" . self::CRLF);\n        $pop3_response = $this->getResponse();\n        if ($this->checkResponse($pop3_response)) {\n            // Send the Password\n            $this->sendString(\"PASS $password\" . self::CRLF);\n            $pop3_response = $this->getResponse();\n            if ($this->checkResponse($pop3_response)) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * Disconnect from the POP3 server.\n     * @access public\n     */\n    public function disconnect()\n    {\n        $this->sendString('QUIT');\n        //The QUIT command may cause the daemon to exit, which will kill our connection\n        //So ignore errors here\n        try {\n            @fclose($this->pop_conn);\n        } catch (Exception $e) {\n            //Do nothing\n        };\n    }\n\n    /**\n     * Get a response from the POP3 server.\n     * $size is the maximum number of bytes to retrieve\n     * @param integer $size\n     * @return string\n     * @access protected\n     */\n    protected function getResponse($size = 128)\n    {\n        $response = fgets($this->pop_conn, $size);\n        if ($this->do_debug >= 1) {\n            echo \"Server -> Client: $response\";\n        }\n        return $response;\n    }\n\n    /**\n     * Send raw data to the POP3 server.\n     * @param string $string\n     * @return integer\n     * @access protected\n     */\n    protected function sendString($string)\n    {\n        if ($this->pop_conn) {\n            if ($this->do_debug >= 2) { //Show client messages when debug >= 2\n                echo \"Client -> Server: $string\";\n            }\n            return fwrite($this->pop_conn, $string, strlen($string));\n        }\n        return 0;\n    }\n\n    /**\n     * Checks the POP3 server response.\n     * Looks for for +OK or -ERR.\n     * @param string $string\n     * @return boolean\n     * @access protected\n     */\n    protected function checkResponse($string)\n    {\n        if (substr($string, 0, 3) !== '+OK') {\n            $this->setError(array(\n                'error' => \"Server reported an error: $string\",\n                'errno' => 0,\n                'errstr' => ''\n            ));\n            return false;\n        } else {\n            return true;\n        }\n    }\n\n    /**\n     * Add an error to the internal error store.\n     * Also display debug output if it's enabled.\n     * @param $error\n     * @access protected\n     */\n    protected function setError($error)\n    {\n        $this->errors[] = $error;\n        if ($this->do_debug >= 1) {\n            echo '<pre>';\n            foreach ($this->errors as $error) {\n                print_r($error);\n            }\n            echo '</pre>';\n        }\n    }\n\n    /**\n     * Get an array of error messages, if any.\n     * @return array\n     */\n    public function getErrors()\n    {\n        return $this->errors;\n    }\n\n    /**\n     * POP3 connection error handler.\n     * @param integer $errno\n     * @param string $errstr\n     * @param string $errfile\n     * @param integer $errline\n     * @access protected\n     */\n    protected function catchWarning($errno, $errstr, $errfile, $errline)\n    {\n        $this->setError(array(\n            'error' => \"Connecting to the POP3 server raised a PHP warning: \",\n            'errno' => $errno,\n            'errstr' => $errstr,\n            'errfile' => $errfile,\n            'errline' => $errline\n        ));\n    }\n}\n"
  },
  {
    "path": "lib/phpmailer/class.smtp.php",
    "content": "<?php\n/**\n * PHPMailer RFC821 SMTP email transport class.\n * PHP Version 5\n * @package PHPMailer\n * @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project\n * @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>\n * @author Jim Jagielski (jimjag) <jimjag@gmail.com>\n * @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>\n * @author Brent R. Matzelle (original founder)\n * @copyright 2014 Marcus Bointon\n * @copyright 2010 - 2012 Jim Jagielski\n * @copyright 2004 - 2009 Andy Prevost\n * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License\n * @note This program is distributed in the hope that it will be useful - WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE.\n */\n\n/**\n * PHPMailer RFC821 SMTP email transport class.\n * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server.\n * @package PHPMailer\n * @author Chris Ryan\n * @author Marcus Bointon <phpmailer@synchromedia.co.uk>\n */\nclass SMTP\n{\n    /**\n     * The PHPMailer SMTP version number.\n     * @var string\n     */\n    const VERSION = '5.2.26';\n\n    /**\n     * SMTP line break constant.\n     * @var string\n     */\n    const CRLF = \"\\r\\n\";\n\n    /**\n     * The SMTP port to use if one is not specified.\n     * @var integer\n     */\n    const DEFAULT_SMTP_PORT = 25;\n\n    /**\n     * The maximum line length allowed by RFC 2822 section 2.1.1\n     * @var integer\n     */\n    const MAX_LINE_LENGTH = 998;\n\n    /**\n     * Debug level for no output\n     */\n    const DEBUG_OFF = 0;\n\n    /**\n     * Debug level to show client -> server messages\n     */\n    const DEBUG_CLIENT = 1;\n\n    /**\n     * Debug level to show client -> server and server -> client messages\n     */\n    const DEBUG_SERVER = 2;\n\n    /**\n     * Debug level to show connection status, client -> server and server -> client messages\n     */\n    const DEBUG_CONNECTION = 3;\n\n    /**\n     * Debug level to show all messages\n     */\n    const DEBUG_LOWLEVEL = 4;\n\n    /**\n     * The PHPMailer SMTP Version number.\n     * @var string\n     * @deprecated Use the `VERSION` constant instead\n     * @see SMTP::VERSION\n     */\n    public $Version = '5.2.26';\n\n    /**\n     * SMTP server port number.\n     * @var integer\n     * @deprecated This is only ever used as a default value, so use the `DEFAULT_SMTP_PORT` constant instead\n     * @see SMTP::DEFAULT_SMTP_PORT\n     */\n    public $SMTP_PORT = 25;\n\n    /**\n     * SMTP reply line ending.\n     * @var string\n     * @deprecated Use the `CRLF` constant instead\n     * @see SMTP::CRLF\n     */\n    public $CRLF = \"\\r\\n\";\n\n    /**\n     * Debug output level.\n     * Options:\n     * * self::DEBUG_OFF (`0`) No debug output, default\n     * * self::DEBUG_CLIENT (`1`) Client commands\n     * * self::DEBUG_SERVER (`2`) Client commands and server responses\n     * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status\n     * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages\n     * @var integer\n     */\n    public $do_debug = self::DEBUG_OFF;\n\n    /**\n     * How to handle debug output.\n     * Options:\n     * * `echo` Output plain-text as-is, appropriate for CLI\n     * * `html` Output escaped, line breaks converted to `<br>`, appropriate for browser output\n     * * `error_log` Output to error log as configured in php.ini\n     *\n     * Alternatively, you can provide a callable expecting two params: a message string and the debug level:\n     * <code>\n     * $smtp->Debugoutput = function($str, $level) {echo \"debug level $level; message: $str\";};\n     * </code>\n     * @var string|callable\n     */\n    public $Debugoutput = 'echo';\n\n    /**\n     * Whether to use VERP.\n     * @link http://en.wikipedia.org/wiki/Variable_envelope_return_path\n     * @link http://www.postfix.org/VERP_README.html Info on VERP\n     * @var boolean\n     */\n    public $do_verp = false;\n\n    /**\n     * The timeout value for connection, in seconds.\n     * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2\n     * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure.\n     * @link http://tools.ietf.org/html/rfc2821#section-4.5.3.2\n     * @var integer\n     */\n    public $Timeout = 300;\n\n    /**\n     * How long to wait for commands to complete, in seconds.\n     * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2\n     * @var integer\n     */\n    public $Timelimit = 300;\n\n    /**\n     * @var array Patterns to extract an SMTP transaction id from reply to a DATA command.\n     * The first capture group in each regex will be used as the ID.\n     */\n    protected $smtp_transaction_id_patterns = array(\n        'exim' => '/[0-9]{3} OK id=(.*)/',\n        'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/',\n        'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/'\n    );\n\n    /**\n     * @var string The last transaction ID issued in response to a DATA command,\n     * if one was detected\n     */\n    protected $last_smtp_transaction_id;\n\n    /**\n     * The socket for the server connection.\n     * @var resource\n     */\n    protected $smtp_conn;\n\n    /**\n     * Error information, if any, for the last SMTP command.\n     * @var array\n     */\n    protected $error = array(\n        'error' => '',\n        'detail' => '',\n        'smtp_code' => '',\n        'smtp_code_ex' => ''\n    );\n\n    /**\n     * The reply the server sent to us for HELO.\n     * If null, no HELO string has yet been received.\n     * @var string|null\n     */\n    protected $helo_rply = null;\n\n    /**\n     * The set of SMTP extensions sent in reply to EHLO command.\n     * Indexes of the array are extension names.\n     * Value at index 'HELO' or 'EHLO' (according to command that was sent)\n     * represents the server name. In case of HELO it is the only element of the array.\n     * Other values can be boolean TRUE or an array containing extension options.\n     * If null, no HELO/EHLO string has yet been received.\n     * @var array|null\n     */\n    protected $server_caps = null;\n\n    /**\n     * The most recent reply received from the server.\n     * @var string\n     */\n    protected $last_reply = '';\n\n    /**\n     * Output debugging info via a user-selected method.\n     * @see SMTP::$Debugoutput\n     * @see SMTP::$do_debug\n     * @param string $str Debug string to output\n     * @param integer $level The debug level of this message; see DEBUG_* constants\n     * @return void\n     */\n    protected function edebug($str, $level = 0)\n    {\n        if ($level > $this->do_debug) {\n            return;\n        }\n        //Avoid clash with built-in function names\n        if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) {\n            call_user_func($this->Debugoutput, $str, $level);\n            return;\n        }\n        switch ($this->Debugoutput) {\n            case 'error_log':\n                //Don't output, just log\n                error_log($str);\n                break;\n            case 'html':\n                //Cleans up output a bit for a better looking, HTML-safe output\n                echo gmdate('Y-m-d H:i:s') . ' ' . htmlentities(\n                    preg_replace('/[\\r\\n]+/', '', $str),\n                    ENT_QUOTES,\n                    'UTF-8'\n                ) . \"<br>\\n\";\n                break;\n            case 'echo':\n            default:\n                //Normalize line breaks\n                $str = preg_replace('/(\\r\\n|\\r|\\n)/ms', \"\\n\", $str);\n                echo gmdate('Y-m-d H:i:s') . \"\\t\" . str_replace(\n                    \"\\n\",\n                    \"\\n                   \\t                  \",\n                    trim($str)\n                ) . \"\\n\";\n        }\n    }\n\n    /**\n     * Connect to an SMTP server.\n     * @param string $host SMTP server IP or host name\n     * @param integer $port The port number to connect to\n     * @param integer $timeout How long to wait for the connection to open\n     * @param array $options An array of options for stream_context_create()\n     * @access public\n     * @return boolean\n     */\n    public function connect($host, $port = null, $timeout = 30, $options = array())\n    {\n        static $streamok;\n        //This is enabled by default since 5.0.0 but some providers disable it\n        //Check this once and cache the result\n        if (is_null($streamok)) {\n            $streamok = function_exists('stream_socket_client');\n        }\n        // Clear errors to avoid confusion\n        $this->setError('');\n        // Make sure we are __not__ connected\n        if ($this->connected()) {\n            // Already connected, generate error\n            $this->setError('Already connected to a server');\n            return false;\n        }\n        if (empty($port)) {\n            $port = self::DEFAULT_SMTP_PORT;\n        }\n        // Connect to the SMTP server\n        $this->edebug(\n            \"Connection: opening to $host:$port, timeout=$timeout, options=\" .\n            var_export($options, true),\n            self::DEBUG_CONNECTION\n        );\n        $errno = 0;\n        $errstr = '';\n        if ($streamok) {\n            $socket_context = stream_context_create($options);\n            set_error_handler(array($this, 'errorHandler'));\n            $this->smtp_conn = stream_socket_client(\n                $host . \":\" . $port,\n                $errno,\n                $errstr,\n                $timeout,\n                STREAM_CLIENT_CONNECT,\n                $socket_context\n            );\n            restore_error_handler();\n        } else {\n            //Fall back to fsockopen which should work in more places, but is missing some features\n            $this->edebug(\n                \"Connection: stream_socket_client not available, falling back to fsockopen\",\n                self::DEBUG_CONNECTION\n            );\n            set_error_handler(array($this, 'errorHandler'));\n            $this->smtp_conn = fsockopen(\n                $host,\n                $port,\n                $errno,\n                $errstr,\n                $timeout\n            );\n            restore_error_handler();\n        }\n        // Verify we connected properly\n        if (!is_resource($this->smtp_conn)) {\n            $this->setError(\n                'Failed to connect to server',\n                $errno,\n                $errstr\n            );\n            $this->edebug(\n                'SMTP ERROR: ' . $this->error['error']\n                . \": $errstr ($errno)\",\n                self::DEBUG_CLIENT\n            );\n            return false;\n        }\n        $this->edebug('Connection: opened', self::DEBUG_CONNECTION);\n        // SMTP server can take longer to respond, give longer timeout for first read\n        // Windows does not have support for this timeout function\n        if (substr(PHP_OS, 0, 3) != 'WIN') {\n            $max = ini_get('max_execution_time');\n            // Don't bother if unlimited\n            if ($max != 0 && $timeout > $max) {\n                @set_time_limit($timeout);\n            }\n            stream_set_timeout($this->smtp_conn, $timeout, 0);\n        }\n        // Get any announcement\n        $announce = $this->get_lines();\n        $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER);\n        return true;\n    }\n\n    /**\n     * Initiate a TLS (encrypted) session.\n     * @access public\n     * @return boolean\n     */\n    public function startTLS()\n    {\n        if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) {\n            return false;\n        }\n\n        //Allow the best TLS version(s) we can\n        $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT;\n\n        //PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT\n        //so add them back in manually if we can\n        if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) {\n            $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;\n            $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;\n        }\n\n        // Begin encrypted connection\n        set_error_handler(array($this, 'errorHandler'));\n        $crypto_ok = stream_socket_enable_crypto(\n            $this->smtp_conn,\n            true,\n            $crypto_method\n        );\n        restore_error_handler();\n        return $crypto_ok;\n    }\n\n    /**\n     * Perform SMTP authentication.\n     * Must be run after hello().\n     * @see hello()\n     * @param string $username The user name\n     * @param string $password The password\n     * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5, XOAUTH2)\n     * @param string $realm The auth realm for NTLM\n     * @param string $workstation The auth workstation for NTLM\n     * @param null|OAuth $OAuth An optional OAuth instance (@see PHPMailerOAuth)\n     * @return bool True if successfully authenticated.* @access public\n     */\n    public function authenticate(\n        $username,\n        $password,\n        $authtype = null,\n        $realm = '',\n        $workstation = '',\n        $OAuth = null\n    ) {\n        if (!$this->server_caps) {\n            $this->setError('Authentication is not allowed before HELO/EHLO');\n            return false;\n        }\n\n        if (array_key_exists('EHLO', $this->server_caps)) {\n            // SMTP extensions are available; try to find a proper authentication method\n            if (!array_key_exists('AUTH', $this->server_caps)) {\n                $this->setError('Authentication is not allowed at this stage');\n                // 'at this stage' means that auth may be allowed after the stage changes\n                // e.g. after STARTTLS\n                return false;\n            }\n\n            self::edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL);\n            self::edebug(\n                'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']),\n                self::DEBUG_LOWLEVEL\n            );\n\n            if (empty($authtype)) {\n                foreach (array('CRAM-MD5', 'LOGIN', 'PLAIN', 'NTLM', 'XOAUTH2') as $method) {\n                    if (in_array($method, $this->server_caps['AUTH'])) {\n                        $authtype = $method;\n                        break;\n                    }\n                }\n                if (empty($authtype)) {\n                    $this->setError('No supported authentication methods found');\n                    return false;\n                }\n                self::edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL);\n            }\n\n            if (!in_array($authtype, $this->server_caps['AUTH'])) {\n                $this->setError(\"The requested authentication method \\\"$authtype\\\" is not supported by the server\");\n                return false;\n            }\n        } elseif (empty($authtype)) {\n            $authtype = 'LOGIN';\n        }\n        switch ($authtype) {\n            case 'PLAIN':\n                // Start authentication\n                if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) {\n                    return false;\n                }\n                // Send encoded username and password\n                if (!$this->sendCommand(\n                    'User & Password',\n                    base64_encode(\"\\0\" . $username . \"\\0\" . $password),\n                    235\n                )\n                ) {\n                    return false;\n                }\n                break;\n            case 'LOGIN':\n                // Start authentication\n                if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) {\n                    return false;\n                }\n                if (!$this->sendCommand(\"Username\", base64_encode($username), 334)) {\n                    return false;\n                }\n                if (!$this->sendCommand(\"Password\", base64_encode($password), 235)) {\n                    return false;\n                }\n                break;\n            case 'XOAUTH2':\n                //If the OAuth Instance is not set. Can be a case when PHPMailer is used\n                //instead of PHPMailerOAuth\n                if (is_null($OAuth)) {\n                    return false;\n                }\n                $oauth = $OAuth->getOauth64();\n\n                // Start authentication\n                if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) {\n                    return false;\n                }\n                break;\n            case 'NTLM':\n                /*\n                 * ntlm_sasl_client.php\n                 * Bundled with Permission\n                 *\n                 * How to telnet in windows:\n                 * http://technet.microsoft.com/en-us/library/aa995718%28EXCHG.65%29.aspx\n                 * PROTOCOL Docs http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication\n                 */\n                require_once 'extras/ntlm_sasl_client.php';\n                $temp = new stdClass;\n                $ntlm_client = new ntlm_sasl_client_class;\n                //Check that functions are available\n                if (!$ntlm_client->initialize($temp)) {\n                    $this->setError($temp->error);\n                    $this->edebug(\n                        'You need to enable some modules in your php.ini file: '\n                        . $this->error['error'],\n                        self::DEBUG_CLIENT\n                    );\n                    return false;\n                }\n                //msg1\n                $msg1 = $ntlm_client->typeMsg1($realm, $workstation); //msg1\n\n                if (!$this->sendCommand(\n                    'AUTH NTLM',\n                    'AUTH NTLM ' . base64_encode($msg1),\n                    334\n                )\n                ) {\n                    return false;\n                }\n                //Though 0 based, there is a white space after the 3 digit number\n                //msg2\n                $challenge = substr($this->last_reply, 3);\n                $challenge = base64_decode($challenge);\n                $ntlm_res = $ntlm_client->NTLMResponse(\n                    substr($challenge, 24, 8),\n                    $password\n                );\n                //msg3\n                $msg3 = $ntlm_client->typeMsg3(\n                    $ntlm_res,\n                    $username,\n                    $realm,\n                    $workstation\n                );\n                // send encoded username\n                return $this->sendCommand('Username', base64_encode($msg3), 235);\n            case 'CRAM-MD5':\n                // Start authentication\n                if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) {\n                    return false;\n                }\n                // Get the challenge\n                $challenge = base64_decode(substr($this->last_reply, 4));\n\n                // Build the response\n                $response = $username . ' ' . $this->hmac($challenge, $password);\n\n                // send encoded credentials\n                return $this->sendCommand('Username', base64_encode($response), 235);\n            default:\n                $this->setError(\"Authentication method \\\"$authtype\\\" is not supported\");\n                return false;\n        }\n        return true;\n    }\n\n    /**\n     * Calculate an MD5 HMAC hash.\n     * Works like hash_hmac('md5', $data, $key)\n     * in case that function is not available\n     * @param string $data The data to hash\n     * @param string $key The key to hash with\n     * @access protected\n     * @return string\n     */\n    protected function hmac($data, $key)\n    {\n        if (function_exists('hash_hmac')) {\n            return hash_hmac('md5', $data, $key);\n        }\n\n        // The following borrowed from\n        // http://php.net/manual/en/function.mhash.php#27225\n\n        // RFC 2104 HMAC implementation for php.\n        // Creates an md5 HMAC.\n        // Eliminates the need to install mhash to compute a HMAC\n        // by Lance Rushing\n\n        $bytelen = 64; // byte length for md5\n        if (strlen($key) > $bytelen) {\n            $key = pack('H*', md5($key));\n        }\n        $key = str_pad($key, $bytelen, chr(0x00));\n        $ipad = str_pad('', $bytelen, chr(0x36));\n        $opad = str_pad('', $bytelen, chr(0x5c));\n        $k_ipad = $key ^ $ipad;\n        $k_opad = $key ^ $opad;\n\n        return md5($k_opad . pack('H*', md5($k_ipad . $data)));\n    }\n\n    /**\n     * Check connection state.\n     * @access public\n     * @return boolean True if connected.\n     */\n    public function connected()\n    {\n        if (is_resource($this->smtp_conn)) {\n            $sock_status = stream_get_meta_data($this->smtp_conn);\n            if ($sock_status['eof']) {\n                // The socket is valid but we are not connected\n                $this->edebug(\n                    'SMTP NOTICE: EOF caught while checking if connected',\n                    self::DEBUG_CLIENT\n                );\n                $this->close();\n                return false;\n            }\n            return true; // everything looks good\n        }\n        return false;\n    }\n\n    /**\n     * Close the socket and clean up the state of the class.\n     * Don't use this function without first trying to use QUIT.\n     * @see quit()\n     * @access public\n     * @return void\n     */\n    public function close()\n    {\n        $this->setError('');\n        $this->server_caps = null;\n        $this->helo_rply = null;\n        if (is_resource($this->smtp_conn)) {\n            // close the connection and cleanup\n            fclose($this->smtp_conn);\n            $this->smtp_conn = null; //Makes for cleaner serialization\n            $this->edebug('Connection: closed', self::DEBUG_CONNECTION);\n        }\n    }\n\n    /**\n     * Send an SMTP DATA command.\n     * Issues a data command and sends the msg_data to the server,\n     * finializing the mail transaction. $msg_data is the message\n     * that is to be send with the headers. Each header needs to be\n     * on a single line followed by a <CRLF> with the message headers\n     * and the message body being separated by and additional <CRLF>.\n     * Implements rfc 821: DATA <CRLF>\n     * @param string $msg_data Message data to send\n     * @access public\n     * @return boolean\n     */\n    public function data($msg_data)\n    {\n        //This will use the standard timelimit\n        if (!$this->sendCommand('DATA', 'DATA', 354)) {\n            return false;\n        }\n\n        /* The server is ready to accept data!\n         * According to rfc821 we should not send more than 1000 characters on a single line (including the CRLF)\n         * so we will break the data up into lines by \\r and/or \\n then if needed we will break each of those into\n         * smaller lines to fit within the limit.\n         * We will also look for lines that start with a '.' and prepend an additional '.'.\n         * NOTE: this does not count towards line-length limit.\n         */\n\n        // Normalize line breaks before exploding\n        $lines = explode(\"\\n\", str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $msg_data));\n\n        /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field\n         * of the first line (':' separated) does not contain a space then it _should_ be a header and we will\n         * process all lines before a blank line as headers.\n         */\n\n        $field = substr($lines[0], 0, strpos($lines[0], ':'));\n        $in_headers = false;\n        if (!empty($field) && strpos($field, ' ') === false) {\n            $in_headers = true;\n        }\n\n        foreach ($lines as $line) {\n            $lines_out = array();\n            if ($in_headers and $line == '') {\n                $in_headers = false;\n            }\n            //Break this line up into several smaller lines if it's too long\n            //Micro-optimisation: isset($str[$len]) is faster than (strlen($str) > $len),\n            while (isset($line[self::MAX_LINE_LENGTH])) {\n                //Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on\n                //so as to avoid breaking in the middle of a word\n                $pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' ');\n                //Deliberately matches both false and 0\n                if (!$pos) {\n                    //No nice break found, add a hard break\n                    $pos = self::MAX_LINE_LENGTH - 1;\n                    $lines_out[] = substr($line, 0, $pos);\n                    $line = substr($line, $pos);\n                } else {\n                    //Break at the found point\n                    $lines_out[] = substr($line, 0, $pos);\n                    //Move along by the amount we dealt with\n                    $line = substr($line, $pos + 1);\n                }\n                //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1\n                if ($in_headers) {\n                    $line = \"\\t\" . $line;\n                }\n            }\n            $lines_out[] = $line;\n\n            //Send the lines to the server\n            foreach ($lines_out as $line_out) {\n                //RFC2821 section 4.5.2\n                if (!empty($line_out) and $line_out[0] == '.') {\n                    $line_out = '.' . $line_out;\n                }\n                $this->client_send($line_out . self::CRLF);\n            }\n        }\n\n        //Message data has been sent, complete the command\n        //Increase timelimit for end of DATA command\n        $savetimelimit = $this->Timelimit;\n        $this->Timelimit = $this->Timelimit * 2;\n        $result = $this->sendCommand('DATA END', '.', 250);\n        $this->recordLastTransactionID();\n        //Restore timelimit\n        $this->Timelimit = $savetimelimit;\n        return $result;\n    }\n\n    /**\n     * Send an SMTP HELO or EHLO command.\n     * Used to identify the sending server to the receiving server.\n     * This makes sure that client and server are in a known state.\n     * Implements RFC 821: HELO <SP> <domain> <CRLF>\n     * and RFC 2821 EHLO.\n     * @param string $host The host name or IP to connect to\n     * @access public\n     * @return boolean\n     */\n    public function hello($host = '')\n    {\n        //Try extended hello first (RFC 2821)\n        return (boolean)($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host));\n    }\n\n    /**\n     * Send an SMTP HELO or EHLO command.\n     * Low-level implementation used by hello()\n     * @see hello()\n     * @param string $hello The HELO string\n     * @param string $host The hostname to say we are\n     * @access protected\n     * @return boolean\n     */\n    protected function sendHello($hello, $host)\n    {\n        $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250);\n        $this->helo_rply = $this->last_reply;\n        if ($noerror) {\n            $this->parseHelloFields($hello);\n        } else {\n            $this->server_caps = null;\n        }\n        return $noerror;\n    }\n\n    /**\n     * Parse a reply to HELO/EHLO command to discover server extensions.\n     * In case of HELO, the only parameter that can be discovered is a server name.\n     * @access protected\n     * @param string $type - 'HELO' or 'EHLO'\n     */\n    protected function parseHelloFields($type)\n    {\n        $this->server_caps = array();\n        $lines = explode(\"\\n\", $this->helo_rply);\n\n        foreach ($lines as $n => $s) {\n            //First 4 chars contain response code followed by - or space\n            $s = trim(substr($s, 4));\n            if (empty($s)) {\n                continue;\n            }\n            $fields = explode(' ', $s);\n            if (!empty($fields)) {\n                if (!$n) {\n                    $name = $type;\n                    $fields = $fields[0];\n                } else {\n                    $name = array_shift($fields);\n                    switch ($name) {\n                        case 'SIZE':\n                            $fields = ($fields ? $fields[0] : 0);\n                            break;\n                        case 'AUTH':\n                            if (!is_array($fields)) {\n                                $fields = array();\n                            }\n                            break;\n                        default:\n                            $fields = true;\n                    }\n                }\n                $this->server_caps[$name] = $fields;\n            }\n        }\n    }\n\n    /**\n     * Send an SMTP MAIL command.\n     * Starts a mail transaction from the email address specified in\n     * $from. Returns true if successful or false otherwise. If True\n     * the mail transaction is started and then one or more recipient\n     * commands may be called followed by a data command.\n     * Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>\n     * @param string $from Source address of this message\n     * @access public\n     * @return boolean\n     */\n    public function mail($from)\n    {\n        $useVerp = ($this->do_verp ? ' XVERP' : '');\n        return $this->sendCommand(\n            'MAIL FROM',\n            'MAIL FROM:<' . $from . '>' . $useVerp,\n            250\n        );\n    }\n\n    /**\n     * Send an SMTP QUIT command.\n     * Closes the socket if there is no error or the $close_on_error argument is true.\n     * Implements from rfc 821: QUIT <CRLF>\n     * @param boolean $close_on_error Should the connection close if an error occurs?\n     * @access public\n     * @return boolean\n     */\n    public function quit($close_on_error = true)\n    {\n        $noerror = $this->sendCommand('QUIT', 'QUIT', 221);\n        $err = $this->error; //Save any error\n        if ($noerror or $close_on_error) {\n            $this->close();\n            $this->error = $err; //Restore any error from the quit command\n        }\n        return $noerror;\n    }\n\n    /**\n     * Send an SMTP RCPT command.\n     * Sets the TO argument to $toaddr.\n     * Returns true if the recipient was accepted false if it was rejected.\n     * Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>\n     * @param string $address The address the message is being sent to\n     * @access public\n     * @return boolean\n     */\n    public function recipient($address)\n    {\n        return $this->sendCommand(\n            'RCPT TO',\n            'RCPT TO:<' . $address . '>',\n            array(250, 251)\n        );\n    }\n\n    /**\n     * Send an SMTP RSET command.\n     * Abort any transaction that is currently in progress.\n     * Implements rfc 821: RSET <CRLF>\n     * @access public\n     * @return boolean True on success.\n     */\n    public function reset()\n    {\n        return $this->sendCommand('RSET', 'RSET', 250);\n    }\n\n    /**\n     * Send a command to an SMTP server and check its return code.\n     * @param string $command The command name - not sent to the server\n     * @param string $commandstring The actual command to send\n     * @param integer|array $expect One or more expected integer success codes\n     * @access protected\n     * @return boolean True on success.\n     */\n    protected function sendCommand($command, $commandstring, $expect)\n    {\n        if (!$this->connected()) {\n            $this->setError(\"Called $command without being connected\");\n            return false;\n        }\n        //Reject line breaks in all commands\n        if (strpos($commandstring, \"\\n\") !== false or strpos($commandstring, \"\\r\") !== false) {\n            $this->setError(\"Command '$command' contained line breaks\");\n            return false;\n        }\n        $this->client_send($commandstring . self::CRLF);\n\n        $this->last_reply = $this->get_lines();\n        // Fetch SMTP code and possible error code explanation\n        $matches = array();\n        if (preg_match(\"/^([0-9]{3})[ -](?:([0-9]\\\\.[0-9]\\\\.[0-9]) )?/\", $this->last_reply, $matches)) {\n            $code = $matches[1];\n            $code_ex = (count($matches) > 2 ? $matches[2] : null);\n            // Cut off error code from each response line\n            $detail = preg_replace(\n                \"/{$code}[ -]\" .\n                ($code_ex ? str_replace('.', '\\\\.', $code_ex) . ' ' : '') . \"/m\",\n                '',\n                $this->last_reply\n            );\n        } else {\n            // Fall back to simple parsing if regex fails\n            $code = substr($this->last_reply, 0, 3);\n            $code_ex = null;\n            $detail = substr($this->last_reply, 4);\n        }\n\n        $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);\n\n        if (!in_array($code, (array)$expect)) {\n            $this->setError(\n                \"$command command failed\",\n                $detail,\n                $code,\n                $code_ex\n            );\n            $this->edebug(\n                'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply,\n                self::DEBUG_CLIENT\n            );\n            return false;\n        }\n\n        $this->setError('');\n        return true;\n    }\n\n    /**\n     * Send an SMTP SAML command.\n     * Starts a mail transaction from the email address specified in $from.\n     * Returns true if successful or false otherwise. If True\n     * the mail transaction is started and then one or more recipient\n     * commands may be called followed by a data command. This command\n     * will send the message to the users terminal if they are logged\n     * in and send them an email.\n     * Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>\n     * @param string $from The address the message is from\n     * @access public\n     * @return boolean\n     */\n    public function sendAndMail($from)\n    {\n        return $this->sendCommand('SAML', \"SAML FROM:$from\", 250);\n    }\n\n    /**\n     * Send an SMTP VRFY command.\n     * @param string $name The name to verify\n     * @access public\n     * @return boolean\n     */\n    public function verify($name)\n    {\n        return $this->sendCommand('VRFY', \"VRFY $name\", array(250, 251));\n    }\n\n    /**\n     * Send an SMTP NOOP command.\n     * Used to keep keep-alives alive, doesn't actually do anything\n     * @access public\n     * @return boolean\n     */\n    public function noop()\n    {\n        return $this->sendCommand('NOOP', 'NOOP', 250);\n    }\n\n    /**\n     * Send an SMTP TURN command.\n     * This is an optional command for SMTP that this class does not support.\n     * This method is here to make the RFC821 Definition complete for this class\n     * and _may_ be implemented in future\n     * Implements from rfc 821: TURN <CRLF>\n     * @access public\n     * @return boolean\n     */\n    public function turn()\n    {\n        $this->setError('The SMTP TURN command is not implemented');\n        $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT);\n        return false;\n    }\n\n    /**\n     * Send raw data to the server.\n     * @param string $data The data to send\n     * @access public\n     * @return integer|boolean The number of bytes sent to the server or false on error\n     */\n    public function client_send($data)\n    {\n        $this->edebug(\"CLIENT -> SERVER: $data\", self::DEBUG_CLIENT);\n        set_error_handler(array($this, 'errorHandler'));\n        $result = fwrite($this->smtp_conn, $data);\n        restore_error_handler();\n        return $result;\n    }\n\n    /**\n     * Get the latest error.\n     * @access public\n     * @return array\n     */\n    public function getError()\n    {\n        return $this->error;\n    }\n\n    /**\n     * Get SMTP extensions available on the server\n     * @access public\n     * @return array|null\n     */\n    public function getServerExtList()\n    {\n        return $this->server_caps;\n    }\n\n    /**\n     * A multipurpose method\n     * The method works in three ways, dependent on argument value and current state\n     *   1. HELO/EHLO was not sent - returns null and set up $this->error\n     *   2. HELO was sent\n     *     $name = 'HELO': returns server name\n     *     $name = 'EHLO': returns boolean false\n     *     $name = any string: returns null and set up $this->error\n     *   3. EHLO was sent\n     *     $name = 'HELO'|'EHLO': returns server name\n     *     $name = any string: if extension $name exists, returns boolean True\n     *       or its options. Otherwise returns boolean False\n     * In other words, one can use this method to detect 3 conditions:\n     *  - null returned: handshake was not or we don't know about ext (refer to $this->error)\n     *  - false returned: the requested feature exactly not exists\n     *  - positive value returned: the requested feature exists\n     * @param string $name Name of SMTP extension or 'HELO'|'EHLO'\n     * @return mixed\n     */\n    public function getServerExt($name)\n    {\n        if (!$this->server_caps) {\n            $this->setError('No HELO/EHLO was sent');\n            return null;\n        }\n\n        // the tight logic knot ;)\n        if (!array_key_exists($name, $this->server_caps)) {\n            if ($name == 'HELO') {\n                return $this->server_caps['EHLO'];\n            }\n            if ($name == 'EHLO' || array_key_exists('EHLO', $this->server_caps)) {\n                return false;\n            }\n            $this->setError('HELO handshake was used. Client knows nothing about server extensions');\n            return null;\n        }\n\n        return $this->server_caps[$name];\n    }\n\n    /**\n     * Get the last reply from the server.\n     * @access public\n     * @return string\n     */\n    public function getLastReply()\n    {\n        return $this->last_reply;\n    }\n\n    /**\n     * Read the SMTP server's response.\n     * Either before eof or socket timeout occurs on the operation.\n     * With SMTP we can tell if we have more lines to read if the\n     * 4th character is '-' symbol. If it is a space then we don't\n     * need to read anything else.\n     * @access protected\n     * @return string\n     */\n    protected function get_lines()\n    {\n        // If the connection is bad, give up straight away\n        if (!is_resource($this->smtp_conn)) {\n            return '';\n        }\n        $data = '';\n        $endtime = 0;\n        stream_set_timeout($this->smtp_conn, $this->Timeout);\n        if ($this->Timelimit > 0) {\n            $endtime = time() + $this->Timelimit;\n        }\n        while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) {\n            $str = @fgets($this->smtp_conn, 515);\n            $this->edebug(\"SMTP -> get_lines(): \\$data is \\\"$data\\\"\", self::DEBUG_LOWLEVEL);\n            $this->edebug(\"SMTP -> get_lines(): \\$str is  \\\"$str\\\"\", self::DEBUG_LOWLEVEL);\n            $data .= $str;\n            // If response is only 3 chars (not valid, but RFC5321 S4.2 says it must be handled),\n            // or 4th character is a space, we are done reading, break the loop,\n            // string array access is a micro-optimisation over strlen\n            if (!isset($str[3]) or (isset($str[3]) and $str[3] == ' ')) {\n                break;\n            }\n            // Timed-out? Log and break\n            $info = stream_get_meta_data($this->smtp_conn);\n            if ($info['timed_out']) {\n                $this->edebug(\n                    'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)',\n                    self::DEBUG_LOWLEVEL\n                );\n                break;\n            }\n            // Now check if reads took too long\n            if ($endtime and time() > $endtime) {\n                $this->edebug(\n                    'SMTP -> get_lines(): timelimit reached (' .\n                    $this->Timelimit . ' sec)',\n                    self::DEBUG_LOWLEVEL\n                );\n                break;\n            }\n        }\n        return $data;\n    }\n\n    /**\n     * Enable or disable VERP address generation.\n     * @param boolean $enabled\n     */\n    public function setVerp($enabled = false)\n    {\n        $this->do_verp = $enabled;\n    }\n\n    /**\n     * Get VERP address generation mode.\n     * @return boolean\n     */\n    public function getVerp()\n    {\n        return $this->do_verp;\n    }\n\n    /**\n     * Set error messages and codes.\n     * @param string $message The error message\n     * @param string $detail Further detail on the error\n     * @param string $smtp_code An associated SMTP error code\n     * @param string $smtp_code_ex Extended SMTP code\n     */\n    protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '')\n    {\n        $this->error = array(\n            'error' => $message,\n            'detail' => $detail,\n            'smtp_code' => $smtp_code,\n            'smtp_code_ex' => $smtp_code_ex\n        );\n    }\n\n    /**\n     * Set debug output method.\n     * @param string|callable $method The name of the mechanism to use for debugging output, or a callable to handle it.\n     */\n    public function setDebugOutput($method = 'echo')\n    {\n        $this->Debugoutput = $method;\n    }\n\n    /**\n     * Get debug output method.\n     * @return string\n     */\n    public function getDebugOutput()\n    {\n        return $this->Debugoutput;\n    }\n\n    /**\n     * Set debug output level.\n     * @param integer $level\n     */\n    public function setDebugLevel($level = 0)\n    {\n        $this->do_debug = $level;\n    }\n\n    /**\n     * Get debug output level.\n     * @return integer\n     */\n    public function getDebugLevel()\n    {\n        return $this->do_debug;\n    }\n\n    /**\n     * Set SMTP timeout.\n     * @param integer $timeout\n     */\n    public function setTimeout($timeout = 0)\n    {\n        $this->Timeout = $timeout;\n    }\n\n    /**\n     * Get SMTP timeout.\n     * @return integer\n     */\n    public function getTimeout()\n    {\n        return $this->Timeout;\n    }\n\n    /**\n     * Reports an error number and string.\n     * @param integer $errno The error number returned by PHP.\n     * @param string $errmsg The error message returned by PHP.\n     * @param string $errfile The file the error occurred in\n     * @param integer $errline The line number the error occurred on\n     */\n    protected function errorHandler($errno, $errmsg, $errfile = '', $errline = 0)\n    {\n        $notice = 'Connection failed.';\n        $this->setError(\n            $notice,\n            $errno,\n            $errmsg\n        );\n        $this->edebug(\n            $notice . ' Error #' . $errno . ': ' . $errmsg . \" [$errfile line $errline]\",\n            self::DEBUG_CONNECTION\n        );\n    }\n\n    /**\n     * Extract and return the ID of the last SMTP transaction based on\n     * a list of patterns provided in SMTP::$smtp_transaction_id_patterns.\n     * Relies on the host providing the ID in response to a DATA command.\n     * If no reply has been received yet, it will return null.\n     * If no pattern was matched, it will return false.\n     * @return bool|null|string\n     */\n    protected function recordLastTransactionID()\n    {\n        $reply = $this->getLastReply();\n\n        if (empty($reply)) {\n            $this->last_smtp_transaction_id = null;\n        } else {\n            $this->last_smtp_transaction_id = false;\n            foreach ($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {\n                if (preg_match($smtp_transaction_id_pattern, $reply, $matches)) {\n                    $this->last_smtp_transaction_id = $matches[1];\n                }\n            }\n        }\n\n        return $this->last_smtp_transaction_id;\n    }\n\n    /**\n     * Get the queue/transaction ID of the last SMTP transaction\n     * If no reply has been received yet, it will return null.\n     * If no pattern was matched, it will return false.\n     * @return bool|null|string\n     * @see recordLastTransactionID()\n     */\n    public function getLastTransactionID()\n    {\n        return $this->last_smtp_transaction_id;\n    }\n}\n"
  },
  {
    "path": "lib/phpmailer/extras/EasyPeasyICS.php",
    "content": "<?php\n/**\n * EasyPeasyICS Simple ICS/vCal data generator.\n * @author Marcus Bointon <phpmailer@synchromedia.co.uk>\n * @author Manuel Reinhard <manu@sprain.ch>\n *\n * Built with inspiration from\n * http://stackoverflow.com/questions/1463480/how-can-i-use-php-to-dynamically-publish-an-ical-file-to-be-read-by-google-calend/1464355#1464355\n * History:\n * 2010/12/17 - Manuel Reinhard - when it all started\n * 2014 PHPMailer project becomes maintainer\n */\n\n/**\n * Class EasyPeasyICS.\n * Simple ICS data generator\n * @package phpmailer\n * @subpackage easypeasyics\n */\nclass EasyPeasyICS\n{\n    /**\n     * The name of the calendar\n     * @var string\n     */\n    protected $calendarName;\n    /**\n     * The array of events to add to this calendar\n     * @var array\n     */\n    protected $events = array();\n\n    /**\n     * Constructor\n     * @param string $calendarName\n     */\n    public function __construct($calendarName = \"\")\n    {\n        $this->calendarName = $calendarName;\n    }\n\n    /**\n     * Add an event to this calendar.\n     * @param string $start The start date and time as a unix timestamp\n     * @param string $end The end date and time as a unix timestamp\n     * @param string $summary A summary or title for the event\n     * @param string $description A description of the event\n     * @param string $url A URL for the event\n     * @param string $uid A unique identifier for the event - generated automatically if not provided\n     * @return array An array of event details, including any generated UID\n     */\n    public function addEvent($start, $end, $summary = '', $description = '', $url = '', $uid = '')\n    {\n        if (empty($uid)) {\n            $uid = md5(uniqid(mt_rand(), true)) . '@EasyPeasyICS';\n        }\n        $event = array(\n            'start' => gmdate('Ymd', $start) . 'T' . gmdate('His', $start) . 'Z',\n            'end' => gmdate('Ymd', $end) . 'T' . gmdate('His', $end) . 'Z',\n            'summary' => $summary,\n            'description' => $description,\n            'url' => $url,\n            'uid' => $uid\n        );\n        $this->events[] = $event;\n        return $event;\n    }\n\n    /**\n     * @return array Get the array of events.\n     */\n    public function getEvents()\n    {\n        return $this->events;\n    }\n\n    /**\n     * Clear all events.\n     */\n    public function clearEvents()\n    {\n        $this->events = array();\n    }\n\n    /**\n     * Get the name of the calendar.\n     * @return string\n     */\n    public function getName()\n    {\n        return $this->calendarName;\n    }\n\n    /**\n     * Set the name of the calendar.\n     * @param $name\n     */\n    public function setName($name)\n    {\n        $this->calendarName = $name;\n    }\n\n    /**\n     * Render and optionally output a vcal string.\n     * @param bool $output Whether to output the calendar data directly (the default).\n     * @return string The complete rendered vlal\n     */\n    public function render($output = true)\n    {\n        //Add header\n        $ics = 'BEGIN:VCALENDAR\nMETHOD:PUBLISH\nVERSION:2.0\nX-WR-CALNAME:' . $this->calendarName . '\nPRODID:-//hacksw/handcal//NONSGML v1.0//EN';\n\n        //Add events\n        foreach ($this->events as $event) {\n            $ics .= '\nBEGIN:VEVENT\nUID:' . $event['uid'] . '\nDTSTAMP:' . gmdate('Ymd') . 'T' . gmdate('His') . 'Z\nDTSTART:' . $event['start'] . '\nDTEND:' . $event['end'] . '\nSUMMARY:' . str_replace(\"\\n\", \"\\\\n\", $event['summary']) . '\nDESCRIPTION:' . str_replace(\"\\n\", \"\\\\n\", $event['description']) . '\nURL;VALUE=URI:' . $event['url'] . '\nEND:VEVENT';\n        }\n\n        //Add footer\n        $ics .= '\nEND:VCALENDAR';\n\n        if ($output) {\n            //Output\n            $filename = $this->calendarName;\n            //Filename needs quoting if it contains spaces\n            if (strpos($filename, ' ') !== false) {\n                $filename = '\"'.$filename.'\"';\n            }\n            header('Content-type: text/calendar; charset=utf-8');\n            header('Content-Disposition: inline; filename=' . $filename . '.ics');\n            echo $ics;\n        }\n        return $ics;\n    }\n}\n"
  },
  {
    "path": "lib/phpmailer/extras/README.md",
    "content": "# PHPMailer Extras\n\nThese classes provide optional additional functions to PHPMailer.\n\nThese are not loaded by the PHPMailer autoloader, so in some cases you may need to `require` them yourself before using them.\n\n## EasyPeasyICS\n\nThis class was originally written by Manuel Reinhard and provides a simple means of generating ICS/vCal files that are used in sending calendar events. PHPMailer does not use it directly, but you can use it to generate content appropriate for placing in the `Ical` property of PHPMailer. The PHPMailer project is now its official home as Manuel has given permission for that and is no longer maintaining it himself.\n\n## htmlfilter\n\nThis class by Konstantin Riabitsev and Jim Jagielski implements HTML filtering to remove potentially malicious tags, such as `<script>` or `onclick=` attributes that can result in XSS attacks. This is a simple filter and is not as comprehensive as [HTMLawed](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/) or [HTMLPurifier](http://htmlpurifier.org), but it's easier to use and considerably better than nothing! PHPMailer does not use it directly, but you may want to apply it to user-supplied HTML before using it as a message body.\n\n## NTLM_SASL_client\n\nThis class by Manuel Lemos (bundled with permission) adds the ability to authenticate with Microsoft Windows mail servers that use NTLM-based authentication. It is used by PHPMailer if you send via SMTP and set the `AuthType` property to `NTLM`; you will also need to use the `Realm` and `Workstation` properties. The original source is [here](http://www.phpclasses.org/browse/file/7495.html).\n"
  },
  {
    "path": "lib/phpmailer/extras/htmlfilter.php",
    "content": "<?php\n/**\n * htmlfilter.inc\n * ---------------\n * This set of functions allows you to filter html in order to remove\n * any malicious tags from it. Useful in cases when you need to filter\n * user input for any cross-site-scripting attempts.\n *\n * Copyright (C) 2002-2004 by Duke University\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\t See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301  USA\n *\n * @Author\tKonstantin Riabitsev <icon@linux.duke.edu>\n * @Author  Jim Jagielski <jim@jaguNET.com / jimjag@gmail.com>\n * @Version 1.1 ($Date$)\n */\n\n/**\n * This function returns the final tag out of the tag name, an array\n * of attributes, and the type of the tag. This function is called by\n * tln_sanitize internally.\n *\n * @param string $tagname the name of the tag.\n * @param array $attary the array of attributes and their values\n * @param integer $tagtype The type of the tag (see in comments).\n * @return string A string with the final tag representation.\n */\nfunction tln_tagprint($tagname, $attary, $tagtype)\n{\n    if ($tagtype == 2) {\n        $fulltag = '</' . $tagname . '>';\n    } else {\n        $fulltag = '<' . $tagname;\n        if (is_array($attary) && sizeof($attary)) {\n            $atts = array();\n            foreach($attary as $attname => $attvalue) {\n                array_push($atts, \"$attname=$attvalue\");\n            }\n            $fulltag .= ' ' . join(' ', $atts);\n        }\n        if ($tagtype == 3) {\n            $fulltag .= ' /';\n        }\n        $fulltag .= '>';\n    }\n    return $fulltag;\n}\n\n/**\n * A small helper function to use with array_walk. Modifies a by-ref\n * value and makes it lowercase.\n *\n * @param string $val a value passed by-ref.\n * @return\t\tvoid since it modifies a by-ref value.\n */\nfunction tln_casenormalize(&$val)\n{\n    $val = strtolower($val);\n}\n\n/**\n * This function skips any whitespace from the current position within\n * a string and to the next non-whitespace value.\n *\n * @param string $body the string\n * @param integer $offset the offset within the string where we should start\n *\t\t\t\t   looking for the next non-whitespace character.\n * @return integer          the location within the $body where the next\n *\t\t\t\t   non-whitespace char is located.\n */\nfunction tln_skipspace($body, $offset)\n{\n    preg_match('/^(\\s*)/s', substr($body, $offset), $matches);\n    if (sizeof($matches[1])) {\n        $count = strlen($matches[1]);\n        $offset += $count;\n    }\n    return $offset;\n}\n\n/**\n * This function looks for the next character within a string.\tIt's\n * really just a glorified \"strpos\", except it catches the failures\n * nicely.\n *\n * @param string $body   The string to look for needle in.\n * @param integer $offset Start looking from this position.\n * @param string $needle The character/string to look for.\n * @return integer           location of the next occurrence of the needle, or\n *\t\t\t\t   strlen($body) if needle wasn't found.\n */\nfunction tln_findnxstr($body, $offset, $needle)\n{\n    $pos = strpos($body, $needle, $offset);\n    if ($pos === false) {\n        $pos = strlen($body);\n    }\n    return $pos;\n}\n\n/**\n * This function takes a PCRE-style regexp and tries to match it\n * within the string.\n *\n * @param string $body   The string to look for needle in.\n * @param integer $offset Start looking from here.\n * @param string $reg       A PCRE-style regex to match.\n * @return array|boolean  Returns a false if no matches found, or an array\n *\t\t\t\t   with the following members:\n *\t\t\t\t   - integer with the location of the match within $body\n *\t\t\t\t   - string with whatever content between offset and the match\n *\t\t\t\t   - string with whatever it is we matched\n */\nfunction tln_findnxreg($body, $offset, $reg)\n{\n    $matches = array();\n    $retarr = array();\n    $preg_rule = '%^(.*?)(' . $reg . ')%s';\n    preg_match($preg_rule, substr($body, $offset), $matches);\n    if (!isset($matches[0]) || !$matches[0]) {\n        $retarr = false;\n    } else {\n        $retarr[0] = $offset + strlen($matches[1]);\n        $retarr[1] = $matches[1];\n        $retarr[2] = $matches[2];\n    }\n    return $retarr;\n}\n\n/**\n * This function looks for the next tag.\n *\n * @param string $body   String where to look for the next tag.\n * @param integer $offset Start looking from here.\n * @return array|boolean false if no more tags exist in the body, or\n *\t\t\t\t   an array with the following members:\n *\t\t\t\t   - string with the name of the tag\n *\t\t\t\t   - array with attributes and their values\n *\t\t\t\t   - integer with tag type (1, 2, or 3)\n *\t\t\t\t   - integer where the tag starts (starting \"<\")\n *\t\t\t\t   - integer where the tag ends (ending \">\")\n *\t\t\t\t   first three members will be false, if the tag is invalid.\n */\nfunction tln_getnxtag($body, $offset)\n{\n    if ($offset > strlen($body)) {\n        return false;\n    }\n    $lt = tln_findnxstr($body, $offset, '<');\n    if ($lt == strlen($body)) {\n        return false;\n    }\n    /**\n     * We are here:\n     * blah blah <tag attribute=\"value\">\n     * \\---------^\n     */\n    $pos = tln_skipspace($body, $lt + 1);\n    if ($pos >= strlen($body)) {\n        return array(false, false, false, $lt, strlen($body));\n    }\n    /**\n     * There are 3 kinds of tags:\n     * 1. Opening tag, e.g.:\n     *\t  <a href=\"blah\">\n     * 2. Closing tag, e.g.:\n     *\t  </a>\n     * 3. XHTML-style content-less tag, e.g.:\n     *\t  <img src=\"blah\"/>\n     */\n    switch (substr($body, $pos, 1)) {\n    case '/':\n        $tagtype = 2;\n        $pos++;\n        break;\n    case '!':\n        /**\n         * A comment or an SGML declaration.\n         */\n            if (substr($body, $pos + 1, 2) == '--') {\n            $gt = strpos($body, '-->', $pos);\n            if ($gt === false) {\n                $gt = strlen($body);\n            } else {\n                $gt += 2;\n            }\n            return array(false, false, false, $lt, $gt);\n        } else {\n            $gt = tln_findnxstr($body, $pos, '>');\n            return array(false, false, false, $lt, $gt);\n        }\n        break;\n    default:\n        /**\n         * Assume tagtype 1 for now. If it's type 3, we'll switch values\n         * later.\n         */\n        $tagtype = 1;\n        break;\n    }\n\n    /**\n     * Look for next [\\W-_], which will indicate the end of the tag name.\n     */\n    $regary = tln_findnxreg($body, $pos, '[^\\w\\-_]');\n    if ($regary == false) {\n        return array(false, false, false, $lt, strlen($body));\n    }\n    list($pos, $tagname, $match) = $regary;\n    $tagname = strtolower($tagname);\n\n    /**\n     * $match can be either of these:\n     * '>'\tindicating the end of the tag entirely.\n     * '\\s' indicating the end of the tag name.\n     * '/'\tindicating that this is type-3 xhtml tag.\n     *\n     * Whatever else we find there indicates an invalid tag.\n     */\n    switch ($match) {\n    case '/':\n        /**\n         * This is an xhtml-style tag with a closing / at the\n         * end, like so: <img src=\"blah\"/>. Check if it's followed\n         * by the closing bracket. If not, then this tag is invalid\n         */\n        if (substr($body, $pos, 2) == '/>') {\n            $pos++;\n            $tagtype = 3;\n        } else {\n            $gt = tln_findnxstr($body, $pos, '>');\n            $retary = array(false, false, false, $lt, $gt);\n            return $retary;\n        }\n            //intentional fall-through\n    case '>':\n        return array($tagname, false, $tagtype, $lt, $pos);\n        break;\n    default:\n        /**\n         * Check if it's whitespace\n         */\n        if (!preg_match('/\\s/', $match)) {\n            /**\n             * This is an invalid tag! Look for the next closing \">\".\n             */\n            $gt = tln_findnxstr($body, $lt, '>');\n            return array(false, false, false, $lt, $gt);\n        }\n        break;\n    }\n\n    /**\n     * At this point we're here:\n     * <tagname\t attribute='blah'>\n     * \\-------^\n     *\n     * At this point we loop in order to find all attributes.\n     */\n    $attary = array();\n\n    while ($pos <= strlen($body)) {\n        $pos = tln_skipspace($body, $pos);\n        if ($pos == strlen($body)) {\n            /**\n             * Non-closed tag.\n             */\n            return array(false, false, false, $lt, $pos);\n        }\n        /**\n         * See if we arrived at a \">\" or \"/>\", which means that we reached\n         * the end of the tag.\n         */\n        $matches = array();\n        if (preg_match('%^(\\s*)(>|/>)%s', substr($body, $pos), $matches)) {\n            /**\n             * Yep. So we did.\n             */\n            $pos += strlen($matches[1]);\n            if ($matches[2] == '/>') {\n                $tagtype = 3;\n                $pos++;\n            }\n            return array($tagname, $attary, $tagtype, $lt, $pos);\n        }\n\n        /**\n         * There are several types of attributes, with optional\n         * [:space:] between members.\n         * Type 1:\n         *\t attrname[:space:]=[:space:]'CDATA'\n         * Type 2:\n         *\t attrname[:space:]=[:space:]\"CDATA\"\n         * Type 3:\n         *\t attr[:space:]=[:space:]CDATA\n         * Type 4:\n         *\t attrname\n         *\n         * We leave types 1 and 2 the same, type 3 we check for\n         * '\"' and convert to \"&quot\" if needed, then wrap in\n         * double quotes. Type 4 we convert into:\n         * attrname=\"yes\".\n         */\n        $regary = tln_findnxreg($body, $pos, '[^\\w\\-_]');\n        if ($regary == false) {\n            /**\n             * Looks like body ended before the end of tag.\n             */\n            return array(false, false, false, $lt, strlen($body));\n        }\n        list($pos, $attname, $match) = $regary;\n        $attname = strtolower($attname);\n        /**\n         * We arrived at the end of attribute name. Several things possible\n         * here:\n         * '>'\tmeans the end of the tag and this is attribute type 4\n         * '/'\tif followed by '>' means the same thing as above\n         * '\\s' means a lot of things -- look what it's followed by.\n         *\t\tanything else means the attribute is invalid.\n         */\n        switch ($match) {\n        case '/':\n            /**\n             * This is an xhtml-style tag with a closing / at the\n             * end, like so: <img src=\"blah\"/>. Check if it's followed\n             * by the closing bracket. If not, then this tag is invalid\n             */\n            if (substr($body, $pos, 2) == '/>') {\n                $pos++;\n                $tagtype = 3;\n            } else {\n                $gt = tln_findnxstr($body, $pos, '>');\n                $retary = array(false, false, false, $lt, $gt);\n                return $retary;\n            }\n                //intentional fall-through\n        case '>':\n            $attary{$attname} = '\"yes\"';\n            return array($tagname, $attary, $tagtype, $lt, $pos);\n            break;\n        default:\n            /**\n             * Skip whitespace and see what we arrive at.\n             */\n            $pos = tln_skipspace($body, $pos);\n            $char = substr($body, $pos, 1);\n            /**\n             * Two things are valid here:\n             * '=' means this is attribute type 1 2 or 3.\n             * \\w means this was attribute type 4.\n             * anything else we ignore and re-loop. End of tag and\n             * invalid stuff will be caught by our checks at the beginning\n             * of the loop.\n             */\n            if ($char == '=') {\n                $pos++;\n                $pos = tln_skipspace($body, $pos);\n                /**\n                 * Here are 3 possibilities:\n                 * \"'\"\tattribute type 1\n                 * '\"'\tattribute type 2\n                 * everything else is the content of tag type 3\n                 */\n                $quot = substr($body, $pos, 1);\n                if ($quot == '\\'') {\n                        $regary = tln_findnxreg($body, $pos + 1, '\\'');\n                    if ($regary == false) {\n                        return array(false, false, false, $lt, strlen($body));\n                    }\n                    list($pos, $attval, $match) = $regary;\n                    $pos++;\n                    $attary{$attname} = '\\'' . $attval . '\\'';\n                } elseif ($quot == '\"') {\n                    $regary = tln_findnxreg($body, $pos + 1, '\\\"');\n                    if ($regary == false) {\n                        return array(false, false, false, $lt, strlen($body));\n                    }\n                    list($pos, $attval, $match) = $regary;\n                    $pos++;\n                            $attary{$attname} = '\"' . $attval . '\"';\n                } else {\n                    /**\n                     * These are hateful. Look for \\s, or >.\n                     */\n                    $regary = tln_findnxreg($body, $pos, '[\\s>]');\n                    if ($regary == false) {\n                        return array(false, false, false, $lt, strlen($body));\n                    }\n                    list($pos, $attval, $match) = $regary;\n                    /**\n                     * If it's \">\" it will be caught at the top.\n                     */\n                    $attval = preg_replace('/\\\"/s', '&quot;', $attval);\n                    $attary{$attname} = '\"' . $attval . '\"';\n                }\n            } elseif (preg_match('|[\\w/>]|', $char)) {\n                /**\n                 * That was attribute type 4.\n                 */\n                $attary{$attname} = '\"yes\"';\n            } else {\n                /**\n                 * An illegal character. Find next '>' and return.\n                 */\n                $gt = tln_findnxstr($body, $pos, '>');\n                return array(false, false, false, $lt, $gt);\n            }\n            break;\n        }\n    }\n    /**\n     * The fact that we got here indicates that the tag end was never\n     * found. Return invalid tag indication so it gets stripped.\n     */\n    return array(false, false, false, $lt, strlen($body));\n}\n\n/**\n * Translates entities into literal values so they can be checked.\n *\n * @param string $attvalue the by-ref value to check.\n * @param string $regex    the regular expression to check against.\n * @param boolean $hex        whether the entities are hexadecimal.\n * @return boolean            True or False depending on whether there were matches.\n */\nfunction tln_deent(&$attvalue, $regex, $hex = false)\n{\n    preg_match_all($regex, $attvalue, $matches);\n    if (is_array($matches) && sizeof($matches[0]) > 0) {\n        $repl = array();\n        for ($i = 0; $i < sizeof($matches[0]); $i++) {\n            $numval = $matches[1][$i];\n            if ($hex) {\n                $numval = hexdec($numval);\n            }\n            $repl{$matches[0][$i]} = chr($numval);\n        }\n        $attvalue = strtr($attvalue, $repl);\n        return true;\n    } else {\n        return false;\n    }\n}\n\n/**\n * This function checks attribute values for entity-encoded values\n * and returns them translated into 8-bit strings so we can run\n * checks on them.\n *\n * @param string $attvalue A string to run entity check against.\n */\nfunction tln_defang(&$attvalue)\n{\n    /**\n     * Skip this if there aren't ampersands or backslashes.\n     */\n    if (strpos($attvalue, '&') === false\n        && strpos($attvalue, '\\\\') === false\n    ) {\n        return;\n    }\n    do {\n        $m = false;\n        $m = $m || tln_deent($attvalue, '/\\&#0*(\\d+);*/s');\n        $m = $m || tln_deent($attvalue, '/\\&#x0*((\\d|[a-f])+);*/si', true);\n        $m = $m || tln_deent($attvalue, '/\\\\\\\\(\\d+)/s', true);\n    } while ($m == true);\n    $attvalue = stripslashes($attvalue);\n}\n\n/**\n * Kill any tabs, newlines, or carriage returns. Our friends the\n * makers of the browser with 95% market value decided that it'd\n * be funny to make \"java[tab]script\" be just as good as \"javascript\".\n *\n * @param string $attvalue     The attribute value before extraneous spaces removed.\n */\nfunction tln_unspace(&$attvalue)\n{\n    if (strcspn($attvalue, \"\\t\\r\\n\\0 \") != strlen($attvalue)) {\n        $attvalue = str_replace(\n            array(\"\\t\", \"\\r\", \"\\n\", \"\\0\", \" \"),\n            array('', '', '', '', ''),\n            $attvalue\n        );\n    }\n}\n\n/**\n * This function runs various checks against the attributes.\n *\n * @param string $tagname            String with the name of the tag.\n * @param array $attary            Array with all tag attributes.\n * @param array $rm_attnames        See description for tln_sanitize\n * @param array $bad_attvals        See description for tln_sanitize\n * @param array $add_attr_to_tag See description for tln_sanitize\n * @param string $trans_image_path\n * @param boolean $block_external_images\n * @return array with modified attributes.\n */\nfunction tln_fixatts(\n    $tagname,\n    $attary,\n    $rm_attnames,\n    $bad_attvals,\n    $add_attr_to_tag,\n    $trans_image_path,\n    $block_external_images\n) {\n    foreach($attary as $attname => $attvalue) {\n        /**\n         * See if this attribute should be removed.\n         */\n        foreach ($rm_attnames as $matchtag => $matchattrs) {\n            if (preg_match($matchtag, $tagname)) {\n                foreach ($matchattrs as $matchattr) {\n                    if (preg_match($matchattr, $attname)) {\n                        unset($attary{$attname});\n                        continue;\n                    }\n                }\n            }\n        }\n        /**\n         * Remove any backslashes, entities, or extraneous whitespace.\n         */\n        $oldattvalue = $attvalue;\n        tln_defang($attvalue);\n        if ($attname == 'style' && $attvalue !== $oldattvalue) {\n            $attvalue = \"idiocy\";\n            $attary{$attname} = $attvalue;\n        }\n        tln_unspace($attvalue);\n\n        /**\n         * Now let's run checks on the attvalues.\n         * I don't expect anyone to comprehend this. If you do,\n         * get in touch with me so I can drive to where you live and\n         * shake your hand personally. :)\n         */\n        foreach ($bad_attvals as $matchtag => $matchattrs) {\n            if (preg_match($matchtag, $tagname)) {\n                foreach ($matchattrs as $matchattr => $valary) {\n                    if (preg_match($matchattr, $attname)) {\n                        /**\n                         * There are two arrays in valary.\n                         * First is matches.\n                         * Second one is replacements\n                         */\n                        list($valmatch, $valrepl) = $valary;\n                        $newvalue = preg_replace($valmatch, $valrepl, $attvalue);\n                        if ($newvalue != $attvalue) {\n                            $attary{$attname} = $newvalue;\n                            $attvalue = $newvalue;\n                        }\n                    }\n                }\n            }\n        }\n        if ($attname == 'style') {\n            if (preg_match('/[\\0-\\37\\200-\\377]+/', $attvalue)) {\n                $attary{$attname} = '\"disallowed character\"';\n            }\n            preg_match_all(\"/url\\s*\\((.+)\\)/si\", $attvalue, $aMatch);\n            if (count($aMatch)) {\n                foreach($aMatch[1] as $sMatch) {\n                    $urlvalue = $sMatch;\n                    tln_fixurl($attname, $urlvalue, $trans_image_path, $block_external_images);\n                    $attary{$attname} = str_replace($sMatch, $urlvalue, $attvalue);\n                }\n            }\n        }\n     }\n    /**\n     * See if we need to append any attributes to this tag.\n     */\n    foreach ($add_attr_to_tag as $matchtag => $addattary) {\n        if (preg_match($matchtag, $tagname)) {\n            $attary = array_merge($attary, $addattary);\n        }\n    }\n    return $attary;\n}\n\nfunction tln_fixurl($attname, &$attvalue, $trans_image_path, $block_external_images)\n{\n    $sQuote = '\"';\n    $attvalue = trim($attvalue);\n    if ($attvalue && ($attvalue[0] =='\"'|| $attvalue[0] == \"'\")) {\n        // remove the double quotes\n        $sQuote = $attvalue[0];\n        $attvalue = trim(substr($attvalue,1,-1));\n    }\n\n    /**\n     * Replace empty src tags with the blank image.  src is only used\n     * for frames, images, and image inputs.  Doing a replace should\n     * not affect them working as should be, however it will stop\n     * IE from being kicked off when src for img tags are not set\n     */\n    if ($attvalue == '') {\n        $attvalue = $sQuote . $trans_image_path . $sQuote;\n    } else {\n        // first, disallow 8 bit characters and control characters\n        if (preg_match('/[\\0-\\37\\200-\\377]+/',$attvalue)) {\n            switch ($attname) {\n                case 'href':\n                    $attvalue = $sQuote . 'http://invalid-stuff-detected.example.com' . $sQuote;\n                    break;\n                default:\n                    $attvalue = $sQuote . $trans_image_path . $sQuote;\n                    break;\n            }\n        } else {\n            $aUrl = parse_url($attvalue);\n            if (isset($aUrl['scheme'])) {\n                switch(strtolower($aUrl['scheme'])) {\n                    case 'mailto':\n                    case 'http':\n                    case 'https':\n                    case 'ftp':\n                        if ($attname != 'href') {\n                            if ($block_external_images == true) {\n                                $attvalue = $sQuote . $trans_image_path . $sQuote;\n                            } else {\n                                if (!isset($aUrl['path'])) {\n                                    $attvalue = $sQuote . $trans_image_path . $sQuote;\n                                }\n                            }\n                        } else {\n                            $attvalue = $sQuote . $attvalue . $sQuote;\n                        }\n                        break;\n                    case 'outbind':\n                        $attvalue = $sQuote . $attvalue . $sQuote;\n                        break;\n                    case 'cid':\n                        $attvalue = $sQuote . $attvalue . $sQuote;\n                        break;\n                    default:\n                        $attvalue = $sQuote . $trans_image_path . $sQuote;\n                        break;\n                }\n            } else {\n                if (!isset($aUrl['path']) || $aUrl['path'] != $trans_image_path) {\n                    $$attvalue = $sQuote . $trans_image_path . $sQuote;\n                }\n            }\n        }\n    }\n}\n\nfunction tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)\n{\n    // workaround for </style> in between comments\n    $content = '';\n    $sToken = '';\n    $bSucces = false;\n    $bEndTag = false;\n    for ($i=$pos,$iCount=strlen($body);$i<$iCount;++$i) {\n        $char = $body{$i};\n        switch ($char) {\n            case '<':\n                $sToken = $char;\n                break;\n            case '/':\n                 if ($sToken == '<') {\n                    $sToken .= $char;\n                    $bEndTag = true;\n                 } else {\n                    $content .= $char;\n                 }\n                 break;\n            case '>':\n                 if ($bEndTag) {\n                    $sToken .= $char;\n                    if (preg_match('/\\<\\/\\s*style\\s*\\>/i',$sToken,$aMatch)) {\n                        $newpos = $i + 1;\n                        $bSucces = true;\n                        break 2;\n                    } else {\n                        $content .= $sToken;\n                    }\n                    $bEndTag = false;\n                 } else {\n                    $content .= $char;\n                 }\n                 break;\n            case '!':\n                if ($sToken == '<') {\n                    // possible comment\n                    if (isset($body{$i+2}) && substr($body,$i,3) == '!--') {\n                        $i = strpos($body,'-->',$i+3);\n                        if ($i === false) { // no end comment\n                            $i = strlen($body);\n                        }\n                        $sToken = '';\n                    }\n                } else {\n                    $content .= $char;\n                }\n                break;\n            default:\n                if ($bEndTag) {\n                    $sToken .= $char;\n                } else {\n                    $content .= $char;\n                }\n                break;\n        }\n    }\n    if ($bSucces == FALSE){\n        return array(FALSE, strlen($body));\n    }\n\n\n\n    /**\n     * First look for general BODY style declaration, which would be\n     * like so:\n     * body {background: blah-blah}\n     * and change it to .bodyclass so we can just assign it to a <div>\n     */\n    $content = preg_replace(\"|body(\\s*\\{.*?\\})|si\", \".bodyclass\\\\1\", $content);\n\n    /**\n    * Fix url('blah') declarations.\n    */\n    //   $content = preg_replace(\"|url\\s*\\(\\s*([\\'\\\"])\\s*\\S+script\\s*:.*?([\\'\\\"])\\s*\\)|si\",\n    //                           \"url(\\\\1$trans_image_path\\\\2)\", $content);\n\n    // first check for 8bit sequences and disallowed control characters\n    if (preg_match('/[\\16-\\37\\200-\\377]+/',$content)) {\n        $content = '<!-- style block removed by html filter due to presence of 8bit characters -->';\n        return array($content, $newpos);\n    }\n\n    // remove @import line\n    $content = preg_replace(\"/^\\s*(@import.*)$/mi\",\"\\n<!-- @import rules forbidden -->\\n\",$content);\n\n    $content = preg_replace(\"/(\\\\\\\\)?u(\\\\\\\\)?r(\\\\\\\\)?l(\\\\\\\\)?/i\", 'url', $content);\n    preg_match_all(\"/url\\s*\\((.+)\\)/si\",$content,$aMatch);\n    if (count($aMatch)) {\n        $aValue = $aReplace = array();\n        foreach($aMatch[1] as $sMatch) {\n            // url value\n            $urlvalue = $sMatch;\n            tln_fixurl('style',$urlvalue, $trans_image_path, $block_external_images);\n            $aValue[] = $sMatch;\n            $aReplace[] = $urlvalue;\n        }\n        $content = str_replace($aValue,$aReplace,$content);\n    }\n\n    /**\n     * Remove any backslashes, entities, and extraneous whitespace.\n     */\n    $contentTemp = $content;\n    tln_defang($contentTemp);\n    tln_unspace($contentTemp);\n\n    $match   = array('/\\/\\*.*\\*\\//',\n                    '/expression/i',\n                    '/behaviou*r/i',\n                    '/binding/i',\n                    '/include-source/i',\n                    '/javascript/i',\n                    '/script/i',\n                    '/position/i');\n    $replace = array('','idiocy', 'idiocy', 'idiocy', 'idiocy', 'idiocy', 'idiocy', '');\n    $contentNew = preg_replace($match, $replace, $contentTemp);\n    if ($contentNew !== $contentTemp) {\n        $content = $contentNew;\n    }\n    return array($content, $newpos);\n}\n\nfunction tln_body2div($attary, $trans_image_path)\n{\n    $divattary = array('class' => \"'bodyclass'\");\n    $text = '#000000';\n    $has_bgc_stl = $has_txt_stl = false;\n    $styledef = '';\n    if (is_array($attary) && sizeof($attary) > 0){\n        foreach ($attary as $attname=>$attvalue){\n            $quotchar = substr($attvalue, 0, 1);\n            $attvalue = str_replace($quotchar, \"\", $attvalue);\n            switch ($attname){\n                case 'background':\n                    $styledef .= \"background-image: url('$trans_image_path'); \";\n                    break;\n                case 'bgcolor':\n                    $has_bgc_stl = true;\n                    $styledef .= \"background-color: $attvalue; \";\n                    break;\n                case 'text':\n                    $has_txt_stl = true;\n                    $styledef .= \"color: $attvalue; \";\n                    break;\n            }\n        }\n        // Outlook defines a white bgcolor and no text color. This can lead to\n        // white text on a white bg with certain themes.\n        if ($has_bgc_stl && !$has_txt_stl) {\n            $styledef .= \"color: $text; \";\n        }\n        if (strlen($styledef) > 0){\n            $divattary{\"style\"} = \"\\\"$styledef\\\"\";\n        }\n    }\n    return $divattary;\n}\n\n/**\n *\n * @param string $body                    The HTML you wish to filter\n * @param array $tag_list                see description above\n * @param array $rm_tags_with_content see description above\n * @param array $self_closing_tags    see description above\n * @param boolean $force_tag_closing    see description above\n * @param array $rm_attnames            see description above\n * @param array $bad_attvals            see description above\n * @param array $add_attr_to_tag        see description above\n * @param string $trans_image_path\n * @param boolean $block_external_images\n\n * @return string                       Sanitized html safe to show on your pages.\n */\nfunction tln_sanitize(\n    $body,\n    $tag_list,\n    $rm_tags_with_content,\n    $self_closing_tags,\n    $force_tag_closing,\n    $rm_attnames,\n    $bad_attvals,\n    $add_attr_to_tag,\n    $trans_image_path,\n    $block_external_images\n) {\n    /**\n     * Normalize rm_tags and rm_tags_with_content.\n     */\n    $rm_tags = array_shift($tag_list);\n    @array_walk($tag_list, 'tln_casenormalize');\n    @array_walk($rm_tags_with_content, 'tln_casenormalize');\n    @array_walk($self_closing_tags, 'tln_casenormalize');\n    /**\n     * See if tag_list is of tags to remove or tags to allow.\n     * false  means remove these tags\n     * true\t  means allow these tags\n     */\n    $curpos = 0;\n    $open_tags = array();\n    $trusted = \"<!-- begin tln_sanitized html -->\\n\";\n    $skip_content = false;\n    /**\n     * Take care of netscape's stupid javascript entities like\n     * &{alert('boo')};\n     */\n    $body = preg_replace('/&(\\{.*?\\};)/si', '&amp;\\\\1', $body);\n    while (($curtag = tln_getnxtag($body, $curpos)) != false) {\n        list($tagname, $attary, $tagtype, $lt, $gt) = $curtag;\n        $free_content = substr($body, $curpos, $lt-$curpos);\n        /**\n         * Take care of <style>\n         */\n        if ($tagname == \"style\" && $tagtype == 1){\n            list($free_content, $curpos) =\n                tln_fixstyle($body, $gt+1, $trans_image_path, $block_external_images);\n            if ($free_content != FALSE){\n                if ( !empty($attary) ) {\n                    $attary = tln_fixatts($tagname,\n                                         $attary,\n                                         $rm_attnames,\n                                         $bad_attvals,\n                                         $add_attr_to_tag,\n                                         $trans_image_path,\n                                         $block_external_images\n                                         );\n                }\n                $trusted .= tln_tagprint($tagname, $attary, $tagtype);\n                $trusted .= $free_content;\n                $trusted .= tln_tagprint($tagname, null, 2);\n            }\n            continue;\n        }\n        if ($skip_content == false){\n            $trusted .= $free_content;\n        }\n        if ($tagname != false) {\n            if ($tagtype == 2) {\n                if ($skip_content == $tagname) {\n                    /**\n                     * Got to the end of tag we needed to remove.\n                     */\n                    $tagname = false;\n                    $skip_content = false;\n                } else {\n                    if ($skip_content == false) {\n                        if ($tagname == \"body\") {\n                            $tagname = \"div\";\n                        }\n                        if (isset($open_tags{$tagname}) &&\n                            $open_tags{$tagname} > 0\n                        ) {\n                            $open_tags{$tagname}--;\n                        } else {\n                            $tagname = false;\n                        }\n                    }\n                }\n            } else {\n                /**\n                 * $rm_tags_with_content\n                 */\n                if ($skip_content == false) {\n                    /**\n                     * See if this is a self-closing type and change\n                     * tagtype appropriately.\n                     */\n                    if ($tagtype == 1\n                        && in_array($tagname, $self_closing_tags)\n                    ) {\n                        $tagtype = 3;\n                    }\n                    /**\n                     * See if we should skip this tag and any content\n                     * inside it.\n                     */\n                    if ($tagtype == 1\n                        && in_array($tagname, $rm_tags_with_content)\n                    ) {\n                        $skip_content = $tagname;\n                    } else {\n                        if (($rm_tags == false\n                             && in_array($tagname, $tag_list)) ||\n                            ($rm_tags == true\n                                && !in_array($tagname, $tag_list))\n                        ) {\n                            $tagname = false;\n                        } else {\n                            /**\n                             * Convert body into div.\n                             */\n                            if ($tagname == \"body\"){\n                                $tagname = \"div\";\n                                $attary = tln_body2div($attary, $trans_image_path);\n                            }\n                            if ($tagtype == 1) {\n                                if (isset($open_tags{$tagname})) {\n                                    $open_tags{$tagname}++;\n                                } else {\n                                    $open_tags{$tagname} = 1;\n                                }\n                            }\n                            /**\n                             * This is where we run other checks.\n                             */\n                            if (is_array($attary) && sizeof($attary) > 0) {\n                                $attary = tln_fixatts(\n                                    $tagname,\n                                    $attary,\n                                    $rm_attnames,\n                                    $bad_attvals,\n                                    $add_attr_to_tag,\n                                    $trans_image_path,\n                                    $block_external_images\n                                );\n                            }\n                        }\n                    }\n                }\n            }\n            if ($tagname != false && $skip_content == false) {\n                $trusted .= tln_tagprint($tagname, $attary, $tagtype);\n            }\n        }\n        $curpos = $gt + 1;\n    }\n    $trusted .= substr($body, $curpos, strlen($body) - $curpos);\n    if ($force_tag_closing == true) {\n        foreach ($open_tags as $tagname => $opentimes) {\n            while ($opentimes > 0) {\n                $trusted .= '</' . $tagname . '>';\n                $opentimes--;\n            }\n        }\n        $trusted .= \"\\n\";\n    }\n    $trusted .= \"<!-- end tln_sanitized html -->\\n\";\n    return $trusted;\n}\n\n//\n// Use the nifty htmlfilter library\n//\n\n\nfunction HTMLFilter($body, $trans_image_path, $block_external_images = false)\n{\n\n    $tag_list = array(\n        false,\n        \"object\",\n        \"meta\",\n        \"html\",\n        \"head\",\n        \"base\",\n        \"link\",\n        \"frame\",\n        \"iframe\",\n        \"plaintext\",\n        \"marquee\"\n    );\n\n    $rm_tags_with_content = array(\n        \"script\",\n        \"applet\",\n        \"embed\",\n        \"title\",\n        \"frameset\",\n        \"xmp\",\n        \"xml\"\n    );\n\n    $self_closing_tags =  array(\n        \"img\",\n        \"br\",\n        \"hr\",\n        \"input\",\n        \"outbind\"\n    );\n\n    $force_tag_closing = true;\n\n    $rm_attnames = array(\n        \"/.*/\" =>\n            array(\n                // \"/target/i\",\n                \"/^on.*/i\",\n                \"/^dynsrc/i\",\n                \"/^data.*/i\",\n                \"/^lowsrc.*/i\"\n            )\n    );\n\n    $bad_attvals = array(\n        \"/.*/\" =>\n        array(\n            \"/^src|background/i\" =>\n            array(\n                array(\n                    '/^([\\'\"])\\s*\\S+script\\s*:.*([\\'\"])/si',\n                    '/^([\\'\"])\\s*mocha\\s*:*.*([\\'\"])/si',\n                    '/^([\\'\"])\\s*about\\s*:.*([\\'\"])/si'\n                ),\n                array(\n                    \"\\\\1$trans_image_path\\\\2\",\n                    \"\\\\1$trans_image_path\\\\2\",\n                    \"\\\\1$trans_image_path\\\\2\"\n                )\n            ),\n            \"/^href|action/i\" =>\n            array(\n                array(\n                    '/^([\\'\"])\\s*\\S+script\\s*:.*([\\'\"])/si',\n                    '/^([\\'\"])\\s*mocha\\s*:*.*([\\'\"])/si',\n                    '/^([\\'\"])\\s*about\\s*:.*([\\'\"])/si'\n                ),\n                array(\n                    \"\\\\1#\\\\1\",\n                    \"\\\\1#\\\\1\",\n                    \"\\\\1#\\\\1\"\n                )\n            ),\n            \"/^style/i\" =>\n            array(\n                array(\n                    \"/\\/\\*.*\\*\\//\",\n                    \"/expression/i\",\n                    \"/binding/i\",\n                    \"/behaviou*r/i\",\n                    \"/include-source/i\",\n                    '/position\\s*:/i',\n                    '/(\\\\\\\\)?u(\\\\\\\\)?r(\\\\\\\\)?l(\\\\\\\\)?/i',\n                    '/url\\s*\\(\\s*([\\'\"])\\s*\\S+script\\s*:.*([\\'\"])\\s*\\)/si',\n                    '/url\\s*\\(\\s*([\\'\"])\\s*mocha\\s*:.*([\\'\"])\\s*\\)/si',\n                    '/url\\s*\\(\\s*([\\'\"])\\s*about\\s*:.*([\\'\"])\\s*\\)/si',\n                    '/(.*)\\s*:\\s*url\\s*\\(\\s*([\\'\"]*)\\s*\\S+script\\s*:.*([\\'\"]*)\\s*\\)/si'\n                ),\n                array(\n                    \"\",\n                    \"idiocy\",\n                    \"idiocy\",\n                    \"idiocy\",\n                    \"idiocy\",\n                    \"idiocy\",\n                    \"url\",\n                    \"url(\\\\1#\\\\1)\",\n                    \"url(\\\\1#\\\\1)\",\n                    \"url(\\\\1#\\\\1)\",\n                    \"\\\\1:url(\\\\2#\\\\3)\"\n                )\n            )\n        )\n    );\n\n    if ($block_external_images) {\n        array_push(\n            $bad_attvals{'/.*/'}{'/^src|background/i'}[0],\n            '/^([\\'\\\"])\\s*https*:.*([\\'\\\"])/si'\n        );\n        array_push(\n            $bad_attvals{'/.*/'}{'/^src|background/i'}[1],\n            \"\\\\1$trans_image_path\\\\1\"\n        );\n        array_push(\n            $bad_attvals{'/.*/'}{'/^style/i'}[0],\n            '/url\\(([\\'\\\"])\\s*https*:.*([\\'\\\"])\\)/si'\n        );\n        array_push(\n            $bad_attvals{'/.*/'}{'/^style/i'}[1],\n            \"url(\\\\1$trans_image_path\\\\1)\"\n        );\n    }\n\n    $add_attr_to_tag = array(\n        \"/^a$/i\" =>\n            array('target' => '\"_blank\"')\n    );\n\n    $trusted = tln_sanitize(\n        $body,\n        $tag_list,\n        $rm_tags_with_content,\n        $self_closing_tags,\n        $force_tag_closing,\n        $rm_attnames,\n        $bad_attvals,\n        $add_attr_to_tag,\n        $trans_image_path,\n        $block_external_images\n    );\n    return $trusted;\n}\n"
  },
  {
    "path": "lib/phpmailer/extras/ntlm_sasl_client.php",
    "content": "<?php\n/*\n * ntlm_sasl_client.php\n *\n * @(#) $Id: ntlm_sasl_client.php,v 1.3 2004/11/17 08:00:37 mlemos Exp $\n *\n */\n\ndefine(\"SASL_NTLM_STATE_START\", 0);\ndefine(\"SASL_NTLM_STATE_IDENTIFY_DOMAIN\", 1);\ndefine(\"SASL_NTLM_STATE_RESPOND_CHALLENGE\", 2);\ndefine(\"SASL_NTLM_STATE_DONE\", 3);\ndefine(\"SASL_FAIL\", -1);\ndefine(\"SASL_CONTINUE\", 1);\n\nclass ntlm_sasl_client_class\n{\n    public $credentials = array();\n    public $state = SASL_NTLM_STATE_START;\n\n    public function initialize(&$client)\n    {\n        if (!function_exists($function = \"mcrypt_encrypt\")\n            || !function_exists($function = \"mhash\")\n        ) {\n            $extensions = array(\n                \"mcrypt_encrypt\" => \"mcrypt\",\n                \"mhash\" => \"mhash\"\n            );\n            $client->error = \"the extension \" . $extensions[$function] .\n                \" required by the NTLM SASL client class is not available in this PHP configuration\";\n            return (0);\n        }\n        return (1);\n    }\n\n    public function ASCIIToUnicode($ascii)\n    {\n        for ($unicode = \"\", $a = 0; $a < strlen($ascii); $a++) {\n            $unicode .= substr($ascii, $a, 1) . chr(0);\n        }\n        return ($unicode);\n    }\n\n    public function typeMsg1($domain, $workstation)\n    {\n        $domain_length = strlen($domain);\n        $workstation_length = strlen($workstation);\n        $workstation_offset = 32;\n        $domain_offset = $workstation_offset + $workstation_length;\n        return (\n            \"NTLMSSP\\0\" .\n            \"\\x01\\x00\\x00\\x00\" .\n            \"\\x07\\x32\\x00\\x00\" .\n            pack(\"v\", $domain_length) .\n            pack(\"v\", $domain_length) .\n            pack(\"V\", $domain_offset) .\n            pack(\"v\", $workstation_length) .\n            pack(\"v\", $workstation_length) .\n            pack(\"V\", $workstation_offset) .\n            $workstation .\n            $domain\n        );\n    }\n\n    public function NTLMResponse($challenge, $password)\n    {\n        $unicode = $this->ASCIIToUnicode($password);\n        $md4 = mhash(MHASH_MD4, $unicode);\n        $padded = $md4 . str_repeat(chr(0), 21 - strlen($md4));\n        $iv_size = mcrypt_get_iv_size(MCRYPT_DES, MCRYPT_MODE_ECB);\n        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n        for ($response = \"\", $third = 0; $third < 21; $third += 7) {\n            for ($packed = \"\", $p = $third; $p < $third + 7; $p++) {\n                $packed .= str_pad(decbin(ord(substr($padded, $p, 1))), 8, \"0\", STR_PAD_LEFT);\n            }\n            for ($key = \"\", $p = 0; $p < strlen($packed); $p += 7) {\n                $s = substr($packed, $p, 7);\n                $b = $s . ((substr_count($s, \"1\") % 2) ? \"0\" : \"1\");\n                $key .= chr(bindec($b));\n            }\n            $ciphertext = mcrypt_encrypt(MCRYPT_DES, $key, $challenge, MCRYPT_MODE_ECB, $iv);\n            $response .= $ciphertext;\n        }\n        return $response;\n    }\n\n    public function typeMsg3($ntlm_response, $user, $domain, $workstation)\n    {\n        $domain_unicode = $this->ASCIIToUnicode($domain);\n        $domain_length = strlen($domain_unicode);\n        $domain_offset = 64;\n        $user_unicode = $this->ASCIIToUnicode($user);\n        $user_length = strlen($user_unicode);\n        $user_offset = $domain_offset + $domain_length;\n        $workstation_unicode = $this->ASCIIToUnicode($workstation);\n        $workstation_length = strlen($workstation_unicode);\n        $workstation_offset = $user_offset + $user_length;\n        $lm = \"\";\n        $lm_length = strlen($lm);\n        $lm_offset = $workstation_offset + $workstation_length;\n        $ntlm = $ntlm_response;\n        $ntlm_length = strlen($ntlm);\n        $ntlm_offset = $lm_offset + $lm_length;\n        $session = \"\";\n        $session_length = strlen($session);\n        $session_offset = $ntlm_offset + $ntlm_length;\n        return (\n            \"NTLMSSP\\0\" .\n            \"\\x03\\x00\\x00\\x00\" .\n            pack(\"v\", $lm_length) .\n            pack(\"v\", $lm_length) .\n            pack(\"V\", $lm_offset) .\n            pack(\"v\", $ntlm_length) .\n            pack(\"v\", $ntlm_length) .\n            pack(\"V\", $ntlm_offset) .\n            pack(\"v\", $domain_length) .\n            pack(\"v\", $domain_length) .\n            pack(\"V\", $domain_offset) .\n            pack(\"v\", $user_length) .\n            pack(\"v\", $user_length) .\n            pack(\"V\", $user_offset) .\n            pack(\"v\", $workstation_length) .\n            pack(\"v\", $workstation_length) .\n            pack(\"V\", $workstation_offset) .\n            pack(\"v\", $session_length) .\n            pack(\"v\", $session_length) .\n            pack(\"V\", $session_offset) .\n            \"\\x01\\x02\\x00\\x00\" .\n            $domain_unicode .\n            $user_unicode .\n            $workstation_unicode .\n            $lm .\n            $ntlm\n        );\n    }\n\n    public function start(&$client, &$message, &$interactions)\n    {\n        if ($this->state != SASL_NTLM_STATE_START) {\n            $client->error = \"NTLM authentication state is not at the start\";\n            return (SASL_FAIL);\n        }\n        $this->credentials = array(\n            \"user\" => \"\",\n            \"password\" => \"\",\n            \"realm\" => \"\",\n            \"workstation\" => \"\"\n        );\n        $defaults = array();\n        $status = $client->GetCredentials($this->credentials, $defaults, $interactions);\n        if ($status == SASL_CONTINUE) {\n            $this->state = SASL_NTLM_STATE_IDENTIFY_DOMAIN;\n        }\n        unset($message);\n        return ($status);\n    }\n\n    public function step(&$client, $response, &$message, &$interactions)\n    {\n        switch ($this->state) {\n            case SASL_NTLM_STATE_IDENTIFY_DOMAIN:\n                $message = $this->typeMsg1($this->credentials[\"realm\"], $this->credentials[\"workstation\"]);\n                $this->state = SASL_NTLM_STATE_RESPOND_CHALLENGE;\n                break;\n            case SASL_NTLM_STATE_RESPOND_CHALLENGE:\n                $ntlm_response = $this->NTLMResponse(substr($response, 24, 8), $this->credentials[\"password\"]);\n                $message = $this->typeMsg3(\n                    $ntlm_response,\n                    $this->credentials[\"user\"],\n                    $this->credentials[\"realm\"],\n                    $this->credentials[\"workstation\"]\n                );\n                $this->state = SASL_NTLM_STATE_DONE;\n                break;\n            case SASL_NTLM_STATE_DONE:\n                $client->error = \"NTLM authentication was finished without success\";\n                return (SASL_FAIL);\n            default:\n                $client->error = \"invalid NTLM authentication step state\";\n                return (SASL_FAIL);\n        }\n        return (SASL_CONTINUE);\n    }\n}\n"
  },
  {
    "path": "lib/phpmailer/index.html",
    "content": ""
  },
  {
    "path": "lib/phpmailer/language/index.html",
    "content": ""
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-am.php",
    "content": "<?php\n/**\n * Armenian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Hrayr Grigoryan <hrayr@bits.am>\n */\n \n$PHPMAILER_LANG['authenticate']         = 'SMTP -ի սխալ: չհաջողվեց ստուգել իսկությունը.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP -ի սխալ: չհաջողվեց կապ հաստատել SMTP սերվերի հետ.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP -ի սխալ: տվյալները ընդունված չեն.';\n$PHPMAILER_LANG['empty_message']        = 'Հաղորդագրությունը դատարկ է';\n$PHPMAILER_LANG['encoding']             = 'Կոդավորման անհայտ տեսակ: ';\n$PHPMAILER_LANG['execute']              = 'Չհաջողվեց իրականացնել հրամանը: ';\n$PHPMAILER_LANG['file_access']          = 'Ֆայլը հասանելի չէ: ';\n$PHPMAILER_LANG['file_open']            = 'Ֆայլի սխալ: ֆայլը չհաջողվեց բացել: ';\n$PHPMAILER_LANG['from_failed']          = 'Ուղարկողի հետևյալ հասցեն սխալ է: ';\n$PHPMAILER_LANG['instantiate']          = 'Հնարավոր չէ կանչել mail ֆունկցիան.';\n$PHPMAILER_LANG['invalid_address']      = 'Հասցեն սխալ է: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' փոստային սերվերի հետ չի աշխատում.';\n$PHPMAILER_LANG['provide_address']      = 'Անհրաժեշտ է տրամադրել գոնե մեկ ստացողի e-mail հասցե.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP -ի սխալ: չի հաջողվել ուղարկել հետևյալ ստացողների հասցեներին: ';\n$PHPMAILER_LANG['signing']              = 'Ստորագրման սխալ: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP -ի connect() ֆունկցիան չի հաջողվել';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP սերվերի սխալ: ';\n$PHPMAILER_LANG['variable_set']         = 'Չի հաջողվում ստեղծել կամ վերափոխել փոփոխականը: ';\n$PHPMAILER_LANG['extension_missing']    = 'Հավելվածը բացակայում է: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-ar.php",
    "content": "<?php\n/**\n * Arabic PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author bahjat al mostafa <bahjat983@hotmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'خطأ SMTP : لا يمكن تأكيد الهوية.';\n$PHPMAILER_LANG['connect_host']         = 'خطأ SMTP: لا يمكن الاتصال بالخادم SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'خطأ SMTP: لم يتم قبول المعلومات .';\n$PHPMAILER_LANG['empty_message']        = 'نص الرسالة فارغ';\n$PHPMAILER_LANG['encoding']             = 'ترميز غير معروف: ';\n$PHPMAILER_LANG['execute']              = 'لا يمكن تنفيذ : ';\n$PHPMAILER_LANG['file_access']          = 'لا يمكن الوصول للملف: ';\n$PHPMAILER_LANG['file_open']            = 'خطأ في الملف: لا يمكن فتحه: ';\n$PHPMAILER_LANG['from_failed']          = 'خطأ على مستوى عنوان المرسل : ';\n$PHPMAILER_LANG['instantiate']          = 'لا يمكن توفير خدمة البريد.';\n$PHPMAILER_LANG['invalid_address']      = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';\n$PHPMAILER_LANG['provide_address']      = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';\n$PHPMAILER_LANG['recipients_failed']    = 'خطأ SMTP: الأخطاء التالية ' .\n                                          'فشل في الارسال لكل من : ';\n$PHPMAILER_LANG['signing']              = 'خطأ في التوقيع: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() غير ممكن.';\n$PHPMAILER_LANG['smtp_error']           = 'خطأ على مستوى الخادم SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'لا يمكن تعيين أو إعادة تعيين متغير: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-az.php",
    "content": "<?php\n/**\n * Azerbaijani PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author @mirjalal\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP xətası: Giriş uğursuz oldu.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP xətası: SMTP serverinə qoşulma uğursuz oldu.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP xətası: Verilənlər qəbul edilməyib.';\n$PHPMAILER_LANG['empty_message']        = 'Boş mesaj göndərilə bilməz.';\n$PHPMAILER_LANG['encoding']             = 'Qeyri-müəyyən kodlaşdırma: ';\n$PHPMAILER_LANG['execute']              = 'Əmr yerinə yetirilmədi: ';\n$PHPMAILER_LANG['file_access']          = 'Fayla giriş yoxdur: ';\n$PHPMAILER_LANG['file_open']            = 'Fayl xətası: Fayl açıla bilmədi: ';\n$PHPMAILER_LANG['from_failed']          = 'Göstərilən poçtlara göndərmə uğursuz oldu: ';\n$PHPMAILER_LANG['instantiate']          = 'Mail funksiyası işə salına bilmədi.';\n$PHPMAILER_LANG['invalid_address']      = 'Düzgün olmayan e-mail adresi: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' - e-mail kitabxanası dəstəklənmir.';\n$PHPMAILER_LANG['provide_address']      = 'Ən azı bir e-mail adresi daxil edilməlidir.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP xətası: Aşağıdakı ünvanlar üzrə alıcılara göndərmə uğursuzdur: ';\n$PHPMAILER_LANG['signing']              = 'İmzalama xətası: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP serverinə qoşulma uğursuz oldu.';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP serveri xətası: ';\n$PHPMAILER_LANG['variable_set']         = 'Dəyişənin quraşdırılması uğursuz oldu: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-be.php",
    "content": "<?php\n/**\n * Belarusian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Aleksander Maksymiuk <info@setpro.pl>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Памылка SMTP: памылка ідэнтыфікацыі.';\n$PHPMAILER_LANG['connect_host']         = 'Памылка SMTP: нельга ўстанавіць сувязь з SMTP-серверам.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Памылка SMTP: звесткі непрынятыя.';\n$PHPMAILER_LANG['empty_message']        = 'Пустое паведамленне.';\n$PHPMAILER_LANG['encoding']             = 'Невядомая кадыроўка тэксту: ';\n$PHPMAILER_LANG['execute']              = 'Нельга выканаць каманду: ';\n$PHPMAILER_LANG['file_access']          = 'Няма доступу да файла: ';\n$PHPMAILER_LANG['file_open']            = 'Нельга адкрыць файл: ';\n$PHPMAILER_LANG['from_failed']          = 'Няправільны адрас адпраўніка: ';\n$PHPMAILER_LANG['instantiate']          = 'Нельга прымяніць функцыю mail().';\n$PHPMAILER_LANG['invalid_address']      = 'Нельга даслаць паведамленне, няправільны email атрымальніка: ';\n$PHPMAILER_LANG['provide_address']      = 'Запоўніце, калі ласка, правільны email атрымальніка.';\n$PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.';\n$PHPMAILER_LANG['recipients_failed']    = 'Памылка SMTP: няправільныя атрымальнікі: ';\n$PHPMAILER_LANG['signing']              = 'Памылка подпісу паведамлення: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Памылка сувязі з SMTP-серверам.';\n$PHPMAILER_LANG['smtp_error']           = 'Памылка SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-bg.php",
    "content": "<?php\n/**\n * Bulgarian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Mikhail Kyosev <mialygk@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP грешка: Не може да се удостовери пред сървъра.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP грешка: Не може да се свърже с SMTP хоста.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP грешка: данните не са приети.';\n$PHPMAILER_LANG['empty_message']        = 'Съдържанието на съобщението е празно';\n$PHPMAILER_LANG['encoding']             = 'Неизвестно кодиране: ';\n$PHPMAILER_LANG['execute']              = 'Не може да се изпълни: ';\n$PHPMAILER_LANG['file_access']          = 'Няма достъп до файл: ';\n$PHPMAILER_LANG['file_open']            = 'Файлова грешка: Не може да се отвори файл: ';\n$PHPMAILER_LANG['from_failed']          = 'Следните адреси за подател са невалидни: ';\n$PHPMAILER_LANG['instantiate']          = 'Не може да се инстанцира функцията mail.';\n$PHPMAILER_LANG['invalid_address']      = 'Невалиден адрес: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.';\n$PHPMAILER_LANG['provide_address']      = 'Трябва да предоставите поне един email адрес за получател.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP грешка: Следните адреси за Получател са невалидни: ';\n$PHPMAILER_LANG['signing']              = 'Грешка при подписване: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP провален connect().';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP сървърна грешка: ';\n$PHPMAILER_LANG['variable_set']         = 'Не може да се установи или възстанови променлива: ';\n$PHPMAILER_LANG['extension_missing']    = 'Липсва разширение: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-br.php",
    "content": "<?php\n/**\n* PHPMailer language file: refer to English translation for definitive list\n* Portuguese Version\n* By Paulo Henrique Garcia - paulo@controllerweb.com.br\n*/\n\n$PHPMAILER_LANG['authenticate']         = 'Erro de SMTP: Não foi possível autenticar.';\n$PHPMAILER_LANG['connect_host']         = 'Erro de SMTP: Não foi possível conectar com o servidor SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Erro de SMTP: Dados não aceitos.';\n//$PHPMAILER_LANG['empty_message']        = 'Message body empty';\n$PHPMAILER_LANG['encoding']             = 'Codificação desconhecida: ';\n$PHPMAILER_LANG['execute']              = 'Não foi possível executar: ';\n$PHPMAILER_LANG['file_access']          = 'Não foi possível acessar o arquivo: ';\n$PHPMAILER_LANG['file_open']            = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';\n$PHPMAILER_LANG['from_failed']          = 'Os endereços de rementente a seguir falharam: ';\n$PHPMAILER_LANG['instantiate']          = 'Não foi possível instanciar a função mail.';\n//$PHPMAILER_LANG['invalid_email']        = 'Not sending, email address is invalid: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não suportado.';\n$PHPMAILER_LANG['provide_address']      = 'Você deve fornecer pelo menos um endereço de destinatário de email.';\n$PHPMAILER_LANG['recipients_failed']    = 'Erro de SMTP: Os endereços de destinatário a seguir falharam: ';\n//$PHPMAILER_LANG['signing']              = 'Signing Error: ';\n//$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';\n//$PHPMAILER_LANG['smtp_error']           = 'SMTP server error: ';\n//$PHPMAILER_LANG['variable_set']         = 'Cannot set or reset variable: ';\n?>"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-ca.php",
    "content": "<?php\n/**\n * Catalan PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Ivan <web AT microstudi DOT com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Error SMTP: No s’ha pogut autenticar.';\n$PHPMAILER_LANG['connect_host']         = 'Error SMTP: No es pot connectar al servidor SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Error SMTP: Dades no acceptades.';\n$PHPMAILER_LANG['empty_message']        = 'El cos del missatge està buit.';\n$PHPMAILER_LANG['encoding']             = 'Codificació desconeguda: ';\n$PHPMAILER_LANG['execute']              = 'No es pot executar: ';\n$PHPMAILER_LANG['file_access']          = 'No es pot accedir a l’arxiu: ';\n$PHPMAILER_LANG['file_open']            = 'Error d’Arxiu: No es pot obrir l’arxiu: ';\n$PHPMAILER_LANG['from_failed']          = 'La(s) següent(s) adreces de remitent han fallat: ';\n$PHPMAILER_LANG['instantiate']          = 'No s’ha pogut crear una instància de la funció Mail.';\n$PHPMAILER_LANG['invalid_address']      = 'Adreça d’email invalida: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat';\n$PHPMAILER_LANG['provide_address']      = 'S’ha de proveir almenys una adreça d’email com a destinatari.';\n$PHPMAILER_LANG['recipients_failed']    = 'Error SMTP: Els següents destinataris han fallat: ';\n$PHPMAILER_LANG['signing']              = 'Error al signar: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Ha fallat el SMTP Connect().';\n$PHPMAILER_LANG['smtp_error']           = 'Error del servidor SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'No s’ha pogut establir o restablir la variable: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-ch.php",
    "content": "<?php\n/**\n * Chinese PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author LiuXin <http://www.80x86.cn/blog/>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP 错误：身份验证失败。';\n$PHPMAILER_LANG['connect_host']         = 'SMTP 错误: 不能连接SMTP主机。';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP 错误: 数据不可接受。';\n//$PHPMAILER_LANG['empty_message']        = 'Message body empty';\n$PHPMAILER_LANG['encoding']             = '未知编码：';\n$PHPMAILER_LANG['execute']              = '不能执行: ';\n$PHPMAILER_LANG['file_access']          = '不能访问文件：';\n$PHPMAILER_LANG['file_open']            = '文件错误：不能打开文件：';\n$PHPMAILER_LANG['from_failed']          = '下面的发送地址邮件发送失败了： ';\n$PHPMAILER_LANG['instantiate']          = '不能实现mail方法。';\n//$PHPMAILER_LANG['invalid_address']      = 'Invalid address: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。';\n$PHPMAILER_LANG['provide_address']      = '您必须提供至少一个 收信人的email地址。';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP 错误： 下面的 收件人失败了： ';\n//$PHPMAILER_LANG['signing']              = 'Signing Error: ';\n//$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';\n//$PHPMAILER_LANG['smtp_error']           = 'SMTP server error: ';\n//$PHPMAILER_LANG['variable_set']         = 'Cannot set or reset variable: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-cs.php",
    "content": "<?php\n/**\n * Czech PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Chyba SMTP: Autentizace selhala.';\n$PHPMAILER_LANG['connect_host']         = 'Chyba SMTP: Nelze navázat spojení se SMTP serverem.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Chyba SMTP: Data nebyla přijata.';\n$PHPMAILER_LANG['empty_message']        = 'Prázdné tělo zprávy';\n$PHPMAILER_LANG['encoding']             = 'Neznámé kódování: ';\n$PHPMAILER_LANG['execute']              = 'Nelze provést: ';\n$PHPMAILER_LANG['file_access']          = 'Nelze získat přístup k souboru: ';\n$PHPMAILER_LANG['file_open']            = 'Chyba souboru: Nelze otevřít soubor pro čtení: ';\n$PHPMAILER_LANG['from_failed']          = 'Následující adresa odesílatele je nesprávná: ';\n$PHPMAILER_LANG['instantiate']          = 'Nelze vytvořit instanci emailové funkce.';\n$PHPMAILER_LANG['invalid_address']      = 'Neplatná adresa: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer není podporován.';\n$PHPMAILER_LANG['provide_address']      = 'Musíte zadat alespoň jednu emailovou adresu příjemce.';\n$PHPMAILER_LANG['recipients_failed']    = 'Chyba SMTP: Následující adresy příjemců nejsou správně: ';\n$PHPMAILER_LANG['signing']              = 'Chyba přihlašování: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() selhal.';\n$PHPMAILER_LANG['smtp_error']           = 'Chyba SMTP serveru: ';\n$PHPMAILER_LANG['variable_set']         = 'Nelze nastavit nebo změnit proměnnou: ';\n$PHPMAILER_LANG['extension_missing']    = 'Chybí rozšíření: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-cz.php",
    "content": "<?php\n/**\n* PHPMailer language file: refer to English translation for definitive list\n* Czech Version\n*/\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP Error: Chyba autentikace.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP Error: Nelze navázat spojení se SMTP serverem.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP Error: Data nebyla pøijata';\n//$PHPMAILER_LANG['empty_message']        = 'Message body empty';\n$PHPMAILER_LANG['encoding']             = 'Neznámé kódování: ';\n$PHPMAILER_LANG['execute']              = 'Nelze provést: ';\n$PHPMAILER_LANG['file_access']          = 'Soubor nenalezen: ';\n$PHPMAILER_LANG['file_open']            = 'File Error: Nelze otevøít soubor pro ètení: ';\n$PHPMAILER_LANG['from_failed']          = 'Následující adresa From je nesprávná: ';\n$PHPMAILER_LANG['instantiate']          = 'Nelze vytvoøit instanci emailové funkce.';\n//$PHPMAILER_LANG['invalid_email']        = 'Not sending, email address is invalid: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailový klient není podporován.';\n$PHPMAILER_LANG['provide_address']      = 'Musíte zadat alespoò jednu emailovou adresu pøíjemce.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP Error: Adresy pøíjemcù nejsou správné ';\n//$PHPMAILER_LANG['signing']              = 'Signing Error: ';\n//$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';\n//$PHPMAILER_LANG['smtp_error']           = 'SMTP server error: ';\n//$PHPMAILER_LANG['variable_set']         = 'Cannot set or reset variable: ';\n?>"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-da.php",
    "content": "<?php\n/**\n * Danish PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Mikael Stokkebro <info@stokkebro.dk>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP fejl: Kunne ikke logge på.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP fejl: Data kunne ikke accepteres.';\n//$PHPMAILER_LANG['empty_message']        = 'Message body empty';\n$PHPMAILER_LANG['encoding']             = 'Ukendt encode-format: ';\n$PHPMAILER_LANG['execute']              = 'Kunne ikke køre: ';\n$PHPMAILER_LANG['file_access']          = 'Ingen adgang til fil: ';\n$PHPMAILER_LANG['file_open']            = 'Fil fejl: Kunne ikke åbne filen: ';\n$PHPMAILER_LANG['from_failed']          = 'Følgende afsenderadresse er forkert: ';\n$PHPMAILER_LANG['instantiate']          = 'Kunne ikke initialisere email funktionen.';\n//$PHPMAILER_LANG['invalid_address']        = 'Invalid address: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';\n$PHPMAILER_LANG['provide_address']      = 'Du skal indtaste mindst en modtagers emailadresse.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP fejl: Følgende modtagere er forkerte: ';\n//$PHPMAILER_LANG['signing']              = 'Signing Error: ';\n//$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';\n//$PHPMAILER_LANG['smtp_error']           = 'SMTP server error: ';\n//$PHPMAILER_LANG['variable_set']         = 'Cannot set or reset variable: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-de.php",
    "content": "<?php\n/**\n * German PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP-Fehler: Authentifizierung fehlgeschlagen.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP-Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP-Fehler: Daten werden nicht akzeptiert.';\n$PHPMAILER_LANG['empty_message']        = 'E-Mail-Inhalt ist leer.';\n$PHPMAILER_LANG['encoding']             = 'Unbekannte Kodierung: ';\n$PHPMAILER_LANG['execute']              = 'Konnte folgenden Befehl nicht ausführen: ';\n$PHPMAILER_LANG['file_access']          = 'Zugriff auf folgende Datei fehlgeschlagen: ';\n$PHPMAILER_LANG['file_open']            = 'Dateifehler: Konnte folgende Datei nicht öffnen: ';\n$PHPMAILER_LANG['from_failed']          = 'Die folgende Absenderadresse ist nicht korrekt: ';\n$PHPMAILER_LANG['instantiate']          = 'Mail-Funktion konnte nicht initialisiert werden.';\n$PHPMAILER_LANG['invalid_address']      = 'Die Adresse ist ungültig: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';\n$PHPMAILER_LANG['provide_address']      = 'Bitte geben Sie mindestens eine Empfängeradresse an.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP-Fehler: Die folgenden Empfänger sind nicht korrekt: ';\n$PHPMAILER_LANG['signing']              = 'Fehler beim Signieren: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Verbindung zum SMTP-Server fehlgeschlagen.';\n$PHPMAILER_LANG['smtp_error']           = 'Fehler vom SMTP-Server: ';\n$PHPMAILER_LANG['variable_set']         = 'Kann Variable nicht setzen oder zurücksetzen: ';\n$PHPMAILER_LANG['extension_missing']    = 'Fehlende Erweiterung: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-dk.php",
    "content": "<?php\n/**\n* PHPMailer language file: refer to English translation for definitive list\n* Danish Version\n* Author: Mikael Stokkebro <info@stokkebro.dk>\n*/\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP fejl: Kunne ikke logge på.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP fejl: Data kunne ikke accepteres.';\n//$PHPMAILER_LANG['empty_message']        = 'Message body empty';\n$PHPMAILER_LANG['encoding']             = 'Ukendt encode-format: ';\n$PHPMAILER_LANG['execute']              = 'Kunne ikke køre: ';\n$PHPMAILER_LANG['file_access']          = 'Ingen adgang til fil: ';\n$PHPMAILER_LANG['file_open']            = 'Fil fejl: Kunne ikke åbne filen: ';\n$PHPMAILER_LANG['from_failed']          = 'Følgende afsenderadresse er forkert: ';\n$PHPMAILER_LANG['instantiate']          = 'Kunne ikke initialisere email funktionen.';\n//$PHPMAILER_LANG['invalid_email']        = 'Not sending, email address is invalid: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';\n$PHPMAILER_LANG['provide_address']      = 'Du skal indtaste mindst en modtagers emailadresse.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP fejl: Følgende modtagere er forkerte: ';\n//$PHPMAILER_LANG['signing']              = 'Signing Error: ';\n//$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';\n//$PHPMAILER_LANG['smtp_error']           = 'SMTP server error: ';\n//$PHPMAILER_LANG['variable_set']         = 'Cannot set or reset variable: ';\n?>"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-el.php",
    "content": "<?php\n/**\n * Greek PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP Σφάλμα: Αδυναμία πιστοποίησης (authentication).';\n$PHPMAILER_LANG['connect_host']         = 'SMTP Σφάλμα: Αδυναμία σύνδεσης στον SMTP-Host.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP Σφάλμα: Τα δεδομένα δεν έγιναν αποδεκτά.';\n$PHPMAILER_LANG['empty_message']        = 'Το E-Mail δεν έχει περιεχόμενο .';\n$PHPMAILER_LANG['encoding']             = 'Αγνωστο Encoding-Format: ';\n$PHPMAILER_LANG['execute']              = 'Αδυναμία εκτέλεσης ακόλουθης εντολής: ';\n$PHPMAILER_LANG['file_access']          = 'Αδυναμία προσπέλασης του αρχείου: ';\n$PHPMAILER_LANG['file_open']            = 'Σφάλμα Αρχείου: Δεν είναι δυνατό το άνοιγμα του ακόλουθου αρχείου: ';\n$PHPMAILER_LANG['from_failed']          = 'Η παρακάτω διεύθυνση αποστολέα δεν είναι σωστή: ';\n$PHPMAILER_LANG['instantiate']          = 'Αδυναμία εκκίνησης Mail function.';\n$PHPMAILER_LANG['invalid_address']      = 'Το μήνυμα δεν εστάλη, η διεύθυνση δεν είναι έγκυρη: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.';\n$PHPMAILER_LANG['provide_address']      = 'Παρακαλούμε δώστε τουλάχιστον μια e-mail διεύθυνση παραλήπτη.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP Σφάλμα: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';\n$PHPMAILER_LANG['signing']              = 'Σφάλμα υπογραφής: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Αποτυχία σύνδεσης στον SMTP Server.';\n$PHPMAILER_LANG['smtp_error']           = 'Σφάλμα από τον SMTP Server: ';\n$PHPMAILER_LANG['variable_set']         = 'Αδυναμία ορισμού ή αρχικοποίησης μεταβλητής: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-eo.php",
    "content": "<?php\n/**\n * Esperanto PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Eraro de servilo SMTP : aŭtentigo malsukcesis.';\n$PHPMAILER_LANG['connect_host']         = 'Eraro de servilo SMTP : konektado al servilo malsukcesis.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Eraro de servilo SMTP : neĝustaj datumoj.';\n$PHPMAILER_LANG['empty_message']        = 'Teksto de mesaĝo mankas.';\n$PHPMAILER_LANG['encoding']             = 'Nekonata kodoprezento: ';\n$PHPMAILER_LANG['execute']              = 'Lanĉi rulumadon ne eblis: ';\n$PHPMAILER_LANG['file_access']          = 'Aliro al dosiero ne sukcesis: ';\n$PHPMAILER_LANG['file_open']            = 'Eraro de dosiero: malfermo neeblas: ';\n$PHPMAILER_LANG['from_failed']          = 'Jena adreso de sendinto malsukcesis: ';\n$PHPMAILER_LANG['instantiate']          = 'Genero de retmesaĝa funkcio neeblis.';\n$PHPMAILER_LANG['invalid_address']      = 'Retadreso ne validas: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mesaĝilo ne subtenata.';\n$PHPMAILER_LANG['provide_address']      = 'Vi devas tajpi almenaŭ unu recevontan retadreson.';\n$PHPMAILER_LANG['recipients_failed']    = 'Eraro de servilo SMTP : la jenaj poŝtrecivuloj kaŭzis eraron: ';\n$PHPMAILER_LANG['signing']              = 'Eraro de subskribo: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP konektado malsukcesis.';\n$PHPMAILER_LANG['smtp_error']           = 'Eraro de servilo SMTP : ';\n$PHPMAILER_LANG['variable_set']         = 'Variablo ne pravalorizeblas aŭ ne repravalorizeblas: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-es.php",
    "content": "<?php\n/**\n * Spanish PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Matt Sturdy <matt.sturdy@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Error SMTP: Imposible autentificar.';\n$PHPMAILER_LANG['connect_host']         = 'Error SMTP: Imposible conectar al servidor SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Error SMTP: Datos no aceptados.';\n$PHPMAILER_LANG['empty_message']        = 'El cuerpo del mensaje está vacío';\n$PHPMAILER_LANG['encoding']             = 'Codificación desconocida: ';\n$PHPMAILER_LANG['execute']              = 'Imposible ejecutar: ';\n$PHPMAILER_LANG['file_access']          = 'Imposible acceder al archivo: ';\n$PHPMAILER_LANG['file_open']            = 'Error de Archivo: Imposible abrir el archivo: ';\n$PHPMAILER_LANG['from_failed']          = 'La(s) siguiente(s) direcciones de remitente fallaron: ';\n$PHPMAILER_LANG['instantiate']          = 'Imposible crear una instancia de la función Mail.';\n$PHPMAILER_LANG['invalid_address']      = 'Imposible enviar: dirección de email inválido: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.';\n$PHPMAILER_LANG['provide_address']      = 'Debe proporcionar al menos una dirección de email de destino.';\n$PHPMAILER_LANG['recipients_failed']    = 'Error SMTP: Los siguientes destinos fallaron: ';\n$PHPMAILER_LANG['signing']              = 'Error al firmar: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() falló.';\n$PHPMAILER_LANG['smtp_error']           = 'Error del servidor SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'No se pudo configurar la variable: ';\n$PHPMAILER_LANG['extension_missing']    = 'Extensión faltante: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-et.php",
    "content": "<?php\n/**\n * Estonian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Indrek Päri\n * @author Elan Ruusamäe <glen@delfi.ee>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP Viga: Autoriseerimise viga.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP Viga: Vigased andmed.';\n$PHPMAILER_LANG['empty_message']        = 'Tühi kirja sisu';\n$PHPMAILER_LANG[\"encoding\"]             = 'Tundmatu kodeering: ';\n$PHPMAILER_LANG['execute']              = 'Tegevus ebaõnnestus: ';\n$PHPMAILER_LANG['file_access']          = 'Pole piisavalt õiguseid järgneva faili avamiseks: ';\n$PHPMAILER_LANG['file_open']            = 'Faili Viga: Faili avamine ebaõnnestus: ';\n$PHPMAILER_LANG['from_failed']          = 'Järgnev saatja e-posti aadress on vigane: ';\n$PHPMAILER_LANG['instantiate']          = 'mail funktiooni käivitamine ebaõnnestus.';\n$PHPMAILER_LANG['invalid_address']      = 'Saatmine peatatud, e-posti address vigane: ';\n$PHPMAILER_LANG['provide_address']      = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.';\n$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: ';\n$PHPMAILER_LANG[\"signing\"]              = 'Viga allkirjastamisel: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() ebaõnnestus.';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP serveri viga: ';\n$PHPMAILER_LANG['variable_set']         = 'Ei õnnestunud määrata või lähtestada muutujat: ';\n$PHPMAILER_LANG['extension_missing']    = 'Nõutud laiendus on puudu: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-fa.php",
    "content": "<?php\n/**\n * Persian/Farsi PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Ali Jazayeri <jaza.ali@gmail.com>\n * @author Mohammad Hossein Mojtahedi <mhm5000@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'خطای SMTP: احراز هویت با شکست مواجه شد.';\n$PHPMAILER_LANG['connect_host']         = 'خطای SMTP: اتصال به سرور SMTP برقرار نشد.';\n$PHPMAILER_LANG['data_not_accepted']    = 'خطای SMTP: داده‌ها نا‌درست هستند.';\n$PHPMAILER_LANG['empty_message']        = 'بخش متن پیام خالی است.';\n$PHPMAILER_LANG['encoding']             = 'کد‌گذاری نا‌شناخته: ';\n$PHPMAILER_LANG['execute']              = 'امکان اجرا وجود ندارد: ';\n$PHPMAILER_LANG['file_access']          = 'امکان دسترسی به فایل وجود ندارد: ';\n$PHPMAILER_LANG['file_open']            = 'خطای File: امکان بازکردن فایل وجود ندارد: ';\n$PHPMAILER_LANG['from_failed']          = 'آدرس فرستنده اشتباه است: ';\n$PHPMAILER_LANG['instantiate']          = 'امکان معرفی تابع ایمیل وجود ندارد.';\n$PHPMAILER_LANG['invalid_address']      = 'آدرس ایمیل معتبر نیست: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمی‌شود.';\n$PHPMAILER_LANG['provide_address']      = 'باید حداقل یک آدرس گیرنده وارد کنید.';\n$PHPMAILER_LANG['recipients_failed']    = 'خطای SMTP: ارسال به آدرس گیرنده با خطا مواجه شد: ';\n$PHPMAILER_LANG['signing']              = 'خطا در امضا: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'خطا در اتصال به SMTP.';\n$PHPMAILER_LANG['smtp_error']           = 'خطا در SMTP Server: ';\n$PHPMAILER_LANG['variable_set']         = 'امکان ارسال یا ارسال مجدد متغیر‌ها وجود ندارد: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-fi.php",
    "content": "<?php\n/**\n * Finnish PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Jyry Kuukanen\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP-virhe: käyttäjätunnistus epäonnistui.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP-virhe: yhteys palvelimeen ei onnistu.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP-virhe: data on virheellinen.';\n//$PHPMAILER_LANG['empty_message']        = 'Message body empty';\n$PHPMAILER_LANG['encoding']             = 'Tuntematon koodaustyyppi: ';\n$PHPMAILER_LANG['execute']              = 'Suoritus epäonnistui: ';\n$PHPMAILER_LANG['file_access']          = 'Seuraavaan tiedostoon ei ole oikeuksia: ';\n$PHPMAILER_LANG['file_open']            = 'Tiedostovirhe: Ei voida avata tiedostoa: ';\n$PHPMAILER_LANG['from_failed']          = 'Seuraava lähettäjän osoite on virheellinen: ';\n$PHPMAILER_LANG['instantiate']          = 'mail-funktion luonti epäonnistui.';\n//$PHPMAILER_LANG['invalid_address']      = 'Invalid address: ';\n$PHPMAILER_LANG['mailer_not_supported'] = 'postivälitintyyppiä ei tueta.';\n$PHPMAILER_LANG['provide_address']      = 'Aseta vähintään yksi vastaanottajan sähk&ouml;postiosoite.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.';\n$PHPMAILER_LANG['encoding']             = 'Tuntematon koodaustyyppi: ';\n//$PHPMAILER_LANG['signing']              = 'Signing Error: ';\n//$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';\n//$PHPMAILER_LANG['smtp_error']           = 'SMTP server error: ';\n//$PHPMAILER_LANG['variable_set']         = 'Cannot set or reset variable: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-fo.php",
    "content": "<?php\n/**\n * Faroese PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Dávur Sørensen <http://www.profo-webdesign.dk>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP feilur: Kundi ikki góðkenna.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP feilur: Data ikki góðkent.';\n//$PHPMAILER_LANG['empty_message']        = 'Message body empty';\n$PHPMAILER_LANG['encoding']             = 'Ókend encoding: ';\n$PHPMAILER_LANG['execute']              = 'Kundi ikki útføra: ';\n$PHPMAILER_LANG['file_access']          = 'Kundi ikki tilganga fílu: ';\n$PHPMAILER_LANG['file_open']            = 'Fílu feilur: Kundi ikki opna fílu: ';\n$PHPMAILER_LANG['from_failed']          = 'fylgjandi Frá/From adressa miseydnaðist: ';\n$PHPMAILER_LANG['instantiate']          = 'Kuni ikki instantiera mail funktión.';\n//$PHPMAILER_LANG['invalid_address']      = 'Invalid address: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.';\n$PHPMAILER_LANG['provide_address']      = 'Tú skal uppgeva minst móttakara-emailadressu(r).';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: ';\n//$PHPMAILER_LANG['signing']              = 'Signing Error: ';\n//$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';\n//$PHPMAILER_LANG['smtp_error']           = 'SMTP server error: ';\n//$PHPMAILER_LANG['variable_set']         = 'Cannot set or reset variable: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-fr.php",
    "content": "<?php\n/**\n * French PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * Some French punctuation requires a thin non-breaking space (U+202F) character before it,\n * for example before a colon or exclamation mark.\n * There is one of these characters between these quotes: \" \"\n * @link http://unicode.org/udhr/n/notes_fra.html\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Erreur SMTP : échec de l\\'authentification.';\n$PHPMAILER_LANG['connect_host']         = 'Erreur SMTP : impossible de se connecter au serveur SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Erreur SMTP : données incorrectes.';\n$PHPMAILER_LANG['empty_message']        = 'Corps du message vide.';\n$PHPMAILER_LANG['encoding']             = 'Encodage inconnu : ';\n$PHPMAILER_LANG['execute']              = 'Impossible de lancer l\\'exécution : ';\n$PHPMAILER_LANG['file_access']          = 'Impossible d\\'accéder au fichier : ';\n$PHPMAILER_LANG['file_open']            = 'Ouverture du fichier impossible : ';\n$PHPMAILER_LANG['from_failed']          = 'L\\'adresse d\\'expéditeur suivante a échoué : ';\n$PHPMAILER_LANG['instantiate']          = 'Impossible d\\'instancier la fonction mail.';\n$PHPMAILER_LANG['invalid_address']      = 'L\\'adresse courriel n\\'est pas valide : ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';\n$PHPMAILER_LANG['provide_address']      = 'Vous devez fournir au moins une adresse de destinataire.';\n$PHPMAILER_LANG['recipients_failed']    = 'Erreur SMTP : les destinataires suivants sont en erreur : ';\n$PHPMAILER_LANG['signing']              = 'Erreur de signature : ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Échec de la connexion SMTP.';\n$PHPMAILER_LANG['smtp_error']           = 'Erreur du serveur SMTP : ';\n$PHPMAILER_LANG['variable_set']         = 'Impossible d\\'initialiser ou de réinitialiser une variable : ';\n$PHPMAILER_LANG['extension_missing']    = 'Extension manquante : ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-gl.php",
    "content": "<?php\n/**\n * Galician PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author by Donato Rouco <donatorouco@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Erro SMTP: Non puido ser autentificado.';\n$PHPMAILER_LANG['connect_host']         = 'Erro SMTP: Non puido conectar co servidor SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Erro SMTP: Datos non aceptados.';\n$PHPMAILER_LANG['empty_message']        = 'Corpo da mensaxe vacía';\n$PHPMAILER_LANG['encoding']             = 'Codificación descoñecida: ';\n$PHPMAILER_LANG['execute']              = 'Non puido ser executado: ';\n$PHPMAILER_LANG['file_access']          = 'Nob puido acceder ó arquivo: ';\n$PHPMAILER_LANG['file_open']            = 'Erro de Arquivo: No puido abrir o arquivo: ';\n$PHPMAILER_LANG['from_failed']          = 'A(s) seguinte(s) dirección(s) de remitente(s) deron erro: ';\n$PHPMAILER_LANG['instantiate']          = 'Non puido crear unha instancia da función Mail.';\n$PHPMAILER_LANG['invalid_address']      = 'Non puido envia-lo correo: dirección de email inválida: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer non está soportado.';\n$PHPMAILER_LANG['provide_address']      = 'Debe engadir polo menos unha dirección de email coma destino.';\n$PHPMAILER_LANG['recipients_failed']    = 'Erro SMTP: Os seguintes destinos fallaron: ';\n$PHPMAILER_LANG['signing']              = 'Erro ó firmar: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() fallou.';\n$PHPMAILER_LANG['smtp_error']           = 'Erro do servidor SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'Non puidemos axustar ou reaxustar a variábel: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-he.php",
    "content": "<?php\n/**\n * Hebrew PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Ronny Sherer <ronny@hoojima.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'שגיאת SMTP: פעולת האימות נכשלה.';\n$PHPMAILER_LANG['connect_host']         = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'שגיאת SMTP: מידע לא התקבל.';\n$PHPMAILER_LANG['empty_message']        = 'גוף ההודעה ריק';\n$PHPMAILER_LANG['invalid_address']      = 'כתובת שגויה: ';\n$PHPMAILER_LANG['encoding']             = 'קידוד לא מוכר: ';\n$PHPMAILER_LANG['execute']              = 'לא הצלחתי להפעיל את: ';\n$PHPMAILER_LANG['file_access']          = 'לא ניתן לגשת לקובץ: ';\n$PHPMAILER_LANG['file_open']            = 'שגיאת קובץ: לא ניתן לגשת לקובץ: ';\n$PHPMAILER_LANG['from_failed']          = 'כתובות הנמענים הבאות נכשלו: ';\n$PHPMAILER_LANG['instantiate']          = 'לא הצלחתי להפעיל את פונקציית המייל.';\n$PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.';\n$PHPMAILER_LANG['provide_address']      = 'חובה לספק לפחות כתובת אחת של מקבל המייל.';\n$PHPMAILER_LANG['recipients_failed']    = 'שגיאת SMTP: הנמענים הבאים נכשלו: ';\n$PHPMAILER_LANG['signing']              = 'שגיאת חתימה: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';\n$PHPMAILER_LANG['smtp_error']           = 'שגיאת שרת SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'לא ניתן לקבוע או לשנות את המשתנה: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-hr.php",
    "content": "<?php\n/**\n * Croatian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Hrvoj3e <hrvoj3e@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP Greška: Neuspjela autentikacija.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP Greška: Ne mogu se spojiti na SMTP poslužitelj.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP Greška: Podatci nisu prihvaćeni.';\n$PHPMAILER_LANG['empty_message']        = 'Sadržaj poruke je prazan.';\n$PHPMAILER_LANG['encoding']             = 'Nepoznati encoding: ';\n$PHPMAILER_LANG['execute']              = 'Nije moguće izvršiti naredbu: ';\n$PHPMAILER_LANG['file_access']          = 'Nije moguće pristupiti datoteci: ';\n$PHPMAILER_LANG['file_open']            = 'Nije moguće otvoriti datoteku: ';\n$PHPMAILER_LANG['from_failed']          = 'SMTP Greška: Slanje s navedenih e-mail adresa nije uspjelo: ';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP Greška: Slanje na navedenih e-mail adresa nije uspjelo: ';\n$PHPMAILER_LANG['instantiate']          = 'Ne mogu pokrenuti mail funkcionalnost.';\n$PHPMAILER_LANG['invalid_address']      = 'E-mail nije poslan. Neispravna e-mail adresa: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.';\n$PHPMAILER_LANG['provide_address']      = 'Definirajte barem jednu adresu primatelja.';\n$PHPMAILER_LANG['signing']              = 'Greška prilikom prijave: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Spajanje na SMTP poslužitelj nije uspjelo.';\n$PHPMAILER_LANG['smtp_error']           = 'Greška SMTP poslužitelja: ';\n$PHPMAILER_LANG['variable_set']         = 'Ne mogu postaviti varijablu niti ju vratiti nazad: ';\n$PHPMAILER_LANG['extension_missing']    = 'Nedostaje proširenje: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-hu.php",
    "content": "<?php\n/**\n * Hungarian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author @dominicus-75\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP hiba: az azonosítás sikertelen.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP hiba: nem lehet kapcsolódni az SMTP-szerverhez.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP hiba: adatok visszautasítva.';\n$PHPMAILER_LANG['empty_message']        = 'Üres az üzenettörzs.';\n$PHPMAILER_LANG['encoding']             = 'Ismeretlen kódolás: ';\n$PHPMAILER_LANG['execute']              = 'Nem lehet végrehajtani: ';\n$PHPMAILER_LANG['file_access']          = 'A következő fájl nem elérhető: ';\n$PHPMAILER_LANG['file_open']            = 'Fájl hiba: a következő fájlt nem lehet megnyitni: ';\n$PHPMAILER_LANG['from_failed']          = 'A feladóként megadott következő cím hibás: ';\n$PHPMAILER_LANG['instantiate']          = 'A PHP mail() függvényt nem sikerült végrehajtani.';\n$PHPMAILER_LANG['invalid_address']      = 'Érvénytelen cím: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' a mailer-osztály nem támogatott.';\n$PHPMAILER_LANG['provide_address']      = 'Legalább egy címzettet fel kell tüntetni.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP hiba: a címzettként megadott következő címek hibásak: ';\n$PHPMAILER_LANG['signing']              = 'Hibás aláírás: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Hiba az SMTP-kapcsolatban.';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP-szerver hiba: ';\n$PHPMAILER_LANG['variable_set']         = 'A következő változók beállítása nem sikerült: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-id.php",
    "content": "<?php\n/**\n * Indonesian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Cecep Prawiro <cecep.prawiro@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Kesalahan SMTP: Tidak dapat mengautentikasi.';\n$PHPMAILER_LANG['connect_host']         = 'Kesalahan SMTP: Tidak dapat terhubung ke host SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Kesalahan SMTP: Data tidak diterima peladen.';\n$PHPMAILER_LANG['empty_message']        = 'Isi pesan kosong';\n$PHPMAILER_LANG['encoding']             = 'Pengkodean karakter tidak dikenali: ';\n$PHPMAILER_LANG['execute']              = 'Tidak dapat menjalankan proses : ';\n$PHPMAILER_LANG['file_access']          = 'Tidak dapat mengakses berkas : ';\n$PHPMAILER_LANG['file_open']            = 'Kesalahan File: Berkas tidak bisa dibuka : ';\n$PHPMAILER_LANG['from_failed']          = 'Alamat pengirim berikut mengakibatkan error : ';\n$PHPMAILER_LANG['instantiate']          = 'Tidak dapat menginisialisasi fungsi email';\n$PHPMAILER_LANG['invalid_address']      = 'Gagal terkirim, alamat email tidak valid : ';\n$PHPMAILER_LANG['provide_address']      = 'Harus disediakan minimal satu alamat tujuan';\n$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer tidak didukung';\n$PHPMAILER_LANG['recipients_failed']    = 'Kesalahan SMTP: Alamat tujuan berikut menghasilkan error : ';\n$PHPMAILER_LANG['signing']              = 'Kesalahan dalam tanda tangan : ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() gagal.';\n$PHPMAILER_LANG['smtp_error']           = 'Kesalahan peladen SMTP : ';\n$PHPMAILER_LANG['variable_set']         = 'Tidak berhasil mengatur atau mengatur ulang variable : ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-it.php",
    "content": "<?php\n/**\n * Italian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Ilias Bartolini <brain79@inwind.it>\n * @author Stefano Sabatini <sabas88@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP Error: Impossibile autenticarsi.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP Error: Impossibile connettersi all\\'host SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP Error: Dati non accettati dal server.';\n$PHPMAILER_LANG['empty_message']        = 'Il corpo del messaggio è vuoto';\n$PHPMAILER_LANG['encoding']             = 'Codifica dei caratteri sconosciuta: ';\n$PHPMAILER_LANG['execute']              = 'Impossibile eseguire l\\'operazione: ';\n$PHPMAILER_LANG['file_access']          = 'Impossibile accedere al file: ';\n$PHPMAILER_LANG['file_open']            = 'File Error: Impossibile aprire il file: ';\n$PHPMAILER_LANG['from_failed']          = 'I seguenti indirizzi mittenti hanno generato errore: ';\n$PHPMAILER_LANG['instantiate']          = 'Impossibile istanziare la funzione mail';\n$PHPMAILER_LANG['invalid_address']      = 'Impossibile inviare, l\\'indirizzo email non è valido: ';\n$PHPMAILER_LANG['provide_address']      = 'Deve essere fornito almeno un indirizzo ricevente';\n$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: ';\n$PHPMAILER_LANG['signing']              = 'Errore nella firma: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() fallita.';\n$PHPMAILER_LANG['smtp_error']           = 'Errore del server SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'Impossibile impostare o resettare la variabile: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-ja.php",
    "content": "<?php\n/**\n * Japanese PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Mitsuhiro Yoshida <http://mitstek.com/>\n * @author Yoshi Sakai <http://bluemooninc.jp/>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTPエラー: 認証できませんでした。';\n$PHPMAILER_LANG['connect_host']         = 'SMTPエラー: SMTPホストに接続できませんでした。';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTPエラー: データが受け付けられませんでした。';\n//$PHPMAILER_LANG['empty_message']        = 'Message body empty';\n$PHPMAILER_LANG['encoding']             = '不明なエンコーディング: ';\n$PHPMAILER_LANG['execute']              = '実行できませんでした: ';\n$PHPMAILER_LANG['file_access']          = 'ファイルにアクセスできません: ';\n$PHPMAILER_LANG['file_open']            = 'ファイルエラー: ファイルを開けません: ';\n$PHPMAILER_LANG['from_failed']          = 'Fromアドレスを登録する際にエラーが発生しました: ';\n$PHPMAILER_LANG['instantiate']          = 'メール関数が正常に動作しませんでした。';\n//$PHPMAILER_LANG['invalid_address']      = 'Invalid address: ';\n$PHPMAILER_LANG['provide_address']      = '少なくとも1つメールアドレスを 指定する必要があります。';\n$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';\n//$PHPMAILER_LANG['signing']              = 'Signing Error: ';\n//$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';\n//$PHPMAILER_LANG['smtp_error']           = 'SMTP server error: ';\n//$PHPMAILER_LANG['variable_set']         = 'Cannot set or reset variable: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-ka.php",
    "content": "<?php\n/**\n * Georgian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.';\n$PHPMAILER_LANG['encoding']             = 'კოდირების უცნობი ტიპი: ';\n$PHPMAILER_LANG['execute']              = 'შეუძლებელია შემდეგი ბრძანების შესრულება: ';\n$PHPMAILER_LANG['file_access']          = 'შეუძლებელია წვდომა ფაილთან: ';\n$PHPMAILER_LANG['file_open']            = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: ';\n$PHPMAILER_LANG['from_failed']          = 'გამგზავნის არასწორი მისამართი: ';\n$PHPMAILER_LANG['instantiate']          = 'mail ფუნქციის გაშვება ვერ ხერხდება.';\n$PHPMAILER_LANG['provide_address']      = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.';\n$PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: ';\n$PHPMAILER_LANG['empty_message']        = 'შეტყობინება ცარიელია';\n$PHPMAILER_LANG['invalid_address']      = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: ';\n$PHPMAILER_LANG['signing']              = 'ხელმოწერის შეცდომა: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'შეცდომა SMTP სერვერთან დაკავშირებისას';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP სერვერის შეცდომა: ';\n$PHPMAILER_LANG['variable_set']         = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: ';\n$PHPMAILER_LANG['extension_missing']    = 'ბიბლიოთეკა არ არსებობს: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-ko.php",
    "content": "<?php\n/**\n * Korean PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author ChalkPE <amato0617@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP 오류: 인증할 수 없습니다.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.';\n$PHPMAILER_LANG['empty_message']        = '메세지 내용이 없습니다';\n$PHPMAILER_LANG['encoding']             = '알 수 없는 인코딩: ';\n$PHPMAILER_LANG['execute']              = '실행 불가: ';\n$PHPMAILER_LANG['file_access']          = '파일 접근 불가: ';\n$PHPMAILER_LANG['file_open']            = '파일 오류: 파일을 열 수 없습니다: ';\n$PHPMAILER_LANG['from_failed']          = '다음 From 주소에서 오류가 발생했습니다: ';\n$PHPMAILER_LANG['instantiate']          = 'mail 함수를 인스턴스화할 수 없습니다';\n$PHPMAILER_LANG['invalid_address']      = '잘못된 주소: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.';\n$PHPMAILER_LANG['provide_address']      = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: ';\n$PHPMAILER_LANG['signing']              = '서명 오류: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP 연결을 실패하였습니다.';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP 서버 오류: ';\n$PHPMAILER_LANG['variable_set']         = '변수 설정 및 초기화 불가: ';\n$PHPMAILER_LANG['extension_missing']    = '확장자 없음: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-lt.php",
    "content": "<?php\n/**\n * Lithuanian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Dainius Kaupaitis <dk@sum.lt>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP klaida: autentifikacija nepavyko.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP klaida: nepavyksta prisijungti prie SMTP stoties.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP klaida: duomenys nepriimti.';\n$PHPMAILER_LANG['empty_message']        = 'Laiško turinys tuščias';\n$PHPMAILER_LANG['encoding']             = 'Neatpažinta koduotė: ';\n$PHPMAILER_LANG['execute']              = 'Nepavyko įvykdyti komandos: ';\n$PHPMAILER_LANG['file_access']          = 'Byla nepasiekiama: ';\n$PHPMAILER_LANG['file_open']            = 'Bylos klaida: Nepavyksta atidaryti: ';\n$PHPMAILER_LANG['from_failed']          = 'Neteisingas siuntėjo adresas: ';\n$PHPMAILER_LANG['instantiate']          = 'Nepavyko paleisti mail funkcijos.';\n$PHPMAILER_LANG['invalid_address']      = 'Neteisingas adresas: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' pašto stotis nepalaikoma.';\n$PHPMAILER_LANG['provide_address']      = 'Nurodykite bent vieną gavėjo adresą.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP klaida: nepavyko išsiųsti šiems gavėjams: ';\n$PHPMAILER_LANG['signing']              = 'Prisijungimo klaida: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP susijungimo klaida';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP stoties klaida: ';\n$PHPMAILER_LANG['variable_set']         = 'Nepavyko priskirti reikšmės kintamajam: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-lv.php",
    "content": "<?php\n/**\n * Latvian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Eduards M. <e@npd.lv>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP kļūda: Autorizācija neizdevās.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP Kļūda: Nevar izveidot savienojumu ar SMTP serveri.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP Kļūda: Nepieņem informāciju.';\n$PHPMAILER_LANG['empty_message']        = 'Ziņojuma teksts ir tukšs';\n$PHPMAILER_LANG['encoding']             = 'Neatpazīts kodējums: ';\n$PHPMAILER_LANG['execute']              = 'Neizdevās izpildīt komandu: ';\n$PHPMAILER_LANG['file_access']          = 'Fails nav pieejams: ';\n$PHPMAILER_LANG['file_open']            = 'Faila kļūda: Nevar atvērt failu: ';\n$PHPMAILER_LANG['from_failed']          = 'Nepareiza sūtītāja adrese: ';\n$PHPMAILER_LANG['instantiate']          = 'Nevar palaist sūtīšanas funkciju.';\n$PHPMAILER_LANG['invalid_address']      = 'Nepareiza adrese: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' sūtītājs netiek atbalstīts.';\n$PHPMAILER_LANG['provide_address']      = 'Lūdzu, norādiet vismaz vienu adresātu.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP kļūda: neizdevās nosūtīt šādiem saņēmējiem: ';\n$PHPMAILER_LANG['signing']              = 'Autorizācijas kļūda: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP savienojuma kļūda';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP servera kļūda: ';\n$PHPMAILER_LANG['variable_set']         = 'Nevar piešķirt mainīgā vērtību: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-ms.php",
    "content": "<?php\n/**\n * Malaysian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Nawawi Jamili <nawawi@rutweb.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Ralat SMTP: Tidak dapat pengesahan.';\n$PHPMAILER_LANG['connect_host']         = 'Ralat SMTP: Tidak dapat menghubungi hos pelayan SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Ralat SMTP: Data tidak diterima oleh pelayan.';\n$PHPMAILER_LANG['empty_message']        = 'Tiada isi untuk mesej';\n$PHPMAILER_LANG['encoding']             = 'Pengekodan tidak diketahui: ';\n$PHPMAILER_LANG['execute']              = 'Tidak dapat melaksanakan: ';\n$PHPMAILER_LANG['file_access']          = 'Tidak dapat mengakses fail: ';\n$PHPMAILER_LANG['file_open']            = 'Ralat Fail: Tidak dapat membuka fail: ';\n$PHPMAILER_LANG['from_failed']          = 'Berikut merupakan ralat dari alamat e-mel: ';\n$PHPMAILER_LANG['instantiate']          = 'Tidak dapat memberi contoh fungsi e-mel.';\n$PHPMAILER_LANG['invalid_address']      = 'Alamat emel tidak sah: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' jenis penghantar emel tidak disokong.';\n$PHPMAILER_LANG['provide_address']      = 'Anda perlu menyediakan sekurang-kurangnya satu alamat e-mel penerima.';\n$PHPMAILER_LANG['recipients_failed']    = 'Ralat SMTP: Penerima e-mel berikut telah gagal: ';\n$PHPMAILER_LANG['signing']              = 'Ralat pada tanda tangan: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() telah gagal.';\n$PHPMAILER_LANG['smtp_error']           = 'Ralat pada pelayan SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'Tidak boleh menetapkan atau menetapkan semula pembolehubah: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-nb.php",
    "content": "<?php\n/**\n * Norwegian Bokmål PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP Feil: Kunne ikke autentisere.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP Feil: Kunne ikke koble til SMTP tjener.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP Feil: Datainnhold ikke akseptert.';\n$PHPMAILER_LANG['empty_message']        = 'Melding kropp tomt';\n$PHPMAILER_LANG['encoding']             = 'Ukjent koding: ';\n$PHPMAILER_LANG['execute']              = 'Kunne ikke utføre: ';\n$PHPMAILER_LANG['file_access']          = 'Får ikke tilgang til filen: ';\n$PHPMAILER_LANG['file_open']            = 'Fil Feil: Kunne ikke åpne filen: ';\n$PHPMAILER_LANG['from_failed']          = 'Følgende Frå adresse feilet: ';\n$PHPMAILER_LANG['instantiate']          = 'Kunne ikke initialisere post funksjon.';\n$PHPMAILER_LANG['invalid_address']      = 'Ugyldig adresse: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' sender er ikke støttet.';\n$PHPMAILER_LANG['provide_address']      = 'Du må opppgi minst en mottakeradresse.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP Feil: Følgende mottakeradresse feilet: ';\n$PHPMAILER_LANG['signing']              = 'Signering Feil: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP connect() feilet.';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP server feil: ';\n$PHPMAILER_LANG['variable_set']         = 'Kan ikke skrive eller omskrive variabel: ';\n$PHPMAILER_LANG['extension_missing']    = 'Utvidelse mangler: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-nl.php",
    "content": "<?php\n/**\n * Dutch PHPMailer language file: refer to class.phpmailer.php for definitive list.\n * @package PHPMailer\n * @author Tuxion <team@tuxion.nl>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP-fout: authenticatie mislukt.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP-fout: kon niet verbinden met SMTP-host.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP-fout: data niet geaccepteerd.';\n$PHPMAILER_LANG['empty_message']        = 'Berichttekst is leeg';\n$PHPMAILER_LANG['encoding']             = 'Onbekende codering: ';\n$PHPMAILER_LANG['execute']              = 'Kon niet uitvoeren: ';\n$PHPMAILER_LANG['file_access']          = 'Kreeg geen toegang tot bestand: ';\n$PHPMAILER_LANG['file_open']            = 'Bestandsfout: kon bestand niet openen: ';\n$PHPMAILER_LANG['from_failed']          = 'Het volgende afzendersadres is mislukt: ';\n$PHPMAILER_LANG['instantiate']          = 'Kon mailfunctie niet initialiseren.';\n$PHPMAILER_LANG['invalid_address']      = 'Ongeldig adres: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';\n$PHPMAILER_LANG['provide_address']      = 'Er moet minstens één ontvanger worden opgegeven.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';\n$PHPMAILER_LANG['signing']              = 'Signeerfout: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Verbinding mislukt.';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP-serverfout: ';\n$PHPMAILER_LANG['variable_set']         = 'Kan de volgende variabele niet instellen of resetten: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-no.php",
    "content": "<?php\n/**\n* PHPMailer language file: refer to English translation for definitive list\n* Norwegian Version\n*/\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP Feil: Kunne ikke authentisere.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP Feil: Kunne ikke koble til SMTP host.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP Feil: Data ble ikke akseptert.';\n//$PHPMAILER_LANG['empty_message']        = 'Message body empty';\n$PHPMAILER_LANG['encoding']             = 'Ukjent encoding: ';\n$PHPMAILER_LANG['execute']              = 'Kunne ikke utføre: ';\n$PHPMAILER_LANG['file_access']          = 'Kunne ikke få tilgang til filen: ';\n$PHPMAILER_LANG['file_open']            = 'Fil feil: Kunne ikke åpne filen: ';\n$PHPMAILER_LANG['from_failed']          = 'Følgende Fra feilet: ';\n$PHPMAILER_LANG['instantiate']          = 'Kunne ikke instantiate mail funksjonen.';\n//$PHPMAILER_LANG['invalid_email']        = 'Not sending, email address is invalid: ';\n$PHPMAILER_LANG['provide_address']      = 'Du må ha med minst en mottager adresse.';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer er ikke supportert.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP Feil: Følgende mottagere feilet: ';\n//$PHPMAILER_LANG['signing']              = 'Signing Error: ';\n//$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';\n//$PHPMAILER_LANG['smtp_error']           = 'SMTP server error: ';\n//$PHPMAILER_LANG['variable_set']         = 'Cannot set or reset variable: ';\n?>"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-pl.php",
    "content": "<?php\n/**\n * Polish PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Błąd SMTP: Nie można przeprowadzić uwierzytelnienia.';\n$PHPMAILER_LANG['connect_host']         = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Błąd SMTP: Dane nie zostały przyjęte.';\n$PHPMAILER_LANG['empty_message']        = 'Wiadomość jest pusta.';\n$PHPMAILER_LANG['encoding']             = 'Nieznany sposób kodowania znaków: ';\n$PHPMAILER_LANG['execute']              = 'Nie można uruchomić: ';\n$PHPMAILER_LANG['file_access']          = 'Brak dostępu do pliku: ';\n$PHPMAILER_LANG['file_open']            = 'Nie można otworzyć pliku: ';\n$PHPMAILER_LANG['from_failed']          = 'Następujący adres Nadawcy jest nieprawidłowy: ';\n$PHPMAILER_LANG['instantiate']          = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.';\n$PHPMAILER_LANG['invalid_address']      = 'Nie można wysłać wiadomości, '.\n    'następujący adres Odbiorcy jest nieprawidłowy: ';\n$PHPMAILER_LANG['provide_address']      = 'Należy podać prawidłowy adres email Odbiorcy.';\n$PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.';\n$PHPMAILER_LANG['recipients_failed']    = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi: ';\n$PHPMAILER_LANG['signing']              = 'Błąd podpisywania wiadomości: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() zakończone niepowodzeniem.';\n$PHPMAILER_LANG['smtp_error']           = 'Błąd SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'Nie można ustawić lub zmodyfikować zmiennej: ';\n$PHPMAILER_LANG['extension_missing']    = 'Brakujące rozszerzenie: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-pt.php",
    "content": "<?php\n/**\n * Portuguese (European) PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Jonadabe <jonadabe@hotmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Erro do SMTP: Não foi possível realizar a autenticação.';\n$PHPMAILER_LANG['connect_host']         = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Erro do SMTP: Os dados foram rejeitados.';\n$PHPMAILER_LANG['empty_message']        = 'A mensagem no e-mail está vazia.';\n$PHPMAILER_LANG['encoding']             = 'Codificação desconhecida: ';\n$PHPMAILER_LANG['execute']              = 'Não foi possível executar: ';\n$PHPMAILER_LANG['file_access']          = 'Não foi possível aceder o ficheiro: ';\n$PHPMAILER_LANG['file_open']            = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: ';\n$PHPMAILER_LANG['from_failed']          = 'Ocorreram falhas nos endereços dos seguintes remententes: ';\n$PHPMAILER_LANG['instantiate']          = 'Não foi possível iniciar uma instância da função mail.';\n$PHPMAILER_LANG['invalid_address']      = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';\n$PHPMAILER_LANG['provide_address']      = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.';\n$PHPMAILER_LANG['recipients_failed']    = 'Erro do SMTP: O endereço do seguinte destinatário falhou: ';\n$PHPMAILER_LANG['signing']              = 'Erro ao assinar: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() falhou.';\n$PHPMAILER_LANG['smtp_error']           = 'Erro de servidor SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'Não foi possível definir ou redefinir a variável: ';\n$PHPMAILER_LANG['extension_missing']    = 'Extensão em falta: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-pt_br.php",
    "content": "<?php\n/**\n * Brazilian Portuguese PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Paulo Henrique Garcia <paulo@controllerweb.com.br>\n * @author Lucas Guimarães <lucas@lucasguimaraes.com>\n * @author Phelipe Alves <phelipealvesdesouza@gmail.com>\n * @author Fabio Beneditto <fabiobeneditto@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Erro de SMTP: Não foi possível autenticar.';\n$PHPMAILER_LANG['connect_host']         = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Erro de SMTP: Dados rejeitados.';\n$PHPMAILER_LANG['empty_message']        = 'Mensagem vazia';\n$PHPMAILER_LANG['encoding']             = 'Codificação desconhecida: ';\n$PHPMAILER_LANG['execute']              = 'Não foi possível executar: ';\n$PHPMAILER_LANG['file_access']          = 'Não foi possível acessar o arquivo: ';\n$PHPMAILER_LANG['file_open']            = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';\n$PHPMAILER_LANG['from_failed']          = 'Os seguintes remetentes falharam: ';\n$PHPMAILER_LANG['instantiate']          = 'Não foi possível instanciar a função mail.';\n$PHPMAILER_LANG['invalid_address']      = 'Endereço de e-mail inválido: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';\n$PHPMAILER_LANG['provide_address']      = 'Você deve informar pelo menos um destinatário.';\n$PHPMAILER_LANG['recipients_failed']    = 'Erro de SMTP: Os seguintes destinatários falharam: ';\n$PHPMAILER_LANG['signing']              = 'Erro de Assinatura: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() falhou.';\n$PHPMAILER_LANG['smtp_error']           = 'Erro de servidor SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'Não foi possível definir ou redefinir a variável: ';\n$PHPMAILER_LANG['extension_missing']    = 'Extensão ausente: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-ro.php",
    "content": "<?php\n/**\n * Romanian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Alex Florea <alecz.fia@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Eroare SMTP: Autentificarea a eșuat.';\n$PHPMAILER_LANG['connect_host']         = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Eroare SMTP: Datele nu au fost acceptate.';\n$PHPMAILER_LANG['empty_message']        = 'Mesajul este gol.';\n$PHPMAILER_LANG['encoding']             = 'Encodare necunoscută: ';\n$PHPMAILER_LANG['execute']              = 'Nu se poate executa următoarea comandă:  ';\n$PHPMAILER_LANG['file_access']          = 'Nu se poate accesa următorul fișier: ';\n$PHPMAILER_LANG['file_open']            = 'Eroare fișier: Nu se poate deschide următorul fișier: ';\n$PHPMAILER_LANG['from_failed']          = 'Următoarele adrese From au dat eroare: ';\n$PHPMAILER_LANG['instantiate']          = 'Funcția mail nu a putut fi inițializată.';\n$PHPMAILER_LANG['invalid_address']      = 'Adresa de email nu este validă: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';\n$PHPMAILER_LANG['provide_address']      = 'Trebuie să adăugați cel puțin o adresă de email.';\n$PHPMAILER_LANG['recipients_failed']    = 'Eroare SMTP: Următoarele adrese de email au eșuat: ';\n$PHPMAILER_LANG['signing']              = 'A aparut o problemă la semnarea emailului. ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Conectarea la serverul SMTP a eșuat.';\n$PHPMAILER_LANG['smtp_error']           = 'Eroare server SMTP: ';\n$PHPMAILER_LANG['variable_set']         = 'Nu se poate seta/reseta variabila. ';\n$PHPMAILER_LANG['extension_missing']    = 'Lipsește extensia: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-ru.php",
    "content": "<?php\n/**\n * Russian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Alexey Chumakov <alex@chumakov.ru>\n * @author Foster Snowhill <i18n@forstwoof.ru>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Ошибка SMTP: ошибка авторизации.';\n$PHPMAILER_LANG['connect_host']         = 'Ошибка SMTP: не удается подключиться к серверу SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Ошибка SMTP: данные не приняты.';\n$PHPMAILER_LANG['encoding']             = 'Неизвестный вид кодировки: ';\n$PHPMAILER_LANG['execute']              = 'Невозможно выполнить команду: ';\n$PHPMAILER_LANG['file_access']          = 'Нет доступа к файлу: ';\n$PHPMAILER_LANG['file_open']            = 'Файловая ошибка: не удается открыть файл: ';\n$PHPMAILER_LANG['from_failed']          = 'Неверный адрес отправителя: ';\n$PHPMAILER_LANG['instantiate']          = 'Невозможно запустить функцию mail.';\n$PHPMAILER_LANG['provide_address']      = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.';\n$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.';\n$PHPMAILER_LANG['recipients_failed']    = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: ';\n$PHPMAILER_LANG['empty_message']        = 'Пустое сообщение';\n$PHPMAILER_LANG['invalid_address']      = 'Не отослано, неправильный формат email адреса: ';\n$PHPMAILER_LANG['signing']              = 'Ошибка подписи: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Ошибка соединения с SMTP-сервером';\n$PHPMAILER_LANG['smtp_error']           = 'Ошибка SMTP-сервера: ';\n$PHPMAILER_LANG['variable_set']         = 'Невозможно установить или переустановить переменную: ';\n$PHPMAILER_LANG['extension_missing']    = 'Расширение отсутствует: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-se.php",
    "content": "<?php\n/**\n* PHPMailer language file: refer to English translation for definitive list\n* Swedish Version\n* Author: Johan Linnér <johan@linner.biz>\n*/\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP fel: Kunde inte autentisera.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP fel: Kunde inte ansluta till SMTP-server.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP fel: Data accepterades inte.';\n//$PHPMAILER_LANG['empty_message']        = 'Message body empty';\n$PHPMAILER_LANG['encoding']             = 'Okänt encode-format: ';\n$PHPMAILER_LANG['execute']              = 'Kunde inte köra: ';\n$PHPMAILER_LANG['file_access']          = 'Ingen åtkomst till fil: ';\n$PHPMAILER_LANG['file_open']            = 'Fil fel: Kunde inte öppna fil: ';\n$PHPMAILER_LANG['from_failed']          = 'Följande avsändaradress är felaktig: ';\n$PHPMAILER_LANG['instantiate']          = 'Kunde inte initiera e-postfunktion.';\n//$PHPMAILER_LANG['invalid_email']        = 'Not sending, email address is invalid: ';\n$PHPMAILER_LANG['provide_address']      = 'Du måste ange minst en mottagares e-postadress.';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP fel: Följande mottagare är felaktig: ';\n//$PHPMAILER_LANG['signing']              = 'Signing Error: ';\n//$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';\n//$PHPMAILER_LANG['smtp_error']           = 'SMTP server error: ';\n//$PHPMAILER_LANG['variable_set']         = 'Cannot set or reset variable: ';\n?>"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-sk.php",
    "content": "<?php\n/**\n * Slovak PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Michal Tinka <michaltinka@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP Error: Chyba autentifikácie.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP Error: Dáta neboli prijaté';\n$PHPMAILER_LANG['empty_message']        = 'Prázdne telo správy.';\n$PHPMAILER_LANG['encoding']             = 'Neznáme kódovanie: ';\n$PHPMAILER_LANG['execute']              = 'Nedá sa vykonať: ';\n$PHPMAILER_LANG['file_access']          = 'Súbor nebol nájdený: ';\n$PHPMAILER_LANG['file_open']            = 'File Error: Súbor sa otvoriť pre čítanie: ';\n$PHPMAILER_LANG['from_failed']          = 'Následujúca adresa From je nesprávna: ';\n$PHPMAILER_LANG['instantiate']          = 'Nedá sa vytvoriť inštancia emailovej funkcie.';\n$PHPMAILER_LANG['invalid_address']      = 'Neodoslané, emailová adresa je nesprávna: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.';\n$PHPMAILER_LANG['provide_address']      = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP Error: Adresy príjemcov niesu správne ';\n$PHPMAILER_LANG['signing']              = 'Chyba prihlasovania: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() zlyhalo.';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP chyba serveru: ';\n$PHPMAILER_LANG['variable_set']         = 'Nemožno nastaviť alebo resetovať premennú: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-sl.php",
    "content": "<?php\n/**\n * Slovene PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Klemen Tušar <techouse@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP napaka: Avtentikacija ni uspela.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP napaka: Ne morem vzpostaviti povezave s SMTP gostiteljem.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP napaka: Strežnik zavrača podatke.';\n$PHPMAILER_LANG['empty_message']        = 'E-poštno sporočilo nima vsebine.';\n$PHPMAILER_LANG['encoding']             = 'Nepoznan tip kodiranja: ';\n$PHPMAILER_LANG['execute']              = 'Operacija ni uspela: ';\n$PHPMAILER_LANG['file_access']          = 'Nimam dostopa do datoteke: ';\n$PHPMAILER_LANG['file_open']            = 'Ne morem odpreti datoteke: ';\n$PHPMAILER_LANG['from_failed']          = 'Neveljaven e-naslov pošiljatelja: ';\n$PHPMAILER_LANG['instantiate']          = 'Ne morem inicializirati mail funkcije.';\n$PHPMAILER_LANG['invalid_address']      = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.';\n$PHPMAILER_LANG['provide_address']      = 'Prosim vnesite vsaj enega naslovnika.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP napaka: Sledeči naslovniki so neveljavni: ';\n$PHPMAILER_LANG['signing']              = 'Napaka pri podpisovanju: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Ne morem vzpostaviti povezave s SMTP strežnikom.';\n$PHPMAILER_LANG['smtp_error']           = 'Napaka SMTP strežnika: ';\n$PHPMAILER_LANG['variable_set']         = 'Ne morem nastaviti oz. ponastaviti spremenljivke: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-sr.php",
    "content": "<?php\n/**\n * Serbian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Александар Јевремовић <ajevremovic@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP грешка: аутентификација није успела.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP грешка: није могуће повезивање са SMTP сервером.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP грешка: подаци нису прихваћени.';\n$PHPMAILER_LANG['empty_message']        = 'Садржај поруке је празан.';\n$PHPMAILER_LANG['encoding']             = 'Непознато кодовање: ';\n$PHPMAILER_LANG['execute']              = 'Није могуће извршити наредбу: ';\n$PHPMAILER_LANG['file_access']          = 'Није могуће приступити датотеци: ';\n$PHPMAILER_LANG['file_open']            = 'Није могуће отворити датотеку: ';\n$PHPMAILER_LANG['from_failed']          = 'SMTP грешка: слање са следећих адреса није успело: ';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP грешка: слање на следеће адресе није успело: ';\n$PHPMAILER_LANG['instantiate']          = 'Није могуће покренути mail функцију.';\n$PHPMAILER_LANG['invalid_address']      = 'Порука није послата због неисправне адресе: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' мејлер није подржан.';\n$PHPMAILER_LANG['provide_address']      = 'Потребно је задати најмање једну адресу.';\n$PHPMAILER_LANG['signing']              = 'Грешка приликом пријављивања: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Повезивање са SMTP сервером није успело.';\n$PHPMAILER_LANG['smtp_error']           = 'Грешка SMTP сервера: ';\n$PHPMAILER_LANG['variable_set']         = 'Није могуће задати променљиву, нити је вратити уназад: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-sv.php",
    "content": "<?php\n/**\n * Swedish PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Johan Linnér <johan@linner.biz>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP fel: Kunde inte autentisera.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP fel: Kunde inte ansluta till SMTP-server.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP fel: Data accepterades inte.';\n//$PHPMAILER_LANG['empty_message']        = 'Message body empty';\n$PHPMAILER_LANG['encoding']             = 'Okänt encode-format: ';\n$PHPMAILER_LANG['execute']              = 'Kunde inte köra: ';\n$PHPMAILER_LANG['file_access']          = 'Ingen åtkomst till fil: ';\n$PHPMAILER_LANG['file_open']            = 'Fil fel: Kunde inte öppna fil: ';\n$PHPMAILER_LANG['from_failed']          = 'Följande avsändaradress är felaktig: ';\n$PHPMAILER_LANG['instantiate']          = 'Kunde inte initiera e-postfunktion.';\n$PHPMAILER_LANG['invalid_address']      = 'Felaktig adress: ';\n$PHPMAILER_LANG['provide_address']      = 'Du måste ange minst en mottagares e-postadress.';\n$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP fel: Följande mottagare är felaktig: ';\n$PHPMAILER_LANG['signing']              = 'Signerings fel: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() misslyckades.';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP server fel: ';\n$PHPMAILER_LANG['variable_set']         = 'Kunde inte definiera eller återställa variabel: ';\n$PHPMAILER_LANG['extension_missing']    = 'Tillägg ej tillgängligt: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-tr.php",
    "content": "<?php\n/**\n * Turkish PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Elçin Özel\n * @author Can Yılmaz\n * @author Mehmet Benlioğlu\n * @author @yasinaydin\n * @author Ogün Karakuş\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP Hatası: Oturum açılamadı.';\n$PHPMAILER_LANG['connect_host']         = 'SMTP Hatası: SMTP sunucusuna bağlanılamadı.';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP Hatası: Veri kabul edilmedi.';\n$PHPMAILER_LANG['empty_message']        = 'Mesajın içeriği boş';\n$PHPMAILER_LANG['encoding']             = 'Bilinmeyen karakter kodlama: ';\n$PHPMAILER_LANG['execute']              = 'Çalıştırılamadı: ';\n$PHPMAILER_LANG['file_access']          = 'Dosyaya erişilemedi: ';\n$PHPMAILER_LANG['file_open']            = 'Dosya Hatası: Dosya açılamadı: ';\n$PHPMAILER_LANG['from_failed']          = 'Belirtilen adreslere gönderme başarısız: ';\n$PHPMAILER_LANG['instantiate']          = 'Örnek e-posta fonksiyonu oluşturulamadı.';\n$PHPMAILER_LANG['invalid_address']      = 'Geçersiz e-posta adresi: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' e-posta kütüphanesi desteklenmiyor.';\n$PHPMAILER_LANG['provide_address']      = 'En az bir alıcı e-posta adresi belirtmelisiniz.';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP Hatası: Belirtilen alıcılara ulaşılamadı: ';\n$PHPMAILER_LANG['signing']              = 'İmzalama hatası: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP connect() fonksiyonu başarısız.';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP sunucu hatası: ';\n$PHPMAILER_LANG['variable_set']         = 'Değişken ayarlanamadı ya da sıfırlanamadı: ';\n$PHPMAILER_LANG['extension_missing']    = 'Eklenti bulunamadı: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-uk.php",
    "content": "<?php\n/**\n * Ukrainian PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author Yuriy Rudyy <yrudyy@prs.net.ua>\n * @fixed by Boris Yurchenko <boris@yurchenko.pp.ua>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Помилка SMTP: помилка авторизації.';\n$PHPMAILER_LANG['connect_host']         = 'Помилка SMTP: не вдається під\\'єднатися до серверу SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Помилка SMTP: дані не прийняті.';\n$PHPMAILER_LANG['encoding']             = 'Невідомий тип кодування: ';\n$PHPMAILER_LANG['execute']              = 'Неможливо виконати команду: ';\n$PHPMAILER_LANG['file_access']          = 'Немає доступу до файлу: ';\n$PHPMAILER_LANG['file_open']            = 'Помилка файлової системи: не вдається відкрити файл: ';\n$PHPMAILER_LANG['from_failed']          = 'Невірна адреса відправника: ';\n$PHPMAILER_LANG['instantiate']          = 'Неможливо запустити функцію mail.';\n$PHPMAILER_LANG['provide_address']      = 'Будь-ласка, введіть хоча б одну адресу e-mail отримувача.';\n$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.';\n$PHPMAILER_LANG['recipients_failed']    = 'Помилка SMTP: відправлення наступним отримувачам не вдалося: ';\n$PHPMAILER_LANG['empty_message']        = 'Пусте тіло повідомлення';\n$PHPMAILER_LANG['invalid_address']      = 'Не відправлено, невірний формат адреси e-mail: ';\n$PHPMAILER_LANG['signing']              = 'Помилка підпису: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Помилка з\\'єднання із SMTP-сервером';\n$PHPMAILER_LANG['smtp_error']           = 'Помилка SMTP-сервера: ';\n$PHPMAILER_LANG['variable_set']         = 'Неможливо встановити або перевстановити змінну: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-vi.php",
    "content": "<?php\n/**\n * Vietnamese (Tiếng Việt) PHPMailer language file: refer to English translation for definitive list.\n * @package PHPMailer\n * @author VINADES.,JSC <contact@vinades.vn>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'Lỗi SMTP: Không thể xác thực.';\n$PHPMAILER_LANG['connect_host']         = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.';\n$PHPMAILER_LANG['data_not_accepted']    = 'Lỗi SMTP: Dữ liệu không được chấp nhận.';\n$PHPMAILER_LANG['empty_message']        = 'Không có nội dung';\n$PHPMAILER_LANG['encoding']             = 'Mã hóa không xác định: ';\n$PHPMAILER_LANG['execute']              = 'Không thực hiện được: ';\n$PHPMAILER_LANG['file_access']          = 'Không thể truy cập tệp tin ';\n$PHPMAILER_LANG['file_open']            = 'Lỗi Tập tin: Không thể mở tệp tin: ';\n$PHPMAILER_LANG['from_failed']          = 'Lỗi địa chỉ gửi đi: ';\n$PHPMAILER_LANG['instantiate']          = 'Không dùng được các hàm gửi thư.';\n$PHPMAILER_LANG['invalid_address']      = 'Đại chỉ emai không đúng: ';\n$PHPMAILER_LANG['mailer_not_supported'] = ' trình gửi thư không được hỗ trợ.';\n$PHPMAILER_LANG['provide_address']      = 'Bạn phải cung cấp ít nhất một địa chỉ người nhận.';\n$PHPMAILER_LANG['recipients_failed']    = 'Lỗi SMTP: lỗi địa chỉ người nhận: ';\n$PHPMAILER_LANG['signing']              = 'Lỗi đăng nhập: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'Lỗi kết nối với SMTP';\n$PHPMAILER_LANG['smtp_error']           = 'Lỗi máy chủ smtp ';\n$PHPMAILER_LANG['variable_set']         = 'Không thể thiết lập hoặc thiết lập lại biến: ';\n//$PHPMAILER_LANG['extension_missing']    = 'Extension missing: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-zh.php",
    "content": "<?php\n/**\n * Traditional Chinese PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author liqwei <liqwei@liqwei.com>\n * @author Peter Dave Hello <@PeterDaveHello/>\n * @author Jason Chiang <xcojad@gmail.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP 錯誤：登入失敗。';\n$PHPMAILER_LANG['connect_host']         = 'SMTP 錯誤：無法連線到 SMTP 主機。';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP 錯誤：無法接受的資料。';\n$PHPMAILER_LANG['empty_message']        = '郵件內容為空';\n$PHPMAILER_LANG['encoding']             = '未知編碼: ';\n$PHPMAILER_LANG['execute']              = '無法執行：';\n$PHPMAILER_LANG['file_access']          = '無法存取檔案：';\n$PHPMAILER_LANG['file_open']            = '檔案錯誤：無法開啟檔案：';\n$PHPMAILER_LANG['from_failed']          = '發送地址錯誤：';\n$PHPMAILER_LANG['instantiate']          = '未知函數呼叫。';\n$PHPMAILER_LANG['invalid_address']      = '因為電子郵件地址無效，無法傳送: ';\n$PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。';\n$PHPMAILER_LANG['provide_address']      = '必須提供至少一個收件人地址。';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP 錯誤：以下收件人地址錯誤：';\n$PHPMAILER_LANG['signing']              = '電子簽章錯誤: ';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP 連線失敗';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP 伺服器錯誤: ';\n$PHPMAILER_LANG['variable_set']         = '無法設定或重設變數: ';\n$PHPMAILER_LANG['extension_missing']    = '遺失模組 Extension: ';\n"
  },
  {
    "path": "lib/phpmailer/language/phpmailer.lang-zh_cn.php",
    "content": "<?php\n/**\n * Simplified Chinese PHPMailer language file: refer to English translation for definitive list\n * @package PHPMailer\n * @author liqwei <liqwei@liqwei.com>\n * @author young <masxy@foxmail.com>\n * @author Teddysun <i@teddysun.com>\n */\n\n$PHPMAILER_LANG['authenticate']         = 'SMTP 错误：登录失败。';\n$PHPMAILER_LANG['connect_host']         = 'SMTP 错误：无法连接到 SMTP 主机。';\n$PHPMAILER_LANG['data_not_accepted']    = 'SMTP 错误：数据不被接受。';\n$PHPMAILER_LANG['empty_message']        = '邮件正文为空。';\n$PHPMAILER_LANG['encoding']             = '未知编码：';\n$PHPMAILER_LANG['execute']              = '无法执行：';\n$PHPMAILER_LANG['file_access']          = '无法访问文件：';\n$PHPMAILER_LANG['file_open']            = '文件错误：无法打开文件：';\n$PHPMAILER_LANG['from_failed']          = '发送地址错误：';\n$PHPMAILER_LANG['instantiate']          = '未知函数调用。';\n$PHPMAILER_LANG['invalid_address']      = '发送失败，电子邮箱地址是无效的：';\n$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。';\n$PHPMAILER_LANG['provide_address']      = '必须提供至少一个收件人地址。';\n$PHPMAILER_LANG['recipients_failed']    = 'SMTP 错误：收件人地址错误：';\n$PHPMAILER_LANG['signing']              = '登录失败：';\n$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP服务器连接失败。';\n$PHPMAILER_LANG['smtp_error']           = 'SMTP服务器出错：';\n$PHPMAILER_LANG['variable_set']         = '无法设置或重置变量：';\n$PHPMAILER_LANG['extension_missing']    = '丢失模块 Extension：';\n"
  },
  {
    "path": "modules/.htaccess",
    "content": "Order deny,allow\nDeny from all\n"
  },
  {
    "path": "modules/account/cart.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->redirect($this->url('purchase', 'cart'));\n?>\n"
  },
  {
    "path": "modules/account/changemail.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('EmailChangeTitle');\n\n$emailChangeTable = Flux::config('FluxTables.ChangeEmailTable');\n\nif (count($_POST)) {\n\t$email = trim($params->get('email'));\n\t\n\tif (!$email) {\n\t\t$errorMessage = Flux::message('EnterEmailAddress');\n\t}\n\telseif ($email == $session->account->email) {\n\t\t$errorMessage = Flux::message('EmailCannotBeSame');\n\t}\n\telseif (!preg_match('/^(.+?)@(.+?)$/', $email)) {\n\t\t$errorMessage = Flux::message('EmailInvalid');\n\t}\n\telseif (!Flux::config('AllowDuplicateEmails')) {\n\t\t$sql = \"SELECT email FROM {$server->loginDatabase}.login WHERE email = ? LIMIT 1\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($email));\n\t\t\n\t\t$row = $sth->fetch();\n\t\tif ($row && $row->email) {\n\t\t\t$errorMessage = Flux::message('EmailAlreadyRegistered');\n\t\t}\n\t}\n\t\n\tif (empty($errorMessage)) {\n\t\t$code = md5(rand() + $session->account->account_id);\n\t\t$ip   = $_SERVER['REMOTE_ADDR'];\n\t\t$fail = false;\n\t\t\n\t\tif (Flux::config('RequireChangeConfirm')) {\n\t\t\t$sql  = \"INSERT INTO {$server->loginDatabase}.$emailChangeTable \";\n\t\t\t$sql .= \"(code, account_id, old_email, new_email, request_date, request_ip, change_done) \";\n\t\t\t$sql .= \"VALUES (?, ?, ?, ?, NOW(), ?, 0)\";\n\t\t\t$sth  = $server->connection->getStatement($sql);\n\t\t\t$res  = $sth->execute(array($code, $session->account->account_id, $session->account->email, $email, $ip));\n\t\t\t\n\t\t\tif ($res) {\n\t\t\t\trequire_once 'Flux/Mailer.php';\n\t\t\t\t$name = $session->loginAthenaGroup->serverName;\n\t\t\t\t$link = $this->url('account', 'confirmemail', array('_host' => true, 'code' => $code, 'account' => $session->account->account_id, 'login' => $name));\n\t\t\t\t$mail = new Flux_Mailer();\n\t\t\t\t$sent = $mail->send($email, 'Change E-mail', 'changemail', array(\n\t\t\t\t\t'AccountUsername' => $session->account->userid,\n\t\t\t\t\t'OldEmail'        => $session->account->email,\n\t\t\t\t\t'NewEmail'        => $email,\n\t\t\t\t\t'ChangeLink'      => htmlspecialchars($link)\n\t\t\t\t));\n\n\t\t\t\tif ($sent) {\n\t\t\t\t\t$session->setMessageData(Flux::message('EmailChangeSent'));\n\t\t\t\t\t$this->redirect();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$fail = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$fail = true;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\t$old  = $session->account->email;\n\t\t\t$sql  = \"UPDATE {$server->loginDatabase}.login SET email = ? WHERE account_id = ?\";\n\t\t\t$sth  = $server->connection->getStatement($sql);\n\t\t\t\n\t\t\tif ($sth->execute(array($email, $session->account->account_id))) {\n\t\t\t\t$sql  = \"INSERT INTO {$server->loginDatabase}.$emailChangeTable \";\n\t\t\t\t$sql .= \"(code, account_id, old_email, new_email, request_date, request_ip, change_date, change_ip, change_done) \";\n\t\t\t\t$sql .= \"VALUES (?, ?, ?, ?, NOW(), ?, NOW(), ?, 1)\";\n\t\t\t\t$sth  = $server->connection->getStatement($sql);\n\t\t\t\t$res  = $sth->execute(array($code, $session->account->account_id, $old, $email, $ip, $ip));\n\t\t\t\t\n\t\t\t\tif ($res) {\n\t\t\t\t\t$session->setMessageData(Flux::message('EmailAddressChanged'));\n\t\t\t\t\t$this->redirect();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$fail = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$fail = true;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (!empty($fail)) {\n\t\t$errorMessage = Flux::message('EmailChangeFailed');\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/account/changepass.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('PasswordChangeTitle');\n\nif (count($_POST)) {\n\t$currentPassword    = $params->get('currentpass');\n\t$newPassword        = $params->get('newpass');\n\t$confirmNewPassword = $params->get('confirmnewpass');\n\t$useGMPassSecurity  = $session->account->group_level < Flux::config('EnableGMPassSecurity');\n\t$passwordMinLength  = $useGMPassSecurity ? Flux::config('GMMinPasswordLength') : Flux::config('MinPasswordLength');\n\t$passwordMinUpper   = $useGMPassSecurity ? Flux::config('GMPasswordMinUpper') : Flux::config('PasswordMinUpper');\n\t$passwordMinLower   = $useGMPassSecurity ? Flux::config('GMPasswordMinLower') : Flux::config('PasswordMinLower');\n\t$passwordMinNumber  = $useGMPassSecurity ? Flux::config('GMPasswordMinNumber') : Flux::config('PasswordMinNumber');\n\t$passwordMinSymbol  = $useGMPassSecurity ? Flux::config('GMPasswordMinSymbol') : Flux::config('PasswordMinSymbol');\n\t\n\tif (!$currentPassword) {\n\t\t$errorMessage = Flux::message('NeedCurrentPassword');\n\t}\n\telseif (!$newPassword) {\n\t\t$errorMessage = Flux::message('NeedNewPassword');\n\t}\n\telseif (!Flux::config('AllowUserInPassword') && stripos($newPassword, $session->account->userid) !== false) {\n\t\t$errorMessage = Flux::message('NewPasswordHasUsername');\n\t}\n\telseif (!ctype_graph($newPassword)) {\n\t\t$errorMessage = Flux::message('NewPasswordInvalid');\n\t}\n\telseif (strlen($newPassword) < $passwordMinLength) {\n\t\t$errorMessage = sprintf(Flux::message('PasswordTooShort'), $passwordMinLength, Flux::config('MaxPasswordLength'));\n\t}\n\telseif (strlen($newPassword) > Flux::config('MaxPasswordLength')) {\n\t\t$errorMessage = sprintf(Flux::message('PasswordTooLong'), $passwordMinLength, Flux::config('MaxPasswordLength'));\n\t}\n\telseif (!$confirmNewPassword) {\n\t\t$errorMessage = Flux::message('ConfirmNewPassword');\n\t}\n\telseif ($newPassword != $confirmNewPassword) {\n\t\t$errorMessage = Flux::message('PasswordsDoNotMatch');\n\t}\n\telseif ($newPassword == $currentPassword) {\n\t\t$errorMessage = Flux::message('NewPasswordSameAsOld');\n\t}\n\telseif (Flux::config('PasswordMinUpper') > 0 && preg_match_all('/[A-Z]/', $newPassword, $matches) < $passwordMinUpper) {\n\t\t$errorMessage = sprintf(Flux::message('NewPasswordNeedUpper'), $passwordMinUpper);\n\t}\n\telseif (Flux::config('PasswordMinLower') > 0 && preg_match_all('/[a-z]/', $newPassword, $matches) < $passwordMinLower) {\n\t\t$errorMessage = sprintf(Flux::message('NewPasswordNeedLower'), $passwordMinLower);\n\t}\n\telseif (Flux::config('PasswordMinNumber') > 0 && preg_match_all('/[0-9]/', $newPassword, $matches) < $passwordMinNumber) {\n\t\t$errorMessage = sprintf(Flux::message('NewPasswordNeedNumber'), $passwordMinNumber);\n\t}\n\telseif (Flux::config('PasswordMinSymbol') > 0 && preg_match_all('/[^A-Za-z0-9]/', $newPassword, $matches) < $passwordMinSymbol) {\n\t\t$errorMessage = sprintf(Flux::message('NewPasswordNeedSymbol'), $passwordMinSymbol);\n\t}\n\telse {\n\t\t$sql = \"SELECT user_pass AS currentPassword FROM {$server->loginDatabase}.login WHERE account_id = ?\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($session->account->account_id));\n\t\t\n\t\t$account         = $sth->fetch();\n\t\t$useMD5          = $session->loginServer->config->getUseMD5();\n\t\t$currentPassword = $useMD5 ? Flux::hashPassword($currentPassword) : $currentPassword;\n\t\t$newPassword     = $useMD5 ? Flux::hashPassword($newPassword) : $newPassword;\n\t\t\n\t\tif ($currentPassword != $account->currentPassword) {\n\t\t\t$errorMessage = Flux::message('OldPasswordInvalid');\n\t\t}\n\t\telse {\n\t\t\t$sql = \"UPDATE {$server->loginDatabase}.login SET user_pass = ? WHERE account_id = ?\";\n\t\t\t$sth = $server->connection->getStatement($sql);\n\t\t\t\n\t\t\tif ($sth->execute(array($newPassword, $session->account->account_id))) {\n\t\t\t\t$pwChangeTable = Flux::config('FluxTables.ChangePasswordTable');\n\t\t\t\t\n\t\t\t\t$sql  = \"INSERT INTO {$server->loginDatabase}.$pwChangeTable \";\n\t\t\t\t$sql .= \"(account_id, old_password, new_password, change_ip, change_date) \";\n\t\t\t\t$sql .= \"VALUES (?, ?, ?, ?, NOW())\";\n\t\t\t\t$sth  = $server->connection->getStatement($sql);\n\t\t\t\t$sth->execute(array($session->account->account_id, $currentPassword, $newPassword, $_SERVER['REMOTE_ADDR']));\n\t\t\t\t\n\t\t\t\t$session->setMessageData(Flux::message('PasswordHasBeenChanged'));\n\t\t\t\t$session->logout();\n\t\t\t\t$this->redirect($this->url('account', 'login'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$errorMessage = Flux::message('FailedToChangePassword');\n\t\t\t}\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/account/changesex.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('GenderChangeTitle');\n\n$cost    = +(int)Flux::config('ChargeGenderChange');\n$badJobs = Flux::config('GenderLinkedJobClasses')->toArray();\n\nif ($cost && $session->account->balance < $cost && !$auth->allowedToAvoidSexChangeCost) {\n\t$hasNecessaryFunds = false;\n}\nelse {\n\t$hasNecessaryFunds = true;\n}\n\nif (count($_POST)) {\n\tif (!$hasNecessaryFunds || !$params->get('changegender')) {\n\t\t$this->deny();\n\t}\n\t\n\t$classes = array();\n\tforeach ($session->loginAthenaGroup->athenaServers as $athenaServer) {\n\t\t$sql = \"SELECT COUNT(1) AS num FROM {$athenaServer->charMapDatabase}.`char` WHERE account_id = ? AND `class` IN (\".implode(',', array_fill(0, count($badJobs), '?')).\")\";\n\t\t$sth = $athenaServer->connection->getStatement($sql);\n\t\t$sth->execute(array_merge(array($session->account->account_id), array_keys($badJobs)));\n\t\t\n\t\tif ($sth->fetch()->num) {\n\t\t\t$errorMessage = sprintf(Flux::message('GenderChangeBadChars'), implode(', ', array_values($badJobs)));\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tif (empty($errorMessage)) {\n\t\t$sex = $session->account->sex == 'M' ? 'F' : 'M';\n\t\t$sql = \"UPDATE {$server->loginDatabase}.login SET sex = ? WHERE account_id = ?\";\n\t\t$sth = $server->connection->getStatement($sql);\n\n\t\t$sth->execute(array($sex, $session->account->account_id));\n\n\t\t$changeTimes = (int)$session->loginServer->getPref($session->account->account_id, 'NumberOfGenderChanges');\n\t\t$session->loginServer->setPref($session->account->account_id, 'NumberOfGenderChanges', $changeTimes + 1);\n\n\t\tif ($cost && !$auth->allowedToAvoidSexChangeCost) {\n\t\t\t$session->loginServer->depositCredits($session->account->account_id, -$cost);\n\t\t\t$session->setMessageData(sprintf(Flux::message('GenderChanged'), $cost));\n\t\t}\n\t\telse {\n\t\t\t$session->setMessageData(Flux::message('GenderChangedForFree'));\n\t\t}\n\n\t\t$this->redirect($this->url('account', 'view'));\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/account/confirm.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('AccountConfirmTitle');\n\n$user  = $params->get('user');\n$code  = $params->get('code');\n$login = $params->get('login');\n\n$createTable = Flux::config('FluxTables.AccountCreateTable');\n\nif (!$login || !$user || !$code || strlen($code) !== 32) {\n\t$this->deny();\n}\n\n$loginAthenaGroup = Flux::getServerGroupByName($login);\nif (!$loginAthenaGroup) {\n\t$this->deny();\n}\n\n$sql  = \"SELECT account_id FROM {$loginAthenaGroup->loginDatabase}.$createTable WHERE \";\n$sql .= \"userid = ? AND confirm_code = ? AND confirmed = 0 AND confirm_expire > NOW() LIMIT 1\";\n$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\nif (!$sth->execute(array($user, $code)) || !($account=$sth->fetch())) {\n\t$this->deny();\n}\n\n$sql  = \"UPDATE {$loginAthenaGroup->loginDatabase}.$createTable SET \";\n$sql .= \"confirmed = 1, confirm_expire = NULL WHERE account_id = ?\";\n$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\n$sth->execute(array($account->account_id));\n\n$loginAthenaGroup->loginServer->unban(null, Flux::message('AccountConfirmUnban'), $account->account_id);\n\n$session->setMessageData(Flux::message('AccountConfirmMessage'));\n$this->redirect();\n?>\n"
  },
  {
    "path": "modules/account/confirmemail.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('EmailConfirmTitle');\n\n$account = $params->get('account');\n$code    = $params->get('code');\n$login   = $params->get('login');\n\n$emailChangeTable = Flux::config('FluxTables.ChangeEmailTable');\n\nif (!$login || !$account || !$code || strlen($code) !== 32) {\n\t$this->deny();\n}\n\nif ($session->loginAthenaGroup->serverName != $login) {\n\t$this->deny();\n}\n\nif ($session->account->account_id != $account) {\n\t$this->deny();\n}\n\n$sql = \"SELECT id, new_email AS email FROM {$server->loginDatabase}.$emailChangeTable WHERE code = ? AND account_id = ? AND change_done = 0 LIMIT 1\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute(array($code, $account));\n\n$row = $sth->fetch();\n\nif (!$row || !$row->id || !$row->email) {\n\t$this->deny();\n}\n\n$sql = \"UPDATE {$server->loginDatabase}.$emailChangeTable SET change_date = NOW(), change_ip = ?, change_done = 1 WHERE id = ?\";\n$sth = $server->connection->getStatement($sql);\n\nif (!$sth->execute(array($_SERVER['REMOTE_ADDR'], $row->id))) {\n\t$session->setMessageData(Flux::message('EmailConfirmFailed'));\n\t$this->redirect();\n}\nelse {\n\t$sql = \"UPDATE {$server->loginDatabase}.login SET email = ? WHERE account_id = ?\";\n\t$sth = $server->connection->getStatement($sql);\n\t\n\tif (!$sth->execute(array($row->email, $account))) {\n\t\t$session->setMessageData(Flux::message('EmailConfirmFailed'));\n\t\t$this->redirect();\n\t}\n\telse {\n\t\t$session->setMessageData(Flux::message('EmailConfirmChanged'));\n\t\t$this->redirect();\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/account/create.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\nif (Flux::config('UseCaptcha') && Flux::config('EnableReCaptcha')) {\n\t$recaptcha = Flux::config('ReCaptchaPublicKey');\n\t$theme = Flux::config('ReCaptchaTheme');\n}\n\n$title = Flux::message('AccountCreateTitle');\n\n$serverNames = $this->getServerNames();\n\nif (count($_POST)) {\n\trequire_once 'Flux/RegisterError.php';\n\t\n\ttry {\n\t\t$serverGroupName = $params->get('server');\n\t\t$username  = $params->get('username');\n\t\t$password  = $params->get('password');\n\t\t$confirm   = $params->get('confirm_password');\n\t\t$email     = trim($params->get('email_address'));\n\t\t$email2    = trim($params->get('email_address2'));\n\t\t$gender    = $params->get('gender');\n\t\t$birthdate = $params->get('birthdate_date');\n\t\t$code      = $params->get('security_code');\n\t\t\n\t\tif (!($server = Flux::getServerGroupByName($serverGroupName))) {\n\t\t\tthrow new Flux_RegisterError('Invalid server', Flux_RegisterError::INVALID_SERVER);\n\t\t}\n\t\t\n\t\t// Woohoo! Register ;)\n\t\t$result = $server->loginServer->register($username, $password, $confirm, $email, $email2, $gender, $birthdate, $code);\n\n\t\tif ($result) {\n\t\t\tif (Flux::config('RequireEmailConfirm')) {\n\t\t\t\trequire_once 'Flux/Mailer.php';\n\t\t\t\t\n\t\t\t\t$user = $username;\n\t\t\t\t$code = md5(rand());\n\t\t\t\t$name = $session->loginAthenaGroup->serverName;\n\t\t\t\t$link = $this->url('account', 'confirm', array('_host' => true, 'code' => $code, 'user' => $username, 'login' => $name));\n\t\t\t\t$mail = new Flux_Mailer();\n\t\t\t\t$sent = $mail->send($email, 'Account Confirmation', 'confirm', array('AccountUsername' => $username, 'ConfirmationLink' => htmlspecialchars($link)));\n\t\t\t\t\n\t\t\t\t$createTable = Flux::config('FluxTables.AccountCreateTable');\n\t\t\t\t$bind = array($code);\n\t\t\t\t\n\t\t\t\t// Insert confirmation code.\n\t\t\t\t$sql  = \"UPDATE {$server->loginDatabase}.{$createTable} SET \";\n\t\t\t\t$sql .= \"confirm_code = ?, confirmed = 0 \";\n\t\t\t\tif ($expire=Flux::config('EmailConfirmExpire')) {\n\t\t\t\t\t$sql .= \", confirm_expire = ? \";\n\t\t\t\t\t$bind[] = date('Y-m-d H:i:s', time() + (60 * 60 * $expire));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sql .= \" WHERE account_id = ?\";\n\t\t\t\t$bind[] = $result;\n\t\t\t\t\n\t\t\t\t$sth  = $server->connection->getStatement($sql);\n\t\t\t\t$sth->execute($bind);\n\t\t\t\t\n\t\t\t\t$session->loginServer->permanentlyBan(null, sprintf(Flux::message('AccountConfirmBan'), $code), $result);\n\t\t\t\t\n\t\t\t\tif ($sent) {\n\t\t\t\t\t$message  = Flux::message('AccountCreateEmailSent');\n\t\t\t\t\t$discordMessage = 'Confirmation email has been sent.';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$message  = Flux::message('AccountCreateFailed');\n\t\t\t\t\t$discordMessage = 'Failed to send the Confirmation email.';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$session->setMessageData($message);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$session->login($server->serverName, $username, $password, $code);\n\t\t\t\t$session->setMessageData(Flux::message('AccountCreated'));\n\t\t\t\t$discordMessage = 'Account Created.';\n\t\t\t}\n\t\t\tif(Flux::config('DiscordUseWebhook')) {\n\t\t\t\tif(Flux::config('DiscordSendOnRegister')) {\n\t\t\t\t\tsendtodiscord(Flux::config('DiscordWebhookURL'), 'New User registration: \"'. $username . '\" , ' . $discordMessage);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->redirect();\n\t\t}\n\t\telse {\n\t\t\texit('Uh oh, what happened?');\n\t\t}\n\t}\n\tcatch (Flux_RegisterError $e) {\n\t\tswitch ($e->getCode()) {\n\t\t\tcase Flux_RegisterError::USERNAME_ALREADY_TAKEN:\n\t\t\t\t$errorMessage = Flux::message('UsernameAlreadyTaken');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::USERNAME_TOO_SHORT:\n\t\t\t\t$errorMessage = Flux::message('UsernameTooShort');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::USERNAME_TOO_LONG:\n\t\t\t\t$errorMessage = Flux::message('UsernameTooLong');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::PASSWORD_HAS_USERNAME:\n\t\t\t\t$errorMessage = Flux::message ('PasswordHasUsername');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::PASSWORD_TOO_SHORT:\n\t\t\t\t$errorMessage = sprintf(Flux::message('PasswordTooShort'), Flux::config('MinPasswordLength'), Flux::config('MaxPasswordLength'));\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::PASSWORD_TOO_LONG:\n\t\t\t\t$errorMessage = sprintf(Flux::message('PasswordTooLong'), Flux::config('MinPasswordLength'), Flux::config('MaxPasswordLength'));\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::PASSWORD_MISMATCH:\n\t\t\t\t$errorMessage = Flux::message('PasswordsDoNotMatch');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::PASSWORD_NEED_UPPER:\n\t\t\t\t$errorMessage = sprintf(Flux::message ('PasswordNeedUpper'), Flux::config('PasswordMinUpper'));\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::PASSWORD_NEED_LOWER:\n\t\t\t\t$errorMessage = sprintf(Flux::message ('PasswordNeedLower'), Flux::config('PasswordMinLower'));\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::PASSWORD_NEED_NUMBER:\n\t\t\t\t$errorMessage = sprintf(Flux::message ('PasswordNeedNumber'), Flux::config('PasswordMinNumber'));\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::PASSWORD_NEED_SYMBOL:\n\t\t\t\t$errorMessage = sprintf(Flux::message ('PasswordNeedSymbol'), Flux::config('PasswordMinSymbol'));\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::EMAIL_ADDRESS_IN_USE:\n\t\t\t\t$errorMessage = Flux::message('EmailAddressInUse');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::INVALID_EMAIL_ADDRESS:\n\t\t\t\t$errorMessage = Flux::message('InvalidEmailAddress');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::INVALID_EMAIL_CONF:\n\t\t\t\t$errorMessage = Flux::message('InvalidEmailconf');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::INVALID_GENDER:\n\t\t\t\t$errorMessage = Flux::message('InvalidGender');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::INVALID_SERVER:\n\t\t\t\t$errorMessage = Flux::message('InvalidServer');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::INVALID_SECURITY_CODE:\n\t\t\t\t$errorMessage = Flux::message('InvalidSecurityCode');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::INVALID_USERNAME:\n\t\t\t\t$errorMessage = sprintf(Flux::message('AccountInvalidChars'), Flux::config('UsernameAllowedChars'));\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::INVALID_PASSWORD:\n\t\t\t\t$errorMessage = Flux::message ('InvalidPassword');\n\t\t\t\tbreak;\n\t\t\tcase Flux_RegisterError::INVALID_BIRTHDATE:\n\t\t\t\t$errorMessage = Flux::message('InvalidBirthdate');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errorMessage = Flux::message('CriticalRegisterError');\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/account/edit.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('AccountEditTitle');\n\n$accountID = $params->get('id');\n\n$creditsTable  = Flux::config('FluxTables.CreditsTable');\n$creditColumns = 'credits.balance, credits.last_donation_date, credits.last_donation_amount';\n\n$sql  = \"SELECT login.*, {$creditColumns} FROM {$server->loginDatabase}.login \";\n$sql .= \"LEFT OUTER JOIN {$creditsTable} AS credits ON login.account_id = credits.account_id \";\n$sql .= \"WHERE login.sex != 'S' AND login.group_id >= 0 AND login.account_id = ? LIMIT 1\";\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($accountID));\n\n// Account object.\n$account = $sth->fetch();\n$isMine  = false;\n\nif ($account) {\n\tif ($account->group_id > $session->account->group_id && !$auth->allowedToEditHigherPower) {\n\t\t$this->deny();\n\t}\n\t\n\t$isMine = $account->account_id == $session->account->account_id;\n\t\n\tif ($isMine) {\n\t\t$title = Flux::message('AccountEditTitle2');\n\t}\n\telse {\n\t\t$title = sprintf(Flux::message('AccountEditTitle3'), $account->userid);\n\t}\n\t\n\tif (count($_POST)) {\n\t\t$groups     = AccountLevel::getArray();\n\t\n\t\t$email      = trim($params->get('email'));\n\t\t$gender     = trim($params->get('gender'));\n\t\t$loginCount = (int)$params->get('logincount');\n\t\t$birthdate  = $params->get('birthdate_date');\n\t\t$lastLogin  = $params->get('lastlogin_date');\n\t\t$lastIP     = trim($params->get('last_ip'));\n\t\t$group_id   = (int)$params->get('group_id');\n\t\t$balance    = (int)$params->get('balance');\n\t\t\n\t\tif ($isMine && $account->group_id != $group_id) {\n\t\t\t$errorMessage = Flux::message('CannotModifyOwnGroupID');\n\t\t}\n\t\telseif ($account->group_id != $group_id && !$auth->allowedToEditAccountGroupID) {\n\t\t\t$errorMessage = Flux::message('CannotModifyAnyGroupID');\n\t\t}\n\t\telseif ($group_id > $session->account->group_id) {\n\t\t\t$errorMessage = Flux::message('CannotModifyGroupIDHigh');\n\t\t}\n\t\telseif (!isset($groups[$group_id])) {\n\t\t\t$errorMessage = Flux::message('InvalidGroupID');\n\t\t}\n\t\telseif (!in_array($gender, array('M', 'F'))) {\n\t\t\t$errorMessage = Flux::message('InvalidGender');\n\t\t}\n\t\telseif ($account->balance != $balance && !$auth->allowedToEditAccountBalance) {\n\t\t\t$errorMessage = Flux::message('CannotModifyBalance');\n\t\t}\n\t\telseif ($birthdate && !preg_match('/^\\d{4}-\\d{2}-\\d{2}$/', $birthdate)) {\n\t\t\t$errorMessage = Flux::message('InvalidBirthdate');\n\t\t}\n\t\telseif ($lastLogin && !preg_match('/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$/', $lastLogin)) {\n\t\t\t$errorMessage = Flux::message('InvalidLastLoginDate');\n\t\t}\n\t\telse {\n\t\t\t$bind = array(\n\t\t\t\t'email'      => $email,\n\t\t\t\t'sex'        => $gender,\n\t\t\t\t'logincount' => $loginCount,\n\t\t\t\t'birthdate'  => $birthdate ? $birthdate : $account->birthdate,\n\t\t\t\t'lastlogin'  => $lastLogin ? $lastLogin : $account->lastlogin,\n\t\t\t\t'last_ip'    => $lastIP,\n\t\t\t);\n\t\t\t\n\t\t\t$sql  = \"UPDATE {$server->loginDatabase}.login SET email = :email, \";\n\t\t\t$sql .= \"sex = :sex, logincount = :logincount, birthdate = :birthdate, lastlogin = :lastlogin, last_ip = :last_ip\";\n\t\t\t\n\t\t\tif ($auth->allowedToEditAccountGroupID) {\n\t\t\t\t$sql .= \", group_id = :group_id\";\n\t\t\t\t$bind['group_id'] = $group_id;\n\t\t\t}\n\t\t\t\n\t\t\t$bind['account_id'] = $account->account_id;\n\t\t\t\n\t\t\t$sql .= \" WHERE account_id = :account_id\";\n\t\t\t$sth  = $server->connection->getStatement($sql);\n\t\t\t$sth->execute($bind);\n\n\t\t\tif ($auth->allowedToEditAccountBalance) {\n\t\t\t\t$deposit = $balance - $account->balance;\n\t\t\t\t$session->loginServer->depositCredits($account->account_id, $deposit);\n\t\t\t}\n\t\t\t\n\t\t\t$session->setMessageData(Flux::message('AccountModified'));\n\t\t\t$this->redirect($this->url('account', 'view', array('id' => $account->account_id)));\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/account/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'List Accounts';\n\nif (Flux::config('AutoRemoveTempBans')) {\n\t$sql = \"UPDATE {$server->loginDatabase}.login SET unban_time = 0 WHERE unban_time <= UNIX_TIMESTAMP()\";\n\t$sth = $server->connection->getStatement($sql);\n\t$sth->execute();\n}\n\n$useMD5         = $server->loginServer->config->get('UseMD5');\n$searchMD5      = Flux::config('AllowMD5PasswordSearch') && Flux::config('ReallyAllowMD5PasswordSearch') && $auth->allowedToSearchMD5Passwords;\n$searchPassword = (($useMD5 && $searchMD5) || !$useMD5) && $auth->allowedToSeeAccountPassword;\n$showPassword   = !$useMD5 && $auth->allowedToSeeAccountPassword;\n$bind           = array();\n$creditsTable   = Flux::config('FluxTables.CreditsTable');\n$creditColumns  = 'credits.balance, credits.last_donation_date, credits.last_donation_amount';\n$accountTable   = Flux::config('FluxTables.AccountCreateTable');\n$accountColumns = 'createlog.reg_date';\n$createTable    = Flux::config('FluxTables.AccountCreateTable');\n$createColumns  = 'created.confirmed, created.confirm_code, created.reg_date';\n$sqlpartial     = \"LEFT OUTER JOIN {$server->loginDatabase}.{$creditsTable} AS credits ON login.account_id = credits.account_id \";\n$sqlpartial    .= \"LEFT OUTER JOIN {$server->loginDatabase}.{$accountTable} AS createlog ON login.account_id = createlog.account_id \";\n$sqlpartial    .= \"LEFT OUTER JOIN {$server->loginDatabase}.{$createTable} AS created ON login.account_id = created.account_id \";\n$sqlpartial    .= \"WHERE login.sex != 'S' AND login.group_id >= 0 \";\n\n$accountID = $params->get('account_id');\nif ($accountID) {\n\t$sqlpartial .= \"AND login.account_id = ?\";\n\t$bind[]      = $accountID;\n}\nelse {\n\t$opMapping        = array('eq' => '=', 'gt' => '>', 'lt' => '<');\n\t$opValues         = array_keys($opMapping);\n\t$username         = $params->get('username');\n\t$password         = $params->get('password');\n\t$email            = $params->get('email');\n\t$lastIP           = $params->get('last_ip');\n\t$gender           = $params->get('gender');\n\t$accountState     = $params->get('account_state');\n\t$accountGroupIdOp = $params->get('account_group_id_op');\n\t$accountGroupID   = $params->get('account_group_id');\n\t$balanceOp        = $params->get('balance_op');\n\t$balance          = $params->get('balance');\n\t$loginCountOp     = $params->get('logincount_op');\n\t$loginCount       = $params->get('logincount');\n\t$birthdateA       = $params->get('birthdate_after_date');\n\t$birthdateB       = $params->get('birthdate_before_date');\n\t$lastLoginDateA   = $params->get('last_login_after_date');\n\t$lastLoginDateB   = $params->get('last_login_before_date');\n\t\n\tif ($username) {\n\t\t$sqlpartial .= \"AND (login.userid LIKE ? OR login.userid = ?) \";\n\t\t$bind[]      = \"%$username%\";\n\t\t$bind[]      = $username;\n\t}\n\t\n\tif ($searchPassword && $password) {\n\t\tif ($useMD5) {\n\t\t\t$sqlpartial .= \"AND login.user_pass = MD5(?) \";\n\t\t\t$bind[]      = $password;\n\t\t}\n\t\telse {\n\t\t\t$sqlpartial .= \"AND (login.user_pass LIKE ? OR login.user_pass = ?) \";\n\t\t\t$bind[]      = \"%$password%\";\n\t\t\t$bind[]      = $password;\n\t\t}\n\t}\n\t\n\tif ($email) {\n\t\t$sqlpartial .= \"AND (login.email LIKE ? OR login.email = ?) \";\n\t\t$bind[]      = \"%$email%\";\n\t\t$bind[]      = $email;\n\t}\n\t\n\tif ($lastIP) {\n\t\t$sqlpartial .= \"AND (login.last_ip LIKE ? OR login.last_ip = ?) \";\n\t\t$bind[]      = \"%$lastIP%\";\n\t\t$bind[]      = $lastIP;\n\t}\n\t\n\tif (in_array($gender, array('M', 'F'))) {\n\t\t$sqlpartial .= \"AND login.sex = ? \";\n\t\t$bind[]      = $gender;\n\t}\n\t\n\tif ($accountState) {\n\t\tif ($accountState == 'normal') {\n\t\t\t$sqlpartial .= 'AND (login.state = 0 AND login.unban_time = 0 AND (created.confirmed = 1 OR created.confirmed IS NULL)) ';\n\t\t}\n\t\telseif ($accountState == 'pending') {\n\t\t\t$sqlpartial .= 'AND (created.confirmed = 0 AND created.confirm_code IS NOT NULL) ';\n\t\t}\n\t\telseif ($accountState == 'permabanned') {\n\t\t\t$sqlpartial .= 'AND (login.state = 5 AND login.unban_time = 0 AND (created.confirmed = 1 OR created.confirm_code IS NULL)) ';\n\t\t}\n\t\telseif ($accountState == 'banned') {\n\t\t\t$sqlpartial .= 'AND login.unban_time > 0 ';\n\t\t}\n\t}\n\t\n\tif (in_array($accountGroupIdOp, $opValues) && trim($accountGroupID) != '') {\n\t\t$op          = $opMapping[$accountGroupIdOp];\n\t\t$sqlpartial .= \"AND login.group_id $op ? \";\n\t\t$bind[]      = $accountGroupID;\n\t}\n\t\n\tif (in_array($balanceOp, $opValues) && trim($balance) != '') {\n\t\t$op  = $opMapping[$balanceOp];\n\t\tif ($op == '=' && $balance === '0') {\n\t\t\t$sqlpartial .= \"AND (credits.balance IS NULL OR credits.balance = 0) \";\n\t\t}\n\t\telse {\n\t\t\t$sqlpartial .= \"AND credits.balance $op ? \";\n\t\t\t$bind[]      = $balance;\n\t\t}\n\t}\n\t\n\tif (in_array($loginCountOp, $opValues) && trim($loginCount) != '') {\n\t\t$op          = $opMapping[$loginCountOp];\n\t\t$sqlpartial .= \"AND login.logincount $op ? \";\n\t\t$bind[]      = $loginCount;\n\t}\n\t\n\tif ($birthdateB && ($timestamp = strtotime($birthdateB))) {\n\t\t$sqlpartial .= 'AND login.birthdate <= ? ';\n\t\t$bind[]      = date('Y-m-d', $timestamp);\n\t}\n\t\n\tif ($birthdateA && ($timestamp = strtotime($birthdateA))) {\n\t\t$sqlpartial .= 'AND login.birthdate >= ? ';\n\t\t$bind[]      = date('Y-m-d', $timestamp);\n\t}\n\n\tif ($lastLoginDateB && ($timestamp = strtotime($lastLoginDateB))) {\n\t\t$sqlpartial .= 'AND login.lastlogin <= ? ';\n\t\t$bind[]      = date('Y-m-d', $timestamp);\n\t}\n\t\n\tif ($lastLoginDateA && ($timestamp = strtotime($lastLoginDateA))) {\n\t\t$sqlpartial .= 'AND login.lastlogin >= ? ';\n\t\t$bind[]      = date('Y-m-d', $timestamp);\n\t}\n}\n\n$sql  = \"SELECT COUNT(login.account_id) AS total FROM {$server->loginDatabase}.login $sqlpartial\";\n$sth  = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'login.account_id' => 'asc', 'login.userid', 'login.user_pass',\n\t'login.sex', 'group_id', 'state', 'balance',\n\t'login.email', 'logincount', 'lastlogin', 'last_ip',\n\t'reg_date'\n));\n\n$sql  = $paginator->getSQL(\"SELECT login.*, {$creditColumns}, {$accountColumns}, {$createColumns} FROM {$server->loginDatabase}.login $sqlpartial\");\n$sth  = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$accounts   = $sth->fetchAll();\n\n$authorized = $auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount;\n\nif ($accounts && count($accounts) === 1 && $authorized && Flux::config('SingleMatchRedirect')) {\n\t$this->redirect($this->url('account', 'view', array('id' => $accounts[0]->account_id)));\n}\n?>\n"
  },
  {
    "path": "modules/account/login.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\nif (Flux::config('UseLoginCaptcha') && Flux::config('EnableReCaptcha')) {\n\t$recaptcha = Flux::config('ReCaptchaPublicKey');\n\t$theme = Flux::config('ReCaptchaTheme');\n}\n\n$title = Flux::message('LoginTitle');\n$loginLogTable = Flux::config('FluxTables.LoginLogTable');\n\nif (count($_POST)) {\n\t$serverGroupName = $params->get('server');\n\t$username = $params->get('username');\n\t$password = $params->get('password');\n\t$code     = $params->get('security_code');\n\t\n\ttry {\n\t\t$session->login($serverGroupName, $username, $password, $code);\n\t\t$returnURL = $params->get('return_url');\n\t\t\n\t\tif ($session->loginAthenaGroup->loginServer->config->getUseMD5()) {\n\t\t\t$password = Flux::hashPassword($password);\n\t\t}\n\t\t\n\t\t$sql  = \"INSERT INTO {$session->loginAthenaGroup->loginDatabase}.$loginLogTable \";\n\t\t$sql .= \"(account_id, username, password, ip, error_code, login_date) \";\n\t\t$sql .= \"VALUES (?, ?, ?, ?, ?, NOW())\";\n\t\t$sth  = $session->loginAthenaGroup->connection->getStatement($sql);\n\t\t$sth->execute(array($session->account->account_id, $username, $password, $_SERVER['REMOTE_ADDR'], null));\n\t\t\n\t\tif ($returnURL) {\n\t\t\t$this->redirect($returnURL);\n\t\t}\n\t\telse {\n\t\t\t$this->redirect();\n\t\t}\n\t}\n\tcatch (Flux_LoginError $e) {\n\t\tif ($username && $password && $e->getCode() != Flux_LoginError::INVALID_SERVER) {\n\t\t\t$loginAthenaGroup = Flux::getServerGroupByName($serverGroupName);\n\n\t\t\t$sql = \"SELECT account_id FROM {$loginAthenaGroup->loginDatabase}.login WHERE \";\n\t\t\t\n\t\t\tif (!$loginAthenaGroup->loginServer->config->getNoCase()) {\n\t\t\t\t$sql .= \"CAST(userid AS BINARY) \";\n\t\t\t} else {\n\t\t\t\t$sql .= \"userid \";\n\t\t\t}\n\t\t\t\n\t\t\t$sql .= \"= ? LIMIT 1\";\n\t\t\t$sth = $loginAthenaGroup->connection->getStatement($sql);\n\t\t\t$sth->execute(array($username));\n\t\t\t$row = $sth->fetch();\n\n\t\t\tif ($row) {\n\t\t\t\t$accountID = $row->account_id;\n\t\t\t\t\n\t\t\t\tif ($loginAthenaGroup->loginServer->config->getUseMD5()) {\n\t\t\t\t\t$password = Flux::hashPassword($password);\n\t\t\t\t}\n\n\t\t\t\t$sql  = \"INSERT INTO {$loginAthenaGroup->loginDatabase}.$loginLogTable \";\n\t\t\t\t$sql .= \"(account_id, username, password, ip, error_code, login_date) \";\n\t\t\t\t$sql .= \"VALUES (?, ?, ?, ?, ?, NOW())\";\n\t\t\t\t$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\t\t\t\t$sth->execute(array($accountID, $username, $password, $_SERVER['REMOTE_ADDR'], $e->getCode()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tswitch ($e->getCode()) {\n\t\t\tcase Flux_LoginError::UNEXPECTED:\n\t\t\t\t$errorMessage = Flux::message('UnexpectedLoginError');\n\t\t\t\tbreak;\n\t\t\tcase Flux_LoginError::INVALID_SERVER:\n\t\t\t\t$errorMessage = Flux::message('InvalidLoginServer');\n\t\t\t\tbreak;\n\t\t\tcase Flux_LoginError::INVALID_LOGIN:\n\t\t\t\t$errorMessage = Flux::message('InvalidLoginCredentials');\n\t\t\t\tbreak;\n\t\t\tcase Flux_LoginError::BANNED:\n\t\t\t\t$errorMessage = Flux::message('TemporarilyBanned');\n\t\t\t\tbreak;\n\t\t\tcase Flux_LoginError::PERMABANNED:\n\t\t\t\t$errorMessage = Flux::message('PermanentlyBanned');\n\t\t\t\tbreak;\n\t\t\tcase Flux_LoginError::IPBANNED:\n\t\t\t\t$errorMessage = Flux::message('IpBanned');\n\t\t\t\tbreak;\n\t\t\tcase Flux_LoginError::INVALID_SECURITY_CODE:\n\t\t\t\t$errorMessage = Flux::message('InvalidSecurityCode');\n\t\t\t\tbreak;\n\t\t\tcase Flux_LoginError::PENDING_CONFIRMATION:\n\t\t\t\t$errorMessage = Flux::message('PendingConfirmation');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errorMessage = Flux::message('CriticalLoginError');\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\n$serverNames = $this->getServerNames();\n?>\n"
  },
  {
    "path": "modules/account/logout.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('LogoutTitle');\n\n$session->logout();\n$metaRefresh = array('seconds' => 2, 'location' => $this->basePath);\n?>\n"
  },
  {
    "path": "modules/account/pagemenu/view.php",
    "content": "<?php\n// Module variables are available in page menus.\n// However, access group_id checking must be done directly from the page menu.\n// Minimal access checking such as $auth->actionAllowed('moduleName', 'actionName') should be performed.\n$groups  = AccountLevel::getArray();\n\n$pageMenu = array();\nif ((AccountLevel::getGroupLevel($account->group_id) <= $session->account->group_level || $auth->allowedToEditHigherPower) && $auth->actionAllowed('account', 'edit')) {\n\t$pageMenu[Flux::message('ModifyAccountLink')] = $this->url('account', 'edit', array('id' => $account->account_id));\n}\nreturn $pageMenu;\n?>\n"
  },
  {
    "path": "modules/account/prune.php",
    "content": "<?php \nif (!defined('FLUX_ROOT')) exit;\n\n\nif (!($password=$params->get('password')) || $password !== Flux::config('InstallerPassword')) {\n\t$this->deny();\n}\nelse {\n\tFlux::pruneUnconfirmedAccounts();\n\texit('DONE');\n}\n?>\n"
  },
  {
    "path": "modules/account/resend.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('ResendTitle');\n\n$serverNames = $this->getServerNames();\n$createTable = Flux::config('FluxTables.AccountCreateTable');\n\nif (count($_POST)) {\n\t$userid    = $params->get('userid');\n\t$email     = $params->get('email');\n\t$groupName = $params->get('login');\n\t\n\tif (!$userid) {\n\t\t$errorMessage = Flux::message('ResendEnterUsername');\n\t}\n\telseif (!$email) {\n\t\t$errorMessage = Flux::message('ResendEnterEmail');\n\t}\n\telseif (preg_match('/[^' . Flux::config('UsernameAllowedChars') . ']/', $userid)) {\n\t\t$errorMessage = sprintf(Flux::message('AccountInvalidChars'), Flux::config('UsernameAllowedChars'));\n\t}\n\telseif (!preg_match('/^(.+?)@(.+?)$/', $email)) {\n\t\t$errorMessage = Flux::message('InvalidEmailAddress');\n\t}\n\telse {\n\t\tif (!$groupName || !($loginAthenaGroup=Flux::getServerGroupByName($groupName))) {\n\t\t\t$loginAthenaGroup = $session->loginAthenaGroup;\n\t\t}\n\n\t\t$sql  = \"SELECT confirm_code FROM {$loginAthenaGroup->loginDatabase}.$createTable WHERE \";\n\t\t$sql .= \"userid = ? AND email = ? AND confirmed = 0 AND confirm_expire > NOW() LIMIT 1\";\n\t\t$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\t\t$sth->execute(array($userid, $email));\n\n\t\t$row  = $sth->fetch();\n\t\tif ($row) {\n\t\t\trequire_once 'Flux/Mailer.php';\n\t\t\t$code = $row->confirm_code;\n\t\t\t$name = $loginAthenaGroup->serverName;\n\t\t\t$link = $this->url('account', 'confirm', array('_host' => true, 'code' => $code, 'user' => $userid, 'login' => $name));\n\t\t\t$mail = new Flux_Mailer();\n\t\t\t$sent = $mail->send($email, 'Account Confirmation', 'confirm', array('AccountUsername' => $userid, 'ConfirmationLink' => htmlspecialchars($link)));\n\t\t}\n\n\t\tif (empty($sent)) {\n\t\t\t$errorMessage = Flux::message('ResendFailed');\n\t\t}\n\t\telse {\n\t\t\t$session->setMessageData(Flux::message('ResendEmailSent'));\n\t\t\t$this->redirect();\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/account/resetpass.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('ResetPassTitle');\n\n$serverNames    = $this->getServerNames();\n$resetPassTable = Flux::config('FluxTables.ResetPasswordTable');\n\nif (count($_POST)) {\n\t$userid    = $params->get('userid');\n\t$email     = $params->get('email');\n\t$groupName = $params->get('login');\n\t\n\tif (!$userid) {\n\t\t$errorMessage = Flux::message('ResetPassEnterAccount');\n\t}\n\telseif (!$email) {\n\t\t$errorMessage = Flux::message('ResetPassEnterEmail');\n\t}\n\telseif (preg_match('/[^' . Flux::config('UsernameAllowedChars') . ']/', $userid)) {\n\t\t$errorMessage = sprintf(Flux::message('AccountInvalidChars'), Flux::config('UsernameAllowedChars'));\n\t}\n\telseif (!preg_match('/^(.+?)@(.+?)$/', $email)) {\n\t\t$errorMessage = Flux::message('InvalidEmailAddress');\n\t}\n\telse {\n\t\tif (!$groupName || !($loginAthenaGroup=Flux::getServerGroupByName($groupName))) {\n\t\t\t$loginAthenaGroup = $session->loginAthenaGroup;\n\t\t}\n\n\t\t$sql  = \"SELECT account_id, user_pass, group_id FROM {$loginAthenaGroup->loginDatabase}.login WHERE \";\n\t\tif ($loginAthenaGroup->loginServer->config->getNoCase()) {\n\t\t\t$sql .= 'LOWER(userid) = LOWER(?) ';\n\t\t}\n\t\telse {\n\t\t\t$sql .= 'BINARY userid = ? ';\n\t\t}\n\t\t$sql .= \"AND email = ? AND state = 0 AND sex IN ('M', 'F') LIMIT 1\";\n\t\t$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\t\t$sth->execute(array($userid, $email));\n\n\t\t$row = $sth->fetch();\n\t\tif ($row) {\n\t\t\t$groups = AccountLevel::getArray();\n\t\t\tif (AccountLevel::getGroupLevel($row->group_id) >= Flux::config('NoResetPassGroupLevel')) {\n\t\t\t\t$errorMessage = Flux::message('ResetPassDisallowed');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$code = md5(rand() + $row->account_id);\n\t\t\t\t$sql  = \"INSERT INTO {$loginAthenaGroup->loginDatabase}.$resetPassTable \";\n\t\t\t\t$sql .= \"(code, account_id, old_password, request_date, request_ip, reset_done) \";\n\t\t\t\t$sql .= \"VALUES (?, ?, ?, NOW(), ?, 0)\";\n\t\t\t\t$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\t\t\t\t$res  = $sth->execute(array($code, $row->account_id, $row->user_pass, $_SERVER['REMOTE_ADDR']));\n\t\t\t\t\n\t\t\t\tif ($res) {\n\t\t\t\t\trequire_once 'Flux/Mailer.php';\n\t\t\t\t\t$name = $loginAthenaGroup->serverName;\n\t\t\t\t\t$link = $this->url('account', 'resetpw', array('_host' => true, 'code' => $code, 'account' => $row->account_id, 'login' => $name));\n\t\t\t\t\t$mail = new Flux_Mailer();\n\t\t\t\t\t$sent = $mail->send($email, 'Reset Password', 'resetpass', array('AccountUsername' => $userid, 'ResetLink' => htmlspecialchars($link)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (empty($errorMessage)) {\n\t\t\tif (empty($sent)) {\n\t\t\t\t$errorMessage = Flux::message('ResetPassFailed');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$session->setMessageData(Flux::message('ResetPassEmailSent'));\n\t\t\t\t$this->redirect();\n\t\t\t}\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/account/resetpw.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('ResetPassButton');\n\n$account = $params->get('account');\n$code    = $params->get('code');\n$login   = $params->get('login');\n\n$resetPassTable = Flux::config('FluxTables.ResetPasswordTable');\n\nif (!$login || !$account || !$code || strlen($code) !== 32) {\n\t$this->deny();\n}\n\n$loginAthenaGroup = Flux::getServerGroupByName($login);\nif (!$loginAthenaGroup) {\n\t$this->deny();\n}\n\n$sql = \"SELECT userid, email FROM {$loginAthenaGroup->loginDatabase}.login WHERE account_id = ? LIMIT 1\";\n$sth = $loginAthenaGroup->connection->getStatement($sql);\n$sth->execute(array($account));\n$acc = $sth->fetch();\n\nif (!$acc) {\n\t$this->deny();\n}\n\n$sql  = \"SELECT id FROM {$loginAthenaGroup->loginDatabase}.$resetPassTable WHERE \";\n$sql .= \"account_id = ? AND code = ? AND reset_done = 0 LIMIT 1\";\n$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\nif (!$sth->execute(array($account, $code)) || !($reset=$sth->fetch())) {\n\t$this->deny();\n}\n\n$sql  = \"UPDATE {$loginAthenaGroup->loginDatabase}.$resetPassTable SET \";\n$sql .= \"reset_done = 1, reset_date = NOW(), reset_ip = ?, new_password = ? WHERE id = ?\";\n$sth  = $loginAthenaGroup->connection->getStatement($sql);\n\n$newPassword = '';\n$characters  = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n$characters  = str_split($characters, 1);\n$passLength  = intval(($len=Flux::config('RandomPasswordLength')) < 8 ? 8 : $len);\n\nfor ($i = 0; $i < $passLength; ++$i) {\n\t$newPassword .= $characters[array_rand($characters)];\n}\n\n$unhashedNewPassword = $newPassword;\nif ($loginAthenaGroup->loginServer->config->getUseMD5()) {\n\t$newPassword = Flux::hashPassword($newPassword);\n}\n\nif (!$sth->execute(array($_SERVER['REMOTE_ADDR'], $newPassword, $reset->id))) {\n\t$session->setMessageData(Flux::message('ResetPwFailed'));\n\t$this->redirect();\t\n}\n\n$sql = \"UPDATE {$loginAthenaGroup->loginDatabase}.login SET user_pass = ? WHERE account_id = ?\";\n$sth = $loginAthenaGroup->connection->getStatement($sql);\n\nif (!$sth->execute(array($newPassword, $account))) {\n\t$session->setMessageData(Flux::message('ResetPwFailed'));\n\t$this->redirect();\n}\n\nrequire_once 'Flux/Mailer.php';\n$mail = new Flux_Mailer();\n$sent = $mail->send($acc->email, 'Password Has Been Reset', 'newpass', array('AccountUsername' => $acc->userid, 'NewPassword' => $unhashedNewPassword));\n\nif ($sent) {\n\t$message = Flux::message('ResetPwDone');\n}\nelse {\n\t$message = Flux::message('ResetPwDone2');\n}\n\n$session->setMessageData($message);\n$this->redirect();\n?>\n"
  },
  {
    "path": "modules/account/transfer.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('TransferTitle');\n\nif (count($_POST)) {\n\tif ($session->account->balance) {\n\t\t$credits  = (int)$params->get('credits'); \n\t\t$charName = trim($params->get('char_name'));\n\t\t\n\t\tif (!$credits || $credits < 1) {\n\t\t\t$errorMessage = Flux::message('TransferGreaterThanOne');\n\t\t}\n\t\telseif (!$charName) {\n\t\t\t$errorMessage = Flux::message('TransferEnterCharName');\n\t\t}\n\t\telse {\n\t\t\t$res = $server->transferCredits($session->account->account_id, $charName, $credits);\n\t\t\t\n\t\t\tif ($res === -3) {\n\t\t\t\t$errorMessage = sprintf(Flux::message('TransferNoCharExists'), $charName);\n\t\t\t}\n\t\t\telseif ($res === -2) {\n\t\t\t\t$errorMessage = Flux::message('TransferNoBalance');\n\t\t\t}\n\t\t\telseif ($res !== true) {\n\t\t\t\t$errorMessage = Flux::message('TransferUnexpectedError');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$session->setMessageData(Flux::message('TransferSuccessful'));\n\t\t\t\t$this->redirect();\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\t$this->deny();\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/account/view.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('AccountViewTitle');\n\nrequire_once 'Flux/TemporaryTable.php';\n\nif($server->isRenewal) {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n} else {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n}\n$tableName = \"{$server->charMapDatabase}.items\";\n$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n\n$creditsTable  = Flux::config('FluxTables.CreditsTable');\n$creditColumns = 'credits.balance, credits.last_donation_date, credits.last_donation_amount';\n$createTable   = Flux::config('FluxTables.AccountCreateTable');\n$createColumns = 'created.confirmed, created.confirm_code, created.reg_date';\n$isMine        = false;\n$accountID     = $params->get('id');\n$account       = false;\n\nif (!$accountID || $accountID == $session->account->account_id) {\n\t$isMine    = true;\n\t$accountID = $session->account->account_id;\n\t$account   = $session->account;\n}\n\nif (!$isMine) {\n\t// Allowed to view other peoples' account information?\n\tif (!$auth->allowedToViewAccount) {\n\t\t$this->deny();\n\t}\n\n\t$sql  = \"SELECT login.*, {$creditColumns}, {$createColumns} FROM {$server->loginDatabase}.login \";\n\t$sql .= \"LEFT OUTER JOIN {$server->loginDatabase}.{$creditsTable} AS credits ON login.account_id = credits.account_id \";\n\t$sql .= \"LEFT OUTER JOIN {$server->loginDatabase}.{$createTable} AS created ON login.account_id = created.account_id \";\n\t$sql .= \"WHERE login.sex != 'S' AND login.group_id >= 0 AND login.account_id = ? LIMIT 1\";\n\t$sth  = $server->connection->getStatement($sql);\n\t$sth->execute(array($accountID));\n\n\t// Account object.\n\t$account = $sth->fetch();\n\n\tif ($account) {\n\t\t$title = sprintf(Flux::message('AccountViewTitle2'), $account->userid);\n\t}\n}\nelse {\n\t$title = Flux::message('AccountViewTitle3');\n}\n\n$level       = AccountLevel::getGroupLevel($account->group_id);\n\n$banSuperior = $account && (($level > $session->account->group_level && $auth->allowedToBanHigherPower) || $level <= $session->account->group_level);\n$canTempBan  = !$isMine && $banSuperior && $auth->allowedToTempBanAccount;\n$canPermBan  = !$isMine && $banSuperior && $auth->allowedToPermBanAccount;\n$tempBanned  = $account && $account->unban_time > 0;\n$permBanned  = $account && $account->state == 5;\n$showTempBan = !$isMine && !$tempBanned && !$permBanned && $auth->allowedToTempBanAccount;\n$showPermBan = !$isMine && !$permBanned && $auth->allowedToPermBanAccount;\n$showUnban   = !$isMine && ($tempBanned && $auth->allowedToTempUnbanAccount) || ($permBanned && $auth->allowedToPermUnbanAccount);\n\nif($account->vip_time != '0'){\n$vipexpiretime = $account->vip_time;\n\t$dt = new DateTime(\"@$vipexpiretime\");\n\t$vipexpires = 'Expires '.$dt->format('Y-m-d');\n} elseif ($account->vip_time == '0'){\n\t$vipexpires = 'Standard Account';\n} else {$vipexpires = 'Unknown';}\n\nif (count($_POST) && $account) {\n\t$reason = (string)$params->get('reason');\n\n\tif ($params->get('tempban') && ($tempBanDate=$params->get('tempban_date'))) {\n\t\tif ($canTempBan) {\n\t\t\tif ($server->loginServer->temporarilyBan($session->account->account_id, $reason, $account->account_id, $tempBanDate)) {\n\t\t\t\t$formattedDate = $this->formatDateTime($tempBanDate);\n\t\t\t\t$session->setMessageData(\"Account has been temporarily banned until $formattedDate.\");\n\t\t\t\t$this->redirect($this->url('account', 'view', array('id' => $account->account_id)));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$errorMessage = Flux::message('AccountTempBanFailed');\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$errorMessage = Flux::message('AccountTempBanUnauth');\n\t\t}\n\t}\n\telseif ($params->get('permban')) {\n\t\tif ($canPermBan) {\n\t\t\tif ($server->loginServer->permanentlyBan($session->account->account_id, $reason, $account->account_id)) {\n\t\t\t\t$session->setMessageData(\"Account has been permanently banned.\");\n\t\t\t\t$this->redirect($this->url('account', 'view', array('id' => $account->account_id)));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$errorMessage = Flux::message('AccountPermBanFailed');\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$errorMessage = Flux::message('AccountPermBanUnauth');\n\t\t}\n\t}\n\telseif ($params->get('unban')) {\n\t\t$tbl = Flux::config('FluxTables.AccountCreateTable');\n\t\t$sql = \"SELECT account_id FROM {$server->loginDatabase}.$tbl WHERE confirmed = 0 AND account_id = ?\";\n\t\t$sth = $server->connection->getStatement($sql);\n\n\t\t$sth->execute(array($account->account_id));\n\t\t$confirm = $sth->fetch();\n\n\t\t$sql = \"UPDATE {$server->loginDatabase}.$tbl SET confirmed = 1, confirm_expire = NULL WHERE account_id = ?\";\n\t\t$sth = $server->connection->getStatement($sql);\n\n\t\tif ($tempBanned && $auth->allowedToTempUnbanAccount &&\n\t\t\t\t$server->loginServer->unban($session->account->account_id, $reason, $account->account_id)) {\n\n\t\t\tif ($confirm) {\n\t\t\t\t$sth->execute(array($account->account_id));\n\t\t\t}\n\n\t\t\t$session->setMessageData(Flux::message('AccountLiftTempBan'));\n\t\t\t$this->redirect($this->url('account', 'view', array('id' => $account->account_id)));\n\t\t}\n\t\telseif ($permBanned && $auth->allowedToPermUnbanAccount &&\n\t\t\t\t$server->loginServer->unban($session->account->account_id, $reason, $account->account_id)) {\n\n\t\t\tif ($confirm) {\n\t\t\t\t$sth->execute(array($account->account_id));\n\t\t\t}\n\n\t\t\t$session->setMessageData(Flux::message('AccountLiftPermBan'));\n\t\t\t$this->redirect($this->url('account', 'view', array('id' => $account->account_id)));\n\t\t}\n\t\telse {\n\t\t\t$errorMessage = Flux::message('AccountLiftBanUnauth');\n\t\t}\n\t}\n}\n\n$banInfo = false;\nif ($account) {\n\t$banInfo = $server->loginServer->getBanInfo($account->account_id);\n}\n\n$characters = array();\nforeach ($session->getAthenaServerNames() as $serverName) {\n\t$athena = $session->getAthenaServer($serverName);\n\n\t$sql  = \"SELECT ch.*, guild.name AS guild_name \";\n\t$sql .= \"FROM {$athena->charMapDatabase}.`char` AS ch \";\n\t$sql .= \"LEFT OUTER JOIN {$athena->charMapDatabase}.guild ON guild.guild_id = ch.guild_id \";\n\t$sql .= \"WHERE ch.account_id = ? ORDER BY ch.char_num ASC\";\n\t$sth  = $server->connection->getStatement($sql);\n\t$sth->execute(array($accountID));\n\n\t$chars = $sth->fetchAll();\n\t$characters[$athena->serverName] = $chars;\n}\n\n$col  = \"storage.*, items.name_english, items.type, items.slots, c.char_id, c.name AS char_name\";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.storage \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.items ON items.id = storage.nameid \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.`char` AS c \";\n$sql .= \"ON c.char_id = IF(storage.card0 IN (254, 255), \";\n$sql .= \"IF(storage.card2 < 0, storage.card2 + 65536, storage.card2) \";\n$sql .= \"| (storage.card3 << 16), NULL) \";\n$sql .= \"WHERE storage.account_id = ? \";\n\nif (!$auth->allowedToSeeUnknownItems) {\n\t$sql .= 'AND storage.identify > 0 ';\n}\n\nif ($account) {\n\t$sql .= \"ORDER BY storage.nameid ASC, storage.identify DESC, \";\n\t$sql .= \"storage.attribute DESC, storage.refine ASC\";\n\n\t$sth  = $server->connection->getStatement($sql);\n\t$sth->execute(array($account->account_id));\n\n\t$items = $sth->fetchAll();\n\t$cards = array();\n\n\tif ($items) {\n\t\t$cardIDs = array();\n\n\t\tforeach ($items as $item) {\n\t\t\t$item->cardsOver = -$item->slots;\n\n\t\t\tif ($item->card0) {\n\t\t\t\t$cardIDs[] = $item->card0;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card1) {\n\t\t\t\t$cardIDs[] = $item->card1;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card2) {\n\t\t\t\t$cardIDs[] = $item->card2;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card3) {\n\t\t\t\t$cardIDs[] = $item->card3;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\n\t\t\tif ($item->card0 == 254 || $item->card0 == 255 || $item->card0 == -256 || $item->cardsOver < 0) {\n\t\t\t\t$item->cardsOver = 0;\n\t\t\t}\n\n\t\t\tif($server->isRenewal) {\n\t\t\t\t$temp = array();\n\t\t\t\tif ($item->option_id0)\tarray_push($temp, array($item->option_id0, $item->option_val0));\n\t\t\t\tif ($item->option_id1) \tarray_push($temp, array($item->option_id1, $item->option_val1));\n\t\t\t\tif ($item->option_id2) \tarray_push($temp, array($item->option_id2, $item->option_val2));\n\t\t\t\tif ($item->option_id3) \tarray_push($temp, array($item->option_id3, $item->option_val3));\n\t\t\t\tif ($item->option_id4) \tarray_push($temp, array($item->option_id4, $item->option_val4));\n\t\t\t\t$item->rndopt = $temp;\n\t\t\t}\n\t\t}\n\n\t\tif ($cardIDs) {\n\t\t\t$ids = implode(',', array_fill(0, count($cardIDs), '?'));\n\t\t\t$sql = \"SELECT id, name_english FROM {$server->charMapDatabase}.items WHERE id IN ($ids)\";\n\t\t\t$sth = $server->connection->getStatement($sql);\n\n\t\t\t$sth->execute($cardIDs);\n\t\t\t$temp = $sth->fetchAll();\n\t\t\tif ($temp) {\n\t\t\t\tforeach ($temp as $card) {\n\t\t\t\t\t$cards[$card->id] = $card->name_english;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t$itemAttributes = Flux::config('Attributes')->toArray();\n\t$type_list = Flux::config('ItemTypes')->toArray();\n\n\tif(Flux::config('DisplayCashPoints')) {\n\t\t$regTable = 'acc_reg_num';\n\t\t$sql = \"SELECT * FROM {$server->loginDatabase}.{$regTable} WHERE `key` = '#CASHPOINTS' AND account_id = ?\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($accountID));\n\t\t$account->balance = $sth->fetch()->value;\n\t}\n\n}\n?>\n"
  },
  {
    "path": "modules/account/xferlog.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('XferLogTitle');\n\n$xferTable = Flux::config('FluxTables.CreditTransferTable');\n\n$col  = \"from_account_id, target_account_id, amount, transfer_date, \";\n$col .= \"fa.userid AS from_userid, ta.userid AS target_userid, \";\n$col .= \"ch.char_id AS target_char_id, ch.name AS target_char_name, \";\n$col .= \"fa.email AS from_email\";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.$xferTable \";\n$sql .= \"LEFT OUTER JOIN {$server->loginDatabase}.login AS fa ON $xferTable.from_account_id = fa.account_id \";\n$sql .= \"LEFT OUTER JOIN {$server->loginDatabase}.login AS ta ON $xferTable.target_account_id = ta.account_id \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS ch ON $xferTable.target_char_id = ch.char_id \";\n$sql .= \"WHERE target_account_id = ? ORDER BY transfer_date DESC\";\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute(array($session->account->account_id));\n$incomingXfers = $sth->fetchAll();\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.$xferTable \";\n$sql .= \"LEFT OUTER JOIN {$server->loginDatabase}.login AS fa ON $xferTable.from_account_id = fa.account_id \";\n$sql .= \"LEFT OUTER JOIN {$server->loginDatabase}.login AS ta ON $xferTable.target_account_id = ta.account_id \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS ch ON $xferTable.target_char_id = ch.char_id \";\n$sql .= \"WHERE from_account_id = ? ORDER BY transfer_date DESC\";\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute(array($session->account->account_id));\n$outgoingXfers = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/auction/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "modules/buyingstore/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Buyers';\n\n// Get total count and feed back to the paginator.\n$sth = $server->connection->getStatement(\"SELECT COUNT(id) AS total FROM buyingstores\");\n$sth->execute();\n$paginator = $this->getPaginator($sth->fetch()->total);\n\n// Set the sortable columns\n$sortable = array(\n 'id' => 'asc', 'map', 'char_name'\n);\n$paginator->setSortableColumns($sortable);\n\n// Create the main request.\n$sql = \"SELECT `buyingstores`.char_id,`char`.name as char_name, `buyingstores`.id, `buyingstores`.sex, `buyingstores`.map, `buyingstores`.x, `buyingstores`.y, `buyingstores`.title, autotrade \";\n$sql .= \"FROM buyingstores \";\n$sql .= \"LEFT JOIN `char` on buyingstores.char_id = `char`.char_id \";\n$sql = $paginator->getSQL($sql);\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n\n$stores = $sth->fetchAll();\n"
  },
  {
    "path": "modules/buyingstore/viewshop.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\nrequire_once 'Flux/TemporaryTable.php';\n\n// Get the current Vendor values.\n$sql = \"SELECT `char`.name as char_name, `buyingstores`.id, `buyingstores`.sex, `buyingstores`.map, `buyingstores`.x, `buyingstores`.y, `buyingstores`.title, autotrade \";\n$sql .= \"FROM buyingstores \";\n$sql .= \"LEFT JOIN `char` on buyingstores.char_id = `char`.char_id where id=?\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute(array($params->get(\"id\")));\n$store = $sth->fetch();\n\nif ($store) {\n\t$title = 'Buyer Items Of [' . $store->char_name . ']';\n\n// Create the itemdb temp table to retrieve names.\n\tif ($server->isRenewal) {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n\t} else {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n\t}\n\t$itemDB = \"{$server->charMapDatabase}.items\";\n\t$tempTable = new Flux_TemporaryTable($server->connection, $itemDB, $fromTables);\n\n// Get the buyer's items.\n// Get the current buyer values.\n\t$sql = \"SELECT `buyingstore_items`.`buyingstore_id`, `buyingstore_items`.`index`, `buyingstore_items`.`amount`, `buyingstore_items`.`price`\";\n\t$sql .= \",`buyingstore_items`.`item_id` as nameid\";\n\t$sql .= \",`items`.`name_english` as item_name, `items`.`slots`, `items`.`type` \";\n\t$sql .= \"FROM buyingstore_items \";\n\t$sql .= \"LEFT JOIN items on `buyingstore_items`.item_id = items.id \";\n\t$sql .= \"WHERE `buyingstore_id` = ? \";\n\t$sql .= \"ORDER BY `index` \";\n\t$sth = $server->connection->getStatement($sql);\n\t$sth->execute(array($store->id));\n\t$items = $sth->fetchAll();\n\n\t$itemAttributes = Flux::config('Attributes')->toArray();\n} else {\n\t$title = \"No Buyer Found.\";\n}\n"
  },
  {
    "path": "modules/captcha/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\nrequire_once 'Flux/Captcha.php';\n$captcha = new Flux_Captcha();\n$session->setSecurityCodeData($captcha->code);\n$captcha->display();\n?>\n"
  },
  {
    "path": "modules/castle/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Castles';\n\n$castleNames = Flux::config('CastleNames')->toArray();\n$ids = implode(',', array_fill(0, count($castleNames), '?'));\n\n$sql  = \"SELECT castles.castle_id, castles.guild_id, castles.economy, guild.name AS guild_name, guild.emblem_id as emblem \";\n$sql .= \"FROM {$server->charMapDatabase}.guild_castle AS castles \";\n$sql .= \"LEFT JOIN guild ON guild.guild_id = castles.guild_id \";\n$sql .= \"WHERE castles.castle_id IN ($ids)\";\n$sql .= \"ORDER BY castles.castle_id ASC\";\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array_keys($castleNames));\n\n$castles = $sth->fetchAll();\n\n?>"
  },
  {
    "path": "modules/character/changeslot.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$charID = $params->get('id');\n\nif (!$charID) {\n\t$this->deny();\n}\n\n$char = $server->getCharacter($charID);\nif (!$char || ($char->account_id != $session->account->account_id && !$auth->allowedToChangeSlot)) {\n\t$this->deny();\n}\n\n$title = \"Change Slot for {$char->name}\";\n\nif ($char->online) {\n\t$session->setMessageData(\"Cannot change {$char->name}'s slot.  He/she is currenty online.\");\n\t$this->redirect();\n}\n\nif (count($_POST)) {\n\tif (!$params->get('changeslot')) {\n\t\t$this->deny();\n\t}\n\t\n\t$slot = (int)$params->get('slot');\n\t\n\tif ($slot > $server->maxCharSlots) {\n\t\t$errorMessage = \"Slot number must not be greater than {$server->maxCharSlots}.\";\n\t}\n\telseif ($slot < 1) {\n\t\t$errorMessage = 'Slot number must be a number greater than zero.';\n\t}\n\telseif ($slot === (int)$char->char_num+1) {\n\t\t$errorMessage = 'Please choose a different slot.';\n\t}\n\telse {\n\t\t$sql  = \"SELECT char_id, name, online FROM {$server->charMapDatabase}.`char` AS ch \";\n\t\t$sql .= \"WHERE account_id = ? AND char_num = ? AND char_id != ?\";\n\t\t$sth  = $server->connection->getStatement($sql);\n\t\t\n\t\t$sth->execute(array($char->account_id, $slot-1, $charID));\n\t\t\n\t\t$otherChar = $sth->fetch();\n\t\t\n\t\tif ($otherChar) {\n\t\t\tif ($otherChar->online) {\n\t\t\t\t$errorMessage = \"{$otherChar->name} is using that slot, and is currently online.\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql  = \"UPDATE {$server->charMapDatabase}.`char` SET `char`.char_num = ?\";\n\t\t\t\t$sql .= \"WHERE `char`.char_id = ?\";\n\t\t\t\t$sth  = $server->connection->getStatement($sql);\n\t\t\t\t\n\t\t\t\t$sth->execute(array($char->char_num, $otherChar->char_id));\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (empty($errorMessage)) {\n\t\t\t$sql  = \"UPDATE {$server->charMapDatabase}.`char` SET `char`.char_num = ?\";\n\t\t\t$sql .= \"WHERE `char`.char_id = ?\";\n\t\t\t$sth  = $server->connection->getStatement($sql);\n\t\t\t\n\t\t\t$sth->execute(array($slot-1, $charID));\n\t\t\t\n\t\t\tif ($otherChar) {\n\t\t\t\t$otherNum = $char->char_num + 1;\n\t\t\t\t$session->setMessageData(\"You have successfully swapped {$char->name}'s slot with {$otherChar->name} (#$otherNum and #$slot).\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$session->setMessageData(\"You have successfully changed {$char->name}'s slot to #$slot.\");\n\t\t\t}\n\t\t\t\n\t\t\t$isMine = $char->account_id == $session->account->account_id;\n\t\t\tif ($auth->actionAllowed('character', 'view') && ($isMine || $auth->allowedToViewCharacter)) {\n\t\t\t\t$this->redirect($this->url('character', 'view', array('id' => $char->char_id)));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->redirect();\n\t\t\t}\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/character/divorce.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('DivorceTitle');\n\n$this->loginRequired();\n\n$charID = $params->get('id');\nif (!$charID) {\n\t$this->deny();\n}\n\n$char = $server->getCharacter($charID);\nif ($char->account_id != $session->account->account_id && !$auth->allowedToDivorceCharacter) {\n\t$this->deny();\n}\n\nif (!$char->partner_id) {\n\t$session->setMessageData(sprintf(Flux::message('DivorceNotMarried'), $char->name));\n\t$this->redirect($this->referer);\n}\n\n$partner = $server->getCharacter($char->partner_id);\nif (!$partner) {\n\t$session->setMessageData(Flux::message('DivorceInvalidPartner'));\n\t$this->redirect($this->referer);\n}\n\n$child = false;\nif ($char->child && !($child=$server->getCharacter($char->child))) {\n\t$session->setMessageData(Flux::message('DivorceInvalidChild'));\n\t$this->redirect($this->referer);\n}\n\nif ($char->online || $partner->online || (!Flux::config('DivorceKeepChild') && $child && $child->online)) {\n\t$session->setMessageData(sprintf(Flux::message(Flux::config('DivorceKeepChild') ? 'DivorceMustBeOffline' : 'DivorceMustBeOffline2'), $char->name));\n\t$this->redirect($this->referer);\n}\n\nif (count($_POST) && $params->get('divorce')) {\n\t$sql = \"UPDATE {$server->charMapDatabase}.`char` SET partner_id = 0 \";\n\tif (!Flux::config('DivorceKeepChild')) {\n\t\t$sql .= \", child = 0 \";\n\t}\n\t$sql .= \"WHERE char_id IN (?, ?)\";\n\t$sth  = $server->connection->getStatement($sql);\n\t$sth->execute(array($charID, $char->partner_id));\n\t\n\tif (!Flux::config('DivorceKeepChild') && $child) {\n\t\t$sql = \"UPDATE {$server->charMapDatabase}.`char` SET father = 0, mother = 0 WHERE char_id = ?\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($char->child));\n\t}\n\t\n\tif (!Flux::config('DivorceKeepRings')) {\n\t\t$sql  = \"DELETE FROM {$server->charMapDatabase}.inventory \";\n\t\t$sql .= \"WHERE char_id IN (?, ?) AND nameid IN (2634, 2635) AND card0 = 255 AND (\";\n\t\t$sql .= \"(card2 = IF(? & 0xFFFF > 32767, (? & 0xFFFF) - 65536, ? & 0xFFFF) AND card3 = (? & 0xFFFF0000) >> 16) \";\n\t\t$sql .= \"OR (card2 = IF(? & 0xFFFF > 32767, (? & 0xFFFF) - 65536, ? & 0xFFFF) AND card3 = (? & 0xFFFF0000) >> 16))\";\n\t\t$sth  = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($charID, $char->partner_id, $charID, $charID, $charID, $charID, $char->partner_id, $char->partner_id, $char->partner_id, $char->partner_id));\n\t}\n\t\n\t$session->setMessageData(sprintf(Flux::message('DivorceSuccessful'), $char->name));\n\t$this->redirect();\n}\n?>\n"
  },
  {
    "path": "modules/character/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'List Characters';\n\n$bind        = array();\n$sqlpartial  = \"LEFT OUTER JOIN {$server->charMapDatabase}.guild_member ON guild_member.char_id = ch.char_id \";\n$sqlpartial .= \"LEFT OUTER JOIN {$server->charMapDatabase}.guild ON guild.guild_id = guild_member.guild_id \";\n$sqlpartial .= \"LEFT OUTER JOIN {$server->loginDatabase}.login ON login.account_id = ch.account_id \";\n$sqlpartial .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS partner ON partner.char_id = ch.partner_id \";\n$sqlpartial .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS mother ON mother.char_id = ch.mother \";\n$sqlpartial .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS father ON father.char_id = ch.father \";\n$sqlpartial .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS child ON child.char_id = ch.child \";\n\n$sqlwhere    = \"WHERE 1=1 \";\n$sqlcount    = '';\n\n$charID = $params->get('char_id');\nif ($charID) {\n\t$sqlwhere   .= \"AND ch.char_id = ? \";\n\t$bind[]      = $charID;\n}\nelse {\n\t$opMapping   = array('eq' => '=', 'gt' => '>', 'lt' => '<');\n\t$opValues    = array_keys($opMapping);\n\t$account     = $params->get('account');\n\t$charName    = $params->get('char_name');\n\t$charClass   = $params->get('char_class');\n\t$baseLevelOp = $params->get('base_level_op');\n\t$baseLevel   = $params->get('base_level');\n\t$jobLevelOp  = $params->get('job_level_op');\n\t$jobLevel    = $params->get('job_level');\n\t$zenyOp      = $params->get('zeny_op');\n\t$zeny        = $params->get('zeny');\n\t$guild       = $params->get('guild');\n\t$partner     = $params->get('partner');\n\t$mother      = $params->get('mother');\n\t$father      = $params->get('father');\n\t$child       = $params->get('child');\n\t$online      = $params->get('online');\n\t$slotOp      = $params->get('slot_op');\n\t$slot        = $params->get('slot');\n\t\n\tif ($account) {\n\t\t$sqlcount .= \"LEFT OUTER JOIN {$server->loginDatabase}.login ON login.account_id = ch.account_id \";\n\t\tif (preg_match('/^\\d+$/', $account)) {\n\t\t\t$sqlwhere   .= \"AND login.account_id = ? \";\n\t\t\t$bind[]      = $account;\n\t\t}\n\t\telse {\n\t\t\t$sqlwhere   .= \"AND (login.userid LIKE ? OR login.userid = ?) \";\n\t\t\t$bind[]      = \"%$account%\";\n\t\t\t$bind[]      = $account;\n\t\t}\n\t}\n\t\n\tif ($charName) {\n\t\t$sqlwhere   .= \"AND (ch.name LIKE ? OR ch.name = ?) \";\n\t\t$bind[]      = \"%$charName%\";\n\t\t$bind[]      = $charName;\n\t}\n\t\n\tif ($charClass) {\n\t\t$className = preg_quote($charClass, '/');\n\t\t$classIDs  = preg_grep(\"/.*?$className.*?/i\", Flux::config('JobClasses')->toArray());\n\t\t\n\t\tif (count($classIDs)) {\n\t\t\t$classIDs    = array_keys($classIDs);\n\t\t\t$sqlwhere   .= \"AND (\";\n\t\t\t$partial     = '';\n\t\t\t\n\t\t\tforeach ($classIDs as $id) {\n\t\t\t\t$partial .= \"ch.class = ? OR \";\n\t\t\t\t$bind[]   = $id;\n\t\t\t}\n\t\t\t\n\t\t\t$partial     = preg_replace('/\\s*OR\\s*$/', '', $partial);\n\t\t\t$sqlwhere   .= \"$partial) \";\n\t\t}\n\t\telse {\n\t\t\t$sqlwhere .= 'AND ch.class IS NULL ';\n\t\t}\n\t}\n\t\n\tif (in_array($baseLevelOp, $opValues) && trim($baseLevel) != '') {\n\t\t$op          = $opMapping[$baseLevelOp];\n\t\t$sqlwhere   .= \"AND ch.base_level $op ? \";\n\t\t$bind[]      = $baseLevel;\n\t}\n\t\n\tif (in_array($jobLevelOp, $opValues) && trim($jobLevel) != '') {\n\t\t$op          = $opMapping[$jobLevelOp];\n\t\t$sqlwhere   .= \"AND ch.job_level $op ? \";\n\t\t$bind[]      = $jobLevel;\n\t}\n\t\n\tif (in_array($zenyOp, $opValues) && trim($zeny) != '') {\n\t\t$op          = $opMapping[$zenyOp];\n\t\t$sqlwhere   .= \"AND ch.zeny $op ? \";\n\t\t$bind[]      = $zeny;\n\t}\n\t\n\tif ($guild) {\n\t\t$sqlcount   .= \"LEFT OUTER JOIN {$server->charMapDatabase}.guild_member ON guild_member.char_id = ch.char_id \";\n\t\t$sqlcount   .= \"LEFT OUTER JOIN {$server->charMapDatabase}.guild ON guild.guild_id = guild_member.guild_id \";\n\t\t$sqlwhere   .= \"AND (guild.name LIKE ? OR guild.name = ?) \";\n\t\t$bind[]      = \"%$guild%\";\n\t\t$bind[]      = $guild;\n\t}\n\t\n\tif ($partner) {\n\t\t$sqlcount   .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS partner ON partner.char_id = ch.partner_id \";\n\t\t$sqlwhere   .= \"AND (partner.name LIKE ? OR partner.name = ?) \";\n\t\t$bind[]      = \"%$partner%\";\n\t\t$bind[]      = $partner;\n\t}\n\t\n\tif ($mother) {\n\t\t$sqlcount   .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS mother ON mother.char_id = ch.mother \";\n\t\t$sqlwhere   .= \"AND (mother.name LIKE ? OR mother.name = ?) \";\n\t\t$bind[]      = \"%$mother%\";\n\t\t$bind[]      = $mother;\n\t}\n\t\n\tif ($father) {\n\t\t$sqlcount   .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS father ON father.char_id = ch.father \";\n\t\t$sqlwhere   .= \"AND (father.name LIKE ? OR father.name = ?) \";\n\t\t$bind[]      = \"%$father%\";\n\t\t$bind[]      = $father;\n\t}\n\t\n\tif ($child) {\n\t\t$sqlcount   .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS child ON child.char_id = ch.child \";\n\t\t$sqlwhere   .= \"AND (child.name LIKE ? OR child.name = ?) \";\n\t\t$bind[]      = \"%$child%\";\n\t\t$bind[]      = $child;\n\t}\n\t\n\tif ($online == 'on' || $online == 'off') {\n\t\tif ($online == 'on') {\n\t\t\t$sqlwhere .= \"AND ch.online > 0 \";\n\t\t}\n\t\telse {\n\t\t\t$sqlwhere .= \"AND ch.online < 1 \";\n\t\t}\n\t}\n\t\n\tif (in_array($slotOp, $opValues) && trim($slot) != '') {\n\t\t$op          = $opMapping[$slotOp];\n\t\t$sqlwhere   .= \"AND ch.char_num $op ? \";\n\t\t$bind[]      = $slot - 1;\n\t}\n}\n\n$sql  = \"SELECT COUNT(ch.char_id) AS total FROM {$server->charMapDatabase}.`char` AS ch $sqlcount $sqlwhere\";\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'ch.char_id' => 'asc', 'userid', 'char_name', 'ch.base_level', 'ch.job_level',\n\t'ch.zeny', 'guild_name', 'partner_name', 'mother_name', 'father_name', 'child_name',\n\t'ch.online', 'ch.char_num'\n));\n\n$col  = \"ch.account_id, ch.char_id, ch.name AS char_name, ch.char_num, \";\n$col .= \"ch.online, ch.base_level, ch.job_level, ch.class, ch.zeny, \";\n$col .= \"guild.guild_id, guild.name AS guild_name, guild.emblem_id as emblem, \";\n$col .= \"login.userid, partner.name AS partner_name, partner.char_id AS partner_id, \";\n$col .= \"mother.name AS mother_name, mother.char_id AS mother_id, \";\n$col .= \"father.name AS father_name, father.char_id AS father_id, \";\n$col .= \"child.name AS child_name, child.char_id AS child_id\";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.`char` AS ch $sqlpartial $sqlwhere\";\n$sql  = $paginator->getSQL($sql);\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n\n$characters = $sth->fetchAll();\n$authorized = $auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter;\n\nif ($characters && count($characters) === 1 && $authorized && Flux::config('SingleMatchRedirect')) {\n\t$this->redirect($this->url('character', 'view', array('id' => $characters[0]->char_id)));\n}\n?>\n"
  },
  {
    "path": "modules/character/mapstats.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Map Statistics';\n\n$bind = array();\n$sql  = \"SELECT last_map AS map_name, COUNT(last_map) AS player_count FROM {$server->charMapDatabase}.`char` \";\n\nif (($hideGroupLevel=(int)Flux::config('HideFromMapStats')) > 0 && !$auth->allowedToSeeHiddenMapStats) {\n\t$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON `char`.account_id = login.account_id \";\n}\n\n$sql .= \"WHERE online > 0 \";\n\nif ($hideGroupLevel > 0 && !$auth->allowedToSeeHiddenMapStats) {\n\t$groups = AccountLevel::getGroupID($hideGroupLevel, '<');\n\t\n\tif(!empty($groups)) {\n\t\t$ids   = implode(', ', array_fill(0, count($groups), '?'));\n\t\t$sql  .= \"AND login.group_id IN ($ids) \";\n\t\t$bind  = array_merge($bind, $groups);\n\t}\n}\n\n$sql .= \" GROUP BY map_name, online HAVING player_count > 0 ORDER BY map_name ASC\";\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n$maps = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/character/online.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = \"Who's Online\";\n\n$charPrefsTable = Flux::config('FluxTables.CharacterPrefsTable');\n\n\n$sqlpartial  = \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = ch.account_id \";\n$sqlpartial .= \"LEFT JOIN {$server->charMapDatabase}.guild ON guild.guild_id = ch.guild_id \";\n\nif (!$auth->allowedToIgnoreHiddenPref) {\n\t$sqlpartial .= \"LEFT JOIN {$server->charMapDatabase}.$charPrefsTable AS pref1 ON \";\n\t$sqlpartial .= \"(pref1.account_id = ch.account_id AND pref1.char_id = ch.char_id AND pref1.name = 'HideFromWhosOnline') \";\n}\n\n$sqlpartial .= \"LEFT JOIN {$server->charMapDatabase}.$charPrefsTable AS pref2 ON \";\n$sqlpartial .= \"(pref2.account_id = ch.account_id AND pref2.char_id = ch.char_id AND pref2.name = 'HideMapFromWhosOnline') \";\n$sqlpartial .= \"WHERE ch.online > 0 \";\n\nif (!$auth->allowedToIgnoreHiddenPref) {\n\t$sqlpartial .= \"AND (pref1.value IS NULL) \";\n}\n\n$bind = array();\n\nif ($auth->allowedToSearchWhosOnline) {\n\t$charName  = $params->get('char_name');\n\t$charClass = $params->get('char_class');\n\t$guildName = $params->get('guild_name');\n\n\tif ($charName) {\n\t\t$sqlpartial .= \"AND (ch.name LIKE ? OR ch.name = ?) \";\n\t\t$bind[]      = \"%$charName%\";\n\t\t$bind[]      = $charName;\n\t}\n\n\tif ($guildName) {\n\t\t$sqlpartial .= \"AND (guild.name LIKE ? OR guild.name = ?) \";\n\t\t$bind[]      = \"%$guildName%\";\n\t\t$bind[]      = $guildName;\n\t}\n\n\tif ($charClass) {\n\t\t$className = preg_quote($charClass, '/');\n\t\t$classIDs  = preg_grep(\"/.*?$className.*?/i\", Flux::config('JobClasses')->toArray());\n\n\t\tif (count($classIDs)) {\n\t\t\t$classIDs    = array_keys($classIDs);\n\t\t\t$sqlpartial .= \"AND (\";\n\t\t\t$partial     = '';\n\n\t\t\tforeach ($classIDs as $id) {\n\t\t\t\t$partial .= \"ch.class = ? OR \";\n\t\t\t\t$bind[]   = $id;\n\t\t\t}\n\n\t\t\t$partial     = preg_replace('/\\s*OR\\s*$/', '', $partial);\n\t\t\t$sqlpartial .= \"$partial) \";\n\t\t}\n\t\telse {\n\t\t\t$sqlpartial .= 'AND ch.class IS NULL ';\n\t\t}\n\t}\n}\n\n// Hide groups greater than or equal to\nif (($hideGroupLevel=Flux::config('HideFromWhosOnline')) && !$auth->allowedToIgnoreHiddenPref2) {\n\t$groups = AccountLevel::getGroupID($hideGroupLevel, '<');\n\n\tif(!empty($groups)) {\n\t\t$ids = implode(', ', array_fill(0, count($groups), '?'));\n\t\t$sqlpartial .= \"AND login.group_id IN ($ids) \";\n\t\t$bind = array_merge($bind, $groups);\n\t}\n}\n\n$sql  = \"SELECT COUNT(ch.char_id) AS total FROM {$server->charMapDatabase}.`char` AS ch $sqlpartial\";\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n\n$sortable = array('char_name' => 'asc', 'base_level', 'job_level', 'guild_name');\nif ($auth->allowedToViewOnlinePosition) {\n\t$sortable[] = 'last_map';\n}\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns($sortable);\n\n$sql  = \"SELECT COUNT(ch.char_id) - {$paginator->total} AS total FROM {$server->charMapDatabase}.`char` AS ch \";\n$sql .= \"WHERE ch.online > 0\";\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute();\n\n// Number of hidden players (not including the ones hidden by the 'HideFromWhosOnline' app config).\n$hiddenCount = (int)$sth->fetch()->total;\n\n$col  = \"ch.char_id, ch.name AS char_name, ch.class AS char_class, ch.base_level, ch.job_level, \";\n$col .= \"guild.name AS guild_name, guild.guild_id, ch.last_map, pref2.value AS hidemap, guild.emblem_id as emblem \";\n\n$sql  = $paginator->getSQL(\"SELECT $col FROM {$server->charMapDatabase}.`char` AS ch $sqlpartial\");\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n\n$chars = $sth->fetchAll();\n\n?>\n"
  },
  {
    "path": "modules/character/pagemenu/view.php",
    "content": "<?php\n$pageMenu = array();\nif (($isMine || $auth->allowedToModifyCharPrefs) && $auth->actionAllowed('character', 'prefs')) {\n\t$pageMenu['Modify Preferences'] = $this->url('character', 'prefs', array('id' => $char->char_id));\n}\nif (($isMine || $auth->allowedToChangeSlot) && $auth->actionAllowed('character', 'changeslot')) {\n\t$pageMenu['Change Slot'] = $this->url('character', 'changeslot', array('id' => $char->char_id));\n}\nif (($isMine || $auth->allowedToResetLook) && $auth->actionAllowed('character', 'resetlook')) {\n\t$pageMenu['Reset Look'] = $this->url('character', 'resetlook', array('id' => $char->char_id));\n}\nif (($isMine || $auth->allowedToResetPosition) && $auth->actionAllowed('character', 'resetpos')) {\n\t$pageMenu['Reset Position'] = $this->url('character', 'resetpos', array('id' => $char->char_id));\n}\nif ($char->partner_id && ($isMine || $auth->allowedToDivorceCharacter) && $auth->actionAllowed('character', 'divorce')) {\n\t$pageMenu['Divorce'] = $this->url('character', 'divorce', array('id' => $char->char_id));\n}\nreturn $pageMenu;\n?>\n"
  },
  {
    "path": "modules/character/prefs.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$charID = $params->get('id');\n\nif (!$charID) {\n\t$this->deny();\n}\n\n$char = $server->getCharacter($charID);\nif ($char) {\n\tif ($char->account_id != $session->account->account_id && !$auth->allowedToModifyCharPrefs) {\n\t\t$this->deny();\n\t}\n\t\n\t$prefs = $server->getPrefs($charID, array('HideFromWhosOnline', 'HideMapFromWhosOnline', 'HideFromZenyRanking'));\n\t\n\t$hideFromWhosOnline    = $prefs->get('HideFromWhosOnline');\n\t$hideMapFromWhosOnline = $prefs->get('HideMapFromWhosOnline');\n\t$hideFromZenyRanking   = $prefs->get('HideFromZenyRanking');\n\t\n\tif (count($_POST)) {\n\t\t$set = array();\n\t\t$set['HideFromWhosOnline']    = $params->get('hide_from_whos_online') ? 1 : null;\n\t\t$set['HideMapFromWhosOnline'] = $params->get('hide_map_from_whos_online') ? 1 : null;\n\t\t\n\t\tif ($auth->allowedToHideFromZenyRank) {\n\t\t\t$set['HideFromZenyRanking'] = $params->get('hide_from_zeny_ranking') ? 1 : null;\n\t\t}\n\t\t\n\t\t$res = $server->setPrefs($charID, $set);\n\t\t\n\t\tif ($res) {\n\t\t\t$session->setMessageData('Preferences have been modified.');\n\t\t\t$this->redirect($this->urlWithQs);\n\t\t}\n\t\telse {\n\t\t\t$errorMessage = 'Failed to modify preferences.';\n\t\t}\n\t}\n}\nelse {\n\t\n}\n?>\n"
  },
  {
    "path": "modules/character/resetlook.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'Reset Look';\n\n$charID = $params->get('id');\nif (!$charID) {\n\t$this->deny();\n}\n\n$char = $server->getCharacter($charID);\nif (!$char || ($char->account_id != $session->account->account_id && !$auth->allowedToResetLook)) {\n\t$this->deny();\n}\n\n$reset = $server->resetLook($charID);\nif ($reset === -1) {\n\t$message = sprintf(Flux::message('CantResetLookWhenOnline'), $char->name);\n}\nelseif ($reset === true) {\n\t$message = sprintf(Flux::message('ResetLookSuccessful'), $char->name);\n}\nelse {\n\t$message = sprintf(Flux::message('ResetLookFailed'), $char->name);\n}\n\n$session->setMessageData($message);\n$this->redirect($this->url('character', 'view', array('id' => $charID)));\n?>\n"
  },
  {
    "path": "modules/character/resetpos.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'Reset Position';\n\n$charID = $params->get('id');\nif (!$charID) {\n\t$this->deny();\n}\n\n$char = $server->getCharacter($charID);\nif (!$char || ($char->account_id != $session->account->account_id && !$auth->allowedToResetPosition)) {\n\t$this->deny();\n}\n\n$reset = $server->resetPosition($charID);\nif ($reset === -1) {\n\t$message = sprintf(Flux::message('CantResetPosWhenOnline'), $char->name);\n}\nelseif ($reset === -2) {\n\t$message = sprintf(Flux::message('CantResetFromCurrentMap'), $char->name);\n}\nelseif ($reset === true) {\n\t$message = sprintf(Flux::message('ResetPositionSuccessful'), $char->name);\n}\nelse {\n\t$message = sprintf(Flux::message('ResetPositionFailed'), $char->name);\n}\n\n$session->setMessageData($message);\n$this->redirect($this->url('character', 'view', array('id' => $charID)));\n?>\n"
  },
  {
    "path": "modules/character/view.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'Viewing Character';\n\nrequire_once 'Flux/TemporaryTable.php';\n\nif($server->isRenewal) {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n\t$mobdb = array(\"mob_db_re\",\"mob_db2_re\");\n} else {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n\t$mobdb = array(\"mob_db\",\"mob_db2\");\n}\n$tableName = \"{$server->charMapDatabase}.items\";\n$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n\n$charID = $params->get('id');\n\n$col  = \"ch.char_id, ch.account_id, ch.char_num, ch.name AS char_name, ch.class AS char_class, ch.base_level AS char_base_level, \";\n$col .= \"ch.job_level AS char_job_level, ch.base_exp AS char_base_exp, ch.job_exp AS char_job_exp, ch.zeny AS char_zeny, \";\n$col .= \"ch.str AS char_str, ch.agi AS char_agi, ch.vit AS char_vit, \";\n$col .= \"ch.int AS char_int, ch.dex AS char_dex, ch.luk AS char_luk, ch.max_hp AS char_max_hp, ch.hp AS char_hp, \";\n$col .= \"ch.max_sp AS char_max_sp, ch.sp AS char_sp, ch.status_point AS char_status_point, \";\n$col .= \"ch.skill_point AS char_skill_point, ch.online AS char_online, ch.party_id AS char_party_id, \";\n\n$col .= \"login.userid, login.account_id AS char_account_id, login.sex AS gender, \";\n$col .= \"partner.name AS partner_name, partner.char_id AS partner_id, \";\n$col .= \"mother.name AS mother_name, mother.char_id AS mother_id, \";\n$col .= \"father.name AS father_name, father.char_id AS father_id, \";\n$col .= \"child.name AS child_name, child.char_id AS child_id, \";\n$col .= \"guild.guild_id, guild.name AS guild_name, guild.emblem_id AS emblem, \";\n$col .= \"guild_position.name AS guild_position, IFNULL(guild_position.exp_mode, 0) AS guild_tax, \";\n$col .= \"party.name AS party_name, party.leader_char AS party_leader_id, party_leader.name AS party_leader_name, \";\n\n$col .= \"homun.name AS homun_name, homun.class AS homun_class, homun.level AS homun_level, homun.exp AS homun_exp, \";\n$col .= \"homun.intimacy AS homun_intimacy, homun.hunger AS homun_hunger, homun.str AS homun_str, homun.agi As homun_agi, \";\n$col .= \"homun.vit AS homun_vit, homun.int AS homun_int, homun.dex AS homun_dex, homun.luk AS homun_luk, \";\n$col .= \"homun.hp AS homun_hp, homun.max_hp As homun_max_hp, homun.sp AS homun_sp, homun.max_sp AS homun_max_sp, \";\n$col .= \"homun.skill_point AS homun_skill_point, homun.alive AS homun_alive, \";\n\n$col .= \"pet.class AS pet_class, pet.name AS pet_name, pet.level AS pet_level, pet.intimate AS pet_intimacy, \";\n$col .= \"pet.hungry AS pet_hungry, pet_mob.name_english AS pet_mob_name, pet_mob2.name_english AS pet_mob_name2, \";\n\n$col .= \"IFNULL(reg.value, 0) AS death_count\";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.`char` AS ch \";\n$sql .= \"LEFT OUTER JOIN {$server->loginDatabase}.login ON login.account_id = ch.account_id \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS partner ON partner.char_id = ch.partner_id \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS mother ON mother.char_id = ch.mother \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS father ON father.char_id = ch.father \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS child ON child.char_id = ch.child \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`guild_member` ON guild_member.char_id = ch.char_id \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`guild` ON guild.guild_id = guild_member.guild_id \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`guild_position` ON \";\n$sql .= \"(guild_member.position = guild_position.position AND guild_member.guild_id = guild_position.guild_id) \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`party` ON ch.party_id = party.party_id \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char` AS party_leader ON party.leader_char = party_leader.char_id \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`homunculus` AS homun ON ch.homun_id = homun.homun_id \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`pet` ON ch.pet_id = pet.pet_id \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`\".$mobdb[0].\"` AS pet_mob ON pet_mob.ID = pet.class \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`\".$mobdb[1].\"` AS pet_mob2 ON pet_mob2.ID = pet.class \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.`char_reg_num` AS reg ON reg.char_id = ch.char_id AND reg.key = 'PC_DIE_COUNTER' \";\n$sql .= \"WHERE ch.char_id = ?\";\n\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($charID));\n\n$char = $sth->fetch();\n\nif ($char->pet_mob_name2) {\n\t$char->pet_mob_name = $char->pet_mob_name2;\n}\n\nif ($char && $char->char_account_id == $session->account->account_id) {\n\t$isMine = true;\n}\nelse {\n\t$isMine = false;\n}\n\nif (!$isMine && !$auth->allowedToViewCharacter) {\n\t$this->deny();\n}\n\nif ($char) {\n\t$title = \"Viewing Character ({$char->char_name})\";\n\t\n\t$sql  = \"SELECT fr.char_id, fr.name, fr.class, fr.base_level, fr.job_level, \";\n\t$sql .= \"guild.guild_id, guild.name AS guild_name, fr.online, \";\n\t$sql .= \"guild.emblem_id AS emblem \";\n\t$sql .= \"FROM {$server->charMapDatabase}.`char` AS fr \";\n\t$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.guild ON guild.guild_id = fr.guild_id \";\n\t$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.friends ON friends.friend_id = fr.char_id \";\n\t$sql .= \"WHERE friends.char_id = ? ORDER BY fr.name ASC\";\n\t$sth  = $server->connection->getStatement($sql);\n\t\n\t$sth->execute(array($char->char_id));\n\t$friends = $sth->fetchAll();\n\t\n\tif ($char->party_leader_id) {\n\t\t$sql  = \"SELECT p.char_id, p.name, p.class, p.base_level, p.job_level, \";\n\t\t$sql .= \"guild.guild_id, guild.name AS guild_name, p.online, \";\n\t\t$sql .= \"guild.emblem_id AS emblem \";\n\t\t$sql .= \"FROM {$server->charMapDatabase}.`char` AS p \";\n\t\t$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.guild ON guild.guild_id = p.guild_id \";\n\t\t$sql .= \"WHERE p.party_id = ? AND p.char_id != ? ORDER BY p.name ASC\";\n\t\t$sth  = $server->connection->getStatement($sql);\n\t\t\n\t\t$sth->execute(array($char->char_party_id, $char->char_id));\n\t\t$partyMembers = $sth->fetchAll();\n\t}\n\telse {\n\t\t$partyMembers = array();\n\t}\n\t\n\t$col  = \"inventory.*, items.name_english, items.type, items.slots, c.char_id, c.name AS char_name\";\n\t\n\t$sql  = \"SELECT $col FROM {$server->charMapDatabase}.inventory \";\n\t$sql .= \"LEFT JOIN {$server->charMapDatabase}.items ON items.id = inventory.nameid \";\n\t$sql .= \"LEFT JOIN {$server->charMapDatabase}.`char` AS c \";\n\t$sql .= \"ON c.char_id = IF(inventory.card0 IN (254, 255), \";\n\t$sql .= \"IF(inventory.card2 < 0, inventory.card2 + 65536, inventory.card2) \";\n\t$sql .= \"| (inventory.card3 << 16), NULL) \";\n\t$sql .= \"WHERE inventory.char_id = ? \";\n\t\n\tif (!$auth->allowedToSeeUnknownItems) {\n\t\t$sql .= 'AND inventory.identify > 0 ';\n\t}\n\t\n\t$sql .= \"ORDER BY IF(inventory.equip > 0, 1, 0) DESC, inventory.nameid ASC, inventory.identify DESC, \";\n\t$sql .= \"inventory.attribute DESC, inventory.refine ASC\";\n\t\n\t$sth  = $server->connection->getStatement($sql);\n\t$sth->execute(array($char->char_id));\n\t\n\t$items = $sth->fetchAll();\n\t$cards = array();\n\n\tif ($items) {\n\t\t$cardIDs = array();\n\n\t\tforeach ($items as $item) {\n\t\t\t$item->cardsOver = -$item->slots;\n\t\t\t\n\t\t\tif ($item->card0) {\n\t\t\t\t$cardIDs[] = $item->card0;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card1) {\n\t\t\t\t$cardIDs[] = $item->card1;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card2) {\n\t\t\t\t$cardIDs[] = $item->card2;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card3) {\n\t\t\t\t$cardIDs[] = $item->card3;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\t\n\t\t\tif ($item->card0 == 254 || $item->card0 == 255 || $item->card0 == -256 || $item->cardsOver < 0) {\n\t\t\t\t$item->cardsOver = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif($server->isRenewal) {\n\t\t\t\t$temp = array();\n\t\t\t\tif ($item->option_id0)\tarray_push($temp, array($item->option_id0, $item->option_val0));\n\t\t\t\tif ($item->option_id1) \tarray_push($temp, array($item->option_id1, $item->option_val1));\n\t\t\t\tif ($item->option_id2) \tarray_push($temp, array($item->option_id2, $item->option_val2));\n\t\t\t\tif ($item->option_id3) \tarray_push($temp, array($item->option_id3, $item->option_val3));\n\t\t\t\tif ($item->option_id4) \tarray_push($temp, array($item->option_id4, $item->option_val4));\n\t\t\t\t$item->rndopt = $temp;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($cardIDs) {\n\t\t\t$ids = implode(',', array_fill(0, count($cardIDs), '?'));\n\t\t\t$sql = \"SELECT id, name_english FROM {$server->charMapDatabase}.items WHERE id IN ($ids)\";\n\t\t\t$sth = $server->connection->getStatement($sql);\n\n\t\t\t$sth->execute($cardIDs);\n\t\t\t$temp = $sth->fetchAll();\n\t\t\tif ($temp) {\n\t\t\t\tforeach ($temp as $card) {\n\t\t\t\t\t$cards[$card->id] = $card->name_english;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$col  = \"cart_inventory.*, items.name_english, items.type, items.slots, c.char_id, c.name AS char_name\";\n\t\n\t$sql  = \"SELECT $col FROM {$server->charMapDatabase}.cart_inventory \";\n\t$sql .= \"LEFT JOIN {$server->charMapDatabase}.items ON items.id = cart_inventory.nameid \";\n\t$sql .= \"LEFT JOIN {$server->charMapDatabase}.`char` AS c \";\n\t$sql .= \"ON c.char_id = IF(cart_inventory.card0 IN (254, 255), \";\n\t$sql .= \"IF(cart_inventory.card2 < 0, cart_inventory.card2 + 65536, cart_inventory.card2) \";\n\t$sql .= \"| (cart_inventory.card3 << 16), NULL) \";\n\t$sql .= \"WHERE cart_inventory.char_id = ? \";\n\t\n\tif (!$auth->allowedToSeeUnknownItems) {\n\t\t$sql .= 'AND cart_inventory.identify > 0 ';\n\t}\n\t\n\t$sql .= \"ORDER BY cart_inventory.nameid ASC, cart_inventory.identify DESC, \";\n\t$sql .= \"cart_inventory.attribute DESC, cart_inventory.refine ASC\";\n\t\n\t$sth  = $server->connection->getStatement($sql);\n\t$sth->execute(array($char->char_id));\n\t\n\t$cart_items = $sth->fetchAll();\n\t$cart_cards = array();\n\n\tif ($cart_items) {\n\t\t$cardIDs = array();\n\n\t\tforeach ($cart_items as $item) {\n\t\t\t$item->cardsOver = -$item->slots;\n\t\t\t\n\t\t\tif ($item->card0) {\n\t\t\t\t$cardIDs[] = $item->card0;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card1) {\n\t\t\t\t$cardIDs[] = $item->card1;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card2) {\n\t\t\t\t$cardIDs[] = $item->card2;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card3) {\n\t\t\t\t$cardIDs[] = $item->card3;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\t\n\t\t\tif ($item->card0 == 254 || $item->card0 == 255 || $item->card0 == -256 || $item->cardsOver < 0) {\n\t\t\t\t$item->cardsOver = 0;\n\t\t\t}\n\n\t\t\tif($server->isRenewal) {\n\t\t\t\t$temp = array();\n\t\t\t\tif ($item->option_id0)\tarray_push($temp, array($item->option_id0, $item->option_val0));\n\t\t\t\tif ($item->option_id1) \tarray_push($temp, array($item->option_id1, $item->option_val1));\n\t\t\t\tif ($item->option_id2) \tarray_push($temp, array($item->option_id2, $item->option_val2));\n\t\t\t\tif ($item->option_id3) \tarray_push($temp, array($item->option_id3, $item->option_val3));\n\t\t\t\tif ($item->option_id4) \tarray_push($temp, array($item->option_id4, $item->option_val4));\n\t\t\t\t$item->rndopt = $temp;\n\t\t\t}\n\t\t}\n\n\t\tif ($cardIDs) {\n\t\t\t$ids = implode(',', array_fill(0, count($cardIDs), '?'));\n\t\t\t$sql = \"SELECT id, name_english FROM {$server->charMapDatabase}.items WHERE id IN ($ids)\";\n\t\t\t$sth = $server->connection->getStatement($sql);\n\n\t\t\t$sth->execute($cardIDs);\n\t\t\t$temp = $sth->fetchAll();\n\t\t\tif ($temp) {\n\t\t\t\tforeach ($temp as $card) {\n\t\t\t\t\t$cart_cards[$card->id] = $card->name_english;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$itemAttributes = Flux::config('Attributes')->toArray();\n\t$type_list = Flux::config('ItemTypes')->toArray();\n}\n?>\n"
  },
  {
    "path": "modules/cplog/ban.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'List Account Ban History';\n\n$banTable    = Flux::config('FluxTables.AccountBanTable');\n$sqlpartial  = \"LEFT JOIN {$server->loginDatabase}.login AS l1 ON l1.account_id = a.account_id \";\n$sqlpartial .= \"LEFT JOIN {$server->loginDatabase}.login AS l2 ON l2.account_id = a.banned_by \";\n$sqlpartial .= \"WHERE 1=1 \";\n$sqlpartial .= \"AND a.banned_by IS NOT NULL \";\n$bind        = array();\n\n$account     = trim($params->get('account'));\n$bannedBy    = trim($params->get('banned_by'));\n$banType     = $params->get('ban_type');\n$banDate     = $params->get('ban_date');\n$banUntil    = $params->get('ban_until_date');\n\nif ($account) {\n\tif (preg_match('/^\\d+$/', $account)) {\n\t\t$sqlpartial .= 'AND a.account_id = ? ';\n\t\t$bind[]      = $account;\n\t}\n\telse {\n\t\t$sqlpartial .= 'AND (l1.userid LIKE ? OR l1.userid = ?) ';\n\t\t$bind[]      = \"%$account%\";\n\t\t$bind[]      = $account;\n\t}\n}\n\nif ($bannedBy) {\n\tif (preg_match('/^\\d+$/', $bannedBy)) {\n\t\t$sqlpartial .= 'AND a.banned_by = ? ';\n\t\t$bind[]      = $bannedBy;\n\t}\n\telse {\n\t\t$sqlpartial .= 'AND (l2.userid LIKE ? OR l2.userid = ?) ';\n\t\t$bind[]      = \"%$bannedBy%\";\n\t\t$bind[]      = $bannedBy;\n\t}\n}\n\nif ($banType) {\n\tif ($banType == 'unban') {\n\t\t$sqlpartial .= 'AND a.ban_type = 0 ';\n\t}\n\telseif ($banType == 'tempban') {\n\t\t$sqlpartial .= 'AND a.ban_type = 1 ';\n\t}\n\telseif ($banType == 'permban') {\n\t\t$sqlpartial .= 'AND a.ban_type = 2 ';\n\t}\n}\n\nif ($banDate) {\n\t$sqlpartial .= 'AND a.ban_date = ? ';\n\t$bind[]      = $banDate;\n}\n\nif ($banUntil) {\n\t$sqlpartial .= 'AND a.ban_until = ? ';\n\t$bind[]      = $banUntil;\n}\n\n$sql = \"SELECT COUNT(a.id) AS total FROM {$server->loginDatabase}.$banTable AS a $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'account', 'banned_by', 'ban_type', 'ban_date' => 'desc', 'ban_until'\n));\n\n$sql  = \"SELECT a.account_id, a.banned_by, a.ban_type, a.ban_until, a.ban_date, a.ban_reason, \";\n$sql .= \"l1.userid AS banned_userid, l2.userid AS banned_by_userid FROM {$server->loginDatabase}.$banTable AS a $sqlpartial\";\n$sql  = $paginator->getSQL($sql);\n$sth  = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$bans = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/cplog/changemail.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Email Changes';\n\n$changeTable = Flux::config('FluxTables.ChangeEmailTable');\n$sqlpartial  = \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = log.account_id \";\n$sqlpartial .= 'WHERE 1=1 ';\n$bind        = array();\n\n// Email change searching.\n$requestAfter  = $params->get('request_after_date');\n$requestBefore = $params->get('request_before_date');\n$changeAfter   = $params->get('change_after_date');\n$changeBefore  = $params->get('change_before_date');\n$accountID     = trim($params->get('account_id'));\n$username      = trim($params->get('username'));\n$oldEmail      = trim($params->get('old_email'));\n$newEmail      = trim($params->get('new_email'));\n$requestIP     = trim($params->get('request_ip'));\n$changeIP      = trim($params->get('change_ip'));\n\nif ($requestAfter) {\n\t$sqlpartial .= 'AND request_date >= ? ';\n\t$bind[]      = $requestAfter;\n}\nif ($requestBefore) {\n\t$sqlpartial .= 'AND request_date <= ? ';\n\t$bind[]      = $requestBefore;\n}\nif ($accountID) {\n\t$sqlpartial .= 'AND log.account_id = ? ';\n\t$bind[]      = $accountID;\n}\nif ($username) {\n\t$sqlpartial .= 'AND userid LIKE ? ';\n\t$bind[]      = \"%$username%\";\n}\nif ($oldEmail) {\n\t$sqlpartial .= 'AND old_email LIKE ? ';\n\t$bind[]      = \"%$oldEmail%\";\n}\nif ($newEmail) {\n\t$sqlpartial .= 'AND new_email LIKE ? ';\n\t$bind[]      = \"%$newEmail%\";\n}\nif ($requestIP) {\n\t$sqlpartial .= 'AND request_ip LIKE ? ';\n\t$bind[]      = \"%$requestIP%\";\n}\nif ($changeIP) {\n\t$sqlpartial .= 'AND change_ip LIKE ? ';\n\t$bind[]      = \"%$changeIP%\";\n}\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$changeTable AS log $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'log.account_id', 'userid',\n\t'change_date' => 'desc', 'change_ip', \n\t'request_date' => 'desc', 'request_ip'\n));\n\n$col  = 'id, code, log.account_id, old_email, new_email, userid, ';\n$col .= 'request_date, request_ip, change_date, change_ip, change_done';\n$sql  = $paginator->getSQL(\"SELECT $col FROM {$server->loginDatabase}.$changeTable AS log $sqlpartial\");\n$sth  = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$changes = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/cplog/changepass.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Password Changes';\n\n$changeTable  = Flux::config('FluxTables.ChangePasswordTable');\n$sqlpartial  = \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = log.account_id \";\n$sqlpartial .= 'WHERE 1=1 ';\n$bind        = array();\n\n// Password change searching.\n$changeAfter   = $params->get('change_after_date');\n$changeBefore  = $params->get('change_before_date');\n$accountID     = trim($params->get('account_id'));\n$username      = trim($params->get('username'));\n$changeIP      = trim($params->get('change_ip'));\n\nif ($changeAfter) {\n\t$sqlpartial .= 'AND change_date >= ? ';\n\t$bind[]      = $changeAfter;\n}\nif ($changeBefore) {\n\t$sqlpartial .= 'AND change_date <= ? ';\n\t$bind[]      = $changeBefore;\n}\nif ($accountID) {\n\t$sqlpartial .= 'AND log.account_id = ? ';\n\t$bind[]      = $accountID;\n}\nif ($username) {\n\t$sqlpartial .= 'AND userid LIKE ? ';\n\t$bind[]      = \"%$username%\";\n}\nif ($changeIP) {\n\t$sqlpartial .= 'AND change_ip LIKE ? ';\n\t$bind[]      = \"%$changeIP%\";\n}\n\nif ($auth->allowedToSearchCpChangePass) {\n\t$oldPassword = $params->get('old_password');\n\t$newPassword = $params->get('new_password');\n\t$useMD5      = $session->loginAthenaGroup->loginServer->config->getUseMD5();\n\t\n\tif ($oldPassword) {\n\t\tif ($useMD5) {\n\t\t\t$oldPassword = md5($oldPassword);\n\t\t}\n\t\t$sqlpartial .= 'AND old_password = ? ';\n\t\t$bind[]      = $oldPassword;\n\t}\n\tif ($newPassword) {\n\t\tif ($useMD5) {\n\t\t\t$newPassword = md5($newPassword);\n\t\t}\n\t\t$sqlpartial .= 'AND new_password = ? ';\n\t\t$bind[]      = $newPassword;\n\t}\n}\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$changeTable AS log $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'log.account_id', 'userid',\n\t'change_date' => 'desc', 'change_ip'\n));\n\n$col  = 'id, log.account_id, old_password, new_password, userid, change_date, change_ip';\n$sql  = $paginator->getSQL(\"SELECT $col FROM {$server->loginDatabase}.$changeTable AS log $sqlpartial\");\n$sth  = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$changes = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/cplog/create.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Account Registrations';\n\n$loginLogTable = Flux::config('FluxTables.AccountCreateTable');\n$sqlpartial    = \"WHERE 1=1 \";\n$bind          = array();\n\n$password    = $params->get('password');\n$accountID   = (int)$params->get('account_id');\n$username    = trim($params->get('username'));\n$ipAddress   = trim($params->get('ip'));\n$loginAfter  = $params->get('login_after_date');\n$loginBefore = $params->get('login_before_date');\n\nif ($password && $auth->allowedToSearchCpLoginLogPw) {\n\t$sqlpartial .= 'AND user_pass = ? ';\n\t$bind[]      = $session->loginAthenaGroup->loginServer->config->getUseMD5() ? md5($password) : $password;\n}\n\nif ($accountID) {\n\t$sqlpartial .= 'AND account_id = ? ';\n\t$bind[]      = $accountID;\n}\n\nif ($username) {\n\t$sqlpartial .= 'AND username LIKE ? ';\n\t$bind[]      = \"%$username%\";\n}\n\nif ($ipAddress) {\n\t$sqlpartial .= 'AND ip LIKE ? ';\n\t$bind[]      = \"%$ipAddress%\";\n}\n\nif ($loginAfter) {\n\t$sqlpartial .= 'AND login_date >= ? ';\n\t$bind[]      = $loginAfter;\n}\n\nif ($loginBefore) {\n\t$sqlpartial .= 'AND login_date <= ? ';\n\t$bind[]      = $loginBefore;\n}\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$loginLogTable $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'account_id', 'user_id', 'user_pass', 'reg_ip',\n\t'reg_date' => 'desc'\n));\n\n$sql = \"SELECT account_id, userid, user_pass, reg_ip, reg_date FROM {$server->loginDatabase}.$loginLogTable $sqlpartial\";\n$sql = $paginator->getSQL($sql);\n$sth = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$logins = $sth->fetchAll();\nif ($logins) {\n}\n?>\n"
  },
  {
    "path": "modules/cplog/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n?>\n"
  },
  {
    "path": "modules/cplog/ipban.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'List IP Ban History';\n\n$ipBanTable = Flux::config('FluxTables.IpBanTable');\n$sqlpartial = \"WHERE 1=1 \";\n$bind       = array();\n\n$ipAddress   = trim($params->get('ip'));\n$bannedBy    = trim($params->get('banned_by'));\n$banType     = $params->get('ban_type');\n$banDate     = $params->get('ban_date');\n$banUntil    = $params->get('ban_until_date');\n\nif ($ipAddress) {\n\t$sqlpartial .= 'AND i.ip_address LIKE ? ';\n\t$bind[]      = \"%$ipAddress%\";\n}\n\nif ($bannedBy) {\n\tif (preg_match('/^\\d+$/', $bannedBy)) {\n\t\t$sqlpartial .= 'AND i.banned_by = ? ';\n\t\t$bind[]      = $bannedBy;\n\t}\n\telse {\n\t\t$sqlpartial .= 'AND (l.userid LIKE ? OR l.userid = ?) ';\n\t\t$bind[]      = \"%$bannedBy%\";\n\t\t$bind[]      = $bannedBy;\n\t}\n}\n\nif ($banType) {\n\tif ($banType == 'unban') {\n\t\t$sqlpartial .= 'AND i.ban_type = 0 ';\n\t}\n\telseif ($banType == 'ban') {\n\t\t$sqlpartial .= 'AND i.ban_type = 1 ';\n\t}\n}\n\nif ($banDate) {\n\t$sqlpartial .= 'AND i.ban_date = ? ';\n\t$bind[]      = $banDate;\n}\n\nif ($banUntil) {\n\t$sqlpartial .= 'AND i.ban_until = ? ';\n\t$bind[]      = $banUntil;\n}\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$ipBanTable $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'ip', 'banned_by', 'ban_type', 'ban_date' => 'desc', 'ban_until'\n));\n\n$sql  = \"SELECT i.ip_address, i.banned_by, i.ban_type, i.ban_until, i.ban_date, i.ban_reason, \";\n$sql .= \"l.userid FROM {$server->loginDatabase}.$ipBanTable AS i \";\n$sql .= \"LEFT JOIN {$server->loginDatabase}.login AS l ON l.account_id = i.banned_by $sqlpartial\";\n$sql  = $paginator->getSQL($sql);\n$sth  = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$ipbans = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/cplog/login.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'List Logins';\n\n$loginLogTable = Flux::config('FluxTables.LoginLogTable');\n$sqlpartial    = \"WHERE 1=1 \";\n$bind          = array();\n\n$password    = $params->get('password');\n$accountID   = (int)$params->get('account_id');\n$username    = trim($params->get('username') ?: '');\n$ipAddress   = trim($params->get('ip') ?: '');\n$loginAfter  = $params->get('login_after_date');\n$loginBefore = $params->get('login_before_date');\n$errorCode   = $params->get('error_code');\n\nif ($password && $auth->allowedToSearchCpLoginLogPw) {\n\t$sqlpartial .= 'AND password = ? ';\n\t$bind[]      = $session->loginAthenaGroup->loginServer->config->getUseMD5() ? md5($password) : $password;\n}\n\nif ($accountID) {\n\t$sqlpartial .= 'AND account_id = ? ';\n\t$bind[]      = $accountID;\n}\n\nif ($username) {\n\t$sqlpartial .= 'AND username LIKE ? ';\n\t$bind[]      = \"%$username%\";\n}\n\nif ($ipAddress) {\n\t$sqlpartial .= 'AND ip LIKE ? ';\n\t$bind[]      = \"%$ipAddress%\";\n}\n\nif ($loginAfter) {\n\t$sqlpartial .= 'AND login_date >= ? ';\n\t$bind[]      = $loginAfter;\n}\n\nif ($loginBefore) {\n\t$sqlpartial .= 'AND login_date <= ? ';\n\t$bind[]      = $loginBefore;\n}\n\nif (!is_null($errorCode) && strtolower($errorCode) != 'all') {\n\tif (strtolower($errorCode) == 'none') {\n\t\t$sqlpartial .= 'AND error_code IS NULL ';\n\t}\n\telse {\n\t\t$sqlpartial .= 'AND error_code = ? ';\n\t\t$bind[]      = $errorCode;\n\t}\n}\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$loginLogTable $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'account_id', 'username', 'password', 'ip',\n\t'login_date' => 'desc', 'error_code'\n));\n\n$sql = \"SELECT account_id, username, password, ip, login_date, error_code FROM {$server->loginDatabase}.$loginLogTable $sqlpartial\";\n$sql = $paginator->getSQL($sql);\n$sth = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$logins = $sth->fetchAll();\n$loginErrors = Flux::config('LoginErrors');\n\nif ($logins) {\n\tforeach ($logins as $_tmplogin) {\n\t\t$_tmplogin->error_type = $loginErrors->get($_tmplogin->error_code);\n\t\tif (is_null($_tmplogin->error_type)) {\n\t\t\t$_tmplogin->error_type = $_tmplogin->error_code;\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/cplog/paypal.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'List PayPal Transactions';\n\n$txnLogTable = Flux::config('FluxTables.TransactionTable');\n$sqlpartial  = \"{$server->loginDatabase}.{$txnLogTable} AS p \";\n$sqlpartial .= \"LEFT OUTER JOIN {$server->loginDatabase}.login AS l ON p.account_id = l.account_id \";\n$sqlpartial .= \"LEFT OUTER JOIN {$server->loginDatabase}.$txnLogTable AS pp ON pp.txn_id = p.parent_txn_id \";\n$sqlpartial .= \"WHERE (p.server_name = ? OR p.server_name IS NULL OR p.server_name = '') \";\n\n$bind            = array($session->loginAthenaGroup->serverName);\n$opMapping       = array('eq' => '=', 'gt' => '>', 'lt' => '<');\n$opValues        = array_keys($opMapping);\n$txnID           = trim($params->get('txn_id'));\n$parentTxnID     = trim($params->get('parent_txn_id'));\n$paymentStatus   = trim($params->get('status'));\n$emailAddress    = trim($params->get('email'));\n$amount          = $params->get('amount');\n$amountOp        = $params->get('amount_op');\n$credits         = $params->get('credits');\n$creditsOp       = $params->get('credits_op');\n$account         = $params->get('account');\n$processedAfter  = $params->get('processed_after_date');\n$processedBefore = $params->get('processed_before_date');\n$receivedAfter   = $params->get('received_after_date');\n$receivedBefore  = $params->get('received_before_date');\n\nif ($txnID) {\n\t$sqlpartial .= 'AND p.txn_id = ? ';\n\t$bind[]      = $txnID;\n}\n\nif ($parentTxnID) {\n\t$sqlpartial .= 'AND p.parent_txn_id = ? ';\n\t$bind[]      = $parentTxnID;\n}\n\nif ($paymentStatus) {\n\t$sqlpartial .= 'AND p.payment_status LIKE ?';\n\t$bind[]      = \"%$paymentStatus%\";\n}\n\nif ($emailAddress) {\n\t$sqlpartial .= 'AND p.payer_email LIKE ?';\n\t$bind[]      = \"%$emailAddress%\";\n}\n\nif ($account) {\n\t$sqlpartial .= 'AND l.userid LIKE ?';\n\t$bind[]      = \"%$account%\";\n}\n\nif (in_array($amountOp, $opValues) && trim($amount) != '') {\n\t$op          = $opMapping[$amountOp];\n\t$sqlpartial .= \"AND CAST(p.mc_gross AS SIGNED) $op ? \";\n\t$bind[]      = $amount;\n}\n\nif (in_array($creditsOp, $opValues) && trim($credits) != '') {\n\t$op          = $opMapping[$creditsOp];\n\t$sqlpartial .= \"AND CAST(p.credits AS UNSIGNED) $op ? \";\n\t$bind[]      = $credits;\n}\n\nif ($processedAfter) {\n\t$sqlpartial .= 'AND p.process_date >= ? ';\n\t$bind[]      = $processedAfter;\n}\n\nif ($processedBefore) {\n\t$sqlpartial .= 'AND p.process_date <= ? ';\n\t$bind[]      = $processedBefore;\n}\n\nif ($receivedAfter) {\n\t$sqlpartial .= 'AND p.payment_date >= ? ';\n\t$bind[]      = $receivedAfter;\n}\n\nif ($receivedBefore) {\n\t$sqlpartial .= 'AND p.payment_date <= ? ';\n\t$bind[]      = $receivedBefore;\n}\n\n$sth = $server->connection->getStatement(\"SELECT COUNT(p.id) AS total FROM $sqlpartial\");\n$sth->execute($bind);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(\n\tarray(\n\t\t'p.txn_id',\n\t\t'p.parent_txn_id',\n\t\t'p.process_date' => 'DESC',\n\t\t'p.payment_date',\n\t\t'p.payment_status',\n\t\t'p.payer_email',\n\t\t'p.mc_gross',\n\t\t'p.credits',\n\t\t'p.server_name',\n\t\t'l.userid'\n\t)\n);\n\n$col  = \"p.id, p.txn_id, p.parent_txn_id, p.process_date, p.payment_date, p.payment_status, p.mc_currency, \";\n$col .=  \"p.payer_email, p.mc_gross, p.credits, p.server_name, pp.id AS parent_id, p.account_id, l.userid\";\n\n$sql  = \"SELECT $col FROM $sqlpartial\";\n$sql  = $paginator->getSQL($sql);\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n$transactions = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/cplog/resetpass.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Password Resets';\n\n$resetTable  = Flux::config('FluxTables.ResetPasswordTable');\n$sqlpartial  = \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = log.account_id \";\n$sqlpartial .= 'WHERE 1=1 ';\n$bind        = array();\n\n// Password reset searching.\n$requestAfter  = $params->get('request_after_date');\n$requestBefore = $params->get('request_before_date');\n$resetAfter    = $params->get('reset_after_date');\n$resetBefore   = $params->get('reset_before_date');\n$accountID     = trim($params->get('account_id'));\n$username      = trim($params->get('username'));\n$requestIP     = trim($params->get('request_ip'));\n$resetIP       = trim($params->get('reset_ip'));\n\nif ($requestAfter) {\n\t$sqlpartial .= 'AND request_date >= ? ';\n\t$bind[]      = $requestAfter;\n}\nif ($requestBefore) {\n\t$sqlpartial .= 'AND request_date <= ? ';\n\t$bind[]      = $requestBefore;\n}\nif ($accountID) {\n\t$sqlpartial .= 'AND log.account_id = ? ';\n\t$bind[]      = $accountID;\n}\nif ($username) {\n\t$sqlpartial .= 'AND userid LIKE ? ';\n\t$bind[]      = \"%$username%\";\n}\nif ($requestIP) {\n\t$sqlpartial .= 'AND request_ip LIKE ? ';\n\t$bind[]      = \"%$requestIP%\";\n}\nif ($resetIP) {\n\t$sqlpartial .= 'AND reset_ip LIKE ? ';\n\t$bind[]      = \"%$resetIP%\";\n}\n\nif ($auth->allowedToSearchCpResetPass) {\n\t$oldPassword = $params->get('old_password');\n\t$newPassword = $params->get('new_password');\n\t$useMD5      = $session->loginAthenaGroup->loginServer->config->getUseMD5();\n\t\n\tif ($oldPassword) {\n\t\tif ($useMD5) {\n\t\t\t$oldPassword = md5($oldPassword);\n\t\t}\n\t\t$sqlpartial .= 'AND old_password = ? ';\n\t\t$bind[]      = $oldPassword;\n\t}\n\tif ($newPassword) {\n\t\tif ($useMD5) {\n\t\t\t$newPassword = md5($newPassword);\n\t\t}\n\t\t$sqlpartial .= 'AND new_password = ? ';\n\t\t$bind[]      = $newPassword;\n\t}\n}\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$resetTable AS log $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'log.account_id', 'userid',\n\t'reset_date' => 'desc', 'reset_ip', \n\t'request_date' => 'desc', 'request_ip'\n));\n\n$col  = 'id, code, log.account_id, old_password, new_password, userid, ';\n$col .= 'request_date, request_ip, reset_date, reset_ip, reset_done';\n$sql  = $paginator->getSQL(\"SELECT $col FROM {$server->loginDatabase}.$resetTable AS log $sqlpartial\");\n$sth  = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$resets = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/cplog/txnview.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'Viewing PayPal Transaction';\n\n$txnLogTable = Flux::config('FluxTables.TransactionTable');\n$txnID       = $params->get('id');\n$txnFileLog  = '';\n\n$sql  = \"SELECT * FROM {$server->loginDatabase}.{$txnLogTable} AS txnlog \";\n$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON txnlog.account_id = login.account_id \";\n$sql .= \"WHERE id = ? LIMIT 1\";\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($txnID));\n\n$txn = $sth->fetch();\n\nif ($txn) {\n\t$title = \"Viewing PayPal Transaction ({$txn->txn_id}, status: {$txn->payment_status})\";\n\t\n\t$txnLogFile = FLUX_DATA_DIR.\"/logs/transactions/{$txn->txn_type}/{$txn->payment_status}/{$txn->txn_id}.log.php\";\n\tif (file_exists($txnLogFile)) {\n\t\t$txnFileLog = file($txnLogFile);\n\t\t\n\t\tif (count($txnFileLog) && preg_match('/<\\?php.*?\\?>/', $txnFileLog[0])) {\n\t\t\tarray_shift($txnFileLog);\n\t\t}\n\t\t\n\t\t$txnFileLog = implode('', $txnFileLog);\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/donate/complete.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$ppReturn = $session->ppReturn;\n$session->setPpReturnData(null);\n\nif (!$ppReturn) {\n\t$this->deny();\n}\n?>\n"
  },
  {
    "path": "modules/donate/history.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$txnTable = Flux::config('FluxTables.TransactionTable');\n\n/** Completed Transactions **/\n\n$sqlpartial  = \"WHERE account_id = ? AND hold_until IS NULL AND payment_status = 'Completed' \";\n$sqlpartial .= \"ORDER BY payment_date DESC\";\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$txnTable $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n\n$sth->execute(array($session->account->account_id));\n$completedTotal = $sth->fetch()->total;\n\n$col = \"*\";\n$sql = \"SELECT $col FROM {$server->loginDatabase}.$txnTable $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n\n$sth->execute(array($session->account->account_id));\n$completedTxn = $sth->fetchAll();\n\n/** Held Transactions **/\n\n$sqlpartial  = \"WHERE account_id = ? AND hold_until IS NOT NULL AND payment_status = 'Completed' \";\n$sqlpartial .= \"ORDER BY payment_date DESC\";\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$txnTable $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n\n$sth->execute(array($session->account->account_id));\n$heldTotal = $sth->fetch()->total;\n\n$col = \"*\";\n$sql = \"SELECT $col FROM {$server->loginDatabase}.$txnTable $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n\n$sth->execute(array($session->account->account_id));\n$heldTxn = $sth->fetchAll();\n\n/** Failed Transactions **/\n\n$sqlpartial  = \"WHERE account_id = ? AND hold_until IS NULL AND payment_status = 'Completed' \";\n$sqlpartial .= \"AND credits < 1 ORDER BY payment_date DESC\";\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$txnTable $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n\n$sth->execute(array($session->account->account_id));\n$failedTotal = $sth->fetch()->total;\n\n$col = \"*\";\n$sql = \"SELECT $col FROM {$server->loginDatabase}.$txnTable $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n\n$sth->execute(array($session->account->account_id));\n$failedTxn = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/donate/index.php",
    "content": "<?php \nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired(Flux::message('LoginToDonate'));\n\n$title = 'Make a Donation';\n\n$donationAmount = false;\n\nif (count($_POST) && $params->get('setamount')) {\n\t$minimum = Flux::config('MinDonationAmount');\n\t$amount  = (float)$params->get('amount');\n\t\n\tif (!$amount || $amount < $minimum) {\n\t\t$errorMessage = sprintf('Donation amount must be greater than or equal to %s %s!',\n\t\t\t$this->formatCurrency($minimum), Flux::config('DonationCurrency'));\n\t}\n\telse {\n\t\t$donationAmount = $amount;\n\t}\n}\n\nif (!$params->get('setamount') && $params->get('resetamount')) {\n\t$this->redirect($this->url);\n}\n?>\n"
  },
  {
    "path": "modules/donate/notify.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\nrequire_once 'Flux/PaymentNotifyRequest.php';\nif (count($_POST)) {\n\t$request = new Flux_PaymentNotifyRequest($_POST);\n\t$request->process();\n}\nexit;\n?>\n"
  },
  {
    "path": "modules/donate/trusted.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'Trusted PayPal E-mails';\n\n$trustedTable = Flux::config('FluxTables.DonationTrustTable');\n\n$sql  = \"SELECT DISTINCT email, create_date FROM {$server->loginDatabase}.$trustedTable \";\n$sql .= \"WHERE account_id = ? ORDER BY create_date DESC\";\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($session->account->account_id));\n\n$emails = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/donate/update.php",
    "content": "<?php \nif (!defined('FLUX_ROOT')) exit;\n\n\nif (!($password=$params->get('password')) || $password !== Flux::config('InstallerPassword')) {\n\t$this->deny();\n}\nelse {\n\tFlux::processHeldCredits();\n\texit('DONE');\n}\n?>\n"
  },
  {
    "path": "modules/economy/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "modules/errors/missing_action.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('MissingActionTitle');\n$realActionPath = sprintf('%s/%s/%s/%s.php', FLUX_ROOT, $this->modulePath, $this->params->get('module'), $this->params->get('action'));\n?>\n"
  },
  {
    "path": "modules/errors/missing_view.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('MissingViewTitle');\n$realViewPath = sprintf('%s/%s/%s/%s.php', FLUX_ROOT, $addon ? $addon->themeDir : $this->themePath, $this->params->get('module'), $this->params->get('action'));\n?>\n"
  },
  {
    "path": "modules/forum/index.php",
    "content": ""
  },
  {
    "path": "modules/guild/emblem.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\nfunction flux_get_default_bmp_data()\n{\n\t$filename = sprintf('%s/emblem/%s', FLUX_DATA_DIR, Flux::config('MissingEmblemBMP'));\n\tif (file_exists($filename)) {\n\t\treturn file_get_contents($filename);\n\t}\n}\n\nfunction flux_display_empty_emblem()\n{\n\t$data = flux_get_default_bmp_data();\n\theader(\"Content-Type: image/bmp\");\n\theader('Content-Length: '.strlen($data));\n\techo $data;\n\texit;\n}\n\nif (Flux::config('ForceEmptyEmblem'))\n\tflux_display_empty_emblem();\n\n$serverName       = $params->get('login');\n$athenaServerName = $params->get('charmap');\n$guildID          = intval($params->get('id'));\n$athenaServer     = Flux::getAthenaServerByName($serverName, $athenaServerName);\n\nif (!$athenaServer || $guildID < 0)\n\tflux_display_empty_emblem();\nelse {\n\t$dirname   = FLUX_DATA_DIR.\"/tmp/emblems/$serverName/$athenaServerName\";\n\t$filename  = \"$dirname/$guildID.png\";\n\t\n\tif ($interval=Flux::config('EmblemCacheInterval')) {\n\t\t$interval *= 60;\n\t\t\n\t\tif (!is_dir($dirname))\n\t\t\tif (Flux::config('RequireOwnership'))\n\t\t\t\tmkdir($dirname, 0700, true);\n\t\t\telse\n\t\t\t\tmkdir($dirname, 0777, true);\n\t\telseif (file_exists($filename) && (time() - filemtime($filename)) < $interval) {\n\t\t\theader(\"Content-Type: image/png\");\n\t\t\theader('Content-Length: '.filesize($filename));\n\t\t\t@readfile($filename);\n\t\t\texit;\n\t\t}\n\t}\n\t\n\tif(Flux::config('EmblemUseWebservice')) {\n\t\t$db  = $athenaServer->webDatabase;\n\t\t$sql = \"SELECT file_type, file_data FROM $db.guild_emblems WHERE guild_id = ? LIMIT 1\";\n\t\t$sth = $athenaServer->connection->getStatementForWeb($sql);\n\t\t$sth->execute(array($guildID));\n\t\t$res = $sth->fetch();\n\t\t\n\t\tif (!$res->file_data)\n\t\t\tflux_display_empty_emblem();\n\t\telse {\n\t\t\t$data = 'data:image/gif;base64,'.base64_encode($res->file_data);\n\n\t\t\tif ($interval)\n\t\t\t\tfile_put_contents($filename, $res->file_data);\n\n\t\t\t/* TODO; add gif animation at first image load */\n\t\t\t$image = imagecreatefromstring($res->file_data);\n\t\t\theader(\"Content-Type: image/png\");\n\t\t\timagepng($image);\n\t\t\texit;\n\t\t}\n\t} else {\n\t\t$db  = $athenaServer->charMapDatabase;\n\t\t$sql = \"SELECT emblem_len, emblem_data FROM $db.guild WHERE guild_id = ? LIMIT 1\";\n\t\t$sth = $athenaServer->connection->getStatement($sql);\n\t\t$sth->execute(array($guildID));\n\t\t$res = $sth->fetch();\n\t\t\n\t\tif (!$res || !$res->emblem_len)\n\t\t\tflux_display_empty_emblem();\n\t\telse {\n\t\t\trequire_once 'functions/imagecreatefrombmpstring.php';\n\t\t\t\n\t\t\t$data  = @gzuncompress(pack('H*', $res->emblem_data));\n\t\t\t$image = imagecreatefrombmpstring($data);\n\t\t\t\n\t\t\theader(\"Content-Type: image/png\");\n\t\t\t\n\t\t\tif ($interval)\n\t\t\t\timagepng($image, $filename);\n\t\t\t\n\t\t\timagepng($image);\n\t\t\texit;\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/guild/export.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\nif (!extension_loaded('zip')) {\n\tthrow new Flux_Error('The `zip` extension needs to be loaded for this feature to work.  Please consult the PHP manual for instructions.');\n}\n\n$this->loginRequired();\n\n$title = 'Export Guild Emblems';\n\nrequire_once 'Flux/EmblemExporter.php';\n$exporter = new Flux_EmblemExporter($session->loginAthenaGroup);\n\n$serverNames = $session->getAthenaServerNames();\n\nif (count($_POST)) {\n\t$serverArr = $params->get('server');\n\t\n\tif ($serverArr instanceOf Flux_Config) {\n\t\t$array = $serverArr->toArray();\n\t\t\n\t\tforeach ($array as $serv) {\n\t\t\t$athenaServer = $session->getAthenaServer($serv);\n\t\t\t\n\t\t\tif ($athenaServer) {\n\t\t\t\t$exporter->addAthenaServer($athenaServer);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$exporter->exportArchive();\n\t}\n\telse {\n\t\t$session->setMessageData('You must select a server first.');\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/guild/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'List Guilds';\n\n$bind        = array();\n$sqlpartial  = \"LEFT JOIN {$server->charMapDatabase}.`char` ON `char`.char_id = guild.char_id \";\n$sqlpartial .= \"WHERE 1=1 \";\n\n$guildID = $params->get('id');\nif ($guildID) {\n\t$sqlpartial .= \"AND guild.guild_id = ? \";\n\t$bind[]      = $guildID;\n}\nelse {\n\t$opMapping    = array('eq' => '=', 'gt' => '>', 'lt' => '<');\n\t$opValues     = array_keys($opMapping);\n\t$guildName    = $params->get('guild_name');\n\t$charID       = $params->get('char_id');\n\t$charName     = $params->get('master');\n\t$guildLevel   = $params->get('guild_level');\n\t$guildLevelOp = $params->get('guild_level_op');\n\t$connectMem   = $params->get('connect_member');\n\t$connectMemOp = $params->get('connect_member_op');\n\t$maxMem       = $params->get('max_member');\n\t$maxMemOp     = $params->get('max_member_op');\n\t$avgLevel     = $params->get('average_lv');\n\t$avgLevelOp   = $params->get('average_lv_op');\n\t\n\tif ($guildName) {\n\t\t$sqlpartial .= \"AND (guild.name LIKE ? OR guild.name = ?) \";\n\t\t$bind[]      = \"%$guildName%\";\n\t\t$bind[]      = $guildName;\n\t}\n\t\n\tif ($charID) {\n\t\t$sqlpartial .= \"AND guild.char_id = ? \";\n\t\t$bind[]      = $charID;\n\t}\n\t\n\tif ($charName) {\n\t\t$sqlpartial .= \"AND (guild.master LIKE ? OR guild.master = ?) \";\n\t\t$bind[]      = \"%$charName%\";\n\t\t$bind[]      = $charName;\n\t}\n\t\n\tif (in_array($guildLevelOp, $opValues) && trim($guildLevel) != '') {\n\t\t$op          = $opMapping[$guildLevelOp];\n\t\t$sqlpartial .= \"AND guild.guild_lv $op ? \";\n\t\t$bind[]      = $guildLevel;\n\t}\n\t\n\tif (in_array($connectMemOp, $opValues) && trim($connectMem) != '') {\n\t\t$op          = $opMapping[$connectMemOp];\n\t\t$sqlpartial .= \"AND guild.connect_member $op ? \";\n\t\t$bind[]      = $connectMem;\n\t}\n\t\n\tif (in_array($maxMemOp, $opValues) && trim($maxMem) != '') {\n\t\t$op          = $opMapping[$maxMemOp];\n\t\t$sqlpartial .= \"AND guild.max_member $op ? \";\n\t\t$bind[]      = $maxMem;\n\t}\n\t\n\tif (in_array($avgLevelOp, $opValues) && trim($avgLevel) != '') {\n\t\t$op          = $opMapping[$avgLevelOp];\n\t\t$sqlpartial .= \"AND guild.average_lv $op ? \";\n\t\t$bind[]      = $avgLevel;\n\t}\n}\n\n$sql  = \"SELECT COUNT(guild.guild_id) AS total FROM {$server->charMapDatabase}.guild $sqlpartial\";\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'guild.guild_id' => 'asc', 'guildName', 'charID', 'charName', 'guildLevel',\n\t'connectMem', 'maxMem', 'avgLevel'\n));\n\n$col  = \"guild.guild_id, guild.name AS guildName, guild.char_id AS charID, `char`.name AS charName, \";\n$col .= \"guild.guild_lv AS guildLevel, guild.connect_member AS connectMem, guild.max_member AS maxMem, \";\n$col .= \"guild.average_lv AS avgLevel, guild.emblem_id as emblem \";\n\t\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.`guild` $sqlpartial\";\n$sql  = $paginator->getSQL($sql);\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n\n$guilds     = $sth->fetchAll();\n$authorized = $auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild;\n\nif ($guilds && count($guilds) === 1 && $authorized && Flux::config('SingleMatchRedirect')) {\n\t$this->redirect($this->url('guild', 'view', array('id' => $guilds[0]->guild_id)));\n}\n\n?>\n"
  },
  {
    "path": "modules/guild/view.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'Viewing Guild';\n\nrequire_once 'Flux/TemporaryTable.php';\n\nif($server->isRenewal) {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n} else {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n}\n$tableName = \"{$server->charMapDatabase}.items\";\n$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n\n$guildID = $params->get('id');\n\n$col  = \"guild.guild_id, guild.name, guild.char_id, guild.master, guild.guild_lv, guild.connect_member, guild.max_member, \";\n$col .= \"guild.average_lv, guild.exp, guild.next_exp, guild.skill_point, REPLACE(guild.mes1, '|00', '') AS mes1, REPLACE(guild.mes2, '|00', '') AS mes2, \";\n$col .= \"guild.emblem_id as emblem, `char`.name AS guild_master \";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.guild \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.`char` ON `char`.char_id = guild.char_id \";\n$sql .= \"WHERE guild.guild_id = ?\";\n\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($guildID));\n\n$guild = $sth->fetch();\n\n$col  = \"guild_alliance.alliance_id, guild.name\";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.guild_alliance LEFT JOIN {$server->charMapDatabase}.guild ON guild_alliance.alliance_id = guild.guild_id \";\n$sql .= \"WHERE guild_alliance.guild_id = ? AND guild_alliance.opposition = 0 ORDER BY guild_alliance.alliance_id ASC\";\n\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($guildID));\n\n$alliances = $sth->fetchAll();\n\n$col  = \"guild_alliance.alliance_id, guild.name\";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.guild_alliance LEFT JOIN {$server->charMapDatabase}.guild ON guild_alliance.alliance_id = guild.guild_id \";\n$sql .= \"WHERE guild_alliance.guild_id = ? AND guild_alliance.opposition = 1 ORDER BY guild_alliance.alliance_id ASC\";\n\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($guildID));\n\n$oppositions = $sth->fetchAll();\n\nif ($guild) {\n\t$title = \"Viewing Guild ({$guild->name})\";\n}\n\n$col  = \"ch.account_id, ch.char_id, ch.name, ch.class, ch.base_level, ch.job_level, \";\n$col .= \"IF(ch.online = 1, 'Online Now!', \";\n$col .= \"CASE DATE_FORMAT(acc.lastlogin, '%Y-%m-%d') \";\n$col .= \"WHEN DATE_FORMAT(NOW(), '%Y-%m-%d') THEN 'Today' \";\n$col .= \"WHEN DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY), '%Y-%m-%d') THEN 'Yesterday' \";\n$col .= \"ELSE CONCAT(DATEDIFF(NOW(), acc.lastlogin), ' Days Ago') \";\n$col .= \"END) AS lastlogin, \";\n$col .= \"IFNULL(roster.exp, 0) AS devotion, roster.position, \";\n$col .= \"pos.name AS position_name, pos.mode, IFNULL(pos.exp_mode, 0) AS guild_tax\";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.`char` AS ch \";\n$sql .= \"LEFT JOIN {$server->loginDatabase}.login AS acc ON acc.account_id = ch.account_id \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.guild_member AS roster ON (roster.guild_id = ch.guild_id AND roster.char_id = ch.char_id) \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.guild_position AS pos ON (pos.guild_id = ch.guild_id AND pos.position = roster.position) \";\n$sql .= \"WHERE ch.guild_id = ? ORDER BY roster.position ASC, acc.lastlogin DESC\";\n\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($guildID));\n\n$members = $sth->fetchAll();\n\n$isMine  = false;\n$amOwner = false;\nforeach ($members as $member) {\n\tif ($guild && $member->account_id == $session->account->account_id) {\n\t\t$isMine = true;\n\t\tif ($member->position == 0) {\n\t\t\t$amOwner = true;\n\t\t}\n\t}\n}\n\nif (!$isMine && !$auth->allowedToViewGuild) {\n\t$this->deny();\n}\n\n$col  = \"account_id, name, REPLACE(mes, '|00', '') AS mes\";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.guild_expulsion \";\n$sql .= \"WHERE guild_id = ? ORDER BY name ASC\";\n\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($guildID));\n\n$expulsions = $sth->fetchAll();\n\nif (!Flux::config('GStorageLeaderOnly') || $amOwner || $auth->allowedToViewGuild) {\n\t$col  = \"guild_storage.*, items.name_english, items.type, items.slots, c.char_id, c.name AS char_name\";\n\n\t$sql  = \"SELECT $col FROM {$server->charMapDatabase}.guild_storage \";\n\t$sql .= \"LEFT JOIN {$server->charMapDatabase}.items ON items.id = guild_storage.nameid \";\n\t$sql .= \"LEFT JOIN {$server->charMapDatabase}.`char` AS c \";\n\t$sql .= \"ON c.char_id = IF(guild_storage.card0 IN (254, 255), \";\n\t$sql .= \"IF(guild_storage.card2 < 0, guild_storage.card2 + 65536, guild_storage.card2) \";\n\t$sql .= \"| (guild_storage.card3 << 16), NULL) \";\n\t$sql .= \"WHERE guild_storage.guild_id = ? \";\n\n\tif (!$auth->allowedToSeeUnknownItems) {\n\t\t$sql .= 'AND guild_storage.identify > 0 ';\n\t}\n\n\t$sql .= \"ORDER BY guild_storage.nameid ASC, guild_storage.identify DESC, \";\n\t$sql .= \"guild_storage.attribute ASC, guild_storage.refine ASC\";\n\n\t$sth  = $server->connection->getStatement($sql);\n\t$sth->execute(array($guildID));\n\n\t$items = $sth->fetchAll();\n\t$cards = array();\n\n\tif ($items) {\n\t\t$cardIDs = array();\n\n\t\tforeach ($items as $item) {\n\t\t\t$item->cardsOver = -$item->slots;\n\t\t\t\n\t\t\tif ($item->card0) {\n\t\t\t\t$cardIDs[] = $item->card0;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card1) {\n\t\t\t\t$cardIDs[] = $item->card1;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card2) {\n\t\t\t\t$cardIDs[] = $item->card2;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card3) {\n\t\t\t\t$cardIDs[] = $item->card3;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\t\n\t\t\tif ($item->card0 == 254 || $item->card0 == 255 || $item->card0 == -256 || $item->cardsOver < 0) {\n\t\t\t\t$item->cardsOver = 0;\n\t\t\t}\n\n\t\t\tif($server->isRenewal) {\n\t\t\t\t$temp = array();\n\t\t\t\tif ($item->option_id0)\tarray_push($temp, array($item->option_id0, $item->option_val0));\n\t\t\t\tif ($item->option_id1) \tarray_push($temp, array($item->option_id1, $item->option_val1));\n\t\t\t\tif ($item->option_id2) \tarray_push($temp, array($item->option_id2, $item->option_val2));\n\t\t\t\tif ($item->option_id3) \tarray_push($temp, array($item->option_id3, $item->option_val3));\n\t\t\t\tif ($item->option_id4) \tarray_push($temp, array($item->option_id4, $item->option_val4));\n\t\t\t\t$item->rndopt = $temp;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($cardIDs) {\n\t\t\t$ids = implode(',', array_fill(0, count($cardIDs), '?'));\n\t\t\t$sql = \"SELECT id, name_english FROM {$server->charMapDatabase}.items WHERE id IN ($ids)\";\n\t\t\t$sth = $server->connection->getStatement($sql);\n\n\t\t\t$sth->execute($cardIDs);\n\t\t\t$temp = $sth->fetchAll();\n\t\t\tif ($temp) {\n\t\t\t\tforeach ($temp as $card) {\n\t\t\t\t\t$cards[$card->id] = $card->name_english;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$itemAttributes = Flux::config('Attributes')->toArray();\n\t$type_list = Flux::config('ItemTypes')->toArray();\n}\n?>\n"
  },
  {
    "path": "modules/history/cplogin.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('HistoryCpLoginTitle');\n$loginLogTable = Flux::config('FluxTables.LoginLogTable');\n\n// Partial SQL query.\n$sqlpartial = \"WHERE account_id = ?\";\n$bind       = array($session->account->account_id);\n\n// Fetch record count.\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$loginLogTable $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n// Paginator.\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('login_date' => 'desc', 'ip', 'error_code'));\n\n// Fetch actual record data.\n$sql = \"SELECT ip, login_date, error_code FROM {$server->loginDatabase}.$loginLogTable $sqlpartial\";\n$sql = $paginator->getSQL($sql);\n$sth = $server->connection->getStatement($sql);\n$sth->execute($bind);\n\n$logins = $sth->fetchAll();\n\nif ($logins) {\n\t$loginErrors = Flux::config('LoginErrors');\n\tforeach ($logins as $login) {\n\t\tif ($errorType=$loginErrors->get($login->error_code)) {\n\t\t\t$login->error_type = $errorType;\n\t\t}\n\t\telse {\n\t\t\t$login->error_type = null;\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/history/emailchange.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('HistoryEmailTitle');\n$emailChangeTable = Flux::config('FluxTables.ChangeEmailTable');\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$emailChangeTable WHERE account_id = ?\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute(array($session->account->account_id));\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('old_email', 'new_email', 'request_date', 'request_ip', 'change_date', 'change_ip', 'change_done'));\n\n$sql = \"SELECT old_email, new_email, request_date, request_ip, change_date, change_ip, change_done FROM {$server->loginDatabase}.$emailChangeTable WHERE account_id = ?\";\n$sql = $paginator->getSQL($sql);\n$sth = $server->connection->getStatement($sql);\n$sth->execute(array($session->account->account_id));\n\n$changes = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/history/gamelogin.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('HistoryGameLoginTitle');\n\nif ($server->loginServer->config->getNoCase() && $server->connection->isCaseSensitive($server->logsDatabase, 'loginlog', 'user', true)) {\n\t$user = 'LOWER(user)';\n\t$bind = array(strtolower($session->account->userid));\n}\nelse {\n\t$user = 'user';\n\t$bind = array($session->account->userid);\n}\n\n$bin = $server->loginServer->config->getNoCase() ? '' : 'BINARY';\n$sql = \"SELECT COUNT(*) AS total FROM {$server->logsDatabase}.loginlog WHERE $user = $bin ?\";\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute($bind);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('time' => 'desc', 'ip', 'rcode', 'log'));\n\n$sql = \"SELECT time, ip, rcode, log FROM {$server->logsDatabase}.loginlog WHERE $user = $bin ?\";\n$sql = $paginator->getSQL($sql);\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute($bind);\n\n$logins = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/history/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('HistoryIndexTitle');\n?>\n"
  },
  {
    "path": "modules/history/passchange.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('HistoryPassChangeTitle');\n$passwordChangeTable = Flux::config('FluxTables.ChangePasswordTable');\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$passwordChangeTable WHERE account_id = ?\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute(array($session->account->account_id));\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('change_date', 'change_ip'));\n\n$sql = \"SELECT change_date, change_ip FROM {$server->loginDatabase}.$passwordChangeTable WHERE account_id = ?\";\n$sql = $paginator->getSQL($sql);\n$sth = $server->connection->getStatement($sql);\n$sth->execute(array($session->account->account_id));\n\n$changes = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/history/passreset.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('HistoryPassResetTitle');\n$passResetTable = Flux::config('FluxTables.ResetPasswordTable');\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->loginDatabase}.$passResetTable WHERE account_id = ?\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute(array($session->account->account_id));\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('request_date', 'request_ip', 'reset_date', 'reset_ip', 'reset_done'));\n\n$sql = \"SELECT request_date, request_ip, reset_date, reset_ip, reset_done FROM {$server->loginDatabase}.$passResetTable WHERE account_id = ?\";\n$sql = $paginator->getSQL($sql);\n$sth = $server->connection->getStatement($sql);\n$sth->execute(array($session->account->account_id));\n\n$resets = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/install/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\nrequire_once 'Flux/Installer/SchemaPermissionError.php';\n\n// Force debug mode off here.\nFlux::config('DebugMode', false);\n\n// Define minimum requirements.\n$requiredExtensions = array(\n\t'pdo',\n\t'pdo_mysql',\n\t'curl',\n\t//'gd',\n\t//'dom',\n\t//'json',\n\t//'mbstring',\n\t//'zip',\n\t'xml',\n\t'xmlreader',\n\t'mysqli'\n);\n\n$minimumVersionCheck = [\n\t'php' => [\n\t\t'required' => '7.3.0',\n\t\t'recommended' => '8.4.0'\n\t],\n\t'mysql' => [\n\t\t'required' => '5.0.0',\n\t\t'recommended' => '8.0.44'\n\t]\n];\n$sth = $server->connection->getStatement(\"SELECT VERSION() AS mysql_version, CURRENT_USER() AS mysql_user\");\n$sth->execute();\n$res = $sth->fetch();\n\n$permissionsChecks = [\n\tFLUX_DATA_DIR.'/logs'\t\t=> 'log storage',\n\tFLUX_DATA_DIR.'/itemshop'\t=> 'item shop image',\n\tFLUX_DATA_DIR.'/tmp'\t\t=> 'temporary'\n];\n\nif ($session->installerAuth) {\n\tif ($params->get('logout')) {\n\t\t$session->setInstallerAuthData(false);\n\t}\n\telse {\n\t\t$requiredMySqlVersion = '5.0';\n\n\t\tforeach (Flux::$loginAthenaGroupRegistry as $serverName => $loginAthenaGroup) {\n\t\t\t$sth = $loginAthenaGroup->connection->getStatement(\"SELECT VERSION() AS mysql_version, CURRENT_USER() AS mysql_user\");\n\t\t\t$sth->execute();\n\t\t\t\n\t\t\t$res = $sth->fetch();\n\t\t\tif (!$res || version_compare($res->mysql_version, $requiredMySqlVersion, '<')) {\n\t\t\t\t$message  = \"MySQL version $requiredMySqlVersion or greater is required for Flux.\";\n\t\t\t\t$message .= $res ? \" You are running version {$res->mysql_version}\" : \"You are running an unknown version\";\n\t\t\t\t$message .= \" on the server '$serverName'\"; \n\t\t\t\tthrow new Flux_Error($message);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($params->get('update_all')) {\n\t\t\ttry {\n\t\t\t\t$installer->updateAll();\n\t\t\t\tif (!$installer->updateNeeded()) {\n\t\t\t\t\t$session->setMessageData('Updates have been installed.');\n\t\t\t\t\t$session->setInstallerAuthData(false);\n\t\t\t\t\t$this->redirect();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Flux_Installer_SchemaPermissionError $e) {\n\t\t\t\t$permissionError = $e;\n\t\t\t}\n\t\t}\n\t\telseif (($username=$params->get('username')) && $username instanceOf Flux_Config &&\n\t\t\t\t($password=$params->get('password')) && $password instanceOf Flux_Config &&\n\t\t\t\t($update=$params->get('update')) && $update instanceOf Flux_Config) {\n\t\t\t\t\n\t\t\t$server64     = key($update->toArray());\n\t\t\t$username     = $username->get($server64);\n\t\t\t$password     = $password->get($server64);\n\t\t\t$serverName   = base64_decode($server64);\n\t\t\t$server       = array_key_exists($serverName, $installer->servers) ? $installer->servers[$serverName] : false;\n\t\t\t$updateNeeded = false;\n\t\t\t\n\t\t\tif ($server) {\n\t\t\t\tforeach ($server->schemas as $schema) {\n\t\t\t\t\tif (!$schema->isLatest()) {\n\t\t\t\t\t\t$updateNeeded = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$updateNeeded) {\n\t\t\t\t\tforeach ($server->charMapServers as $charMapServer) {\n\t\t\t\t\t\tforeach ($charMapServer->schemas as $schema) {\n\t\t\t\t\t\t\tif (!$schema->isLatest()) {\n\t\t\t\t\t\t\t\t$updateNeeded = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (!$updateNeeded || !$server) {\n\t\t\t\t$errorMessage = 'Invalid server or the server has no updates.';\n\t\t\t}\n\t\t\telseif (!$username || !$password) {\n\t\t\t\t$errorMessage = \"Username and password are required for individual server updates.\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$connection = $server->loginAthenaGroup->connection;\n\t\t\t\t$connection->reconnectAs($username, $password);\n\t\t\t\ttry {\n\t\t\t\t\t$server->updateAll();\n\t\t\t\t\t$session->setMessageData(\"Updates for $serverName have been installed.\");\n\t\t\t\t\t$this->redirect();\n\t\t\t\t}\n\t\t\t\tcatch (Flux_Installer_SchemaPermissionError $e) {\n\t\t\t\t\t$permissionError = $e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nif (count($_POST) && !$session->installerAuth) {\n\t$inputPassword  = $params->get('installer_password');\n\t$actualPassword = Flux::config('InstallerPassword');\n\t\n\tif ($inputPassword == $actualPassword) {\n\t\t$session->setInstallerAuthData(true);\n\t}\n\telse {\n\t\t$errorMessage = 'Incorrect password.';\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/install/reinstall.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Re-Install Database Schemas';\n\nif (count($_POST) && $params->get('reinstall')) {\n\t$loginDbFiles   = glob(FLUX_DATA_DIR.'/logs/schemas/logindb/*/*.txt');\n\t$charMapDbFiles = glob(FLUX_DATA_DIR.'/logs/schemas/charmapdb/*/*.txt');\n\t\n\tforeach (array($loginDbFiles, $charMapDbFiles) as $dbDir) {\n\t\tif ($dbDir) {\n\t\t\tforeach ($dbDir as $file) {\n\t\t\t\tunlink($file);\n\t\t\t}\n\t\t\t// Attempt to unlink the directory, but let's not display an error if\n\t\t\t// there are still files in it.\n\t\t\t@rmdir($dbDir);\n\t\t}\n\t}\n\t\n\t$this->redirect();\n}\n?>\n"
  },
  {
    "path": "modules/ipban/add.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('IpbanAddTitle');\n\nif (count($_POST)) {\n\tif (!$params->get('addipban')) {\n\t\t$this->deny();\n\t}\n\t\n\t$list   = trim($params->get('list'));\n\t$reason = trim($params->get('reason'));\n\t$rtime  = trim($params->get('rtime_date'));\n\t\n\tif (!$list) {\n\t\t$errorMessage = Flux::message('IpbanEnterIpPattern');\n\t}\n\telseif (!preg_match('/^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]|\\*)\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]|\\*)\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]|\\*)$/', $list, $m)) {\n\t\t$errorMessage = Flux::message('IpbanInvalidPattern');\n\t}\n\telseif (preg_match('/' . Flux::config('IpWhitelistPattern') . '/', $list)) {\n\t\t$errorMessage = Flux::message('IpbanWhitelistedPattern');\n\t}\n\telseif (!$reason) {\n\t\t$errorMessage = Flux::message('IpbanEnterReason');\n\t}\n\telseif (!$rtime) {\n\t\t$errorMessage = Flux::message('IpbanSelectUnbanDate');\n\t}\n\telseif (strtotime($rtime) <= time()) {\n\t\t$errorMessage = Flux::message('IpbanFutureDate');\n\t}\n\telse {\n\t\t$listArr   = array();\n\t\t$listArr[] = sprintf('%u.*.*.*', $m[1]);\n\t\t$listArr[] = sprintf('%u.%u.*.*', $m[1], $m[2]);\n\t\t$listArr[] = sprintf('%u.%u.%u.*', $m[1], $m[2], $m[3]);\n\t\t$listArr[] = sprintf('%u.%u.%u.%u', $m[1], $m[2], $m[3], $m[4]);\n\t\t\n\t\t$sql  = \"SELECT list FROM {$server->loginDatabase}.ipbanlist WHERE rtime > NOW() AND \";\n\t\t$sql .= \"(list = ? OR list = ? OR list = ? OR list = ?) LIMIT 1\";\n\t\t$sth  = $server->connection->getStatement($sql);\n\t\t\n\t\t$sth->execute($listArr);\n\t\t$ipban = $sth->fetch();\n\t\t\n\t\tif ($ipban && $ipban->list) {\n\t\t\t$errorMessage = sprintf(Flux::message('IpbanAlreadyBanned'), $ipban->list);\n\t\t}\n\t\telse if ($server->loginServer->addIpBan($session->account->account_id, $reason, $rtime, $list)) {\n\t\t\t$session->setMessageData(sprintf(Flux::message('IpbanPatternBanned'), $list));\n\t\t\t$this->redirect($this->url('ipban'));\n\t\t}\n\t\telse {\n\t\t\t$errorMessage = Flux::message('IpbanAddFailed');\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/ipban/edit.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('IpbanEditTitle');\n\n$banID = $params->get('list');\n\nif (!$auth->allowedToModifyIpBan || !$banID) {\n\t$this->deny();\n}\n\n$sql  = \"SELECT list, reason, rtime FROM {$server->loginDatabase}.ipbanlist \";\n$sql .= \"WHERE rtime > NOW() AND list = ? LIMIT 1\";\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($banID));\n\n$ipban = $sth->fetch();\n\nif (count($_POST)) {\n\tif (!$params->get('modipban')) {\n\t\t$this->deny();\n\t}\n\t\n\t$list       = trim($params->get('newlist'));\n\t$reason     = trim($params->get('reason'));\n\t$rtime      = trim($params->get('rtime_date'));\n\t$editReason = trim($params->get('edit_reason'));\n\t\n\tif (!$list) {\n\t\t$errorMessage = Flux::message('IpbanEnterIpPattern');\n\t}\n\telseif (!preg_match('/^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]|\\*)\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]|\\*)\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]|\\*)$/', $list, $m)) {\n\t\t$errorMessage = Flux::message('IpbanInvalidPattern');\n\t}\n\telseif (preg_match('/' . Flux::config('IpWhitelistPattern') . '/', $list)) {\n\t\t$errorMessage = Flux::message('IpbanWhitelistedPattern');\n\t}\n\telseif (!$reason) {\n\t\t$errorMessage = Flux::message('IpbanEnterReason');\n\t}\n\telseif (!$rtime) {\n\t\t$errorMessage = Flux::message('IpbanSelectUnbanDate');\n\t}\n\telseif (!$editReason) {\n\t\t$errorMessage = Flux::message('IpbanEnterEditReason');\n\t}\n\telseif (strtotime($rtime) <= time()) {\n\t\t$errorMessage = Flux::message('IpbanFutureDate');\n\t}\n\telse {\n\t\tif ($list != $ipban->list) {\n\t\t\t$listArr   = array();\n\t\t\t$listArr[] = sprintf('%u.*.*.*', $m[1]);\n\t\t\t$listArr[] = sprintf('%u.%u.*.*', $m[1], $m[2]);\n\t\t\t$listArr[] = sprintf('%u.%u.%u.*', $m[1], $m[2], $m[3]);\n\t\t\t$listArr[] = sprintf('%u.%u.%u.%u', $m[1], $m[2], $m[3], $m[4]);\n\n\t\t\t$sql  = \"SELECT list FROM {$server->loginDatabase}.ipbanlist WHERE rtime > NOW() AND \";\n\t\t\t$sql .= \"(list = ? OR list = ? OR list = ? OR list = ?) LIMIT 1\";\n\t\t\t$sth  = $server->connection->getStatement($sql);\n\n\t\t\t$sth->execute($listArr);\n\t\t\t$ipban2 = $sth->fetch();\n\t\t\t\n\t\t\tif ($ipban2 && $ipban2->list) {\n\t\t\t\t$errorMessage = sprintf(Flux::message('IpbanAlreadyBanned'), $ipban2->list);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (empty($errorMessage)) {\n\t\t\tif ($server->loginServer->removeIpBan($session->account->account_id, $editReason, $ipban->list)\n\t\t\t\t&& $server->loginServer->addIpBan($session->account->account_id, $reason, $rtime, $list)\n\t\t\t) {\n\t\t\t\t$session->setMessageData(sprintf(Flux::message('IpbanPatternBanned'), $list));\n\t\t\t\t$this->redirect($this->url('ipban'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$errorMessage = Flux::message('IpbanEditFailed');\n\t\t\t}\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/ipban/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('IpbanListTitle');\n\n$sqlpartial = \"WHERE rtime > NOW() \";\n\n$sql = \"SELECT COUNT(list) AS total FROM {$server->loginDatabase}.ipbanlist $sqlpartial\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('list', 'btime' => 'desc', 'rtime', 'reason'));\n\n$sql = $paginator->getSQL(\"SELECT list, btime, rtime, reason FROM {$server->loginDatabase}.ipbanlist $sqlpartial\");\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n\n$banlist = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/ipban/remove.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = Flux::message('IpbanRemoveTitle');\n\n$list = $params->get('list');\n\nif (!$auth->allowedToRemoveIpBan || !$list) {\n\t$this->deny();\n}\n\n$sql  = \"SELECT list FROM {$server->loginDatabase}.ipbanlist \";\n$sql .= \"WHERE rtime > NOW() AND list = ? LIMIT 1\";\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($list));\n\n$ipban = $sth->fetch();\n\nif (count($_POST)) {\n\tif (!$params->get('remipban')) {\n\t\t$this->deny();\n\t}\n\t\n\t$reason = trim($params->get('reason'));\n\t\n\tif (!$list) {\n\t\t$errorMessage = Flux::message('IpbanEnterIpPattern');\n\t}\n\telseif (!preg_match('/^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]|\\*)\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]|\\*)\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]|\\*)$/', $list, $m)) {\n\t\t$errorMessage = Flux::message('IpbanInvalidPattern');\n\t}\n\telseif (!$reason) {\n\t\t$errorMessage = Flux::message('IpbanEnterRemoveReason');\n\t}\n\telseif (!$ipban || !$ipban->list) {\n\t\t$errorMessage = sprintf(Flux::message('IpbanNotBanned'), $list);\n\t}\n\telseif ($server->loginServer->removeIpBan($session->account->account_id, $reason, $list)) {\n\t\t$session->setMessageData(sprintf(Flux::message('IpbanPatternUnbanned'), $list));\n\t\t$this->redirect($this->url('ipban'));\n\t}\n\telse {\n\t\t$errorMessage = Flux::message('IpbanRemoveFailed');\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/ipban/unban.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\nif (!count($_POST) || !$params->get('unban') ) {\n\t$this->deny();\n}\n\nif (!(($unbanList=$params->get('unban_list')) instanceOf Flux_Config) || !count($unbanList=$unbanList->toArray())) {\n\t$session->setMessageData(Flux::message('IpbanNothingToUnban'));\n}\nelse {\n\t$reason = trim($params->get('reason'));\n\t\n\tif (!$reason) {\n\t\t$session->setMessageData(Flux::message('IpbanEnterUnbanReason'));\n\t}\n\telse {\n\t\t$didAllSucceed = true;\n\t\t$numFailed = 0;\n\t\t\n\t\tforeach ($unbanList as $unban) {\n\t\t\tif (!$server->loginServer->removeIpBan($session->account->account_id, $reason, $unban)) {\n\t\t\t\t$didAllSucceed = false;\n\t\t\t\t$numFailed++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($didAllSucceed) {\n\t\t\t$session->setMessageData(Flux::message('IpbanUnbanned'));\n\t\t}\n\t\telse {\n\t\t\t$session->setMessageData(sprintf(Flux::message('IpbanUnbanFailed'), $numFailed));\n\t\t}\n\t}\n}\n\n$this->redirect($this->url('ipban'));\n?>\n"
  },
  {
    "path": "modules/item/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'List Items';\n\nrequire_once 'Flux/TemporaryTable.php';\n\n$equip_list = array_keys(Flux::config('EquipLocations')->toArray());\n\ntry {\n\tif($server->isRenewal) {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n\t} else {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n\t}\n\t$tableName = \"{$server->charMapDatabase}.items\";\n\t$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n\t$shopTable = Flux::config('FluxTables.ItemShopTable');\n\t\n\t// Statement parameters, joins and conditions.\n\t$bind        = array();\n\t$sqlpartial  = \"LEFT OUTER JOIN {$server->charMapDatabase}.$shopTable ON $shopTable.nameid = items.id \";\n\t$sqlpartial .= \"WHERE 1=1 \";\n\t$itemID      = $params->get('item_id');\n\t\n\tif ($itemID) {\n\t\t$sqlpartial .= \"AND items.id = ? \";\n\t\t$bind[]      = $itemID;\n\t}\n\telse {\n\t\t$opMapping    = array('eq' => '=', 'gt' => '>', 'lt' => '<');\n\t\t$opValues     = array_keys($opMapping);\n\t\t$itemName     = $params->get('name');\n\t\t$itemType     = $params->get('type');\n\t\t$equipLoc     = $params->get('equip_loc');\n\t\t$npcBuy       = $params->get('npc_buy');\n\t\t$npcBuyOp     = $params->get('npc_buy_op');\n\t\t$npcSell      = $params->get('npc_sell');\n\t\t$npcSellOp    = $params->get('npc_sell_op');\n\t\t$weight       = $params->get('weight');\n\t\t$weightOp     = $params->get('weight_op');\n\t\t$attack       = $params->get('attack');\n\t\t$attackOp     = $params->get('attack_op');\n\t\t$defense      = $params->get('defense');\n\t\t$defenseOp    = $params->get('defense_op');\n\t\t$range        = $params->get('range');\n\t\t$rangeOp      = $params->get('range_op');\n\t\t$slots        = $params->get('slots');\n\t\t$slotsOp      = $params->get('slots_op');\n\t\t$refineable   = $params->get('refineable');\n\t\t$forSale      = $params->get('for_sale');\n\t\t$custom       = $params->get('custom');\n\t\t\n\t\tif ($itemName) {\n\t\t\t$sqlpartial .= \"AND (name_english LIKE ? OR name_english = ?) \";\n\t\t\t$bind[]      = \"%$itemName%\";\n\t\t\t$bind[]      = $itemName;\n\t\t}\n\n\t\tif ($itemType && $itemType !== '-1') {\n\t\t\tif (count($itemTypeSplit = explode('-', $itemType)) == 2) {\n\t\t\t\t$itemType = $itemTypeSplit[0];\n\t\t\t\t$itemType2 = $itemTypeSplit[1];\n\t\t\t}\n\t\t\tif ($itemType) {\n\t\t\t\t$itemTypes = Flux::config('ItemTypes')->toArray();\n\t\t\t\tif (array_key_exists($itemType, $itemTypes) && $itemTypes[$itemType]) {\n\t\t\t\t\t$sqlpartial .= \"AND type = ? \";\n\t\t\t\t\t$bind[]      = $itemType;\n\t\t\t\t} else {\n\t\t\t\t\t$sqlpartial .= 'AND type IS NULL ';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (count($itemTypeSplit) == 2 && $itemType2) {\n\t\t\t\t\t$itemTypes2 = Flux::config('ItemSubTypes')->toArray();\n\t\t\t\t\tif (array_key_exists($itemType, $itemTypes2) && array_key_exists($itemType2, $itemTypes2[$itemType]) && $itemTypes2[$itemType][$itemType2]) {\n\t\t\t\t\t\t$sqlpartial .= \"AND subtype = ? \";\n\t\t\t\t\t\t$bind[]      = $itemType2;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sqlpartial .= 'AND subtype IS NULL ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$typeName   = preg_quote($itemType, '/');\n\t\t\t\t$itemTypes  = preg_grep(\"/.*?$typeName.*?/i\", Flux::config('ItemTypes')->toArray());\n\t\t\t\t\n\t\t\t\tif (count($itemTypes)) {\n\t\t\t\t\t$itemTypes   = array_keys($itemTypes);\n\t\t\t\t\t$sqlpartial .= \"AND (\";\n\t\t\t\t\t$partial     = '';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($itemTypes as $id) {\n\t\t\t\t\t\t$partial .= \"type = ? OR \";\n\t\t\t\t\t\t$bind[]   = $id;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$partial     = preg_replace('/\\s*OR\\s*$/', '', $partial);\n\t\t\t\t\t$sqlpartial .= \"$partial) \";\n\t\t\t\t} else {\n\t\t\t\t\t$sqlpartial .= 'AND type IS NULL ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($equipLoc !== false && !is_null($equipLoc) && $equipLoc !== '-1') {\n\t\t\t$equipLocs = explode('/', $equipLoc);\n\n\t\t\tif($equipLoc && count($equipLocs) == 1) {\n\t\t\t\t$equipLocations = Flux::config('EquipLocations')->toArray();\n\t\t\t\tif (array_key_exists($equipLoc, $equipLocations) && $equipLocations[$equipLoc]) {\n\t\t\t\t\tif ($equipLoc === '0') {\n\t\t\t\t\t\t$sqlpartial .= \"AND ($equipLoc = 0 OR $equipLoc IS NULL) \";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sqlpartial .= \"AND $equipLoc = ? \";\n\t\t\t\t\t\t$bind[]      = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (in_array($npcBuyOp, $opValues) && trim($npcBuy) != '') {\n\t\t\t$op = $opMapping[$npcBuyOp];\n\t\t\tif ($op == '=' && $npcBuy === '0') {\n\t\t\t\t$sqlpartial .= \"AND (price_buy IS NULL OR price_buy = 0) \";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sqlpartial .= \"AND price_buy $op ? \";\n\t\t\t\t$bind[]      = $npcBuy;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (in_array($npcSellOp, $opValues) && trim($npcSell) != '') {\n\t\t\t$op = $opMapping[$npcSellOp];\n\t\t\tif ($op == '=' && $npcSell === '0') {\n\t\t\t\t$sqlpartial .= \"AND IFNULL(price_sell, FLOOR(price_buy/2)) = 0 \";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sqlpartial .= \"AND IFNULL(price_sell, FLOOR(price_buy/2)) $op ? \";\n\t\t\t\t$bind[]      = $npcSell;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (in_array($weightOp, $opValues) && trim($weight) != '') {\n\t\t\t$op = $opMapping[$weightOp];\n\t\t\tif ($op == '=' && $weight === '0') {\n\t\t\t\t$sqlpartial .= \"AND (weight IS NULL OR weight = 0) \";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sqlpartial .= \"AND CAST(weight/10 AS UNSIGNED INTEGER) $op ? \";\n\t\t\t\t$bind[]      = $weight;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!$server->isRenewal && in_array($attackOp, $opValues) && trim($attack) != '') {\n\t\t\t$op = $opMapping[$attackOp];\n\t\t\tif ($op == '=' && $attack === '0') {\n\t\t\t\t$sqlpartial .= \"AND (attack IS NULL OR attack = 0) \";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sqlpartial .= \"AND attack $op ? \";\n\t\t\t\t$bind[]      = $attack;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (in_array($defenseOp, $opValues) && trim($defense) != '') {\n\t\t\t$op = $opMapping[$defenseOp];\n\t\t\tif ($op == '=' && $defense === '0') {\n\t\t\t\t$sqlpartial .= \"AND (defense IS NULL OR defense = 0) \";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sqlpartial .= \"AND defense $op ? \";\n\t\t\t\t$bind[]      = $defense;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (in_array($rangeOp, $opValues) && trim($range) != '') {\n\t\t\t$op = $opMapping[$rangeOp];\n\t\t\tif ($op == '=' && $range === '0') {\n\t\t\t\t$sqlpartial .= \"AND (`range` IS NULL OR `range` = 0) \";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sqlpartial .= \"AND `range` $op ? \";\n\t\t\t\t$bind[]      = $range;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (in_array($slotsOp, $opValues) && trim($slots) != '') {\n\t\t\t$op = $opMapping[$slotsOp];\n\t\t\tif ($op == '=' && $slots === '0') {\n\t\t\t\t$sqlpartial .= \"AND (slots IS NULL OR slots = 0) \";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sqlpartial .= \"AND slots $op ? \";\n\t\t\t\t$bind[]      = $slots;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($refineable) {\n\t\t\tif ($refineable == 'yes') {\n\t\t\t\t$sqlpartial .= \"AND refineable > 0 \";\n\t\t\t}\n\t\t\telseif ($refineable == 'no') {\n\t\t\t\t$sqlpartial .= \"AND IFNULL(refineable, 0) < 1 \";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($forSale) {\n\t\t\tif ($forSale == 'yes') {\n\t\t\t\t$sqlpartial .= \"AND $shopTable.cost > 0 \";\n\t\t\t}\n\t\t\telseif ($forSale == 'no') {\n\t\t\t\t$sqlpartial .= \"AND IFNULL($shopTable.cost, 0) < 1 \";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($custom) {\n\t\t\tif ($custom == 'yes') {\n\t\t\t\t$sqlpartial .= \"AND origin_table LIKE '%item_db2' \";\n\t\t\t}\n\t\t\telseif ($custom == 'no') {\n\t\t\t\t$sqlpartial .= \"AND origin_table LIKE '%item_db' \";\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Get total count and feed back to the paginator.\n\t$sth = $server->connection->getStatement(\"SELECT COUNT(DISTINCT items.id) AS total FROM $tableName $sqlpartial\");\n\t$sth->execute($bind);\n\t\n\t$paginator = $this->getPaginator($sth->fetch()->total);\n\t$sortable = array(\n\t\t'item_id' => 'asc', 'name', 'type', 'subtype', 'price_buy', 'price_sell', 'weight',\n\t\t'attack', 'defense', 'range', 'slots', 'refineable', 'cost', 'origin_table'\n\t);\n\tif($server->isRenewal) {\n\t\t$sortable[] = 'magic_attack';\n\t}\n\t$paginator->setSortableColumns($sortable);\n\t\n\t$col  = \"items.id AS item_id, name_english AS name, type, subtype, \";\n\t$col .= \"price_buy, weight/10 AS weight, \";\n\t$col .= \"defense, `range`, slots, refineable, cost, $shopTable.id AS shop_item_id, \";\n\t$col .= \"IFNULL(price_sell, FLOOR(price_buy/2)) AS price_sell, view, attack, \";\n\t$col .= implode(', ', $equip_list).', ';\n\tif($server->isRenewal)\t$col .= 'magic_attack, ';\n\t$col .= \"origin_table\";\n\n\t$sql  = $paginator->getSQL(\"SELECT $col FROM $tableName $sqlpartial GROUP BY items.id, $shopTable.id\");\n\t$sth  = $server->connection->getStatement($sql);\n\t\n\t$sth->execute($bind);\n\t$items = $sth->fetchAll();\n\t\n\t$authorized = $auth->actionAllowed('item', 'view');\n\t\n\tforeach ($items as $item) {\n\t\t// Equip location\n\t\t$equip_location = array();\n\t\t$item->equip_location = array();\n\t\tforeach($equip_list as $eq_loc) if($item->$eq_loc) $equip_location[] = $eq_loc;\n\t\t$item->equip_location = $equip_location;\n\t}\n\t\n\tif ($items && count($items) === 1 && $authorized && Flux::config('SingleMatchRedirectItem')) {\n\t\t$this->redirect($this->url('item', 'view', array('id' => $items[0]->item_id)));\n\t}\n}\ncatch (Exception $e) {\n\tif (isset($tempTable) && $tempTable) {\n\t\t// Ensure table gets dropped.\n\t\t$tempTable->drop();\n\t}\n\t\n\t// Raise the original exception.\n\t$class = get_class($e);\n\tthrow new $class($e->getMessage());\n}\n?>\n"
  },
  {
    "path": "modules/item/iteminfo.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\nrequire_once 'Flux/FileLoad.php';\n$itemDescTable = Flux::config('FluxTables.ItemDescTable');\n$title = 'Item Info';\n$fileLoad = new FileLoad();\n\n// upload and parse map.\nif($files->get('iteminfo')) {\n    $itemInfo = FLUX_ROOT . '/itemInfo.lua';\n    $is_loaded = $fileLoad->load($files->get('iteminfo'), $itemInfo);\n    if($is_loaded === true) {\n        $fp = @fopen($itemInfo, 'r'); \n        if($fp){ $array = explode(\"\\n\", fread($fp, filesize($itemInfo))); }\n        fclose($fp);\n        $ca = count($array);\n        $check = false; // True: execute query\n        $checkingdesc = false;\n        $desccomplete = false;\n        $last_setid = 0;\n        $desc = '';\n        $setid = 0;\n        $first = true;\n\n        for($i=0; $i < $ca; $i++){\n            // Item ID\n            if (preg_match('/\\[(\\d+)\\]/', $array[$i], $matches)) {\n                if ($first) {\n                    $setid = $matches[1];\n                    $first = false;\n                    continue;\n                }\n                if ($setid != $matches[1] && $checkingdesc) {\n                    $itemid = $setid;\n                    $desccomplete = true;\n                    $check = true;\n                }\n                $setid = $matches[1];\n            }\n\n            // Description Inline type\n            // identifiedDescriptionName = { \"desc1\", \"desc2\" },\n            if (preg_match('/^identifiedDescriptionName[ ]=[ ]\\{(.*)\\},/', $array[$i], $matches)) {\n                $tmp = trim($matches[1]);\n                $tmp = substr($tmp,0,strpos($tmp,\"},\"));\n                $str = preg_split('/(\",|\"$)/', $tmp);\n                foreach ($str as $x => $de) {\n                    $de = trim($de);\n                    $p = strtok($de,'\"'); // Remove first quote\n                    $desc .= $p.\"<br />\";\n                }\n                $check = true;\n                $desccomplete = true;\n            }\n\n            // Description Multiline type\n            // identifiedDescriptionName = {\n            //     \"desc1\",\n            //     \"desc2\"\n            // },\n            if (!$desccomplete && preg_match('/([ \\s]+|^)identifiedDescriptionName[ ]=[ ]\\{[\\r\\n]*/', $array[$i])) {\n                $checkingdesc = true;\n            }\n            if ($checkingdesc && preg_match('/\"(.*)(\",{0,1})[\\r\\n]*/', $array[$i], $matches)) {\n                $tmp = trim($matches[1]);\n                $desc .= $tmp;\n                if ($matches[2] == '\",')\n                    $desc .= \"<br />\";\n            }\n\n            if ($check) {\n                $newdesc = '';\n                $hasColor = false;\n                $p = strtok($desc, \"^\");\n                while ($p) {\n                    if (preg_match('/([\\dA-Fa-f]{6})/', $p, $matches)) {\n                        if ($hasColor)\n                            $newdesc .= \"</font>\";\n                        if ($matches[1] != '000000') {\n                            $newdesc .= \"<font color='#\".$matches[1].\"'>\";\n                            $hasColor = true;\n                        }\n                        else\n                            $hasColor = false;\n                        $newdesc .= substr($p,6,strlen($p));\n                    }\n                    else\n                        $newdesc .= $p;\n                    $p = strtok(\"^\");\n                }\n                if ($hasColor)\n                    $newdesc .= \"</font>\";\n                $sql = \"REPLACE INTO {$server->charMapDatabase}.$itemDescTable (`itemid`, `itemdesc`) VALUES ('\".($checkingdesc ? $itemid : $setid).\"','\".addslashes($newdesc).\"')\";\n                $sth = $server->connection->getStatement($sql);\n                $sth->execute();\n                $desc = '';\n                $check = false;\n                $checkingdesc = false;\n                $desccomplete = false;\n            }\n        }\n        $fileLoad->delete();\n    } else {\n        $errorMessage = $is_loaded;\n    }\n}\n\n$sth = $server->connection->getStatement(\"SELECT COUNT(itemid) AS count FROM {$server->charMapDatabase}.$itemDescTable\");\n$sth->execute();\n$return = $sth->fetch();\n"
  },
  {
    "path": "modules/item/pagemenu/view.php",
    "content": "<?php\n$pageMenu = array();\nif ($auth->actionAllowed('itemshop', 'add') && $auth->allowedToAddShopItem) {\n\tif ($item->cost) {\n\t\t$pageMenu['Add to Item Shop (Again)'] = $this->url('itemshop', 'add', array('id' => $item->item_id));\n\t}\n\telse {\n\t\t$pageMenu['Add to Item Shop'] = $this->url('itemshop', 'add', array('id' => $item->item_id));\n\t}\n}\nreturn $pageMenu;\n?>\n"
  },
  {
    "path": "modules/item/view.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Viewing Item';\n\nrequire_once 'Flux/TemporaryTable.php';\n\nif($server->isRenewal) {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n} else {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n}\n$tableName = \"{$server->charMapDatabase}.items\";\n$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n$shopTable = Flux::config('FluxTables.ItemShopTable');\n$itemDescTable = Flux::config('FluxTables.ItemDescTable');\n\n$itemID = $params->get('id');\n\n$job_list = array_keys($this->GetJobsList($server->isRenewal));\n$class_list = array_keys($this->GetClassList($server->isRenewal));\n$equip_list = array_keys(Flux::config('EquipLocations')->toArray());\n$trade_list = array_keys(Flux::config('TradeRestriction')->toArray());\n\n$col  = 'items.id AS item_id, name_aegis AS identifier, ';\n$col .= 'name_english AS name, type, subtype, ';\n$col .= 'price_buy, price_sell, weight/10 AS weight, attack, defense, `range`, slots, gender, ';\n$col .= 'weapon_level, equip_level_min, equip_level_max, refineable, view, alias_name, ';\n$col .= 'script, equip_script, unequip_script, origin_table, ';\n$col .= implode(', ', $job_list).', ';\t\t// Job list\n$col .= implode(', ', $class_list).', ';\t// Class list\n$col .= implode(', ', $equip_list).', ';\n$col .= implode(', ', $trade_list).', ';\t// Trade restriction list\n\n$col .= \"$shopTable.cost, $shopTable.id AS shop_item_id, \";\nif(Flux::config('ShowItemDesc')){\n    $col .= 'itemdesc, ';\n}\nif($server->isRenewal)\t$col .= 'magic_attack, ';\n$col .= 'origin_table';\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.items \";\n$sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.$shopTable ON $shopTable.nameid = items.id \";\nif(Flux::config('ShowItemDesc')){\n    $sql .= \"LEFT OUTER JOIN {$server->charMapDatabase}.$itemDescTable ON $itemDescTable.itemid = items.id \";\n}\n$sql .= \"WHERE items.id = ? LIMIT 1\";\n\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($itemID));\n\n$item = $sth->fetch();\n$isCustom = null;\n\nif ($item) {\n\t$title = \"Viewing Item ($item->name)\";\n\t$isCustom = (bool)preg_match('/item_db2$/', $item->origin_table);\n\n\t// Jobs\n\t$jobs = array();\n\tforeach($job_list as $job) if($item->$job) $jobs[] = $job;\n\t// Classes\n\t$upper = array();\n\tforeach($class_list as $class) if($item->$class) $upper[] = $class;\n\t// Equip location\n\t$equip_locs = array();\n\tforeach($equip_list as $eq_loc) if($item->$eq_loc) $equip_locs[] = $eq_loc;\n\t// Trade restrictions\n\t$restrictions = array();\n\tforeach($trade_list as $trade) if($item->$trade) $restrictions[] = $trade;\n\n\t$mobDB      = \"{$server->charMapDatabase}.monsters\";\n\tif($server->isRenewal) {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.mob_db_re\", \"{$server->charMapDatabase}.mob_db2_re\");\n\t} else {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.mob_db\", \"{$server->charMapDatabase}.mob_db2\");\n\t}\n\t$mobTable   = new Flux_TemporaryTable($server->connection, $mobDB, $fromTables);\n\n\t$col  = 'id AS monster_id, name_english AS monster_name, level AS monster_level, ';\n\t$col .= 'race AS monster_race, element AS monster_element, element_level AS monster_ele_lv, mvp_exp, `class` as boss, mode_mvp, ';\n\n\t// Normal drops.\n\t$col .= 'drop1_item, drop1_rate, drop1_nosteal, drop1_option, drop1_index, ';\n\t$col .= 'drop2_item, drop2_rate, drop2_nosteal, drop2_option, drop2_index, ';\n\t$col .= 'drop3_item, drop3_rate, drop3_nosteal, drop3_option, drop3_index, ';\n\t$col .= 'drop4_item, drop4_rate, drop4_nosteal, drop4_option, drop4_index, ';\n\t$col .= 'drop5_item, drop5_rate, drop5_nosteal, drop5_option, drop5_index, ';\n\t$col .= 'drop6_item, drop6_rate, drop6_nosteal, drop6_option, drop6_index, ';\n\t$col .= 'drop7_item, drop7_rate, drop7_nosteal, drop7_option, drop7_index, ';\n\t$col .= 'drop8_item, drop8_rate, drop8_nosteal, drop8_option, drop8_index, ';\n\t$col .= 'drop9_item, drop9_rate, drop9_nosteal, drop9_option, drop9_index, ';\n\t$col .= 'drop10_item, drop10_rate, drop10_nosteal, drop10_option, drop10_index, ';\n\n\t// MVP rewards.\n\t$col .= 'mvpdrop1_item, mvpdrop1_rate, mvpdrop1_option, mvpdrop1_index, ';\n\t$col .= 'mvpdrop2_item, mvpdrop2_rate, mvpdrop2_option, mvpdrop2_index, ';\n\t$col .= 'mvpdrop3_item, mvpdrop3_rate, mvpdrop3_option, mvpdrop3_index ';\n\n\t$sql  = \"SELECT $col FROM $mobDB WHERE \";\n\n\t// Normal drops.\n\t$sql .= 'drop1_item = ? OR ';\n\t$sql .= 'drop2_item = ? OR ';\n\t$sql .= 'drop3_item = ? OR ';\n\t$sql .= 'drop4_item = ? OR ';\n\t$sql .= 'drop5_item = ? OR ';\n\t$sql .= 'drop6_item = ? OR ';\n\t$sql .= 'drop7_item = ? OR ';\n\t$sql .= 'drop8_item = ? OR ';\n\t$sql .= 'drop9_item = ? OR ';\n\t$sql .= 'drop10_item = ? OR ';\n\n\t// MVP rewards.\n\t$sql .= 'mvpdrop1_item = ? OR ';\n\t$sql .= 'mvpdrop2_item = ? OR ';\n\t$sql .= 'mvpdrop3_item = ? ';\n\n\t$sth  = $server->connection->getStatement($sql);\n\t$res = $sth->execute(array_fill(0, 13, $item->identifier));\n\n\t$dropResults = $sth->fetchAll();\n\t$itemDrops   = array();\n\t$dropNames   = array(\n\t\t'drop1', 'drop2', 'drop3', 'drop4', 'drop5', 'drop6', 'drop7', 'drop8', 'drop9', 'drop10',\n\t\t'mvpdrop1', 'mvpdrop2', 'mvpdrop3'\n\t);\n\n\t// Sort callback.\n\tfunction __tmpSortDrops($arr1, $arr2)\n\t{\n\t\tif ($arr1['drop_rate'] == $arr2['drop_rate']) {\n\t\t\treturn strcmp($arr1['monster_name'], $arr2['monster_name']);\n\t\t}\n\n\t\treturn $arr1['drop_rate'] < $arr2['drop_rate'] ? 1 : -1;\n\t}\n\n\tforeach ($dropResults as $drop) {\n\t\tforeach ($dropNames as $dropName) {\n\t\t\t$dropID     = $drop->{$dropName.'_item'};\n\t\t\t$dropChance = $drop->{$dropName.'_rate'};\n\t\t\t$dropSteal  = $drop->{$dropName.'_nosteal'};\n\n\t\t\tif ($dropID == $item->identifier) {\n\t\t\t\t$dropArray = array(\n\t\t\t\t\t'monster_id'\t\t=> $drop->monster_id,\n\t\t\t\t\t'monster_name'\t\t=> $drop->monster_name,\n\t\t\t\t\t'monster_level'\t\t=> $drop->monster_level,\n\t\t\t\t\t'monster_race'\t\t=> $drop->monster_race,\n\t\t\t\t\t'monster_element'\t=> $drop->monster_element,\n\t\t\t\t\t'monster_ele_lv'\t=> $drop->monster_ele_lv,\n\t\t\t\t\t'drop_item'\t\t\t=> $itemID,\n\t\t\t\t\t'drop_rate'\t\t\t=> $dropChance,\n\t\t\t\t\t'drop_steal'\t\t=> ($dropSteal ? 'NoLabel' : 'YesLabel')\n\t\t\t\t);\n\n\t\t\t\t$is_boss = false;\n\t\t\t\t$is_mvp = false;\n\t\t\t\tif(!$drop->mode_mvp && $drop->boss)\n\t\t\t\t\t$is_boss = true;\n\t\t\t\tif($drop->mode_mvp && $drop->boss)\n\t\t\t\t\t$is_mvp = true;\n\n\t\t\t\tif (preg_match('/^mvp/', $dropName)) {\n\t\t\t\t\t$rate_adjust = $server->dropRates['MvpItem'];\n\t\t\t\t\t$ratemin = $server->dropRates['MvpItemMin'];\n\t\t\t\t\t$ratemax = $server->dropRates['MvpItemMax'];\n\t\t\t\t\t$dropArray['type'] = 'mvp';\n\t\t\t\t\t$dropArray['drop_steal'] = 'NoLabel';\n\t\t\t\t}\n\t\t\t\telseif (preg_match('/^drop/', $dropName)) {\n\t\t\t\t\tswitch($item->type) {\n\t\t\t\t\t\tcase 'Healing':\n\t\t\t\t\t\t\t$rate_adjust = $is_mvp ? $server->dropRates['HealMVP'] : ($is_boss ? $server->dropRates['HealBoss'] : $server->dropRates['Heal']);\n\t\t\t\t\t\t\t$ratemin = $server->dropRates['HealMin'];\n\t\t\t\t\t\t\t$ratemax = $server->dropRates['HealMax'];\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'Usable':\n\t\t\t\t\t\tcase 'Cash':\n\t\t\t\t\t\t\t$rate_adjust = $is_mvp ? $server->dropRates['UseableMVP'] : ($is_boss ? $server->dropRates['UseableBoss'] : $server->dropRates['Useable']);\n\t\t\t\t\t\t\t$ratemin = $server->dropRates['UseableMin'];\n\t\t\t\t\t\t\t$ratemax = $server->dropRates['UseableMax'];\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'Weapon':\n\t\t\t\t\t\tcase 'Armor':\n\t\t\t\t\t\tcase 'Petarmor':\n\t\t\t\t\t\t\t$rate_adjust = $is_mvp ? $server->dropRates['EquipMVP'] : ($is_boss ? $server->dropRates['EquipBoss'] : $server->dropRates['Equip']);\n\t\t\t\t\t\t\t$ratemin = $server->dropRates['EquipMin'];\n\t\t\t\t\t\t\t$ratemax = $server->dropRates['EquipMax'];\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'Card':\n\t\t\t\t\t\t\t$rate_adjust = $is_mvp ? $server->dropRates['CardMVP'] : ($is_boss ? $server->dropRates['CardBoss'] : $server->dropRates['Card']);\n\t\t\t\t\t\t\t$ratemin = $server->dropRates['CardMin'];\n\t\t\t\t\t\t\t$ratemax = $server->dropRates['CardMax'];\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$rate_adjust = $is_mvp ? $server->dropRates['CommonMVP'] : ($is_boss ? $server->dropRates['CommonBoss'] : $server->dropRates['Common']);\n\t\t\t\t\t\t\t$ratemin = $server->dropRates['CommonMin'];\n\t\t\t\t\t\t\t$ratemax = $server->dropRates['CommonMax'];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropArray['type'] = 'normal';\n\t\t\t\t}\n\n\t\t\t\t$ratemin /= 100;\n\t\t\t\t$ratemax /= 100;\n\t\t\t\t$ratecap = $server->dropRates['DropRateCap'] / 100;\n\n\t\t\t\t$dropArray['drop_rate'] = $this->cap_value($dropArray['drop_rate'] * $rate_adjust / 10000, $ratemin, $ratemax);\n\n\t\t\t\tif($dropArray['drop_rate'] > $ratecap)\n\t\t\t\t\t$dropArray['drop_rate'] = $ratecap;\n\t\t\t\t\n\t\t\t\t$itemDrops[] = $dropArray;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Sort so that monsters are ordered by drop chance and name.\n\tusort($itemDrops, '__tmpSortDrops');\n}\n?>\n"
  },
  {
    "path": "modules/itemshop/add.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit; \n\n$this->loginRequired();\n\n$title = 'Add Item to Shop';\n\nrequire_once 'Flux/TemporaryTable.php';\nrequire_once 'Flux/ItemShop.php';\n\n$itemID = $params->get('id');\n\n$category   = null;\n$categories = Flux::config('ShopCategories')->toArray();\n\nif($server->isRenewal) {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n} else {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n}\n$tableName = \"{$server->charMapDatabase}.items\";\n$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n$shopTable = Flux::config('FluxTables.ItemShopTable');\n\n$col = \"id AS item_id, name_english AS item_name, type\";\n$sql = \"SELECT $col FROM $tableName WHERE items.id = ?\";\n$sth = $server->connection->getStatement($sql);\n\n$sth->execute(array($itemID));\n$item = $sth->fetch();\n\n$stackable = false;\nif ($item && Flux::isStackableItemType($item->type)) {\n\t$stackable = true;\n}\n\nif ($item && count($_POST)) {\n\t$maxCost     = (int)Flux::config('ItemShopMaxCost');\n\t$maxQty      = (int)Flux::config('ItemShopMaxQuantity');\n\t$category    = $params->get('category');\n\t$shop        = new Flux_ItemShop($server);\n\t$cost        = (int)$params->get('cost');\n\t$quantity    = (int)$params->get('qty');\n\t$info        = trim(htmlspecialchars($params->get('info')));\n\t$image       = $files->get('image');\n\t$useExisting = (int)$params->get('use_existing');\n\t\n\tif (!$cost) {\n\t\t$errorMessage = 'You must input a credit cost greater than zero.';\n\t}\n\telseif ($cost > $maxCost) {\n\t\t$errorMessage = \"The credit cost must not exceed $maxCost.\";\n\t}\n\telseif (!$quantity) {\n\t\t$errorMessage = 'You must input a quantity greater than zero.';\n\t}\n\telseif ($quantity > 1 && !$stackable) {\n\t\t$errorMessage = 'This item is not stackable. Quantity must be 1.';\n\t}\n\telseif ($quantity > $maxQty) {\n\t\t$errorMessage = \"The item quantity must not exceed $maxQty.\";\n\t}\n\telseif (!$info) {\n\t\t$errorMessage = 'You must input at least some info text.';\n\t}\n\telse {\n\t\tif ($id=$shop->add($itemID, $category, $cost, $quantity, $info, $useExisting)) {\n\t\t\t$message = 'Item has been successfully added to the shop';\n\t\t\tif ($image && $image->get('size') && !$shop->uploadShopItemImage($id, $image)) {\n\t\t\t\t$message .= ', but the image failed to upload. You can re-attempt by modifying.';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$message .= '.';\n\t\t\t}\n\t\t\t$session->setMessageData($message);\n\t\t\t$this->redirect($this->url('purchase'));\t\n\t\t}\n\t\telse {\n\t\t\t$errorMessage = 'Failed to add the item to the shop.';\n\t\t}\n\t}\n}\n\nif (!$stackable) {\n\t$params->set('qty', 1);\n}\n?>\n"
  },
  {
    "path": "modules/itemshop/delete.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\nif (!$auth->allowedToDeleteShopItem) {\n\t$this->deny();\n}\n\nrequire_once 'Flux/ItemShop.php';\n\n$shop       = new Flux_ItemShop($server);\n$shopItemID = $params->get('id');\n$deleted    = $shopItemID ? $shop->delete($shopItemID) : false;\n\nif ($deleted) {\n\t$session->setMessageData('Item successfully deleted from the item shop.');\n\t$this->redirect($this->url('purchase'));\n}\n?>\n"
  },
  {
    "path": "modules/itemshop/edit.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit; \n\n$this->loginRequired();\n\n$title = 'Modify Item in the Shop';\n\nrequire_once 'Flux/TemporaryTable.php';\nrequire_once 'Flux/ItemShop.php';\n\n$stackable   = false;\n$shopItemID  = $params->get('id');\n$shop        = new Flux_ItemShop($server);\n$categories  = Flux::config('ShopCategories')->toArray();\n$item        = $shop->getItem($shopItemID);\n\nif ($item) {\n\tif($server->isRenewal) {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n\t} else {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n\t}\n\t$tableName = \"{$server->charMapDatabase}.items\";\n\t$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n\t$shopTable = Flux::config('FluxTables.ItemShopTable');\n\n\t$col = \"id AS item_id, name_english AS item_name, type\";\n\t$sql = \"SELECT $col FROM $tableName WHERE items.id = ?\";\n\t$sth = $server->connection->getStatement($sql);\n\n\t$sth->execute(array($item->shop_item_nameid));\n\t$originalItem = $sth->fetch();\n\n\tif ($originalItem && Flux::isStackableItemType($originalItem->type)) {\n\t\t$stackable = true;\n\t}\n\t\n\tif (count($_POST)) {\n\t\t$maxCost     = (int)Flux::config('ItemShopMaxCost');\n\t\t$maxQty      = (int)Flux::config('ItemShopMaxQuantity');\n\t\t$category    = $params->get('category');\n\t\t$cost        = (int)$params->get('cost');\n\t\t$quantity    = (int)$params->get('qty');\n\t\t$info        = trim($params->get('info'));\n\t\t$image       = $files->get('image');\n\t\t$useExisting = (int)$params->get('use_existing');\n\n\t\tif (!$cost) {\n\t\t\t$errorMessage = 'You must input a credit cost greater than zero.';\n\t\t}\n\t\telseif ($cost > $maxCost) {\n\t\t\t$errorMessage = \"The credit cost must not exceed $maxCost.\";\n\t\t}\n\t\telseif (!$quantity) {\n\t\t\t$errorMessage = 'You must input a quantity greater than zero.';\n\t\t}\n\t\telseif ($quantity > 1 && !$stackable) {\n\t\t\t$errorMessage = 'This item is not stackable. Quantity must be 1.';\n\t\t}\n\t\telseif ($quantity > $maxQty) {\n\t\t\t$errorMessage = \"The item quantity must not exceed $maxQty.\";\n\t\t}\n\t\telseif (!$info) {\n\t\t\t$errorMessage = 'You must input at least some info text.';\n\t\t}\n\t\telse {\n\t\t\tif ($shop->edit($shopItemID, $category, $cost, $quantity, $info, $useExisting)) {\n\t\t\t\tif ($image && $image->get('size') && !$shop->uploadShopItemImage($shopItemID, $image)) {\n\t\t\t\t\t$errorMessage = 'Failed to upload image.';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$session->setMessageData('Item has been successfully modified.');\n\t\t\t\t\t$this->redirect($this->url('purchase'));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$errorMessage = 'Failed to modify the item.';\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (empty($category)) {\n\t\t$category = $item->shop_item_category;\n\t}\n\tif (empty($cost)) {\n\t\t$cost = $item->shop_item_cost;\n\t}\n\tif (empty($quantity)) {\n\t\t$quantity = $item->shop_item_qty;\n\t}\n\tif (empty($info)) {\n\t\t$info = $item->shop_item_info;\n\t}\n}\n\nif (!$stackable) {\n\t$params->set('qty', 1);\n}\n?>\n"
  },
  {
    "path": "modules/itemshop/imagedel.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$shopItemID = $params->get('id');\n\nif (!$shopItemID) {\n\t$this->deny();\n}\n\nrequire_once 'Flux/ItemShop.php';\n\n$shop = new Flux_ItemShop($server);\n$shop->deleteShopItemImage($shopItemID);\n\n$session->setMessageData('Shop item image has been deleted.');\n$this->redirect($this->referer);\n?>\n"
  },
  {
    "path": "modules/logdata/branch.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('BranchLogTitle');\n\n$sql = \"SELECT COUNT(branch_id) AS total FROM {$server->logsDatabase}.branchlog\";\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('branch_date' => 'account_id', 'char_id', 'char_name', 'map'));\n\n$col = 'branch_id, branch_date, account_id, char_id, char_name, map';\n$sql = $paginator->getSQL(\"SELECT $col FROM {$server->logsDatabase}.branchlog\");\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$branchs = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/logdata/cashpoints.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('CashLogTitle');\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->logsDatabase}.cashlog\";\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('time' => 'desc', 'char_id', 'type', 'amount', 'map'));\n\n$col = \"time, char_id, type, amount, map\";\n$sql = $paginator->getSQL(\"SELECT $col FROM {$server->logsDatabase}.cashlog\");\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$logs = $sth->fetchAll();\n\nif ($logs) {\n\t$charIDs = array();\n\t$pickTypes = Flux::config('PickTypes');\n\n\tforeach ($logs as $log) {\n\t\t$charIDs[$log->char_id] = null;\n\n\t\tif ($log->type == 'M') {\n\t\t\t$mobIDs[$log->src_id] = null;\n\t\t}\n\t\telse {\n\t\t\t$srcIDs[$log->src_id] = null;\n\t\t}\n\n\t\t$log->pick_type = $pickTypes->get($log->type);\n\t}\n\n\tif ($charIDs || $srcIDs) {\n\t\t$charKeys = array_keys($charIDs);\n\n\t\t$search = implode(',', array_fill(0, count($charKeys), '?'));\n\t\t$sql  = \"SELECT char_id, name FROM {$server->charMapDatabase}.`char` \";\n\t\t$sql .= \"WHERE char_id IN (\".$search.\")\";\n\t\t$sth  = $server->connection->getStatement($sql);\n\t\t$sth->execute($charKeys);\n\n\t\t$ids = $sth->fetchAll();\n\n\t\t// Map char_id to name.\n\t\tforeach ($ids as $id) {\n\t\t\tif(array_key_exists($id->char_id, $charIDs)) {\n\t\t\t\t$charIDs[$id->char_id] = $id->name;\n\t\t\t}\n\t\t}\n\t}\n\n\tforeach ($logs as $log) {\n\t\tif (array_key_exists($log->char_id, $charIDs)) {\n\t\t\t$log->char_name = $charIDs[$log->char_id];\n\t\t}\n\t}\n}\n\n?>\n"
  },
  {
    "path": "modules/logdata/char.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('CharLogTitle');\n\n$sql = \"SELECT COUNT(time) AS total FROM {$server->charMapDatabase}.charlog\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('time' => 'char_msg', 'account_id', 'char_num', 'name'));\n\n$col = 'time, char_msg, account_id, char_num, name';\n$sql = $paginator->getSQL(\"SELECT $col FROM {$server->charMapDatabase}.charlog ORDER BY `time` DESC\");\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n\n$chars1 = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/logdata/chat.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'List Chat Messages';\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->logsDatabase}.chatlog\";\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'time' => 'desc', 'type', 'type_id', 'src_charid', 'src_accountid',\n\t'src_map', 'src_map_x', 'src_map_y', 'dst_charname', 'message'\n));\n\n$col  = 'time, type, type_id, src_charid, src_accountid, src_map, src_map_x, src_map_y, dst_charname, ';\n$col .= \"REPLACE(message, '|00', '') AS message\";\n$sql  = $paginator->getSQL(\"SELECT $col FROM {$server->logsDatabase}.chatlog\");\n$sth  = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$messages = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/logdata/command.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('CommandLogTitle');\n\n$sql = \"SELECT COUNT(atcommand_id) AS total FROM {$server->logsDatabase}.atcommandlog\";\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('atcommand_date' => 'desc', 'account_id', 'char_id', 'char_name', 'map', 'command'));\n\n$col = 'atcommand_id, atcommand_date, account_id, char_id, char_name, map, command';\n$sql = $paginator->getSQL(\"SELECT $col FROM {$server->logsDatabase}.atcommandlog\");\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$commands = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/logdata/feeding.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('FeedingLogTitle');\n\n$sql_param_str = '';\n$sql_params = array();\n\n$char_id = $params->get('char_id');\n$target = $params->get('target');\n$item_id = $params->get('item_id');\n$map = $params->get('map');\n$datefrom = $params->get('from_date');\n$dateto = $params->get('to_date');\n$type = array();\nif ($params->get('type')) {\n\t$type = $params->get('type')->toArray();\n\t$type = array_keys($type);\n}\nif ($char_id) {\n\t$sql_param_str .= '`char_id`=?';\n\t$sql_params[] = $char_id;\n}\nif ($item_id) {\n\tif ($sql_param_str)\n\t\t$sql_param_str .= ' AND ';\n\t$sql_param_str .= '`item_id`=?';\n\t$sql_params[] = $item_id;\n}\nif ($map) {\n\tif ($sql_param_str)\n\t\t$sql_param_str .= ' AND ';\n\t$sql_param_str .= '`map` LIKE ?';\n\t$sql_params[] = \"%$map%\";\n}\nif ($target) {\n\tif ($sql_param_str)\n\t\t$sql_param_str .= ' AND ';\n\t$sql_param_str .= '`target_class`=?';\n\t$sql_params[] = \"$target\";\n}\nif (count($type)) {\n\tif ($sql_param_str)\n\t\t$sql_param_str .= ' AND ';\n\t$sql_param_str .= '`type` IN ('.implode(',', array_fill(0, count($type), '?')).')';\n\t$sql_params = array_merge($sql_params, $type);\n}\nif ($datefrom || $dateto) {\n\tif ($sql_param_str)\n\t\t$sql_param_str .= ' AND ';\n\tif ($datefrom && $dateto) {\n\t\t$sql_param_str .= '(DATE_FORMAT(`time`,\\'%Y-%m-%d\\') BETWEEN CAST(? AS DATE) AND CAST(? AS DATE))';\n\t\t$sql_params[] = $datefrom;\n\t\t$sql_params[] = $dateto;\n\t}\n\telse if ($datefrom && !$dateto) {\n\t\t$sql_param_str .= '`time` >= ?';\n\t\t$sql_params[] = $datefrom;\n\t}\n\telse {\n\t\t$sql_param_str .= '`time` <= ?';\n\t\t$sql_params[] = $dateto;\n\t}\n}\n\n$sql = \"SELECT COUNT(`id`) AS total FROM {$server->logsDatabase}.feedinglog\";\nif ($sql_param_str)\n\t$sql .= \" WHERE \".$sql_param_str;\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute($sql_params);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'time' => 'DESC', 'char_id', 'target_class', 'type', 'item_id', 'map',\n));\n\n$sql = \"SELECT * \";\n$sql .= \"FROM {$server->logsDatabase}.feedinglog\";\nif ($sql_param_str)\n\t$sql .= \" WHERE \".$sql_param_str;\n$sql = $paginator->getSQL($sql);\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute($sql_params);\n\n$feeds = $sth->fetchAll();\n\nif ($feeds) {\n\t$itemIDs = array();\n\t$charIDs = array();\n\t$mobIDs = array();\n\t$feedTypes = Flux::config('FeedingTypes');\n\n\tforeach ($feeds as $log) {\n\t\t$itemIDs[$log->item_id] = null;\n\t\t$charIDs[$log->char_id] = null;\n\t\tif ($log->type == 'P')\n\t\t\t$mobIDs[$log->target_class] = null;\n\t\tif ($feedTypes) {\n\t\t\t$log->type_name = $feedTypes->get($log->type);\n\t\t}\n\t}\n\n\tif (count($charIDs)) {\n\t\t$charKeys = array_keys($charIDs);\n\n\t\t$search = implode(',', array_fill(0, count($charKeys), '?'));\n\t\t$sql  = \"SELECT char_id, name FROM {$server->charMapDatabase}.`char` \";\n\t\t$sql .= \"WHERE char_id IN (\".$search.\")\";\n\t\t$sth  = $server->connection->getStatement($sql);\n\t\t$sth->execute($charKeys);\n\n\t\t$ids = $sth->fetchAll();\n\n\t\t// Map char_id to name.\n\t\tforeach ($ids as $id) {\n\t\t\tif(array_key_exists($id->char_id, $charIDs)) {\n\t\t\t\t$charIDs[$id->char_id] = $id->name;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (count($itemIDs)) {\n\t\trequire_once 'Flux/TemporaryTable.php';\n\t\tif($server->isRenewal) {\n\t\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n\t\t} else {\n\t\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n\t\t}\n\t\t$tableName = \"{$server->charMapDatabase}.items\";\n\t\t$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n\n\t\t$ids = array_keys($itemIDs);\n\t\t$sql = \"SELECT id, name_english FROM {$server->charMapDatabase}.items WHERE id IN (\".implode(',', array_fill(0, count($ids), '?')).\")\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute($ids);\n\n\t\t$ids = $sth->fetchAll();\n\n\t\tforeach ($ids as $id) {\n\t\t\t$itemIDs[$id->id] = $id->name_english;\n\t\t}\n\t}\n\n\tif ($mobIDs) {\n\t\t$mobDB      = \"{$server->charMapDatabase}.monsters\";\n        if($server->isRenewal) {\n            $fromTables = array(\"{$server->charMapDatabase}.mob_db_re\", \"{$server->charMapDatabase}.mob_db2_re\");\n        } else {\n            $fromTables = array(\"{$server->charMapDatabase}.mob_db\", \"{$server->charMapDatabase}.mob_db2\");\n        }\n\t\t$tempMobs   = new Flux_TemporaryTable($server->connection, $mobDB, $fromTables);\n\n\t\t$ids = array_keys($mobIDs);\n\t\t$sql = \"SELECT id, name_english FROM {$server->charMapDatabase}.monsters WHERE id IN (\".implode(',', array_fill(0, count($ids), '?')).\")\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute($ids);\n\n\t\t$ids = $sth->fetchAll();\n\n\t\tforeach ($ids as $id) {\n\t\t\t$mobIDs[$id->id] = $id->name_english;\n\t\t}\n\t}\n\n\t$homuns = Flux::config('HomunClasses');\n\tforeach ($feeds as $log) {\n\t\tif ($log->type == 'P' && array_key_exists($log->target_class, $mobIDs))\n\t\t\t$log->target_name = $mobIDs[$log->target_class];\n\t\telse if ($homuns && $log->type == 'H')\n\t\t\t$log->target_name = $homuns->get($log->target_class);\n\t}\n}\n"
  },
  {
    "path": "modules/logdata/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'Log Data';\n?>\n"
  },
  {
    "path": "modules/logdata/inter.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('InterLogTitle');\n\n$sql = \"SELECT COUNT(time) AS total FROM {$server->charMapDatabase}.interlog\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('time' => 'DESC','log'));\n\n$col = 'time, log';\n$sql = $paginator->getSQL(\"SELECT $col FROM {$server->charMapDatabase}.interlog\");\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n\n$inters = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/logdata/login.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'List Logins';\n\n$sqlpartial = '';\n$bind       = array();\n\n$dateAfter  = $params->get('log_after_date');\n$dateBefore = $params->get('log_before_date');\n$ipAddress  = trim($params->get('ip'));\n$username   = trim($params->get('user'));\n$logMessage = trim($params->get('log'));\n$response   = trim($params->get('rcode'));\n\nif ($dateAfter) {\n\t$sqlpartial .= 'AND time >= :dateAfter ';\n\t$bind[':dateAfter'] = [ $dateAfter, PDO::PARAM_STR ];\n}\n\nif ($dateBefore) {\n\t$sqlpartial .= 'AND time <= :dateBefore ';\n\t$bind[':dateBefore'] = [ $dateBefore, PDO::PARAM_STR ];\n}\n\nif ($ipAddress) {\n\t$sqlpartial .= 'AND ip LIKE :ipAddress ';\n\t$bind[':ipAddress'] = [ \"%$ipAddress%\", PDO::PARAM_STR ];\n}\n\nif ($username) {\n\t$sqlpartial .= 'AND user LIKE :username ';\n\t$bind[':username'] = [ \"%$username%\", PDO::PARAM_STR ];\n}\n\nif ($logMessage) {\n\t$sqlpartial .= 'AND log LIKE :logmes ';\n\t$bind[':logmes'] = [ \"%$logMessage%\", PDO::PARAM_STR ];\n}\n\nif ($response) {\n\t$sqlpartial .= 'AND rcode = :rcode ';\n\t$bind[':rcode'] = [ $response, PDO::PARAM_INT ];\n}\n\n$sql = \"SELECT COUNT(time) AS total FROM {$server->logsDatabase}.loginlog WHERE 1=1 $sqlpartial\";\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute($bind, true);\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'time' => 'desc', 'ip', 'user', 'log', 'rcode'\n));\n\n$sql = \"SELECT time, ip, user, rcode, log FROM {$server->logsDatabase}.loginlog WHERE 1=1 $sqlpartial\";\n$sql = $paginator->getSQL($sql);\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute($bind, true);\n\n$logins = $sth->fetchAll();\n\nif ($logins) {\n\t$noCase    = $server->loginServer->config->getNoCase();\n\t$usernames = array();\n\tforeach ($logins as $_tmplogin) {\n\t\t$usernames[] = $noCase ? strtolower($_tmplogin->user) : $_tmplogin->user;\n\t}\n\n\t$uid  = $noCase ? 'LOWER(userid)' : 'userid';\n\t$sql  = \"SELECT $uid AS userid, account_id FROM {$server->loginDatabase}.login WHERE \";\n\t$sql .= \"sex != 'S' AND group_id >= 0 AND $uid IN (\".implode(',', array_fill(0, count($usernames), '?')).\")\";\n\t$sth  = $server->connection->getStatement($sql);\n\t$sth->execute($usernames, true);\n\n\t$data = $sth->fetchAll();\n\tif ($data) {\n\t\t$accounts = array();\n\t\tforeach ($data as $row) {\n\t\t\t$userid = $noCase ? strtolower($row->userid) : $row->userid;\n\t\t\t$accounts[$userid] = $row->account_id;\n\t\t}\n\n\t\tforeach ($logins as $_tmplogin) {\n\t\t\t$userid = $noCase ? strtolower($_tmplogin->user) : $_tmplogin->user;\n\t\t\tif (array_key_exists($userid, $accounts)) {\n\t\t\t\t$_tmplogin->account_id = $accounts[$userid];\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "modules/logdata/mvp.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('MVPLogTitle');\n\n$sql = \"SELECT COUNT(mvp_id) AS total FROM {$server->logsDatabase}.mvplog\";\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('mvp_date' => 'kill_char_id', 'monster_id', 'prize', 'mvpexp', 'map'));\n\n$col = 'mvp_id, mvp_date, kill_char_id, monster_id, prize, mvpexp, map';\n$sql = $paginator->getSQL(\"SELECT $col FROM {$server->logsDatabase}.mvplog\");\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$mvps = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/logdata/npc.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('NPCLogTitle');\n\n$sql = \"SELECT COUNT(npc_id) AS total FROM {$server->logsDatabase}.npclog\";\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('npc_id' => 'npc_date', 'account_id', 'char_id', 'char_name', 'map', 'mes'));\n\n$col = 'npc_id, npc_date, account_id, char_id, char_name, map, mes';\n$sql = $paginator->getSQL(\"SELECT $col FROM {$server->logsDatabase}.npclog\");\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$npcs = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/logdata/pick.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('PickLogTitle');\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->logsDatabase}.picklog\";\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array(\n\t'time' => 'desc', 'char_id', 'type', 'nameid', 'amount',\n\t'refine', 'card0', 'card1', 'card2', 'card3', 'map'\n));\n\n$col = \"time, char_id, type, nameid, amount, refine, card0, card1, card2, card3, map\";\n$sql = $paginator->getSQL(\"SELECT $col FROM {$server->logsDatabase}.picklog\");\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$picks = $sth->fetchAll();\n\nif ($picks) {\n\t$charIDs   = array();\n\t$itemIDs   = array();\n\t$mobIDs    = array();\n\t$pickTypes = Flux::config('PickTypes');\n\n\tforeach ($picks as $pick) {\n\t\t$itemIDs[$pick->nameid] = null;\n\n\t\tif ($pick->type == 'M' || $pick->type == 'L') {\n\t\t\t$mobIDs[$pick->char_id] = null;\n\t\t}\n\t\telse {\n\t\t\t$charIDs[$pick->char_id] = null;\n\t\t}\n\n\t\tif ($pick->card0) {\n\t\t\t$itemIDs[$pick->card0] = null;\n\t\t}\n\t\tif ($pick->card1) {\n\t\t\t$itemIDs[$pick->card1] = null;\n\t\t}\n\t\tif ($pick->card2) {\n\t\t\t$itemIDs[$pick->card2] = null;\n\t\t}\n\t\tif ($pick->card3) {\n\t\t\t$itemIDs[$pick->card3] = null;\n\t\t}\n\n\t\t$pick->pick_type = $pickTypes->get($pick->type);\n\t}\n\n\tif ($charIDs) {\n\t\t$ids = array_keys($charIDs);\n\t\t$sql = \"SELECT char_id, name FROM {$server->charMapDatabase}.`char` WHERE char_id IN (\".implode(',', array_fill(0, count($ids), '?')).\")\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute($ids);\n\n\t\t$ids = $sth->fetchAll();\n\n\t\t// Map char_id to name.\n\t\tforeach ($ids as $id) {\n\t\t\t$charIDs[$id->char_id] = $id->name;\n\t\t}\n\t}\n\n\trequire_once 'Flux/TemporaryTable.php';\n\n\tif ($mobIDs) {\n\t\t$mobDB      = \"{$server->charMapDatabase}.monsters\";\n\t\tif($server->isRenewal) {\n\t\t\t$fromTables = array(\"{$server->charMapDatabase}.mob_db_re\", \"{$server->charMapDatabase}.mob_db2_re\");\n\t\t} else {\n\t\t\t$fromTables = array(\"{$server->charMapDatabase}.mob_db\", \"{$server->charMapDatabase}.mob_db2\");\n\t\t}\n\t\t$tempMobs   = new Flux_TemporaryTable($server->connection, $mobDB, $fromTables);\n\n\t\t$ids = array_keys($mobIDs);\n\t\t$sql = \"SELECT id, name_english FROM {$server->charMapDatabase}.monsters WHERE id IN (\".implode(',', array_fill(0, count($ids), '?')).\")\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute($ids);\n\n\t\t$ids = $sth->fetchAll();\n\n\t\t// Map id to name.\n\t\tforeach ($ids as $id) {\n\t\t\t$mobIDs[$id->id] = $id->name_english;\n\t\t}\n\t}\n\n\tif ($itemIDs) {\n\t\tif($server->isRenewal) {\n\t\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n\t\t} else {\n\t\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n\t\t}\n\t\t$tableName = \"{$server->charMapDatabase}.items\";\n\t\t$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n\t\t$shopTable = Flux::config('FluxTables.ItemShopTable');\n\n\t\t$ids = array_keys($itemIDs);\n\t\t$sql = \"SELECT id, name_english FROM {$server->charMapDatabase}.items WHERE id IN (\".implode(',', array_fill(0, count($ids), '?')).\")\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute($ids);\n\n\t\t$ids = $sth->fetchAll();\n\n\t\t// Map nameid to name.\n\t\tforeach ($ids as $id) {\n\t\t\t$itemIDs[$id->id] = $id->name_english;\n\t\t}\n\t}\n\n\tforeach ($picks as $pick) {\n\t\tif (($pick->type == 'M' || $pick->type == 'L') && array_key_exists($pick->char_id, $mobIDs)) {\n\t\t\t$pick->char_name = $mobIDs[$pick->char_id];\n\t\t}\n\t\telseif (array_key_exists($pick->char_id, $charIDs)) {\n\t\t\t$pick->char_name = $charIDs[$pick->char_id];\n\t\t}\n\n\t\tif (array_key_exists($pick->nameid, $itemIDs)) {\n\t\t\t$pick->item_name = $itemIDs[$pick->nameid];\n\t\t}\n\t\tif (array_key_exists($pick->card0, $itemIDs)) {\n\t\t\t$pick->card0_name = $itemIDs[$pick->card0];\n\t\t}\n\t\tif (array_key_exists($pick->card1, $itemIDs)) {\n\t\t\t$pick->card1_name = $itemIDs[$pick->card1];\n\t\t}\n\t\tif (array_key_exists($pick->card2, $itemIDs)) {\n\t\t\t$pick->card2_name = $itemIDs[$pick->card2];\n\t\t}\n\t\tif (array_key_exists($pick->card3, $itemIDs)) {\n\t\t\t$pick->card3_name = $itemIDs[$pick->card3];\n\t\t}\n\t}\n}\n\n?>\n"
  },
  {
    "path": "modules/logdata/zeny.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('ZenyLogTitle');\n\n$sql = \"SELECT COUNT(id) AS total FROM {$server->logsDatabase}.zenylog\";\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$paginator = $this->getPaginator($sth->fetch()->total);\n$paginator->setSortableColumns(array('time' => 'desc', 'char_id', 'src_id', 'type', 'amount', 'map'));\n\n$col = \"time, char_id, src_id, type, amount, map\";\n$sql = $paginator->getSQL(\"SELECT $col FROM {$server->logsDatabase}.zenylog\");\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute();\n\n$logs = $sth->fetchAll();\n\nif ($logs) {\n\t$charIDs = array();\n\t$srcIDs  = array();\n\t$mobIDs  = array();\n\t$pickTypes = Flux::config('PickTypes');\n\n\tforeach ($logs as $log) {\n\t\t$charIDs[$log->char_id] = null;\n\n\t\tif ($log->type == 'M') {\n\t\t\t$mobIDs[$log->src_id] = null;\n\t\t}\n\t\telse {\n\t\t\t$srcIDs[$log->src_id] = null;\n\t\t}\n\n\t\t$log->pick_type = $pickTypes->get($log->type);\n\t}\n\n\tif ($charIDs || $srcIDs) {\n\t\t$charKeys = array_keys($charIDs);\n\t\t$srcKeys = array_keys($srcIDs);\n\n\t\t$sql  = \"SELECT char_id, name FROM {$server->charMapDatabase}.`char` \";\n\t\t$sql .= \"WHERE char_id IN (\".implode(',', array_fill(0, count($charKeys) + count($srcKeys), '?')).\")\";\n\t\t$sth  = $server->connection->getStatement($sql);\n\t\t$sth->execute(array_merge($charKeys, $srcKeys));\n\n\t\t$ids = $sth->fetchAll();\n\n\t\t// Map char_id to name.\n\t\tforeach ($ids as $id) {\n\t\t\tif(array_key_exists($id->char_id, $charIDs)) {\n\t\t\t\t$charIDs[$id->char_id] = $id->name;\n\t\t\t}\n\t\t\tif(array_key_exists($id->char_id, $srcIDs)) {\n\t\t\t\t$srcIDs[$id->char_id] = $id->name;\n\t\t\t}\n\t\t}\n\t}\n\n\trequire_once 'Flux/TemporaryTable.php';\n\n\tif ($mobIDs) {\n\t\t$mobDB      = \"{$server->charMapDatabase}.monsters\";\n\t\tif($server->isRenewal) {\n\t\t\t$fromTables = array(\"{$server->charMapDatabase}.mob_db_re\", \"{$server->charMapDatabase}.mob_db2_re\");\n\t\t} else {\n\t\t\t$fromTables = array(\"{$server->charMapDatabase}.mob_db\", \"{$server->charMapDatabase}.mob_db2\");\n\t\t}\n\t\t$tempMobs   = new Flux_TemporaryTable($server->connection, $mobDB, $fromTables);\n\n\t\t$ids = array_keys($mobIDs);\n\t\t$sql = \"SELECT id, name_english FROM {$server->charMapDatabase}.monsters WHERE ID IN (\".implode(',', array_fill(0, count($ids), '?')).\")\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute($ids);\n\n\t\t$ids = $sth->fetchAll();\n\n\t\t// Map id to name.\n\t\tforeach ($ids as $id) {\n\t\t\t$mobIDs[$id->id] = $id->name_english;\n\t\t}\n\t}\n\n\tforeach ($logs as $log) {\n\t\tif (array_key_exists($log->char_id, $charIDs)) {\n\t\t\t$log->char_name = $charIDs[$log->char_id];\n\t\t}\n\n\t\tif (($log->type == 'M') && array_key_exists($log->src_id, $mobIDs)) {\n\t\t\t$log->src_name = $mobIDs[$log->char_id];\n\t\t}\n\t\telseif (array_key_exists($log->char_id, $srcIDs)) {\n\t\t\t$log->src_name = $srcIDs[$log->char_id];\n\t\t}\n\t}\n}\n\n?>\n"
  },
  {
    "path": "modules/mail/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n$title = Flux::message('MailerTitle');\n$whoto = trim($params->get('whoto') ?: '');\n$template = trim($params->get('template') ?: '');\n$subject = trim($params->get('subject') ?: '');\n$selectedtemplate = $template.'.php';\n\n\n// Select Template\n$template_dir = FLUX_DATA_DIR.\"/templates/\";\n$myDirectory = opendir($template_dir);\nwhile($entryName = readdir($myDirectory)) {$dirArray[] = $entryName;}\nclosedir($myDirectory);\n$indexCount\t= count($dirArray);\nsort($dirArray);\n\nif (count($_POST)) {\n\t//<input type=\"radio\" name=\"whoto\" id=\"whoto\" value=\"1\" checked=\"checked\"> No one<br />\n\t//<input type=\"radio\" name=\"whoto\" id=\"whoto\" value=\"2\"> Admins Only<br />\n\t//<input type=\"radio\" name=\"whoto\" id=\"whoto\" value=\"3\"> Staff Only<br />\n\t//<input type=\"radio\" name=\"whoto\" id=\"whoto\" value=\"4\"> Everyone<br />\n\t//<input type=\"radio\" name=\"whoto\" id=\"whoto\" value=\"5\"> VIPs<br />\n\n\tif($whoto == '1'){\n\t\t// please leave blank\n\t}elseif($whoto == '2'){\n\t\t$sth = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.login WHERE `group_id` = '99'\");\n\t}elseif($whoto == '3'){\n\t\t$sth = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.login WHERE (group_id=2 OR group_id=99)\");\n\t}elseif($whoto == '4'){\n\t\t$sth = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.login\");\n\t}elseif($whoto == '5'){\n\t}\n\n\t$sth->execute();\n\t$list = $sth->fetchAll();\n\n\tforeach($list as $lrow){\n\t\t$email = $lrow->email;\n\t\trequire_once 'Flux/Mailer.php';\n\t\t$mail = new Flux_Mailer();\n\t\t$sent = $mail->send($email, $subject, $template, array(\n\t\t\t'emailtitle'\t\t=> $subject,\n\t\t\t'username'\t\t=> $lrow->userid,\n\t\t\t'email'\t\t=> $lrow->email,\n\t\t));\n\t}\n\t\n\t$session->setMessageData(Flux::message('MailerEmailHasBeenSent'));\n\t\n\tif(Flux::config('DiscordUseWebhook')) {\n\t\tif(Flux::config('DiscordSendOnMarketing')) {\n\t\t\tsendtodiscord(Flux::config('DiscordWebhookURL'), 'Mass Email Sent: '. $subject);\n\t\t}\n\t}\n\n}\n?>\n"
  },
  {
    "path": "modules/main/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = null;\n$newslimit = (int)Flux::config('CMSNewsLimit');\n$newstype = (int)Flux::config('CMSNewsType');\nif($newstype == '1'){\n\t$news = Flux::config('FluxTables.CMSNewsTable'); \n\t$sql = \"SELECT title, body, link, author, created, modified FROM {$server->loginDatabase}.$news ORDER BY id DESC LIMIT $newslimit\";\n\t$sth = $server->connection->getStatement($sql);\n\t$sth->execute();\n\t$news = $sth->fetchAll();\n} elseif($newstype == '2'){\n\t$content = file_get_contents(Flux::config('CMSNewsRSS'));\n\tif($content) {\n\t\t$i = 0;\n\t\t$xml = new SimpleXmlElement($content);\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/main/page_not_found.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\nheader('HTTP/1.1 404 Not Found');\n$title = Flux::message('PageNotFoundTitle');\n?>\n"
  },
  {
    "path": "modules/main/preprocess.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n// Check for \"special\" date fields.\n$__dates = array();\nforeach ($params->toArray() as $key => $value) {\n\tif (preg_match('&^(.+?)_(year|month|day|hour|minute|second)$&', $key, $m)) {\n\t\t$__dateParam = $m[1];\n\t\t$__dateType  = $m[2];\n\t\t\n\t\tif (!array_key_exists($__dateParam, $__dates)) {\n\t\t\t// Not too sure why, but if I don't create a separate index for this array,\n\t\t\t// It will use the previous iteration's reference.\n\t\t\t$__dateArray[$__dateParam] = array();\n\t\t\t$__dates[$__dateParam] = new Flux_Config($__dateArray[$__dateParam]);\n\t\t}\n\t\t\n\t\t$__dates[$__dateParam]->set($__dateType, $value);\n\t}\n}\n\nforeach ($__dates as $__dateName => $__date) {\n\t$_year   = $__date->get('year');\n\t$_month  = $__date->get('month');\n\t$_day    = $__date->get('day');\n\t$_hour   = $__date->get('hour');\n\t$_minute = $__date->get('minute');\n\t$_second = $__date->get('second');\n\t\n\t// Construct DATE.\n\tif (!is_null($_year) && !is_null($_month) && !is_null($_day)) {\n\t\t$_format = sprintf('%04d-%02d-%02d', $_year, $_month, $_day);\n\t\t// Construct DATETIME.\n\t\tif (!is_null($_hour) && !is_null($_minute) && !is_null($_second)) {\n\t\t\t$_format .= sprintf(' %02d:%02d:%02d', $_hour, $_minute, $_second);\n\t\t}\n\t\t$params->set(\"{$__dateName}_date\", $_format);\n\t}\n}\n\n$installer = Flux_Installer::getInstance();\nif ($installer->updateNeeded() && $params->get('module') != 'install') {\n\t$this->redirect($this->url('install'));\n}\n\nif (Flux::config('AutoUnholdAccount')) {\n\tFlux::processHeldCredits();\n}\n\nif (Flux::config('AutoPruneAccounts')) {\n\tFlux::pruneUnconfirmedAccounts();\n}\n\n$ppReturn = array(\n\t'txn_id'      => $params->get('txn_id'),\n\t'txn_type'    => $params->get('txn_type'),\n\t'first_name'  => $params->get('first_name'),\n\t'last_name'   => $params->get('last_name'),\n\t'item_name'   => $params->get('item_name'),\n\t'verify_sign' => $params->get('verify_sign')\n);\n\nif ($params->get('merchant_return_link') && $ppReturn['txn_id'] && $ppReturn['txn_type'] &&\n\t$ppReturn['first_name'] && $ppReturn['last_name'] && $ppReturn['item_name'] && $ppReturn['verify_sign']) {\n\t\t\n\t$session->setPpReturnData($ppReturn);\n\t$this->redirect($this->url('donate', 'complete'));\n}\n\n\n// Update preferred server.\nif (($preferred_server = $params->get('preferred_server')) && $session->getAthenaServer($preferred_server)) {\n\t$session->setAthenaServerNameData($params->get('preferred_server'));\n\tif (!array_key_exists('preferred_server', $_GET)) {\n\t\t$this->redirect($this->urlWithQs);\n\t}\n}\n\nif (($preferred_theme = $params->get('preferred_theme'))) {\n\tif (in_array($preferred_theme, Flux::$appConfig->get('ThemeName', false))) {\n\t\t$session->setThemeData($params->get('preferred_theme'));\n\t\tif (!array_key_exists('preferred_theme', $_GET)) {\n\t\t\t$this->redirect($this->urlWithQs);\n\t\t}\n\t}\n}\n\n// Preferred server.\n$server = $session->getAthenaServer();\n\n// WoE-based authorization.\n$_thisModule = $params->get('module');\n$_thisAction = $params->get('action');\n\n$woeDisallowModule = $server->woeDisallow->get($_thisModule);\n$woeDisallowAction = $server->woeDisallow->get(\"$_thisModule.$_thisAction\");\n\nif (!$auth->allowedToViewWoeDisallowed && ($woeDisallowModule || $woeDisallowAction) && $server->isWoe()) {\n\t$session->setMessageData(Flux::message('DisallowedDuringWoE'));\n\t$this->redirect();\n}\n?>\n"
  },
  {
    "path": "modules/monster/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'List Monsters';\n\nrequire_once 'Flux/TemporaryTable.php';\n\ntry {\n\t$tableName  = \"{$server->charMapDatabase}.monsters\";\n\tif($server->isRenewal) {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.mob_db_re\", \"{$server->charMapDatabase}.mob_db2_re\");\n  \t} else {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.mob_db\", \"{$server->charMapDatabase}.mob_db2\");\n\t}\n\t$tempTable  = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n\t\n\t// Statement parameters, joins and conditions.\n\t$bind        = array();\n\t$sqlpartial  = \"WHERE 1=1 \";\n\t$monsterID   = $params->get('monster_id');\n\t\n\tif ($monsterID) {\n\t\t$sqlpartial .= \"AND monsters.ID = ? \";\n\t\t$bind[]      = $monsterID;\n\t}\n\telse {\n\t\t$opMapping      = array('eq' => '=', 'gt' => '>', 'lt' => '<');\n\t\t$opValues       = array_keys($opMapping);\n\t\t$monsterName    = $params->get('name');\n\t\t$size           = $params->get('size');\n\t\t$race           = $params->get('race');\n\t\t$element        = $params->get('element');\n\t\t$mvp            = strtolower($params->get('mvp') ?: '');\n\t\t$custom         = $params->get('custom');\n\t\t\n\t\tif ($monsterName) {\n\t\t\t$sqlpartial .= \"AND ((name_english LIKE ? OR name_english = ?) OR (name_japanese LIKE ? OR name_japanese = ?)) \";\n\t\t\t$bind[]      = \"%$monsterName%\";\n\t\t\t$bind[]      = $monsterName;\n\t\t\t$bind[]      = \"%$monsterName%\";\n\t\t\t$bind[]      = $monsterName;\n\t\t}\n\n\t\tif ($size && $size !== '-1') {\n\t\t\tif(is_numeric($size) && (floatval($size) == intval($size))) {\n\t\t\t\t$sizes = Flux::config('MonsterSizes')->toArray();\n\t\t\t\tif (array_key_exists($size, $sizes) && $sizes[$size]) {\n\t\t\t\t\t$sqlpartial .= \"AND size = ? \";\n\t\t\t\t\t$bind[]      = $size;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sizeName = preg_quote($size, '/');\n\t\t\t\t$sizes = preg_grep(\"/.*?$sizeName.*?/i\", Flux::config('MonsterSizes')->toArray());\n\t\t\t\t\n\t\t\t\tif (count($sizes)) {\n\t\t\t\t\t$sizes = array_keys($sizes);\n\t\t\t\t\t$sqlpartial .= \"AND (\";\n\t\t\t\t\t$partial     = '';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($sizes as $id) {\n\t\t\t\t\t\t$partial .= \"size = ? OR \";\n\t\t\t\t\t\t$bind[]   = $id;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$partial     = preg_replace('/\\s*OR\\s*$/', '', $partial);\n\t\t\t\t\t$sqlpartial .= \"$partial) \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($race && $race !== '-1') {\n\t\t\tif($race) {\n\t\t\t\t$races = Flux::config('MonsterRaces')->toArray();\n\t\t\t\tif (array_key_exists($race, $races) && $races[$race]) {\n\t\t\t\t\t$sqlpartial .= \"AND race = ? \";\n\t\t\t\t\t$bind[]      = $race;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$raceName = preg_quote($race, '/');\n\t\t\t\t$races = preg_grep(\"/.*?$raceName.*?/i\", Flux::config('MonsterRaces')->toArray());\n\t\t\t\t\n\t\t\t\tif (count($races)) {\n\t\t\t\t\t$races = array_keys($races);\n\t\t\t\t\t$sqlpartial .= \"AND (\";\n\t\t\t\t\t$partial     = '';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($races as $id) {\n\t\t\t\t\t\t$partial .= \"race = ? OR \";\n\t\t\t\t\t\t$bind[]   = $id;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$partial     = preg_replace('/\\s*OR\\s*$/', '', $partial);\n\t\t\t\t\t$sqlpartial .= \"$partial) \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($element && $element !== '-1') {\n\t\t\tif (count($elementSplit = explode('-', $element)) == 2) {\n\t\t\t\t$element = $elementSplit[0];\n\t\t\t\t$elementLevel = $elementSplit[1];\n\t\t\t}\n\t\t\tif ($element) {\n\t\t\t\t$elements = Flux::config('Elements')->toArray();\n\t\t\t\tif (array_key_exists($element, $elements) && $elements[$element]) {\n\t\t\t\t\t$sqlpartial .= \"AND element = ? \";\n\t\t\t\t\t$bind[]      = $element;\n\t\t\t\t} else {\n\t\t\t\t\t$sqlpartial .= 'AND element IS NULL ';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (count($elementSplit) == 2 && $elementLevel) {\n\t\t\t\t\t$sqlpartial .= \"AND element_level = ?\" ;\n\t\t\t\t\t$bind[]      = $elementLevel;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($mvp == 'yes') {\n\t\t\t$sqlpartial .= 'AND mvp_exp > 0 ';\n\t\t}\n\t\telseif ($mvp == 'no') {\n\t\t\t$sqlpartial .= 'AND mvp_exp = 0 ';\n\t\t}\n\t\t\n\t\tif ($custom) {\n\t\t\tif ($custom == 'yes') {\n\t\t\t\t$sqlpartial .= \"AND origin_table LIKE '%mob_db2' \";\n\t\t\t}\n\t\t\telseif ($custom == 'no') {\n\t\t\t\t$sqlpartial .= \"AND origin_table LIKE '%mob_db' \";\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Get total count and feed back to the paginator.\n\t$sth = $server->connection->getStatement(\"SELECT COUNT(monsters.ID) AS total FROM $tableName $sqlpartial\");\n\t$sth->execute($bind);\n\t\n\t$paginator = $this->getPaginator($sth->fetch()->total);\n\t$paginator->setSortableColumns(array(\n\t\t'monster_id' => 'asc', 'name_english', 'name_japanese', 'level', 'hp', 'size', 'race', 'base_exp', 'job_exp', 'origin_table'\n\t));\n\t\n\t$col  = \"origin_table, monsters.ID AS monster_id, name_english, name_japanese, \";\n\t$col .= \"level, hp, size, race, element, element_level, \";\n\t$col .= \"base_exp, job_exp, mvp_exp\";\n\t\n\t$sql  = $paginator->getSQL(\"SELECT $col FROM $tableName $sqlpartial\");\n\t$sth  = $server->connection->getStatement($sql);\n\t\n\t$sth->execute($bind);\n\t$monsters = $sth->fetchAll();\n\t\n\t$authorized = $auth->actionAllowed('monster', 'view');\n\t\n\tif ($monsters && count($monsters) === 1 && $authorized && Flux::config('SingleMatchRedirectMobs')) {\n\t\t$this->redirect($this->url('monster', 'view', array('id' => $monsters[0]->monster_id)));\n\t}\n}\ncatch (Exception $e) {\n\tif (isset($tempTable) && $tempTable) {\n\t\t// Ensure table gets dropped.\n\t\t$tempTable->drop();\n\t}\n\t\n\t// Raise the original exception.\n\t$class = get_class($e);\n\tthrow new $class($e->getMessage());\n}\n?>\n"
  },
  {
    "path": "modules/monster/view.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Viewing Monster';\n$mobID = $params->get('id');\n\nrequire_once 'Flux/TemporaryTable.php';\n\n// Monsters table.\n$mobDB      = \"{$server->charMapDatabase}.monsters\";\n//here needs the same check if the server is renewal or not, I'm just lazy to do it by myself\nif($server->isRenewal) {\n\t$fromTables = array(\"{$server->charMapDatabase}.mob_db_re\", \"{$server->charMapDatabase}.mob_db2_re\");\n} else {\n \t$fromTables = array(\"{$server->charMapDatabase}.mob_db\", \"{$server->charMapDatabase}.mob_db2\");\n}\n$tempMobs   = new Flux_TemporaryTable($server->connection, $mobDB, $fromTables);\n\n// Monster Skills table.\n$skillDB    = \"{$server->charMapDatabase}.mobskills\";\nif($server->isRenewal) {\n\t$fromTables = array(\"{$server->charMapDatabase}.mob_skill_db_re\", \"{$server->charMapDatabase}.mob_skill_db2_re\");\n} else {\n \t$fromTables = array(\"{$server->charMapDatabase}.mob_skill_db\", \"{$server->charMapDatabase}.mob_skill_db2\");\n}\n\n$tempSkills = new Flux_TemporaryTable($server->connection, $skillDB, $fromTables);\n\n// Items table.\nif($server->isRenewal) {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n} else {\n\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n}\n$itemDB    = \"{$server->charMapDatabase}.items\";\n$tempItems = new Flux_TemporaryTable($server->connection, $itemDB, $fromTables);\n\n$mode_list = array('mode_aggressive', 'mode_angry', 'mode_assist', 'mode_canattack', 'mode_canmove', 'mode_castsensorchase', 'mode_castsensoridle', 'mode_changechase', 'mode_changetargetchase', 'mode_changetargetmelee', 'mode_detector', 'mode_fixeditemdrop', 'mode_ignoremagic', 'mode_ignoremelee', 'mode_ignoremisc', 'mode_ignoreranged', 'mode_knockbackimmune', 'mode_looter', 'mode_mvp', 'mode_norandomwalk', 'mode_randomtarget', 'mode_skillimmune', 'mode_statusimmune', 'mode_targetweak', 'mode_teleportblock');\n\n$col  = 'origin_table, ID as monster_id, name_aegis AS sprite, name_english, name_japanese, level, HP AS hp, ';\n$col .= 'base_exp, job_exp, attack_range, skill_range, chase_range, ';\n$col .= 'defense, magic_defense, attack, attack2, ';\n$col .= 'STR AS strength, AGI AS agility, VIT AS vitality, `INT` AS intelligence, DEX AS dexterity, LUK AS luck, ';\n$col .= 'size, race, element, element_level, mode_canmove AS mode, `class` as boss, ';\n$col .= 'walk_speed, attack_delay, attack_motion, damage_motion, ';\n$col .= 'mvp_exp, ai, ';\n$col .= implode(', ', $mode_list).', ';\t\t// Mode list\n\n// Item drops.\n$col .= 'drop1_item, drop1_rate, drop1_nosteal, ';\n$col .= 'drop2_item, drop2_rate, drop2_nosteal, ';\n$col .= 'drop3_item, drop3_rate, drop3_nosteal, ';\n$col .= 'drop4_item, drop4_rate, drop4_nosteal, ';\n$col .= 'drop5_item, drop5_rate, drop5_nosteal, ';\n$col .= 'drop6_item, drop6_rate, drop6_nosteal, ';\n$col .= 'drop7_item, drop7_rate, drop7_nosteal, ';\n$col .= 'drop8_item, drop8_rate, drop8_nosteal, ';\n$col .= 'drop9_item, drop9_rate, drop9_nosteal, ';\n$col .= 'drop10_item, drop10_rate, drop10_nosteal, ';\n\n// MVP drops.\n$col .= 'mvpdrop1_item, mvpdrop1_rate, ';\n$col .= 'mvpdrop2_item, mvpdrop2_rate, ';\n$col .= 'mvpdrop3_item, mvpdrop3_rate ';\n\n$sql  = \"SELECT $col FROM $mobDB WHERE ID = ? LIMIT 1\";\n$sth  = $server->connection->getStatement($sql);\n$sth->execute(array($mobID));\n$monster = $sth->fetch();\n\n\nif ($monster) {\n\t$title   = \"Viewing Monster ({$monster->name_english})\";\n\n\t// Mode\n\t$modes = array();\n\tforeach($mode_list as $mode) if($monster->$mode) $modes[] = $mode;\n\t\n\t$monster->base_exp = $monster->base_exp * $server->expRates['Base'] / 100;\n\t$monster->job_exp  = $monster->job_exp * $server->expRates['Job'] / 100;\n\t$monster->mvp_exp  = $monster->mvp_exp * $server->expRates['Mvp'] / 100;\n\t\n\t$dropIDs = array(\n\t\t'drop1'    => $monster->drop1_item,\n\t\t'drop2'    => $monster->drop2_item,\n\t\t'drop3'    => $monster->drop3_item,\n\t\t'drop4'    => $monster->drop4_item,\n\t\t'drop5'    => $monster->drop5_item,\n\t\t'drop6'    => $monster->drop6_item,\n\t\t'drop7'    => $monster->drop7_item,\n\t\t'drop8'    => $monster->drop8_item,\n\t\t'drop9'    => $monster->drop9_item,\n\t\t'drop10'   => $monster->drop10_item,\n\t\t'mvpdrop1' => $monster->mvpdrop1_item,\n\t\t'mvpdrop2' => $monster->mvpdrop2_item,\n\t\t'mvpdrop3' => $monster->mvpdrop3_item\n\t);\n\t\n\t$sql = \"SELECT id, name_aegis, name_english, type FROM $itemDB WHERE name_aegis IN (\".implode(', ', array_fill(0, count($dropIDs), '?')).\")\";\n\t$sth = $server->connection->getStatement($sql);\n\t$sth->execute(array_values($dropIDs));\n\t$items = $sth->fetchAll();\n\t\n\t$needToSet = array();\n\tif ($items) {\n\t\tforeach ($dropIDs AS $dropField => $dropID) {\n\t\t\t$needToSet[$dropField] = true;\n\t\t}\n\t\t\n\t\tforeach ($items as $item) {\n\t\t\tforeach ($dropIDs AS $dropField => $dropID) {\n\t\t\t\tif ($needToSet[$dropField] && $dropID == $item->name_aegis) {\n\t\t\t\t\t$needToSet[$dropField] = false;\n\t\t\t\t\t$monster->{$dropField.'_id'} = $item->id;\n\t\t\t\t\t$monster->{$dropField.'_name'} = $item->name_english;\n\t\t\t\t\t$monster->{$dropField.'_type'} = $item->type;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$is_boss = false;\n\t$is_mvp = false;\n\tif(!$monster->mode_mvp && $monster->boss)\n\t\t$is_boss = true;\n\tif($monster->mode_mvp && $monster->boss)\n\t\t$is_mvp = true;\n\n\t$itemDrops = array();\n\tforeach ($needToSet as $dropField => $isset) {\n\t\tif ($isset === false) {\n\t\t\t$itemDrops[$dropField] = array(\n\t\t\t\t'id'     => $monster->{$dropField.'_id'},\n\t\t\t\t'name'   => $monster->{$dropField.'_name'},\n\t\t\t\t'type'   => $monster->{$dropField.'_type'},\n\t\t\t\t'chance' => $monster->{$dropField.'_rate'},\n\t\t\t\t'nosteal' => ($monster->{$dropField.'_nosteal'} ? 'NoLabel' : 'YesLabel')\n\t\t\t);\n\n\t\t\tif (preg_match('/^mvpdrop/', $dropField)) {\n\t\t\t\t$rate_adjust = $server->dropRates['MvpItem'];\n\t\t\t\t$ratemin = $server->dropRates['MvpItemMin'];\n\t\t\t\t$ratemax = $server->dropRates['MvpItemMax'];\n\t\t\t\t$itemDrops[$dropField]['type'] = 'mvp';\n\t\t\t\t$itemDrops[$dropField]['nosteal'] = 'NoLabel';\n\t\t\t}\n\t\t\telseif (preg_match('/^drop/', $dropField)) {\n\t\t\t\tswitch($monster->{$dropField.'_type'}) {\n\t\t\t\t\tcase 'Healing':\n\t\t\t\t\t\t$rate_adjust = $is_mvp ? $server->dropRates['HealMVP'] : ($is_boss ? $server->dropRates['HealBoss'] : $server->dropRates['Heal']);\n\t\t\t\t\t\t$ratemin = $server->dropRates['HealMin'];\n\t\t\t\t\t\t$ratemax = $server->dropRates['HealMax'];\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Usable':\n\t\t\t\t\tcase 'Cash':\n\t\t\t\t\t\t$rate_adjust = $is_mvp ? $server->dropRates['UseableMVP'] : ($is_boss ? $server->dropRates['UseableBoss'] : $server->dropRates['Useable']);\n\t\t\t\t\t\t$ratemin = $server->dropRates['UseableMin'];\n\t\t\t\t\t\t$ratemax = $server->dropRates['UseableMax'];\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Weapon':\n\t\t\t\t\tcase 'Armor':\n\t\t\t\t\tcase 'Petarmor':\n\t\t\t\t\t\t$rate_adjust = $is_mvp ? $server->dropRates['EquipMVP'] : ($is_boss ? $server->dropRates['EquipBoss'] : $server->dropRates['Equip']);\n\t\t\t\t\t\t$ratemin = $server->dropRates['EquipMin'];\n\t\t\t\t\t\t$ratemax = $server->dropRates['EquipMax'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'Card':\n\t\t\t\t\t\t\t$rate_adjust = $is_mvp ? $server->dropRates['CardMVP'] : ($is_boss ? $server->dropRates['CardBoss'] : $server->dropRates['Card']);\n\t\t\t\t\t\t\t$ratemin = $server->dropRates['CardMin'];\n\t\t\t\t\t\t\t$ratemax = $server->dropRates['CardMax'];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault: // Common\n\t\t\t\t\t\t$rate_adjust = $is_mvp ? $server->dropRates['CommonMVP'] : ($is_boss ? $server->dropRates['CommonBoss'] : $server->dropRates['Common']);\n\t\t\t\t\t\t$ratemin = $server->dropRates['CommonMin'];\n\t\t\t\t\t\t$ratemax = $server->dropRates['CommonMax'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$itemDrops[$dropField]['type'] = 'normal';\n\t\t\t}\n\n\t\t\t$ratemin /= 100;\n\t\t\t$ratemax /= 100;\n\t\t\t$ratecap = $server->dropRates['DropRateCap'] / 100;\n\t\t\t\n\t\t\t$itemDrops[$dropField]['chance'] = $this->cap_value($itemDrops[$dropField]['chance'] * $rate_adjust / 10000, $ratemin, $ratemax);\n\n\t\t\tif($itemDrops[$dropField]['chance'] > $ratecap)\n\t\t\t\t$itemDrops[$dropField]['chance'] = $ratecap;\n\t\t}\n\t}\n\t\n\t$sql = \"SELECT * FROM $skillDB WHERE mob_id = ?\";\n\t$sth = $server->connection->getStatement($sql);\n\t$sth->execute(array($mobID));\n\t$mobSkills = $sth->fetchAll();\n}\n?>\n"
  },
  {
    "path": "modules/news/add.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$title = Flux::message('NewsAddTitle');\n\n// Form values.\n$news\t= Flux::config('FluxTables.CMSNewsTable');\n$title\t= trim($params->get('news_title'));\n$body\t= trim($params->get('news_body'));\n$link\t= trim($params->get('news_link'));\n$author\t= trim($params->get('news_author'));\n\n$tinymce_key = Flux::config('TinyMCEKey'); \n\nif(count($_POST)){\n    if($title === '') {\n        $errorMessage = Flux::Message('CMSNewsTitleError');\n    }\n    elseif($body === '') {\n        $errorMessage = Flux::Message('CMSNewsBody');\n    }\n    elseif($author === '') {\n        $errorMessage = Flux::Message('CMSNewsAuthor');\n    }\n\telse {\n\t\tif($link) {\n\t\t\tif(!preg_match('!^http://!i', $link)) {\n\t\t\t\t$news_link = \"http://$link\";\n\t\t\t}\n\t\t}\n\t\t\n        $sql = \"INSERT INTO {$server->loginDatabase}.$news (title, body, link, author, created, modified)\";\n        $sql .= \"VALUES (?, ?, ?, ?, NOW(), NOW())\"; \n        $sth = $server->connection->getStatement($sql);\n        $sth->execute(array($title, $body, $link, $author));\n        \n        $session->setMessageData(Flux::message('CMSNewsAdded'));\n        if ($auth->actionAllowed('news', 'index')) {\n            $this->redirect($this->url('news','index'));\n        }\n        else {\n            $this->redirect();\n        }\n    }\n}\n?>\n"
  },
  {
    "path": "modules/news/delete.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;  \n$news\t\t= Flux::config('FluxTables.CMSNewsTable');\n$id\t\t\t= $params->get('id');\n$sql\t\t= \"SELECT title FROM {$server->loginDatabase}.$news WHERE id = ?\";\n$sth\t\t= $server->connection->getStatement($sql);\n$sth->execute(array($id));\n$new\t\t= $sth->fetch();\n$redirect\t= $auth->actionAllowed('news', 'index') ? $this->url('news', 'index') : null;\n\nif ($new) {\n    $sth = $server->connection->getStatement(\"DELETE FROM {$server->loginDatabase}.$news WHERE id = ?\");\n    $sth->execute(array($id));\n\t$session->setMessageData(sprintf(Flux::message('CMSNewsDeleted'), $new->title));\n}\nelse {\n\t$session->setMessageData(Flux::message('CMSNewsNotFound'));\n}\n$this->redirect($redirect);\n?>\n"
  },
  {
    "path": "modules/news/edit.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$title = Flux::message('CMSNewsEditTitle');\n$news\t= Flux::config('FluxTables.CMSNewsTable');\n$id\t\t= $params->get('id');\n$sql\t= \"SELECT * FROM {$server->loginDatabase}.$news WHERE id = ?\";\n$sth\t= $server->connection->getStatement($sql);\n$sth->execute(array($id));\n$new\t= $sth->fetch();\n\n$tinymce_key = Flux::config('TinyMCEKey'); \n\nif($new) {\n    $title\t= $new->title;\n    $body\t= $new->body;\n    $link\t= $new->link;\n    $author\t= $new->author;\n    \n    if(count($_POST)) {\n        $title\t= trim($params->get('news_title'));\n        $body \t= trim($params->get('news_body'));\n\t\t$link \t= trim($params->get('news_link'));\n\t\t$author = trim($params->get('news_author'));\n        \n        if($title === '') {\n            $errorMessage = Flux::Message('CMSNewsTitleError');\n        }\n        elseif($body === '') {\n            $errorMessage = Flux::Message('CMSNewsBody');\n        }\n\t\telseif($author == '') {\n\t\t\t\t $errorMessage = Flux::Message('CMSNewsAuthor');\n\t\t}\n\t\telse {\n\t\t\tif($link) {\n\t\t\t\tif (!preg_match('!^http://!i', $news_link)) {\n\t\t\t\t\t$news_link = \"http://$news_link\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sql = \"UPDATE {$server->loginDatabase}.$news SET \";\n\t\t\t$sql .= \"title = ?, body = ?, link = ?, author = ?, modified = NOW() \";\n\t\t\t$sql .= \"WHERE id = ?\";\n\t\t\t$sth = $server->connection->getStatement($sql);\n\t\t\t$sth->execute(array($title, $body, $link, $author, $id));\n\t\t\t\n\t\t\t$session->setMessageData(Flux::message('CMSNewsUpdated'));\n\t\t\tif ($auth->actionAllowed('news', 'index')) {\n\t\t\t\t$this->redirect($this->url('news','index'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->redirect();\n\t\t\t}           \n\t\t}\n    }\n}\n?>\n"
  },
  {
    "path": "modules/news/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$newslimit = (int)Flux::config('CMSNewsLimit');\n$newstype = (int)Flux::config('CMSNewsType');\nif($newstype == '1'){\n\t$news = Flux::config('FluxTables.CMSNewsTable'); \n\t$sql = \"SELECT title, body, link, author, created, modified FROM {$server->loginDatabase}.$news ORDER BY id DESC LIMIT $newslimit\";\n\t$sth = $server->connection->getStatement($sql);\n\t$sth->execute();\n\t$news = $sth->fetchAll();\n} elseif($newstype == '2'){\n\t$content = file_get_contents(Flux::config('CMSNewsRSS'));\n\tif($content) {\n\t\t$i = 0;\n\t\t$xml = new SimpleXmlElement($content);\n\t}\n} else {exit('Check CMSNewsType configuration option..');}\n?>\n"
  },
  {
    "path": "modules/news/manage.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$title\t= Flux::message('XCMSNewsPage');\n$news\t= Flux::config('FluxTables.CMSNewsTable'); \n\n$sql = \"SELECT id, title, author, created, modified FROM {$server->loginDatabase}.$news ORDER BY id DESC\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n\n$news = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/news/view.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$news = Flux::config('FluxTables.CMSNewsTable'); \n\n$sql = \"SELECT title, body, link, author, created, modified FROM {$server->loginDatabase}.$news ORDER BY id DESC LIMIT ?\";\n\n$sth = $server->connection->getStatement($sql);\n$sth->execute(array((int)Flux::config('CMSNewsLimit')));\n\n$news = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/pages/add.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n$title = Flux::message('CMSPageAddTitle');\n\n$pages\t= Flux::config('FluxTables.CMSPagesTable'); \n$title\t= trim($params->get('page_title'));\n$path\t= trim($params->get('page_path'));\n$body\t= trim($params->get('page_body'));\n\n$tinymce_key = Flux::config('TinyMCEKey'); \n\nif(count($_POST))\n{\n    if($page_title === '') {\n        $errorMessage = Flux::Message('CMSPageTitleError');\n    }\n    elseif($page_path === '') {\n        $errorMessage = Flux::Message('CMSPagePathError');\n    }\n    elseif($page_body === '') {\n        $errorMessage = Flux::Message('CMSPageBodyError');    \n    }\n    else {\n        $sql = \"INSERT INTO {$server->loginDatabase}.$pages (title, path, body, modified)\";\n        $sql .= \"VALUES (?, ?, ?, NOW())\";\n        $sth = $server->connection->getStatement($sql);\n        $sth->execute(array($title, $path, $body)); \n\t\t\n        $session->setMessageData(Flux::message('CMSPagesAdded'));\n        if ($auth->actionAllowed('pages', 'index')) {\n            $this->redirect($this->url('pages','index'));\n        }\n        else {\n            $this->redirect();\n        }\n    }\n}\n?>\n"
  },
  {
    "path": "modules/pages/content.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$pages = Flux::config('FluxTables.CMSPagesTable');\n$path = trim($params->get('path'));\n\n$sql = \"SELECT title, body, modified FROM {$server->loginDatabase}.$pages WHERE path = ?\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute(array($path));\n\n$pages = $sth->fetchAll();\n\nif($pages) {\n    foreach($pages as $prow) {\n        $title\t\t= $prow->title;\n        $body\t\t= $prow->body;\n\t\t$modified\t= $prow->modified;\n    }   \n}\nelse {\n    $this->redirect($this->url('main','index'));\n}\n?>\n"
  },
  {
    "path": "modules/pages/delete.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;  \n$pages \t  = Flux::config('FluxTables.CMSPagesTable');\n$id \t  = $params->get('id');\n$sql \t  = \"SELECT title FROM {$server->loginDatabase}.$pages WHERE id = ?\";\n$sth \t  = $server->connection->getStatement($sql);\n$sth->execute(array($id));\n$page\t  = $sth->fetch();\n$redirect = $auth->actionAllowed('pages', 'index') ? $this->url('pages', 'index') : null;\n\nif ($page) {\n    $sth = $server->connection->getStatement(\"DELETE FROM {$server->loginDatabase}.$pages WHERE id = ?\");\n    $sth->execute(array($id));\n\t$session->setMessageData(sprintf(Flux::message('CMSPageDeleted')));\n}\nelse {\n\t$session->setMessageData(Flux::message('CMSPageNotFound'));\n}\n$this->redirect($redirect);\n?>\n"
  },
  {
    "path": "modules/pages/edit.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n$title = Flux::message('CMSPageEditTitle');\n$pages \t= Flux::config('FluxTables.CMSPagesTable');\n$id \t= $params->get('id');\n$sql \t= \"SELECT id, title, path, body, modified FROM {$server->loginDatabase}.$pages WHERE id = ?\";\n$sth \t= $server->connection->getStatement($sql);\n$sth->execute(array($id));\n$page \t= $sth->fetch();\n\n$tinymce_key = Flux::config('TinyMCEKey'); \n\nif($page) {\n\t$title\t= $page->title;\n\t$path\t= $page->path;\n\t$body\t= $page->body;\n    \n    if(count($_POST)) {\n        $title = trim($params->get('page_title'));\n\t\t$path \t= trim($params->get('page_path'));\n        $body \t= trim($params->get('page_body'));\n        \n        if($title === '') {\n            $errorMessage = Flux::Message('CMSPageTitleError');\n\t\t}\n        elseif($path === '') {\n            $errorMessage = Flux::Message('CMSPagePathError');\n        }\n        elseif($body === '') {\n            $errorMessage = Flux::Message('CMSPageBodyError');    \n        }                                                  \n        else {\n            $sql  = \"UPDATE {$server->loginDatabase}.$pages SET title = ?, path = ?, body = ?, modified = NOW() WHERE id = ?\";            \n            $sth = $server->connection->getStatement($sql);\n            $sth->execute(array($title, $path, $body, $id)); \n\t\t\t\n            $session->setMessageData(Flux::message('CMSPageUpdated'));\n            if ($auth->actionAllowed('pages', 'index')) {\n                $this->redirect($this->url('pages','index'));\n            }\n            else {\n                $this->redirect();\n            }      \n        }\n    }\n}\n?>\n"
  },
  {
    "path": "modules/pages/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$title\t= Flux::message('CMSPageHeader');\n$pages\t= Flux::config('FluxTables.CMSPagesTable');\n\n$sql = \"SELECT id, title, path, modified FROM {$server->loginDatabase}.$pages ORDER BY id\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n\n$pages = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/purchase/add.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired('Please log-in to add items to your cart.');\n\nrequire_once 'Flux/ItemShop.php';\n\n$id   = $params->get('id');\n$shop = new Flux_ItemShop($server);\n$item = $shop->getItem($id);\n\nif ($item) {\n\t$server->cart->add($item);\n\t$session->setMessageData(\"{$item->shop_item_name} has been added to your cart.\");\n}\nelse {\n\t$session->setMessageData(\"Couldn't add item to your cart.\");\n}\n\n$action = $params->get('cart') ? 'cart' : 'index';\n$this->redirect($this->url('purchase', $action));\n?>\n"
  },
  {
    "path": "modules/purchase/cart.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\nif ($server->cart->isEmpty()) {\n\t$session->setMessageData('Your cart is currently empty.');\n\t$this->redirect($this->url('purchase'));\n}\n\n$title = 'Shopping Cart';\n\nrequire_once 'Flux/ItemShop.php';\n$items = $server->cart->getCartItems();\n?>\n"
  },
  {
    "path": "modules/purchase/checkout.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'Checkout Area';\n\nif ($server->cart->isEmpty()) {\n\t$session->setMessageData('Your cart is currently empty.');\n\t$this->redirect($this->url('purchase'));\n}\nelseif (!$server->cart->hasFunds()) {\n\t$session->setMessageData('You do not have sufficient funds to make this purchase!');\n\t$this->redirect($this->url('purchase'));\n}\n\n$items = $server->cart->getCartItems();\n\nif (count($_POST) && $params->get('process')) {\n\t$redeemTable = Flux::config('FluxTables.RedemptionTable');\n\t$creditTable = Flux::config('FluxTables.CreditsTable');\n\t$deduct      = 0;\n\t\n\t$sql  = \"INSERT INTO {$server->charMapDatabase}.$redeemTable \";\n\t$sql .= \"(nameid, quantity, cost, account_id, char_id, redeemed, redemption_date, purchase_date, credits_before, credits_after) \";\n\t$sql .= \"VALUES (?, ?, ?, ?, NULL, 0, NULL, NOW(), ?, ?)\";\n\t$sth  = $server->connection->getStatement($sql);\n\t\n\t$balance = $session->account->balance;\n\t\n\tforeach ($items as $item) {\n\t\t$creditsAfter = $balance - $item->shop_item_cost;\n\t\t\n\t\t$res = $sth->execute(array(\n\t\t\t$item->shop_item_nameid,\n\t\t\t$item->shop_item_qty,\n\t\t\t$item->shop_item_cost,\n\t\t\t$session->account->account_id,\n\t\t\t$balance,\n\t\t\t$creditsAfter\n\t\t));\n\t\t\n\t\tif ($res) {\n\t\t\t$deduct  += $item->shop_item_cost;\n\t\t\t$balance -= $item->shop_item_cost;\n\t\t}\n\t}\n\t\n\t$session->loginServer->depositCredits($session->account->account_id, -$deduct);\n\t\n\tif ($res) {\n\t\tif (!$deduct) {\n\t\t\t$server->cart->clear();\n\t\t\t$session->setMessageData('Failed to purchase all of the items in your cart!');\n\t\t}\n\t\telseif ($deduct != $server->cart->getTotal()) {\n\t\t\t$server->cart->clear();\n\t\t\t$session->setMessageData('Items have been purchased, however, some failed (your credits are still there.)');\n\t\t}\n\t\telse {\n\t\t\t$server->cart->clear();\n\t\t\t$session->setMessageData('Items have been purchased.  You may redeem them from the Redemption NPC.');\n\t\t}\n\t}\n\telse {\n\t\t$session->setMessageData('Purchase went bad, contact an admin!');\n\t}\n\t\n\t$this->redirect();\n}\n?>\n"
  },
  {
    "path": "modules/purchase/clear.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\nrequire_once 'Flux/ItemShop.php';\n\nif ($server->cart && $server->cart->clear()) {\n\t$session->setMessageData(\"Your cart has been emptied.\");\n}\nelse {\n\t$session->setMessageData(\"Couldn't empty your cart, maybe it's already empty.\");\n}\n\n$this->redirect($this->url('purchase'));\n?>\n"
  },
  {
    "path": "modules/purchase/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Item Shop';\n\nrequire_once 'Flux/ItemShop.php';\n\n$category      = $params->get('category');\n$categories    = Flux::config(\"ShopCategories\")->toArray();\n$categoryName  = Flux::config(\"ShopCategories.$category\");\n$categoryCount = array();\n$shop          = new Flux_ItemShop($server);\n$sql           = sprintf(\"SELECT COUNT(id) AS total FROM %s.%s WHERE category = ?\", $server->charMapDatabase, Flux::config('FluxTables.ItemShopTable'));\n$sql2          = sprintf(\"SELECT COUNT(id) AS total FROM %s.%s\", $server->charMapDatabase, Flux::config('FluxTables.ItemShopTable'));\n$sth           = $server->connection->getStatement($sql);\n$sth2          = $server->connection->getStatement($sql2);\n$sth2->execute();\n$total         = $sth2->fetch()->total;\n\nforeach ($categories as $catID => $catName) {\n\t$sth->execute(array($catID));\n\t$categoryCount[$catID] = $sth->fetch()->total;\n}\n\n$categoryTotal = isset($category) ? $categoryCount[$category] : $total;\n$perPage       = Flux::config(\"ItemShopItemPerPage\");\n$paginator     = $this->getPaginator($categoryTotal, array('perPage' => $perPage));\n$items         = $shop->getItems($paginator, $category);\n\n?>\n"
  },
  {
    "path": "modules/purchase/pending.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$title = 'Pending Redemption';\n\ntry {\n\t// Create item db temp table.\n\trequire_once 'Flux/TemporaryTable.php';\n\tif($server->isRenewal) {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n\t} else {\n\t\t$fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n\t}\n\t$tableName = \"{$server->charMapDatabase}.items\";\n\t$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n\n\t$redeemTable = Flux::config('FluxTables.RedemptionTable');\n\n\t// JOINs, conditions etc\n\t$sqlpartial  = \"LEFT OUTER JOIN $tableName ON items.id = $redeemTable.nameid WHERE account_id = ? \";\n\t$sqlpartial .= \"AND redeemed < 1 ORDER BY purchase_date DESC\";\n\t\n\t// Fetch item count.\n\t$sql = \"SELECT COUNT($redeemTable.id) AS total FROM {$server->charMapDatabase}.$redeemTable $sqlpartial\";\n\t$sth = $server->connection->getStatement($sql);\n\t\n\t$sth->execute(array($session->account->account_id));\n\t$total = $sth->fetch()->total;\n\n\t// Fetch items.\n\t$col = \"nameid, quantity, purchase_date, cost, credits_before, credits_after, items.name_english AS item_name\";\n\t$sql = \"SELECT $col FROM {$server->charMapDatabase}.$redeemTable $sqlpartial\";\n\t$sth = $server->connection->getStatement($sql);\n\t\n\t$sth->execute(array($session->account->account_id));\n\t$items = $sth->fetchAll();\n}\ncatch (Exception $e) {\n\tif (isset($tempTable) && $tempTable) {\n\t\t// Ensure table gets dropped.\n\t\t$tempTable->drop();\n\t}\n\t\n\t// Raise the original exception.\n\t$class = get_class($e);\n\tthrow new $class($e->getMessage());\n}\n?>\n"
  },
  {
    "path": "modules/purchase/remove.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$this->loginRequired();\n\n$num = $params->get('num');\nif (!is_null($num)) {\n\tif ($num instanceOf Flux_Config) {\n\t\t$num = $num->toArray();\n\t}\n\t\n\t$nRemoved = $server->cart->deleteByItemNum($num);\n\tif ($nRemoved) {\n\t\tif (!$server->cart->isEmpty()) {\n\t\t\t$session->setMessageData(\"Removed $nRemoved item(s) from your cart.\");\n\t\t\t$this->redirect($this->url('purchase', 'cart'));\n\t\t}\n\t\telse {\n\t\t\t$session->setMessageData(\"Removed $nRemoved item(s) from your cart. Your cart is now empty.\");\n\t\t}\n\t}\n\telse {\n\t\t$session->setMessageData(\"There were no items to remove from your cart.\");\n\t}\n\t\n\t$this->redirect($this->url('purchase'));\n}\n\n$session->setMessageData('No items were removed from your cart because none were selected.');\n$this->redirect($this->url('purchase', 'cart'));\n?>\n"
  },
  {
    "path": "modules/ranking/alchemist.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title         = 'Alchemist Ranking';\n$alchemistJobs = Flux::config('AlchemistJobClasses')->toArray();\n$jobClass      = $params->get('jobclass');\n$bind          = array();\n\nif (trim($jobClass) === '') {\n\t$jobClass = null;\n}\n\nif (!is_null($jobClass) && !array_key_exists($jobClass, $alchemistJobs)) {\n\t$this->deny();\n}\n\n$col  = \"ch.char_id, ch.name AS char_name, ch.fame, ch.class AS char_class, ch.base_level, ch.job_level, \";\n$col .= \"ch.guild_id, guild.name AS guild_name, guild.emblem_id as emblem \";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.`char` AS ch \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.guild ON guild.guild_id = ch.guild_id \";\n$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = ch.account_id \";\n\n$ids = implode(',', array_fill(0, count($alchemistJobs), '?'));\n$bind = array_keys($alchemistJobs);\n\n$sql .= \"WHERE 1=1 AND fame > 0 AND ch.class IN ($ids) \";\n\nif (Flux::config('HidePermBannedAlcheRank')) {\n\t$sql .= \"AND login.state != 5 \";\n}\nif (Flux::config('HideTempBannedAlcheRank')) {\n\t$sql .= \"AND (login.unban_time IS NULL OR login.unban_time = 0) \";\n}\n\nif (!is_null($jobClass)) {\n\t$sql .= \"AND ch.class = ? \";\n\t$bind[] = $jobClass;\n}\n\n$sql .= \"ORDER BY ch.fame DESC, ch.base_level DESC, ch.base_exp DESC, ch.job_level DESC, ch.job_exp DESC, ch.char_id ASC \";\n$sql .= \"LIMIT \". (int)Flux::config('AlchemistRankingLimit');\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n\n$chars = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/ranking/blacksmith.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title          = 'Blacksmith Ranking';\n$blacksmithJobs = Flux::config('BlacksmithJobClasses')->toArray();\n$jobClass       = $params->get('jobclass');\n$bind           = array();\n\nif (trim($jobClass) === '') {\n\t$jobClass = null;\n}\n\nif (!is_null($jobClass) && !array_key_exists($jobClass, $blacksmithJobs)) {\n\t$this->deny();\n}\n\n$col  = \"ch.char_id, ch.name AS char_name, ch.fame, ch.class AS char_class, ch.base_level, ch.job_level, \";\n$col .= \"ch.guild_id, guild.name AS guild_name, guild.emblem_id as emblem \";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.`char` AS ch \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.guild ON guild.guild_id = ch.guild_id \";\n$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = ch.account_id \";\n\n$ids = implode(',', array_fill(0, count($blacksmithJobs), '?'));\n$bind = array_keys($blacksmithJobs);\n\n$sql .= \"WHERE 1=1 AND fame > 0 AND ch.class IN ($ids) \";\n\nif (Flux::config('HidePermBannedSmithRank')) {\n\t$sql .= \"AND login.state != 5 \";\n}\nif (Flux::config('HideTempBannedSmithRank')) {\n\t$sql .= \"AND (login.unban_time IS NULL OR login.unban_time = 0) \";\n}\n\nif (!is_null($jobClass)) {\n\t$sql .= \"AND ch.class = ? \";\n\t$bind[] = $jobClass;\n}\n\n$sql .= \"ORDER BY ch.fame DESC, ch.base_level DESC, ch.base_exp DESC, ch.job_level DESC, ch.job_exp DESC, ch.char_id ASC \";\n$sql .= \"LIMIT \". (int)Flux::config('BlacksmithRankingLimit');\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n\n$chars = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/ranking/character.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title    = 'Character Ranking';\n$classes  = Flux::config('JobClasses')->toArray();\n$jobClass = $params->get('jobclass');\n$bind     = array();\n\nif (trim($jobClass ?: '') === '') {\n\t$jobClass = null;\n}\n\nif (!is_null($jobClass) && !array_key_exists($jobClass, $classes)) {\n\t$this->deny();\n}\n\n$col  = \"ch.char_id, ch.name AS char_name, ch.class AS char_class, ch.base_level, ch.base_exp, ch.job_level, ch.job_exp, \";\n$col .= \"ch.guild_id, guild.name AS guild_name, guild.emblem_id as emblem \";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.`char` AS ch \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.guild ON guild.guild_id = ch.guild_id \";\n$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = ch.account_id \";\n$sql .= \"WHERE 1=1 \";\n\nif (Flux::config('HidePermBannedCharRank')) {\n\t$sql .= \"AND login.state != 5 \";\n}\nif (Flux::config('HideTempBannedCharRank')) {\n\t$sql .= \"AND (login.unban_time IS NULL OR login.unban_time = 0) \";\n}\n\n$groups = AccountLevel::getGroupID((int)Flux::config('RankingHideGroupLevel'), '<');\nif(!empty($groups)) {\n\t$ids   = implode(', ', array_fill(0, count($groups), '?'));\n\t$sql  .= \"AND login.group_id IN ($ids) \";\n\t$bind  = array_merge($bind, $groups);\n}\n\nif ($days=Flux::config('CharRankingThreshold')) {\n\t$sql    .= 'AND TIMESTAMPDIFF(DAY, login.lastlogin, NOW()) <= ? ';\n\t$bind[]  = $days * 24 * 60 * 60;\n}\n\nif (!is_null($jobClass)) {\n\t$sql .= \"AND ch.class = ? \";\n\t$bind[] = $jobClass;\n}\n\n$sql .= \"ORDER BY ch.base_level DESC, ch.base_exp DESC, ch.job_level DESC, ch.job_exp DESC, ch.char_id ASC \";\n$sql .= \"LIMIT \".(int)Flux::config('CharRankingLimit');\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n\n$chars = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/ranking/death.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title    = 'Death Ranking';\n$classes  = Flux::config('JobClasses')->toArray();\n$jobClass = $params->get('jobclass');\n$bind     = array();\n\nif (trim($jobClass) === '') {\n\t$jobClass = null;\n}\n\nif (!is_null($jobClass) && !array_key_exists($jobClass, $classes)) {\n\t$this->deny();\n}\n\n$col  = \"ch.char_id, ch.name AS char_name, ch.class AS char_class, ch.base_level, ch.job_level, \";\n$col .= \"ch.guild_id, guild.name AS guild_name, guild.emblem_id as emblem, \";\n\n$col .= \"CAST(IFNULL(reg.value, '0') AS UNSIGNED) AS death_count\";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.`char` AS ch \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.guild ON guild.guild_id = ch.guild_id \";\n$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = ch.account_id \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.`char_reg_num` AS reg ON reg.char_id = ch.char_id AND reg.key = 'PC_DIE_COUNTER' \";\n$sql .= \"WHERE 1=1 \";\n\nif (Flux::config('HidePermBannedDeathRank')) {\n\t$sql .= \"AND login.state != 5 \";\n}\nif (Flux::config('HideTempBannedDeathRank')) {\n\t$sql .= \"AND (login.unban_time IS NULL OR login.unban_time = 0) \";\n}\n\n$groups = AccountLevel::getGroupID((int)Flux::config('RankingHideGroupLevel'), '<');\nif(!empty($groups)) {\n\t$ids   = implode(', ', array_fill(0, count($groups), '?'));\n\t$sql  .= \"AND login.group_id IN ($ids) \";\n\t$bind  = array_merge($bind, $groups);\n}\n\nif ($days=Flux::config('DeathRankingThreshold')) {\n\t$sql    .= 'AND TIMESTAMPDIFF(DAY, login.lastlogin, NOW()) <= ? ';\n\t$bind[]  = $days * 24 * 60 * 60;\n}\n\nif (!is_null($jobClass)) {\n\t$sql .= \"AND ch.class = ? \";\n\t$bind[] = $jobClass;\n}\n\n$sql .= \"ORDER BY death_count DESC, ch.char_id DESC \";\n$sql .= \"LIMIT \".(int)Flux::config('DeathRankingLimit');\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n\n$chars = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/ranking/guild.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Guild Ranking';\n\n$castleNames = Flux::config('CastleNames')->toArray();\n$ids  = implode(',', array_fill(0, count($castleNames), '?'));\n$bind = array_keys($castleNames);\n\n$col  = \"g.guild_id, g.name, g.guild_lv, g.average_lv, g.emblem_id as emblem, \";\n$col .= \"GREATEST(g.exp, (SELECT SUM(exp) FROM {$server->charMapDatabase}.guild_member WHERE guild_member.guild_id = g.guild_id)) AS exp, \";\n$col .= \"(SELECT COUNT(char_id) FROM {$server->charMapDatabase}.`char` WHERE `char`.guild_id = g.guild_id) AS members, \";\n$col .= \"(SELECT COUNT(castle_id) FROM {$server->charMapDatabase}.guild_castle WHERE guild_castle.guild_id = g.guild_id AND castle_id IN ($ids)) AS castles\";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.guild AS g \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.`char` AS ch ON ch.char_id = g.char_id \";\n$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = ch.account_id \";\n\n$groups = AccountLevel::getGroupID((int)Flux::config('RankingHideGroupLevel'), '<');\nif(!empty($groups)) {\n\t$ids   = implode(', ', array_fill(0, count($groups), '?'));\n\t$sql  .= \"WHERE login.group_id IN ($ids) \";\n\t$bind  = array_merge($bind, $groups);\n}\n\n$sql .= \"ORDER BY g.guild_lv DESC, castles DESC, exp DESC, (g.average_lv + members) DESC, \";\n$sql .= \"g.average_lv DESC, members DESC, g.max_member DESC, g.next_exp ASC \";\n$sql .= \"LIMIT \".(int)Flux::config('GuildRankingLimit');\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n$guilds = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/ranking/homunculus.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title    = 'Homunculus Ranking';\n$classes  = Flux::config('HomunClasses')->toArray();\n$homunClass = $params->get('homunclass');\n$bind     = array();\n\nif (trim($homunClass) === '') {\n\t$homunClass = null;\n}\n\nif (!is_null($homunClass) && !array_key_exists($homunClass, $classes)) {\n\t$this->deny();\n}\n\n$col  = \"hm.name AS homun_name, hm.char_id AS owner, `char`.name AS owner_name, hm.class AS homun_class, hm.intimacy, hm.level, hm.exp\";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.homunculus AS hm \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.`char` ON `char`.homun_id = hm.homun_id \";\n$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id \";\n$sql .= \"WHERE 1=1 \";\n\nif (Flux::config('HidePermBannedHomunRank')) {\n\t$sql .= \"AND login.state != 5 \";\n}\nif (Flux::config('HideTempBannedHomunRank')) {\n\t$sql .= \"AND (login.unban_time IS NULL OR login.unban_time = 0) \";\n}\n\n$groups = AccountLevel::getGroupID((int)Flux::config('RankingHideGroupLevel'), '<');\nif(!empty($groups)) {\n\t$ids   = implode(', ', array_fill(0, count($groups), '?'));\n\t$sql  .= \"AND login.group_id IN ($ids) \";\n\t$bind  = array_merge($bind, $groups);\n}\n\nif ($days=Flux::config('HomunRankingThreshold')) {\n\t$sql    .= 'AND TIMESTAMPDIFF(DAY, login.lastlogin, NOW()) <= ? ';\n\t$bind[]  = $days * 24 * 60 * 60;\n}\n\nif (!is_null($homunClass)) {\n\t$sql .= \"AND hm.class = ? \";\n\t$bind[] = $homunClass;\n}\n\n$sql .= \"ORDER BY hm.level DESC, hm.exp DESC, hm.intimacy DESC, hm.homun_id ASC \";\n$sql .= \"LIMIT \".(int)Flux::config('HomunRankingLimit');\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n\n$homuns = $sth->fetchAll();\n\n?>\n"
  },
  {
    "path": "modules/ranking/mvp.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$title = 'MVP Ranking';\n$mvpdata = (int)$params->get('mvpdata');\n$limit = (int)Flux::config('MVPRankingLimit');\n\nrequire_once 'Flux/TemporaryTable.php';\n\nif (trim($mvpdata) === '') { $mvpdata = null; }\n\n// List MVPS\n$tableName  = \"{$server->charMapDatabase}.monsters\";\nif($server->isRenewal) {\n    $fromTables = array(\"{$server->charMapDatabase}.mob_db_re\", \"{$server->charMapDatabase}.mob_db2_re\");\n} else {\n    $fromTables = array(\"{$server->charMapDatabase}.mob_db\", \"{$server->charMapDatabase}.mob_db2\");\n}\n$tempTable  = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);\n\n// Get all group_id based on killer_char_id\n$sql = \"SELECT DISTINCT(`kill_char_id`) FROM {$server->logsDatabase}.`mvplog`\";\n$sql_params = array();\nif ($mvpdata) {\n    $sql .= \" WHERE `monster_id`=?\";\n    $sql_params[] = $mvpdata;\n}\n$sth = $server->connection->getStatementForLogs($sql);\n$sth->execute($sql_params);\n$killer_char_ids = $sth->fetchAll(PDO::FETCH_COLUMN, 0);\n\n$char_ids_filter = [];\nif(count($killer_char_ids)) {\n    // Get group id of the killer and filter -_-\n    $groups = AccountLevel::getGroupID((int)Flux::config('RankingHideGroupLevel'), '<');\n    $sql = \"SELECT `char`.`char_id` FROM {$server->charMapDatabase}.`char`\";\n    $sql .= \" LEFT JOIN {$server->loginDatabase}.`login` ON `char`.`account_id` = `login`.`account_id`\";\n    $sql .= \" WHERE `char`.`char_id`IN(\".implode(',',array_fill(0, count($killer_char_ids), '?')).\") AND `login`.`group_id` NOT IN (\".implode(',',array_fill(0, count($groups), '?')).\")\";\n    $sql_params = array_merge($killer_char_ids, $groups);\n    $sth = $server->connection->getStatement($sql);\n    $sth->execute($sql_params);\n    $char_ids_filter = $sth->fetchAll(PDO::FETCH_COLUMN, 0);\n}\n\n$bind = array();\n$col = \"id, name_english, name_aegis\";\n$sql = \"SELECT $col FROM $tableName WHERE `mvp_exp` > 0 ORDER BY `name_english`\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n$moblist = $sth->fetchAll();\n\n$char_ids = array();\n$monsters = array();\n\nif($mvpdata){\n    // Players with most kills\n    $bind[] = $mvpdata;\n    $col = \"mlog.kill_char_id, mlog.monster_id, count(*) AS count \";\n    $sql = \"SELECT $col FROM {$server->logsDatabase}.`mvplog` AS mlog \";\n    $sql.= \"WHERE mlog.monster_id = ? \";\n    if (count($char_ids_filter)) {\n        $sql .= \" AND `kill_char_id` NOT IN(\".implode(',',array_fill(0, count($char_ids_filter), '?')).\")\";\n    }\n    $sql.= \"GROUP BY mlog.kill_char_id ORDER BY count DESC LIMIT $limit\";\n    $sth = $server->connection->getStatementForLogs($sql);\n    $bind = array_merge($bind, $char_ids_filter);\n    $sth->execute($bind);\n    $kills = $sth->fetchAll();\n    foreach ($kills as $kill) {\n        $char_ids[$kill->kill_char_id] = null;\n        $monsters[$kill->monster_id] = null;\n    }\n} else {\n\n    // Latest x Kills\n    $col = \"mlog.mvp_id, mlog.mvp_date, mlog.kill_char_id, mlog.monster_id, mlog.mvpexp, mlog.map \";\n    $sql = \"SELECT $col FROM {$server->logsDatabase}.`mvplog` AS mlog \";\n    if (count($char_ids_filter)) {\n        $sql .= \" WHERE  `kill_char_id` NOT IN(\".implode(',',array_fill(0, count($char_ids_filter), '?')).\")\";\n    }\n    $sql.= \"ORDER BY mlog.mvp_date DESC LIMIT $limit\";\n    $sth = $server->connection->getStatementForLogs($sql);\n    $sth->execute($char_ids_filter);\n    $mvps = $sth->fetchAll();\n    foreach ($mvps as $mvp) {\n        $char_ids[$mvp->kill_char_id] = null;\n        $monsters[$mvp->monster_id] = null;\n    }\n}\n\nif (count($char_ids)) {\n    $sql = \"SELECT `char_id`,`name`,login.`group_id` FROM {$server->charMapDatabase}.`char` \";\n    $sql .= \"LEFT JOIN {$server->loginDatabase}.`login` ON `char`.`account_id` = login.`account_id` \";\n    $sql .= \"WHERE `char_id` IN(\".implode(',', array_fill(0, count($char_ids), '?')).\")\";\n    $sth = $server->connection->getStatement($sql);\n    $sth->execute(array_keys($char_ids));\n    $temp = $sth->fetchAll();\n    foreach ($temp as $char) {\n        $char_ids[$char->char_id] = array('name' => $char->name, 'group_id' => $char->group_id);\n    }\n}\n\nif (count($monsters)) {\n    $sql = \"SELECT `id`,`name_english` FROM $tableName WHERE `id` IN(\".implode(',', array_fill(0, count($monsters), '?')).\")\";\n    $sth = $server->connection->getStatement($sql);\n    $sth->execute(array_keys($monsters));\n    $temp = $sth->fetchAll();\n    foreach ($temp as $mon) {\n        $monsters[$mon->id] = $mon->name_english;\n    }\n}\n$char_ids_filter = null;\n$temp = null;\n"
  },
  {
    "path": "modules/ranking/zeny.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title    = 'Zeny Ranking';\n$classes  = Flux::config('JobClasses')->toArray();\n$jobClass = $params->get('jobclass');\n$bind     = array();\n\nif (trim($jobClass) === '') {\n\t$jobClass = null;\n}\n\nif (!is_null($jobClass) && !array_key_exists($jobClass, $classes)) {\n\t$this->deny();\n}\n\n$charPrefsTable = Flux::config('FluxTables.CharacterPrefsTable');\n\n$col  = \"ch.char_id, ch.name AS char_name, ch.zeny, ch.class AS char_class, ch.base_level, ch.base_exp, ch.job_level, ch.job_exp, \";\n$col .= \"ch.guild_id, guild.name AS guild_name, guild.emblem_id as emblem \";\n\n$sql  = \"SELECT $col FROM {$server->charMapDatabase}.`char` AS ch \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.$charPrefsTable AS hide_from_zr ON \";\n$sql .= \"(hide_from_zr.name = 'HideFromZenyRanking' AND hide_from_zr.char_id = ch.char_id) \";\n$sql .= \"LEFT JOIN {$server->charMapDatabase}.guild ON guild.guild_id = ch.guild_id \";\n$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = ch.account_id \";\n$sql .= \"WHERE 1=1 \";\n\nif (Flux::config('HidePermBannedZenyRank')) {\n\t$sql .= \"AND login.state != 5 \";\n}\nif (Flux::config('HideTempBannedZenyRank')) {\n\t$sql .= \"AND (login.unban_time IS NULL OR login.unban_time = 0) \";\n}\n\n$groupsLT  = AccountLevel::getGroupID((int)Flux::config('RankingHideGroupLevel'), '<');\nif(!empty($groupsLT)) {\n\t$idsLT = implode(', ', array_fill(0, count($groupsLT), '?'));\n\t$sql  .= \"AND login.group_id IN ($idsLT)\";\n\t$bind  = array_merge($bind, $groupsLT);\n}\n\nif ($days=Flux::config('ZenyRankingThreshold')) {\n\t$sql    .= 'AND TIMESTAMPDIFF(DAY, login.lastlogin, NOW()) <= ? ';\n\t$bind[]  = $days * 24 * 60 * 60;\n}\n\n$groupsGEQ = AccountLevel::getGroupID((int)$auth->getGroupLevelToHideFromZenyRank, '>=');\nif(!empty($groupsGEQ)) {\n\t$ids    = implode(', ', array_fill(0, count($groupsGEQ), '?'));\n\t$check1 = \"AND login.group_id IN ($ids)\";\n\t$bind   = array_merge($bind, $groupsGEQ);\n}\n\nif(!empty($groupsLT)) {\n\t$check2 = \"OR login.group_id IN ($idsLT)\";\n\t$bind   = array_merge($bind, $groupsLT);\n}\n\n// Whether or not the character is allowed to hide themselves from the Zeny Ranking.\nif(isset($check1) && isset($check2)) {\n\t$sql .= \"AND (((hide_from_zr.value IS NULL OR hide_from_zr.value = 0) $check1) $check2) \";\n}\n\nif (!is_null($jobClass)) {\n\t$sql .= \"AND ch.class = ? \";\n\t$bind[] = $jobClass;\n}\n\n$sql .= \"ORDER BY ch.zeny DESC, ch.base_level DESC, ch.base_exp DESC, ch.job_level DESC, ch.job_exp DESC, ch.char_id ASC \";\n$sql .= \"LIMIT \".(int)Flux::config('ZenyRankingLimit');\n$sth  = $server->connection->getStatement($sql);\n\n$sth->execute($bind);\n\n$chars = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/server/info.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('ServerInfoTitle');\n$info  = array(\n\t\t'accounts'   => 0,\n\t\t'characters' => 0,\n\t\t'guilds'     => 0,\n\t\t'parties'    => 0,\n\t\t'zeny'       => 0,\n\t\t'classes'    => array()\n);\n\n// Accounts.\n$sql = \"SELECT COUNT(account_id) AS total FROM {$server->loginDatabase}.login WHERE sex != 'S' \";\nif (Flux::config('HideTempBannedStats')) {\n\t$sql .= \"AND unban_time <= UNIX_TIMESTAMP() \";\n}\nif (Flux::config('HidePermBannedStats')) {\n\tif (Flux::config('HideTempBannedStats')) {\n\t\t$sql .= \"AND state != 5 \";\n\t} else {\n\t\t$sql .= \"AND state != 5 \";\n\t}\n}\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n$info['accounts'] += $sth->fetch()->total;\n\n// Characters.\n$sql = \"SELECT COUNT(`char`.char_id) AS total FROM {$server->charMapDatabase}.`char` \";\nif (Flux::config('HideTempBannedStats')) {\n\t$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id \";\n\t$sql .= \"WHERE login.unban_time <= UNIX_TIMESTAMP()\";\n}\nif (Flux::config('HidePermBannedStats')) {\n\tif (Flux::config('HideTempBannedStats')) {\n\t\t$sql .= \" AND login.state != 5\";\n\t} else {\n\t\t$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id \";\n\t\t$sql .= \"WHERE login.state != 5\";\n\t}\n}\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n$info['characters'] += $sth->fetch()->total;\n\n// Guilds.\n$sql = \"SELECT COUNT(guild_id) AS total FROM {$server->charMapDatabase}.guild\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n$info['guilds'] += $sth->fetch()->total;\n\n// Parties.\n$sql = \"SELECT COUNT(party_id) AS total FROM {$server->charMapDatabase}.party\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n$info['parties'] += $sth->fetch()->total;\n\n// Zeny.\n$bind = array();\n$sql  = \"SELECT SUM(`char`.zeny) AS total FROM {$server->charMapDatabase}.`char` \";\nif ($hideGroupLevel=Flux::config('InfoHideZenyGroupLevel')) {\n\t$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id \";\n\t\n\t$groups = AccountLevel::getGroupID($hideGroupLevel, '<');\n\tif(!empty($groups)) {\n\t\t$ids   = implode(', ', array_fill(0, count($groups), '?'));\n\t\t$sql  .= \"WHERE login.group_id IN ($ids) \";\n\t\t$bind  = array_merge($bind, $groups);\n\t}\n}\nif (Flux::config('HideTempBannedStats')) {\n\tif ($hideGroupLevel) {\n\t\t$sql .= \" AND unban_time <= UNIX_TIMESTAMP()\";\n\t} else {\n\t\t$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id \";\n\t\t$sql .= \"WHERE unban_time <= UNIX_TIMESTAMP()\";\n\t}\n}\nif (Flux::config('HidePermBannedStats')) {\n\tif ($hideGroupLevel || Flux::config('HideTempBannedStats')) {\n\t\t$sql .= \" AND state != 5\";\n\t} else {\n\t\t$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id \";\n\t\t$sql .= \"WHERE state != 5\";\n\t}\n}\n\n$sth = $server->connection->getStatement($sql);\n$sth->execute($hideGroupLevel ? $bind : array());\n$info['zeny'] += $sth->fetch()->total;\n\n// Job classes.\n$sql = \"SELECT `char`.class, COUNT(`char`.class) AS total FROM {$server->charMapDatabase}.`char` \";\nif (Flux::config('HideTempBannedStats')) {\n\t$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id \";\n\t$sql .= \"WHERE login.unban_time <= UNIX_TIMESTAMP() \";\n}\nif (Flux::config('HidePermBannedStats')) {\n\tif (Flux::config('HideTempBannedStats')) {\n\t\t$sql .= \" AND login.state != 5 \";\n\t} else {\n\t\t$sql .= \"LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id \";\n\t\t$sql .= \"WHERE login.state != 5 \";\n\t}\n}\n$sql .= \"GROUP BY `char`.class\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute();\n\n$classes = $sth->fetchAll();\nif ($classes) {\n\tforeach ($classes as $class) {\n\t\t$classnum = (int)$class->class;\n\t\t$info['classes'][Flux::config(\"JobClasses.$classnum\")] = $class->total;\n\t}\n}\n\nif (Flux::config('SortJobsByAmount')) {\n\tarsort($info['classes']);\n}\n?>\n"
  },
  {
    "path": "modules/server/status-xml.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\ninclude 'status.php';\n$dom  = new DomDocument('1.0', 'utf-8');\n$root = $dom->createElement('ServerStatus'); // Root element.\n\nforeach ($serverStatus as $privServerName => $gameServers) {\n\t$group  = $dom->createElement('Group');\n\t$name   = $dom->createAttribute('name');\n\t$name->nodeValue = $privServerName;\n\t\n\t// Append server name element.\n\t$group->appendChild($name);\n\t\n\tforeach ($gameServers as $serverName => $gameServer) {\n\t\t$serv = $dom->createElement('Server');\n\t\t$name = $dom->createAttribute('name');\n\t\t$name->nodeValue = $serverName;\n\t\t\n\t\t$serv->appendChild($name);\n\t\t\n\t\t$lserv  = $dom->createAttribute('loginServer');\n\t\t$cserv  = $dom->createAttribute('charServer');\n\t\t$mserv  = $dom->createAttribute('mapServer');\n\t\t$online = $dom->createAttribute('playersOnline');\n\t\t\n\t\t$lserv->nodeValue  = (int)$gameServer['loginServerUp'];\n\t\t$cserv->nodeValue  = (int)$gameServer['charServerUp'];\n\t\t$mserv->nodeValue  = (int)$gameServer['mapServerUp'];\n\t\t$online->nodeValue = (int)$gameServer['playersOnline'];\n\t\t\n\t\t$serv->appendChild($lserv);\n\t\t$serv->appendChild($cserv);\n\t\t$serv->appendChild($mserv);\n\t\t$serv->appendChild($online);\n\t\t$group->appendChild($serv);\n\t}\n\t\n\t$root->appendChild($group);\n}\n\n$dom->appendChild($root);\n\nheader('Content-Type: text/xml');\necho $dom->saveXML();\nexit;\n?>\n"
  },
  {
    "path": "modules/server/status.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('ServerStatusTitle');\n$cache = FLUX_DATA_DIR.'/tmp/ServerStatus.cache';\n$tbl = Flux::config('FluxTables.OnlinePeakTable'); \n\n\nif (file_exists($cache) && (time() - filemtime($cache)) < (Flux::config('ServerStatusCache') * 60)) {\n\t$serverStatus = unserialize(file_get_contents($cache));\n}\nelse {\n\t$serverStatus = array();\n\tforeach (Flux::$loginAthenaGroupRegistry as $groupName => $loginAthenaGroup) {\n\t\tif (!array_key_exists($groupName, $serverStatus)) {\n\t\t\t$serverStatus[$groupName] = array();\n\t\t}\n\n\t\t$loginServerUp = $loginAthenaGroup->loginServer->isUp();\n\n\t\tforeach ($loginAthenaGroup->athenaServers as $athenaServer) {\n\t\t\t$serverName = $athenaServer->serverName;\n\n\t\t\t$sql = \"SELECT COUNT(char_id) AS players_online FROM {$athenaServer->charMapDatabase}.char WHERE `online` > '0'\";\n\t\t\t$sth = $loginAthenaGroup->connection->getStatement($sql);\n\t\t\t$sth->execute();\n\t\t\t$res = $sth->fetch();\n\n\t\t\tif(Flux::config('EnablePeakDisplay')){\n\t\t\t\t$sth = $server->connection->getStatement(\"SELECT `users` FROM {$server->charMapDatabase}.$tbl\");\n\t\t\t\t$sth->execute();\n\t\t\t\t$peak = $sth->fetch();\n\t\t\t}\n\t\t\t$serverStatus[$groupName][$serverName] = array(\n\t\t\t\t'loginServerUp' => $loginServerUp,\n\t\t\t\t 'charServerUp' => $athenaServer->charServer->isUp(),\n\t\t\t\t  'mapServerUp' => $athenaServer->mapServer->isUp(),\n\t\t\t\t'playersOnline' => intval($res ? $res->players_online : 0),\n                  'playersPeak' => intval($peak ? $peak->users : 0)\n\t\t\t);\n\t\t}\n\t}\n\t\n\t$fp = fopen($cache, 'w');\n\tif (is_resource($fp)) {\n\t\tfwrite($fp, serialize($serverStatus));\n\t\tfclose($fp);\n\t}\n}\n\n\n?>\n"
  },
  {
    "path": "modules/service/tos.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('TermsTitle');\n?>\n"
  },
  {
    "path": "modules/servicedesk/catcontrol.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n$option = trim($params->get('option'));\n$catid = trim($params->get('catid'));\n$tbl = Flux::config('FluxTables.ServiceDeskCatTable');\n\nif(isset($option) && $option == 'hide'){\n\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET display = 0 WHERE cat_id = ?\");\n\t$sth->execute(array($catid)); \n\t$this->redirect($this->url('servicedesk','catcontrol'));\n}\nif(isset($option) && $option == 'show'){\n\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET display = 1 WHERE cat_id = ?\");\n\t$sth->execute(array($catid)); \n\t$this->redirect($this->url('servicedesk','catcontrol'));\n}\n\nif(isset($_POST['name'])){\n\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbl (name, display)\";\n\t$sql .= \"VALUES (?, ?)\";\n\t$sth = $server->connection->getStatement($sql);\n\t$sth->execute(array($_POST['name'],$_POST['display'])); \n\t$this->redirect($this->url('servicedesk','catcontrol'));\n}\n\n$rep = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tbl ORDER BY cat_id\");\n$rep->execute();\n$catlist = $rep->fetchAll();\n\n\n?>\n"
  },
  {
    "path": "modules/servicedesk/create.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n$tbl = Flux::config('FluxTables.ServiceDeskTable'); \n$tblcat = Flux::config('FluxTables.ServiceDeskCatTable'); \n$tblsettings = Flux::config('FluxTables.ServiceDeskSettingsTable'); \n\n$charsql = $server->connection->getStatement(\"SELECT * FROM {$server->charMapDatabase}.char WHERE account_id = ?\");\n$charsql->execute(array($session->account->account_id));\n$charlist = $charsql->fetchAll();\n$charselect=NULL;\nif(!$charlist){\n\t$charselect='<option value=\"-1\">No Chars Available</option>';\n} else {\n\t$charselect='<option value=\"0\">All Characters</option>';\n\tforeach($charlist as $char){$charselect.='<option value=\"'. $char->char_id .'\">'. $char->name .'</option>';}\n}\n\n$catsql = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tblcat WHERE display = 1\");\n$catsql->execute();\n$catlist = $catsql->fetchAll();\n\nif(isset($_POST['account_id'])){\n\t$char_id\t= intval($_POST['char_id']);\n\t$category\t= intval($_POST['category']);\n\t$subject\t= htmlentities($_POST['subject']);\n\t$text\t= htmlentities($_POST['text']);\n\t$ip\t= $_POST['ip'];\n\tif($_POST['sslink']==NULL || $_POST['sslink']==''){$_POST['sslink'] = '0';}else{$_POST['sslink'] = htmlentities($_POST['sslink']);}\n\tif($_POST['chatlink']==NULL || $_POST['chatlink']==''){$_POST['chatlink'] = '0';}else{$_POST['chatlink'] = htmlentities($_POST['chatlink']);}\n\tif($_POST['videolink']==NULL || $_POST['videolink']==''){$_POST['videolink'] = '0';}else{$_POST['videolink'] = htmlentities($_POST['videolink']);}\n\n\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbl (account_id, char_id, category, sslink, chatlink, videolink, subject, text, ip, curemail, lastreply)\";\n\t$sql .= \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0)\";\n\t$sth = $server->connection->getStatement($sql);\n\t$sth->execute(array($_POST['account_id'], $char_id, $category, $_POST['sslink'], $_POST['chatlink'], $_POST['videolink'], $subject, $text, $ip, $session->account->email)); \n\n\tif(Flux::config('DiscordUseWebhook')) {\n\t\tif(Flux::config('DiscordSendOnNewTicket')) {\n\t\t\tsendtodiscord(Flux::config('DiscordWebhookURL'), 'New Ticket Created: '. $subject);\n\t\t}\n\t}\n\t\n\t// Send email to all staff with enable email setting.\n\t$sth = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tblsettings WHERE emailalerts = 1\");\n\t$sth->execute();\n\t$staff = $sth->fetchAll();\n\tif($staff){\n\t\tforeach($staff as $staffrow){\n\t\t\t$catsql = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tblcat WHERE cat_id = ?\");\n\t\t\t$catsql->execute(array($category));\n\t\t\t$catlist = $catsql->fetch();\n\t\t\t$stsql = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.login WHERE account_id = ?\");\n\t\t\t$stsql->execute(array($staffrow->account_id));\n\t\t\t$stlist = $stsql->fetch();\n\t\t\t$email = $stlist->email;\n\t\t\t\n\t\t\trequire_once 'Flux/Mailer.php';\n\t\t\t$name = $session->loginAthenaGroup->serverName;\n\t\t\t$mail = new Flux_Mailer();\n\t\t\t$sent = $mail->send($email, 'New Ticket Created', 'newticket', array(\n\t\t\t\t'Category'\t\t=> $catlist->name,\n\t\t\t\t'Subject'\t\t=> $subject,\n\t\t\t\t'Text'\t\t\t=> $text\n\t\t\t));\n\t\t}\n\t}\n\t$this->redirect($this->url('servicedesk','index'));\n}\n?>\n"
  },
  {
    "path": "modules/servicedesk/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n\n$tbl = Flux::config('FluxTables.ServiceDeskTable'); \n$tblcat = Flux::config('FluxTables.ServiceDeskCatTable'); \n\n$rep = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tbl WHERE account_id = ? AND status != 'Closed' ORDER BY ticket_id DESC\");\n$rep->execute(array($session->account->account_id));\n$ticketlist = $rep->fetchAll();\n$rowoutput=NULL;\nforeach($ticketlist as $trow){\n$catsql = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tblcat WHERE cat_id = ?\");\n$catsql->execute(array($trow->category));\n$catlist = $catsql->fetch();\n\n$rowoutput.='<tr >\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'view', array('ticketid' => $trow->ticket_id)) .'\" >'. $trow->ticket_id .'</a></td>\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'view', array('ticketid' => $trow->ticket_id)) .'\" >'. $trow->subject .'</a></td>\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'view', array('ticketid' => $trow->ticket_id)) .'\" >\n\t\t\t\t\t'. $catlist->name .'</a></td>\n\t\t\t\t<td>\n\t\t\t\t\t<font color=\"'. Flux::config('Font'. $trow->status .'Colour') .'\"><strong>'. $trow->status .'</strong></font>\n\t\t\t\t</td>\n\t\t\t\t<td width=\"50\">';\n\t\t\t\t\tif($trow->lastreply=='0'){$rowoutput.='<i>None</i>';} else {$rowoutput.= $trow->lastreply;}\n$rowoutput.='</td>\n\t\t\t\t<td>\n\t\t\t\t\t'. Flux::message('SDGroup'. $trow->team) .'\n\t\t\t\t</td>\n\t\t\t\t<td>'. date(Flux::config('DateFormat'),strtotime($trow->timestamp)) .'</td>\n\t\t\t</tr>';\n}\n\n$oldrep = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tbl WHERE account_id = ? AND status = 'Closed' ORDER BY ticket_id DESC\");\n$oldrep->execute(array($session->account->account_id));\n$oldticketlist = $oldrep->fetchAll();\n$oldrowoutput=NULL;\nforeach($oldticketlist as $oldtrow){\n$catsql = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tblcat WHERE cat_id = ?\");\n$catsql->execute(array($oldtrow->category));\n$catlist = $catsql->fetch();\n\n$oldrowoutput.='<tr >\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'view', array('ticketid' => $oldtrow->ticket_id)) .'\" >'. $oldtrow->ticket_id .'</a></td>\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'view', array('ticketid' => $oldtrow->ticket_id)) .'\" >'. $oldtrow->subject .'</a></td>\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'view', array('ticketid' => $oldtrow->ticket_id)) .'\" >\n\t\t\t\t\t'. $catlist->name .'</a></td>\n\t\t\t\t<td>\n\t\t\t\t\t<font color=\"'. Flux::config('Font'. $oldtrow->status .'Colour') .'\"><strong>'. $oldtrow->status .'</strong></font>\n\t\t\t\t</td>\n\t\t\t\t<td width=\"50\">';\n\t\t\t\t\tif($oldtrow->lastreply=='0'){$oldrowoutput.='<i>None</i>';} else {$oldrowoutput.= $oldtrow->lastreply;}\n$oldrowoutput.='</td>\n\t\t\t\t<td>\n\t\t\t\t\t'. Flux::message('SDGroup'. $oldtrow->team) .'\n\t\t\t\t</td>\n\t\t\t\t<td>'. date(Flux::config('DateFormat'),strtotime($oldtrow->timestamp)) .'</td>\n\t\t\t</tr>';\n}\n?>\n"
  },
  {
    "path": "modules/servicedesk/staffindex.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n\n$tbl = Flux::config('FluxTables.ServiceDeskTable'); \n$tblcat = Flux::config('FluxTables.ServiceDeskCatTable'); \n\n$rep = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tbl WHERE status != 'Closed' ORDER BY ticket_id DESC\");\n$rep->execute();\n$ticketlist = $rep->fetchAll();\n$rowoutput=NULL;\nforeach($ticketlist as $trow){\n$catsql = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tblcat WHERE cat_id = ?\");\n$catsql->execute(array($trow->category));\n$catlist = $catsql->fetch();\n\n$rowoutput.='<tr >\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) .'\" >'. $trow->ticket_id .'</a></td>\n\t\t\t\t<td>'. $trow->account_id .'</td>\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) .'\" >'. $trow->subject .'</a></td>\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) .'\" >\n\t\t\t\t\t'. $catlist->name .'</a></td>\n\t\t\t\t<td>\n\t\t\t\t\t<font color=\"'. Flux::config('Font'. $trow->status .'Colour') .'\"><strong>'. $trow->status .'</strong></font>\n\t\t\t\t</td>\n\t\t\t\t<td width=\"50\">';\n\t\t\t\t\tif($trow->lastreply=='0'){$rowoutput.='<i>None</i>';} else {$rowoutput.= $trow->lastreply;}\n$rowoutput.='</td>\n\t\t\t\t<td>\n\t\t\t\t\t'. Flux::message('SDGroup'. $trow->team) .'\n\t\t\t\t</td>\n\t\t\t\t<td>'. date(Flux::config('DateFormat'),strtotime($trow->timestamp)) .'</td>\n\t\t\t</tr>';\n}\n\n?>\n"
  },
  {
    "path": "modules/servicedesk/staffsettings.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n$option = trim($params->get('option'));\n$cur = trim($params->get('cur'));\n$staffid = trim($params->get('staffid'));\n$tbl = Flux::config('FluxTables.ServiceDeskSettingsTable');\n$sth = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tbl WHERE account_id = ?\");\n$sth->execute(array($session->account->account_id));\n$staff = $sth->fetchAll();\nif($staff){\n\tforeach($staff as $staffsess){}\n}\n\nif(isset($option) && $option == 'delete'){\n\t$sth = $server->connection->getStatement(\"DELETE FROM {$server->loginDatabase}.$tbl WHERE account_id = $staffid\");\n\t$sth->execute(); \n\t$this->redirect($this->url('servicedesk','staffsettings'));\n}\n\nif(isset($option) && $option == 'alerttoggle'){\n\tif($cur=='1'){\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET emailalerts = 0 WHERE account_id = $staffid\");\n\t} else {\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET emailalerts = 1 WHERE account_id = $staffid\");\n\t}\n\n\t$sth->execute(); \n\t$this->redirect($this->url('servicedesk','staffsettings'));\n}\n\nif(isset($_POST['account_id'])){\n\t$sth = $server->connection->getStatement(\"SELECT account_id FROM {$server->loginDatabase}.$tbl WHERE account_id = ?\");\n\t$sth->execute(array($_POST['account_id']));\n\t$fetch = $sth->fetch();\n\tif($fetch){\t$session->setMessageData('Account already exists!'); } else {\n\tif(!$_POST['emailalerts']){$_POST['emailalerts'] = 0;}\n\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbl (account_id, account_name, prefered_name, team, emailalerts)\";\n\t$sql .= \"VALUES (?, ?, ?, ?, ?)\";\n\t$sth = $server->connection->getStatement($sql);\n\t$sth->execute(array($_POST['account_id'],$_POST['account_name'],$_POST['prefered_name'],$_POST['team'], $_POST['emailalerts'])); \n\t$this->redirect($this->url('servicedesk','staffsettings'));\n}\n}\n\n$rep = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tbl ORDER BY account_id\");\n$rep->execute();\n$stafflist = $rep->fetchAll();\n?>\n"
  },
  {
    "path": "modules/servicedesk/staffview.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n$ticket_id = trim($params->get('ticketid'));\n$tbl = Flux::config('FluxTables.ServiceDeskTable');\n$tbla = Flux::config('FluxTables.ServiceDeskATable');\n$tblsettings = Flux::config('FluxTables.ServiceDeskSettingsTable');\n\n$sth = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tblsettings WHERE account_id = ?\");\n$sth->execute(array($session->account->account_id));\n$staff = $sth->fetchAll();\nif(!$staff){\n\t$session->setMessageData('!!!Error!!! Account not in Staff Settings table! Please submit your prefered name before using the Service Desk.'); $this->redirect($this->url('servicedesk','staffsettings'));\n} else {\n\tforeach($staff as $staffsess){}\n}\n\nif(isset($_POST['postreply']) && $_POST['postreply'] == 'gogolol'){\n//\tRespond and Return to Ticket: <input type=\"radio\" name=\"secact\" value=\"1\"/>\n//\tRespond and Return to List: <input type=\"radio\" name=\"secact\" value=\"2\"/>\n//\tRespond and Resolve Ticket: <input type=\"radio\" name=\"secact\" value=\"3\"/>\n//\tEscalate: <input type=\"radio\" name=\"secact\" value=\"4\"/>\n//\tClose Ticket: <input type=\"radio\" name=\"secact\" value=\"5\"/>\n//\tRespond and Re-Open Ticket: <input type=\"radio\" name=\"secact\" value=\"6\"/>\n//\tResolve Ticket and Credit Account: <input type=\"radio\" name=\"secact\" value=\"7\"/>\n\tif($_POST['secact']=='1'){\n\t\tif($_POST['response']=='Leave as-is to skip text response.' || $_POST['response'] == '' || $_POST['response'] == NULL || !isset($_POST['response'])){\n\t\t\t$text = '0';\n\t\t} else {\n\t\t\t$text = htmlentities($_POST['response']);\n\t\t}\n\t\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbla (ticket_id, author, text, action, ip, isstaff)\";\n\t\t$sql .= \"VALUES (?, ?, ?, 0, ?, 1)\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($ticket_id, $_POST['staff_reply_name'], $text, $_SERVER['REMOTE_ADDR']));\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET lastreply = 'Staff' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id));\n\t\t\t\trequire_once 'Flux/Mailer.php';\n\t\t\t\t$name = $session->loginAthenaGroup->serverName;\n\t\t\t\t$mail = new Flux_Mailer();\n\t\t\t\t$sent = $mail->send($_POST['curemail'], 'Ticket Reply', 'ticketreply', array(\n\t\t\t\t\t'TicketID'\t\t=> $ticket_id,\n\t\t\t\t\t'Staff'\t\t\t=> $staffsess->prefered_name\n\t\t\t\t));\n\t\t\t\tif ($sent) {\n\t\t\t\t\t$this->redirect($this->url('servicedesk','staffview', array('ticketid' => $ticket_id)));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$fail = true;\n\t\t\t\t}\n\n\t}elseif($_POST['secact']=='2'){\n\t\tif($_POST['response']=='Leave as-is to skip text response.' || $_POST['response'] == '' || $_POST['response'] == NULL || !isset($_POST['response'])){\n\t\t\t$text = '0';\n\t\t} else {\n\t\t\t$text = htmlentities($_POST['response']);\n\t\t}\n\t\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbla (ticket_id, author, text, action, ip, isstaff)\";\n\t\t$sql .= \"VALUES (?, ?, ?, 0, ?, 1)\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($ticket_id, $_POST['staff_reply_name'], $text, $_SERVER['REMOTE_ADDR']));\n\t\t\t\trequire_once 'Flux/Mailer.php';\n\t\t\t\t$name = $session->loginAthenaGroup->serverName;\n\t\t\t\t$mail = new Flux_Mailer();\n\t\t\t\t$sent = $mail->send($email, 'Ticket Reply', 'ticketreply', array(\n\t\t\t\t\t'TicketID'\t\t=> $ticket_id,\n\t\t\t\t\t'Staff'\t\t\t=> $staffsess->prefered_name\n\t\t\t\t));\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET lastreply = 'Staff' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id));\n\t\t$this->redirect($this->url('servicedesk','staffindex'));\n\n\t}elseif($_POST['secact']=='3'){\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET status = 'Resolved' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id));\n\n\t\tif($_POST['response']=='Leave as-is to skip text response.' || $_POST['response'] == '' || $_POST['response'] == NULL || !isset($_POST['response'])){\n\t\t\t$text = '0';\n\t\t} else {\n\t\t\t$text = htmlentities($_POST['response']);\n\t\t}\n\t\t$action='Ticket Resolved';\n\n\t\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbla (ticket_id, author, text, action, ip, isstaff)\";\n\t\t$sql .= \"VALUES (?, ?, ?, ?, ?, 1)\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($ticket_id, $_POST['staff_reply_name'], $text, $action, $_SERVER['REMOTE_ADDR']));\n\t\t\t\trequire_once 'Flux/Mailer.php';\n\t\t\t\t$name = $session->loginAthenaGroup->serverName;\n\t\t\t\t$mail = new Flux_Mailer();\n\t\t\t\t$sent = $mail->send($email, 'Ticket Reply', 'ticketreply', array(\n\t\t\t\t\t'TicketID'\t\t=> $ticket_id,\n\t\t\t\t\t'Staff'\t\t\t=> $staffsess->prefered_name\n\t\t\t\t));\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET lastreply = 'Staff' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id));\n\t\t$this->redirect($this->url('servicedesk','staffindex'));\n\n\t}elseif($_POST['secact']=='4'){\n\t\tif($staffsess->team=='1'){\n\t\t\t$escalateto=2;\n\t\t}\n\t\tif($staffsess->team=='2'){\n\t\t\t$escalateto=3;\n\t\t}\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET team = ? WHERE ticket_id = ?\");\n\t\t$sth->execute(array($escalateto, $ticket_id));\n\n\t\tif($_POST['response']=='Leave as-is to skip text response.' || $_POST['response'] == '' || $_POST['response'] == NULL || !isset($_POST['response'])){\n\t\t\t$text = '0';\n\t\t} else {\n\t\t\t$text = htmlentities($_POST['response']);\n\t\t}\n\t\t$action='Escalated to a member of the '. Flux::message('SDGroup'. $escalateto) .' team.';\n\t\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbla (ticket_id, author, text, action, ip, isstaff)\";\n\t\t$sql .= \"VALUES (?, ?, ?, ?, ?, 1)\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($ticket_id, $_POST['staff_reply_name'], $text, $action, $_SERVER['REMOTE_ADDR']));\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET lastreply = 'Staff' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id));\n\t\t$this->redirect($this->url('servicedesk','staffindex'));\n\n\t}elseif($_POST['secact']=='5'){\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET status = 'Closed' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id));\n\t\tif($_POST['response']=='Leave as-is to skip text response.' || $_POST['response'] == '' || $_POST['response'] == NULL || !isset($_POST['response'])){\n\t\t\t$text = '0';\n\t\t} else {\n\t\t\t$text = htmlentities($_POST['response']);\n\t\t}\n\t\t$action='Ticket Closed by a member of the '. Flux::message('SDGroup'. $staffsess->team) .' group.';\n\t\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbla (ticket_id, author, text, action, ip, isstaff)\";\n\t\t$sql .= \"VALUES (?, ?, ?, ?, ?, 1)\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($ticket_id, $_POST['staff_reply_name'], $text, $action, $_SERVER['REMOTE_ADDR']));\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET lastreply = 'Staff' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id));\n\t\t$this->redirect($this->url('servicedesk','staffindex'));\n\n\t}elseif($_POST['secact']=='6'){\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET status = 'Pending' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id));\n\n\t\tif($_POST['response']=='Leave as-is to skip text response.' || $_POST['response'] == '' || $_POST['response'] == NULL || !isset($_POST['response'])){\n\t\t\t$text = '0';\n\t\t} else {\n\t\t\t$text = htmlentities($_POST['response']);\n\t\t}\n\t\t$action='Ticket Re-Opened by a member of the '. Flux::message('SDGroup'. $staffsess->team) .' group.';\n\n\t\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbla (ticket_id, author, text, action, ip, isstaff)\";\n\t\t$sql .= \"VALUES (?, ?, ?, ?, ?, 1)\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($ticket_id, $_POST['staff_reply_name'], $text, $action, $_SERVER['REMOTE_ADDR'])); \n\t\t\t\trequire_once 'Flux/Mailer.php';\n\t\t\t\t$name = $session->loginAthenaGroup->serverName;\n\t\t\t\t$mail = new Flux_Mailer();\n\t\t\t\t$sent = $mail->send($email, 'Ticket Reply', 'ticketreply', array(\n\t\t\t\t\t'TicketID'\t\t=> $ticket_id,\n\t\t\t\t\t'Staff'\t\t\t=> $staffsess->prefered_name\n\t\t\t\t));\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET lastreply = 'Staff' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id));\n\t\t$this->redirect($this->url('servicedesk','staffindex'));\n\n\t}elseif($_POST['secact']=='7'){\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET status = 'Resolved' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id));\n\t\t$give_credits = intval($_POST['award_credits']);\n\n\t\tif($_POST['response']=='Leave as-is to skip text response.' || $_POST['response'] == '' || $_POST['response'] == NULL || !isset($_POST['response'])){\n\t\t\t$text = '0';\n\t\t} else {\n\t\t\t$text = htmlentities($_POST['response']);\n\t\t}\n\t\t$action = sprintf('Ticket Resolved, %d Credits Awarded.', $give_credits);\n\n\t\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbla (ticket_id, author, text, action, ip, isstaff)\";\n\t\t$sql .= \"VALUES (?, ?, ?, ?, ?, 1)\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$res = $server->loginServer->depositCredits($_POST['account_id'], $give_credits);\n\t\t$sth->execute(array($ticket_id, $_POST['staff_reply_name'], $text, $action, $_SERVER['REMOTE_ADDR']));\n\t\t\t\trequire_once 'Flux/Mailer.php';\n\t\t\t\t$name = $session->loginAthenaGroup->serverName;\n\t\t\t\t$mail = new Flux_Mailer();\n\t\t\t\t$sent = $mail->send($email, 'Ticket Reply', 'ticketreply', array(\n\t\t\t\t\t'TicketID'\t\t=> $ticket_id,\n\t\t\t\t\t'Staff'\t\t\t=> $staffsess->prefered_name\n\t\t\t\t));\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET lastreply = 'Staff' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id));\n\t\t$this->redirect($this->url('servicedesk','staffindex'));\n\t}\n}\n\n$tbl = Flux::config('FluxTables.ServiceDeskTable');\n$tbla = Flux::config('FluxTables.ServiceDeskATable');\n$sql = \"SELECT * FROM {$server->loginDatabase}.$tbl WHERE ticket_id = $ticket_id\";\n$rep = $server->connection->getStatement($sql);\n$rep->execute();\n$ticketlist = $rep->fetchAll();\nif($ticketlist) {\n    foreach($ticketlist as $trow) {\n\t\t$chid=$trow->char_id;\n\t\t$sql = \"SELECT * FROM {$server->charMapDatabase}.char WHERE char_id = $chid\";\n\t\t$ch = $server->connection->getStatement($sql);\n\t\t$ch->execute();\n\t\t$chr = $ch->fetchAll();\n\t\tforeach($chr as $char) {\n\t\t}\n\n\t\t$aid=$trow->account_id;\n\t\t$ah = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.login WHERE account_id = $aid\");\n\t\t$ah->execute();\n\t\t$ar = $ah->fetchAll();\n\t\tforeach($ar as $ticketaccount) {\n\t\t}\n\t}\n\n} else {\n    $this->redirect($this->url('servicedesk','index'));\n}\n$sqlr = \"SELECT * FROM {$server->loginDatabase}.$tbla WHERE ticket_id = $ticket_id\";\n$repr = $server->connection->getStatement($sqlr);\n$repr->execute();\n$replylist = $repr->fetchAll();\n\n$tblc = Flux::config('FluxTables.ServiceDeskCatTable');\n$sth  = $server->connection->getStatement(\"SELECT name FROM {$server->loginDatabase}.$tblc WHERE cat_id = ?\");\n$sth->execute(array($trow->category));\n$ticketlist = $sth->fetchAll();\nif($ticketlist) {\n\tforeach($ticketlist as $crow) {\n\t\t$catname=$crow->name;\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/servicedesk/staffviewclosed.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n\n$tbl = Flux::config('FluxTables.ServiceDeskTable'); \n$tblcat = Flux::config('FluxTables.ServiceDeskCatTable'); \n\n$rep = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tbl WHERE status = 'Closed' ORDER BY ticket_id DESC\");\n$rep->execute();\n$ticketlist = $rep->fetchAll();\n$rowoutput=NULL;\nforeach($ticketlist as $trow){\n$catsql = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tblcat WHERE cat_id = ?\");\n$catsql->execute(array($trow->category));\n$catlist = $catsql->fetch();\n\n$rowoutput.='<tr >\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) .'\" >'. $trow->ticket_id .'</a></td>\n\t\t\t\t<td>'. $trow->account_id .'</td>\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) .'\" >'. $trow->subject .'</a></td>\n\t\t\t\t<td><a href=\"'. $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) .'\" >\n\t\t\t\t\t'. $catlist->name .'</a></td>\n\t\t\t\t<td>\n\t\t\t\t\t<font color=\"'. Flux::config('Font'. $trow->status .'Colour') .'\"><strong>'. $trow->status .'</strong></font>\n\t\t\t\t</td>\n\t\t\t\t<td width=\"50\">';\n\t\t\t\tif($trow->lastreply=='0'){$rowoutput.='<i>None</i>';} else {$rowoutput.= $trow->lastreply;}\n$rowoutput.='</td>\n\t\t\t\t<td>\n\t\t\t\t\t'. Flux::message('SDGroup'. $trow->team) .'\n\t\t\t\t</td>\n\t\t\t\t<td>'. date(Flux::config('DateFormat'),strtotime($trow->timestamp)) .'</td>\n\t\t\t</tr>';\n}\n\n?>\n"
  },
  {
    "path": "modules/servicedesk/view.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n$ticket_id = trim($params->get('ticketid'));\n$updateID = trim($params->get('update'));\n$tbl = Flux::config('FluxTables.ServiceDeskTable'); \n$tbla = Flux::config('FluxTables.ServiceDeskATable'); \n$tblc = Flux::config('FluxTables.ServiceDeskCatTable'); \n\nif(isset($_POST['postreply']) && $_POST['postreply'] == 'gogolol'){\n\tif($_POST['secact']=='2'){\n\t\tif($_POST['response']=='Leave as-is to skip text response.' || $_POST['response'] == '' || $_POST['response'] == NULL || !isset($_POST['response'])){\n\t\t\t$session->setMessageData(Flux::message('SDNoBlankResponse'));\n\t\t\t\n\t\t\t$this->redirect($this->url('servicedesk','view', array('ticketid' => $ticket_id)));\n\t\t} else {\n\t\t\t$text = htmlentities($_POST['response']);\n\t\t}\n\t\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbla (ticket_id, author, text, action, ip, isstaff)\";\n\t\t$sql .= \"VALUES (?, ?, ?, 0, ?, 0)\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($ticket_id, $session->account->userid, $text, $_SERVER['REMOTE_ADDR'])); \n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET lastreply = 'Player' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id)); \n\t\t$this->redirect($this->url('servicedesk','index'));\n\t\n\t}elseif($_POST['secact']=='3'){\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET status = 'Resolved' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id)); \n\t\t\n\t\tif($_POST['response']=='Leave as-is to skip text response.' || $_POST['response'] == '' || $_POST['response'] == NULL || !isset($_POST['response'])){\n\t\t\t$text = '0';\n\t\t} else {\n\t\t\t$text = htmlentities($_POST['response']);\n\t\t}\n\t\t$action='Player marked ticket as Resolved';\n\t\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbla (ticket_id, author, text, action, ip, isstaff)\";\n\t\t$sql .= \"VALUES (?, ?, ?, ?, ?, 0)\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($ticket_id, $session->account->userid, $text, $action, $_SERVER['REMOTE_ADDR'])); \n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET lastreply = 'Player' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id)); \n\t\t$this->redirect($this->url('servicedesk','index'));\n\t\t\n\t}elseif($_POST['secact']=='6'){\n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET status = 'Pending' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id)); \n\t\t\n\t\tif($_POST['response']=='Leave as-is to skip text response.' || $_POST['response'] == '' || $_POST['response'] == NULL || !isset($_POST['response'])){\n\t\t\t$text = '0';\n\t\t} else {\n\t\t\t$text = htmlentities($_POST['response']);\n\t\t}\n\t\t$sql = \"INSERT INTO {$server->loginDatabase}.$tbla (ticket_id, author, text, action, ip, isstaff)\";\n\t\t$sql .= \"VALUES (?, ?, ?, ?, ?, 0)\";\n\t\t$sth = $server->connection->getStatement($sql);\n\t\t$sth->execute(array($ticket_id, $session->account->userid, $text, Flux::message('SDReOpenPlayer'), $_SERVER['REMOTE_ADDR'])); \n\t\t$sth = $server->connection->getStatement(\"UPDATE {$server->loginDatabase}.$tbl SET lastreply = 'Player' WHERE ticket_id = ?\");\n\t\t$sth->execute(array($ticket_id)); \n\t\t$this->redirect($this->url('servicedesk','index'));\n\t}\n}\n$rep = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tbl WHERE ticket_id = ? and account_id = ?\");\n$rep->execute(array($ticket_id, $session->account->account_id));\n$ticketlist = $rep->fetchAll();\nif($ticketlist) {\n    foreach($ticketlist as $trow) {\n\t\t$chid=$trow->char_id;\n\t\t$sql = \"SELECT * FROM {$server->charMapDatabase}.char WHERE char_id = ? and account_id = ?\";\n\t\t$ch = $server->connection->getStatement($sql);\n\t\t$ch->execute(array($chid, $session->account->account_id));\n\t\t$chr = $ch->fetchAll();\n\t\tforeach($chr as $char) {\n\t\t}\n\t}\n} else {\n    $this->redirect($this->url('servicedesk','index'));\n}\n\n$repr = $server->connection->getStatement(\"SELECT * FROM {$server->loginDatabase}.$tbla WHERE ticket_id = ?\");\n$repr->execute(array($ticket_id));\n$replylist = $repr->fetchAll();\n\n$tblc = Flux::config('FluxTables.ServiceDeskCatTable'); \n$sth  = $server->connection->getStatement(\"SELECT name FROM {$server->loginDatabase}.$tblc WHERE cat_id = ?\");\n$sth->execute(array($trow->category));\n$ticketlist = $sth->fetchAll();\nif($ticketlist) {\n\tforeach($ticketlist as $crow) {\n\t\t$catname=$crow->name;\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/unauthorized/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = Flux::message('UnauthorizedTitle');\n\n$metaRefresh = array('seconds' => 2, 'location' => $this->basePath);\n?>\n"
  },
  {
    "path": "modules/vending/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'Vendors';\n\n// Get total count and feed back to the paginator.\n$sth = $server->connection->getStatement(\"SELECT COUNT(id) AS total FROM vendings\");\n$sth->execute();\n$paginator = $this->getPaginator($sth->fetch()->total);\n\n// Set the sortable columns\n$sortable = array(\n    'id' => 'asc', 'map', 'char_name'\n    \n);\n$paginator->setSortableColumns($sortable);\n\n// Create the main request.\n$sql    = \"SELECT `char`.name as char_name, `vendings`.id, `vendings`.sex, `vendings`.map, `vendings`.x, `vendings`.y, `vendings`.title, autotrade \";\n$sql    .= \"FROM vendings \";\n$sql    .= \"LEFT JOIN `char` on vendings.char_id = `char`.char_id \";\n$sql  = $paginator->getSQL($sql);\n$sth  = $server->connection->getStatement($sql);\n$sth->execute();\n\n$vendings = $sth->fetchAll();\n?>\n"
  },
  {
    "path": "modules/vending/viewshop.php",
    "content": "<?php\n\nif (!defined('FLUX_ROOT'))\n    exit;\n\nrequire_once 'Flux/TemporaryTable.php';\n\n\n// Get the current Vendor values.\n$sql = \"SELECT `char`.name as char_name, `vendings`.id, `vendings`.account_id, `vendings`.sex, `vendings`.map, `vendings`.x, `vendings`.y, `vendings`.title, autotrade \";\n$sql .= \"FROM vendings \";\n$sql .= \"LEFT JOIN `char` on vendings.char_id = `char`.char_id where id=?\";\n$sth = $server->connection->getStatement($sql);\n$sth->execute(array($params->get(\"id\")));\n$vending = $sth->fetch();\n\nif ($vending) {\n    $isMine = false;\n    $title = 'Vending Items Of [' . $vending->char_name . ']';\n\n    if ($vending->account_id == $session->account->account_id) {\n        $isMine = true;\n    }\n\n// Create the itemdb temp table to retrieve names.\n    if ($server->isRenewal) {\n        $fromTables = array(\"{$server->charMapDatabase}.item_db_re\", \"{$server->charMapDatabase}.item_db2_re\");\n    } else {\n        $fromTables = array(\"{$server->charMapDatabase}.item_db\", \"{$server->charMapDatabase}.item_db2\");\n    }\n    $itemDB = \"{$server->charMapDatabase}.items\";\n    $tempTable = new Flux_TemporaryTable($server->connection, $itemDB, $fromTables);\n\n// Get the vendor's items.\n// Get the current Vendor values.\n    $sql = \"SELECT `vending_items`.cartinventory_id, `vending_items`.amount, `vending_items`.price, \";\n    $sql .= \"`cart_inventory`.nameid, `cart_inventory`.refine, `cart_inventory`.card0, `cart_inventory`.card1, `cart_inventory`.card2, c.name as char_name, \";\n    $sql .= \"`cart_inventory`.option_id0, `cart_inventory`.option_val0, \";\n    $sql .= \"`cart_inventory`.option_id1, `cart_inventory`.option_val1, \";\n    $sql .= \"`cart_inventory`.option_id2, `cart_inventory`.option_val2, \";\n    $sql .= \"`cart_inventory`.option_id3, `cart_inventory`.option_val3, \";\n    $sql .= \"`cart_inventory`.option_id4, `cart_inventory`.option_val4, \";\n    $sql .= \"items.name_english as item_name, items.slots, items.type \";\n    $sql .= \"FROM vending_items \";\n    $sql .= \"LEFT JOIN `cart_inventory` on `vending_items`.cartinventory_id = `cart_inventory`.id \";\n\n    $sql .= \"LEFT JOIN items on `cart_inventory`.nameid = items.id \";\n    \n    $sql .= \"LEFT JOIN {$server->charMapDatabase}.`char` AS c \";\n\t$sql .= \"ON c.char_id = IF(cart_inventory.card0 IN (254, 255), \";\n\t$sql .= \"IF(cart_inventory.card2 < 0, cart_inventory.card2 + 65536, cart_inventory.card2) \";\n\t$sql .= \"| (cart_inventory.card3 << 16), NULL) \";\n\n    \n    $sql .= \"where vending_id = ? \";\n    $sth = $server->connection->getStatement($sql);\n    $sth->execute(array($vending->id));\n    $vending_items = $sth->fetchAll();\n    $items=$vending_items;\n    \n\n    //Set the cards\n    $cards = array();\n    if ($items) {\n\t\t$cardIDs = array();\n\n\t\tforeach ($items as $item) {\n\t\t\t$item->cardsOver = -$item->slots;\n\t\t\t\n\t\t\tif ($item->card0) {\n\t\t\t\t$cardIDs[] = $item->card0;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card1) {\n\t\t\t\t$cardIDs[] = $item->card1;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card2) {\n\t\t\t\t$cardIDs[] = $item->card2;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\tif ($item->card3) {\n\t\t\t\t$cardIDs[] = $item->card3;\n\t\t\t\t$item->cardsOver++;\n\t\t\t}\n\t\t\t\n\t\t\tif ($item->card0 == 254 || $item->card0 == 255 || $item->card0 == -256 || $item->cardsOver < 0) {\n\t\t\t\t$item->cardsOver = 0;\n\t\t\t}\n\n\t\t\tif($server->isRenewal) {\n\t\t\t\t$temp = array();\n\t\t\t\tif ($item->option_id0)\tarray_push($temp, array($item->option_id0, $item->option_val0));\n\t\t\t\tif ($item->option_id1) \tarray_push($temp, array($item->option_id1, $item->option_val1));\n\t\t\t\tif ($item->option_id2) \tarray_push($temp, array($item->option_id2, $item->option_val2));\n\t\t\t\tif ($item->option_id3) \tarray_push($temp, array($item->option_id3, $item->option_val3));\n\t\t\t\tif ($item->option_id4) \tarray_push($temp, array($item->option_id4, $item->option_val4));\n\t\t\t\t$item->rndopt = $temp;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($cardIDs) {\n\t\t\t$ids = implode(',', array_fill(0, count($cardIDs), '?'));\n\t\t\t$sql = \"SELECT id, name_english FROM {$server->charMapDatabase}.items WHERE id IN ($ids)\";\n\t\t\t$sth = $server->connection->getStatement($sql);\n\n\t\t\t$sth->execute($cardIDs);\n\t\t\t$temp = $sth->fetchAll();\n\t\t\tif ($temp) {\n\t\t\t\tforeach ($temp as $card) {\n\t\t\t\t\t$cards[$card->id] = $card->name_english;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n    \n    $itemAttributes = Flux::config('Attributes')->toArray();\n\t$type_list = Flux::config('ItemTypes')->toArray();\n\n    \n} else {\n    $title = \"No Vendor Found.\";\n}\n\n\n?>\n"
  },
  {
    "path": "modules/webcommands/index.php",
    "content": "<?php \nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n\n\n$tbl = Flux::config('FluxTables.WebCommandsTable'); \n\n$pageTitle = Flux::message('WCTitleLabel');\n\n\nif(isset($_POST['command'])){\n\t$sql = \"INSERT INTO {$server->charMapDatabase}.$tbl (command, issuer, account_id)\";\n\t$sql .= \"VALUES (?, ?, ?)\";\n\t$sth = $server->connection->getStatement($sql);\n\t$sth->execute(array($_POST['command'], $session->account->userid, $session->account->account_id));\n\tif(Flux::config('DiscordUseWebhook')) {\n\t\tif(Flux::config('DiscordSendOnWebCommand')) {\n\t\t\tsendtodiscord(Flux::config('DiscordWebhookURL'), 'Web Command Submitted: '. $_POST['command']);\n\t\t}\n\t}\n\n}\n\n\n// Last ran commands\n\n$sql1 = \"SELECT * FROM {$server->charMapDatabase}.$tbl WHERE `done` = '1' ORDER BY `timestamp` DESC LIMIT 5\";\n$sth1 = $server->connection->getStatement($sql1);\n$sth1->execute();\n$output = '';\n$comms = $sth1->fetchAll();\n\tif($comms){\n\t\tforeach($comms as $command){\n\t\t\t$output.='<tr><td>'.$command->command.'</td><td>'.$command->issuer.'</td><td>'.$command->timestamp.'</td></tr>';\n\t\t}\n\t}\n\n\n\n?>\n"
  },
  {
    "path": "modules/woe/custom.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title = 'WoE Hours';\n\n$col  = \"sday.value AS sday, eday.value AS eday, \";\n$col .= \"stime.value AS stime, etime.value AS etime\";\n\n$dayNames = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');\n$woeTimes = array();\nforeach ($session->loginAthenaGroup->athenaServers as $athenaServer) {\n\t$sql  = \"SELECT $col FROM {$athenaServer->charMapDatabase}.mapreg AS sday \";\n\t$sql .= \"JOIN {$athenaServer->charMapDatabase}.mapreg AS eday ON (eday.varname = '\\$eday' AND eday.index  = sday.index) \";\n\t$sql .= \"JOIN {$athenaServer->charMapDatabase}.mapreg AS stime ON (stime.varname = '\\$woetime' AND stime.index = sday.index) \";\n\t$sql .= \"JOIN {$athenaServer->charMapDatabase}.mapreg AS etime ON (etime.varname = '\\$woetime2' AND etime.index = sday.index) \";\n\t$sql .= \"WHERE sday.varname = '\\$sday' ORDER BY sday.value ASC\";\n\t$sth  = $athenaServer->connection->getStatement($sql);\n\t$sth->execute();\n\t\n\t$times = $sth->fetchAll();\n\t\n\tif ($times) {\n\t\t$woeTimes[$athenaServer->serverName] = array();\n\t\tforeach ($times as $time) {\n\t\t\t$woeTimes[$athenaServer->serverName][] = array(\n\t\t\t\t'startingDay'  => $dayNames[$time->sday],\n\t\t\t\t'startingHour' => sprintf('%02d:00', $time->stime),\n\t\t\t\t'endingDay'    => $dayNames[$time->eday],\n\t\t\t\t'endingHour'   => sprintf('%02d:00', $time->etime)\n\t\t\t);\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "modules/woe/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n\n$title     = Flux::message('WoeTitle');\n$dayNames  = array(\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\");\n$woeTimes  = array();\n\nforeach ($session->loginAthenaGroup->athenaServers as $athenaServer) {\n\t$times = $athenaServer->woeDayTimes;\n\tif ($times) {\n\t\t$woeTimes[$athenaServer->serverName] = array();\n\t\tforeach ($times as $time) {\n\t\t\t$woeTimes[$athenaServer->serverName][] = array(\n\t\t\t\t'startingDay'  => $dayNames[$time['startingDay']],\n\t\t\t\t'startingHour' => $time['startingTime'],\n\t\t\t\t'endingDay'    => $dayNames[$time['endingDay']],\n\t\t\t\t'endingHour'   => $time['endingTime']\n\t\t\t);\n\t\t}\n\t}\n}\n?>\n"
  },
  {
    "path": "robots.txt",
    "content": "User-agent: *\nDisallow: /item/\nDisallow: /monster/\nDisallow: /vending/\n"
  },
  {
    "path": "themes/bootstrap/css/flux/ie.css",
    "content": "input[type=text], input[type=password], textarea {\n\tfont-weight: bold;\n}\n\nselect {\n\tfont-size: 8pt;\n\tborder: 5px solid #000;\n}\n\n#logo {\n\tdisplay: block;\n}\n\n.generic-form-table td input[type=checkbox] {\n\tdisplay: inline-block;\n\tmargin-top: 3px;\n}\n"
  },
  {
    "path": "themes/bootstrap/css/flux/unitip.css",
    "content": "/* unitip css */\n\n#unitip {\n\tposition: absolute;\n\tz-index: 1000;\n\ttop: -1000px;\n\tcolor: #fff;\n\tfont: normal normal 8pt Verdana, Arial, Helvetica, sans-serif;\n\tdisplay: none;\n}\n\n#unitippoint, #unitipmid, #unitipcap {\n\tposition: relative;\n\ttop: 0px; \n\tleft: 0px;\n\twidth: 145px;\n\tdisplay: block;\n}\n\n#unitippoint { \n\tbackground: url(../../img/TipPoint.png) no-repeat; \n\theight: 19px; \n\toverflow: hidden; \n}\n\n#unitipmid { \n\tbackground: url(../../img/TipMid.png) repeat; \n\twidth: 145px;\n\theight: auto; \n\tpadding: 5px 15px;\n}\n\n#unitipcap { \n\tbackground: url(../../img/TipCap.png) no-repeat; \n\theight: 7px; \n\toverflow: hidden; \n}\n"
  },
  {
    "path": "themes/bootstrap/css/flux.css",
    "content": "\t/*********************************************\n\t ** Stylesheet file for default Flux theme. **\n\t *********************************************/\n\n.loginbox-admin-menu {\n\tpadding-top: 5px;\n\tcolor: #94b4d5;\n}\n\nbody {\n\tmargin: 0 0 20px 0;\n\tpadding: 0;\n\tfont-family: \"Lucida Grande\", \"Lucida Sans\", Verdana, Tahoma, sans-serif;\n\tfont-size: 9pt;\n\tcolor: #000;\n\tbackground-color: #fff;\n}\n\ntable {\n\tfont-family: \"Lucida Grande\", \"Lucida Sans\", Verdana, Tahoma, sans-serif;\n\tfont-size: 9pt;\n}\n\ntr, td, th {\n\tvertical-align: top;\n}\n\n.horizontal-table tr, .vertical-table tr, .generic-form-table tr,\n.horizontal-table td, .vertical-table td, .generic-form-table td {\n\tvertical-align: middle;\n}\n\n.horizontal-table th, .vertical-table th, .generic-form-table th {\n\tvertical-align: top;\n}\n\nh2 {\n\tcolor: #444;\n\tletter-spacing: -1px;\n}\n\nh3 {\n\t/*font-style: italic;*/\n\tfont-weight: normal;\n\tfont-size: 120%;\n\tcolor: #444;\n\tborder-bottom: 1px dotted #ddd;\n\ttext-transform: uppercase;\n}\n\nh3:first-letter {\n\tfont-weight: bold;\n}\n\np {\n\tmargin: 4px 0 8px 0;\n\tpadding: 0;\n}\n\na img {\n\tborder: 0;\n}\n\na {\n\tcolor: #4083c6;\n\ttext-decoration: none;\n}\n\ninput[type=text], input[type=password], input[type=file], textarea {\n\tfont-family: \"Lucida Grande\", \"Lucida Sans\", Verdana, Tahoma, sans-serif;\n\tpadding: 4px;\n\tfont-size: 10pt;\n\tcolor: #444;\n\tborder: 1px solid #ddd;\n\toutline-width: 0;\n}\n\nlabel:hover {\n\tcursor: pointer;\n}\n\n/*input[type=text]:hover, input[type=password]:hover, textarea:hover {\n\tcolor: #46a;\n\tbackground-color: #dee;\n\tborder: 1px solid #8ac;\n}*/\n\n.module-name {\n\tfont-weight: bold;\n\tfont-size: 12pt;\n}\n\n.message {\n\tdisplay: block;\n\tpadding: 10px;\n\tfont-weight: bold;\n\tfont-size: 120%;\n\tcolor: #fff;\n\tbackground-color: #333;\n}\n\n.notice {\n\tdisplay: block;\n\tpadding: 10px;\n\tfont-weight: normal;\n\tfont-size: 120%;\n\tcolor: #204a87;\n\tbackground-color: #F0FFFF;\n\tborder: 1px solid #87CEEB;\n}\n\n.center {\n\ttext-align: center;\n}\n\n#admin_sidebar, #sidebar {\n\tmargin-bottom: 10px;\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\n#admin_sidebar img, #sidebar img {\n\tdisplay: block;\n}\n\n#admin_sidebar td, #sidebar td {\n\tpadding: 0;\n}\n\n#admin_sidebar td.menuitem, #admin_sidebar th.menuitem {\n\tdisplay: block;\n\tfont-size: 10pt;\n\tborder-width: 0 13px 0 11px;\n\tborder-style: solid;\n\tborder-color: #8b8b8b;\n}\n\n#admin_sidebar th.menuitem {\n\tbackground-color: #303030;\n}\n\n#admin_sidebar th.menuitem strong {\n\tdisplay: block;\n\tmargin: 0 12px;\n\tpadding: 10px 0 2px 0;\n\tfont-size: 100%;\n\ttext-align: center;\n\tcolor: #fff;\n\tborder-bottom: 1px solid #555;\n}\n\n#admin_sidebar td.menuitem a {\n\tmargin: 0 auto;\n\tdisplay: block;\n\tpadding: 2px 5px 4px 18px;\n\tcolor: #fff;\n\tbackground-color: #303030;\n\ttext-align: left;\n\ttext-shadow: #000 1pt 1pt;\n\ttext-decoration: none;\n}\n\n#admin_sidebar td.menuitem a:hover {\n\tcolor: #fff;\n\tbackground-color: #4a5259;\n\ttext-shadow: #4a5259 1pt 1pt;\n}\n\n#admin_sidebar td.menuitem a span {\n\t/*display: block;*/\n}\n\n#sidebar td.sidebar-left, #sidebar td.sidebar-right {\n\tbackground-color: #e6f0fa;\n}\n\n#sidebar td.menuitem, #sidebar th.menuitem {\n\tdisplay: block;\n\tfont-size: 10pt;\n\tborder-width: 0 13px 0 11px;\n\tborder-style: solid;\n\tborder-color: #c4d9ee;\n}\n\n\n#sidebar th.menuitem {\n\tbackground-color: #94b4d5;\n}\n\n#sidebar th.menuitem strong {\n\tdisplay: block;\n\tmargin: 0 12px;\n\tpadding: 10px 0 2px 0;\n\tfont-size: 100%;\n\ttext-align: center;\n\tcolor: #fff;\n\tborder-bottom: 1px solid #c4d9ee;\n}\n\n#sidebar td.menuitem a {\n\tmargin: 0 auto;\n\tdisplay: block;\n\tpadding: 2px 5px 4px 18px;\n\tcolor: #fff;\n\tbackground-color: #94b4d5;\n\ttext-align: left;\n\ttext-shadow: #708fae 1pt 1pt;\n\ttext-decoration: none;\n}\n\n#sidebar td.menuitem a:hover {\n\tcolor: #fff;\n\tbackground-color: #708fae;\n\ttext-shadow: #708fae 1pt 1pt;\n}\n\n#sidebar td.menuitem a span {\n\tdisplay: block;\n}\n\n.request, .fs-path {\n\tdisplay: inline-block;\n\tpadding: 2px;\n\tfont-family: Monaco, \"Lucida Console\", \"Bitsteam Vera Sans Mono\", monospace;\n\tfont-size: 8pt;\n\tbackground-color: #fff;\n\tborder: 1px solid #eee;\n}\n\n.keyword {\n\tcolor: #ffba00;\n\tfont-style: italic;\n}\n\n.red {\n\tdisplay: block;\n\tpadding: 10px;\n\tfont-weight: bold;\n\tfont-size: 120%;\n\tcolor: #fff;\n\tbackground-color: #f00;\n}\n\n.green {\n\tdisplay: block;\n\tpadding: 10px;\n\tfont-weight: bold;\n\tfont-size: 120%;\n\tcolor: #fff;\n\tbackground-color: #0c0;\n}\n\n.note {\n\tpadding: 5px;\n\tcolor: #444;\n\tbackground-color: #eaeaea;\n\tfont-style: italic;\n}\n\n.up {\n\tfont-weight: bold;\n\tcolor: #0f0;\n\ttext-transform: uppercase;\n}\n\n.down {\n\tcolor: #f00;\n\ttext-transform: uppercase;\n}\n\n.submit_button {\n\tdisplay: block;\n\tmargin: 10px;\n\tpadding: 5px;\n\tbackground-color: #eee;\n\tborder: 1px solid #ccc;\n}\n\n.submit_button:hover {\n\tcolor: #fff;\n\tbackground-color: #333;\n\tborder: 1px solid #111;\n\tcursor: pointer;\n}\n\n.install_table th, .install_table td {\n\tpadding: 5px 10px;\n\tborder: 1px solid #ddd;\n}\n\n.install_table th {\n\tbackground-color: #eef;\n}\n\n.install_table td {\n\twidth: 180px;\n\ttext-align: center;\n}\n\n.created {\n\tcolor: green;\n\twidth: 80px;\n}\n\n.missing {\n\tcolor: red;\n\twidth: 80px;\n}\n\n.pages {\n\tmargin-top: 20px;\n\tpadding-top: 10px;\n\tcolor: #ccc;\n\ttext-align: center;\n\tborder-top: 1px solid #ddd;\n}\n\n.pages .page-prev, .pages .page-next {\n\tcolor: #94b4d5;\n}\n\n.pages .page-num {\n\tpadding: 0 5px;\n}\n\n.pages .current-page {\n\tcolor: #000000;\n\tfont-weight: bold;\n}\n\n.horizontal-table {\n\tborder-spacing: 0;\n\tborder-collapse: collapse;\n\twidth: 100%;\n}\n\n.horizontal-table th {\n\tpadding: 5px 10px;\n\tbackground-color: #eee;\n}\n\n.horizontal-table td {\n\tpadding: 5px 10px;\n\tbackground-color: #fff;\n}\n\n.horizontal-table th, .horizontal-table td {\n\tfont-size: 9pt;\n\tborder: 1px solid #ddd;\n}\n\n.vertical-table {\n\tborder-spacing: 0;\n\tborder-collapse: collapse;\t\n}\n\n.vertical-table th {\n\tpadding: 5px 10px;\n\tbackground-color: #eee;\n}\n\n.vertical-table td {\n\tpadding: 5px 12px;\n\tbackground-color: #fff;\n}\n\n.vertical-table th, .vertical-table td {\n\tfont-size: 9pt;\n\tborder: 1px solid #ddd;\n}\n\n.vertical-table label {\n\tdisplay: block;\n\tpadding: 5px;\n}\n\n.current-sub-menu {\n\tfont-weight: bold;\n}\n\n.td-checkbox {\n\ttext-align: center;\n}\n\n.td-action {\n\tcolor: #ccc;\n\ttext-align: center;\n}\n\n.vertical-table .td-action {\n\ttext-align: right;\n}\n\n.vertical-table form {\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.not-applicable {\n\tfont-style: italic;\n\tcolor: #bbb;\n}\n\n.state-pending {\n\tcolor: orange;\n}\n\n.state-banned {\n\tcolor: red;\n}\n\n.state-permanently-banned {\n\tfont-weight: bold;\n\tcolor: red;\n}\n\n.raw-txn-log {\n\tpadding: 10px;\n\tfont-family: \"Monaco\", \"Lucida Console\", \"Courier New\", monospace;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n\twidth: 96%;\n\toverflow: scroll;\n}\n\n.online {\n\tcolor: #000;\n}\n\n.offline {\n\tcolor: #aaa;\n}\n\n.info-text-total {\n\tfont-weight: bold;\n}\n\n.info-text-results {\n\tfont-weight: bold;\n}\n\n.info-text {\n\tmargin-bottom: 6px;\n\tpadding: 5px;\n\tcolor: #666;\n\tbackground-color: #fff;\n\tborder: 1px solid #ccc;\n\ttext-align: center;\n}\n\n.toggler {\n\tfont-weight: bold;\n\tfont-style: italic;\n}\n\n.toggler a {\n\tcolor: #26a;\n}\n\n.search-form, search-form2 {\n\tdisplay: none;\n\tmargin: 0 0 10px 0;\n\tpadding: 0;\n\tborder-top: 1px solid #ddd;\n}\n\n.search-form p, .search-form2 p {\n\tmargin: 0;\n\tpadding: 5px;\n\tcolor: #aaa;\n\ttext-align: left;\n\tborder-bottom: 1px solid #ddd;\n}\n\n.search-form label, .search-form2 label {\n\tdisplay: inline-block;\n\tmargin: 0 0 3px 0;\n\tfont-size: 8pt;\n\tfont-style: italic;\n\tcolor: #222;\n}\n\n.search-form input[type=text], .search-form2 input[type=text] {\n\tdisplay: inline-block;\n\tmargin: 0 0 2px 0;\n\tpadding: 2px;\n\tfont-size: 8pt;\n\twidth: 80px;\n}\n\n.search-form input[type=submit], .search-form2 input[type=submit] {\n\tdisplay: inline-block;\n\tmargin: 0 0 2px 0;\n\tfont-size: 8pt;\n\tfont-weight: bold;\n}\n\n.search-form input[type=button], .search-form input[type=reset],\n.search-form2 input[type=button], .search-form2 input[type=reset] {\n\tdisplay: inline-block;\n\tmargin: 0 0 2px 0;\n\tfont-size: 8pt;\n}\n\n.search-form input[type=checkbox], .search-form2 input[type=checkbox] {\n\tdisplay: inline-block;\n\tmargin: 0 0 2px 0;\n}\n\n.search-form select, .search-form2 select {\n\tdisplay: inline-block;\n\tmargin: 2px 0;\n}\n\n#submenu {\n\tcolor: #bbb;\n}\n\n#pagemenu {\n\tmargin-top: 5px;\n\tpadding: 5px 0;\n\tfont-size: 8pt;\n\tcolor: #888;\n\tborder-width: 1px 0;\n\tborder-style: dotted;\n\tborder-color: #ddd;\n}\n\n#pagemenu a {\n\tcolor: #777974;\n\ttext-decoration: underline;\n}\n\n#pagemenu a:hover {\n\tcolor: #729fcf;\n}\n\n#loginbox {\n\tmargin-bottom: 10px;\n\tcolor: #555;\n}\n\n#content {\n\tcolor: #555;\n}\n\n#register_form table td, #login_form table td {\n\tpadding: 1px;\n}\n\n#register_form table th label, #login_form table th label {\n\tdisplay: block;\n\tpadding: 5px;\n\ttext-align: center;\n}\n\n#register_form input[type=text], #register_form input[type=password], #login_form input[type=text], #login_form input[type=password] {\n\twidth: 140px;\n}\n\n#register_form select, #login_form select {\n\twidth: 147px;\n}\n\n#server_status th, #server_status td {\n\tpadding: 8px 12px 8px 12px;\n\ttext-align: left;\n\tborder-bottom: 1px solid #ddd;\t\n}\n\n#server_status {\n\tborder-spacing: 0;\n\tborder-collapse: collapse;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n}\n\n#server_status .server {\n\tcolor: #222;\n}\n\n#server_status .status {\n\ttext-align: center;\n}\n\n#copyright p {\n\tmargin-top: 5px;\n\tmargin-bottom: 0px;\n\tfont-style: italic;\n\tfont-size: 8pt;\n\tcolor: #ccc;\n\ttext-align: right;\n}\n\n#info p {\n\tmargin-top: 5px;\n\tmargin-bottom: 0px;\n\tfont-style: italic;\n\tfont-size: 8pt;\n\tcolor: #aaa;\n\ttext-align: right;\n}\n\n.sortable {\n\tcolor: #444;\n\ttext-decoration: underline;\n}\n\n.sortable:hover {\n\tcolor: #000;\n}\n\n.character-stats {\n\tborder-spacing: 0;\n\tborder-collapse: collapse;\n\tcolor: #ccc;\n}\n\n.character-stats td {\n\tpadding: 0px 10px 5px 0;\n\tborder: 0;\n\ttext-align: center;\n}\n\n.character-stats .stat-name {\n\tcolor: #666;\n}\n\n.character-stats .stat-value {\n\tcolor: #000;\n}\n\n.credit-balance {\n\tfloat: right;\n\tdisplay: inline-block;\n\tpadding: 10px;\n\tcolor: #000;\n\tbackground-color: #eee;\n\tborder: 1px dotted #ddd;\n}\n\n.credit-balance .balance-text {\n\tdisplay: inline-block;\n\tmargin-right: 5px;\n\tcolor: #bbb;\n\ttext-transform: uppercase;\n}\n\n.credit-balance .balance-amount {\n\tfont-weight: bold;\n}\n\n.emblem-server {\n\tmargin: 0 0 2px 0;\n\tpadding: 0 0 2px 0;\n\tfont-size: 120%;\n\tborder-bottom: 1px solid #ddd;\n}\n\n.emblem-server label {\n\tdisplay: block;\n}\n\n.emblem-server label:hover {\n\tcursor: pointer;\n}\n\n.block {\n\tdisplay: block;\n\twidth: 80%;\n\theight: 40px;\n}\n\n.script-line {\n\tfont-family: Monaco, \"Lucida Console\", monospace;\n}\n\n.script-line-num {\n\tdisplay: inline-block;\n\tmargin: 0;\n\tpadding: 5px;\n\tbackground-color: #eee;\n\tborder-right: 1px solid #ddd;\n}\n\n.script-line-code {\n\tdisplay: inline-block;\n\tmargin: 0;\n\tpadding: 5px;\n}\n\n.shop-table {\n\twidth: 100%;\n\tcolor: #000;\n\tborder-spacing: 0 10px;\n\tborder-collapse: separate;\n}\n\n.shop-table td {\n\tpadding: 10px;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n}\n\n.shop-item-image {\n\twidth: 75px;\n\theight: 100px;\n\ttext-align: center;\n}\n\n.shop-item-name {\n\tmargin: 0 0 5px 0;\n\tpadding: 0 0 2px 0;\n\tfont-size: 140%;\n\tcolor: #222;\n\tborder-bottom: 1px solid #eee;\n}\n\n.shop-item-cost-qty {\n\twidth: 150px;\n\tcolor: #aaa;\n\ttext-align: center;\n}\n\n.cost {\n\tcolor: #000;\n\tfont-size: 120%;\n\tfont-weight: bold;\n\ttext-transform: uppercase;\n}\n\n.qty {\n\tcolor: #000;\n}\n\n.shop-item-action {\n\tcolor: #ddd;\n}\n\n.shop-item-action a {\n\tcolor: #80a2c8;\n\tborder-bottom: 1px solid #eee;\n}\n\n.shop-item-action a:hover {\n\tborder-bottom: 1px solid #80a2c8;\n}\n\n.short {\n\twidth: 40px;\n}\n\n.shop-server-name {\n\tcolor: #333;\n}\n\n.shop-item-info {\n\ttext-align: justify;\n}\n\ntextarea {\n\twidth: 320px;\n\theight: 120px;\n}\n\n.cart-items-text {\n\tmargin: 0 0 5px 0;\n\tpadding: 5px;\n\tcolor: #ddd;\n\tbackground-color: #888;\n\tborder: 5px solid #777;\n}\n\n.cart-info-text {\n\tmargin: 0 0 5px 0;\n\tpadding: 0;\n}\n\n.cart-total-text {\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cart-item-name {\n\tcolor: #fff;\n\tborder-bottom: 1px dotted #aaa;\n}\n\n.cart-item-count {\n\tfont-size: 120%;\n\tfont-weight: bold;\n\tcolor: #000;\n}\n\n.cart-sub-total {\n\tcolor: #000;\n}\n\n.cart {\n\twidth: 100%;\n}\n\n.cart label {\n\tdisplay: block;\n}\n\n.cart h4 {\n\tmargin: 10px 0 2px 0;\n\tfont-size: 140%;\n}\n\n.remove-from-cart {\n\twidth: 100%;\n\ttext-align: right;\n}\n\n.checkout-text {\n\tfont-size: 120%;\n\tfont-weight: bold;\n}\n\n.checkout-text a {\n\tborder-bottom: 1px dotted #ccc;\n}\n\n.checkout-text a:hover {\n\tcolor: #000;\n\tborder-bottom: 1px solid #aaa;\n}\n\n.enter-donation-amount {\n\tmargin: 0;\n\tpadding: 0 0 5px 0;\n\tfont-size: 120%;\n}\n\n.donation-amount-text {\n\tmargin: 0;\n\tpadding: 0;\n\tfont-size: 120%;\n\ttext-align: center;\n}\n\n.credit-amount-text {\n\tfont-size: 8pt;\n\ttext-transform: uppercase;\n\tcolor: #bbb;\n\ttext-align: center;\n\tletter-spacing: 1px;\n}\n\n.donation-amount {\n\tfont-weight: bold;\n\tcolor: #000;\n}\n\n.credit-amount {\n\tcolor: #555;\n}\n\n.reset-amount-text {\n\tmargin: 0;\n\tpadding: 0;\n\tfont-size: 8pt;\n\ttext-align: center;\n}\n\n.checkout-info-text {\n\tmargin: 0 0 5px 0;\n\tpadding: 0;\n}\n\n.remaining-balance {\n\tcolor: #000;\n}\n\n.exchange-rate {\n\tfont-size: 120%;\n\tfont-weight: bold;\n\tcolor: #000;\n}\n\n.important {\n\tfont-size: 120%;\n\tcolor: #000;\n}\n\n.important .server-name {\n\tfont-weight: bold;\n}\n\n.generic-form {\n\tpadding: 10px;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n\twidth: auto;\n}\n\n.generic-form-div {\n\tpadding: 10px;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n\twidth: auto;\n}\n.generic-form-table th label {\n\tdisplay: block;\n\tpadding: 6px;\n}\n\n.generic-form-table td div {\n\tdisplay: block;\n\tpadding: 6px 0;\n}\n\n.generic-form-table th {\n\ttext-align: right;\n}\n\n.generic-form-table td input[type=checkbox] {\n\tdisplay: inline-block;\n\tmargin-top: 6px;\n}\n\n.generic-form-table td p {\n\tmargin: 6px 5px;\n\tcolor: #000;\n}\n\n.security-code {\n\tmargin: 5px 0;\n\ttext-align: left;\n\twidth: 145px;\n\theight: 50px;\n}\n\n.action {\n\tcolor: #ddd;\n}\n\n.action a, .action span.anchor {\n\tcolor: #80a2c8;\n\tborder-bottom: 1px solid #eee;\n\tcursor: pointer;\n}\n\n.block-link {\n\tdisplay: block;\n\tpadding: 3px;\n\tcolor: #80a2c8;\n\tborder-bottom: 1px solid #eee;\n}\n\n.button-action {\n\tpadding: 5px 0;\n\ttext-align: left;\n}\n\n.woe-table {\n\tborder-spacing: 0;\n\tborder-collapse: collapse;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n}\n\n.woe-table th, .woe-table td {\n\tpadding: 5px 10px;\n}\n\n.woe-table th {\n\tfont-weight: normal;\n\tborder-bottom: 1px solid #ddd;\n}\n\n.woe-table td {\n\tfont-size: 120%;\n}\n\n.woe-table .server {\n\tfont-weight: bold;\n}\n\n.woe-table .time {\n\tfont-style: italic;\n\tcolor: #333;\n}\n\n.script {\n\twidth: 98%;\n}\n\n.multi-select {\n\twidth: 100%;\n}\n\n.jump-to-page {\n\tmargin-top: 8px;\n\tfont-size: 8pt;\n\ttext-align: center;\n}\n\n.jump-to-page input {\n\tpadding: 2px;\n\tfont-size: 8pt;\n}\n\n.top-ranked td {\n\tfont-weight: bold;\n\tcolor: #000;\n\tbackground-color: #FFF8DC;\n}\n\n.top-ranked a {\n\tcolor: #000;\n\tborder-bottom: 1px dotted #666;\n}\n\n.empty-row {\n\tvisibility: hidden;\n}\n\n.item-drop-mvp td {\n\tcolor: #000;\n\tbackground-color: #F8F8FF;\n}\n\n.item-drop-card td {\n\tcolor: #000;\n\tbackground-color: #F0FFFF;\n}\n\n.mvp {\n\tfont-size: xx-small;\n\tfont-weight: bold;\n\tcolor: #ff0000;\n\tvertical-align: top;\n}\n\n.monster-mode {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: square inside;\n}\n\n.monster-mode li {\n\tpadding: 1px;\n\tborder-bottom: 1px dotted #eee;\n}\n\n.equipped td {\n\tbackground-color: #f1ffff;\n}\n\n.job-classes {\n\tborder-spacing: 0;\n}\n\n.job-classes td {\n\tpadding-right: 10px;\n\tborder-right: 1px solid #eee;\n}\n\n.current-shop-category {\n\tfont-weight: bold;\n}\n\n.normalslotted .equipped {\n\tcolor: #25292b;\n}\n\n.overslotted1 {\n\tcolor: #32cd32;\n}\n\n.overslotted2 {\n\tcolor: #00bfff;\n}\n\n.overslotted3 {\n\tcolor: #ffa500;\n}\n\n.overslotted4 {\n\tcolor: #9932cc;\n}\n\n.hold-hours {\n\tcolor: #ffba00;\n\tfont-style: italic;\n}\n"
  },
  {
    "path": "themes/bootstrap/css/sticky-footer-navbar.css",
    "content": "/* Sticky footer styles\n-------------------------------------------------- */\nhtml {\n  position: relative;\n  min-height: 100%;\n}\nbody {\n  /* Margin bottom by footer height */\n  margin-bottom: 60px;\n}\n#footer {\n  position: absolute;\n  bottom: 0;\n  width: 100%;\n  /* Set the fixed height of the footer here */\n  height: 60px;\n  background-color: #f5f5f5;\n}\n\n\n/* Custom page CSS\n-------------------------------------------------- */\n/* Not required for template or sticky footer method. */\n\nbody > .container {\n  padding: 60px 15px 0;\n}\n.container .text-muted {\n  margin: 20px 0;\n}\n\n#footer > .container {\n  padding-right: 15px;\n  padding-left: 15px;\n}\n\ncode {\n  font-size: 80%;\n}\n"
  },
  {
    "path": "themes/bootstrap/footer.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n\n\t</div>\n\t<div id=\"footer\">\n\t\t<div class=\"container\">\n\t\t\t<p class=\"text-muted\">\n\t\t\t\t<?php if (Flux::config('ShowCopyright')): ?>\n\t\t\t\tPowered by <a href=\"https://github.com/rathena/FluxCP\" target=\"_blank\">FluxCP</a>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if (Flux::config('ShowRenderDetails')): ?>\n\n\t\t\t\t\tPage generated in <strong><?php echo round(microtime(true) - __START__, 5) ?></strong> second(s).\n\t\t\t\t\tNumber of queries executed: <strong><?php echo (int)Flux::$numberOfQueries ?></strong>.\n\t\t\t\t\t<?php if (Flux::config('GzipCompressOutput')): ?>Gzip Compression: <strong>Enabled</strong>.<?php endif ?>\n\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if (count(Flux::$appConfig->get('ThemeName', false)) > 1): ?>\n\t\t\t\t\t<span>Theme:\n\t\t\t\t\t\t<select name=\"preferred_theme\" onchange=\"updatePreferredTheme(this)\">\n\t\t\t\t\t\t<?php foreach (Flux::$appConfig->get('ThemeName', false) as $themeName): ?>\n\t\t\t\t\t\t\t<option value=\"<?php echo htmlspecialchars($themeName) ?>\"<?php if ($session->theme == $themeName) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars($themeName) ?></option>\n\t\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</span>\n\t\t\t\t<?php endif ?>\n\n\t\t\t\t<span>Language:\n\t\t\t\t\t<select name=\"preferred_language\" onchange=\"updatePreferredLanguage(this)\">\n\t\t\t\t\t<?php foreach (Flux::getAvailableLanguages() as $lang_key => $lang): ?>\n\t\t\t\t\t\t<option value=\"<?php echo htmlspecialchars($lang_key) ?>\"<?php if (!empty($_COOKIE['language']) && $_COOKIE['language'] == $lang_key) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars($lang) ?></option>\n\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t\t</select>\n\t\t\t\t</span>\n\t\t\t</p>\n\t\t\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" name=\"preferred_theme_form\" style=\"display: none\">\n\t\t\t\t<input type=\"hidden\" name=\"preferred_theme\" value=\"\" />\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\n\n\t\t<!--[if lt IE 9]>\n\t\t<script src=\"<?php echo $this->themePath('js/ie9.js') ?>\" type=\"text/javascript\"></script>\n\t\t<![endif]-->\n\n\t\t<script type=\"text/javascript\">\n\t\t\tfunction updatePreferredServer(sel){\n\t\t\t\tvar preferred = sel.options[sel.selectedIndex].value;\n\t\t\t\tdocument.preferred_server_form.preferred_server.value = preferred;\n\t\t\t\tdocument.preferred_server_form.submit();\n\t\t\t}\n\n\t\t\tfunction updatePreferredTheme(sel){\n\t\t\t\tvar preferred = sel.options[sel.selectedIndex].value;\n\t\t\t\tdocument.preferred_theme_form.preferred_theme.value = preferred;\n\t\t\t\tdocument.preferred_theme_form.submit();\n\t\t\t}\n\n\t\t\tfunction updatePreferredLanguage(sel){\n\t\t\t\tvar preferred = sel.options[sel.selectedIndex].value;\n\t\t\t\tsetCookie('language', preferred);\n\t\t\t\treload();\n\t\t\t}\n\n\t\t\t// Preload spinner image.\n\t\t\tvar spinner = new Image();\n\t\t\tspinner.src = '<?php echo $this->themePath('img/spinner.gif') ?>';\n\n\t\t\tfunction refreshSecurityCode(imgSelector){\n\t\t\t\t$(imgSelector).attr('src', spinner.src);\n\n\t\t\t\t// Load image, spinner will be active until loading is complete.\n\t\t\t\tvar clean = <?php echo Flux::config('UseCleanUrls') ? 'true' : 'false' ?>;\n\t\t\t\tvar image = new Image();\n\t\t\t\timage.src = \"<?php echo $this->url('captcha') ?>\"+(clean ? '?nocache=' : '&nocache=')+Math.random();\n\n\t\t\t\t$(imgSelector).attr('src', image.src);\n\t\t\t}\n\t\t\tfunction toggleSearchForm(){\n\t\t\t\t//$('.search-form').toggle();\n\t\t\t\t$('.search-form').slideToggle('fast');\n\t\t\t}\n\n\t\t\tfunction setCookie(key, value){\n\t\t\t\tvar expires = new Date();\n\t\t\t\texpires.setTime(expires.getTime() + expires.getTime()); // never expires\n\t\t\t\tdocument.cookie = key + '=' + value + ';expires=' + expires.toUTCString();\n\t\t\t}\n\t\t</script>\n\n\t\t<?php if (Flux::config('EnableReCaptcha') && Flux::config('ReCaptchaTheme')): ?>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tvar RecaptchaOptions = {\n\t\t\t\t\ttheme : '<?php echo Flux::config('ReCaptchaTheme') ?>'\n\t\t\t\t};\n\t\t\t</script>\n\t\t<?php endif ?>\n\n\t\t<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>\n\t\t<script type=\"text/javascript\">\n\t\t\t$(document).ready(function(){\n\t\t\t\tvar inputs = 'input[type=text],input[type=password],input[type=file]';\n\t\t\t\t$(inputs).focus(function(){\n\t\t\t\t\t$(this).css({\n\t\t\t\t\t\t'background-color': '#f9f5e7',\n\t\t\t\t\t\t'border-color': '#dcd7c7',\n\t\t\t\t\t\t'color': '#726c58'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t$(inputs).blur(function(){\n\t\t\t\t\t$(this).css({\n\t\t\t\t\t\t'backgroundColor': '#ffffff',\n\t\t\t\t\t\t'borderColor': '#dddddd',\n\t\t\t\t\t\t'color': '#444444'\n\t\t\t\t\t}, 500);\n\t\t\t\t});\n\t\t\t\t$('.menuitem a').hover(\n\t\t\t\t\tfunction(){\n\t\t\t\t\t\t$(this).fadeTo(200, 0.85);\n\t\t\t\t\t\t$(this).css('cursor', 'pointer');\n\t\t\t\t\t},\n\t\t\t\t\tfunction(){\n\t\t\t\t\t\t$(this).fadeTo(150, 1.00);\n\t\t\t\t\t\t$(this).css('cursor', 'normal');\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t$('.money-input').keyup(function() {\n\t\t\t\t\tvar creditValue = parseInt($(this).val() / <?php echo Flux::config('CreditExchangeRate') ?>, 10);\n\t\t\t\t\tif (isNaN(creditValue))\n\t\t\t\t\t\t$('.credit-input').val('?');\n\t\t\t\t\telse\n\t\t\t\t\t\t$('.credit-input').val(creditValue);\n\t\t\t\t}).keyup();\n\t\t\t\t$('.credit-input').keyup(function() {\n\t\t\t\t\tvar moneyValue = parseFloat($(this).val() * <?php echo Flux::config('CreditExchangeRate') ?>);\n\t\t\t\t\tif (isNaN(moneyValue))\n\t\t\t\t\t\t$('.money-input').val('?');\n\t\t\t\t\telse\n\t\t\t\t\t\t$('.money-input').val(moneyValue.toFixed(2));\n\t\t\t\t}).keyup();\n\t\t\t});\n\n\t\t\tfunction reload(){ window.location.href = '<?php echo $this->url ?>'; }\n\t\t</script>\n\n\t\t<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\" integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa\" crossorigin=\"anonymous\"></script>\n\t</body>\n</html>\n"
  },
  {
    "path": "themes/bootstrap/header.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t<meta name=\"description\" content=\"\">\n\t\t<meta name=\"author\" content=\"\">\n\n\t\t<?php if (isset($metaRefresh)): ?>\n\t\t<meta http-equiv=\"refresh\" content=\"<?php echo $metaRefresh['seconds'] ?>; URL=<?php echo $metaRefresh['location'] ?>\" />\n\t\t<?php endif ?>\n\t\t<title><?php echo Flux::config('SiteTitle'); if (isset($title)) echo \": $title\" ?></title>\n        <link rel=\"icon\" type=\"image/x-icon\" href=\"./favicon.ico\" />\n\t\t<link rel=\"stylesheet\" href=\"<?php echo $this->themePath('css/flux.css') ?>\" type=\"text/css\" media=\"screen\" title=\"\" charset=\"utf-8\" />\n\t\t<link href=\"<?php echo $this->themePath('css/flux/unitip.css') ?>\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" title=\"\" charset=\"utf-8\" />\n\t\t<?php if (Flux::config('EnableReCaptcha')): ?>\n\t\t\t<script src='https://www.google.com/recaptcha/api.js'></script>\n\t\t<?php endif ?>\n\t\t<!--[if IE]>\n\t\t<link rel=\"stylesheet\" href=\"<?php echo $this->themePath('css/flux/ie.css') ?>\" type=\"text/css\" media=\"screen\" title=\"\" charset=\"utf-8\" />\n\t\t<![endif]-->\n\t\t<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\">\n\t\t<link href=\"<?php echo $this->themePath('css/sticky-footer-navbar.css') ?>\" rel=\"stylesheet\">\n\n\t\t<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->\n\t\t<!--[if lt IE 9]>\n\t\t\t<script src=\"https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js\"></script>\n\t\t\t<script src=\"https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js\"></script>\n\t\t<![endif]-->\n\t</head>\n\t<body>\n\n    <!-- Fixed navbar -->\n\t<?php include $this->themePath('main/navbar.php', true) ?>\n\n    <div class=\"container\">\n\t\t<?php //include 'main/sidebar.php' ?>\n\t\t<?php //include 'main/loginbox.php' ?>\n\t\t<?php if (Flux::config('DebugMode') && @gethostbyname(Flux::config('ServerAddress')) == '127.0.0.1'): ?>\n\t\t\t<p class=\"notice\">Please change your <strong>ServerAddress</strong> directive in your application config to your server's real address (e.g., myserver.com).</p>\n\t\t<?php endif ?>\n\n\t\t<!-- Messages -->\n\t\t<?php if ($message=$session->getMessage()): ?>\n\t\t\t<p class=\"message\"><?php echo htmlspecialchars($message) ?></p>\n\t\t<?php endif ?>\n\n\t\t<!-- Sub menu -->\n\t\t<?php include $this->themePath('main/submenu.php', true) ?>\n\n\t\t<!-- Page menu -->\n\t\t<?php include $this->themePath('main/pagemenu.php', true) ?>\n\n\t\t<!-- Credit balance -->\n\t\t<?php //if (in_array($params->get('module'), array('donate', 'purchase'))) include 'main/balance.php' ?>\n"
  },
  {
    "path": "themes/bootstrap/js/ie9.js",
    "content": "/*\n  IE7/IE8/IE9.js - copyright 2004-2010, Dean Edwards\n  http://code.google.com/p/ie7-js/\n  http://www.opensource.org/licenses/mit-license.php\n*/\n;(function(N,p){var h=N.IE7={version:\"2.1(beta4)\",toString:bT(\"[IE7]\")};h.compat=9;var t=h.appVersion=navigator.appVersion.match(/MSIE (\\d\\.\\d)/)[1]-0;if(/ie7_off/.test(top.location.search)||t<5.5||t>=h.compat)return;var E=t<6,bj=bT(),bx=p.documentElement,B,x,cy=\"!\",U=\":link{ie7-link:link}:visited{ie7-link:visited}\",cz=/^[\\w\\.]+[^:]*$/;function bk(c,a){if(cz.test(c))c=(a||\"\")+c;return c};function by(c,a){c=bk(c,a);return c.slice(0,c.lastIndexOf(\"/\")+1)};var bU=p.scripts[p.scripts.length-1],cA=by(bU.src);try{var V=new ActiveXObject(\"Microsoft.XMLHTTP\")}catch(ex){}var bl={};function cB(c,a){try{c=bk(c,a);if(!bl[c]){V.open(\"GET\",c,false);V.send();if(V.status==0||V.status==200){bl[c]=V.responseText}}}catch(ex){}return bl[c]||\"\"};var dA=Array.prototype.slice,dB=/%([1-9])/g,cC=/^\\s\\s*/,cD=/\\s\\s*$/,cE=/([\\/()[\\]{}|*+-.,^$?\\\\])/g,bV=/\\bbase\\b/,bW=[\"constructor\",\"toString\"],bm;function F(){};F.extend=function(g,f){bm=true;var d=new this;O(d,g);bm=false;var c=d.constructor;function a(){if(!bm)c.apply(this,arguments)};d.constructor=a;a.extend=arguments.callee;O(a,f);a.prototype=d;return a};F.prototype.extend=function(a){return O(this,a)};var P=\"#\",Q=\"#\",bc=\".\",bn=\"/\",dC=/\\\\(\\d+)/g,cF=/\\[(\\\\.|[^\\]\\\\])+\\]|\\\\.|\\(\\?/g,cG=/\\(/g,cH=/\\$(\\d+)/,cI=/^\\$\\d+$/,cJ=/(\\[(\\\\.|[^\\]\\\\])+\\]|\\\\.|\\(\\?)|\\(/g,cK=/^<#\\w+>$/,cL=/<#(\\w+)>/g,G=F.extend({constructor:function(a){this[bc]=[];this[Q]={};this.merge(a)},add:function(c,a){delete this[bn];if(c instanceof RegExp){c=c.source}if(!this[P+c])this[bc].push(String(c));return this[Q][P+c]=new G.Item(c,a,this)},compile:function(a){if(a||!this[bn]){this[bn]=new RegExp(this,this.ignoreCase?\"gi\":\"g\")}return this[bn]},merge:function(c){for(var a in c)this.add(a,c[a])},exec:function(o){var k=this,l=k[bc],m=k[Q],j,i=this.compile(true).exec(o);if(i){var g=0,f=1;while((j=m[P+l[g++]])){var d=f+j.length+1;if(i[f]){if(j.replacement===0){return k.exec(o)}else{var c=i.slice(f,d),a=c.length;while(--a)c[a]=c[a]||\"\";c[0]={match:c[0],item:j};return c}}f=d}}return null},parse:function(o){o+=\"\";var k=this,l=k[bc],m=k[Q];return o.replace(this.compile(),function(j){var i=[],g,f=1,d=arguments.length;while(--d)i[d]=arguments[d]||\"\";while((g=m[P+l[d++]])){var c=f+g.length+1;if(i[f]){var a=g.replacement;switch(typeof a){case\"function\":return a.apply(k,i.slice(f,c));case\"number\":return i[f+a];default:return a}}f=c}return j})},toString:function(){var g=[],f=this[bc],d=this[Q],c;for(var a=0;c=d[P+f[a]];a++){g[a]=c.source}return\"(\"+g.join(\")|(\")+\")\"}},{IGNORE:null,Item:F.extend({constructor:function(k,l,m){var j=k.indexOf(\"(\")===-1?0:G.count(k),i=m.dictionary;if(i&&k.indexOf(\"<#\")!==-1){if(cK.test(k)){var g=i[Q][P+k.slice(2,-1)];k=g.replacement;j=g._5}else{k=i.parse(k)}}if(typeof l==\"number\")l=String(l);else if(l==null)l=0;if(typeof l==\"string\"&&cH.test(l)){if(cI.test(l)){var f=l.slice(1)-0;if(f&&f<=j)l=f}else{var d=l,c;l=function(a){if(!c){c=new RegExp(k,\"g\"+(this.ignoreCase?\"i\":\"\"))}return a.replace(c,d)}}}this.length=j;this.source=String(k);this.replacement=l}}),count:function(a){return(String(a).replace(cF,\"\").match(cG)||\"\").length}}),cM=G.extend({parse:function(f){var d=this[Q];return f.replace(cL,function(c,a){a=d[P+a];return a?a._6:c})},add:function(g,f){if(f instanceof RegExp){f=f.source}var d=f.replace(cJ,cN);if(f.indexOf(\"(\")!==-1){var c=G.count(f)}if(f.indexOf(\"<#\")!==-1){f=this.parse(f);d=this.parse(d)}var a=this.base(g,f);a._6=d;a._5=c||a.length;return a},toString:function(){return\"(<#\"+this[PATTERNS].join(\">)|(<#\")+\">)\"}});function cN(c,a){return a||\"(?:\"};function O(i,g){if(i&&g){var f=(typeof g==\"function\"?Function:Object).prototype;var d=bW.length,c;if(bm)while(c=bW[--d]){var a=g[c];if(a!=f[c]){if(bV.test(a)){bX(i,c,a)}else{i[c]=a}}}for(c in g)if(typeof f[c]==\"undefined\"){var a=g[c];if(i[c]&&typeof a==\"function\"&&bV.test(a)){bX(i,c,a)}else{i[c]=a}}}return i};function bX(i,g,f){var d=i[g];i[g]=function(){var c=this.base;this.base=d;var a=f.apply(this,arguments);this.base=c;return a}};function cO(f,d){if(!d)d=f;var c={};for(var a in f)c[a]=d[a];return c};function H(g){var f=arguments,d=new RegExp(\"%([1-\"+arguments.length+\"])\",\"g\");return String(g).replace(d,function(c,a){return a<f.length?f[a]:c})};function bo(c,a){return String(c).match(a)||[]};function bY(a){return String(a).replace(cE,\"\\\\$1\")};function bZ(a){return String(a).replace(cC,\"\").replace(cD,\"\")};function bT(a){return function(){return a}};var ca=G.extend({ignoreCase:true}),cP=/'/g,cb=/'(\\d+)'/g,dD=/\\\\/g,bz=/\\\\([nrtf'\"])/g,W=[],cc=new ca({\"<!\\\\-\\\\-|\\\\-\\\\->\":\"\",\"\\\\/\\\\*[^*]*\\\\*+([^\\\\/][^*]*\\\\*+)*\\\\/\":\"\",\"@(namespace|import)[^;\\\\n]+[;\\\\n]\":\"\",\"'(\\\\\\\\.|[^'\\\\\\\\])*'\":cd,'\"(\\\\\\\\.|[^\"\\\\\\\\])*\"':cd,\"\\\\s+\":\" \"});function cQ(a){return cc.parse(a).replace(bz,\"$1\")};function bd(a){return a.replace(cb,cR)};function cd(c){var a=W.length;W[a]=c.slice(1,-1).replace(bz,\"$1\").replace(cP,\"\\\\'\");return\"'\"+a+\"'\"};function cR(d,c){var a=W[c];if(a==null)return d;return\"'\"+W[c]+\"'\"};function bp(a){return a.indexOf(\"'\")===0?W[a.slice(1,-1)]:a};var cS=new G({Width:\"Height\",width:\"height\",Left:\"Top\",left:\"top\",Right:\"Bottom\",right:\"bottom\",onX:\"onY\"});function ce(a){return cS.parse(a)};var cf=[];function bA(a){cT(a);y(N,\"onresize\",a)};function y(d,c,a){d.attachEvent(c,a);cf.push(arguments)};function cU(d,c,a){try{d.detachEvent(c,a)}catch(ex){}};y(N,\"onunload\",function(){var a;while(a=cf.pop()){cU(a[0],a[1],a[2])}});function be(d,c,a){if(!d.elements)d.elements={};if(a)d.elements[c.uniqueID]=c;else delete d.elements[c.uniqueID];return a};y(N,\"onbeforeprint\",function(){if(!h.CSS.print)new cg(\"print\");h.CSS.print.recalc()});var ch=/^\\d+(px)?$/i,X=/^\\d+%$/,C=function(f,d){if(ch.test(d))return parseInt(d);var c=f.style.left,a=f.runtimeStyle.left;f.runtimeStyle.left=f.currentStyle.left;f.style.left=d||0;d=f.style.pixelLeft;f.style.left=c;f.runtimeStyle.left=a;return d},bB=\"ie7-\",ci=F.extend({constructor:function(){this.fixes=[];this.recalcs=[]},init:bj}),bC=[];function cT(a){bC.push(a)};h.recalc=function(){h.HTML.recalc();h.CSS.recalc();for(var a=0;a<bC.length;a++)bC[a]()};function bq(a){return a.currentStyle[\"ie7-position\"]==\"fixed\"};function bD(c,a){return c.currentStyle[bB+a]||c.currentStyle[a]};function Y(d,c,a){if(d.currentStyle[bB+c]==null){d.runtimeStyle[bB+c]=d.currentStyle[c]}d.runtimeStyle[c]=a};function cj(c){var a=p.createElement(c||\"object\");a.style.cssText=\"position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999\";a.ie7_anon=true;return a};var bE=\"(e.nextSibling&&IE7._1(e,'next'))\",ck=bE.replace(/next/g,\"previous\"),cl=\"e.nodeName>'@'\",cm=\"if(\"+cl+\"){\",cn=\"(e.nodeName==='FORM'?IE7._0(e,'id'):e.id)\",cV=/a(#[\\w-]+)?(\\.[\\w-]+)?:(hover|active)/i,cW=/(.*)(:first-(line|letter))/,cX=/\\s/,cY=/((?:\\\\.|[^{\\\\])+)\\{((?:\\\\.|[^}\\\\])+)\\}/g,cZ=/(?:\\\\.|[^,\\\\])+/g,I=p.styleSheets,bF=[];h.CSS=new(ci.extend({parser:new ca,screen:\"\",print:\"\",styles:[],rules:[],pseudoClasses:t<7?\"first\\\\-child\":\"\",dynamicPseudoClasses:{toString:function(){var c=[];for(var a in this)c.push(a);return c.join(\"|\")}},init:function(){var j=\"^\\x01$\",i=\"\\\\[class=?[^\\\\]]*\\\\]\",g=[];if(this.pseudoClasses)g.push(this.pseudoClasses);var f=this.dynamicPseudoClasses.toString();if(f)g.push(f);g=g.join(\"|\");var d=t<7?[\"[>+~\\\\[(]|([:.])[\\\\w-]+\\\\1\"]:[i];if(g)d.push(\":(\"+g+\")\");this.UNKNOWN=new RegExp(d.join(\"|\")||j,\"i\");var c=t<7?[\"\\\\[[^\\\\]]+\\\\]|[^\\\\s(\\\\[]+\\\\s*[+~]\"]:[i],a=c.concat();if(g)a.push(\":(\"+g+\")\");u.COMPLEX=new RegExp(a.join(\"|\")||j,\"ig\");if(this.pseudoClasses)c.push(\":(\"+this.pseudoClasses+\")\");bf.COMPLEX=new RegExp(c.join(\"|\")||j,\"i\");f=\"not\\\\(:\"+f.split(\"|\").join(\"\\\\)|not\\\\(:\")+\"\\\\)|\"+f;bf.MATCH=new RegExp(f?\"(.*?):(\"+f+\")(.*)\":j,\"i\");this.createStyleSheet();this.refresh()},addEventHandler:function(){y.apply(null,arguments)},addFix:function(c,a){this.parser.add(c,a)},addRecalc:function(i,g,f,d){i=i.source||i;g=new RegExp(\"([{;\\\\s])\"+i+\"\\\\s*:\\\\s*\"+g+\"[^;}]*\");var c=this.recalcs.length;if(typeof d==\"string\")d=i+\":\"+d;this.addFix(g,function(a){if(typeof d==\"function\")d=d(a);return(d?d:a)+\";ie7-\"+a.slice(1)+\";ie7_recalc\"+c+\":1\"});this.recalcs.push(arguments);return c},apply:function(){this.getInlineCSS();new cg(\"screen\");this.trash()},createStyleSheet:function(){p.getElementsByTagName(\"head\")[0].appendChild(p.createElement(\"style\"));this.styleSheet=I[I.length-1];this.styleSheet.ie7=true;this.styleSheet.owningElement.ie7=true;this.styleSheet.cssText=U},getInlineCSS:function(){var d=p.getElementsByTagName(\"style\"),c;for(var a=d.length-1;c=d[a];a--){if(!c.disabled&&!c.ie7){c._7=c.innerHTML}}},getText:function(d,c){try{var a=d.cssText}catch(e){a=\"\"}if(V)a=cB(d.href,c)||a;return a},recalc:function(){this.screen.recalc();var q=/ie7_recalc\\d+/g,n=U.match(/[{,]/g).length,o=this.styleSheet.rules,k,l,m,j,i,g,f,d,c;for(g=n;k=o[g];g++){var a=k.style.cssText;if(l=a.match(q)){j=J(k.selectorText);if(j.length)for(f=0;f<l.length;f++){c=l[f];m=h.CSS.recalcs[c.slice(10)][2];for(d=0;(i=j[d]);d++){if(i.currentStyle[c])m(i,a)}}}}},refresh:function(){this.styleSheet.cssText=U+this.screen+this.print},trash:function(){for(var c=0;c<I.length;c++){if(!I[c].ie7){try{var a=I[c].cssText}catch(e){a=\"\"}if(a)I[c].cssText=\"\"}}}}));var cg=F.extend({constructor:function(a){this.media=a;this.load();h.CSS[a]=this;h.CSS.refresh()},createRule:function(d,c){var a;if(R&&(a=d.match(R.MATCH))){return new R(a[1],a[2],c)}else if(a=d.match(bf.MATCH)){if(!cV.test(a[0])||bf.COMPLEX.test(a[0])){return new bf(d,a[1],a[2],a[3],c)}}else{return new u(d,c)}return d+\" {\"+c+\"}\"},getText:function(){var v=/@media\\s+([^{]+?)\\s*\\{([^@]+\\})\\s*\\}/gi,Z=/@import[^;\\n]+/gi,S=/@import\\s+url\\s*\\(\\s*[\"']?|[\"']?\\s*\\)\\s*/gi,ba=/(url\\s*\\(\\s*['\"]?)([\\w\\.]+[^:\\)]*['\"]?\\))/gi,K=this,L={};function z(k,l,m,j){var i=\"\";if(!j){m=q(k.media);j=0}if(m===\"none\"){k.disabled=true;return\"\"}if(m===\"all\"||m===K.media){try{var g=!!k.cssText}catch(exe){}if(j<3&&g){var f=k.cssText.match(Z);for(var d=0,c;d<k.imports.length;d++){var c=k.imports[d];var a=k._2||k.href;c._2=f[d].replace(S,\"\");i+=z(c,by(a,l),m,j+1)}}i+=cQ(k.href?n(k,l):k.owningElement._7);i=A(i,K.media)}return i};for(var w=0;w<I.length;w++){var r=I[w];if(!r.disabled&&!r.ie7)this.cssText+=z(r)}function A(c,a){s.value=a;return c.replace(v,s)};function s(d,c,a){c=q(c);switch(c){case\"screen\":case\"print\":if(c!==s.value)return\"\";case\"all\":return a}return\"\"};function q(d){if(!d)return\"all\";var c=d.toLowerCase().split(/\\s*,\\s*/);d=\"none\";for(var a=0;a<c.length;a++){if(c[a]===\"all\")return\"all\";if(c[a]===\"screen\"){if(d===\"print\")return\"all\";d=\"screen\"}else if(c[a]===\"print\"){if(d===\"screen\")return\"all\";d=\"print\"}}return d};function n(f,d){var c=f._2||f.href,a=bk(c,d);if(L[a])return\"\";L[a]=f.disabled?\"\":o(h.CSS.getText(f,d),by(c,d));return L[a]};function o(c,a){return c.replace(ba,\"$1\"+a.slice(0,a.lastIndexOf(\"/\")+1)+\"$2\")}},load:function(){this.cssText=\"\";this.getText();this.parse();if(bF.length){this.cssText=da(this.cssText)}this.cssText=bd(this.cssText);bl={}},parse:function(){var j=h.CSS.parser.parse(this.cssText),o=\"\";this.cssText=j.replace(/@charset[^;]+;|@font\\-face[^\\}]+\\}/g,function(a){o+=a+\"\\n\";return\"\"});this.declarations=bd(o);var k=h.CSS.rules.length,l=[],m;while((m=cY.exec(this.cssText))){var j=m[2];if(j){var i=t<7&&j.indexOf(\"AlphaImageLoader\")!==-1;var g=m[1].match(cZ),f;for(var d=0;f=g[d];d++){f=bZ(f);var c=h.CSS.UNKNOWN.test(f);g[d]=c?this.createRule(f,j):f+\"{\"+j+\"}\";if(i)g[d]+=this.createRule(f+\">*\",\"position:relative\")}l.push(g.join(\"\\n\"))}}this.cssText=l.join(\"\\n\");this.rules=h.CSS.rules.slice(k)},recalc:function(){var c,a;for(a=0;(c=this.rules[a]);a++)c.recalc()},toString:function(){return this.declarations+\"@media \"+this.media+\"{\"+this.cssText+\"}\"}}),R,u=h.Rule=F.extend({constructor:function(d,c){this.id=h.CSS.rules.length;this.className=u.PREFIX+this.id;var a=d.match(cW);this.selector=(a?a[1]:d)||\"*\";this.selectorText=this.parse(this.selector)+(a?a[2]:\"\");this.cssText=c;this.MATCH=new RegExp(\"\\\\s\"+this.className+\"(\\\\s|$)\",\"g\");h.CSS.rules.push(this);this.init()},init:bj,add:function(a){a.className+=\" \"+this.className},recalc:function(){var c=J(this.selector);for(var a=0;a<c.length;a++)this.add(c[a])},parse:function(g){var f=g.replace(u.CHILD,\" \").replace(u.COMPLEX,\"\");if(t<7)f=f.replace(u.MULTI,\"\");var d=bo(f,u.TAGS).length-bo(g,u.TAGS).length,c=bo(f,u.CLASSES).length-bo(g,u.CLASSES).length+1;while(c>0&&u.CLASS.test(f)){f=f.replace(u.CLASS,\"\");c--}while(d>0&&u.TAG.test(f)){f=f.replace(u.TAG,\"$1*\");d--}f+=\".\"+this.className;c=Math.min(c,2);d=Math.min(d,2);var a=-10*c-d;if(a>0){f=f+\",\"+u.MAP[a]+\" \"+f}return f},remove:function(a){a.className=a.className.replace(this.MATCH,\"$1\")},toString:function(){return H(\"%1 {%2}\",this.selectorText,this.cssText)}},{CHILD:/>/g,CLASS:/\\.[\\w-]+/,CLASSES:/[.:\\[]/g,MULTI:/(\\.[\\w-]+)+/g,PREFIX:\"ie7_class\",TAG:/^\\w+|([\\s>+~])\\w+/,TAGS:/^\\w|[\\s>+~]\\w/g,MAP:{\"1\":\"html\",\"2\":\"html body\",\"10\":\".ie7_html\",\"11\":\"html.ie7_html\",\"12\":\"html.ie7_html body\",\"20\":\".ie7_html .ie7_body\",\"21\":\"html.ie7_html .ie7_body\",\"22\":\"html.ie7_html body.ie7_body\"}}),bf=u.extend({constructor:function(g,f,d,c,a){this.negated=d.indexOf(\"not\")===0;if(this.negated)d=d.slice(5,-1);this.attach=f||\"*\";this.dynamicPseudoClass=h.CSS.dynamicPseudoClasses[d];this.target=c;this.base(g,a)},recalc:function(){var f=J(this.attach),d;for(var c=0;d=f[c];c++){var a=this.target?J(this.target,d):[d];if(a.length)this.dynamicPseudoClass.apply(d,a,this)}}}),M=F.extend({constructor:function(c,a){this.name=c;this.apply=a;this.instances={};h.CSS.dynamicPseudoClasses[c]=this},register:function(g,f){var d=g[2];if(!f&&d.negated){this.unregister(g,true)}else{g.id=d.id+g[0].uniqueID;if(!this.instances[g.id]){var c=g[1],a;for(a=0;a<c.length;a++)d.add(c[a]);this.instances[g.id]=g}}},unregister:function(g,f){var d=g[2];if(!f&&d.negated){this.register(g,true)}else{if(this.instances[g.id]){var c=g[1],a;for(a=0;a<c.length;a++)d.remove(c[a]);delete this.instances[g.id]}}}}),br=new M(\"hover\",function(c){var a=arguments;h.CSS.addEventHandler(c,\"onmouseenter\",function(){br.register(a)});h.CSS.addEventHandler(c,\"onmouseleave\",function(){br.unregister(a)})});y(p,\"onmouseup\",function(){var c=br.instances;for(var a in c)if(!c[a][0].contains(event.srcElement))br.unregister(c[a])});var co={\"=\":\"%1==='%2'\",\"~=\":\"(' '+%1+' ').indexOf(' %2 ')!==-1\",\"|=\":\"%1==='%2'||%1.indexOf('%2-')===0\",\"^=\":\"%1.indexOf('%2')===0\",\"$=\":\"%1.slice(-'%2'.length)==='%2'\",\"*=\":\"%1.indexOf('%2')!==-1\"};co[\"\"]=\"%1!=null\";var T={\"<#attr>\":function(g,f,d,c){var a=\"IE7._0(e,'\"+f+\"')\";c=bp(c);if(d.length>1){if(!c||d===\"~=\"&&cX.test(c)){return\"false&&\"}a=\"(\"+a+\"||'')\"}return\"(\"+H(co[d],a,c)+\")&&\"},\"<#id>\":cn+\"==='$1'&&\",\"<#class>\":\"e.className&&(' '+e.className+' ').indexOf(' $1 ')!==-1&&\",\":first-child\":\"!\"+ck+\"&&\",\":link\":\"e.currentStyle['ie7-link']=='link'&&\",\":visited\":\"e.currentStyle['ie7-link']=='visited'&&\"};h.HTML=new(ci.extend({fixed:{},init:bj,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var f=0;f<this.fixes.length;f++){var d=J(this.fixes[f][0]);var c=this.fixes[f][1];for(var a=0;a<d.length;a++)c(d[a])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var j=0;j<this.recalcs.length;j++){var i=J(this.recalcs[j][0]);var g=this.recalcs[j][1],f;var d=Math.pow(2,j);for(var c=0;(f=i[c]);c++){var a=f.uniqueID;if((this.fixed[a]&d)===0){f=g(f)||f;this.fixed[a]|=d}}}}}));if(t<7){p.createElement(\"abbr\");h.HTML.addRecalc(\"label\",function(c){if(!c.htmlFor){var a=J(\"input,textarea\",c,true);if(a){y(c,\"onclick\",function(){a.click()})}}})}var bg=\"[.\\\\d]\";(function(){var v=h.Layout={};U+=\"*{boxSizing:content-box}\";v.boxSizing=function(a){if(!a.currentStyle.hasLayout){a.style.height=\"0cm\";if(a.currentStyle.verticalAlign===\"auto\")a.runtimeStyle.verticalAlign=\"top\";Z(a)}};function Z(a){if(a!=x&&a.currentStyle.position!==\"absolute\"){S(a,\"marginTop\");S(a,\"marginBottom\")}};function S(g,f){if(!g.runtimeStyle[f]){var d=g.parentElement;var c=f===\"marginTop\";if(d&&d.currentStyle.hasLayout&&!h._1(g,c?\"previous\":\"next\"))return;var a=g[c?\"firstChild\":\"lastChild\"];if(a&&a.nodeName<\"@\")a=h._1(a,c?\"next\":\"previous\");if(a&&a.currentStyle.styleFloat===\"none\"&&a.currentStyle.hasLayout){S(a,f);margin=ba(g,g.currentStyle[f]);childMargin=ba(a,a.currentStyle[f]);if(margin<0||childMargin<0){g.runtimeStyle[f]=margin+childMargin}else{g.runtimeStyle[f]=Math.max(childMargin,margin)}a.runtimeStyle[f]=\"0px\"}}};function ba(c,a){return a===\"auto\"?0:C(c,a)};var K=/^[.\\d][\\w]*$/,L=/^(auto|0cm)$/,z={};v.borderBox=function(a){z.Width(a);z.Height(a)};var w=function(r){z.Width=function(a){if(!X.test(a.currentStyle.width))A(a);if(r)Z(a)};function A(c,a){if(!c.runtimeStyle.fixedWidth){if(!a)a=c.currentStyle.width;c.runtimeStyle.fixedWidth=K.test(a)?Math.max(0,n(c,a))+\"px\":a;Y(c,\"width\",c.runtimeStyle.fixedWidth)}};function s(c){if(!bq(c)){var a=c.offsetParent;while(a&&!a.currentStyle.hasLayout)a=a.offsetParent}return(a||x).clientWidth};function q(c,a){if(X.test(a))return parseInt(parseFloat(a)/100*s(c));return C(c,a)};var n=function(f,d){var c=f.currentStyle[\"ie7-box-sizing\"]===\"border-box\",a=0;if(E&&!c)a+=o(f)+k(f,\"padding\");else if(!E&&c)a-=o(f)+k(f,\"padding\");return q(f,d)+a};function o(a){return a.offsetWidth-a.clientWidth};function k(c,a){return q(c,c.currentStyle[a+\"Left\"])+q(c,c.currentStyle[a+\"Right\"])};U+=\"*{minWidth:none;maxWidth:none;min-width:none;max-width:none}\";v.minWidth=function(a){if(a.currentStyle[\"min-width\"]!=null){a.style.minWidth=a.currentStyle[\"min-width\"]}if(be(arguments.callee,a,a.currentStyle.minWidth!==\"none\")){v.boxSizing(a);A(a);l(a)}};eval(\"IE7.Layout.maxWidth=\"+String(v.minWidth).replace(/min/g,\"max\"));function l(d){if(d==p.body){var c=d.clientWidth}else{var a=d.getBoundingClientRect();c=a.right-a.left}if(d.currentStyle.minWidth!==\"none\"&&c<n(d,d.currentStyle.minWidth)){d.runtimeStyle.width=d.currentStyle.minWidth}else if(d.currentStyle.maxWidth!==\"none\"&&c>=n(d,d.currentStyle.maxWidth)){d.runtimeStyle.width=d.currentStyle.maxWidth}else{d.runtimeStyle.width=d.runtimeStyle.fixedWidth}};function m(a){if(be(m,a,/^(fixed|absolute)$/.test(a.currentStyle.position)&&bD(a,\"left\")!==\"auto\"&&bD(a,\"right\")!==\"auto\"&&L.test(bD(a,\"width\")))){j(a);v.boxSizing(a)}};v.fixRight=m;function j(d){var c=q(d,d.runtimeStyle._3||d.currentStyle.left),a=s(d)-q(d,d.currentStyle.right)-c-k(d,\"margin\");if(parseInt(d.runtimeStyle.width)===a)return;d.runtimeStyle.width=\"\";if(bq(d)||r||d.offsetWidth<a){if(!E)a-=o(d)+k(d,\"padding\");if(a<0)a=0;d.runtimeStyle.fixedWidth=a;Y(d,\"width\",a)}};var i=0;bA(function(){if(!x)return;var g,f=(i<x.clientWidth);i=x.clientWidth;var d=v.minWidth.elements;for(g in d){var c=d[g];var a=(parseInt(c.runtimeStyle.width)===n(c,c.currentStyle.minWidth));if(f&&a)c.runtimeStyle.width=\"\";if(f==a)l(c)}var d=v.maxWidth.elements;for(g in d){var c=d[g];var a=(parseInt(c.runtimeStyle.width)===n(c,c.currentStyle.maxWidth));if(!f&&a)c.runtimeStyle.width=\"\";if(f!==a)l(c)}for(g in m.elements)j(m.elements[g])});if(E){h.CSS.addRecalc(\"width\",bg,z.Width)}if(t<7){h.CSS.addRecalc(\"max-width\",bg,v.maxWidth);h.CSS.addRecalc(\"right\",bg,m)}else if(t==7){if(r)h.CSS.addRecalc(\"height\",\"[\\\\d.]+%\",function(element){element.runtimeStyle.pixelHeight=parseInt(s(element)*element.currentStyle[\"ie7-height\"].slice(0,-1)/100)})}};eval(\"var _8=\"+ce(w));w();_8(true);if(t<7){h.CSS.addRecalc(\"min-width\",bg,v.minWidth);h.CSS.addFix(/\\bmin-height\\s*/,\"height\")}})();var bG=bk(\"blank.gif\",cA),bH=\"DXImageTransform.Microsoft.AlphaImageLoader\",cp=\"progid:\"+bH+\"(src='%1',sizingMethod='%2')\",bh,bi=[];function cq(c){if(bh.test(c.src)){var a=new Image(c.width,c.height);a.onload=function(){c.width=a.width;c.height=a.height;a=null};a.src=c.src;c.pngSrc=c.src;bs(c)}};if(t<7){h.CSS.addFix(/background(-image)?\\s*:\\s*([^};]*)?url\\(([^\\)]+)\\)([^;}]*)?/,function(g,f,d,c,a){c=bp(c);return bh.test(c)?\"filter:\"+H(cp,c,a.indexOf(\"no-repeat\")===-1?\"scale\":\"crop\")+\";zoom:1;background\"+(f||\"\")+\":\"+(d||\"\")+\"none\"+(a||\"\"):g});h.CSS.addRecalc(/list\\-style(\\-image)?/,\"[^};]*url\",function(f){var d=f.currentStyle.listStyleImage.slice(5,-2);if(bh.test(d)){if(f.nodeName===\"LI\"){cr(f,d)}else if(f.nodeName===\"UL\"){for(var c=0,a;a=f.childNodes[c];c++){if(a.nodeName===\"LI\")cr(a,d)}}}});function cr(i,g){var f=i.runtimeStyle,d=i.offsetHeight,c=new Image;c.onload=function(){var a=i.currentStyle.paddingLeft;a=a===\"0px\"?0:C(i,a);f.paddingLeft=(a+this.width)+\"px\";f.marginLeft=-this.width+\"px\";f.listStyleType=\"none\";f.listStyleImage=\"none\";f.paddingTop=Math.max(d-i.offsetHeight,0)+\"px\";bs(i,\"crop\",g);i.style.zoom=\"100%\"};c.src=g};h.HTML.addRecalc(\"img,input\",function(a){if(a.nodeName===\"INPUT\"&&a.type!==\"image\")return;cq(a);y(a,\"onpropertychange\",function(){if(!bI&&event.propertyName===\"src\"&&a.src.indexOf(bG)===-1)cq(a)})});var bI=false;y(N,\"onbeforeprint\",function(){bI=true;for(var a=0;a<bi.length;a++)db(bi[a])});y(N,\"onafterprint\",function(){for(var a=0;a<bi.length;a++)bs(bi[a]);bI=false})}function bs(f,d,c){var a=f.filters[bH];if(a){a.src=c||f.src;a.enabled=true}else{f.runtimeStyle.filter=H(cp,c||f.src,d||\"scale\");bi.push(f)}f.src=bG};function db(a){a.src=a.pngSrc;a.filters[bH].enabled=false};(function(){if(t>=7)return;h.CSS.addRecalc(\"position\",\"fixed\",o,\"absolute\");h.CSS.addRecalc(\"background(-attachment)?\",\"[^};]*fixed\",q);var z=E?\"body\":\"documentElement\";function w(){if(B.currentStyle.backgroundAttachment!==\"fixed\"){if(B.currentStyle.backgroundImage===\"none\"){B.runtimeStyle.backgroundRepeat=\"no-repeat\";B.runtimeStyle.backgroundImage=\"url(\"+bG+\")\"}B.runtimeStyle.backgroundAttachment=\"fixed\"}w=bj};var r=cj(\"img\");function A(a){return a?bq(a)||A(a.parentElement):false};function s(d,c,a){setTimeout(\"document.all.\"+d.uniqueID+\".runtimeStyle.setExpression('\"+c+\"','\"+a+\"')\",0)};function q(a){if(be(q,a,a.currentStyle.backgroundAttachment===\"fixed\"&&!a.contains(B))){w();j.bgLeft(a);j.bgTop(a);n(a)}};function n(c){r.src=c.currentStyle.backgroundImage.slice(5,-2);var a=c.canHaveChildren?c:c.parentElement;a.appendChild(r);j.setOffsetLeft(c);j.setOffsetTop(c);a.removeChild(r)};function o(a){if(be(o,a,bq(a))){Y(a,\"position\",\"absolute\");Y(a,\"left\",a.currentStyle.left);Y(a,\"top\",a.currentStyle.top);w();h.Layout.fixRight(a);k(a)}};function k(d,c){p.body.getBoundingClientRect();j.positionTop(d,c);j.positionLeft(d,c,true);if(!d.runtimeStyle.autoLeft&&d.currentStyle.marginLeft===\"auto\"&&d.currentStyle.right!==\"auto\"){var a=x.clientWidth-j.getPixelWidth(d,d.currentStyle.right)-j.getPixelWidth(d,d.runtimeStyle._3)-d.clientWidth;if(d.currentStyle.marginRight===\"auto\")a=parseInt(a/2);if(A(d.offsetParent))d.runtimeStyle.pixelLeft+=a;else d.runtimeStyle.shiftLeft=a}if(!d.runtimeStyle.fixedWidth)j.clipWidth(d);if(!d.runtimeStyle.fixedHeight)j.clipHeight(d)};function l(){var c=q.elements;for(var a in c)n(c[a]);c=o.elements;for(a in c){k(c[a],true);k(c[a],true)}m=0};var m;bA(function(){if(!m)m=setTimeout(l,100)});var j={},i=function(g){g.bgLeft=function(a){a.style.backgroundPositionX=a.currentStyle.backgroundPositionX;if(!A(a)){s(a,\"backgroundPositionX\",\"(parseInt(runtimeStyle.offsetLeft)+document.\"+z+\".scrollLeft)||0\")}};g.setOffsetLeft=function(c){var a=A(c)?\"backgroundPositionX\":\"offsetLeft\";c.runtimeStyle[a]=g.getOffsetLeft(c,c.style.backgroundPositionX)-c.getBoundingClientRect().left-c.clientLeft+2};g.getOffsetLeft=function(c,a){switch(a){case\"left\":case\"top\":return 0;case\"right\":case\"bottom\":return x.clientWidth-r.offsetWidth;case\"center\":return(x.clientWidth-r.offsetWidth)/2;default:if(X.test(a)){return parseInt((x.clientWidth-r.offsetWidth)*parseFloat(a)/100)}r.style.left=a;return r.offsetLeft}};g.clipWidth=function(f){var d=f.runtimeStyle.fixWidth;f.runtimeStyle.borderRightWidth=\"\";f.runtimeStyle.width=d?g.getPixelWidth(f,d)+\"px\":\"\";if(f.currentStyle.width!==\"auto\"){var c=f.getBoundingClientRect();var a=f.offsetWidth-x.clientWidth+c.left-2;if(a>=0){f.runtimeStyle.borderRightWidth=\"0px\";a=Math.max(C(f,f.currentStyle.width)-a,0);Y(f,\"width\",a);return a}}};g.positionLeft=function(c,a){if(!a&&X.test(c.currentStyle.width)){c.runtimeStyle.fixWidth=c.currentStyle.width}if(c.runtimeStyle.fixWidth){c.runtimeStyle.width=g.getPixelWidth(c,c.runtimeStyle.fixWidth)}c.runtimeStyle.shiftLeft=0;c.runtimeStyle._3=c.currentStyle.left;c.runtimeStyle.autoLeft=c.currentStyle.right!==\"auto\"&&c.currentStyle.left===\"auto\";c.runtimeStyle.left=\"\";c.runtimeStyle.screenLeft=g.getScreenLeft(c);c.runtimeStyle.pixelLeft=c.runtimeStyle.screenLeft;if(!a&&!A(c.offsetParent)){s(c,\"pixelLeft\",\"runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document.\"+z+\".scrollLeft\")}};g.getScreenLeft=function(d){var c=d.offsetLeft,a=1;if(d.runtimeStyle.autoLeft){c=x.clientWidth-d.offsetWidth-g.getPixelWidth(d,d.currentStyle.right)}if(d.currentStyle.marginLeft!==\"auto\"){c-=g.getPixelWidth(d,d.currentStyle.marginLeft)}while(d=d.offsetParent){if(d.currentStyle.position!==\"static\")a=-1;c+=d.offsetLeft*a}return c};g.getPixelWidth=function(c,a){return X.test(a)?parseInt(parseFloat(a)/100*x.clientWidth):C(c,a)}};eval(\"var _9=\"+ce(i));i(j);_9(j)})();if(t<7){var bJ={backgroundColor:\"transparent\",backgroundImage:\"none\",backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:\"none\",borderTopStyle:\"none\",borderRightStyle:\"none\",borderBottomStyle:\"none\",borderLeftWidth:0,borderLeftColor:\"#000\",borderTopColor:\"#000\",borderRightColor:\"#000\",borderBottomColor:\"#000\",height:null,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,width:\"100%\"};h.CSS.addRecalc(\"overflow\",\"visible\",function(d){if(d.currentStyle.position===\"absolute\")return;if(d.parentNode.ie7_wrapped)return;if(h.Layout&&d.currentStyle[\"max-height\"]!==\"auto\"){h.Layout.maxHeight(d)}if(d.currentStyle.marginLeft===\"auto\")d.style.marginLeft=0;if(d.currentStyle.marginRight===\"auto\")d.style.marginRight=0;var c=p.createElement(cy);c.ie7_wrapped=d;for(var a in bJ){c.style[a]=d.currentStyle[a];if(bJ[a]!=null){d.runtimeStyle[a]=bJ[a]}}c.style.display=\"block\";c.style.position=\"relative\";d.runtimeStyle.position=\"absolute\";d.parentNode.insertBefore(c,d);c.appendChild(d)})}function dc(){var s=\"xx-small,x-small,small,medium,large,x-large,xx-large\".split(\",\");for(var q=0;q<s.length;q++){s[s[q]]=s[q-1]||\"0.67em\"}h.CSS.addFix(/(font(-size)?\\s*:\\s*)([\\w.-]+)/,function(f,d,c,a){return d+(s[a]||a)});var n=/^\\-/,o=/(em|ex)$/i,k=/em$/i,l=/ex$/i;C=function(d,c){if(ch.test(c))return parseInt(c)||0;var a=n.test(c)?-1:1;if(o.test(c))a*=j(d);m.style.width=a<0?c.slice(1):c;B.appendChild(m);c=a*m.offsetWidth;m.removeNode();return parseInt(c)};var m=cj();function j(d){var c=1;m.style.fontFamily=d.currentStyle.fontFamily;m.style.lineHeight=d.currentStyle.lineHeight;while(d!=B){var a=d.currentStyle[\"ie7-font-size\"];if(a){if(k.test(a))c*=parseFloat(a);else if(X.test(a))c*=(parseFloat(a)/100);else if(l.test(a))c*=(parseFloat(a)/2);else{m.style.fontSize=a;return 1}}d=d.parentElement}return c};h.CSS.addFix(/cursor\\s*:\\s*pointer/,\"cursor:hand\");h.CSS.addFix(/display\\s*:\\s*list-item/,\"display:block\");function i(f){var d=f.parentElement,c=d.offsetWidth-f.offsetWidth-g(d),a=(f.currentStyle[\"ie7-margin\"]&&f.currentStyle.marginRight===\"auto\")||f.currentStyle[\"ie7-margin-right\"]===\"auto\";switch(d.currentStyle.textAlign){case\"right\":c=a?parseInt(c/2):0;f.runtimeStyle.marginRight=c+\"px\";break;case\"center\":if(a)c=0;default:if(a)c/=2;f.runtimeStyle.marginLeft=parseInt(c)+\"px\"}};function g(a){return C(a,a.currentStyle.paddingLeft)+C(a,a.currentStyle.paddingRight)};h.CSS.addRecalc(\"margin(-left|-right)?\",\"[^};]*auto\",function(a){if(be(i,a,a.parentElement&&a.currentStyle.display===\"block\"&&a.currentStyle.marginLeft===\"auto\"&&a.currentStyle.position!==\"absolute\")){i(a)}});bA(function(){for(var c in i.elements){var a=i.elements[c];a.runtimeStyle.marginLeft=a.runtimeStyle.marginRight=\"\";i(a)}})};var bK=\"\\\\([^)]+\\\\)\";cc.add(/::(before|after)/,\":$1\");if(t<8){if(h.CSS.pseudoClasses)h.CSS.pseudoClasses+=\"|\";h.CSS.pseudoClasses+=\"before|after|lang\"+bK;function da(a){return a.replace(new RegExp(\"([{;\\\\s])(\"+bF.join(\"|\")+\")\\\\s*:\\\\s*([^;}]+)\",\"g\"),\"$1$2:$3;ie7-$2:$3\")};var dd=/[\\w-]+\\s*:\\s*inherit/g;var de=/ie7\\-|\\s*:\\s*inherit/g;var df=/\\-([a-z])/g;function dg(c,a){return a.toUpperCase()};h.CSS.addRecalc(\"[\\\\w-]+\",\"inherit\",function(g,f){if(g.parentElement){var d=f.match(dd);for(var c=0;c<d.length;c++){var a=d[c].replace(de,\"\");if(g.currentStyle[\"ie7-\"+a]===\"inherit\"){a=a.replace(df,dg);g.runtimeStyle[a]=g.parentElement.currentStyle[a]}}}},function(a){bF.push(bY(a.slice(1).split(\":\")[0]));return a});var bt=new M(\"focus\",function(c){var a=arguments;h.CSS.addEventHandler(c,\"onfocus\",function(){bt.unregister(a);bt.register(a)});h.CSS.addEventHandler(c,\"onblur\",function(){bt.unregister(a)});if(c==p.activeElement){bt.register(a)}});var bL=new M(\"active\",function(c){var a=arguments;h.CSS.addEventHandler(c,\"onmousedown\",function(){bL.register(a)})});y(p,\"onmouseup\",function(){var c=bL.instances;for(var a in c)bL.unregister(c[a])});var dh=/^url\\s*\\(\\s*([^)]*)\\)$/;var di={before0:\"beforeBegin\",before1:\"afterBegin\",after0:\"afterEnd\",after1:\"beforeEnd\"};var R=h.PseudoElement=u.extend({constructor:function(j,i,g){this.position=i;var f=g.match(R.CONTENT),d,c;if(f){f=f[1];d=f.split(/\\s+/);for(var a=0;(c=d[a]);a++){d[a]=/^attr/.test(c)?{attr:c.slice(5,-1)}:c.charAt(0)===\"'\"?bp(c):bd(c)}f=d}this.content=f;this.base(j,bd(g))},init:function(){this.match=J(this.selector);for(var c=0;c<this.match.length;c++){var a=this.match[c].runtimeStyle;if(!a[this.position])a[this.position]={cssText:\"\"};a[this.position].cssText+=\";\"+this.cssText;if(this.content!=null)a[this.position].content=this.content}},create:function(n){var o=n.runtimeStyle[this.position];if(o){var k=[].concat(o.content||\"\");for(var l=0;l<k.length;l++){if(typeof k[l]==\"object\"){k[l]=n.getAttribute(k[l].attr)}}k=k.join(\"\");var m=k.match(dh);var j=\"overflow:hidden;\"+o.cssText.replace(/'/g,'\"');var i=di[this.position+Number(n.canHaveChildren)];var g='ie7_pseudo'+R.count++;n.insertAdjacentHTML(i,H(R.ANON,this.className,g,j,m?\"\":k));if(m){var f=bp(m[1]);var d=p.getElementById(g);d.src=f;bs(d,\"crop\");var c=n.currentStyle.styleFloat!==\"none\";if(d.currentStyle.display===\"inline\"||c){if(t<7&&c&&n.canHaveChildren){n.runtimeStyle.display=\"inline\";n.runtimeStyle.position=\"relative\";d.runtimeStyle.position=\"absolute\"}d.style.display=\"inline-block\";if(n.currentStyle.styleFloat!==\"none\"){d.style.pixelWidth=n.offsetWidth}var a=new Image;a.onload=function(){d.style.pixelWidth=this.width;d.style.pixelHeight=Math.max(this.height,d.offsetHeight)};a.src=f}}n.runtimeStyle[this.position]=null}},recalc:function(){if(this.content==null)return;for(var a=0;a<this.match.length;a++){this.create(this.match[a])}},toString:function(){return\".\"+this.className+\"{display:inline}\"}},{CONTENT:/content\\s*:\\s*([^;]*)(;|$)/,ANON:\"<ie7:! class='ie7_anon %1' id=%2 style='%3'>%4</ie7:!>\",MATCH:/(.*):(before|after).*/,count:0});h._getLang=function(c){var a=\"\";while(c&&c.nodeType===1){a=c.lang||c.getAttribute(\"lang\")||\"\";if(a)break;c=c.parentNode}return a};T=O(T,{\":lang\\\\(([^)]+)\\\\)\":\"((ii=IE7._getLang(e))==='$1'||ii.indexOf('$1-')===0)&&\"})}var dj=/^(submit|reset|button)$/;h.HTML.addRecalc(\"button,input\",function(c){if(c.nodeName===\"BUTTON\"){var a=c.outerHTML.match(/ value=\"([^\"]*)\"/i);c.runtimeStyle.value=a?a[1]:\"\"}if(c.type===\"submit\"){y(c,\"onclick\",function(){c.runtimeStyle.clicked=true;setTimeout(\"document.all.\"+c.uniqueID+\".runtimeStyle.clicked=false\",1)})}});h.HTML.addRecalc(\"form\",function(d){y(d,\"onsubmit\",function(){for(var c,a=0;c=d[a];a++){if(dj.test(c.type)&&!c.disabled&&!c.runtimeStyle.clicked){c.disabled=true;setTimeout(\"document.all.\"+c.uniqueID+\".disabled=false\",1)}else if(c.nodeName===\"BUTTON\"&&c.type===\"submit\"){setTimeout(\"document.all.\"+c.uniqueID+\".value='\"+c.value+\"'\",1);c.value=c.runtimeStyle.value}}})});h.HTML.addRecalc(\"img\",function(a){if(a.alt&&!a.title)a.title=\"\"});if(t<8){h.CSS.addRecalc(\"border-spacing\",bg,function(a){if(a.currentStyle.borderCollapse!==\"collapse\"){a.cellSpacing=C(a,a.currentStyle[\"ie7-border-spacing\"].split(\" \")[0])}});h.CSS.addRecalc(\"box-sizing\",\"content-box\",h.Layout.boxSizing);h.CSS.addRecalc(\"box-sizing\",\"border-box\",h.Layout.borderBox)}if(t<8){var dk=/^image/i;h.HTML.addRecalc(\"object\",function(a){if(dk.test(a.type)){a.body.style.cssText=\"margin:0;padding:0;border:none;overflow:hidden\";return a}})}var bM=\"!IE7._a(e,'next')&&\",cs=bM.replace(\"next\",\"previous\");if(h.CSS.pseudoClasses)h.CSS.pseudoClasses+=\"|\";h.CSS.pseudoClasses+=\"(?:first|last|only)\\\\-(?:child|of\\\\-type)|empty|root|target|\"+(\"not|nth\\\\-child|nth\\\\-last\\\\-child|nth\\\\-of\\\\-type|nth\\\\-last\\\\-of\\\\-type\".split(\"|\").join(bK+\"|\")+bK);var bN=new M(\"checked\",function(c){if(typeof c.checked!==\"boolean\")return;var a=arguments;h.CSS.addEventHandler(c,\"onpropertychange\",function(){if(event.propertyName===\"checked\"){if(c.checked===true)bN.register(a);else bN.unregister(a)}});if(c.checked===true)bN.register(a)}),bO=new M(\"enabled\",function(c){if(typeof c.disabled!==\"boolean\")return;var a=arguments;h.CSS.addEventHandler(c,\"onpropertychange\",function(){if(event.propertyName===\"disabled\"){if(c.disabled===false)bO.register(a);else bO.unregister(a)}});if(c.disabled===false)bO.register(a)}),bP=new M(\"disabled\",function(c){if(typeof c.disabled!==\"boolean\")return;var a=arguments;h.CSS.addEventHandler(c,\"onpropertychange\",function(){if(event.propertyName===\"disabled\"){if(c.disabled===true)bP.register(a);else bP.unregister(a)}});if(c.disabled===true)bP.register(a)}),bQ=new M(\"indeterminate\",function(c){if(typeof c.indeterminate!==\"boolean\")return;var a=arguments;h.CSS.addEventHandler(c,\"onpropertychange\",function(){if(event.propertyName===\"indeterminate\"){if(c.indeterminate===true)bQ.register(a);else bQ.unregister(a)}});h.CSS.addEventHandler(c,\"onclick\",function(){bQ.unregister(a)})}),bR=new M(\"target\",function(c){var a=arguments;if(!c.tabIndex)c.tabIndex=0;h.CSS.addEventHandler(p,\"onpropertychange\",function(){if(event.propertyName===\"activeElement\"){if(c.id&&c.id===location.hash.slice(1))bR.register(a);else bR.unregister(a)}});if(c.id&&c.id===location.hash.slice(1))bR.register(a)}),ct=1,bu={_4:1};h._b=function(l,m,j){var i=l.parentNode;if(!i||i.nodeType!==1)return NaN;var g=j?l.nodeName:\"\";if(g===\"TR\"&&l.sectionRowIndex>=0){var c=l.sectionRowIndex;return m?l.parentNode.rows.length-c+1:c}if((g===\"TD\"||g===\"TH\")&&l.cellIndex>=0){c=l.cellIndex;return m?l.parentNode.cells.length-c+1:c}if(bu._4!==ct){bu={_4:ct}}var f=(i.uniqueID)+\"-\"+g,d=bu[f];if(!d){d={};var c=0,a=i.firstChild;while(a){if(j?a.nodeName===g:a.nodeName>\"@\"){d[a.uniqueID]=++c}a=a.nextSibling}d.length=c;bu[f]=d}c=d[l.uniqueID];return m?d.length-c+1:c};h._c=function(a){a=a.firstChild;while(a){if(a.nodeType===3||a.nodeName>\"@\")return false;a=a.nextSibling}return true};h._a=function(d,c){var a=d.nodeName;c+=\"Sibling\";do{d=d[c];if(d&&d.nodeName===a)break}while(d);return d};var dl={\"+\":1,\"-\":-1},dm=/ /g;T=O(O({\":nth(-last)?-(?:child|(of-type))\\\\((<#nth_arg>)\\\\)(<#filter>)?\":function(m,j,i,g,f){g=g.replace(dm,\"\");var d=\"IE7._b(e,\"+!!j+\",\"+!!i+\")\";if(g===\"even\")g=\"2n\";else if(g===\"odd\")g=\"2n+1\";else if(!isNaN(g))g=\"0n\"+~~g;g=g.split(\"n\");var c=~~(dl[g[0]]||g[0]||1),b=~~g[1];if(c===0){var a=d+\"===\"+b}else{a=\"((ii=\"+d+\")-(\"+b+\"))%\"+c+\"===0&&ii\"+(c<0?\"<\":\">\")+\"=\"+b}return this.parse(f)+a+\"&&\"},\"<#negation>\":function(c,a){if(/:not/i.test(a))bv();if(/^[#.:\\[]/.test(a)){a=\"*\"+a}return\"!(\"+D.parse(a).slice(3,-2)+\")&&\"}},T),{\":checked\":\"e.checked===true&&\",\":disabled\":\"e.disabled===true&&\",\":enabled\":\"e.disabled===false&&\",\":last-child\":\"!\"+bE+\"&&\",\":only-child\":\"!\"+ck+\"&&!\"+bE+\"&&\",\":first-of-type\":cs,\":last-of-type\":bM,\":only-of-type\":cs+bM,\":empty\":\"IE7._c(e)&&\",\":root\":\"e==R&&\",\":target\":\"H&&\"+cn+\"===H&&\"});var dn=\"article,aside,audio,canvas,details,figcaption,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video\".split(\",\");for(var cu=0,cv;cv=dn[cu];cu++)p.createElement(cv);U+=\"datalist{display:none}details{padding-left:40px;display:block;margin:1em 0}meter,progress{vertical-align:-0.2em;width:5em;height:1em;display:inline-block}progress{width:10em;}article,aside,figcaption,footer,header,hgroup,summary,section,nav{display:block;margin:1em 0}figure{margin:1em 40px;display:block}mark{background:yellow}\";h.CSS.addFix(/\\bopacity\\s*:\\s*([\\d.]+)/,function(c,a){return\"zoom:1;filter:Alpha(opacity=\"+((a*100)||1)+\")\"});var D,J=(function(){var o0=/^[>+~]/,bw=false;function dp(f,d,c){f=bZ(f);if(!d)d=p;var a=d;bw=o0.test(f);if(bw){d=d.parentNode;f=\"*\"+f}try{return n.create(f,bw)(d,c?null:[],a)}catch(ex){return c?null:[]}};var dq=/^(\\\\.|[' >+~#.\\[\\]:*(),\\w-\\^|$=]|[^\\x00-\\xa0])+$/,dE=/^(href|src)$/,cw={\"class\":\"className\",\"for\":\"htmlFor\"},dF=/\\sie7_\\w+/g,dr=/^(action|cite|codebase|data|dynsrc|href|longdesc|lowsrc|src|usemap|url)$/i;h._0=function(f,d){if(f.getAttributeNode){var c=f.getAttributeNode(d)}d=cw[d.toLowerCase()]||d;if(!c)c=f.attributes[d];var a=c&&c.specified;if(f[d]&&typeof f[d]==\"boolean\")return d.toLowerCase();if((a&&dr.test(d))||(!c&&E)||d===\"value\"||d===\"type\"){return f.getAttribute(d,2)}if(d===\"style\")return f.style.cssText.toLowerCase()||null;return a?String(c.nodeValue):null};var cx=\"colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc\";O(cw,cO(cx.toLowerCase().split(\",\"),cx.split(\",\")));h._1=function(c,a){a+=\"Sibling\";do{c=c[a];if(c&&c.nodeName>\"@\")break}while(c);return c};var ds=/(^|[, >+~])([#.:\\[])/g,dG=/\\)\\{/g,dt=/,/,dH=/^['\"]/,du=/\\\\([\\da-f]{2,2})/gi,dI=/last/i;h._d=function(f,d){var c=f.all[d]||null;if(!c||(c.nodeType&&h._0(c,\"id\")===d))return c;for(var a=0;a<c.length;a++){if(h._0(c[a],\"id\")===d)return c[a]}return null};var bb=G.extend({dictionary:new cM({ident:/\\-?(\\\\.|[_a-z]|[^\\x00-\\xa0])(\\\\.|[\\w-]|[^\\x00-\\xa0])*/,combinator:/[\\s>+~]/,operator:/[\\^~|$*]?=/,nth_arg:/[+-]?\\d+|[+-]?\\d*n(?:\\s*[+-]\\s*\\d+)?|even|odd/,tag:/\\*|<#ident>/,id:/#(<#ident>)/,'class':/\\.(<#ident>)/,pseudo:/\\:([\\w-]+)(?:\\(([^)]+)\\))?/,attr:/\\[(<#ident>)(?:(<#operator>)((?:\\\\.|[^\\[\\]#.:])+))?\\]/,negation:/:not\\((<#tag>|<#id>|<#class>|<#attr>|<#pseudo>)\\)/,sequence:/(\\\\.|[~*]=|\\+\\d|\\+?\\d*n\\s*\\+\\s*\\d|[^\\s>+~,\\*])+/,filter:/[#.:\\[]<#sequence>/,selector:/[^>+~](\\\\.|[^,])*?/,grammar:/^(<#selector>)((,<#selector>)*)$/}),ignoreCase:true}),dv=new bb({\"\\\\\\\\.|[~*]\\\\s+=|\\\\+\\\\s+\\\\d\":G.IGNORE,\"\\\\[\\\\s+\":\"[\",\"\\\\(\\\\s+\":\"(\",\"\\\\s+\\\\)\":\")\",\"\\\\s+\\\\]\":\"]\",\"\\\\s*([,>+~]|<#operator>)\\\\s*\":\"$1\",\"\\\\s+$\":\"\",\"\\\\s+\":\" \"});function dw(a){a=dv.parse(a.replace(du,\"\\\\x$1\")).replace(bz,\"$1\").replace(ds,\"$1*$2\");if(!dq.test(a))bv();return a};function dJ(a){return a.replace(cb,dx)};function dx(c,a){return W[a]};var dy=/\\{/g,dz=/\\\\{/g;function bS(a){return Array((a.replace(dz,\"\").match(dy)||\"\").length+1).join(\"}\")};T=new bb(T);var v=/:target/i,Z=/:root/i;function S(c){var a=\"\";if(Z.test(c))a+=\",R=d.documentElement\";if(v.test(c))a+=\",H=d.location;H=H&&H.hash.replace('#','')\";if(a||c.indexOf(\"#\")!==-1){a=\",t=c.nodeType,d=t===9?c:c.ownerDocument||(c.document||c).parentWindow.document\"+a}return\"var ii\"+a+\";\"};var ba={\" \":\";while(e!=s&&(e=e.parentNode)&&e.nodeType===1){\",\">\":\".parentElement;if(e){\",\"+\":\";while((e=e.previousSibling)&&!(\"+cl+\"))continue;if(e){\",\"~\":\";while((e=e.previousSibling)){\"+cm},K=/\\be\\b/g;D=new bb({\"(?:(<#selector>)(<#combinator>))?(<#tag>)(<#filter>)?$\":function(j,i,g,f,d){var c=\"\";if(f!==\"*\"){var a=f.toUpperCase();c+=\"if(e.nodeName==='\"+a+(a===f?\"\":\"'||e.nodeName==='\"+f)+\"'){\"}if(d){c+=\"if(\"+T.parse(d).slice(0,-2)+\"){\"}c=c.replace(K,\"e\"+this.index);if(g){c+=\"var e=e\"+(this.index++)+ba[g];c=c.replace(K,\"e\"+this.index)}if(i){c+=this.parse(i)}return c}});var L=\"e0=IE7._d(d,'%1');if(e0){\",z=\"var n=c.getElementsByTagName('%1');\",w=\"if(r==null)return e0;r[k++]=e0;\",r=1,A=new bb({\"^((?:<#selector>)?(?:<#combinator>))(<#tag>)(<#filter>)?$\":true}),s={},q=new bb({\"^(<#tag>)#(<#ident>)(<#filter>)?( [^,]*)?$\":function(j,i,g,f,d){var c=H(L,g),a=\"}\";if(f){c+=D.parse(i+f);a=bS(c)}if(d){c+=\"s=c=e0;\"+n.parse(\"*\"+d)}else{c+=w}return c+a},\"^([^#,]+)#(<#ident>)(<#filter>)?$\":function(g,f,d,c){var a=H(L,d);if(f===\"*\"){a+=w}else{a+=D.parse(f+c)+w+\"break\"}return a+bS(a)},\"^.*$\":\"\"}),n=new bb({\"<#grammar>\":function(k,l,m){if(!this.groups)this.groups=[];var j=A.exec(\" \"+l);if(!j)bv();this.groups.push(j.slice(1));if(m){return this.parse(m.replace(dt,\"\"))}var i=this.groups,g=i[0][r];for(var c=1;j=i[c];c++){if(g!==j[r]){g=\"*\";break}}var f=\"\",d=w+\"continue filtering;\";for(var c=0;j=i[c];c++){D.index=0;if(g!==\"*\")j[r]=\"*\";j=j.join(\"\");if(j===\" *\"){f=d;break}else{j=D.parse(j);if(bw)j+=\"if(e\"+D.index+\"==s){\";f+=j+d+bS(j)}}var a=g===\"*\";return(a?\"var n=c.all;\":H(z,g))+\"filtering:while((e0=n[i++]))\"+(a?cm.replace(K,\"e0\"):\"{\")+f+\"}\"},\"^.*$\":bv}),o=/\\&\\&(e\\d+)\\.nodeType===1(\\)\\{\\s*if\\(\\1\\.nodeName=)/g;n.create=function(d){if(!s[d]){d=dw(d);this.groups=null;D.index=0;var c=this.parse(d);this.groups=null;D.index=0;if(d.indexOf(\"#\")!==-1){var a=q.parse(d);if(a){c=\"if(t===1||t===11|!c.getElementById){\"+c+\"}else{\"+a+\"}\"}}c=c.replace(o,\"$2\");c=S(d)+bd(c);s[d]=new Function(\"return function(c,r,s){var i=0,k=0,e0;\"+c+\"return r}\")()}return s[d]};return dp})();function bv(){throw new SyntaxError(\"Invalid selector.\");};h.loaded=true;(function(){try{if(!p.body)throw\"continue\";bx.doScroll(\"left\")}catch(ex){setTimeout(arguments.callee,1);return}try{eval(bU.innerHTML)}catch(ex){}if(typeof IE7_PNG_SUFFIX==\"object\"){bh=IE7_PNG_SUFFIX}else{bh=new RegExp(bY(N.IE7_PNG_SUFFIX||\"-trans.png\")+\"(\\\\?.*)?$\",\"i\")}B=p.body;x=E?B:bx;B.className+=\" ie7_body\";bx.className+=\" ie7_html\";if(E)dc();h.CSS.init();h.HTML.init();h.HTML.apply();h.CSS.apply();h.recalc()})()})(this,document);\n"
  },
  {
    "path": "themes/bootstrap/main/navbar.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n\n<div class=\"navbar navbar-inverse navbar-fixed-top\" role=\"navigation\">\n\t<div class=\"container\">\n\t\t<div class=\"navbar-header\">\n\t\t\t<button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\">\n\t\t\t\t<span class=\"sr-only\">Toggle navigation</span>\n\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t</button>\n\t\t\t<a class=\"navbar-brand\" href=\"./\"><?php echo Flux::config('SiteTitle'); ?></a>\n\t\t</div>\n\t\t<div class=\"collapse navbar-collapse\">\n\t\t\t<ul class=\"nav navbar-nav\">\n\t\t\t\t<?php $menuItems = $this->getMenuItems(); ?>\n\t\t\t\t<?php if (!empty($menuItems)): ?>\n\t\t\t\t\t<?php foreach ($menuItems as $menuCategory => $menus): ?>\n\t\t\t\t\t\t<?php if (!empty($menus)): ?>\n\t\t\t\t\t\t\t<li class=\"dropdown\">\n\t\t\t\t\t\t\t<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><?php echo htmlspecialchars(Flux::message($menuCategory)) ?> <b class=\"caret\"></b></a>\n\t\t\t\t\t\t\t<ul class=\"dropdown-menu\">\n\t\t\t\t\t\t\t<?php foreach ($menus as $menuItem):  ?>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href=\"<?php echo $menuItem['url'] ?>\"><?php echo htmlspecialchars(Flux::message($menuItem['name'])) ?></a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t<?php endif ?>\n\n\t\t\t\t<?php $adminMenuItems = $this->getAdminMenuItems(); ?>\n\t\t\t\t<?php if (!empty($adminMenuItems) && Flux::config('AdminMenuNewStyle')): ?>\n\t\t\t\t\t\t\t<li class=\"dropdown\">\n\t\t\t\t\t\t\t<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">Admin Menu <b class=\"caret\"></b></a>\n\t\t\t\t\t\t\t<ul class=\"dropdown-menu\">\n\t\t\t\t\t\t\t<?php foreach ($adminMenuItems as $menuItem): ?>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href=\"<?php echo $this->url($menuItem['module'], $menuItem['action']) ?>\"><?php echo htmlspecialchars(Flux::message($menuItem['name'])) ?></a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t<?php endif ?>\n\n\t\t\t</ul>\n\t\t</div><!--/.nav-collapse -->\n\t</div>\n</div>\n"
  },
  {
    "path": "themes/bootstrap/manifest.php",
    "content": "<?php\nreturn array(\n\n\t// If view isn't found in this template it\n\t// will load the files from the inherited template\n\t// So basically, if you want to create a new theme, you don't\n\t// need to put all the files here again, just the modified views are enough.\n\t'inherit'     => 'default',\n\n\t// This data is not displayed anywhere.\n\t'author'      => 'Akkarinage',\n\t'version'     => '1.0',\n\t'description' => 'Bootstrap Theme for FluxCP',\n\t'website'     => 'http://rathena.org/board/'\n);\n?>\n"
  },
  {
    "path": "themes/default/account/cart.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/account/changemail.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('EmailChangeHeading')) ?></h2>\n\n<?php if (!empty($errorMessage)): ?>\n<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n\n<p><?php echo htmlspecialchars(Flux::message('EmailChangeInfo')) ?></p>\n\n<?php if (Flux::config('RequireChangeConfirm')): ?>\n<p><?php echo htmlspecialchars(Flux::message('EmailChangeInfo2')) ?></p>\n<?php endif ?>\n\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<th><label for=\"email\"><?php echo htmlspecialchars(Flux::message('EmailChangeLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"email\" id=\"email\" /></td>\n\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('EmailChangeInputNote')) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\" align=\"right\">\n\t\t\t\t<input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('EmailChangeButton')) ?>\" />\n\t\t\t</td>\n\t\t\t<td></td>\n\t\t</tr>\n\t</table>\n</form>\n"
  },
  {
    "path": "themes/default/account/changepass.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('PasswordChangeHeading')) ?></h2>\n<?php if (!empty($errorMessage)): ?>\n\t<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php else: ?>\n\t<p><?php echo htmlspecialchars(Flux::message('PasswordChangeInfo')) ?></p>\n<?php endif ?>\n<br />\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<th><label for=\"currentpass\"><?php echo htmlspecialchars(Flux::message('CurrentPasswordLabel')) ?></label></th>\n\t\t\t<td><input type=\"password\" name=\"currentpass\" id=\"currentpass\" value=\"\" /></td>\n\t\t\t<td rowspan=\"3\">\n\t\t\t\t<p><?php echo htmlspecialchars(Flux::message('PasswordChangeNote')) ?></p>\n\t\t\t\t<p class=\"important\"><?php echo htmlspecialchars(Flux::message('PasswordChangeNote2')) ?></p>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label for=\"newpass\"><?php echo htmlspecialchars(Flux::message('NewPasswordLabel')) ?></label></th>\n\t\t\t<td><input type=\"password\" name=\"newpass\" id=\"newpass\" value=\"\" /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label for=\"confirmnewpass\"><?php echo htmlspecialchars(Flux::message('NewPasswordConfirmLabel')) ?></label></th>\n\t\t\t<td><input type=\"password\" name=\"confirmnewpass\" id=\"confirmnewpass\" value=\"\" /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\" align=\"right\">\n\t\t\t\t<input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('PasswordChangeButton')) ?>\" />\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n</form>\n"
  },
  {
    "path": "themes/default/account/changesex.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('GenderChangeHeading')) ?></h2>\n<?php if ($cost): ?>\n<p>\n\t<?php printf(Flux::message('GenderChangeCost'), '<span class=\"remaining-balance\">'.number_format((int)$cost).'</span>') ?>\n\t<?php printf(Flux::message('GenderChangeBalance'), '<span class=\"remaining-balance\">'.number_format((int)$session->account->balance).'</span>') ?>\n</p>\n<?php if (!$hasNecessaryFunds): ?>\n<p><?php echo htmlspecialchars(Flux::message('GenderChangeNoFunds')) ?></p>\n<?php elseif ($auth->allowedToAvoidSexChangeCost): ?>\n<p><?php echo htmlspecialchars(Flux::message('GenderChangeNoCost')) ?></p>\n<?php endif ?>\n<?php endif ?>\n\n<?php if ($hasNecessaryFunds): ?>\n<?php if (empty($errorMessage)): ?>\n<p><strong><?php echo htmlspecialchars(Flux::message('NoteLabel')) ?>:</strong> <?php printf(Flux::message('GenderChangeCharInfo'), '<em>'.implode(', ', array_values($badJobs)).'</em>') ?>.</p>\n<h3><?php echo htmlspecialchars(Flux::message('GenderChangeSubHeading')) ?></h3>\n<?php else: ?>\n<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<input type=\"hidden\" name=\"changegender\" value=\"1\" />\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<p>\n\t\t\t\t\t<?php printf(Flux::message('GenderChangeFormText'), '<strong>'.strtolower($this->genderText($session->account->sex == 'M' ? 'F' : 'M')).'</strong>') ?>\n\t\t\t\t</p>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<p>\n\t\t\t\t\t<button type=\"submit\"\n\t\t\t\t\t\tonclick=\"return confirm('<?php echo str_replace(\"\\'\", \"\\\\'\", Flux::message('GenderChangeConfirm')) ?>')\">\n\t\t\t\t\t\t\t<strong><?php echo htmlspecialchars(Flux::message('GenderChangeButton')) ?></strong>\n\t\t\t\t\t</button>\n\t\t\t\t</p>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n</form>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/account/confirm.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/account/confirmemail.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/account/create.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('AccountCreateHeading')) ?></h2>\n<p><?php printf(htmlspecialchars(Flux::message('AccountCreateInfo')), '<a href=\"'.$this->url('service', 'tos').'\">'.Flux::message('AccountCreateTerms').'</a>') ?></p>\n<?php if (Flux::config('RequireEmailConfirm')): ?>\n<p><strong>Note:</strong> You will need to provide a working e-mail address to confirm your account before you can log-in.</p>\n<?php endif ?>\n<p><strong>Note:</strong> <?php echo sprintf(\"Your password must be between %d and %d characters.\", Flux::config('MinPasswordLength'), Flux::config('MaxPasswordLength')) ?></p>\n<?php if (Flux::config('PasswordMinUpper') > 0): ?>\n<p><strong>Note:</strong> <?php echo sprintf(Flux::message('PasswordNeedUpper'), Flux::config('PasswordMinUpper')) ?></p>\n<?php endif ?>\n<?php if (Flux::config('PasswordMinLower') > 0): ?>\n<p><strong>Note:</strong> <?php echo sprintf(Flux::message('PasswordNeedLower'), Flux::config('PasswordMinLower')) ?></p>\n<?php endif ?>\n<?php if (Flux::config('PasswordMinNumber') > 0): ?>\n<p><strong>Note:</strong> <?php echo sprintf(Flux::message('PasswordNeedNumber'), Flux::config('PasswordMinNumber')) ?></p>\n<?php endif ?>\n<?php if (Flux::config('PasswordMinSymbol') > 0): ?>\n<p><strong>Note:</strong> <?php echo sprintf(Flux::message('PasswordNeedSymbol'), Flux::config('PasswordMinSymbol')) ?></p>\n<?php endif ?>\n<?php if (!Flux::config('AllowUserInPassword')): ?>\n<p><strong>Note:</strong> <?php echo Flux::message('PasswordContainsUser') ?></p>\n<?php endif ?>\n<?php if (isset($errorMessage)): ?>\n<p class=\"red\" style=\"font-weight: bold\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<form action=\"<?php echo $this->url ?>\" method=\"post\" class=\"generic-form\">\n\t<?php if (count($serverNames) === 1): ?>\n\t<input type=\"hidden\" name=\"server\" value=\"<?php echo htmlspecialchars($session->loginAthenaGroup->serverName) ?>\">\n\t<?php endif ?>\n\t<table class=\"generic-form-table\">\n\t\t<?php if (count($serverNames) > 1): ?>\n\t\t<tr>\n\t\t\t<th><label for=\"register_server\"><?php echo htmlspecialchars(Flux::message('AccountServerLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<select name=\"server\" id=\"register_server\"<?php if (count($serverNames) === 1) echo ' disabled=\"disabled\"' ?>>\n\t\t\t\t<?php foreach ($serverNames as $serverName): ?>\n\t\t\t\t\t<option value=\"<?php echo htmlspecialchars($serverName) ?>\"<?php if ($params->get('server') == $serverName) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars($serverName) ?></option>\n\t\t\t\t<?php endforeach ?>\n\t\t\t\t</select>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php endif ?>\n\n\t\t<tr>\n\t\t\t<th><label for=\"register_username\"><?php echo htmlspecialchars(Flux::message('AccountUsernameLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"username\" id=\"register_username\" value=\"<?php echo htmlspecialchars($params->get('username') ?: '') ?>\" /></td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t<th><label for=\"register_password\"><?php echo htmlspecialchars(Flux::message('AccountPasswordLabel')) ?></label></th>\n\t\t\t<td><input type=\"password\" name=\"password\" id=\"register_password\" /></td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t<th><label for=\"register_confirm_password\"><?php echo htmlspecialchars(Flux::message('AccountPassConfirmLabel')) ?></label></th>\n\t\t\t<td><input type=\"password\" name=\"confirm_password\" id=\"register_confirm_password\" /></td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t<th><label for=\"register_email_address\"><?php echo htmlspecialchars(Flux::message('AccountEmailLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"email_address\" id=\"register_email_address\" value=\"<?php echo htmlspecialchars($params->get('email_address') ?: '') ?>\" /></td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t<th><label for=\"register_email_address\"><?php echo htmlspecialchars(Flux::message('AccountEmailLabel2')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"email_address2\" id=\"register_email_address2\" value=\"<?php echo htmlspecialchars($params->get('email_address2') ?: '') ?>\" /></td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t<th><label><?php echo htmlspecialchars(Flux::message('AccountGenderLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<p>\n\t\t\t\t\t<label><input type=\"radio\" name=\"gender\" id=\"register_gender_m\" value=\"M\"<?php if ($params->get('gender') === 'M') echo ' checked=\"checked\"' ?> /> <?php echo $this->genderText('M') ?></label>\n\t\t\t\t\t<label><input type=\"radio\" name=\"gender\" id=\"register_gender_f\" value=\"F\"<?php if ($params->get('gender') === 'F') echo ' checked=\"checked\"' ?> /> <?php echo $this->genderText('F') ?></label>\n\t\t\t\t\t<strong title=\"<?php echo htmlspecialchars(Flux::message('AccountCreateGenderInfo')) ?>\">?</strong>\n\t\t\t\t</p>\n\t\t\t</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t<th><label><?php echo htmlspecialchars(Flux::message('AccountBirthdateLabel')) ?></label></th>\n\t\t\t<td><?php echo $this->dateField('birthdate',null,0) ?></td>\n\t\t</tr>\n\n\t\t<?php if (Flux::config('UseCaptcha')): ?>\n\t\t<tr>\n\t\t\t<?php if (Flux::config('ReCaptchaPublicKey') === '...' || Flux::config('ReCaptchaPrivateKey') === '...'): ?>\n            <th><label for=\"register_security_code\"><?php echo htmlspecialchars(Flux::message('AccountSecurityLabel')) ?></label></th>\n\t\t\t<td><div class=\"no-recaptcha\" style=\"color: red\"><?php echo htmlspecialchars(Flux::message('AccountRecaptchaKey')) ?></div></td>\n\t\t\t<?php else: ?>\n\t\t\t<?php if (Flux::config('EnableReCaptcha')): ?>\n\t\t\t<th><label for=\"register_security_code\"><?php echo htmlspecialchars(Flux::message('AccountSecurityLabel')) ?></label></th>\n\t\t\t<td><div class=\"g-recaptcha\" data-theme = \"<?php echo $theme;?>\" data-sitekey=\"<?php echo $recaptcha ?>\"></div></td>\n\t\t\t<?php else: ?>\n\t\t\t<th><label for=\"register_security_code\"><?php echo htmlspecialchars(Flux::message('AccountSecurityLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<div class=\"security-code\">\n\t\t\t\t\t<img src=\"<?php echo $this->url('captcha') ?>\" />\n\t\t\t\t</div>\n\n\t\t\t\t<input type=\"text\" name=\"security_code\" id=\"register_security_code\" />\n\t\t\t\t<div style=\"font-size: smaller;\" class=\"action\">\n\t\t\t\t\t<strong><a href=\"javascript:refreshSecurityCode('.security-code img')\"><?php echo htmlspecialchars(Flux::message('RefreshSecurityCode')) ?></a></strong>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t\t<?php endif ?>\n\t\t\t<?php endif ?>\n\t\t</tr>\n\t\t<?php endif ?>\n\n\t\t<tr>\n\t\t\t<td></td>\n\t\t\t<td>\n\t\t\t\t<div style=\"margin-bottom: 5px\">\n\t\t\t\t\t<?php printf(htmlspecialchars(Flux::message('AccountCreateInfo2')), '<a href=\"'.$this->url('service', 'tos').'\">'.Flux::message('AccountCreateTerms').'</a>') ?>\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<button type=\"submit\"><strong><?php echo htmlspecialchars(Flux::message('AccountCreateButton')) ?></strong></button>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n</form>\n"
  },
  {
    "path": "themes/default/account/edit.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('AccountEditHeading')) ?></h2>\n<?php if ($account): ?>\n\t<?php if (!empty($errorMessage)): ?>\n\t\t<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n\t<?php endif ?>\n\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\">\n\t\t<table class=\"vertical-table\">\n\t\t\t<tr>\n\t\t\t\t<th><?php echo htmlspecialchars(Flux::message('UsernameLabel')) ?></th>\n\t\t\t\t<td><?php echo $account->userid ?></td>\n\t\t\t\t<th><?php echo htmlspecialchars(Flux::message('AccountIdLabel')) ?></th>\n\t\t\t\t<td><?php echo $account->account_id ?></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"email\"><?php echo htmlspecialchars(Flux::message('EmailAddressLabel')) ?></label></th>\n\t\t\t\t<td><input type=\"text\" name=\"email\" id=\"email\" value=\"<?php echo htmlspecialchars($account->email) ?>\" /></td>\n\t\t\t\t<?php if ($auth->allowedToEditAccountGroupID && !$isMine): ?>\n\t\t\t\t\t<th><label for=\"group_id\"><?php echo htmlspecialchars(Flux::message('AccountGroupIDLabel')) ?></label></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"group_id\" id=\"group_id\" value=\"<?php echo (int)$account->group_id ?>\" /></td>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<th><?php echo htmlspecialchars(Flux::message('AccountGroupIDLabel')) ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"group_id\" value=\"<?php echo (int)$account->group_id ?>\" />\n\t\t\t\t\t\t<?php echo number_format((int)$account->group_id) ?>\n\t\t\t\t\t</td>\n\t\t\t\t<?php endif ?>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"gender\"><?php echo htmlspecialchars(Flux::message('GenderLabel')) ?></label></th>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"gender\" id=\"gender\">\n\t\t\t\t\t\t<option value=\"M\"<?php if ($account->sex == 'M') echo ' selected=\"selected\"' ?>><?php echo $this->genderText('M') ?></option>\n\t\t\t\t\t\t<option value=\"F\"<?php if ($account->sex == 'F') echo ' selected=\"selected\"' ?>><?php echo $this->genderText('F') ?></option>\n\t\t\t\t\t</select>\n\t\t\t\t</td>\n\t\t\t\t<th><?php echo htmlspecialchars(Flux::message('AccountStateLabel')) ?></th>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if (($state = $this->accountStateText($account->state)) && !$account->unban_time): ?>\n\t\t\t\t\t\t<?php echo $state ?>\n\t\t\t\t\t<?php elseif ($account->unban_time): ?>\n\t\t\t\t\t\t<span class=\"account-state state-banned\">\n\t\t\t\t\t\t\tBanned Until\n\t\t\t\t\t\t\t<?php echo htmlspecialchars(date(Flux::config('DateTimeFormat'), $account->unban_time)) ?>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"account-state state-unknown\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"logincount\"><?php echo htmlspecialchars(Flux::message('LoginCountLabel')) ?></label></th>\n\t\t\t\t<td><input type=\"text\" name=\"logincount\" id=\"logincount\" value=\"<?php echo (int)$account->logincount ?>\" /></td>\n\t\t\t\t<?php if ($auth->allowedToEditAccountBalance): ?>\n\t\t\t\t\t<th><label for=\"balance\"><?php echo htmlspecialchars(Flux::message('CreditBalanceLabel')) ?></label></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"balance\" id=\"balance\" value=\"<?php echo (int)$account->balance ?>\" /></td>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<th><?php echo htmlspecialchars(Flux::message('CreditBalanceLabel')) ?></th>\n\t\t\t\t\t<td><?php echo number_format((int)$account->balance) ?></td>\n\t\t\t\t<?php endif ?>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"use_birthdate\"><?php echo htmlspecialchars(Flux::message('AccountBirthdateLabel')) ?></label></th>\n\t\t\t\t<td colspan=\"3\">\n\t\t\t\t\t<input type=\"checkbox\" name=\"use_birthdate\" id=\"use_birthdate\" />\n\t\t\t\t\t<?php echo $this->dateField('birthdate', $account->birthdate) ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"use_lastlogin\"><?php echo htmlspecialchars(Flux::message('LastLoginDateLabel')) ?></label></th>\n\t\t\t\t<td colspan=\"3\">\n\t\t\t\t\t<input type=\"checkbox\" name=\"use_lastlogin\" id=\"use_lastlogin\" />\n\t\t\t\t\t<?php echo $this->dateTimeField('lastlogin', $account->lastlogin) ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"use_vip_time\"><?php echo htmlspecialchars(Flux::message('VIPTimeDateLabel')) ?></label></th>\n\t\t\t\t<td colspan=\"3\">\n\t\t\t\t\tYou will need to login via the client to change the VIP time.\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"last_ip\"><?php echo htmlspecialchars(Flux::message('LastUsedIpLabel')) ?></label></th>\n\t\t\t\t<td colspan=\"3\"><input type=\"text\" name=\"last_ip\" id=\"last_ip\" value=\"<?php echo htmlspecialchars($account->last_ip) ?>\" /></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"4\" align=\"right\">\n\t\t\t\t\t<input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('AccountEditButton')) ?>\" />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t</form>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('AccountEditNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/account/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Accounts</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\"><?php echo htmlspecialchars(Flux::message('SearchLabel')) ?></a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module')) ?>\n\t<p>\n\t\t<label for=\"account_id\"><?php echo htmlspecialchars(Flux::message('AccountIdLabel')) ?>:</label>\n\t\t<input type=\"text\" name=\"account_id\" id=\"account_id\" value=\"<?php echo htmlspecialchars($params->get('account_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"username\"><?php echo htmlspecialchars(Flux::message('UsernameLabel')) ?>:</label>\n\t\t<input type=\"text\" name=\"username\" id=\"username\" value=\"<?php echo htmlspecialchars($params->get('username') ?: '') ?>\" />\n\t\t<?php if ($searchPassword): ?>\n\t\t...\n\t\t<label for=\"password\"><?php echo htmlspecialchars(Flux::message('PasswordLabel')) ?>:</label>\n\t\t<input type=\"text\" name=\"password\" id=\"password\" value=\"<?php echo htmlspecialchars($params->get('password') ?: '') ?>\" />\n\t\t<?php endif ?>\n\t\t...\n\t\t<label for=\"email\"><?php echo htmlspecialchars(Flux::message('EmailAddressLabel')) ?>:</label>\n\t\t<input type=\"text\" name=\"email\" id=\"email\" value=\"<?php echo htmlspecialchars($params->get('email') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"last_ip\"><?php echo htmlspecialchars(Flux::message('LastUsedIpLabel')) ?>:</label>\n\t\t<input type=\"text\" name=\"last_ip\" id=\"last_ip\" value=\"<?php echo htmlspecialchars($params->get('last_ip') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"gender\"><?php echo htmlspecialchars(Flux::message('GenderLabel')) ?>:</label>\n\t\t<select name=\"gender\" id=\"gender\">\n\t\t\t<option value=\"\"<?php if (!in_array($gender=$params->get('gender'), array('M', 'F'))) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('AllLabel')) ?></option>\n\t\t\t<option value=\"M\"<?php if ($gender == 'M') echo ' selected=\"selected\"' ?>><?php echo $this->genderText('M') ?></option>\n\t\t\t<option value=\"F\"<?php if ($gender == 'F') echo ' selected=\"selected\"' ?>><?php echo $this->genderText('F') ?></option>\n\t\t</select>\n\t</p>\n\t<p>\n\t\t<label for=\"account_state\"><?php echo htmlspecialchars(Flux::message('AccountStateLabel')) ?>:</label>\n\t\t<select name=\"account_state\" id=\"account_state\">\n\t\t\t<option value=\"\"<?php if (!($account_state=$params->get('account_state'))) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('AllLabel')) ?></option>\n\t\t\t<option value=\"normal\"<?php if ($account_state == 'normal') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('AccountStateNormal')) ?></option>\n\t\t\t<option value=\"pending\"<?php if ($account_state == 'pending') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('AccountStatePending')) ?></option>\n\t\t\t<option value=\"banned\"<?php if ($account_state == 'banned') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('AccountStateTempBanLbl')) ?></option>\n\t\t\t<option value=\"permabanned\"<?php if ($account_state == 'permabanned') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('AccountStatePermBanned')) ?></option>\n\t\t</select>\n\t\t...\n\t\t<label for=\"account_group_id\"><?php echo htmlspecialchars(Flux::message('AccountGroupIDLabel')) ?>:</label>\n\t\t<select name=\"account_group_id_op\">\n\t\t\t<option value=\"eq\"<?php if (($account_group_id_op=$params->get('account_group_id_op')) == 'eq') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('IsEqualToLabel')) ?></option>\n\t\t\t<option value=\"gt\"<?php if ($account_group_id_op == 'gt') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('IsGreaterThanLabel')) ?></option>\n\t\t\t<option value=\"lt\"<?php if ($account_group_id_op == 'lt') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('IsLessThanLabel')) ?></option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"account_group_id\" id=\"account_group_id\" value=\"<?php echo htmlspecialchars($params->get('account_group_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"balance\"><?php echo htmlspecialchars(Flux::message('CreditBalanceLabel')) ?>:</label>\n\t\t<select name=\"balance_op\">\n\t\t\t<option value=\"eq\"<?php if (($balance_op=$params->get('balance_op')) == 'eq') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('IsEqualToLabel')) ?></option>\n\t\t\t<option value=\"gt\"<?php if ($balance_op == 'gt') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('IsGreaterThanLabel')) ?></option>\n\t\t\t<option value=\"lt\"<?php if ($balance_op == 'lt') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('IsLessThanLabel')) ?></option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"balance\" id=\"balance\" value=\"<?php echo htmlspecialchars($params->get('balance') ?: '') ?>\" />\n\t</p>\n\t<p>\n\t\t<label for=\"logincount\"><?php echo htmlspecialchars(Flux::message('LoginCountLabel')) ?>:</label>\n\t\t<select name=\"logincount_op\">\n\t\t\t<option value=\"eq\"<?php if (($logincount_op=$params->get('logincount_op')) == 'eq') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('IsEqualToLabel')) ?></option>\n\t\t\t<option value=\"gt\"<?php if ($logincount_op == 'gt') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('IsGreaterThanLabel')) ?></option>\n\t\t\t<option value=\"lt\"<?php if ($logincount_op == 'lt') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('IsLessThanLabel')) ?></option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"logincount\" id=\"logincount\" value=\"<?php echo htmlspecialchars($params->get('logincount') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"use_birthdate_after\"><?php echo htmlspecialchars(Flux::message('BirthdateBetweenLabel')) ?>:</label>\n\t\t<input type=\"checkbox\" name=\"use_birthdate_after\" id=\"use_birthdate_after\"<?php if ($params->get('use_birthdate_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('birthdate_after') ?>\n\t\t<label for=\"use_birthdate_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_birthdate_before\" id=\"use_birthdate_before\"<?php if ($params->get('use_birthdate_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('birthdate_before') ?>\n\t</p>\n\t<p>\n\t\t<label for=\"use_last_login_after\"><?php echo htmlspecialchars(Flux::message('LoginBetweenLabel')) ?>:</label>\n\t\t<input type=\"checkbox\" name=\"use_last_login_after\" id=\"use_last_login_after\"<?php if ($params->get('use_last_login_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('last_login_after') ?>\n\t\t<label for=\"use_last_login_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_last_login_before\" id=\"use_last_login_before\"<?php if ($params->get('use_last_login_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('last_login_before') ?>\t\t\n\t\t\n\t\t<input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('SearchButton')) ?>\" />\n\t\t<input type=\"button\" value=\"<?php echo htmlspecialchars(Flux::message('ResetButton')) ?>\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($accounts): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('login.account_id', Flux::message('AccountIdLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('login.userid', Flux::message('UsernameLabel')) ?></th>\n\t\t<?php if ($showPassword): ?><th><?php echo $paginator->sortableColumn('login.user_pass', Flux::message('PasswordLabel')) ?></th><?php endif ?>\n\t\t<th><?php echo $paginator->sortableColumn('login.sex', Flux::message('GenderLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('group_id', Flux::message('AccountGroupIDLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('state', Flux::message('AccountStateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('balance', Flux::message('CreditBalanceLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('login.email', Flux::message('EmailAddressLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('logincount', Flux::message('LoginCountLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('birthdate', Flux::message('AccountBirthdateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('lastlogin', Flux::message('LastLoginDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('last_ip', Flux::message('LastUsedIpLabel')) ?></th>\n\t\t<!-- <th><?php echo $paginator->sortableColumn('reg_date', 'Register Date') ?></th> -->\n\t</tr>\n\t<?php foreach ($accounts as $account): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t<?php echo $this->linkToAccount($account->account_id, $account->account_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($account->account_id) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo htmlspecialchars($account->userid) ?></td>\n\t\t<?php if ($showPassword): ?><td><?php echo htmlspecialchars($account->user_pass) ?></td><?php endif ?>\n\t\t<td>\n\t\t\t<?php if ($gender = $this->genderText($account->sex)): ?>\n\t\t\t\t<?php echo htmlspecialchars($gender) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo (int)$account->group_id ?></td>\n\t\t<td>\n\t\t\t<?php if (!$account->confirmed && $account->confirm_code): ?>\n\t\t\t\t<span class=\"account-state state-pending\">\n\t\t\t\t\t<?php echo htmlspecialchars(Flux::message('AccountStatePending')) ?>\n\t\t\t\t</span>\n\t\t\t<?php elseif (($state = $this->accountStateText($account->state)) && !$account->unban_time): ?>\n\t\t\t\t<?php echo $state ?>\n\t\t\t<?php elseif ($account->unban_time): ?>\n\t\t\t\t<span class=\"account-state state-banned\">\n\t\t\t\t\t<?php echo htmlspecialchars(sprintf(Flux::message('AccountStateTempBanned'), date(Flux::config('DateTimeFormat'), $account->unban_time))) ?>\n\t\t\t\t</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"account-state state-unknown\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo number_format((int)$account->balance) ?></td>\n\t\t<td>\n\t\t\t<?php if ($account->email): ?>\n\t\t\t\t<?php echo $this->linkToAccountSearch(array('email' => $account->email), $account->email) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo number_format((int)$account->logincount) ?></td>\n\t\t<td><?php echo $account->birthdate ?></td>\n\t\t<td>\n\t\t\t<?php if (!$account->lastlogin || $account->lastlogin <= '1000-01-01 00:00:00'): ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NeverLabel')) ?></span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $this->formatDateTime($account->lastlogin) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($account->last_ip): ?>\n\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $account->last_ip), $account->last_ip) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<!-- <td>\n\t\t\t<?php if (!$account->reg_date || $account->reg_date <= '1000-01-01 00:00:00'): ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $this->formatDateTime($account->reg_date) ?>\n\t\t\t<?php endif ?>\n\t\t</td> -->\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('AccountIndexNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/account/login.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('LoginHeading')) ?></h2>\n<?php if (isset($errorMessage)): ?>\n<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php else: ?>\n\n<?php if ($auth->actionAllowed('account', 'create')): ?>\n<p><?php printf(Flux::message('LoginPageMakeAccount'), $this->url('account', 'create')); ?></p>\n<?php endif ?>\n\n<?php endif ?>\n<form action=\"<?php echo $this->url('account', 'login', array('return_url' => $params->get('return_url'))) ?>\" method=\"post\" class=\"generic-form\">\n\t<?php if (count($serverNames) === 1): ?>\n\t<input type=\"hidden\" name=\"server\" value=\"<?php echo htmlspecialchars($session->loginAthenaGroup->serverName) ?>\">\n\t<?php endif ?>\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<th><label for=\"login_username\"><?php echo htmlspecialchars(Flux::message('AccountUsernameLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"username\" id=\"login_username\" value=\"<?php echo htmlspecialchars($params->get('username') ?: '') ?>\" /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label for=\"login_password\"><?php echo htmlspecialchars(Flux::message('AccountPasswordLabel')) ?></label></th>\n\t\t\t<td><input type=\"password\" name=\"password\" id=\"login_password\" /></td>\n\t\t</tr>\n\t\t<?php if (count($serverNames) > 1): ?>\n\t\t<tr>\n\t\t\t<th><label for=\"login_server\"><?php echo htmlspecialchars(Flux::message('AccountServerLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<select name=\"server\" id=\"login_server\"<?php if (count($serverNames) === 1) echo ' disabled=\"disabled\"' ?>>\n\t\t\t\t\t<?php foreach ($serverNames as $serverName): ?>\n\t\t\t\t\t<option value=\"<?php echo htmlspecialchars($serverName) ?>\"><?php echo htmlspecialchars($serverName) ?></option>\n\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t</select>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<?php if (Flux::config('UseLoginCaptcha')): ?>\n\t\t<tr>\n\t\t\t<?php if (Flux::config('EnableReCaptcha')): ?>\n\t\t\t<th><label for=\"register_security_code\"><?php echo htmlspecialchars(Flux::message('AccountSecurityLabel')) ?></label></th>\n\t\t\t<td><div class=\"g-recaptcha\" data-theme = \"<?php echo $theme;?>\" data-sitekey=\"<?php echo $recaptcha ?>\"></div></td>\n\t\t\t<?php else: ?>\n\t\t\t<th><label for=\"register_security_code\"><?php echo htmlspecialchars(Flux::message('AccountSecurityLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<div class=\"security-code\">\n\t\t\t\t\t<img src=\"<?php echo $this->url('captcha') ?>\" />\n\t\t\t\t</div>\n\t\t\t\t<input type=\"text\" name=\"security_code\" id=\"register_security_code\" />\n\t\t\t\t<div style=\"font-size: smaller;\" class=\"action\">\n\t\t\t\t\t<strong><a href=\"javascript:refreshSecurityCode('.security-code img')\"><?php echo htmlspecialchars(Flux::message('RefreshSecurityCode')) ?></a></strong>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t\t<?php endif ?>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<tr>\n\t\t\t<td></td>\n\t\t\t<td>\n\t\t\t\t<input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('LoginButton')) ?>\" />\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n</form>\n"
  },
  {
    "path": "themes/default/account/logout.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('LogoutHeading')) ?></h2>\n<p><strong><?php echo htmlspecialchars(Flux::message('LogoutInfo')) ?></strong> <?php printf(Flux::message('LogoutInfo2'), $metaRefresh['location']) ?></p>\n"
  },
  {
    "path": "themes/default/account/prune.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/account/resend.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('ResendHeading')) ?></h2>\n<?php if (!empty($errorMessage)): ?>\n<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<p><?php echo htmlspecialchars(Flux::message('ResendInfo')) ?></p>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<table class=\"generic-form-table\">\n\t\t<?php if (count($serverNames) > 1): ?>\n\t\t<tr>\n\t\t\t<th><label for=\"login\"><?php echo htmlspecialchars(Flux::message('ResendServerLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<select name=\"login\" id=\"login\"<?php if (count($serverNames) === 1) echo ' disabled=\"disabled\"' ?>>\n\t\t\t\t<?php foreach ($serverNames as $serverName): ?>\n\t\t\t\t\t<option value=\"<?php echo htmlspecialchars($serverName) ?>\"<?php if ($params->get('server') == $serverName) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars($serverName) ?></option>\n\t\t\t\t<?php endforeach ?>\n\t\t\t\t</select>\n\t\t\t</td>\n\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('ResendServerInfo')) ?></p></td>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<tr>\n\t\t\t<th><label for=\"userid\"><?php echo htmlspecialchars(Flux::message('ResendAccountLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"userid\" id=\"userid\" /></td>\n\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('ResendAccountInfo')) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label for=\"email\"><?php echo htmlspecialchars(Flux::message('ResendEmailLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"email\" id=\"email\" /></td>\n\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('ResendEmailInfo')) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('ResendButton')) ?>\" /></td>\n\t\t\t<td></td>\n\t\t</tr>\n\t</table>\n</form>\n"
  },
  {
    "path": "themes/default/account/resetpass.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('ResetPassTitle')) ?></h2>\n<?php if (!empty($errorMessage)): ?>\n<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<p><?php echo htmlspecialchars(Flux::message('ResetPassInfo')) ?></p>\n<p><?php echo htmlspecialchars(Flux::message('ResetPassInfo2')) ?></p>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<table class=\"generic-form-table\">\n\t\t<?php if (count($serverNames) > 1): ?>\n\t\t<tr>\n\t\t\t<th><label for=\"login\"><?php echo htmlspecialchars(Flux::message('ResetPassServerLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<select name=\"login\" id=\"login\"<?php if (count($serverNames) === 1) echo ' disabled=\"disabled\"' ?>>\n\t\t\t\t<?php foreach ($serverNames as $serverName): ?>\n\t\t\t\t\t<option value=\"<?php echo htmlspecialchars($serverName) ?>\"<?php if ($params->get('server') == $serverName) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars($serverName) ?></option>\n\t\t\t\t<?php endforeach ?>\n\t\t\t\t</select>\n\t\t\t</td>\n\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('ResetPassServerInfo')) ?></p></td>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<tr>\n\t\t\t<th><label for=\"userid\"><?php echo htmlspecialchars(Flux::message('ResetPassAccountLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"userid\" id=\"userid\" /></td>\n\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('ResetPassAccountInfo')) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label for=\"email\"><?php echo htmlspecialchars(Flux::message('ResetPassEmailLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"email\" id=\"email\" /></td>\n\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('ResetPassEmailInfo')) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('ResetPassButton')) ?>\" /></td>\n\t\t\t<td></td>\n\t\t</tr>\n\t</table>\n</form>\n"
  },
  {
    "path": "themes/default/account/resetpw.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Reset Password</h2>\n"
  },
  {
    "path": "themes/default/account/transfer.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('TransferHeading')) ?></h2>\n<?php if (!empty($errorMessage)): ?>\n\t<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<?php if ($session->account->balance): ?>\n<h3><?php printf(htmlspecialchars(Flux::message('TransferSubHeading')), $server->serverName) ?></h3>\n<p><?php printf(Flux::message('TransferInfo'), '<span class=\"remaining-balance\">'.number_format($session->account->balance).'</span>') ?></p>\n<p><?php echo htmlspecialchars(Flux::message('TransferInfo2')) ?></p>\n<form action=\"<?php echo $this->url ?>\" method=\"post\" class=\"generic-form\">\n\t<?php echo $this->moduleActionFormInputs('account', 'transfer') ?>\n\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<th><label for=\"credits\"><?php echo htmlspecialchars(Flux::message('TransferAmountLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"credits\" id=\"credits\" value=\"<?php echo htmlspecialchars($params->get('credits') ?: '') ?>\" /></td>\n\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('TransferAmountInfo')) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label for=\"char_name\"><?php echo htmlspecialchars(Flux::message('TransferCharNameLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"char_name\" id=\"char_name\" value=\"<?php echo htmlspecialchars($params->get('char_name') ?: '') ?>\" /></td>\n\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('TransferCharNameInfo')) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\" align=\"right\">\n\t\t\t\t<button type=\"submit\"\n\t\t\t\t\tonclick=\"return confirm('<?php echo htmlspecialchars(str_replace(\"'\", \"\\\\'\", Flux::message('TransferConfirm'))) ?>')\">\n\t\t\t\t\t<strong><?php echo htmlspecialchars(Flux::message('TransferButton')) ?></strong>\n\t\t\t\t</button>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n</form>\n<?php else: ?>\n<p><?php echo htmlspecialchars(Flux::message('TransferNoCredits')) ?></p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/account/view.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('AccountViewHeading')) ?></h2>\n<?php if (!empty($errorMessage)): ?>\n<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<?php if ($account): ?>\n<?php if (Flux::config('PincodeEnabled') && $session->account->pincode == NULL): ?>\n\t<p class=\"red\">There is no pincode set! Please login via the game client now to secure your account.</p>\n<?php endif ?>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('UsernameLabel')) ?></th>\n\t\t<td><?php echo htmlspecialchars($account->userid) ?></td>\n\t\t<th><?php echo htmlspecialchars(Flux::message('AccountIdLabel')) ?></th>\n\t\t<td>\n\t\t\t<?php if ($auth->allowedToSeeAccountID): ?>\n\t\t\t\t<?php echo $account->account_id ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NotApplicableLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('EmailAddressLabel')) ?></th>\n\t\t<td>\n\t\t\t<?php if ($account->email): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t\t<?php echo $this->linkToAccountSearch(array('email' => $account->email), $account->email) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($account->email) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th><?php echo htmlspecialchars(Flux::message('AccountGroupIDLabel')) ?></th>\n\t\t<td><?php echo (int)$account->group_id ?></td>\n\t</tr>\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('GenderLabel')) ?></th>\n\t\t<td>\n\t\t\t<?php if ($gender = $this->genderText($account->sex)): ?>\n\t\t\t\t<?php echo $gender ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th><?php echo htmlspecialchars(Flux::message('AccountStateLabel')) ?></th>\n\t\t<td>\n\t\t\t<?php if (!$account->confirmed && $account->confirm_code): ?>\n\t\t\t\t<span class=\"account-state state-pending\">\n\t\t\t\t\t<?php echo htmlspecialchars(Flux::message('AccountStatePending')) ?>\n\t\t\t\t</span>\n\t\t\t<?php elseif (($state = $this->accountStateText($account->state)) && !$account->unban_time): ?>\n\t\t\t\t<?php echo $state ?>\n\t\t\t<?php elseif ($account->unban_time): ?>\n\t\t\t\t<span class=\"account-state state-banned\">\n\t\t\t\t\t<?php printf(htmlspecialchars(Flux::message('AccountStateTempBanned')), date(Flux::config('DateTimeFormat'), $account->unban_time)) ?>\n\t\t\t\t</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"account-state state-unknown\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('LoginCountLabel')) ?></th>\n\t\t<td><?php echo number_format((int)$account->logincount) ?></td>\n\t\t<th><?php echo htmlspecialchars(Flux::message('CreditBalanceLabel')) ?></th>\n\t\t<td>\n\t\t\t<?php echo number_format((int)$account->balance) ?>\n\t\t\t<?php if ($auth->allowedToDonate && $isMine): ?>\n\t\t\t\t<a href=\"<?php echo $this->url('donate') ?>\"><?php echo htmlspecialchars(Flux::message('AccountViewDonateLink')) ?></a>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('AccountBirthdateLabel')) ?></th>\n\t\t<td><?php echo $account->birthdate ?></td>\n\t\t<th><?php echo htmlspecialchars(Flux::message('VIPStateLabel')) ?></th>\n\t\t<td>\n\t\t\t<?php echo $vipexpires ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('LastLoginDateLabel')) ?></th>\n\t\t<td colspan=\"3\">\n\t\t\t<?php if (!$account->lastlogin || $account->lastlogin <= '1000-01-01 00:00:00'): ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NeverLabel')) ?></span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $this->formatDateTime($account->lastlogin) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('LastUsedIpLabel')) ?></th>\n\t\t<td colspan=\"3\">\n\t\t\t<?php if ($account->last_ip): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $account->last_ip), $account->last_ip) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($account->last_ip) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php $banconfirm=htmlspecialchars(str_replace(\"'\", \"\\\\'\", Flux::message('AccountBanConfirm'))) ?>\n\t<?php if ($showTempBan): ?>\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('AccountViewTempBanLabel')) ?></th>\n\t\t<td colspan=\"3\">\n\t\t\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\">\n\t\t\t\t<input type=\"hidden\" name=\"tempban\" value=\"1\" />\n\t\t\t\t<label><?php echo htmlspecialchars(Flux::message('AccountBanReasonLabel')) ?><br /><textarea name=\"reason\" class=\"block reason\"></textarea></label>\n\t\t\t\t<label><?php echo htmlspecialchars(Flux::message('AccountBanUntilLabel')) ?></label>\n\t\t\t\t<?php echo $this->dateTimeField('tempban', date('H:i:s')); ?>\n\t\t\t\t<input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('AccountTempBanButton')) ?>\"\n\t\t\t\t\tonclick=\"return confirm('<?php echo $banconfirm ?>')\" />\n\t\t\t</form>\n\t\t</td>\n\t</tr>\n\t<?php endif ?>\n\t<?php if ($showPermBan): ?>\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('AccountViewPermBanLabel')) ?></th>\n\t\t<td colspan=\"3\">\n\t\t\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\">\n\t\t\t\t<input type=\"hidden\" name=\"permban\" value=\"1\" />\n\t\t\t\t<label><?php echo htmlspecialchars(Flux::message('AccountBanReasonLabel')) ?><br /><textarea name=\"reason\" class=\"block reason\"></textarea></label>\n\t\t\t\t<input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('AccountPermBanButton')) ?>\"\n\t\t\t\t\tonclick=\"return confirm('<?php echo $banconfirm ?>')\" />\n\t\t\t</form>\n\t\t</td>\n\t</tr>\n\t<?php endif ?>\n\t<?php if ($showUnban): ?>\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('AccountViewUnbanLabel')) ?></th>\n\t\t<td colspan=\"3\">\n\t\t\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\">\n\t\t\t\t<input type=\"hidden\" name=\"unban\" value=\"1\" />\n\t\t\t<?php if ($tempBanned && $auth->allowedToTempUnbanAccount): ?>\n\t\t\t\t<label><?php echo htmlspecialchars(Flux::message('AccountBanReasonLabel')) ?><br /><textarea name=\"reason\" class=\"block reason\"></textarea></label>\n\t\t\t\t<input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('AccountTempUnbanButton')) ?>\" />\n\t\t\t<?php elseif ($permBanned && $auth->allowedToPermUnbanAccount): ?>\n\t\t\t\t<label><?php echo htmlspecialchars(Flux::message('AccountBanReasonLabel')) ?><br /><textarea name=\"reason\" class=\"block reason\"></textarea></label>\n\t\t\t\t<input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('AccountPermUnbanButton')) ?>\" />\n\t\t\t<?php endif ?>\n\t\t\t</form>\n\t\t</td>\n\t</tr>\n\t<?php endif ?>\n</table>\n\n<?php if ($auth->allowedToViewAccountBanLog && $banInfo): ?>\n<h3><?php echo htmlspecialchars(sprintf(Flux::message('AccountBanLogSubHeading'), $account->userid)) ?></h3>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('BanLogBanTypeLabel')) ?></th>\n\t\t<th><?php echo htmlspecialchars(Flux::message('BanLogBanDateLabel')) ?></th>\n\t\t<th><?php echo htmlspecialchars(Flux::message('BanLogBanReasonLabel')) ?></th>\n\t\t<th><?php echo htmlspecialchars(Flux::message('BanLogBannedByLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($banInfo as $ban): ?>\n\t<tr>\n\t\t<td align=\"right\"><?php echo htmlspecialchars($this->banTypeText($ban->ban_type)) ?></td>\n\t\t<td><?php echo htmlspecialchars($this->formatDateTime($ban->ban_date)) ?></td>\n\t\t<td><?php echo nl2br(htmlspecialchars($ban->ban_reason)) ?></td>\n\t\t<td>\n\t\t\t<?php if ($ban->userid): ?>\n\t\t\t\t<?php if ($auth->allowedToViewAccount): ?>\n\t\t\t\t\t<?php echo $this->linkToAccount($ban->banned_by, $ban->userid) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($ban->userid) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<strong><?php echo htmlspecialchars(Flux::message('BanLogBannedByCP')) ?></strong>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php endif ?>\n\n<?php foreach ($characters as $serverName => $chars): $zeny = 0; ?>\n\t<h3><?php echo htmlspecialchars(sprintf(Flux::message('AccountViewCharSubHead'), $serverName)) ?></h3>\n\t<?php if ($chars): ?>\n\t<table class=\"vertical-table\">\n\t\t<tr>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('AccountViewSlotLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('AccountViewCharLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('AccountViewClassLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('AccountViewLvlLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('AccountViewJlvlLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('AccountViewZenyLabel')) ?></th>\n\t\t\t<th colspan=\"2\"><?php echo htmlspecialchars(Flux::message('AccountViewGuildLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('AccountViewStatusLabel')) ?></th>\n\t\t\t<?php if (($isMine || $auth->allowedToModifyCharPrefs) && $auth->actionAllowed('character', 'prefs')): ?>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('AccountViewPrefsLabel')) ?></th>\n\t\t\t<?php endif ?>\n            <th><?php echo htmlspecialchars(Flux::message('ResetLook')) ?></th>\n\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('ResetMap')) ?></th>\n\t\t</tr>\n\t\t<?php foreach ($chars as $char): $zeny += $char->zeny; ?>\n\t\t<tr>\n\t\t\t<td align=\"right\"><?php echo $char->char_num+1 ?></td>\n\t\t\t<td>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && ($isMine || (!$isMine && $auth->allowedToViewCharacter))): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($char->char_id, $char->name, $serverName) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td><?php echo htmlspecialchars($this->jobClassText($char->class)) ?></td>\n\t\t\t<td><?php echo (int)$char->base_level ?></td>\n\t\t\t<td><?php echo (int)$char->job_level ?></td>\n\t\t\t<td><?php echo number_format((int)$char->zeny) ?></td>\n\t\t\t<?php if ($char->guild_name): ?>\n\t\t\t\t<?php if ($char->emblem): ?>\n\t\t\t\t<td><img src=\"<?php echo $this->emblem($char->guild_id) ?>\" /></td>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<td<?php if (!$char->emblem) echo ' colspan=\"2\"' ?>>\n\t\t\t\t\t<?php if ($auth->actionAllowed('guild', 'view')): ?>\n\t\t\t\t\t\t<?php echo $this->linkToGuild($char->guild_id, $char->guild_name) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo htmlspecialchars($char->guild_name) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t<?php else: ?>\t\n\t\t\t\t<td colspan=\"2\" align=\"center\"><span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span></td>\n\t\t\t<?php endif ?>\n\t\t\t<td>\n\t\t\t\t<?php if ($char->online): ?>\n\t\t\t\t\t<span class=\"online\"><?php echo htmlspecialchars(Flux::message('OnlineLabel')) ?></span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"offline\"><?php echo htmlspecialchars(Flux::message('OfflineLabel')) ?></span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<?php if (($isMine || $auth->allowedToModifyCharPrefs) && $auth->actionAllowed('character', 'prefs')): ?>\n\t\t\t<td>\n\t\t\t\t<a href=\"<?php echo $this->url('character', 'prefs', array('id' => $char->char_id)) ?>\"\n\t\t\t\t\tclass=\"block-link\">\n\t\t\t\t\t<?php echo htmlspecialchars(Flux::message('CharModifyPrefsLink')) ?>\n\t\t\t\t</a>\n\t\t\t</td>\n\t\t\t<?php endif ?>\n            <td>\n\t\t\t\t<a href=\"<?php echo $this->url('character', 'resetlook', array('id' => $char->char_id)) ?>\"\n\t\t\t\t\tclass=\"block-link\">\n\t\t\t\t\t<?php echo htmlspecialchars(Flux::message('Reset Look')) ?>\n\t\t\t\t</a>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<a href=\"<?php echo $this->url('character', 'resetpos', array('id' => $char->char_id)) ?>\"\n\t\t\t\t\tclass=\"block-link\">\n\t\t\t\t\t<?php echo htmlspecialchars(Flux::message('Reset Position')) ?>\n\t\t\t\t</a>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t\t</table>\n\t\t<p>Total Zeny: <strong><?php echo number_format($zeny) ?></strong></p>\n\t<?php else: ?>\n\t<p><?php echo htmlspecialchars(sprintf(Flux::message('AccountViewNoChars'), $serverName)) ?></p>\n\t<?php endif ?>\n<?php endforeach ?>\n\n<h3><?php echo htmlspecialchars(sprintf(Flux::message('AccountViewStorage'), $account->userid)) ?></h3>\n<?php if ($items): ?>\n\t<p><?php echo htmlspecialchars(sprintf(Flux::message('AccountViewStorageCount'), $account->userid, count($items))) ?></p>\n\t<table class=\"vertical-table\">\n\t\t<tr>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemIdLabel')) ?></th>\n\t\t\t<th colspan=\"2\"><?php echo htmlspecialchars(Flux::message('ItemNameLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemAmountLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemIdentifyLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemBrokenLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemCard0Label')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemCard1Label')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemCard2Label')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemCard3Label')) ?></th>\n\t\t\t<?php if($server->isRenewal): ?>\n\t\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemRandOptionsLabel')) ?></th>\n\t\t\t<?php endif ?>\n\t\t\t<th>Extra</th>\n\t\t\t</th>\n\t\t</tr>\n\t\t<?php foreach ($items AS $item): ?>\n\t\t<?php $icon = $this->iconImage($item->nameid) ?>\n\t\t<tr>\n\t\t\t<td align=\"right\">\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($item->nameid, $item->nameid) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($item->nameid) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<?php if ($icon): ?>\n\t\t\t<td><img src=\"<?php echo htmlspecialchars($icon) ?>\" /></td>\n\t\t\t<?php endif ?>\n\t\t\t<td<?php if (!$icon) echo ' colspan=\"2\"' ?><?php if ($item->cardsOver) echo ' class=\"overslotted' . $item->cardsOver . '\"'; else echo ' class=\"normalslotted\"' ?>>\n\t\t\t\t<?php if ($item->refine > 0): ?>\n\t\t\t\t\t+<?php echo htmlspecialchars($item->refine) ?>\n\t\t\t\t<?php endif ?>\n                <?php if ($item->card0 == 255 && intval($item->card1/1280) > 0): ?>\n                    <?php $itemcard1 = intval($item->card1/1280); ?>\n\t\t\t\t\t<?php for ($i = 0; $i < $itemcard1; $i++): ?>\n\t\t\t\t\t\tVery\n\t\t\t\t\t<?php endfor ?>\n\t\t\t\t\tStrong\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($item->card0 == 254 || $item->card0 == 255): ?>\n\t\t\t\t\t<?php if ($item->char_name): ?>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && ($isMine || (!$isMine && $auth->allowedToViewCharacter))): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToCharacter($item->char_id, $item->char_name, $session->serverName) . \"'s\" ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($item->char_name . \"'s\") ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>'s\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($item->card0 == 255 && array_key_exists($item->card1%1280, $itemAttributes)): ?>\n\t\t\t\t\t<?php echo htmlspecialchars($itemAttributes[$item->card1%1280]) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($item->name_english): ?>\n\t\t\t\t\t<span class=\"item_name\"><?php echo htmlspecialchars($item->name_english) ?></span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($item->slots): ?>\n\t\t\t\t\t<?php echo htmlspecialchars(' [' . $item->slots . ']') ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td><?php echo number_format($item->amount) ?></td>\n\t\t\t<td>\n\t\t\t\t<?php if ($item->identify): ?>\n\t\t\t\t\t<span class=\"identified yes\"><?php echo htmlspecialchars(Flux::message('YesLabel')) ?></span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"identified no\"><?php echo htmlspecialchars(Flux::message('NoLabel')) ?></span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if ($item->attribute): ?>\n\t\t\t\t\t<span class=\"broken yes\"><?php echo htmlspecialchars(Flux::message('YesLabel')) ?></span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"broken no\"><?php echo htmlspecialchars(Flux::message('NoLabel')) ?></span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($item->card0 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cards[$item->card0])): ?>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card0, $cards[$item->card0]) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($cards[$item->card0]) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card0, $item->card0) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($item->card0) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($item->card1 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cards[$item->card1])): ?>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card1, $cards[$item->card1]) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($cards[$item->card1]) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card1, $item->card1) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($item->card1) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($item->card2 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cards[$item->card2])): ?>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card2, $cards[$item->card2]) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($cards[$item->card2]) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card2, $item->card2) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($item->card2) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($item->card3 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cards[$item->card3])): ?>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card3, $cards[$item->card3]) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($cards[$item->card3]) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card3, $item->card3) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($item->card3) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<?php if($server->isRenewal): ?>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if($item->rndopt): ?>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<?php foreach($item->rndopt as $rndopt) echo \"<li>\".$this->itemRandOption($rndopt[0], $rndopt[1]).\"</li>\"; ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t<?php endif ?>\n\t\t\t<td>\n\t\t\t<?php if($item->bound == 1):?>\n\t\t\t\tAccount Bound\n\t\t\t<?php elseif($item->bound == 2):?>\n\t\t\t\tGuild Bound\n\t\t\t<?php elseif($item->bound == 3):?>\n\t\t\t\tParty Bound\n\t\t\t<?php elseif($item->bound == 4):?>\n\t\t\t\tCharacter Bound\n\t\t\t<?php else:?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t</table>\n<?php else: ?>\n\t<p><?php echo htmlspecialchars(Flux::message('AccountViewNoStorage')) ?></p>\n<?php endif ?>\n\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('AccountViewNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/account/xferlog.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('XferLogHeading')) ?></h2>\n<h3><?php echo htmlspecialchars(Flux::message('XferLogReceivedSubHead')) ?></h3>\n<?php if ($incomingXfers): ?>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('XferLogCreditsLabel')) ?></th>\n\t\t<th><?php echo htmlspecialchars(Flux::message('XferLogFromLabel')) ?></th>\n\t\t<th><?php echo htmlspecialchars(Flux::message('XferLogDateLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($incomingXfers as $xfer): ?>\n\t<tr>\n\t\t<td align=\"right\"><?php echo number_format($xfer->amount) ?></td>\n\t\t<td><?php echo htmlspecialchars($xfer->from_email) ?></td>\n\t\t<td><?php echo $this->formatDateTime($xfer->transfer_date) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php else: ?>\n<p><?php echo htmlspecialchars(Flux::message('XferLogNotReceived')) ?></p>\n<?php endif ?>\n\n<h3><?php echo htmlspecialchars(Flux::message('XferLogSentSubHead')) ?></h3>\n<?php if ($outgoingXfers): ?>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('XferLogCreditsLabel')) ?></th>\n\t\t<th><?php echo htmlspecialchars(Flux::message('XferLogCharNameLabel')) ?></th>\n\t\t<th><?php echo htmlspecialchars(Flux::message('XferLogDateLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($outgoingXfers as $xfer): ?>\n\t<tr>\n\t\t<td align=\"right\"><?php echo number_format($xfer->amount) ?></td>\n\t\t<td>\n\t\t\t<?php if ($xfer->target_char_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($xfer->target_char_id, $xfer->target_char_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($xfer->target_char_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars($xfer->target_char_id) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $this->formatDateTime($xfer->transfer_date) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php else: ?>\n<p><?php echo htmlspecialchars(Flux::message('XferLogNotSent')) ?></p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/auction/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Auction</h2>\n"
  },
  {
    "path": "themes/default/buyingstore/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Buyers</h2>\n\n<?php if ($stores): ?>\n\t<?php echo $paginator->infoText() ?>\n\t<table class=\"horizontal-table\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th><?php echo $paginator->sortableColumn('id', 'Buyer ID') ?></th>\n\t\t\t\t<th> <?php echo $paginator->sortableColumn('char_name', 'Buyer Name') ?></th>\n\t\t\t\t<th>Title</th>\n\t\t\t\t<th><?php echo $paginator->sortableColumn('map', 'Map') ?></th>\n\t\t\t\t<th>X</th>\n\t\t\t\t<th>Y</th>\n\t\t\t\t<th>Gender</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<?php foreach ($stores as $store): ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"50\" align=\"right\" style=\"\">\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('buyingstore', 'viewshop')): ?>\n\t\t\t\t\t\t\t<a href=\"<?php echo $this->url('buyingstore', 'viewshop', array(\"id\" => $store->id)); ?>\"><?php echo $store->id; ?></a>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo $store->id ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style=\"font-weight:bold;\">\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToCharacter($store->char_id, $store->char_name); ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo $store->char_name; ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t</td>\n\n\t\t\t\t\t<td>\n\t\t\t\t\t  <img src=\"<?php echo $this->iconImage(671) ?>?nocache=<?php echo rand() ?>\" />\n\t\t\t\t\t <?php if ($auth->actionAllowed('buyingstore', 'viewshop')): ?>\n\t\t\t\t\t\t\t<a href=\"<?php echo $this->url('buyingstore', 'viewshop', array(\"id\" => $store->id)); ?>\"><?php echo htmlspecialchars($store->title); ?></a>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($store->title) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t</td>\n\n\t\t\t\t\t<td style=\"color:blue;\">\n\t\t\t\t\t\t<?php echo $store->map ?>\n\t\t\t\t\t</td>\n\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php echo $store->x ?>\n\t\t\t\t\t</td>\n\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php echo $store->y ?>\n\t\t\t\t\t</td>\n\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php echo $store->sex ?>\n\t\t\t\t\t</td>\n\n\t\t\t\t</tr>\n\n\t\t\t<?php endforeach ?>\n\t\t</tbody>\n\t</table>\n\t<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n\t<p>No Buyers found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/buyingstore/viewshop.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars($title); ?></h2>\n<?php if ($store): ?>\n\t<h3 style=\"text-align:right; margin:0; padding:0;font-style: italic\"><img style=\"position:relative;top:7px;\" src=\"<?php echo $this->iconImage(671) ?>?nocache=<?php echo rand() ?>\" /> <?php echo htmlspecialchars($store->title) ?> </h3>\n\t<h4 style=\"text-align:right; color:blue; margin:0; margin-bottom:15px; \"> <?php echo $store->map; ?>, <?php echo $store->x; ?>, <?php echo $store->y; ?> </h4>\n\n\t<?php if ($items): ?>\n\t\t<table class=\"horizontal-table\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>ID</th>\n\t\t\t\t\t<th>Name</th>\n\t\t\t\t\t<th>Price</th>\n\t\t\t\t\t<th>Amount</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<?php foreach ($items as $item): ?>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"50\" align=\"right\" style=\"\">\n\t\t\t\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t\t\t\t<a href=\"<?php echo $this->url('item', 'view', array(\"id\" => $item->nameid)); ?>\"><?php echo $item->nameid; ?></a>\n\t\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t\t<?php echo $item->nameid ?>\n\t\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<img src=\"<?php echo $this->iconImage($item->nameid) ?>?nocache=<?php echo rand() ?>\" />\n\t\t\t\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t\t\t\t<a href=\"<?php echo $this->url('item', 'view', array(\"id\" => $item->nameid)); ?>\"><?php echo $item->item_name; ?></a>\n\t\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t\t<?php echo $item->item_name ?>\n\t\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t\t\t<?php if ($item->char_name): ?>\n\t\t\t\t\t\t\t\tOf <?php echo $item->char_name ?>\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td style=\"color:goldenrod; text-shadow:1px 1px 0px brown;\">\n\t\t\t\t\t\t\t<?php echo number_format($item->price, 0, ',', ' '); ?> z\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<?php echo $item->amount ?>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t<?php endforeach ?>\n\t\t\t</tbody>\n\t\t</table>\n\t<?php else: ?>\n\t\t<p>No Items found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n\t<?php endif ?>\n<?php else: ?>\n\t<p>No Buyer found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/captcha/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/castle/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Castles</h2>\n<p>This page shows what castles are activated and which guilds own them.</p>\n<?php if ($castles): ?>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Castle ID</th>\n\t\t<th>Castle</th>\n\t\t<th colspan=\"2\">Guild</th>\n\t\t<th>Economy</th>\n\t</tr>\n\t<?php foreach ($castles as $castle): ?>\n\t\t<tr>\n\t\t\t<td align=\"right\"><?php echo htmlspecialchars($castle->castle_id) ?></td>\n\t\t\t<td><?php echo htmlspecialchars($castleNames[$castle->castle_id]) ?></td>\n\t\t\t<?php if ($castle->guild_name): ?>\n\t\t\t\t<?php if ($castle->emblem): ?>\n\t\t\t\t\t<td width=\"24\"><img src=\"<?php echo $this->emblem($castle->guild_id) ?>\" /></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToGuild($castle->guild_id, $castle->guild_name) ?>\n\t\t\t\t\t\t\t<td><?php echo $castle->economy; ?></td>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($castle->guild_name) ?>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t</td>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<td colspan=\"2\"><?php echo htmlspecialchars($castle->guild_name) ?></td>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<td colspan=\"2\"><span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span></td>\n\t\t\t<?php endif ?>\n\t\t</tr>\n\t\t\n\t<?php endforeach ?>\n</table>\n<?php else: ?>\n<p>No castles found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/character/changeslot.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Change Character Slot</h2>\n<?php if (!empty($errorMessage)): ?>\n<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<input type=\"hidden\" name=\"changeslot\" value=\"1\" />\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<th><label>Character Name</label></th>\n\t\t\t<td><div><?php echo htmlspecialchars($char->name) ?></div></td>\n\t\t\t<td></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label for=\"slot\">Slot Number</label></th>\n\t\t\t<td><input type=\"text\" name=\"slot\" id=\"slot\"\n\t\t\t\t\tsize=\"<?php echo strlen($server->maxCharSlots) * 2 ?>\"\n\t\t\t\t\tvalue=\"<?php echo (int)$char->char_num + 1 ?>\"\n\t\t\t\t\tmaxlength=\"<?php echo strlen($server->maxCharSlots) ?>\" /></td>\n\t\t\t<td><p>You may input a slot number between 1 and <?php echo (int)$server->maxCharSlots ?>.</p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"Change Slot\" /></td>\n\t\t\t<td></td>\n\t\t</tr>\n\t</table>\n</form>\n"
  },
  {
    "path": "themes/default/character/divorce.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('DivorceHeading')) ?></h2>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<input type=\"hidden\" name=\"divorce\" value=\"1\" />\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<p>\n\t\t\t\t<?php echo htmlspecialchars(sprintf(Flux::message('DivorceText1'), $char->name)) ?>\n\t\t\t\t<?php if (!Flux::config('DivorceKeepChild')) echo htmlspecialchars(sprintf(Flux::message('DivorceText2'), $char->name)) ?>\n\t\t\t\t<?php if (!Flux::config('DivorceKeepRings')) echo htmlspecialchars(Flux::message('DivorceText3')) ?>\n\t\t\t\t</p>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td><button type=\"submit\"><strong><?php echo htmlspecialchars(Flux::message('DivorceButton')) ?></strong></button></td>\n\t\t</tr>\n\t</table>\n</form>\n"
  },
  {
    "path": "themes/default/character/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Characters</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module')) ?>\n\t<p>\n\t\t<label for=\"char_id\">Character ID:</label>\n\t\t<input type=\"text\" name=\"char_id\" id=\"char_id\" value=\"<?php echo htmlspecialchars($params->get('char_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"account\">Account:</label>\n\t\t<input type=\"text\" name=\"account\" id=\"account\" value=\"<?php echo htmlspecialchars($params->get('account') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"char_name\">Character:</label>\n\t\t<input type=\"text\" name=\"char_name\" id=\"char_name\" value=\"<?php echo htmlspecialchars($params->get('char_name') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"char_class\">Job Class:</label>\n\t\t<input type=\"text\" name=\"char_class\" id=\"char_class\" value=\"<?php echo htmlspecialchars($params->get('char_class') ?: '') ?>\" />\n\t</p>\n\t<p>\n\t\t<label for=\"base_level\">Base Level:</label>\n\t\t<select name=\"base_level_op\">\n\t\t\t<option value=\"eq\"<?php if (($base_level_op=$params->get('base_level_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($base_level_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($base_level_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"base_level\" id=\"base_level\" value=\"<?php echo htmlspecialchars($params->get('base_level') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"job_level\">Job Level:</label>\n\t\t<select name=\"job_level_op\">\n\t\t\t<option value=\"eq\"<?php if (($job_level_op=$params->get('job_level_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($job_level_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($job_level_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"job_level\" id=\"job_level\" value=\"<?php echo htmlspecialchars($params->get('job_level') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"zeny\">Zeny:</label>\n\t\t<select name=\"zeny_op\">\n\t\t\t<option value=\"eq\"<?php if (($zeny_op=$params->get('zeny_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($zeny_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($zeny_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"zeny\" id=\"zeny\" value=\"<?php echo htmlspecialchars($params->get('zeny') ?: '') ?>\" />\n\t</p>\n\t<p>\n\t\t<label for=\"guild\">Guild:</label>\n\t\t<input type=\"text\" name=\"guild\" id=\"guild\" value=\"<?php echo htmlspecialchars($params->get('guild') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"partner\">Partner:</label>\n\t\t<input type=\"text\" name=\"partner\" id=\"partner\" value=\"<?php echo htmlspecialchars($params->get('partner') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"mother\">Mother:</label>\n\t\t<input type=\"text\" name=\"mother\" id=\"mother\" value=\"<?php echo htmlspecialchars($params->get('mother') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"father\">Father:</label>\n\t\t<input type=\"text\" name=\"father\" id=\"father\" value=\"<?php echo htmlspecialchars($params->get('father') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"child\">Child:</label>\n\t\t<input type=\"text\" name=\"child\" id=\"child\" value=\"<?php echo htmlspecialchars($params->get('child') ?: '') ?>\" />\n\t</p>\n\t<p>\t\n\t\t<label for=\"online\">Online Status:</label>\n\t\t<select name=\"online\" id=\"online\">\n\t\t\t<option value=\"\"<?php if (!($online=$params->get('online'))) echo ' selected=\"selected\"' ?>>All</option>\n\t\t\t<option value=\"on\"<?php if ($online == 'on') echo ' selected=\"selected\"' ?>>Online</option>\n\t\t\t<option value=\"off\"<?php if ($online == 'off') echo ' selected=\"selected\"' ?>>Offline</option>\n\t\t</select>\n\t\t...\n\t\t<label for=\"slot\">Slot Number:</label>\n\t\t<select name=\"slot_op\">\n\t\t\t<option value=\"eq\"<?php if (($slot_op=$params->get('slot_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($slot_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($slot_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"slot\" id=\"slot\" value=\"<?php echo htmlspecialchars($params->get('slot') ?: '') ?>\" />\n\t\t\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($characters): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('ch.char_id', 'Character ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('userid', 'Account') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_name', 'Character') ?></th>\n\t\t<th>Job Class</th>\n\t\t<th><?php echo $paginator->sortableColumn('ch.base_level', 'Base Level') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ch.job_level', 'Job Level') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ch.zeny', 'Zeny') ?></th>\n\t\t<th colspan=\"2\"><?php echo $paginator->sortableColumn('guild_name', 'Guild') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('partner_name', 'Partner') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('mother_name', 'Mother') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('father_name', 'Father') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('child_name', 'Child') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ch.online', 'Online') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ch.char_num', 'Slot') ?></th>\n\t</tr>\n\t<?php foreach ($characters as $char): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t<?php echo $this->linkToCharacter($char->char_id, $char->char_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($char->char_id) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t<?php echo $this->linkToAccount($char->account_id, $char->userid) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($char->userid) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo htmlspecialchars($char->char_name) ?></td>\n\t\t<td>\n\t\t\t<?php if ($job=$this->jobClassText($char->class)): ?>\n\t\t\t\t<?php echo htmlspecialchars($job) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo number_format((int)$char->base_level) ?></td>\n\t\t<td><?php echo number_format((int)$char->job_level) ?></td>\n\t\t<td><?php echo number_format((int)$char->zeny) ?></td>\n\t\t<?php if ($char->guild_name): ?>\n\t\t\t<?php if ($char->emblem): ?>\n\t\t\t<td width=\"24\"><img src=\"<?php echo $this->emblem($char->guild_id) ?>\" /></td>\n\t\t\t<?php endif ?>\n\t\t\t<td<?php if (!$char->emblem) echo ' colspan=\"2\"' ?>>\n\t\t\t\t<?php if ($auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild): ?>\n\t\t\t\t\t<?php echo $this->linkToGuild($char->guild_id, $char->guild_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->guild_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t<?php else: ?>\n\t\t\t<td colspan=\"2\" align=\"center\"><span class=\"not-applicable\">None</span></td>\n\t\t<?php endif ?>\n\t\t<td>\n\t\t\t<?php if ($char->partner_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($char->partner_id, $char->partner_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->partner_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($char->mother_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($char->mother_id, $char->mother_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->mother_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($char->father_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($char->father_id, $char->father_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->father_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($char->child_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($char->child_id, $char->child_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->child_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($char->online): ?>\n\t\t\t\t<span class=\"online\">Online</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"offline\">Offline</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $char->char_num + 1 ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>No characters found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/character/mapstats.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Map Statistics</h2>\n<?php if ($maps): ?>\n<?php $playerTotal = 0; foreach ($maps as $map) $playerTotal += $map->player_count ?>\n<p>This page shows how many online players are located a specific map, for all maps that have <em>any</em> online players at all.</p>\n<p><strong><?php echo number_format($playerTotal) ?></strong> online player(s) were found\ndistributed across <strong><?php echo number_format(count($maps)) ?></strong> map(s).</p>\n<div class=\"generic-form-div\">\n\t<table class=\"generic-form-table\">\n\t\t<?php foreach ($maps as $map): ?>\n\t\t<tr>\n\t\t\t<td align=\"right\"><p class=\"important\"><strong><?php echo htmlspecialchars(basename($map->map_name, '.gat')) ?></strong></p></td>\n\t\t\t<td><p><strong><em><?php echo number_format($map->player_count) ?></em></strong> player(s)</p></td>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t</table>\n</div>\n<?php else: ?>\n<p>No players found on any maps. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/character/online.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Who's Online?</h2>\n<h3>Showing players on-line <?php echo htmlspecialchars($server->serverName) ?>.</h3>\n<?php if ($auth->allowedToSearchWhosOnline): ?>\n\t<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n\t<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t\t<?php echo $this->moduleActionFormInputs($params->get('module'), $params->get('action')) ?>\n\t\t<p>\n\t\t\t<label for=\"char_name\">Character Name:</label>\n\t\t\t<input type=\"text\" name=\"char_name\" id=\"char_name\" value=\"<?php echo htmlspecialchars($params->get('char_name') ?: '') ?>\" />\n\t\t\t...\n\t\t\t<label for=\"char_class\">Job Class:</label>\n\t\t\t<input type=\"text\" name=\"char_class\" id=\"char_class\" value=\"<?php echo htmlspecialchars($params->get('char_class') ?: '') ?>\" />\n\t\t\t...\n\t\t\t<label for=\"guild_name\">Guild:</label>\n\t\t\t<input type=\"text\" name=\"guild_name\" id=\"guild_name\" value=\"<?php echo htmlspecialchars($params->get('guild_name') ?: '') ?>\" />\n\n\t\t\t<input type=\"submit\" value=\"Search\" />\n\t\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t\t</p>\n\t</form>\n<?php endif ?>\n<?php if ($chars): ?>\n<?php echo $paginator->infoText() ?>\n\n<?php if ($hiddenCount): ?>\n<p><?php echo number_format($hiddenCount) ?> <?php echo ((int)$hiddenCount === 1) ? 'person has' : 'people have' ?> chosen to hide themselves from this list.</p>\n<?php endif ?>\n\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('char_name', 'Character Name') ?></th>\n\t\t<th>Job Class</th>\n\t\t<th><?php echo $paginator->sortableColumn('base_level', 'Base Level') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('job_level', 'Job Level') ?></th>\n\t\t<th colspan=\"2\"><?php echo $paginator->sortableColumn('guild_name', 'Guild') ?></th>\n\t\t<?php if ($auth->allowedToViewOnlinePosition): ?>\n\t\t\t<th><?php echo $paginator->sortableColumn('last_map', 'Map') ?></th>\n\t\t<?php else: ?>\n\t\t\t<th>Map</th>\n\t\t<?php endif ?>\n\t</tr>\n\t<?php foreach ($chars as $char): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t<?php echo $this->linkToCharacter($char->char_id, $char->char_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($char->char_name) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $this->jobClassText($char->char_class) ?></td>\n\t\t<td><?php echo number_format($char->base_level) ?></td>\n\t\t<td><?php echo number_format($char->job_level) ?></td>\n\t\t<?php if ($char->guild_name): ?>\n\t\t\t<?php if ($char->emblem): ?>\n\t\t\t<td width=\"20\"><img src=\"<?php echo $this->emblem($char->guild_id) ?>\" /></td>\n\t\t\t<?php endif ?>\n\t\t\t<td<?php if (!$char->emblem) echo ' colspan=\"2\"' ?>>\n\t\t\t\t<?php if ($auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild): ?>\n\t\t\t\t\t<?php echo $this->linkToGuild($char->guild_id, $char->guild_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->guild_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t<?php else: ?>\n\t\t\t<td colspan=\"2\"><span class=\"not-applicable\">None</span></td>\n\t\t<?php endif ?>\n\t\t\n\t\t<td>\n\t\t<?php if (!$char->hidemap && $auth->allowedToViewOnlinePosition): ?>\n\t\t\t<?php echo htmlspecialchars(basename($char->last_map, '.gat')) ?>\n\t\t<?php else: ?>\n\t\t\t<span class=\"not-applicable\">Hidden</span>\n\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>No characters found on <?php echo htmlspecialchars($server->serverName) ?>. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/character/prefs.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Preferences</h2>\n<?php if ($char): ?>\n<?php if (!empty($errorMessage)): ?>\n<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<h3>Viewing character preferences for “<?php echo ($charName=htmlspecialchars($char->name))  ?>” on <?php echo htmlspecialchars($server->serverName) ?></h3>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<input type=\"hidden\" name=\"charprefs\" value=\"1\" />\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<th><label for=\"hide_from_whos_online\">Hide Character From \"Who's Online\"</label></th>\n\t\t\t<td><input type=\"checkbox\" name=\"hide_from_whos_online\" id=\"hide_from_whos_online\"<?php if ($hideFromWhosOnline) echo ' checked=\"checked\"' ?> /></td>\n\t\t\t<td><p>This will hide <?php echo $charName ?> altogether from the \"Who's Online\" page.</p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label for=\"hide_map_from_whos_online\">Hide Current Map From \"Who's Online\"</label></th>\n\t\t\t<td><input type=\"checkbox\" name=\"hide_map_from_whos_online\" id=\"hide_map_from_whos_online\"<?php if ($hideMapFromWhosOnline) echo ' checked=\"checked\"' ?> /></td>\n\t\t\t<td><p>This will hide <?php echo $charName ?>'s current location from the \"Who's Online\" page.</p></td>\n\t\t</tr>\n\t\t<?php if ($auth->allowedToHideFromZenyRank): ?>\n\t\t<tr>\n\t\t\t<th><label for=\"hide_from_zeny_ranking\">Hide Character From \"Zeny Ranking\"</label></th>\n\t\t\t<td><input type=\"checkbox\" name=\"hide_from_zeny_ranking\" id=\"hide_from_zeny_ranking\"<?php if ($hideFromZenyRanking) echo ' checked=\"checked\"' ?> /></td>\n\t\t\t<td><p>This will hide <?php echo $charName ?> from the \"Zeny Ranking\" page.</p></td>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<tr>\n\t\t\t<td align=\"right\"><p><input type=\"submit\" value=\"Modify Preferences\" /></p></td>\n\t\t\t<td colspan=\"2\"></td>\n\t\t</tr>\n\t</table>\n</form>\n<?php else: ?>\n<p>No such character found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/character/resetlook.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/character/resetpos.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/character/view.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Viewing Character</h2>\n<?php if ($char): ?>\n<h3>Character Information for <?php echo htmlspecialchars($char->char_name) ?></h3>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<?php if ($image=$this->jobImage($char->gender, $char->char_class)): ?>\n\t\t\t<td rowspan=\"11\" style=\"width: 150px; text-align: center; vertical-alignment: middle\">\n\t\t\t\t<img src=\"<?php echo $image ?>\" />\n\t\t\t</td>\n\t\t<?php endif ?>\n\t\t<th>Character ID</th>\n\t\t<td colspan=\"2\"><?php echo htmlspecialchars($char->char_id) ?></td>\n\t\t<th>Account ID</th>\n\t\t<td>\n\t\t\t<?php if ($auth->allowedToSeeAccountID): ?>\n\t\t\t\t<?php echo htmlspecialchars($char->char_account_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Not Applicable</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th>Character Slot</th>\n\t\t<td><?php echo number_format($char->char_num+1) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Character</th>\n\t\t<td colspan=\"2\"><?php echo htmlspecialchars($char->char_name) ?></td>\n\t\t<th>Account</th>\n\t\t<td>\n\t\t\t<?php if ($isMine): ?>\n\t\t\t\t<a href=\"<?php echo $this->url('account', 'view') ?>\"><?php echo htmlspecialchars($char->userid) ?></a>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $this->linkToAccount($char->char_account_id, $char->userid) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th>Job Class</th>\n\t\t<td>\n\t\t\t<?php if ($job=$this->jobClassText($char->char_class)): ?>\n\t\t\t\t<?php echo htmlspecialchars($job) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Base Level</th>\n\t\t<td colspan=\"2\"><?php echo number_format((int)$char->char_base_level) ?></td>\n\t\t<th>B. Experience</th>\n\t\t<td><?php echo number_format($char->char_base_exp) ?></td>\n\t\t<th>Partner</th>\n\t\t<td>\n\t\t\t<?php if ($char->partner_name): ?>\n\t\t\t\t<?php if ($auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($char->partner_id, $char->partner_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->partner_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Job Level</th>\n\t\t<td colspan=\"2\"><?php echo number_format((int)$char->char_job_level) ?></td>\n\t\t<th>J. Experience</th>\n\t\t<td><?php echo number_format($char->char_job_exp) ?></td>\n\t\t<th>Child</th>\n\t\t<td>\n\t\t\t<?php if ($char->child_name): ?>\n\t\t\t\t<?php if ($auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($char->child_id, $char->child_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->child_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Current HP</th>\n\t\t<td colspan=\"2\"><?php echo number_format((int)$char->char_hp) ?></td>\n\t\t<th>Max HP</th>\n\t\t<td><?php echo number_format((int)$char->char_max_hp) ?></td>\n\t\t<th>Mother</th>\n\t\t<td>\n\t\t\t<?php if ($char->mother_name): ?>\n\t\t\t\t<?php if ($auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($char->mother_id, $char->mother_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->mother_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Current SP</th>\n\t\t<td colspan=\"2\"><?php echo number_format((int)$char->char_sp) ?></td>\n\t\t<th>Max SP</th>\n\t\t<td><?php echo number_format((int)$char->char_max_sp) ?></td>\n\t\t<th>Father</th>\n\t\t<td>\n\t\t\t<?php if ($char->father_name): ?>\n\t\t\t\t<?php if ($auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($char->father_id, $char->father_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->father_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Zeny</th>\n\t\t<td colspan=\"2\"><?php echo number_format((int)$char->char_zeny) ?></td>\n\t\t<th>Status Points</th>\n\t\t<td><?php echo number_format((int)$char->char_status_point) ?></td>\n\t\t<th>Skill Points</th>\n\t\t<td><?php echo number_format((int)$char->char_skill_point) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Guild Name</th>\n\t\t\t<?php if ($char->guild_name): ?>\n\t\t\t\t<?php if ($char->emblem): ?>\n\t\t\t\t<td><img src=\"<?php echo $this->emblem($char->guild_id) ?>\" /></td>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<td<?php if (!$char->emblem) echo ' colspan=\"2\"' ?>>\n\t\t\t\t\t<?php if ($auth->actionAllowed('guild', 'view')): ?>\n\t\t\t\t\t\t<?php echo $this->linkToGuild($char->guild_id, $char->guild_name) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo htmlspecialchars($char->guild_name) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t<?php else: ?>\t\n\t\t\t\t<td colspan=\"2\"><span class=\"not-applicable\">None</span></td>\n\t\t\t<?php endif ?>\n\t\t<th>Guild Position</th>\n\t\t<td>\n\t\t\t<?php if ($char->guild_position): ?>\n\t\t\t\t<?php echo htmlspecialchars($char->guild_position) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th>Tax Level</th>\n\t\t<td><?php echo number_format($char->guild_tax) ?>%</td>\n\t</tr>\n\t<tr>\n\t\t<th>Party Name</th>\n\t\t<td colspan=\"2\">\n\t\t\t<?php if ($char->party_name): ?>\n\t\t\t\t<?php echo htmlspecialchars($char->party_name) ?>\n\t\t\t<?php else: ?>\t\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th>Party Leader</th>\n\t\t<td>\n\t\t\t<?php if ($char->party_leader_name): ?>\n\t\t\t\t<?php if ($auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($char->party_leader_id, $char->party_leader_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($char->party_leader_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\t\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th>Pet</th>\n\t\t<td>\n\t\t\t<?php if ($char->pet_name): ?>\n\t\t\t\t<?php echo htmlspecialchars($char->pet_name) ?>\n\t\t\t\t(<?php echo htmlspecialchars($char->pet_mob_name) ?>)\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Death Count</th>\n\t\t<td colspan=\"2\"><?php echo number_format((int)$char->death_count) ?></td>\n\t\t<th>Online Status</th>\n\t\t<td>\n\t\t\t<?php if ($char->char_online): ?>\n\t\t\t\t<span class=\"online\">Online</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"offline\">Offline</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th>Homunculus</th>\n\t\t<td>\n\t\t\t<?php if ($char->homun_name): ?>\n\t\t\t\t<?php echo htmlspecialchars($char->homun_name) ?>\n\t\t\t\t(<?php echo htmlspecialchars($this->homunClassText($char->homun_class)) ?>)\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Character Stats</th>\n\t\t<td colspan=\"6\">\n\t\t\t<table class=\"character-stats\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td><span class=\"stat-name\">STR</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$char->char_str) ?></span></td>\n\t\t\t\t\t<td><span class=\"stat-name\">AGI</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$char->char_agi) ?></span></td>\n\t\t\t\t\t<td><span class=\"stat-name\">VIT</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$char->char_vit) ?></span></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><span class=\"stat-name\">INT</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$char->char_int) ?></span></td>\n\t\t\t\t\t<td><span class=\"stat-name\">DEX</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$char->char_dex) ?></span></td>\n\t\t\t\t\t<td><span class=\"stat-name\">LUK</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$char->char_luk) ?></span></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n</table>\n<?php if ($char->party_name): ?>\n<h3>Other Party Members of <?php echo htmlspecialchars($char->party_name) ?></h3>\n\t<?php if ($partyMembers): ?>\n\t\t<p><?php echo htmlspecialchars($char->party_name) ?> has <?php echo count($partyMembers) ?> other party member(s) besides <?php echo htmlspecialchars($char->char_name) ?>.</p>\n\t\t<table class=\"vertical-table\">\n\t\t\t<tr>\n\t\t\t\t<th>Character Name</th>\n\t\t\t\t<th>Job Class</th>\n\t\t\t\t<th>Base Level</th>\n\t\t\t\t<th>Job Level</th>\n\t\t\t\t<th colspan=\"2\">Guild</th>\n\t\t\t\t<th>Status</th>\n\t\t\t</tr>\n\t\t\t<?php foreach ($partyMembers as $partyMember): ?>\n\t\t\t<tr>\n\t\t\t\t<td align=\"right\">\n\t\t\t\t\t<?php if ($auth->allowedToViewCharacter): ?>\n\t\t\t\t\t\t<?php echo $this->linkToCharacter($partyMember->char_id, $partyMember->name) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo htmlspecialchars($partyMember->name) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if ($job=$this->jobClassText($partyMember->class)): ?>\n\t\t\t\t\t\t<?php echo htmlspecialchars($job) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t\t<td><?php echo number_format((int)$partyMember->base_level) ?></td>\n\t\t\t\t<td><?php echo number_format((int)$partyMember->job_level) ?></td>\n\t\t\t\t<?php if ($partyMember->guild_name): ?>\n\t\t\t\t\t<?php if ($partyMember->emblem): ?>\n\t\t\t\t\t\t<td width=\"24\"><img src=\"<?php echo $this->emblem($partyMember->guild_id) ?>\" /></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<?php if (($auth->actionAllowed('guild', 'view') && $partyMember->guild_id == $char->guild_id) || $auth->allowedToViewGuild): ?>\n\t\t\t\t\t\t\t\t<?php echo $this->linkToGuild($partyMember->guild_id, $partyMember->guild_name) ?>\n\t\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t\t<?php echo htmlspecialchars($partyMember->guild_name) ?>\n\t\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t\t<?php if (($auth->actionAllowed('guild', 'view') && $partyMember->guild_id == $char->guild_id) || $auth->allowedToViewGuild): ?>\n\t\t\t\t\t\t\t\t<?php echo $this->linkToGuild($partyMember->guild_id, $partyMember->guild_name) ?>\n\t\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t\t<?php echo htmlspecialchars($partyMember->guild_name) ?>\n\t\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\t\n\t\t\t\t\t<td colspan=\"2\" align=\"center\"><span class=\"not-applicable\">None</span></td>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if ($partyMember->online): ?>\n\t\t\t\t\t\t<span class=\"online\">Online</span>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"offline\">Offline</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<?php endforeach ?>\n\t\t</table>\n\t<?php else: ?>\n\t\t<p>There are no other members in this party.</p>\n\t<?php endif ?>\n<?php endif ?>\n<h3>Friends of <?php echo htmlspecialchars($char->char_name) ?></h3>\n<?php if ($friends): ?>\n\t<p><?php echo htmlspecialchars($char->char_name) ?> has <?php echo count($friends) ?> friend(s).</p>\n\t<table class=\"vertical-table\">\n\t\t<tr>\n\t\t\t<th>Character Name</th>\n\t\t\t<th>Job Class</th>\n\t\t\t<th>Base Level</th>\n\t\t\t<th>Job Level</th>\n\t\t\t<th colspan=\"2\">Guild</th>\n\t\t\t<th>Status</th>\n\t\t</tr>\n\t\t<?php foreach ($friends as $friend): ?>\n\t\t<tr>\n\t\t\t<td align=\"right\">\n\t\t\t\t<?php if ($auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($friend->char_id, $friend->name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($friend->name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if ($job=$this->jobClassText($friend->class)): ?>\n\t\t\t\t\t<?php echo htmlspecialchars($job) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td><?php echo number_format((int)$friend->base_level) ?></td>\n\t\t\t<td><?php echo number_format((int)$friend->job_level) ?></td>\n\t\t\t<?php if ($friend->guild_name): ?>\n\t\t\t\t<?php if ($friend->emblem): ?>\n\t\t\t\t<td><img src=\"<?php echo $this->emblem($friend->guild_id) ?>\" /></td>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<td<?php if (!$friend->emblem) echo ' colspan=\"2\"' ?>>\n\t\t\t\t\t<?php if (($auth->actionAllowed('guild', 'view') && $friend->guild_id == $char->guild_id) || $auth->allowedToViewGuild): ?>\n\t\t\t\t\t\t<?php echo $this->linkToGuild($friend->guild_id, $friend->guild_name) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo htmlspecialchars($friend->guild_name) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t<?php else: ?>\t\n\t\t\t\t<td colspan=\"2\"><span class=\"not-applicable\">None</span></td>\n\t\t\t<?php endif ?>\n\t\t\t<td>\n\t\t\t\t<?php if ($friend->online): ?>\n\t\t\t\t\t<span class=\"online\">Online</span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"offline\">Offline</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t</table>\n<?php else: ?>\n\t<p><?php echo htmlspecialchars($char->char_name) ?> has no friends.</p>\n<?php endif ?>\n\n<h3>Inventory Items of <?php echo htmlspecialchars($char->char_name) ?></h3>\n<?php if ($items): ?>\n\t<p><?php echo htmlspecialchars($char->char_name) ?> has <?php echo count($items) ?> inventory item(s).</p>\n\t<table class=\"vertical-table\">\n\t\t<tr>\n\t\t\t<th>Item ID</th>\n\t\t\t<th colspan=\"2\">Name</th>\n\t\t\t<th>Amount</th>\n\t\t\t<th>Identified</th>\n\t\t\t<th>Broken</th>\n\t\t\t<th>Slot 1</th>\n\t\t\t<th>Slot 2</th>\n\t\t\t<th>Slot 3</th>\n\t\t\t<th>Slot 4</th>\n\t\t\t<?php if($server->isRenewal): ?>\n\t\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemRandOptionsLabel')) ?></th>\n\t\t\t<?php endif ?>\n\t\t\t<th>Extra</th>\n\t\t</tr>\n\t\t<?php foreach ($items AS $item): ?>\n\t\t<?php $icon = $this->iconImage($item->nameid) ?>\n\t\t<tr<?php if ($item->equip) echo ' class=\"equipped\"' ?>>\n\t\t\t<td align=\"right\"><?php echo $this->linkToItem($item->nameid, $item->nameid) ?></td>\n\t\t\t<?php if ($icon): ?>\n\t\t\t\t<td><img src=\"<?php echo htmlspecialchars($icon) ?>\" /></td>\n\t\t\t<?php endif ?>\n\t\t\t<td<?php if (!$icon) echo ' colspan=\"2\"' ?><?php if ($item->cardsOver) echo ' class=\"overslotted' . $item->cardsOver . '\"'; else echo ' class=\"normalslotted\"' ?>>\n\t\t\t\t<?php if ($item->refine > 0): ?>\n\t\t\t\t\t+<?php echo htmlspecialchars($item->refine) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($item->card0 == 255 && intval($item->card1/1280) > 0): ?>\n                    <?php $itemcard1 = intval($item->card1/1280); ?>\n\t\t\t\t\t<?php for ($i = 0; $i < $itemcard1; $i++): ?>\n\t\t\t\t\t\tVery\n\t\t\t\t\t<?php endfor ?>\n\t\t\t\t\tStrong\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($item->card0 == 254 || $item->card0 == 255): ?>\n\t\t\t\t\t<?php if ($item->char_name): ?>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && ($isMine || (!$isMine && $auth->allowedToViewCharacter))): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToCharacter($item->char_id, $item->char_name, $session->serverName) . \"'s\" ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($item->char_name . \"'s\") ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>'s\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($item->card0 == 255 && array_key_exists($item->card1%1280, $itemAttributes)): ?>\n\t\t\t\t\t<?php echo htmlspecialchars($itemAttributes[$item->card1%1280]) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($item->name_english): ?>\n\t\t\t\t\t<span class=\"item_name\"><?php echo htmlspecialchars($item->name_english) ?></span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">Unknown Item</span>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($item->slots): ?>\n\t\t\t\t\t<?php echo htmlspecialchars(' [' . $item->slots . ']') ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td><?php echo number_format($item->amount) ?></td>\n\t\t\t<td>\n\t\t\t\t<?php if ($item->identify): ?>\n\t\t\t\t\t<span class=\"identified yes\">Yes</span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"identified no\">No</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if ($item->attribute): ?>\n\t\t\t\t\t<span class=\"broken yes\">Yes</span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"broken no\">No</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($item->card0 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cards[$item->card0])): ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($item->card0, $cards[$item->card0]) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($item->card0, $item->card0) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($item->card1 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cards[$item->card1])): ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($item->card1, $cards[$item->card1]) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($item->card1, $item->card1) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($item->card2 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cards[$item->card2])): ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($item->card2, $cards[$item->card2]) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($item->card2, $item->card2) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($item->card3 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cards[$item->card3])): ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($item->card3, $cards[$item->card3]) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($item->card3, $item->card3) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<?php if($server->isRenewal): ?>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if($item->rndopt): ?>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<?php foreach($item->rndopt as $rndopt) echo \"<li>\".$this->itemRandOption($rndopt[0], $rndopt[1]).\"</li>\"; ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t<?php endif ?>\n\t\t\t<td>\n\t\t\t<?php if($item->bound == 1):?>\n\t\t\t\tAccount Bound\n\t\t\t<?php elseif($item->bound == 2):?>\n\t\t\t\tGuild Bound\n\t\t\t<?php elseif($item->bound == 3):?>\n\t\t\t\tParty Bound\n\t\t\t<?php elseif($item->bound == 4):?>\n\t\t\t\tCharacter Bound\n\t\t\t<?php else:?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t</table>\n<?php else: ?>\n\t<p>There are no inventory items on this character.</p>\n<?php endif ?>\n\n<h3>Cart Inventory Items of <?php echo htmlspecialchars($char->char_name) ?></h3>\n<?php if ($cart_items): ?>\n\t<p><?php echo htmlspecialchars($char->char_name) ?> has <?php echo count($cart_items) ?> cart inventory item(s).</p>\n\t<table class=\"vertical-table\">\n\t\t<tr>\n\t\t\t<th>Item ID</th>\n\t\t\t<th colspan=\"2\">Name</th>\n\t\t\t<th>Amount</th>\n\t\t\t<th>Identified</th>\n\t\t\t<th>Broken</th>\n\t\t\t<th>Slot 1</th>\n\t\t\t<th>Slot 2</th>\n\t\t\t<th>Slot 3</th>\n\t\t\t<th>Slot 4</th>\n\t\t\t<?php if($server->isRenewal): ?>\n\t\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemRandOptionsLabel')) ?></th>\n\t\t\t<?php endif ?>\n\t\t\t<th>Extra</th>\n\t\t\t</th>\n\t\t</tr>\n\t\t<?php foreach ($cart_items AS $cart_item): ?>\n\t\t<?php $icon = $this->iconImage($cart_item->nameid) ?>\n\t\t<tr>\n\t\t\t<td align=\"right\"><?php echo $this->linkToItem($cart_item->nameid, $cart_item->nameid) ?></td>\n\t\t\t<?php if ($icon): ?>\n\t\t\t<td><img src=\"<?php echo htmlspecialchars($icon) ?>\" /></td>\n\t\t\t<?php endif ?>\n\t\t\t<td<?php if (!$icon) echo ' colspan=\"2\"' ?><?php if ($item->cardsOver) echo ' class=\"overslotted' . $item->cardsOver . '\"'; else echo ' class=\"normalslotted\"' ?>>\n\t\t\t\t<?php if ($cart_item->refine > 0): ?>\n\t\t\t\t\t+<?php echo htmlspecialchars($cart_item->refine) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($cart_item->card0 == 255 && intval($cart_item->card1/1280) > 0): ?>\n                    <?php $itemcard1 = intval($cart_item->card1/1280); ?>\n\t\t\t\t\t<?php for ($i = 0; $i < $itemcard1; $i++): ?>\n\t\t\t\t\t\tVery\n\t\t\t\t\t<?php endfor ?>\n\t\t\t\t\tStrong\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($cart_item->card0 == 254 || $cart_item->card0 == 255): ?>\n\t\t\t\t\t<?php if ($cart_item->char_name): ?>\n\t\t\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && ($isMine || (!$isMine && $auth->allowedToViewCharacter))): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToCharacter($cart_item->char_id, $cart_item->char_name, $session->serverName) . \"'s\" ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($cart_item->char_name . \"'s\") ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>'s\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($item->card0 == 255 && array_key_exists($item->card1%1280, $itemAttributes)): ?>\n\t\t\t\t\t<?php echo htmlspecialchars($itemAttributes[$item->card1%1280]) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($cart_item->name_english): ?>\n\t\t\t\t\t<span class=\"item_name\"><?php echo htmlspecialchars($cart_item->name_english) ?></span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">Unknown Item</span>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($cart_item->slots): ?>\n\t\t\t\t\t<?php echo htmlspecialchars(' [' . $cart_item->slots . ']') ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td><?php echo number_format($cart_item->amount) ?></td>\n\t\t\t<td>\n\t\t\t\t<?php if ($cart_item->identify): ?>\n\t\t\t\t\t<span class=\"identified yes\">Yes</span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"identified no\">No</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if ($cart_item->attribute): ?>\n\t\t\t\t\t<span class=\"broken yes\">Yes</span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"broken no\">No</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($cart_item->card0 && ($cart_item->type == $type_list['armor'] || $cart_item->type == $type_list['weapon']) && $cart_item->card0 != 254 && $cart_item->card0 != 255 && $cart_item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cart_cards[$cart_item->card0])): ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($cart_item->card0, $cart_cards[$cart_item->card0]) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($cart_item->card0, $cart_item->card0) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($cart_item->card1 && ($cart_item->type == $type_list['armor'] || $cart_item->type == $type_list['weapon']) && $cart_item->card0 != 255 && $cart_item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cart_cards[$cart_item->card1])): ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($cart_item->card1, $cart_cards[$cart_item->card1]) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($cart_item->card1, $cart_item->card1) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($cart_item->card2 && ($cart_item->type == $type_list['armor'] || $cart_item->type == $type_list['weapon']) && $cart_item->card0 != 254 && $cart_item->card0 != 255 && $cart_item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cart_cards[$cart_item->card2])): ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($cart_item->card2, $cart_cards[$cart_item->card2]) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($cart_item->card2, $cart_item->card2) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if($cart_item->card3 && ($cart_item->type == $type_list['armor'] || $cart_item->type == $type_list['weapon']) && $cart_item->card0 != 254 && $cart_item->card0 != 255 && $cart_item->card0 != -256): ?>\n\t\t\t\t\t<?php if (!empty($cart_cards[$cart_item->card3])): ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($cart_item->card3, $cart_cards[$cart_item->card3]) ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($cart_item->card3, $cart_item->card3) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<?php if($server->isRenewal): ?>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if($cart_item->rndopt): ?>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<?php foreach($cart_item->rndopt as $rndopt) echo \"<li>\".$this->itemRandOption($rndopt[0], $rndopt[1]).\"</li>\"; ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t<?php endif ?>\n\t\t\t<td>\n\t\t\t<?php if($cart_item->bound == 1):?>\n\t\t\t\tAccount Bound\n\t\t\t<?php elseif($cart_item->bound == 2):?>\n\t\t\t\tGuild Bound\n\t\t\t<?php elseif($cart_item->bound == 3):?>\n\t\t\t\tParty Bound\n\t\t\t<?php elseif($cart_item->bound == 4):?>\n\t\t\t\tCharacter Bound\n\t\t\t<?php else:?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t</table>\n<?php else: ?>\n\t<p>There are no cart inventory items on this character.</p>\n<?php endif ?>\n\n<?php else: ?>\n<p>No such character was found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/cplog/ban.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Account Bans</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module'), $params->get('action')) ?>\n\t<p>\n\t\t<label for=\"account\">Account:</label>\n\t\t<input type=\"text\" name=\"account\" id=\"account\" value=\"<?php echo htmlspecialchars($params->get('account') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"banned_by\">Banned By:</label>\n\t\t<input type=\"text\" name=\"banned_by\" id=\"banned_by\" value=\"<?php echo htmlspecialchars($params->get('banned_by') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"ban_type\">Ban Type:</label>\n\t\t<select name=\"ban_type\" id=\"ban_type\">\n\t\t\t<option value=\"\"<?php if (!($ban_type=$params->get('ban_type'))) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('AllLabel')) ?></option>\n\t\t\t<option value=\"unban\"<?php if ($ban_type == 'unban') echo ' selected=\"selected\"' ?>>Unban</option>\n\t\t\t<option value=\"ban\"<?php if ($ban_type == 'ban') echo ' selected=\"selected\"' ?>>Ban</option>\n\t\t</select>\n\t</p>\n\t<p>\n\t\t<label for=\"use_ban\">Ban Date:</label>\n\t\t<input type=\"checkbox\" name=\"use_ban\" id=\"use_ban\"<?php if ($params->get('use_ban')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateTimeField('ban') ?>\n\t\t...\n\t\t<label for=\"use_ban_until\">Ban Until:</label>\n\t\t<input type=\"checkbox\" name=\"use_ban_until\" id=\"use_ban_until\"<?php if ($params->get('use_ban_until')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateTimeField('ban_until') ?>\n\t</p>\n\t<p>\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($bans): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('account', 'Account') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('banned_by', 'Banned By') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ban_type', 'Ban Type') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ban_date', 'Ban Date') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ban_until', 'Ban Until') ?></th>\n\t\t<th>Ban Reason</th>\n\t</tr>\n\t<?php foreach ($bans as $ban): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t<?php echo $this->linkToAccount($ban->account_id, $ban->banned_userid) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $ban->account_id ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t<?php echo $this->linkToAccount($ban->banned_by, $ban->banned_by_userid) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $ban->banned_by ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if (!$ban->ban_type): ?>\n\t\t\t\tUnban\n\t\t\t<?php elseif ($ban->ban_type == 1): ?>\n\t\t\t\t<span class=\"account-state state-banned\">Temporary Ban</span>\n\t\t\t<?php elseif ($ban->ban_type == 2): ?>\n\t\t\t\t<span class=\"account-state state-permanently-banned\">Permanent Ban</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($ban->ban_date <= '1000-01-01 00:00:00'): ?>\n\t\t\t\t<span class=\"not-applicable\">N/A</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $this->formatDateTime($ban->ban_date) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($ban->ban_until <= '1000-01-01 00:00:00'): ?>\n\t\t\t\t<span class=\"not-applicable\">N/A</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $this->formatDateTime($ban->ban_until) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($ban->ban_reason == ''): ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($ban->ban_reason) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>No logs were found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/cplog/changemail.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>E-mail Changes</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module'), $params->get('action')) ?>\n\t<p>\n\t\t<label for=\"use_request_after\">Request Date Between:</label>\n\t\t<input type=\"checkbox\" name=\"use_request_after\" id=\"use_request_after\"<?php if ($params->get('use_request_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('request_after') ?>\n\t\t<label for=\"use_request_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_request_before\" id=\"use_request_before\"<?php if ($params->get('use_request_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('request_before') ?>\n\t</p>\n\t<p>\n\t\t<label for=\"use_change_after\">Change Date Between:</label>\n\t\t<input type=\"checkbox\" name=\"use_change_after\" id=\"use_change_after\"<?php if ($params->get('use_change_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('change_after') ?>\n\t\t<label for=\"use_change_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_change_before\" id=\"use_change_before\"<?php if ($params->get('use_change_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('change_before') ?>\n\t</p>\n\t<p>\n\t\t<label for=\"account_id\">Account ID:</label>\n\t\t<input type=\"text\" name=\"account_id\" id=\"account_id\" value=\"<?php echo htmlspecialchars($params->get('account_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"username\">Username:</label>\n\t\t<input type=\"text\" name=\"username\" id=\"username\" value=\"<?php echo htmlspecialchars($params->get('username') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"request_ip\">Request IP:</label>\n\t\t<input type=\"text\" name=\"request_ip\" id=\"request_ip\" value=\"<?php echo htmlspecialchars($params->get('request_ip') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"change_ip\">Change IP:</label>\n\t\t<input type=\"text\" name=\"change_ip\" id=\"change_ip\" value=\"<?php echo htmlspecialchars($params->get('change_ip') ?: '') ?>\" />\n\t</p>\n\t<p>\n\t\t<label for=\"old_email\">Old Email:</label>\n\t\t<input type=\"text\" name=\"old_email\" id=\"old_email\" value=\"<?php echo htmlspecialchars($params->get('old_email') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"new_email\">New Email:</label>\n\t\t<input type=\"text\" name=\"new_email\" id=\"new_email\" value=\"<?php echo htmlspecialchars($params->get('new_email') ?: '') ?>\" />\n\t\t\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($changes): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('log.account_id', 'Account ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('userid', 'Username') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('old_email', 'Old Email') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('new_email', 'New Email') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('request_date', 'Request Date') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('request_ip', 'Request IP') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('change_date', 'Change Date') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('change_ip', 'Change IP') ?></th>\n\t</tr>\n\t<?php foreach ($changes as $change): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('account', 'view')): ?>\n\t\t\t\t<?php echo $this->linkToAccount($change->account_id, $change->account_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $change->account_id ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($change->userid): ?>\n\t\t\t\t<?php echo htmlspecialchars($change->userid) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t<?php echo $this->linkToAccountSearch(array('email' => $change->old_email), $change->old_email) ?>\n\t\t<?php else: ?>\n\t\t\t<?php echo htmlspecialchars($change->old_email) ?>\n\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t<?php echo $this->linkToAccountSearch(array('email' => $change->new_email), $change->new_email) ?>\n\t\t<?php else: ?>\n\t\t\t<?php echo htmlspecialchars($change->new_email) ?>\n\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $this->formatDateTime($change->request_date) ?></td>\n\t\t<td>\n\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $change->request_ip), $change->request_ip) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($change->request_ip) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($change->change_date): ?>\n\t\t\t\t<?php echo $this->formatDateTime($change->change_date) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($change->change_ip): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $change->change_ip), $change->change_ip) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($change->change_ip) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>No email changes found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/cplog/changepass.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Password Changes</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module'), $params->get('action')) ?>\n\t<p>\n\t\t<label for=\"use_change_after\">Change Date Between:</label>\n\t\t<input type=\"checkbox\" name=\"use_change_after\" id=\"use_change_after\"<?php if ($params->get('use_change_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('change_after') ?>\n\t\t<label for=\"use_change_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_change_before\" id=\"use_change_before\"<?php if ($params->get('use_change_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('change_before') ?>\n\t</p>\n\t<p>\n\t\t<label for=\"account_id\">Account ID:</label>\n\t\t<input type=\"text\" name=\"account_id\" id=\"account_id\" value=\"<?php echo htmlspecialchars($params->get('account_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"username\">Username:</label>\n\t\t<input type=\"text\" name=\"username\" id=\"username\" value=\"<?php echo htmlspecialchars($params->get('username') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"change_ip\">Change IP:</label>\n\t\t<input type=\"text\" name=\"change_ip\" id=\"change_ip\" value=\"<?php echo htmlspecialchars($params->get('change_ip') ?: '') ?>\" />\n\t\t\n\t\t<?php if (!$auth->allowedToSearchCpChangePass): ?>\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t\t<?php endif ?>\n\t</p>\n\t<?php if ($auth->allowedToSearchCpChangePass): ?>\n\t<p>\n\t\t<label for=\"old_password\">Old Password:</label>\n\t\t<input type=\"text\" name=\"old_password\" id=\"old_password\" value=\"<?php echo htmlspecialchars($params->get('old_password') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"new_password\">New Password:</label>\n\t\t<input type=\"text\" name=\"new_password\" id=\"new_password\" value=\"<?php echo htmlspecialchars($params->get('new_password') ?: '') ?>\" />\n\t\t\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n\t<?php endif ?>\n</form>\n<?php if ($changes): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('log.account_id', 'Account ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('userid', 'Username') ?></th>\n\t\t<?php if (Flux::config('CpChangeLogShowPassword') && $auth->allowedToSeeCpChangePass): ?>\n\t\t<th><?php echo $paginator->sortableColumn('old_password', 'Old Password') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('new_password', 'New Password') ?></th>\n\t\t<?php endif ?>\n\t\t<th><?php echo $paginator->sortableColumn('change_date', 'Change Date') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('change_ip', 'Change IP') ?></th>\n\t</tr>\n\t<?php foreach ($changes as $change): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('account', 'view')): ?>\n\t\t\t\t<?php echo $this->linkToAccount($change->account_id, $change->account_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $change->account_id ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($change->userid): ?>\n\t\t\t\t<?php echo htmlspecialchars($change->userid) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<?php if (Flux::config('CpChangeLogShowPassword') && $auth->allowedToSeeCpChangePass): ?>\n\t\t<td><?php echo htmlspecialchars($change->old_password) ?></td>\n\t\t<td><?php echo htmlspecialchars($change->new_password) ?></td>\n\t\t<?php endif ?>\n\t\t<td><?php echo $this->formatDateTime($change->change_date) ?></td>\n\t\t<td>\n\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $change->change_ip), $change->change_ip) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($change->change_ip) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>No password changes found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/cplog/create.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Logins</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module'), $params->get('action')) ?>\n\t<p>\n\t\t<label for=\"use_login_after\">Login Date Between:</label>\n\t\t<input type=\"checkbox\" name=\"use_login_after\" id=\"use_login_after\"<?php if ($params->get('use_login_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('login_after') ?>\n\t\t<label for=\"use_login_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_login_before\" id=\"use_login_before\"<?php if ($params->get('use_login_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('login_before') ?>\n\t\t<?php if ($auth->allowedToSearchCpLoginLogPw): ?>\n\t\t...\n\t\t<label for=\"password\">Password:</label>\n\t\t<input type=\"text\" name=\"password\" id=\"password\" value=\"<?php echo htmlspecialchars($params->get('password') ?: '') ?>\" />\n\t\t<?php endif ?>\n\t</p>\n\t<p>\n\t\t<label for=\"account_id\">Account ID:</label>\n\t\t<input type=\"text\" name=\"account_id\" id=\"account_id\" value=\"<?php echo htmlspecialchars($params->get('account_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"username\">Username:</label>\n\t\t<input type=\"text\" name=\"username\" id=\"username\" value=\"<?php echo htmlspecialchars($params->get('username') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"ip\">IP Address:</label>\n\t\t<input type=\"text\" name=\"ip\" id=\"ip\" value=\"<?php echo htmlspecialchars($params->get('ip') ?: '') ?>\" />\n\t\t...\n\t\t\n\t\t\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($logins): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('account_id', 'Account ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('user_id', 'Username') ?></th>\n\t\t<?php if (($showPassword=Flux::config('CpLoginLogShowPassword')) && ($seePassword=$auth->allowedToSeeCpLoginLogPass)): ?>\n\t\t<th><?php echo $paginator->sortableColumn('user_pass', 'Password') ?></th>\n\t\t<?php endif ?>\n\t\t<th><?php echo $paginator->sortableColumn('reg_ip', 'IP Address') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('reg_date', 'Login Date') ?></th>\n\n\t</tr>\n\t<?php foreach ($logins as $login): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t<?php echo $this->linkToAccount($login->account_id, $login->account_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $login->account_id ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo htmlspecialchars($login->userid) ?></td>\n\t\t<?php if ($showPassword && $seePassword): ?>\n\t\t<td><?php echo htmlspecialchars($login->user_pass) ?></td>\n\t\t<?php endif ?>\n\t\t<td>\n\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t<?php echo $this->linkToAccountSearch(array('reg_ip' => $login->reg_ip), $login->reg_ip) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($login->reg_ip) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $this->formatDateTime($login->reg_date) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>No logs were found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/cplog/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>CP Logs</h2>\n<p>You may view the CP logs here.</p>\n<p>Please select the log that you would like to view from the available menus.</p>\n"
  },
  {
    "path": "themes/default/cplog/ipban.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>IP Bans</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module'), $params->get('action')) ?>\n\t<p>\n\t\t<label for=\"ip\">IP Address:</label>\n\t\t<input type=\"text\" name=\"ip\" id=\"ip\" value=\"<?php echo htmlspecialchars($params->get('ip') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"banned_by\">Banned By:</label>\n\t\t<input type=\"text\" name=\"banned_by\" id=\"banned_by\" value=\"<?php echo htmlspecialchars($params->get('banned_by') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"ban_type\">Ban Type:</label>\n\t\t<select name=\"ban_type\" id=\"ban_type\">\n\t\t\t<option value=\"\"<?php if (!($ban_type=$params->get('ban_type'))) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('AllLabel')) ?></option>\n\t\t\t<option value=\"unban\"<?php if ($ban_type == 'unban') echo ' selected=\"selected\"' ?>>Unban</option>\n\t\t\t<option value=\"ban\"<?php if ($ban_type == 'ban') echo ' selected=\"selected\"' ?>>Ban</option>\n\t\t</select>\n\t</p>\n\t<p>\n\t\t<label for=\"use_ban\">Ban Date:</label>\n\t\t<input type=\"checkbox\" name=\"use_ban\" id=\"use_ban\"<?php if ($params->get('use_ban')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateTimeField('ban') ?>\n\t\t...\n\t\t<label for=\"use_ban_until\">Ban Until:</label>\n\t\t<input type=\"checkbox\" name=\"use_ban_until\" id=\"use_ban_until\"<?php if ($params->get('use_ban_until')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateTimeField('ban_until') ?>\n\t</p>\n\t<p>\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($ipbans): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('ip', 'IP Address') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('banned_by', 'Banned By') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ban_type', 'Ban Type') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ban_date', 'Ban Date') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ban_until', 'Ban Until') ?></th>\n\t\t<th>Ban Reason</th>\n\t</tr>\n\t<?php foreach ($ipbans as $ipban): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $ipban->ip_address), $ipban->ip_address) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($ipban->ip_address) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t<?php echo $this->linkToAccount($ipban->banned_by, $ipban->userid) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $ipban->banned_by ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if (!$ipban->ban_type): ?>\n\t\t\t\tUnban\n\t\t\t<?php elseif ($ipban->ban_type == 1): ?>\n\t\t\t\t<span class=\"account-state state-banned\">Ban</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($ipban->ban_date <= '1000-01-01 00:00:00'): ?>\n\t\t\t\t<span class=\"not-applicable\">N/A</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $this->formatDateTime($ipban->ban_date) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($ipban->ban_until <= '1000-01-01 00:00:00'): ?>\n\t\t\t\t<span class=\"not-applicable\">N/A</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $this->formatDateTime($ipban->ban_until) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($ipban->ban_reason == ''): ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($ipban->ban_reason) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>No logs were found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/cplog/login.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Logins</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module'), $params->get('action')) ?>\n\t<p>\n\t\t<label for=\"use_login_after\">Login Date Between:</label>\n\t\t<input type=\"checkbox\" name=\"use_login_after\" id=\"use_login_after\"<?php if ($params->get('use_login_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('login_after') ?>\n\t\t<label for=\"use_login_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_login_before\" id=\"use_login_before\"<?php if ($params->get('use_login_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('login_before') ?>\n\t\t<?php if ($auth->allowedToSearchCpLoginLogPw): ?>\n\t\t...\n\t\t<label for=\"password\">Password:</label>\n\t\t<input type=\"text\" name=\"password\" id=\"password\" value=\"<?php echo htmlspecialchars($params->get('password') ?: '') ?>\" />\n\t\t<?php endif ?>\n\t</p>\n\t<p>\n\t\t<label for=\"account_id\">Account ID:</label>\n\t\t<input type=\"text\" name=\"account_id\" id=\"account_id\" value=\"<?php echo htmlspecialchars($params->get('account_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"username\">Username:</label>\n\t\t<input type=\"text\" name=\"username\" id=\"username\" value=\"<?php echo htmlspecialchars($params->get('username') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"ip\">IP Address:</label>\n\t\t<input type=\"text\" name=\"ip\" id=\"ip\" value=\"<?php echo htmlspecialchars($params->get('ip') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"error_code\">Error Code:</label>\n\t\t<select name=\"error_code\" id=\"error_code\">\n\t\t\t<option value=\"all\"<?php if (is_null($params->get('error_code')) || strtolower($params->get('error_code') == 'all')) echo ' selected=\"selected\"' ?>>All</option>\n\t\t\t<option value=\"none\"<?php if (strtolower($params->get('error_code')) == 'none') echo ' selected=\"selected\"' ?>>None</option>\n\t\t<?php foreach ($loginErrors->toArray() as $errorCode => $errorType): ?>\n\t\t\t<option value=\"<?php echo $errorCode ?>\"<?php if (ctype_digit($params->get('error_code')) && $params->get('error_code') == $errorCode) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars($errorType) ?></option>\n\t\t<?php endforeach ?>\n\t\t</select>\n\t\t\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($logins): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('account_id', 'Account ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('username', 'Username') ?></th>\n\t\t<?php if (($showPassword=Flux::config('CpLoginLogShowPassword')) && ($seePassword=$auth->allowedToSeeCpLoginLogPass)): ?>\n\t\t<th><?php echo $paginator->sortableColumn('password', 'Password') ?></th>\n\t\t<?php endif ?>\n\t\t<th><?php echo $paginator->sortableColumn('ip', 'IP Address') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('login_date', 'Login Date') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('error_code', 'Error Code') ?></th>\n\t</tr>\n\t<?php foreach ($logins as $login): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t<?php echo $this->linkToAccount($login->account_id, $login->account_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $login->account_id ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo htmlspecialchars($login->username) ?></td>\n\t\t<?php if ($showPassword && $seePassword): ?>\n\t\t<td><?php echo htmlspecialchars($login->password) ?></td>\n\t\t<?php endif ?>\n\t\t<td>\n\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $login->ip), $login->ip) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($login->ip) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $this->formatDateTime($login->login_date) ?></td>\n\t\t<td>\n\t\t\t<?php if (!is_null($login->error_code)): ?>\n\t\t\t\t<?php echo $login->error_type ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>No logs were found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/cplog/paypal.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>PayPal Transactions</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module'), $params->get('action')) ?>\n\t<p>\n\t\t<label for=\"txn_id\">Transaction ID:</label>\n\t\t<input type=\"text\" name=\"txn_id\" id=\"txn_id\" value=\"<?php echo htmlspecialchars($params->get('txn_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"parent_txn_id\">Parent Transaction ID:</label>\n\t\t<input type=\"text\" name=\"parent_txn_id\" id=\"parent_txn_id\" value=\"<?php echo htmlspecialchars($params->get('parent_txn_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"status\">Status:</label>\n\t\t<input type=\"text\" name=\"status\" id=\"status\" value=\"<?php echo htmlspecialchars($params->get('status') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"email\">E-mail:</label>\n\t\t<input type=\"text\" name=\"email\" id=\"email\" value=\"<?php echo htmlspecialchars($params->get('email') ?: '') ?>\" />\n\t</p>\n\t<p>\n\t\t<label for=\"amount\">Amount:</label>\n\t\t<select name=\"amount_op\">\n\t\t\t<option value=\"eq\"<?php if (($amount_op=$params->get('amount_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($amount_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($amount_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"amount\" id=\"amount\" value=\"<?php echo htmlspecialchars($params->get('amount') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"credits\">Credits:</label>\n\t\t<select name=\"credits_op\">\n\t\t\t<option value=\"eq\"<?php if (($credits_op=$params->get('credits_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($credits_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($credits_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"credits\" id=\"credits\" value=\"<?php echo htmlspecialchars($params->get('credits') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"account\">Account:</label>\n\t\t<input type=\"text\" name=\"account\" id=\"account\" value=\"<?php echo htmlspecialchars($params->get('account') ?: '') ?>\" />\n\t</p>\n\t<p>\n\t\t<label for=\"use_processed_after\">Process Date Between:</label>\n\t\t<input type=\"checkbox\" name=\"use_processed_after\" id=\"use_processed_after\"<?php if ($params->get('use_processed_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('processed_after') ?>\n\t\t<label for=\"use_processed_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_processed_before\" id=\"use_processed_before\"<?php if ($params->get('use_processed_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('processed_before') ?>\n\t</p>\n\t<p>\n\t\t<label for=\"use_received_after\">Receive Date Between:</label>\n\t\t<input type=\"checkbox\" name=\"use_received_after\" id=\"use_received_after\"<?php if ($params->get('use_received_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('received_after') ?>\n\t\t<label for=\"use_received_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_received_before\" id=\"use_received_before\"<?php if ($params->get('use_received_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('received_before') ?>\n\t\t\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($transactions): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('p.txn_id', 'Transaction') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('p.parent_txn_id', 'Parent') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('p.process_date', 'Processed') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('p.payment_date', 'Received') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('p.payment_status', 'Status') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('p.payer_email', 'E-mail') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('p.mc_gross', 'Amount') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('p.credits', 'Credits') ?></th>\n\t\t<!--<th><?php echo $paginator->sortableColumn('server_name', 'Server') ?></th>-->\n\t\t<th><?php echo $paginator->sortableColumn('l.userid', 'Account') ?></th>\n\t</tr>\n\t<?php foreach ($transactions as $txn): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<strong>\n\t\t\t\t<?php if ($auth->actionAllowed('logdata', 'txnview')): ?>\n\t\t\t\t\t<a href=\"<?php echo $this->url($params->get('module'), 'txnview', array('id' => $txn->id)) ?>\">\n\t\t\t\t\t\t<?php echo $txn->txn_id ?>\n\t\t\t\t\t</a>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $txn->txn_id ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</strong>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($txn->parent_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('logdata', 'txnview')): ?>\n\t\t\t\t\t<a href=\"<?php echo $this->url($params->get('module'), 'txnview', array('id' => $txn->parent_id)) ?>\"><?php echo $txn->parent_txn_id ?></a>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $txn->parent_txn_id ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $this->formatDateTime($txn->process_date) ?></td>\n\t\t<td><?php echo $this->formatDateTime($txn->payment_date) ?></td>\n\t\t<td><?php echo $txn->payment_status ?></td>\n\t\t<td>\n\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t<?php echo $this->linkToAccountSearch(array('email' => $txn->payer_email), $txn->payer_email) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($txn->payer_email) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $txn->mc_gross ?> <?php echo $txn->mc_currency ?></td>\n\t\t<td><?php echo number_format((int)$txn->credits) ?></td>\n\t\t<!--<td><?php echo htmlspecialchars($txn->server_name) ?></td>-->\n\t\t<td>\n\t\t\t<?php if ($txn->account_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t\t<?php echo $this->linkToAccount($txn->account_id, $txn->userid) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($txn->userid) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>There are currently no logged transactions.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/cplog/resetpass.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Password Resets</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module'), $params->get('action')) ?>\n\t<p>\n\t\t<label for=\"use_request_after\">Request Date Between:</label>\n\t\t<input type=\"checkbox\" name=\"use_request_after\" id=\"use_request_after\"<?php if ($params->get('use_request_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('request_after') ?>\n\t\t<label for=\"use_request_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_request_before\" id=\"use_request_before\"<?php if ($params->get('use_request_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('request_before') ?>\n\t</p>\n\t<p>\n\t\t<label for=\"use_reset_after\">Reset Date Between:</label>\n\t\t<input type=\"checkbox\" name=\"use_reset_after\" id=\"use_reset_after\"<?php if ($params->get('use_reset_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('reset_after') ?>\n\t\t<label for=\"use_reset_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_reset_before\" id=\"use_reset_before\"<?php if ($params->get('use_reset_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('reset_before') ?>\n\t</p>\n\t<p>\n\t\t<label for=\"account_id\">Account ID:</label>\n\t\t<input type=\"text\" name=\"account_id\" id=\"account_id\" value=\"<?php echo htmlspecialchars($params->get('account_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"username\">Username:</label>\n\t\t<input type=\"text\" name=\"username\" id=\"username\" value=\"<?php echo htmlspecialchars($params->get('username') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"request_ip\">Request IP:</label>\n\t\t<input type=\"text\" name=\"request_ip\" id=\"request_ip\" value=\"<?php echo htmlspecialchars($params->get('request_ip') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"reset_ip\">Reset IP:</label>\n\t\t<input type=\"text\" name=\"reset_ip\" id=\"reset_ip\" value=\"<?php echo htmlspecialchars($params->get('reset_ip') ?: '') ?>\" />\n\t\t\n\t\t<?php if (!$auth->allowedToSearchCpResetPass): ?>\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t\t<?php endif ?>\n\t</p>\n\t<?php if ($auth->allowedToSearchCpResetPass): ?>\n\t<p>\n\t\t<label for=\"old_password\">Old Password:</label>\n\t\t<input type=\"text\" name=\"old_password\" id=\"old_password\" value=\"<?php echo htmlspecialchars($params->get('old_password') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"new_password\">New Password:</label>\n\t\t<input type=\"text\" name=\"new_password\" id=\"new_password\" value=\"<?php echo htmlspecialchars($params->get('new_password') ?: '') ?>\" />\n\t\t\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n\t<?php endif ?>\n</form>\n<?php if ($resets): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('log.account_id', 'Account ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('userid', 'Username') ?></th>\n\t\t<?php if (Flux::config('CpResetLogShowPassword') && $auth->allowedToSeeCpResetPass): ?>\n\t\t<th><?php echo $paginator->sortableColumn('old_password', 'Old Password') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('new_password', 'New Password') ?></th>\n\t\t<?php endif ?>\n\t\t<th><?php echo $paginator->sortableColumn('request_date', 'Request Date') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('request_ip', 'Request IP') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('reset_date', 'Reset Date') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('reset_ip', 'Reset IP') ?></th>\n\t</tr>\n\t<?php foreach ($resets as $reset): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('account', 'view')): ?>\n\t\t\t\t<?php echo $this->linkToAccount($reset->account_id, $reset->account_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $reset->account_id ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($reset->userid): ?>\n\t\t\t\t<?php echo htmlspecialchars($reset->userid) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<?php if (Flux::config('CpResetLogShowPassword') && $auth->allowedToSeeCpResetPass): ?>\n\t\t<td><?php echo htmlspecialchars($reset->old_password) ?></td>\n\t\t<td><?php echo htmlspecialchars($reset->new_password) ?></td>\n\t\t<?php endif ?>\n\t\t<td><?php echo $this->formatDateTime($reset->request_date) ?></td>\n\t\t<td>\n\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $reset->request_ip), $reset->request_ip) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($reset->request_ip) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($reset->reset_date): ?>\n\t\t\t\t<?php echo $this->formatDateTime($reset->reset_date) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($reset->reset_ip): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $reset->reset_ip), $reset->reset_ip) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($reset->reset_ip) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>No password resets found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/cplog/txnview.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Viewing PayPal Transaction Details</h2>\n<?php if ($txn): ?>\n<p>If the transaction contains negative payment and settle amounts, it is likely there was a chargeback and the donor was reimbursed.</p>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Transaction ID</th>\n\t\t<td><?php echo htmlspecialchars($txn->txn_id) ?></td>\n\t\t<th>Account</th>\n\t\t<td>\n\t\t\t<?php if ($txn->account_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t\t<?php echo $this->linkToAccount($txn->account_id, $txn->userid) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($txn->userid) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th>Credits Earned</th>\n\t\t<td><?php echo number_format((int)$txn->credits) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Amount</th>\n\t\t<td>\n\t\t\t<?php echo $txn->mc_gross ?>\n\t\t\t<?php echo $txn->mc_currency ?>\n\t\t</td>\n\t\t<th>Settle Amount</th>\n\t\t<td colspan=\"3\">\n\t\t\t<?php echo $txn->mc_gross - $txn->mc_fee ?>\n\t\t\t<?php echo $txn->mc_currency ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Payment Date</th>\n\t\t<td><?php echo htmlspecialchars(date(Flux::config('DateTimeFormat'), strtotime($txn->payment_date))) ?></td>\n\t\t<th>Date Processed</th>\n\t\t<td colspan=\"3\"><?php echo $this->formatDateTime($txn->process_date) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Status</th>\n\t\t<td><?php echo htmlspecialchars($txn->payment_status) ?></td>\n\t\t<th>Item Name</th>\n\t\t<td colspan=\"3\"><?php echo htmlspecialchars($txn->item_name) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>First Name</th>\n\t\t<td><?php echo htmlspecialchars($txn->first_name) ?></td>\n\t\t<th rowspan=\"2\">Address</th>\n\t\t<td colspan=\"3\" rowspan=\"2\">\n\t\t\t<?php echo htmlspecialchars($txn->address_street) ?><br />\n\t\t\t<?php echo htmlspecialchars($txn->address_city) ?>,\n\t\t\t<?php echo htmlspecialchars($txn->address_state) ?>,\n\t\t\t<?php echo htmlspecialchars($txn->address_country) ?>\n\t\t\t<?php echo htmlspecialchars($txn->address_zip) ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Last Name</th>\n\t\t<td><?php echo htmlspecialchars($txn->last_name) ?></td>\n\t</tr>\n</table>\n<?php if ($auth->allowedToViewRawTxnLogData): ?>\n\t<h3>Raw Transaction Log</h3>\n\t<?php if ($txnFileLog): ?>\n\t<pre class=\"raw-txn-log\"><?php echo htmlspecialchars($txnFileLog) ?></pre>\n\t<?php else: ?>\n\t<p>The raw log for this transaction could not be found.</p>\n\t<?php endif ?>\t\n\n\t<?php else: ?>\n\t<p>Records indicate that such a transaction was never recorded. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n\t<?php endif ?>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/css/flux/ie.css",
    "content": "input[type=text], input[type=password], textarea {\n\tfont-weight: bold;\n}\n\nselect {\n\tfont-size: 8pt;\n\tborder: 5px solid #000;\n}\n\n#logo {\n\tdisplay: block;\n}\n\n.generic-form-table td input[type=checkbox] {\n\tdisplay: inline-block;\n\tmargin-top: 3px;\n}\n"
  },
  {
    "path": "themes/default/css/flux/recaptcha.css",
    "content": "#recaptcha_table * {\n\tpadding: 0;\n}\n"
  },
  {
    "path": "themes/default/css/flux/unitip.css",
    "content": "/* unitip css */\n\n#unitip {\n\tposition: absolute;\n\tz-index: 1000;\n\ttop: -1000px;\n\tcolor: #fff;\n\tfont: normal normal 8pt Verdana, Arial, Helvetica, sans-serif;\n\tdisplay: none;\n}\n\n#unitippoint, #unitipmid, #unitipcap {\n\tposition: relative;\n\ttop: 0px; \n\tleft: 0px;\n\twidth: 145px;\n\tdisplay: block;\n}\n\n#unitippoint { \n\tbackground: url(../../img/TipPoint.png) no-repeat; \n\theight: 19px; \n\toverflow: hidden; \n}\n\n#unitipmid { \n\tbackground: url(../../img/TipMid.png) repeat; \n\twidth: 115px;\n\theight: auto; \n\tpadding: 5px 15px;\n}\n\n#unitipcap { \n\tbackground: url(../../img/TipCap.png) no-repeat; \n\theight: 7px; \n\toverflow: hidden; \n}\n"
  },
  {
    "path": "themes/default/css/flux.css",
    "content": "\t/*********************************************\n\t ** Stylesheet file for default Flux theme. **\n\t *********************************************/\n\n.loginbox-admin-menu {\n\tpadding-top: 5px;\n\tcolor: #94b4d5;\n}\n\nbody {\n\tmargin: 0 0 20px 0;\n\tpadding: 0;\n\tfont-family: \"Lucida Grande\", \"Lucida Sans\", Verdana, Tahoma, sans-serif;\n\tfont-size: 9pt;\n\tcolor: #000;\n\tbackground-color: #fff;\n}\n\ntable {\n\tfont-family: \"Lucida Grande\", \"Lucida Sans\", Verdana, Tahoma, sans-serif;\n\tfont-size: 9pt;\n}\n\ntr, td, th {\n\tvertical-align: top;\n}\n\n.horizontal-table tr, .vertical-table tr, .generic-form-table tr,\n.horizontal-table td, .vertical-table td, .generic-form-table td {\n\tvertical-align: middle;\n}\n\n.horizontal-table th, .vertical-table th, .generic-form-table th {\n\tvertical-align: top;\n}\n\nh2 {\n\tcolor: #444;\n\tletter-spacing: -1px;\n}\n\nh3 {\n\t/*font-style: italic;*/\n\tfont-weight: normal;\n\tfont-size: 120%;\n\tcolor: #444;\n\tborder-bottom: 1px dotted #ddd;\n\ttext-transform: uppercase;\n}\n\nh3:first-letter {\n\tfont-weight: bold;\n}\n\np {\n\tmargin: 4px 0 8px 0;\n\tpadding: 0;\n}\n\na img {\n\tborder: 0;\n}\n\na {\n\tcolor: #4083c6;\n\ttext-decoration: none;\n}\n\ninput[type=text], input[type=password], input[type=file], textarea {\n\tfont-family: \"Lucida Grande\", \"Lucida Sans\", Verdana, Tahoma, sans-serif;\n\tpadding: 4px;\n\tfont-size: 10pt;\n\tcolor: #444;\n\tborder: 1px solid #ddd;\n\toutline-width: 0;\n}\n\nlabel:hover {\n\tcursor: pointer;\n}\n\n/*input[type=text]:hover, input[type=password]:hover, textarea:hover {\n\tcolor: #46a;\n\tbackground-color: #dee;\n\tborder: 1px solid #8ac;\n}*/\n\n.module-name {\n\tfont-weight: bold;\n\tfont-size: 12pt;\n}\n\n.message {\n\tdisplay: block;\n\tpadding: 10px;\n\tfont-weight: bold;\n\tfont-size: 120%;\n\tcolor: #fff;\n\tbackground-color: #333;\n}\n\n.notice {\n\tdisplay: block;\n\tpadding: 10px;\n\tfont-weight: normal;\n\tfont-size: 120%;\n\tcolor: #204a87;\n\tbackground-color: #F0FFFF;\n\tborder: 1px solid #87CEEB;\n}\n\n.center {\n\ttext-align: center;\n}\n\n#admin_sidebar, #sidebar {\n\tmargin-bottom: 10px;\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\n#admin_sidebar img, #sidebar img {\n\tdisplay: block;\n}\n\n#admin_sidebar td, #sidebar td {\n\tpadding: 0;\n}\n\n#admin_sidebar td.menuitem, #admin_sidebar th.menuitem {\n\tdisplay: block;\n\tfont-size: 10pt;\n\tborder-width: 0 13px 0 11px;\n\tborder-style: solid;\n\tborder-color: #8b8b8b;\n}\n\n#admin_sidebar th.menuitem {\n\tbackground-color: #303030;\n}\n\n#admin_sidebar th.menuitem strong {\n\tdisplay: block;\n\tmargin: 0 12px;\n\tpadding: 10px 0 2px 0;\n\tfont-size: 100%;\n\ttext-align: center;\n\tcolor: #fff;\n\tborder-bottom: 1px solid #555;\n}\n\n#admin_sidebar td.menuitem a {\n\tmargin: 0 auto;\n\tdisplay: block;\n\tpadding: 2px 5px 4px 18px;\n\tcolor: #fff;\n\tbackground-color: #303030;\n\ttext-align: left;\n\ttext-shadow: #000 1pt 1pt;\n\ttext-decoration: none;\n}\n\n#admin_sidebar td.menuitem a:hover {\n\tcolor: #fff;\n\tbackground-color: #4a5259;\n\ttext-shadow: #4a5259 1pt 1pt;\n}\n\n#admin_sidebar td.menuitem a span {\n\t/*display: block;*/\n}\n\n#sidebar td.sidebar-left, #sidebar td.sidebar-right {\n\tbackground-color: #e6f0fa;\n}\n\n#sidebar td.menuitem, #sidebar th.menuitem {\n\tdisplay: block;\n\tfont-size: 10pt;\n\tborder-width: 0 13px 0 11px;\n\tborder-style: solid;\n\tborder-color: #c4d9ee;\n}\n\n\n#sidebar th.menuitem {\n\tbackground-color: #94b4d5;\n}\n\n#sidebar th.menuitem strong {\n\tdisplay: block;\n\tmargin: 0 12px;\n\tpadding: 10px 0 2px 0;\n\tfont-size: 100%;\n\ttext-align: center;\n\tcolor: #fff;\n\tborder-bottom: 1px solid #c4d9ee;\n}\n\n#sidebar td.menuitem a {\n\tmargin: 0 auto;\n\tdisplay: block;\n\tpadding: 2px 5px 4px 18px;\n\tcolor: #fff;\n\tbackground-color: #94b4d5;\n\ttext-align: left;\n\ttext-shadow: #708fae 1pt 1pt;\n\ttext-decoration: none;\n}\n\n#sidebar td.menuitem a:hover {\n\tcolor: #fff;\n\tbackground-color: #708fae;\n\ttext-shadow: #708fae 1pt 1pt;\n}\n\n#sidebar td.menuitem a span {\n\tdisplay: block;\n}\n\n.request, .fs-path {\n\tdisplay: inline-block;\n\tpadding: 2px;\n\tfont-family: Monaco, \"Lucida Console\", \"Bitsteam Vera Sans Mono\", monospace;\n\tfont-size: 8pt;\n\tbackground-color: #fff;\n\tborder: 1px solid #eee;\n}\n\n.keyword {\n\tcolor: #ffba00;\n\tfont-style: italic;\n}\n\n.red {\n\tdisplay: block;\n\tpadding: 10px;\n\tfont-weight: bold;\n\tfont-size: 120%;\n\tcolor: #fff;\n\tbackground-color: #f00;\n}\n\n.green {\n\tdisplay: block;\n\tpadding: 10px;\n\tfont-weight: bold;\n\tfont-size: 120%;\n\tcolor: #fff;\n\tbackground-color: #0c0;\n}\n\n.note {\n\tpadding: 5px;\n\tcolor: #444;\n\tbackground-color: #eaeaea;\n\tfont-style: italic;\n}\n\n.up {\n\tfont-weight: bold;\n\tcolor: #0f0;\n\ttext-transform: uppercase;\n}\n\n.down {\n\tcolor: #f00;\n\ttext-transform: uppercase;\n}\n\n.submit_button {\n\tdisplay: block;\n\tmargin: 10px;\n\tpadding: 5px;\n\tbackground-color: #eee;\n\tborder: 1px solid #ccc;\n}\n\n.submit_button:hover {\n\tcolor: #fff;\n\tbackground-color: #333;\n\tborder: 1px solid #111;\n\tcursor: pointer;\n}\n\n.install_table th, .install_table td {\n\tpadding: 5px 10px;\n\tborder: 1px solid #ddd;\n}\n\n.install_table th {\n\tbackground-color: #eef;\n}\n\n.install_table td {\n\twidth: 180px;\n\ttext-align: center;\n}\n\n.created {\n\tcolor: green;\n\twidth: 80px;\n}\n\n.missing {\n\tcolor: red;\n\twidth: 80px;\n}\n\n.pages {\n\tmargin-top: 20px;\n\tpadding-top: 10px;\n\tcolor: #ccc;\n\ttext-align: center;\n\tborder-top: 1px solid #ddd;\n}\n\n.pages .page-prev, .pages .page-next {\n\tcolor: #94b4d5;\n}\n\n.pages .page-num {\n\tpadding: 0 5px;\n}\n\n.pages .current-page {\n\tcolor: #000000;\n\tfont-weight: bold;\n}\n\n.horizontal-table {\n\tborder-spacing: 0;\n\tborder-collapse: collapse;\n\twidth: 100%;\n}\n\n.horizontal-table th {\n\tpadding: 5px 10px;\n\tbackground-color: #eee;\n}\n\n.horizontal-table td {\n\tpadding: 5px 10px;\n\tbackground-color: #fff;\n}\n\n.horizontal-table th, .horizontal-table td {\n\tfont-size: 9pt;\n\tborder: 1px solid #ddd;\n}\n\n.vertical-table {\n\tborder-spacing: 0;\n\tborder-collapse: collapse;\t\n}\n\n.vertical-table th {\n\tpadding: 5px 10px;\n\tbackground-color: #eee;\n}\n\n.vertical-table td {\n\tpadding: 5px 12px;\n\tbackground-color: #fff;\n}\n\n.vertical-table th, .vertical-table td {\n\tfont-size: 9pt;\n\tborder: 1px solid #ddd;\n}\n\n.vertical-table label {\n\tdisplay: block;\n\tpadding: 5px;\n}\n\n.current-sub-menu {\n\tfont-weight: bold;\n}\n\n.td-checkbox {\n\ttext-align: center;\n}\n\n.td-action {\n\tcolor: #ccc;\n\ttext-align: center;\n}\n\n.vertical-table .td-action {\n\ttext-align: right;\n}\n\n.vertical-table form {\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.not-applicable {\n\tfont-style: italic;\n\tcolor: #bbb;\n}\n\n.state-pending {\n\tcolor: orange;\n}\n\n.state-banned {\n\tcolor: red;\n}\n\n.state-permanently-banned {\n\tfont-weight: bold;\n\tcolor: red;\n}\n\n.raw-txn-log {\n\tpadding: 10px;\n\tfont-family: \"Monaco\", \"Lucida Console\", \"Courier New\", monospace;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n\twidth: 96%;\n\toverflow: scroll;\n}\n\n.online {\n\tcolor: #000;\n}\n\n.offline {\n\tcolor: #aaa;\n}\n\n.info-text-total {\n\tfont-weight: bold;\n}\n\n.info-text-results {\n\tfont-weight: bold;\n}\n\n.info-text {\n\tmargin-bottom: 6px;\n\tpadding: 5px;\n\tcolor: #666;\n\tbackground-color: #fff;\n\tborder: 1px solid #ccc;\n\ttext-align: center;\n}\n\n.toggler {\n\tfont-weight: bold;\n\tfont-style: italic;\n}\n\n.toggler a {\n\tcolor: #26a;\n}\n\n.search-form, search-form2 {\n\tdisplay: none;\n\tmargin: 0 0 10px 0;\n\tpadding: 0;\n\tborder-top: 1px solid #ddd;\n}\n\n.search-form p, .search-form2 p {\n\tmargin: 0;\n\tpadding: 5px;\n\tcolor: #aaa;\n\ttext-align: left;\n\tborder-bottom: 1px solid #ddd;\n}\n\n.search-form label, .search-form2 label {\n\tdisplay: inline-block;\n\tmargin: 0 0 3px 0;\n\tfont-size: 8pt;\n\tfont-style: italic;\n\tcolor: #222;\n}\n\n.search-form input[type=text], .search-form2 input[type=text] {\n\tdisplay: inline-block;\n\tmargin: 0 0 2px 0;\n\tpadding: 2px;\n\tfont-size: 8pt;\n\twidth: 80px;\n}\n\n.search-form input[type=submit], .search-form2 input[type=submit] {\n\tdisplay: inline-block;\n\tmargin: 0 0 2px 0;\n\tfont-size: 8pt;\n\tfont-weight: bold;\n}\n\n.search-form input[type=button], .search-form input[type=reset],\n.search-form2 input[type=button], .search-form2 input[type=reset] {\n\tdisplay: inline-block;\n\tmargin: 0 0 2px 0;\n\tfont-size: 8pt;\n}\n\n.search-form input[type=checkbox], .search-form2 input[type=checkbox] {\n\tdisplay: inline-block;\n\tmargin: 0 0 2px 0;\n}\n\n.search-form select, .search-form2 select {\n\tdisplay: inline-block;\n\tmargin: 2px 0;\n}\n\n#submenu {\n\tcolor: #bbb;\n}\n\n#pagemenu {\n\tmargin-top: 5px;\n\tpadding: 5px 0;\n\tfont-size: 8pt;\n\tcolor: #888;\n\tborder-width: 1px 0;\n\tborder-style: dotted;\n\tborder-color: #ddd;\n}\n\n#pagemenu a {\n\tcolor: #777974;\n\ttext-decoration: underline;\n}\n\n#pagemenu a:hover {\n\tcolor: #729fcf;\n}\n\n#loginbox {\n\tmargin-bottom: 10px;\n\tcolor: #555;\n}\n\n#content {\n\tcolor: #555;\n}\n\n#register_form table td, #login_form table td {\n\tpadding: 1px;\n}\n\n#register_form table th label, #login_form table th label {\n\tdisplay: block;\n\tpadding: 5px;\n\ttext-align: center;\n}\n\n#register_form input[type=text], #register_form input[type=password], #login_form input[type=text], #login_form input[type=password] {\n\twidth: 140px;\n}\n\n#register_form select, #login_form select {\n\twidth: 147px;\n}\n\n#server_status th, #server_status td {\n\tpadding: 8px 12px 8px 12px;\n\ttext-align: left;\n\tborder-bottom: 1px solid #ddd;\t\n}\n\n#server_status {\n\tborder-spacing: 0;\n\tborder-collapse: collapse;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n}\n\n#server_status .server {\n\tcolor: #222;\n}\n\n#server_status .status {\n\ttext-align: center;\n}\n\n#copyright p {\n\tmargin-top: 5px;\n\tmargin-bottom: 0px;\n\tfont-style: italic;\n\tfont-size: 8pt;\n\tcolor: #ccc;\n\ttext-align: right;\n}\n\n#info p {\n\tmargin-top: 5px;\n\tmargin-bottom: 0px;\n\tfont-style: italic;\n\tfont-size: 8pt;\n\tcolor: #aaa;\n\ttext-align: right;\n}\n\n.sortable {\n\tcolor: #444;\n\ttext-decoration: underline;\n}\n\n.sortable:hover {\n\tcolor: #000;\n}\n\n.character-stats {\n\tborder-spacing: 0;\n\tborder-collapse: collapse;\n\tcolor: #ccc;\n}\n\n.character-stats td {\n\tpadding: 0px 10px 5px 0;\n\tborder: 0;\n\ttext-align: center;\n}\n\n.character-stats .stat-name {\n\tcolor: #666;\n}\n\n.character-stats .stat-value {\n\tcolor: #000;\n}\n\n.credit-balance {\n\tfloat: right;\n\tdisplay: inline-block;\n\tpadding: 10px;\n\tcolor: #000;\n\tbackground-color: #eee;\n\tborder: 1px dotted #ddd;\n}\n\n.credit-balance .balance-text {\n\tdisplay: inline-block;\n\tmargin-right: 5px;\n\tcolor: #bbb;\n\ttext-transform: uppercase;\n}\n\n.credit-balance .balance-amount {\n\tfont-weight: bold;\n}\n\n.emblem-server {\n\tmargin: 0 0 2px 0;\n\tpadding: 0 0 2px 0;\n\tfont-size: 120%;\n\tborder-bottom: 1px solid #ddd;\n}\n\n.emblem-server label {\n\tdisplay: block;\n}\n\n.emblem-server label:hover {\n\tcursor: pointer;\n}\n\n.block {\n\tdisplay: block;\n\twidth: 80%;\n\theight: 40px;\n}\n\n.script-line {\n\tfont-family: Monaco, \"Lucida Console\", monospace;\n}\n\n.script-line-num {\n\tdisplay: inline-block;\n\tmargin: 0;\n\tpadding: 5px;\n\tbackground-color: #eee;\n\tborder-right: 1px solid #ddd;\n}\n\n.script-line-code {\n\tdisplay: inline-block;\n\tmargin: 0;\n\tpadding: 5px;\n}\n\n.shop-table {\n\twidth: 100%;\n\tcolor: #000;\n\tborder-spacing: 0 10px;\n\tborder-collapse: separate;\n}\n\n.shop-table td {\n\tpadding: 10px;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n}\n\n.shop-item-image {\n\twidth: 75px;\n\theight: 100px;\n\ttext-align: center;\n}\n\n.shop-item-name {\n\tmargin: 0 0 5px 0;\n\tpadding: 0 0 2px 0;\n\tfont-size: 140%;\n\tcolor: #222;\n\tborder-bottom: 1px solid #eee;\n}\n\n.shop-item-cost-qty {\n\twidth: 150px;\n\tcolor: #aaa;\n\ttext-align: center;\n}\n\n.cost {\n\tcolor: #000;\n\tfont-size: 120%;\n\tfont-weight: bold;\n\ttext-transform: uppercase;\n}\n\n.qty {\n\tcolor: #000;\n}\n\n.shop-item-action {\n\tcolor: #ddd;\n}\n\n.shop-item-action a {\n\tcolor: #80a2c8;\n\tborder-bottom: 1px solid #eee;\n}\n\n.shop-item-action a:hover {\n\tborder-bottom: 1px solid #80a2c8;\n}\n\n.short {\n\twidth: 40px;\n}\n\n.shop-server-name {\n\tcolor: #333;\n}\n\n.shop-item-info {\n\ttext-align: justify;\n}\n\ntextarea {\n\twidth: 320px;\n\theight: 120px;\n}\n\n.cart-items-text {\n\tmargin: 0 0 5px 0;\n\tpadding: 5px;\n\tcolor: #ddd;\n\tbackground-color: #888;\n\tborder: 5px solid #777;\n}\n\n.cart-info-text {\n\tmargin: 0 0 5px 0;\n\tpadding: 0;\n}\n\n.cart-total-text {\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cart-item-name {\n\tcolor: #fff;\n\tborder-bottom: 1px dotted #aaa;\n}\n\n.cart-item-count {\n\tfont-size: 120%;\n\tfont-weight: bold;\n\tcolor: #000;\n}\n\n.cart-sub-total {\n\tcolor: #000;\n}\n\n.cart {\n\twidth: 100%;\n}\n\n.cart label {\n\tdisplay: block;\n}\n\n.cart h4 {\n\tmargin: 10px 0 2px 0;\n\tfont-size: 140%;\n}\n\n.remove-from-cart {\n\twidth: 100%;\n\ttext-align: right;\n}\n\n.checkout-text {\n\tfont-size: 120%;\n\tfont-weight: bold;\n}\n\n.checkout-text a {\n\tborder-bottom: 1px dotted #ccc;\n}\n\n.checkout-text a:hover {\n\tcolor: #000;\n\tborder-bottom: 1px solid #aaa;\n}\n\n.enter-donation-amount {\n\tmargin: 0;\n\tpadding: 0 0 5px 0;\n\tfont-size: 120%;\n}\n\n.donation-amount-text {\n\tmargin: 0;\n\tpadding: 0;\n\tfont-size: 120%;\n\ttext-align: center;\n}\n\n.credit-amount-text {\n\tfont-size: 8pt;\n\ttext-transform: uppercase;\n\tcolor: #bbb;\n\ttext-align: center;\n\tletter-spacing: 1px;\n}\n\n.donation-amount {\n\tfont-weight: bold;\n\tcolor: #000;\n}\n\n.credit-amount {\n\tcolor: #555;\n}\n\n.reset-amount-text {\n\tmargin: 0;\n\tpadding: 0;\n\tfont-size: 8pt;\n\ttext-align: center;\n}\n\n.checkout-info-text {\n\tmargin: 0 0 5px 0;\n\tpadding: 0;\n}\n\n.remaining-balance {\n\tcolor: #000;\n}\n\n.exchange-rate {\n\tfont-size: 120%;\n\tfont-weight: bold;\n\tcolor: #000;\n}\n\n.important {\n\tfont-size: 120%;\n\tcolor: #000;\n}\n\n.important .server-name {\n\tfont-weight: bold;\n}\n\n.generic-form {\n\tpadding: 10px;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n\twidth: auto;\n}\n\n.generic-form-div {\n\tpadding: 10px;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n\twidth: auto;\n}\n.generic-form-table th label {\n\tdisplay: block;\n\tpadding: 6px;\n}\n\n.generic-form-table td div {\n\tdisplay: block;\n\tpadding: 6px 0;\n}\n\n.generic-form-table th {\n\ttext-align: right;\n}\n\n.generic-form-table td input[type=checkbox] {\n\tdisplay: inline-block;\n\tmargin-top: 6px;\n}\n\n.generic-form-table td p {\n\tmargin: 6px 5px;\n\tcolor: #000;\n}\n\n.security-code {\n\tmargin: 5px 0;\n\ttext-align: left;\n\twidth: 145px;\n\theight: 50px;\n}\n\n.action {\n\tcolor: #ddd;\n}\n\n.action a, .action span.anchor {\n\tcolor: #80a2c8;\n\tborder-bottom: 1px solid #eee;\n\tcursor: pointer;\n}\n\n.block-link {\n\tdisplay: block;\n\tpadding: 3px;\n\tcolor: #80a2c8;\n\tborder-bottom: 1px solid #eee;\n}\n\n.button-action {\n\tpadding: 5px 0;\n\ttext-align: left;\n}\n\n.woe-table {\n\tborder-spacing: 0;\n\tborder-collapse: collapse;\n\tbackground-color: #fff;\n\tborder: 1px solid #ddd;\n}\n\n.woe-table th, .woe-table td {\n\tpadding: 5px 10px;\n}\n\n.woe-table th {\n\tfont-weight: normal;\n\tborder-bottom: 1px solid #ddd;\n}\n\n.woe-table td {\n\tfont-size: 120%;\n}\n\n.woe-table .server {\n\tfont-weight: bold;\n}\n\n.woe-table .time {\n\tfont-style: italic;\n\tcolor: #333;\n}\n\n.script {\n\twidth: 98%;\n}\n\n.multi-select {\n\twidth: 100%;\n}\n\n.jump-to-page {\n\tmargin-top: 8px;\n\tfont-size: 8pt;\n\ttext-align: center;\n}\n\n.jump-to-page input {\n\tpadding: 2px;\n\tfont-size: 8pt;\n}\n\n.top-ranked td {\n\tfont-weight: bold;\n\tcolor: #000;\n\tbackground-color: #FFF8DC;\n}\n\n.top-ranked a {\n\tcolor: #000;\n\tborder-bottom: 1px dotted #666;\n}\n\n.empty-row {\n\tdisplay: none;\n}\n\n.item-drop-mvp td {\n\tcolor: #000;\n\tbackground-color: #F8F8FF;\n}\n\n.item-drop-card td {\n\tcolor: #000;\n\tbackground-color: #F0FFFF;\n}\n\n.mvp {\n\tfont-size: xx-small;\n\tfont-weight: bold;\n\tcolor: #ff0000;\n\tvertical-align: top;\n}\n\n.monster-mode {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: square inside;\n}\n\n.monster-mode li {\n\tpadding: 1px;\n\tborder-bottom: 1px dotted #eee;\n}\n\n.equipped td {\n\tbackground-color: #f1ffff;\n}\n\n.job-classes {\n\tborder-spacing: 0;\n}\n\n.job-classes td {\n\tpadding-right: 10px;\n\tborder-right: 1px solid #eee;\n}\n\n.current-shop-category {\n\tfont-weight: bold;\n}\n\n.normalslotted .equipped {\n\tcolor: #25292b;\n}\n\n.overslotted1 {\n\tcolor: #32cd32;\n}\n\n.overslotted2 {\n\tcolor: #00bfff;\n}\n\n.overslotted3 {\n\tcolor: #ffa500;\n}\n\n.overslotted4 {\n\tcolor: #9932cc;\n}\n\n.hold-hours {\n\tcolor: #ffba00;\n\tfont-style: italic;\n}\n"
  },
  {
    "path": "themes/default/donate/complete.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Donation Complete</h2>\n<p class=\"important\">Your transaction has been processed and you should receive credits in a short amount of time.</p>\n<?php $hoursHeld = +(int)Flux::config('HoldUntrustedAccount'); ?>\n<?php if ($hoursHeld): ?>\n\t<p>\n\t\tNote: There is currently an account holding system in effect. If this is your first time donating with the selected account\n\t\tand configured PayPal e-mail address, you will not receive your credits for <?php echo number_format($hoursHeld) ?> hours.\n\t</p>\n<?php endif ?>\n<p>Additionally, an e-mail has been sent to you outlining the details of your transaction.</p>\n<p>You may also view your account history from your PayPal account.</p>\n\n<br />\n<br />\n<p class=\"important\" style=\"text-align: center; font-weight: bold\">“Thank you for your generous donation!”</p>\n<p class=\"important\" style=\"text-align: center\">&mdash; <?php echo htmlspecialchars($session->loginAthenaGroup->serverName) ?></p>\n"
  },
  {
    "path": "themes/default/donate/history.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Donation History</h2>\n<h3>Transactions: Completed</h3>\n<?php if ($completedTxn): ?>\n<p>You have <?php echo number_format($completedTotal) ?> completed transaction(s).</p>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Transaction</th>\n\t\t<th>Payment Date</th>\n\t\t<th>E-mail</th>\n\t\t<th>Amount</th>\n\t\t<th>Currency</th>\n\t\t<th>Credits</th>\n\t</tr>\n\t<?php foreach ($completedTxn as $txn): ?>\n\t<tr>\n\t\t<td><?php echo htmlspecialchars($txn->txn_id) ?></td>\n\t\t<td><?php echo $this->formatDateTime($txn->payment_date) ?></td>\n\t\t<td><?php echo htmlspecialchars($txn->payer_email) ?></td>\n\t\t<td><?php echo htmlspecialchars($txn->mc_gross) ?></td>\n\t\t<td><?php echo htmlspecialchars($txn->mc_currency) ?></td>\n\t\t<td><?php echo number_format($txn->credits) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php else: ?>\n<p>You have no completed transactions.</p>\n<?php endif ?>\n\n<h3>Transactions: Held</h3>\n<?php if ($heldTxn): ?>\n<p>You have <?php echo number_format($heldTotal) ?> held transaction(s).</p>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Transaction</th>\n\t\t<th>Payment Date</th>\n\t\t<th>E-mail</th>\n\t\t<th>Amount</th>\n\t\t<th>Currency</th>\n\t\t<th>Credits</th>\n\t</tr>\n\t<?php foreach ($heldTxn as $txn): ?>\n\t<tr>\n\t\t<td><?php echo htmlspecialchars($txn->txn_id) ?></td>\n\t\t<td><?php echo $this->formatDateTime($txn->payment_date) ?></td>\n\t\t<td><?php echo htmlspecialchars($txn->payer_email) ?></td>\n\t\t<td><?php echo htmlspecialchars($txn->mc_gross) ?></td>\n\t\t<td><?php echo htmlspecialchars($txn->mc_currency) ?></td>\n\t\t<td><?php echo number_format($txn->credits) ?></td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=\"6\">\n\t\t\t↳ Hold Until:\n\t\t\t<strong><?php echo $this->formatDateTime($txn->hold_until) ?></strong>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php else: ?>\n<p>You have no held transactions.</p>\n<?php endif ?>\n\n<h3>Transactions: Failed</h3>\n<?php if ($failedTxn): ?>\n<p>You have <?php echo number_format($failedTotal) ?> held transaction(s).</p>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Transaction</th>\n\t\t<th>Payment Date</th>\n\t\t<th>E-mail</th>\n\t\t<th>Amount</th>\n\t\t<th>Currency</th>\n\t\t<th>Credits</th>\n\t</tr>\n\t<?php foreach ($failedTxn as $txn): ?>\n\t<tr>\n\t\t<td><?php echo htmlspecialchars($txn->txn_id) ?></td>\n\t\t<td><?php echo $this->formatDateTime($txn->payment_date) ?></td>\n\t\t<td><?php echo htmlspecialchars($txn->payer_email) ?></td>\n\t\t<td><?php echo htmlspecialchars($txn->mc_gross) ?></td>\n\t\t<td><?php echo htmlspecialchars($txn->mc_currency) ?></td>\n\t\t<td><?php echo number_format($txn->credits) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php else: ?>\n<p>You have no failed transactions.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/donate/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Donate</h2>\n<?php if (Flux::config('AcceptDonations')): ?>\n\t<?php if (!empty($errorMessage)): ?>\n\t\t<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n\t<?php endif ?>\n\t\n\t<p>By donating, you're supporting the costs of <em>running</em> this server and <em>maintaining</em> it.  In return, you will be rewarded <span class=\"keyword\">donation credits</span> that you may use to purchase items from our <a href=\"<?php echo $this->url('purchase') ?>\">item shop</a>.</p>\n\t<h3>Are you ready to donate?</h3>\n\t<p>All donations towards us are received by PayPal, but don't worry!  Even if you don't have an account with PayPal, you can still use your credit card to donate!</p>\n\t\t\n\t<?php\n\t$currency         = Flux::config('DonationCurrency');\n\t$dollarAmount     = (float)+Flux::config('CreditExchangeRate');\n\t$creditAmount     = 1;\n\t$rateMultiplier   = 10;\n\t$hoursHeld        = +(int)Flux::config('HoldUntrustedAccount');\n\t\n\twhile ($dollarAmount < 1) {\n\t\t$dollarAmount  *= $rateMultiplier;\n\t\t$creditAmount  *= $rateMultiplier;\n\t}\n\t?>\n\t\n\t<?php if ($hoursHeld): ?>\n\t\t<p>To prevent fraudulent payments, our server currently locks the crediting process for\n\t\t\t<span class=\"hold-hours\"><?php echo number_format($hoursHeld) ?> hours</span>\n\t\t\tafter the donation has been made to ensure legitimate gameplay and a healthy PayPal reputation.</p>\n\t\t<p>This hold is applied only once for the associated PayPal e-mail and RO account.</p>\n\t<?php endif ?>\n\n\t<div class=\"generic-form-div\" style=\"margin-bottom: 10px\">\n\t\t<table class=\"generic-form-table\">\n\t\t\t<tr>\n\t\t\t\t<th><label>Current Credit Exchange Rate:</label></th>\n\t\t\t\t<td><p><?php echo $this->formatCurrency($dollarAmount) ?> <?php echo htmlspecialchars($currency) ?>\n\t\t\t\t= <?php echo number_format($creditAmount) ?> credit(s).</p></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label>Minimum Donation Amount:</label></th>\n\t\t\t\t<td><p><?php echo $this->formatCurrency(Flux::config('MinDonationAmount')) ?> <?php echo htmlspecialchars($currency) ?></p></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>\n\t\t\n\t<?php if (!$donationAmount): ?>\n\t<form action=\"<?php echo $this->url ?>\" method=\"post\">\n\t\t<?php echo $this->moduleActionFormInputs($params->get('module')) ?>\n\t\t<input type=\"hidden\" name=\"setamount\" value=\"1\" />\n\t\t<p class=\"enter-donation-amount\">\n\t\t\t<label>\n\t\t\t\tEnter an amount you would like to donate:\n\t\t\t\t<input class=\"money-input\" type=\"text\" name=\"amount\"\n\t\t\t\t\tvalue=\"<?php echo htmlspecialchars($params->get('amount') ?: 0) ?>\"\n\t\t\t\t\tsize=\"<?php echo (strlen((string)+Flux::config('CreditExchangeRate')) * 2) + 2 ?>\" />\n\t\t\t\t<?php echo htmlspecialchars(Flux::config('DonationCurrency')) ?>\n\t\t\t</label>\n\t\t\tor\n\t\t\t<label>\n\t\t\t\t<input class=\"credit-input\" type=\"text\" name=\"credit-amount\"\n\t\t\t\t\tvalue=\"<?php echo htmlspecialchars(intval($params->get('amount') / Flux::config('CreditExchangeRate'))) ?>\"\n\t\t\t\t\tsize=\"<?php echo (strlen((string)+Flux::config('CreditExchangeRate')) * 2) + 2 ?>\" />\n\t\t\t\tCredits\n\t\t\t</label>\n\t\t</p>\n\t\t<input type=\"submit\" value=\"Confirm Donation Amount\" class=\"submit_button\" />\n\t</form>\n\t<?php else: ?>\n\t<p>When you're ready to donate, click the big “Donate” button to proceed with your transaction.\n\t\t(You can choose to donate from your existing PayPal balance or use your credit card if you don't have an account).</p>\n\t\t\n\t<p class=\"credit-amount-text\">\n\t\t&mdash;\n\t\t<span class=\"credit-amount\"><?php echo number_format(floor($donationAmount / Flux::config('CreditExchangeRate'))) ?></span> credits\n\t\t&mdash;\n\t</p>\n\t\t\n\t<p class=\"donation-amount-text\">Amount:\n\t\t<span class=\"donation-amount\">\n\t\t<?php echo $this->formatCurrency($donationAmount) ?>\n\t\t<?php echo htmlspecialchars(Flux::config('DonationCurrency')) ?>\n\t\t</span>\n\t</p>\n\t<p class=\"reset-amount-text\">\n\t\t<a href=\"<?php echo $this->url('donate', 'index', array('resetamount' => true)) ?>\">(Reset Amount)</a>\n\t</p>\n\t<p><?php echo $this->donateButton($donationAmount) ?></p>\n\t<?php endif ?>\n<?php else: ?>\n\t<p><?php echo Flux::message('NotAcceptingDonations') ?></p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/donate/notify.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/donate/trusted.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Trusted PayPal E-mails</h2>\n<?php if ($emails): ?>\n<p>Below is a list of your trusted PayPal e-mail addresses.</p>\n<p>Trusted e-mails do not undergo any holding process, therefore donations made by them will allow you to receive your credits <strong>instantly</strong>.</p>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>E-mail Address</th>\n\t\t<th>Date/Time Established</th>\n\t</tr>\n\t<?php foreach ($emails as $email): ?>\n\t<tr>\n\t\t<td><?php echo htmlspecialchars($email->email) ?></td>\n\t\t<td><?php echo $this->formatDateTime($email->create_date) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php else: ?>\n<p>You do not have any trusted PayPal e-mail addresses.</p>\n<?php if (!Flux::config('HoldUntrustedAccount')): ?>\n<p>This is most likely because the credit holding system is currently <strong>not in effect</strong>, which means a donation made from any e-mail address is immediately accredited.</p>\n<?php endif ?>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/donate/update.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/economy/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Economy</h2>\n"
  },
  {
    "path": "themes/default/errors/missing_action.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('MissingActionHeading')) ?></h2>\n<p><?php echo htmlspecialchars(Flux::message('MissingActionModLabel')) ?> <span class=\"module-name\"><?php echo $this->params->get('module') ?></span>, <?php echo htmlspecialchars(Flux::message('MissingActionActLabel')) ?> <span class=\"module-name\"><?php echo $this->params->get('action') ?></span></p>\n<p><?php echo htmlspecialchars(Flux::message('MissingActionReqLabel')) ?> <span class=\"request\"><?php echo $_SERVER['REQUEST_URI'] ?></span></p>\n<p><?php echo htmlspecialchars(Flux::message('MissingActionLocLabel')) ?> <span class=\"fs-path\"><?php echo $realActionPath ?></span></p>\n"
  },
  {
    "path": "themes/default/errors/missing_view.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('MissingViewHeading')) ?></h2>\n<p><?php echo htmlspecialchars(Flux::message('MissingViewModLabel')) ?> <span class=\"module-name\"><?php echo $this->params->get('module') ?></span>, <?php echo htmlspecialchars(Flux::message('MissingViewActLabel')) ?> <span class=\"module-name\"><?php echo $this->params->get('action') ?></span></p>\n<p><?php echo htmlspecialchars(Flux::message('MissingViewReqLabel')) ?> <span class=\"request\"><?php echo $_SERVER['REQUEST_URI'] ?></span></p>\n<p><?php echo htmlspecialchars(Flux::message('MissingViewLocLabel')) ?> <span class=\"fs-path\"><?php echo $realViewPath ?></span></p>\n"
  },
  {
    "path": "themes/default/footer.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td bgcolor=\"#f5f5f5\"></td>\n\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td><img src=\"<?php echo $this->themePath('img/content_bl.gif') ?>\" style=\"display: block\" /></td>\n\t\t\t\t\t\t\t<td bgcolor=\"#f5f5f5\"></td>\n\t\t\t\t\t\t\t<td><img src=\"<?php echo $this->themePath('img/content_br.gif') ?>\" style=\"display: block\" /></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t\t<!-- Spacing between content and horizontal end-of-page -->\n\t\t\t\t<td style=\"padding: 10px\"></td>\n\t\t\t</tr>\n\t\t\t<?php if (Flux::config('ShowCopyright')): ?>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"3\"></td>\n\t\t\t\t<td id=\"copyright\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Powered by <a href=\"https://github.com/rathena/FluxCP\" target=\"_blank\">FluxCP</a></strong>\n\t\t\t\t\t</p>\n\t\t\t\t</td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<?php endif ?>\n\t\t\t<?php if (Flux::config('ShowRenderDetails')): ?>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"3\"></td>\n\t\t\t\t<td id=\"info\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\tPage generated in <strong><?php echo round(microtime(true) - __START__, 5) ?></strong> second(s).\n\t\t\t\t\t\tNumber of queries executed: <strong><?php echo (int)Flux::$numberOfQueries ?></strong>.\n\t\t\t\t\t\t<?php if (Flux::config('GzipCompressOutput')): ?>Gzip Compression: <strong>Enabled</strong>.<?php endif ?>\n\t\t\t\t\t</p>\n\t\t\t\t</td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<?php endif ?>\n\t\t\t\t\t\t<?php if (count(Flux::$appConfig->get('ThemeName', false)) > 1): ?>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"3\"></td>\n\t\t\t\t<td align=\"right\">\n\t\t\t\t<span>Theme:\n\t\t\t\t\t<select name=\"preferred_theme\" onchange=\"updatePreferredTheme(this)\">\n\t\t\t\t\t\t<?php foreach (Flux::$appConfig->get('ThemeName', false) as $themeName): ?>\n\t\t\t\t\t\t<option value=\"<?php echo htmlspecialchars($themeName) ?>\"<?php if ($session->theme == $themeName) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars($themeName) ?></option>\n\t\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t\t</select>\n\t\t\t\t\t</span>\n\t\t\t\t\t\n\t\t\t\t\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" name=\"preferred_theme_form\" style=\"display: none\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"preferred_theme\" value=\"\" />\n\t\t\t\t\t</form>\n\t\t\t\t</td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<?php endif ?>\n\n            <tr>\n                <td colspan=\"3\"></td>\n                <td align=\"right\">\n                            <span>Language:\n                                <select name=\"preferred_language\" onchange=\"updatePreferredLanguage(this)\">\n                                    <?php foreach (Flux::getAvailableLanguages() as $lang_key => $lang): ?>\n                                        <option value=\"<?php echo htmlspecialchars($lang_key) ?>\"<?php if (!empty($_COOKIE['language']) && $_COOKIE['language'] == $lang_key) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars($lang) ?></option>\n                                    <?php endforeach ?>\n                                    </select>\n                                </span>\n                </td>\n                <td></td>\n            </tr>\n\t\t</table>\n\t</body>\n</html>\n"
  },
  {
    "path": "themes/default/forum/index.php",
    "content": ""
  },
  {
    "path": "themes/default/guild/emblem.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/guild/export.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Export Guild Emblems</h2>\n<p>Please select the servers for which you would like to have the guild emblems exported as an archived ZIP file.</p>\n<form action=\"<?php echo $this->url ?>\" method=\"post\">\n\t<input type=\"hidden\" name=\"post\" value=\"1\" />\n\t<?php foreach ($serverNames as $serverName): ?>\n\t<p class=\"emblem-server\"><label>\n\t\t&raquo;\n\t\t<input type=\"checkbox\" name=\"server[]\" checked=\"checked\" value=\"<?php echo htmlspecialchars($serverName) ?>\" />\n\t\t<span><?php echo htmlspecialchars($serverName) ?></span>\n\t</label></p>\n\t<?php endforeach ?>\n\t<button type=\"submit\" class=\"submit_button\">Export</button>\n</form>\n"
  },
  {
    "path": "themes/default/guild/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Guilds</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module')) ?>\n\t<p>\n\t\t<label for=\"id\">Guild ID:</label>\n\t\t<input type=\"text\" name=\"id\" id=\"id\" value=\"<?php echo htmlspecialchars($params->get('id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"guild_name\">Guild Name:</label>\n\t\t<input type=\"text\" name=\"guild_name\" id=\"guild_name\" value=\"<?php echo htmlspecialchars($params->get('guild_name') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"char_id\">Leader ID:</label>\n\t\t<input type=\"text\" name=\"char_id\" id=\"char_id\" value=\"<?php echo htmlspecialchars($params->get('char_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"master\">Leader Name:</label>\n\t\t<input type=\"text\" name=\"master\" id=\"master\" value=\"<?php echo htmlspecialchars($params->get('master') ?: '') ?>\" />\n\t</p>\n\t<p>\n\t\t<label for=\"guild_level\">Guild Level:</label>\n\t\t<select name=\"guild_level_op\">\n\t\t\t<option value=\"eq\"<?php if (($guild_level_op=$params->get('guild_level_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($guild_level_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($guild_level_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"guild_level\" id=\"guild_level\" value=\"<?php echo htmlspecialchars($params->get('guild_level') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"connect_member\">Online Members:</label>\n\t\t<select name=\"connect_member_op\">\n\t\t\t<option value=\"eq\"<?php if (($connect_member_op=$params->get('connect_member_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($connect_member_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($connect_member_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"connect_member\" id=\"connect_member\" value=\"<?php echo htmlspecialchars($params->get('connect_member') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"max_member\">Capacity:</label>\n\t\t<select name=\"max_member_op\">\n\t\t\t<option value=\"eq\"<?php if (($max_member_op=$params->get('max_member_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($max_member_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($max_member_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"max_member\" id=\"max_member\" value=\"<?php echo htmlspecialchars($params->get('max_member') ?: '') ?>\" />\n\t</p>\n\t<p>\n\t\t<label for=\"average_lv\">Average Level:</label>\n\t\t<select name=\"average_lv_op\">\n\t\t\t<option value=\"eq\"<?php if (($average_lv_op=$params->get('average_lv_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($average_lv_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($average_lv_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"average_lv\" id=\"average_lv\" value=\"<?php echo htmlspecialchars($params->get('average_lv') ?: '') ?>\" />\n\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($guilds): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('guild.guild_id', 'Guild ID') ?></th>\n\t\t<th colspan=\"2\"><?php echo $paginator->sortableColumn('guildName', 'Guild Name') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('charID', 'Leader ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('charName', 'Leader Name') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('guildLevel', 'Guild Level') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('connectMem', 'Online Members') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('maxMem', 'Capacity') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('avgLevel', 'Average Level') ?></th>\n\t</tr>\n\t<?php foreach ($guilds as $guild): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild): ?>\n\t\t\t\t<?php echo $this->linkToGuild($guild->guild_id, $guild->guild_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($guild->guild_id) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<?php if ($guild->emblem): ?>\n\t\t<td width=\"24\"><img src=\"<?php echo $this->emblem($guild->guild_id) ?>\" /></td>\n\t\t<td><?php echo htmlspecialchars($guild->guildName) ?></td>\n\t\t<?php else: ?>\n\t\t<td colspan=\"2\"><?php echo htmlspecialchars($guild->guildName) ?></td>\n\t\t<?php endif ?>\n\t\t<td>\n\t\t\t<?php if ($auth->allowedToViewCharacter): ?>\n\t\t\t\t<?php echo $this->linkToCharacter($guild->charID, $guild->charID) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($guild->charID) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo htmlspecialchars($guild->charName) ?></td>\n\t\t<td><?php echo number_format($guild->guildLevel) ?></td>\n\t\t<td><?php echo number_format($guild->connectMem) ?></td>\n\t\t<td><?php echo number_format($guild->maxMem) ?></td>\n\t\t<td><?php echo number_format($guild->avgLevel) ?></td>\n\t\t\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>No guilds found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/guild/view.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Viewing Guild</h2>\n<?php if ($guild): ?>\n<h3>Guild Information for “<?php echo htmlspecialchars($guild->name) ?>”</h3>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Guild ID</th>\n\t\t<td><?php echo htmlspecialchars($guild->guild_id) ?></td>\n\t\t<th>Guild Name</th>\n\t\t<td><?php echo htmlspecialchars($guild->name) ?></td>\n\t\t<th>Emblem ID</th>\n\t\t<td><?php echo number_format($guild->emblem) ?></td>\n\t\t<td><img src=\"<?php echo $this->emblem($guild->guild_id) ?>\" /></td>\n\t</tr>\n\t<tr>\n\t\t<th>Leader ID</th>\n\t\t<td><?php echo htmlspecialchars($guild->char_id) ?></td>\n\t\t<th>Leader Name</th>\n\t\t<td>\n\t\t\t<?php if ($auth->allowedToViewCharacter): ?>\n\t\t\t\t<?php echo $this->linkToCharacter($guild->char_id, $guild->guild_master) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($guild->guild_master) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th>Guild Level</th>\n\t\t<td colspan=\"2\"><?php echo number_format($guild->guild_lv) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Online Members</th>\n\t\t<td><?php echo number_format($guild->connect_member) ?></td>\n\t\t<th>Capacity</th>\n\t\t<td><?php echo number_format($guild->max_member) ?></td>\n\t\t<th>Average Level</th>\n\t\t<td colspan=\"2\"><?php echo number_format($guild->average_lv) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Guild EXP</th>\n\t\t<td><?php echo number_format($guild->exp) ?></td>\n\t\t<th>EXP until Level Up</th>\n\t\t<td><?php echo number_format($guild->next_exp) ?></td>\n\t\t<th>Skill Point</th>\n\t\t<td colspan=\"2\"><?php echo number_format($guild->skill_point) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Guild Notice 1</th>\n\t\t<td colspan=\"6\">\n\t\t\t<?php if (trim($guild->mes1)): ?>\n\t\t\t\t<?php echo htmlspecialchars($guild->mes1) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Guild Notice 2</th>\n\t\t<td colspan=\"6\">\n\t\t\t<?php if (trim($guild->mes2)): ?>\n\t\t\t\t<?php echo htmlspecialchars($guild->mes2) ?></td>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n</table>\n<h3>Alliances of “<?php echo htmlspecialchars($guild->name) ?>”</h3>\n<?php if ($alliances): ?>\n\t<p><?php echo htmlspecialchars($guild->name) ?> has <?php echo count($alliances) ?> Alliance(s).</p>\n\t<table class=\"vertical-table\">\n\t\t<tr>\n\t\t\t<th>Guild ID</th>\n\t\t\t<th>Guild Name</th>\n\t\t</tr>\n\t\t<?php foreach ($alliances AS $alliance): ?>\n\t\t<tr>\n\t\t\t<td align=\"right\">\n\t\t\t\t<?php if ($auth->allowedToViewGuild): ?>\n\t\t\t\t\t<?php echo $this->linkToGuild($alliance->alliance_id, $alliance->alliance_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($alliance->alliance_id) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td><?php echo htmlspecialchars($alliance->name) ?></td>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t</table>\n<?php else: ?>\n\t<p>There are no alliances for this guild.</p>\n<?php endif ?>\n<h3>Oppositions of “<?php echo htmlspecialchars($guild->name) ?>”</h3>\n<?php if ($oppositions): ?>\n\t<p><?php echo htmlspecialchars($guild->name) ?> has <?php echo count($oppositions) ?> Opposition(s).</p>\n\t<table class=\"vertical-table\">\n\t\t<tr>\n\t\t\t<th>Guild ID</th>\n\t\t\t<th>Guild Name</th>\n\t\t</tr>\n\t\t<?php foreach ($oppositions AS $opposition): ?>\n\t\t<tr>\n\t\t\t<td align=\"right\">\n\t\t\t\t<?php if ($auth->allowedToViewGuild): ?>\n\t\t\t\t\t<?php echo $this->linkToGuild($opposition->alliance_id, $opposition->alliance_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($opposition->alliance_id) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td><?php echo htmlspecialchars($opposition->name) ?></td>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t</table>\n<?php else: ?>\n\t<p>There are no oppositions for this guild.</p>\n<?php endif ?>\n<h3>Guild Members of “<?php echo htmlspecialchars($guild->name) ?>”</h3>\n<?php if ($members): ?>\n\t<p><?php echo htmlspecialchars($guild->name) ?> has <?php echo count($members) ?> guild member(s).</p>\n\t<table class=\"vertical-table\">\n\t\t<tr>\n\t\t\t<th>Name</th>\n\t\t\t<th>Job Class</th>\n\t\t\t<th>Base Level</th>\n\t\t\t<th>Job Level</th>\n\t\t\t<th>EXP Devotion</th>\n\t\t\t<th>Position ID</th>\n\t\t\t<th>Position Name</th>\n\t\t\t<th>Guild Rights</th>\n\t\t\t<th>Tax</th>\n\t\t\t<th>Last Login</th>\n\t\t</tr>\n\t\t<?php foreach ($members AS $member): ?>\n\t\t<tr>\n\t\t\t<td align=\"right\">\n\t\t\t\t<?php if ($auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($member->char_id, $member->name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($member->name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if ($job=$this->jobClassText($member->class)): ?>\n\t\t\t\t\t<?php echo htmlspecialchars($job) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td><?php echo htmlspecialchars($member->base_level) ?></td>\n\t\t\t<td><?php echo htmlspecialchars($member->job_level) ?></td>\n\t\t\t<td><?php echo number_format($member->devotion) ?></td>\n\t\t\t<td><?php echo htmlspecialchars($member->position) ?></td>\n\t\t\t<td><?php echo htmlspecialchars($member->position_name) ?></td>\n\t\t\t<td>\n\t\t\t\t<?php if ($member->mode == 17): ?>\n\t\t\t\t\t<?php echo htmlspecialchars(\"Invite/Expel\") ?>\n\t\t\t\t<?php elseif ($member->mode == 16): ?>\n\t\t\t\t\t<?php echo htmlspecialchars(\"Expel\") ?>\n\t\t\t\t<?php elseif ($member->mode == 1): ?>\n\t\t\t\t\t<?php echo htmlspecialchars(\"Invite\") ?>\n\t\t\t\t<?php elseif ($member->mode == 0): ?>\n\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td><?php echo number_format($member->guild_tax) ?>%</td>\n\t\t\t<td><?php echo htmlspecialchars($member->lastlogin) ?></td>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t</table>\n<?php else: ?>\n\t<p>There are no members in this guild.</p>\n<?php endif ?>\n<h3>Member Expulsions of “<?php echo htmlspecialchars($guild->name) ?>”</h3>\n<?php if ($expulsions): ?>\n\t<p><?php echo htmlspecialchars($guild->name) ?> has <?php echo count($expulsions) ?> member expulsion(s).</p>\n\t<table class=\"vertical-table\">\n\t\t<tr>\n\t\t\t<th>Account ID</th>\n\t\t\t<th>Character Name</th>\n\t\t\t<th>Expulsion Reason</th>\n\t\t</tr>\n\t\t<?php foreach ($expulsions AS $expulsion): ?>\n\t\t<tr>\n\t\t\t<td align=\"right\">\n\t\t\t\t<?php if ($auth->allowedToViewAccount): ?>\n\t\t\t\t\t<?php echo $this->linkToAccount($expulsion->account_id, $expulsion->account_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($expulsion->account_id) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td><?php echo htmlspecialchars($expulsion->name) ?></td>\n\t\t\t<td>\n\t\t\t<?php if($expulsion->mes): ?>\n\t\t\t\t<?php echo htmlspecialchars($expulsion->mes) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t</table>\n<?php else: ?>\n\t<p>There are no member expulsions for this guild.</p>\n<?php endif ?>\n<?php if (!Flux::config('GStorageLeaderOnly') || $amOwner || $auth->allowedToViewGuild): ?>\n\t<h3>Guild Storage Items of “<?php echo htmlspecialchars($guild->name) ?>”</h3>\n\t<?php if (Flux::config('GStorageLeaderOnly')): ?>\n\t\t<p>Note: Guild Storage Items are only visible to you, the guild leader.</p>\n\t<?php endif ?>\n\t<?php if ($items): ?>\n\t\t<p><?php echo htmlspecialchars($guild->name) ?> has <?php echo count($items) ?> guild storage item(s).</p>\n\t\t<table class=\"vertical-table\">\n\t\t\t<tr>\n\t\t\t\t<th>Item ID</th>\n\t\t\t\t<th colspan=\"2\">Name</th>\n\t\t\t\t<th>Amount</th>\n\t\t\t\t<th>Identified</th>\n\t\t\t\t<th>Broken</th>\n\t\t\t\t<th>Slot 1</th>\n\t\t\t\t<th>Slot 2</th>\n\t\t\t\t<th>Slot 3</th>\n\t\t\t\t<th>Slot 4</th>\n\t\t\t\t<?php if($server->isRenewal): ?>\n\t\t\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemRandOptionsLabel')) ?></th>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<th>Extra</th>\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t\t<?php foreach ($items AS $item): ?>\n\t\t\t<?php $icon = $this->iconImage($item->nameid) ?>\n\t\t\t<tr>\n\t\t\t\t<td align=\"right\"><?php echo $this->linkToItem($item->nameid, $item->nameid) ?></td>\n\t\t\t\t<?php if ($icon): ?>\n\t\t\t\t<td><img src=\"<?php echo htmlspecialchars($icon) ?>\" /></td>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<td<?php if (!$icon) echo ' colspan=\"2\"' ?><?php if ($item->cardsOver) echo ' class=\"overslotted' . $item->cardsOver . '\"'; else echo ' class=\"normalslotted\"' ?>>\n\t\t\t\t\t<?php if ($item->refine > 0): ?>\n\t\t\t\t\t\t+<?php echo htmlspecialchars($item->refine) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php if ($item->card0 == 255 && intval($item->card1/1280) > 0): ?>\n                        <?php $itemcard1 = intval($item->card1/1280); ?>\n                        <?php for ($i = 0; $i < $itemcard1; $i++): ?>\n\t\t\t\t\t\t\tVery\n\t\t\t\t\t\t<?php endfor ?>\n\t\t\t\t\t\tStrong\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php if ($item->card0 == 254 || $item->card0 == 255): ?>\n\t\t\t\t\t\t<?php if ($item->char_name): ?>\n\t\t\t\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && ($isMine || (!$isMine && $auth->allowedToViewCharacter))): ?>\n\t\t\t\t\t\t\t\t<?php echo $this->linkToCharacter($item->char_id, $item->char_name, $session->serverName) . \"'s\" ?>\n\t\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t\t<?php echo htmlspecialchars($item->char_name . \"'s\") ?>\n\t\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>'s\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php if ($item->card0 == 255 && array_key_exists($item->card1%1280, $itemAttributes)): ?>\n\t\t\t\t\t\t<?php echo htmlspecialchars($itemAttributes[$item->card1%1280]) ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php if ($item->name_english): ?>\n\t\t\t\t\t\t<span class=\"item_name\"><?php echo htmlspecialchars($item->name_english) ?></span>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\">Unknown Item</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php if ($item->slots): ?>\n\t\t\t\t\t\t<?php echo htmlspecialchars(' [' . $item->slots . ']') ?>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t\t<td><?php echo number_format($item->amount) ?></td>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if ($item->identify): ?>\n\t\t\t\t\t\t<span class=\"identified yes\">Yes</span>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"identified no\">No</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if ($item->attribute): ?>\n\t\t\t\t\t\t<span class=\"broken yes\">Yes</span>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"broken no\">No</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if($item->card0 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t\t<?php if (!empty($cards[$item->card0])): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card0, $cards[$item->card0]) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card0, $item->card0) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if($item->card1 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t\t<?php if (!empty($cards[$item->card1])): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card1, $cards[$item->card1]) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card1, $item->card1) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if($item->card2 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t\t<?php if (!empty($cards[$item->card2])): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card2, $cards[$item->card2]) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card2, $item->card2) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if($item->card3 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n\t\t\t\t\t\t<?php if (!empty($cards[$item->card3])): ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card3, $cards[$item->card3]) ?>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo $this->linkToItem($item->card3, $item->card3) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t\t<?php if($server->isRenewal): ?>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php if($item->rndopt): ?>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<?php foreach($item->rndopt as $rndopt) echo \"<li>\".$this->itemRandOption($rndopt[0], $rndopt[1]).\"</li>\"; ?>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t</td>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if($item->bound == 1):?>\n\t\t\t\t\t\tAccount Bound\n\t\t\t\t\t<?php elseif($item->bound == 2):?>\n\t\t\t\t\t\tGuild Bound\n\t\t\t\t\t<?php elseif($item->bound == 3):?>\n\t\t\t\t\t\tParty Bound\n\t\t\t\t\t<?php elseif($item->bound == 4):?>\n\t\t\t\t\t\tCharacter Bound\n\t\t\t\t\t<?php else:?>\n\t\t\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<?php endforeach ?>\n\t\t</table>\n\t<?php else: ?>\n\t\t<p>There are no guild storage items for this guild.</p>\n\t<?php endif ?>\n<?php endif ?>\n<?php else: ?>\n<p>No such guild was found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/header.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<?php if (isset($metaRefresh)): ?>\n\t\t<meta http-equiv=\"refresh\" content=\"<?php echo $metaRefresh['seconds'] ?>; URL=<?php echo $metaRefresh['location'] ?>\" />\n\t\t<?php endif ?>\n\t\t<title><?php echo Flux::config('SiteTitle'); if (isset($title)) echo \": $title\" ?></title>\n        <link rel=\"icon\" type=\"image/x-icon\" href=\"./favicon.ico\" />\n\t\t<link rel=\"stylesheet\" href=\"<?php echo $this->themePath('css/flux.css') ?>\" type=\"text/css\" media=\"screen\" title=\"\" charset=\"utf-8\" />\n\t\t<link href=\"<?php echo $this->themePath('css/flux/unitip.css') ?>\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" title=\"\" charset=\"utf-8\" />\n\t\t<?php if (Flux::config('EnableReCaptcha')): ?>\n\t\t<link href=\"<?php echo $this->themePath('css/flux/recaptcha.css') ?>\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" title=\"\" charset=\"utf-8\" />\n\t\t<?php endif ?>\n\t\t<!--[if IE]>\n\t\t<link rel=\"stylesheet\" href=\"<?php echo $this->themePath('css/flux/ie.css') ?>\" type=\"text/css\" media=\"screen\" title=\"\" charset=\"utf-8\" />\n\t\t<![endif]-->\t\n\t\t<!--[if lt IE 9]>\n\t\t<script src=\"<?php echo $this->themePath('js/ie9.js') ?>\" type=\"text/javascript\"></script>\n\t\t<script type=\"text/javascript\" src=\"<?php echo $this->themePath('js/flux.unitpngfix.js') ?>\"></script>\n\t\t<![endif]-->\n\t\t<script type=\"text/javascript\" src=\"<?php echo $this->themePath('js/jquery-1.8.3.min.js') ?>\"></script>\n\t\t<script type=\"text/javascript\" src=\"<?php echo $this->themePath('js/flux.datefields.js') ?>\"></script>\n\t\t<script type=\"text/javascript\" src=\"<?php echo $this->themePath('js/flux.unitip.js') ?>\"></script>\n\t\t<script type=\"text/javascript\">\n\t\t\t$(document).ready(function(){\n\t\t\t\tvar inputs = 'input[type=text],input[type=password],input[type=file]';\n\t\t\t\t$(inputs).focus(function(){\n\t\t\t\t\t$(this).css({\n\t\t\t\t\t\t'background-color': '#f9f5e7',\n\t\t\t\t\t\t'border-color': '#dcd7c7',\n\t\t\t\t\t\t'color': '#726c58'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t$(inputs).blur(function(){\n\t\t\t\t\t$(this).css({\n\t\t\t\t\t\t'backgroundColor': '#ffffff',\n\t\t\t\t\t\t'borderColor': '#dddddd',\n\t\t\t\t\t\t'color': '#444444'\n\t\t\t\t\t}, 500);\n\t\t\t\t});\n\t\t\t\t$('.menuitem a').hover(\n\t\t\t\t\tfunction(){\n\t\t\t\t\t\t$(this).fadeTo(200, 0.85);\n\t\t\t\t\t\t$(this).css('cursor', 'pointer');\n\t\t\t\t\t},\n\t\t\t\t\tfunction(){\n\t\t\t\t\t\t$(this).fadeTo(150, 1.00);\n\t\t\t\t\t\t$(this).css('cursor', 'normal');\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t$('.money-input').keyup(function() {\n\t\t\t\t\tvar creditValue = parseInt($(this).val() / <?php echo Flux::config('CreditExchangeRate') ?>, 10);\n\t\t\t\t\tif (isNaN(creditValue))\n\t\t\t\t\t\t$('.credit-input').val('?');\n\t\t\t\t\telse\n\t\t\t\t\t\t$('.credit-input').val(creditValue);\n\t\t\t\t}).keyup();\n\t\t\t\t$('.credit-input').keyup(function() {\n\t\t\t\t\tvar moneyValue = parseFloat($(this).val() * <?php echo Flux::config('CreditExchangeRate') ?>);\n\t\t\t\t\tif (isNaN(moneyValue))\n\t\t\t\t\t\t$('.money-input').val('?');\n\t\t\t\t\telse\n\t\t\t\t\t\t$('.money-input').val(moneyValue.toFixed(2));\n\t\t\t\t}).keyup();\n\t\t\t\t\n\t\t\t\t// In: js/flux.datefields.js\n\t\t\t\tprocessDateFields();\n\t\t\t});\n\t\t\t\n\t\t\tfunction reload(){\n\t\t\t\twindow.location.href = '<?php echo $this->url ?>';\n\t\t\t}\n\t\t</script>\n\t\t\n\t\t<script type=\"text/javascript\">\n\t\t\tfunction updatePreferredServer(sel){\n\t\t\t\tvar preferred = sel.options[sel.selectedIndex].value;\n\t\t\t\tdocument.preferred_server_form.preferred_server.value = preferred;\n\t\t\t\tdocument.preferred_server_form.submit();\n\t\t\t}\n\t\t\t\n\t\t\tfunction updatePreferredTheme(sel){\n\t\t\t\tvar preferred = sel.options[sel.selectedIndex].value;\n\t\t\t\tdocument.preferred_theme_form.preferred_theme.value = preferred;\n\t\t\t\tdocument.preferred_theme_form.submit();\n\t\t\t}\n\n            function updatePreferredLanguage(sel){\n                var preferred = sel.options[sel.selectedIndex].value;\n                setCookie('language', preferred);\n                reload();\n            }\n\n\t\t\t// Preload spinner image.\n\t\t\tvar spinner = new Image();\n\t\t\tspinner.src = '<?php echo $this->themePath('img/spinner.gif') ?>';\n\t\t\t\n\t\t\tfunction refreshSecurityCode(imgSelector){\n\t\t\t\t$(imgSelector).attr('src', spinner.src);\n\t\t\t\t\n\t\t\t\t// Load image, spinner will be active until loading is complete.\n\t\t\t\tvar clean = <?php echo Flux::config('UseCleanUrls') ? 'true' : 'false' ?>;\n\t\t\t\tvar image = new Image();\n\t\t\t\timage.src = \"<?php echo $this->url('captcha') ?>\"+(clean ? '?nocache=' : '&nocache=')+Math.random();\n\t\t\t\t\n\t\t\t\t$(imgSelector).attr('src', image.src);\n\t\t\t}\n\t\t\tfunction toggleSearchForm()\n\t\t\t{\n\t\t\t\t//$('.search-form').toggle();\n\t\t\t\t$('.search-form').slideToggle('fast');\n\t\t\t}\n\n            function setCookie(key, value) {\n                var expires = new Date();\n                expires.setTime(expires.getTime() + expires.getTime()); // never expires\n                document.cookie = key + '=' + value + ';expires=' + expires.toUTCString();\n            }\n\t\t</script>\n\t\t\n\t\t<?php if (Flux::config('EnableReCaptcha')): ?>\n\t\t\t<script src='https://www.google.com/recaptcha/api.js'></script>\n\t\t<?php endif ?>\n\t\t\n\t</head>\n\t<body>\n\t\t<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n\t\t\t<tr>\n\t\t\t\t<!-- Header -->\n\t\t\t\t<td bgcolor=\"#8ebceb\" width=\"20\"></td>\n\t\t\t\t<td bgcolor=\"#8ebceb\" colspan=\"3\">\n\t\t\t\t\t<a href=\"<?php echo $this->basePath ?>\">\n\t\t\t\t\t\t<img src=\"<?php echo $this->themePath($session->account->group_level >= Flux::config('AdminMenuGroupLevel') ? 'img/logo_admin.gif' : 'img/logo.gif') ?>\" id=\"logo\" />\n\t\t\t\t\t</a>\n\t\t\t\t</td>\n\t\t\t\t<td bgcolor=\"#8ebceb\" width=\"20\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<!-- Spacing between header and content -->\n\t\t\t\t<td colspan=\"3\" height=\"20\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td style=\"padding: 10px\"></td>\n\t\t\t\t<td width=\"198\">\n\t\t\t\t\t<!-- Sidebar -->\n\t\t\t\t\t<?php include $this->themePath('main/sidebar.php', true) ?>\n\t\t\t\t</td>\n\t\t\t\t<!-- Spacing between sidebar and content -->\n\t\t\t\t<td style=\"padding: 10px\"></td>\n\t\t\t\t<td width=\"100%\">\n\t\t\t\t\t<!-- Login box / User information -->\n\t\t\t\t\t<?php include $this->themePath('main/loginbox.php', true) ?>\n\t\t\t\t\t\n\t\t\t\t\t<!-- Content -->\n\t\t\t\t\t<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" id=\"content\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td width=\"18\"><img src=\"<?php echo $this->themePath('img/content_tl.gif') ?>\" style=\"display: block\"  /></td>\n\t\t\t\t\t\t\t<td bgcolor=\"#f5f5f5\"></td>\n\t\t\t\t\t\t\t<td width=\"18\"><img src=\"<?php echo $this->themePath('img/content_tr.gif') ?>\" style=\"display: block\" /></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td bgcolor=\"#f5f5f5\"></td>\n\t\t\t\t\t\t\t<td bgcolor=\"#f5f5f5\">\n\t\t\t\t\t\t\t\t<?php if (Flux::config('DebugMode') && @gethostbyname(Flux::config('ServerAddress')) == '127.0.0.1'): ?>\n\t\t\t\t\t\t\t\t\t<p class=\"notice\">Please change your <strong>ServerAddress</strong> directive in your application config to your server's real address (e.g., myserver.com).</p>\n\t\t\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<!-- Messages -->\n\t\t\t\t\t\t\t\t<?php if ($message=$session->getMessage()): ?>\n\t\t\t\t\t\t\t\t\t<p class=\"message\"><?php echo htmlspecialchars($message) ?></p>\n\t\t\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<!-- Sub menu -->\n\t\t\t\t\t\t\t\t<?php include $this->themePath('main/submenu.php', true) ?>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<!-- Page menu -->\n\t\t\t\t\t\t\t\t<?php include $this->themePath('main/pagemenu.php', true) ?>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<!-- Credit balance -->\n\t\t\t\t\t\t\t\t<?php if (in_array($params->get('module'), array('donate', 'purchase'))) include $this->themePath('main/balance.php', true) ?>\n"
  },
  {
    "path": "themes/default/history/cplogin.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('HistoryCpLoginHeading')) ?></h2>\n<?php if ($logins): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('login_date', Flux::message('HistoryLoginDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ip', Flux::message('HistoryIpAddrLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('error_code', Flux::message('HistoryErrorCodeLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($logins as $login): ?>\n\t<tr>\n\t\t<td><?php echo $this->formatDateTime($login->login_date) ?></td>\n\t\t<td>\n\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $login->ip), $login->ip) ?>\n\t\t<?php else: ?>\n\t\t\t<?php echo htmlspecialchars($login->ip) ?>\n\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if (is_null($login->error_code)): ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($login->error_type) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n\t<p>\n\t\t<?php echo htmlspecialchars(Flux::message('HistoryNoCpLogins')) ?>\n\t\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n\t</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/history/emailchange.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit ?>\n<h2><?php echo htmlspecialchars(Flux::message('HistoryEmailHeading')) ?></h2>\n<?php if ($changes): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('request_date', Flux::message('HistoryEmailRequestDate')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('request_ip', Flux::message('HistoryEmailRequestIp')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('old_email', Flux::message('HistoryEmailOldAddress')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('new_email', Flux::message('HistoryEmailNewAddress')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('change_date', Flux::message('HistoryEmailChangeDate')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('change_ip', Flux::message('HistoryEmailChangeIp')) ?></th>\n\t</tr>\n\t<?php foreach ($changes as $change): ?>\n\t<tr>\n\t\t<td><?php echo $this->formatDateTime($change->request_date) ?></td>\n\t\t<td>\n\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $change->request_ip), $change->request_ip) ?>\n\t\t<?php else: ?>\n\t\t\t<?php echo htmlspecialchars($change->request_ip) ?>\n\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t<?php echo $this->linkToAccountSearch(array('email' => $change->old_email), $change->old_email) ?>\n\t\t<?php else: ?>\n\t\t\t<?php echo htmlspecialchars($change->old_email) ?>\n\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t<?php echo $this->linkToAccountSearch(array('email' => $change->new_email), $change->new_email) ?>\n\t\t<?php else: ?>\n\t\t\t<?php echo htmlspecialchars($change->new_email) ?>\n\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($change->change_date): ?>\n\t\t\t\t<?php echo htmlspecialchars($change->change_date) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NeverLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($change->change_ip): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $change->change_ip), $change->change_ip) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($change->change_ip) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('HistoryNoEmailChanges')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/history/gamelogin.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('HistoryGameLoginHeading')) ?></h2>\n<?php if ($logins): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('time', Flux::message('HistoryLoginDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ip', Flux::message('HistoryIpAddrLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('rcode', Flux::message('HistoryRepsCodeLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('log', Flux::message('HistoryLogMessageLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($logins as $login): ?>\n\t<tr>\n\t\t<td><?php echo $this->formatDateTime($login->time) ?></td>\n\t\t<td>\n\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $login->ip), $login->ip) ?>\n\t\t<?php else: ?>\n\t\t\t<?php echo htmlspecialchars($login->ip) ?>\n\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $login->rcode ?></td>\n\t\t<td><?php echo htmlspecialchars($login->log) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('HistoryNoGameLogins')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/history/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('HistoryIndexHeading')) ?></h2>\n<p><?php echo htmlspecialchars(Flux::message('HistoryIndexInfo')) ?></p>\n<p><?php echo htmlspecialchars(Flux::message('HistoryIndexInfo2')) ?></p>\n"
  },
  {
    "path": "themes/default/history/passchange.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit ?>\n<h2><?php echo htmlspecialchars(Flux::message('HistoryPassChangeHeading')) ?></h2>\n<?php if ($changes): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('change_date', Flux::message('HistoryPassChangeChangeDate')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('change_ip', Flux::message('HistoryPassChangeChangeIp')) ?></th>\n\t</tr>\n\t<?php foreach ($changes as $change): ?>\n\t<tr>\n\t\t<td><?php echo htmlspecialchars($change->change_date) ?></td>\n\t\t<td>\n\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $change->change_ip), $change->change_ip) ?>\n\t\t<?php else: ?>\n\t\t\t<?php echo htmlspecialchars($change->change_ip) ?>\n\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('HistoryNoPassChanges')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/history/passreset.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit ?>\n<h2><?php echo htmlspecialchars(Flux::message('HistoryPassResetHeading')) ?></h2>\n<?php if ($resets): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('request_date', Flux::message('HistoryPassResetRequestDate')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('request_ip', Flux::message('HistoryPassResetRequestIp')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('reset_date', Flux::message('HistoryPassResetResetDate')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('reset_ip', Flux::message('HistoryPassResetResetIp')) ?></th>\n\t</tr>\n\t<?php foreach ($resets as $reset): ?>\n\t<tr>\n\t\t<td><?php echo $this->formatDateTime($reset->request_date) ?></td>\n\t\t<td>\n\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $reset->request_ip), $reset->request_ip) ?>\n\t\t<?php else: ?>\n\t\t\t<?php echo htmlspecialchars($reset->request_ip) ?>\n\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($reset->reset_date): ?>\n\t\t\t\t<?php echo htmlspecialchars($reset->reset_date) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NeverLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($reset->reset_ip): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $reset->reset_ip), $reset->reset_ip) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($reset->reset_ip) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('HistoryNoPassResets')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/install/reinstall.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Re-Install Database Schemas</h2>\n<p>You may re-install your database schema files (*.sql files) from this interface. If you are absolutely sure you want to proceed with this then click \"continue\".</p>\n<p><strong>Note:</strong> By doing so, you may end up with duplicate indexes on your MySQL tables, but they are not harmful (this feature is highly experimental).</p>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<input type=\"hidden\" name=\"reinstall\" value=\"1\" />\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<td><p>Are you absolutely sure you want to continue?</p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td><input type=\"submit\" value=\"Continue\" /></td>\n\t\t</tr>\n\t</table>\n</form>\n"
  },
  {
    "path": "themes/default/ipban/add.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('IpbanAddHeading')) ?></h2>\n<?php if (!empty($errorMessage)): ?>\n\t<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<input type=\"hidden\" name=\"addipban\" value=\"1\" />\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<th><label for=\"list\"><?php echo htmlspecialchars(Flux::message('IpbanIpAddressLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"list\" id=\"list\" value=\"<?php echo htmlspecialchars($params->get('list') ?: '') ?>\" /></td>\n\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('IpbanIpAddressInfo')) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label for=\"reason\"><?php echo htmlspecialchars(Flux::message('IpbanReasonLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<textarea name=\"reason\" id=\"reason\" class=\"reason\"><?php echo htmlspecialchars($params->get('reason') ?: '') ?></textarea>\n\t\t\t</td>\n\t\t\t<td></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label><?php echo htmlspecialchars(Flux::message('IpbanUnbanDateLabel')) ?></label></th>\n\t\t\t<td><?php echo $this->dateTimeField('rtime', ($rtime=$params->get('rtime')) ? $rtime : null) ?></td>\n\t\t\t<td></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td></td>\n\t\t\t<td colspan=\"2\"><input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('IpbanAddButton')) ?>\" /></td>\n\t\t</tr>\n\t</table>\n</form>\n"
  },
  {
    "path": "themes/default/ipban/edit.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('IpbanEditHeading')) ?></h2>\n<?php if ($ipban): ?>\n\t<?php if (!empty($errorMessage)): ?>\n\t\t<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n\t<?php endif ?>\n\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t\t<input type=\"hidden\" name=\"modipban\" value=\"1\" />\n\t\t<table class=\"generic-form-table\">\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"list\"><?php echo htmlspecialchars(Flux::message('IpbanIpAddressLabel')) ?></label></th>\n\t\t\t\t<td><input type=\"text\" name=\"newlist\" id=\"list\"\n\t\t\t\t\t\tvalue=\"<?php echo htmlspecialchars(($list=$params->get('newlist')) ? $list : $ipban->list) ?>\" /></td>\n\t\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('IpbanIpAddressInfo')) ?></p></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"reason\"><?php echo htmlspecialchars(Flux::message('IpbanReasonLabel')) ?></label></th>\n\t\t\t\t<td>\n\t\t\t\t\t<textarea name=\"reason\" id=\"reason\" class=\"reason\"><?php\n\t\t\t\t\t\techo htmlspecialchars(($reason=$params->get('reason')) ? $reason : $ipban->reason)\n\t\t\t\t\t?></textarea>\n\t\t\t\t</td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label><?php echo htmlspecialchars(Flux::message('IpbanUnbanDateLabel')) ?></label></th>\n\t\t\t\t<td><?php echo $this->dateTimeField('rtime', ($rtime=$params->get('rtime')) ? $rtime : $ipban->rtime) ?></td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"edit_reason\"><?php echo htmlspecialchars(Flux::message('IpbanEditReasonLabel')) ?></label></th>\n\t\t\t\t<td>\n\t\t\t\t\t<textarea name=\"edit_reason\" id=\"edit_reason\" class=\"edit_reason\"><?php\n\t\t\t\t\t\techo htmlspecialchars(($editReason=$params->get('edit_reason')) ? $editReason : '')\n\t\t\t\t\t?></textarea>\n\t\t\t\t</td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td></td>\n\t\t\t\t<td colspan=\"2\"><input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('IpbanEditButton')) ?>\" /></td>\n\t\t\t</tr>\n\t\t</table>\n\t</form>\n<?php else: ?>\n<p>No such IP ban. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/ipban/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('IpbanListHeading')) ?></h2>\n<?php if ($banlist): ?>\n<?php echo $paginator->infoText() ?>\n<form action=\"<?php echo $this->url('ipban', 'unban') ?>\" method=\"post\">\n\t<input type=\"hidden\" name=\"unban\" value=\"1\" />\n\t<table class=\"horizontal-table\">\n\t\t<tr>\n\t\t\t<?php if ($auth->allowedToRemoveIpBan && $auth->actionAllowed('ipban', 'unban')): ?>\n\t\t\t<th><input type=\"checkbox\" onclick=\"$('.unban-cb').attr('checked', this.checked)\" /></th>\n\t\t\t<?php endif ?>\n\t\t\t<th><?php echo $paginator->sortableColumn('list', Flux::message('IpbanBannedIpLabel')) ?></th>\n\t\t\t<th><?php echo $paginator->sortableColumn('btime', Flux::message('IpbanBanDateLabel')) ?></th>\n\t\t\t<th><?php echo $paginator->sortableColumn('reason', Flux::message('IpbanBanReasonLabel')) ?></th>\n\t\t\t<th><?php echo $paginator->sortableColumn('rtime', Flux::message('IpbanBanExpireLabel')) ?></th>\n\t\t\t<?php if ($auth->allowedToModifyIpBan && $auth->actionAllowed('ipban', 'edit')): ?>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('IpbanModifyLink')) ?></th>\n\t\t\t<?php endif ?>\n\t\t\t<?php if ($auth->allowedToRemoveIpBan && $auth->actionAllowed('ipban', 'remove')): ?>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('IpbanRemoveLink')) ?></th>\n\t\t\t<?php endif ?>\n\t\t</tr>\n\t\t<?php foreach ($banlist as $list): ?>\n\t\t<tr>\n\t\t\t<?php if ($auth->allowedToRemoveIpBan && $auth->actionAllowed('ipban', 'unban')): ?>\n\t\t\t<td align=\"center\">\n\t\t\t\t<input type=\"checkbox\" class=\"unban-cb\" name=\"unban_list[]\" value=\"<?php echo htmlspecialchars($list->list) ?>\" />\n\t\t\t</td>\n\t\t\t<?php endif ?>\n\t\t\t<td>\n\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $list->list), $list->list) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($list->list) ?>\n\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td><?php echo $this->formatDateTime($list->btime) ?></td>\n\t\t\t<td>\n\t\t\t\t<?php if ($list->reason): ?>\n\t\t\t\t\t<?php echo htmlspecialchars($list->reason) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php if (!$list->rtime || $list->rtime == '1000-01-01 00:00:00'): ?>\n\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NeverLabel')) ?></span>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $this->formatDateTime($list->rtime) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<?php if ($auth->allowedToModifyIpBan && $auth->actionAllowed('ipban', 'edit')): ?>\n\t\t\t<td class=\"td-action action\"><a href=\"<?php echo $this->url('ipban', 'edit', array('list' => $list->list)) ?>\"><?php echo htmlspecialchars(Flux::message('IpbanModifyLink')) ?></a></td>\n\t\t\t<?php endif ?>\n\t\t\t<?php if ($auth->allowedToRemoveIpBan && $auth->actionAllowed('ipban', 'remove')): ?>\n\t\t\t<td class=\"td-action action\"><a href=\"<?php echo $this->url('ipban', 'remove', array('list' => $list->list)) ?>\"><?php echo htmlspecialchars(Flux::message('IpbanRemoveLink')) ?></a></td>\n\t\t\t<?php endif ?>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t</table>\n\t<?php if ($auth->allowedToRemoveIpBan && $auth->actionAllowed('ipban', 'unban')): ?>\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<th><label for=\"reason\"><?php echo htmlspecialchars(Flux::message('IpbanRemoveReasonLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<textarea name=\"reason\" id=\"reason\" class=\"reason\"><?php\n\t\t\t\t\techo htmlspecialchars(empty($reason) ? '' : $reason)\n\t\t\t\t?></textarea>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td></td>\n\t\t\t<td class=\"button-action\">\n\t\t\t\t<input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('IpbanUnbanButton')) ?>\" />\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<?php endif ?>\n</form>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('IpbanListNoBans')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/ipban/remove.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('IpbanRemoveHeading')) ?></h2>\n<?php if ($ipban): ?>\n\t<?php if (!empty($errorMessage)): ?>\n\t\t<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n\t<?php endif ?>\n\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t\t<input type=\"hidden\" name=\"remipban\" value=\"1\" />\n\t\t<table class=\"generic-form-table\">\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"list\"><?php echo htmlspecialchars(Flux::message('IpbanIpAddressLabel')) ?></label></th>\n\t\t\t\t<td><input type=\"text\" name=\"list\" id=\"list\"\n\t\t\t\t\t\tvalue=\"<?php echo htmlspecialchars(empty($list) ? '' : $list) ?>\" /></td>\n\t\t\t\t<td><p><?php echo htmlspecialchars(Flux::message('IpbanIpAddressInfo')) ?></p></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><label for=\"reason\"><?php echo htmlspecialchars(Flux::message('IpbanRemoveReasonLabel')) ?></label></th>\n\t\t\t\t<td>\n\t\t\t\t\t<textarea name=\"reason\" id=\"reason\" class=\"reason\"><?php\n\t\t\t\t\t\techo htmlspecialchars(empty($reason) ? '' : $reason)\n\t\t\t\t\t?></textarea>\n\t\t\t\t</td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td></td>\n\t\t\t\t<td colspan=\"2\"><input type=\"submit\" value=\"<?php echo htmlspecialchars(Flux::message('IpbanRemoveButton')) ?>\" /></td>\n\t\t\t</tr>\n\t\t</table>\n\t</form>\n<?php else: ?>\n<p>No such IP ban. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/ipban/unban.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/item/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Items</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form class=\"search-form\" method=\"get\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module')) ?>\n\t<p>\n\t\t<label for=\"item_id\">Item ID:</label>\n\t\t<input type=\"text\" name=\"item_id\" id=\"item_id\" value=\"<?php echo htmlspecialchars($params->get('item_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"name\">Name:</label>\n\t\t<input type=\"text\" name=\"name\" id=\"name\" value=\"<?php echo htmlspecialchars($params->get('name') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"type\">Type:</label>\n\t\t<select name=\"type\">\n\t\t\t<option value=\"-1\"<?php if (($type=$params->get('type')) === '-1') echo ' selected=\"selected\"' ?>>\n\t\t\t\tAny\n\t\t\t</option>\n\t\t\t<?php foreach (Flux::config('ItemTypes')->toArray() as $typeId => $typeName): ?>\n\t\t\t\t<option value=\"<?php echo $typeId ?>\"<?php if (($type=$params->get('type')) === strval($typeId)) echo ' selected=\"selected\"' ?>>\n\t\t\t\t\t<?php echo htmlspecialchars($typeName) ?>\n\t\t\t\t</option>\n\t\t\t\t<?php $itemSubTypes = Flux::config('ItemSubTypes')->toArray() ?>\n\t\t\t\t<?php if (array_key_exists($typeId, $itemSubTypes)): ?>\n\t\t\t\t\t<?php foreach ($itemSubTypes[$typeId] as $subtypeId => $subtypeName): ?>\n\t\t\t\t\t<option value=\"<?php echo $typeId ?>-<?php echo $subtypeId ?>\"<?php if (($type=$params->get('type')) === ($typeId . '-' . $subtypeId)) echo ' selected=\"selected\"' ?>>\n\t\t\t\t\t\t<?php echo htmlspecialchars($typeName . ' - ' . $subtypeName) ?>\n\t\t\t\t\t</option>\n\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php endforeach ?>\n\t\t</select>\n\t\t...\n\t\t<label for=\"equip_loc\">Equip Locations:</label>\n\t\t<select name=\"equip_loc\">\n\t\t\t<option value=\"-1\"<?php if (($equip_loc=$params->get('equip_loc')) === '-1') echo ' selected=\"selected\"' ?>>\n\t\t\t\tAny\n\t\t\t</option>\n\t\t\t<?php foreach (Flux::config('EquipLocations')->toArray() as $locId => $locName): ?>\n\t\t\t\t<option value=\"<?php echo $locId ?>\"<?php if (($equip_loc=$params->get('equip_loc')) === strval($locId)) echo ' selected=\"selected\"' ?>>\n\t\t\t\t\t<?php echo htmlspecialchars($locName) ?>\n\t\t\t\t</option>\n\t\t\t<?php endforeach ?>\n\t\t</select>\n\t</p>\n\t<p>\n\t\t<label for=\"npc_buy\">NPC Buy:</label>\n\t\t<select name=\"npc_buy_op\">\n\t\t\t<option value=\"eq\"<?php if (($npc_buy_op=$params->get('npc_buy_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($npc_buy_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($npc_buy_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"npc_buy\" id=\"npc_buy\" value=\"<?php echo htmlspecialchars($params->get('npc_buy') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"npc_sell\">NPC Sell:</label>\n\t\t<select name=\"npc_sell_op\">\n\t\t\t<option value=\"eq\"<?php if (($npc_sell_op=$params->get('npc_sell_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($npc_sell_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($npc_sell_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"npc_sell\" id=\"npc_sell\" value=\"<?php echo htmlspecialchars($params->get('npc_sell') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"weight\">Weight:</label>\n\t\t<select name=\"weight_op\">\n\t\t\t<option value=\"eq\"<?php if (($weight_op=$params->get('weight_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($weight_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($weight_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"weight\" id=\"weight\" value=\"<?php echo htmlspecialchars($params->get('weight') ?: '') ?>\" />\n\t</p>\n\t<p>\n\t\t<label for=\"range\">Range:</label>\n\t\t<select name=\"range_op\">\n\t\t\t<option value=\"eq\"<?php if (($range_op=$params->get('range_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($range_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($range_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"range\" id=\"range\" value=\"<?php echo htmlspecialchars($params->get('range') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"slots\">Slots:</label>\n\t\t<select name=\"slots_op\">\n\t\t\t<option value=\"eq\"<?php if (($slots_op=$params->get('slots_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($slots_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($slots_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"slots\" id=\"slots\" value=\"<?php echo htmlspecialchars($params->get('slots') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"defense\">Defense:</label>\n\t\t<select name=\"defense_op\">\n\t\t\t<option value=\"eq\"<?php if (($defense_op=$params->get('defense_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($defense_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($defense_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"defense\" id=\"defense\" value=\"<?php echo htmlspecialchars($params->get('defense') ?: '') ?>\" />\n\t</p>\n\t<p>\n\t\t<label for=\"attack\">Attack:</label>\n\t\t<select name=\"attack_op\">\n\t\t\t<option value=\"eq\"<?php if (($attack_op=$params->get('attack_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($attack_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($attack_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"attack\" id=\"attack\" value=\"<?php echo htmlspecialchars($params->get('attack') ?: '') ?>\" />\n\t\t...\n\t\t<?php if($server->isRenewal): ?>\n\t\t<label for=\"magic_attack\">MATK:</label>\n\t\t<select name=\"matk_op\">\n\t\t\t<option value=\"eq\"<?php if (($matk_op=$params->get('matk_op')) == 'eq') echo ' selected=\"selected\"' ?>>is equal to</option>\n\t\t\t<option value=\"gt\"<?php if ($matk_op == 'gt') echo ' selected=\"selected\"' ?>>is greater than</option>\n\t\t\t<option value=\"lt\"<?php if ($matk_op == 'lt') echo ' selected=\"selected\"' ?>>is less than</option>\n\t\t</select>\n\t\t<input type=\"text\" name=\"magic_attack\" id=\"magic_attack\" value=\"<?php echo htmlspecialchars($params->get('magic_attack') ?: '') ?>\" />\n\t\t...\n\t\t<?php endif ?>\n\t\t<label for=\"refineable\">Refineable:</label>\n\t\t<select name=\"refineable\" id=\"refineable\">\n\t\t\t<option value=\"\"<?php if (!($refineable=$params->get('refineable'))) echo ' selected=\"selected\"' ?>>All</option>\n\t\t\t<option value=\"yes\"<?php if ($refineable == 'yes') echo ' selected=\"selected\"' ?>>Yes</option>\n\t\t\t<option value=\"no\"<?php if ($refineable == 'no') echo ' selected=\"selected\"' ?>>No</option>\n\t\t</select>\n\t\t...\n\t\t<label for=\"for_sale\">For Sale:</label>\n\t\t<select name=\"for_sale\" id=\"for_sale\">\n\t\t\t<option value=\"\"<?php if (!($for_sale=$params->get('for_sale'))) echo ' selected=\"selected\"' ?>>All</option>\n\t\t\t<option value=\"yes\"<?php if ($for_sale == 'yes') echo ' selected=\"selected\"' ?>>Yes</option>\n\t\t\t<option value=\"no\"<?php if ($for_sale == 'no') echo ' selected=\"selected\"' ?>>No</option>\n\t\t</select>\n\t\t...\n\t\t<label for=\"custom\">Custom:</label>\n\t\t<select name=\"custom\" id=\"custom\">\n\t\t\t<option value=\"\"<?php if (!($custom=$params->get('custom'))) echo ' selected=\"selected\"' ?>>All</option>\n\t\t\t<option value=\"yes\"<?php if ($custom == 'yes') echo ' selected=\"selected\"' ?>>Yes</option>\n\t\t\t<option value=\"no\"<?php if ($custom == 'no') echo ' selected=\"selected\"' ?>>No</option>\n\t\t</select>\n\t\t...\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($items): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('item_id', 'Item ID') ?></th>\n\t\t<th colspan=\"2\"><?php echo $paginator->sortableColumn('name', 'Name') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('type', 'Type') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('subtype', 'SubType') ?></th>\n\t\t<th>Equip Locations</th>\n\t\t<th><?php echo $paginator->sortableColumn('price_buy', 'NPC Buy') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('price_sell', 'NPC Sell') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('weight', 'Weight') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('attack', 'Attack') ?></th>\n\t\t<?php if($server->isRenewal): ?>\n\t\t<th><?php echo $paginator->sortableColumn('magic_attack', 'MATK') ?></th>\n\t\t<?php endif ?>\n\t\t<th><?php echo $paginator->sortableColumn('defense', 'Defense') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('range', 'Range') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('slots', 'Slots') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('refineable', 'Refineable') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('cost', 'For Sale') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('origin_table', 'Custom') ?></th>\n\t</tr>\n\t<?php foreach ($items as $item): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t<?php echo $this->linkToItem($item->item_id, $item->item_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($item->item_id) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<?php if ($icon=$this->iconImage($item->item_id)): ?>\n\t\t\t<td width=\"24\"><img src=\"<?php echo htmlspecialchars($icon) ?>?nocache=<?php echo rand() ?>\" /></td>\n\t\t\t<td><?php echo htmlspecialchars($item->name ?: '') ?></td>\n\t\t<?php else: ?>\n\t\t\t<td colspan=\"2\"><?php echo htmlspecialchars($item->name ?: '') ?></td>\n\t\t<?php endif ?>\n\t\t<td>\n\t\t\t<?php if ($type=$this->itemTypeText($item->type)): ?>\n\t\t\t\t<?php echo htmlspecialchars($type) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($subtype=$this->itemSubTypeText($item->type, $item->subtype)): ?>\n\t\t\t\t<?php echo htmlspecialchars($subtype) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($equip_locations=$this->equipLocations($item->equip_location)): ?>\n\t\t\t\t<?php echo $equip_locations ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo number_format((int)$item->price_buy) ?></td>\n\t\t<td><?php echo number_format((int)$item->price_sell) ?></td>\n\t\t<td><?php echo round($item->weight ?: 0, 1) ?></td>\n\t\t<td><?php echo number_format((int)$item->attack) ?></td>\n\t\t<?php if($server->isRenewal): ?>\n\t\t\t<td><?php echo number_format((int)$item->magic_attack) ?></td>\n\t\t<?php endif ?>\n\t\t<td><?php echo number_format((int)$item->defense) ?></td>\n\t\t<td><?php echo number_format((int)$item->range) ?></td>\n\t\t<td><?php echo number_format((int)$item->slots) ?></td>\n\t\t<td>\n\t\t\t<?php if ($item->refineable): ?>\n\t\t\t\t<span class=\"refineable yes\">Yes</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"refineable no\">No</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($item->cost): ?>\n\t\t\t\t<span class=\"for-sale yes\"><a href=\"<?php echo $this->url('purchase') ?>\" title=\"Go to Item Shop\">Yes</a></span>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"for-sale no\">No</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if (preg_match('/item_db2$/', $item->origin_table)): ?>\n\t\t\t\tYes\n\t\t\t<?php else: ?>\n\t\t\t\tNo\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n\t<p>No items found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n\t<?php if(Flux::config('Debug')): ?>\n\t\t<?php $msg = sprintf('Error info: %s', print_r($sth->errorInfo(), true)); ?>\n\t\t<?php echo $msg; ?>\n\t<?php endif ?>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/item/iteminfo.php",
    "content": "<?php if (!empty($errorMessage)): ?>\n    <p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<?php if (!empty($successMessage)): ?>\n    <p class=\"green\"><?php echo htmlspecialchars($successMessage) ?></p>\n<?php endif ?>\n\n<h3>PHP Configuration</h3>\n<p>These values must be larger than the size of your itemInfo file.</p>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>PHP Configs</th><td>Value</td>\n\t</tr>\n\t<tr>\n\t\t<th>post_max_size</th><td><?php echo ini_get('post_max_size') ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>upload_max_filesize</th><td><?php echo ini_get('upload_max_filesize') ?></td>\n\t</tr>\n</table>\n<p>ShowItemDesc is <?php if(Flux::config('ShowItemDesc')):?>enabled<?php else: ?>disabled<?php endif ?> in your configuration file.</p>\n\n<h3>Upload itemInfo.lua</h3>\n<form class=\"forms\" method=\"post\" enctype=\"multipart/form-data\">\n    <input type=\"file\" name=\"iteminfo\"><br>\n    <input class=\"btn\" type=\"submit\">\n</form>\n\n<h3>Current Count</h3>\n<p>There are currently <?php echo number_format($return->count) ?> item descriptions in the database</p>\n"
  },
  {
    "path": "themes/default/item/view.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Viewing Item</h2>\n<?php if ($item): ?>\n<?php $icon = $this->iconImage($item->item_id); ?>\n<h3>\n\t<?php if ($icon): ?><img src=\"<?php echo $icon ?>\" /><?php endif ?>\n\t#<?php echo htmlspecialchars($item->item_id) ?>: <?php echo htmlspecialchars($item->name) ?>\n</h3>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Item ID</th>\n\t\t<td><?php echo htmlspecialchars($item->item_id) ?></td>\n\t\t<?php if ($image=$this->itemImage($item->item_id)): ?>\n\t\t<td rowspan=\"<?php echo ($server->isRenewal)?9:8 ?>\" style=\"width: 150px; text-align: center; vertical-alignment: middle\">\n\t\t\t<img src=\"<?php echo $image ?>\" />\n\t\t</td>\n\t\t<?php endif ?>\n\t\t<th>For Sale</th>\n\t\t<td>\n\t\t\t<?php if ($item->cost): ?>\n\t\t\t\t<span class=\"for-sale yes\">\n\t\t\t\t\tYes\n\t\t\t\t</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"for-sale no\">\n\t\t\t\t\tNo\n\t\t\t\t</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Identifier</th>\n\t\t<td><?php echo htmlspecialchars($item->identifier) ?></td>\n\t\t<th>Credit Price</th>\n\t\t<td>\n\t\t\t<?php if ($item->cost): ?>\n\t\t\t\t<?php echo number_format((int)$item->cost) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Not For Sale</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Name</th>\n\t\t<td><?php echo htmlspecialchars($item->name) ?></td>\n\t\t<th>Type</th>\n\t\t<td><?php echo $this->itemTypeText($item->type) ?><?php if($item->subtype) echo ' - '.$this->itemSubTypeText($item->type, $item->subtype) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>NPC Buy</th>\n\t\t<td><?php echo number_format((int)$item->price_buy) ?></td>\n\t\t<th>Weight</th>\n\t\t<td><?php echo round($item->weight, 1) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>NPC Sell</th>\n\t\t<td>\n\t\t\t<?php if (is_null($item->price_sell) && $item->price_buy): ?>\n\t\t\t\t<?php echo number_format(floor($item->price_buy / 2)) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo number_format((int)$item->price_sell) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th>Weapon Level</th>\n\t\t<td><?php echo number_format((int)$item->weapon_level) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Range</th>\n\t\t<td><?php echo number_format((int)$item->range) ?></td>\n\t\t<th>Defense</th>\n\t\t<td><?php echo number_format((int)$item->defense) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Slots</th>\n\t\t<td><?php echo number_format((int)$item->slots) ?></td>\n\t\t<th>Refineable</th>\n\t\t<td>\n\t\t\t<?php if ($item->refineable): ?>\n\t\t\t\tYes\n\t\t\t<?php else: ?>\n\t\t\t\tNo\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Attack</th>\n\t\t<td><?php echo number_format((int)$item->attack) ?></td>\n\t\t<th>Min Equip Level</th>\n\t\t<td>\n\t\t\t<?php if ($item->equip_level_min == 0): ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo number_format((int)$item->equip_level_min) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<?php if($server->isRenewal): ?>\n\t\t\t<th>MATK</th>\n\t\t\t<td><?php echo number_format((int)$item->magic_attack) ?></td>\n\t\t<?php endif ?>\n\t\t<th>Max Equip Level</th>\n\t\t<td colspan=\"<?php echo $image ? 0 : 3 ?>\">\n\t\t\t<?php if ($item->equip_level_max == 0): ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo number_format((int)$item->equip_level_max) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Equip Locations</th>\n\t\t<td colspan=\"<?php echo $image ? 4 : 3 ?>\">\n\t\t\t<?php if ($equip_locations=$this->equipLocations($equip_locs)): ?>\n\t\t\t\t<?php echo $equip_locations ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Equip Upper</th>\n\t\t<td colspan=\"<?php echo $image ? 4 : 3 ?>\">\n\t\t\t<?php if ($this->equipUpper($upper)): ?>\n\t\t\t\t<?php echo htmlspecialchars(implode(' / ', $this->equipUpper($upper))) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Equippable Jobs</th>\n\t\t<td colspan=\"<?php echo $image ? 4 : 3 ?>\">\n\t\t\t<?php if ($this->equippableJobs($jobs)): ?>\n\t\t\t\t<?php echo htmlspecialchars(implode(' / ', $this->equippableJobs($jobs))) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Equip Gender</th>\n\t\t<td colspan=\"<?php echo $image ? 4 : 3 ?>\">\n\t\t\t<?php if ($item->gender == 'Female'): ?>\n\t\t\t\tFemale\n\t\t\t<?php elseif ($item->gender == 'Male'): ?>\n\t\t\t\tMale\n\t\t\t<?php elseif ($item->gender == 'Both' || $item->gender == NULL): ?>\n\t\t\t\tBoth (Male and Female)\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Trade restriction</th>\n\t\t<td colspan=\"<?php echo $image ? 4 : 3 ?>\">\n\t\t\t<?php if ($this->tradeRestrictions($restrictions)): ?>\n\t\t\t\t<?php echo htmlspecialchars(implode(' / ', $this->tradeRestrictions($restrictions))) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php if (($isCustom && $auth->allowedToSeeItemDb2Scripts) || (!$isCustom && $auth->allowedToSeeItemDbScripts)): ?>\n\t<tr>\n\t\t<th>Item Use Script</th>\n\t\t<td colspan=\"<?php echo $image ? 4 : 3 ?>\">\n\t\t\t<?php if ($script=$this->displayScript($item->script)): ?>\n\t\t\t\t<?php echo $script ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Equip Script</th>\n\t\t<td colspan=\"<?php echo $image ? 4 : 3 ?>\">\n\t\t\t<?php if ($script=$this->displayScript($item->equip_script)): ?>\n\t\t\t\t<?php echo $script ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Unequip Script</th>\n\t\t<td colspan=\"<?php echo $image ? 4 : 3 ?>\">\n\t\t\t<?php if ($script=$this->displayScript($item->unequip_script)): ?>\n\t\t\t\t<?php echo $script ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endif ?>\n    <?php if(Flux::config('ShowItemDesc')):?>\n\t<tr>\n\t\t<th>Description</th>\n\t\t<td colspan=\"<?php echo $image ? 4 : 3 ?>\">\n\t\t\t<?php if($item->itemdesc): ?>\n                <?php echo $item->itemdesc ?>\n            <?php else: ?>\n                <span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n    <?php endif ?>\n    \n</table>\n<?php if ($itemDrops): ?>\n<h3><?php echo htmlspecialchars($item->name) ?> Dropped By</h3>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Monster ID</th>\n\t\t<th>Monster Name</th>\n\t\t<th><?php echo htmlspecialchars($item->name) ?> Drop Chance</th>\n\t\t<th>Can be stealed</th>\n\t\t<th>Monster Level</th>\n\t\t<th>Monster Race</th>\n\t\t<th>Monster Element</th>\n\t</tr>\n\t<?php foreach ($itemDrops as $itemDrop): ?>\n\t<tr class=\"item-drop-<?php echo $itemDrop['type'] ?>\">\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('monster', 'view')): ?>\n\t\t\t\t<?php echo $this->linkToMonster($itemDrop['monster_id'], $itemDrop['monster_id']) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $itemDrop['monster_id'] ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($itemDrop['type'] == 'mvp'): ?>\n\t\t\t\t<span class=\"mvp\">MVP!</span>\n\t\t\t<?php endif ?>\n\t\t\t<?php echo htmlspecialchars($itemDrop['monster_name']) ?>\n\t\t</td>\n\t\t<td><strong><?php echo $itemDrop['drop_rate'] ?>%</strong></td>\n\t\t<td><strong><?php echo htmlspecialchars(Flux::message($itemDrop['drop_steal'])) ?></strong></td>\n\t\t<td><?php echo number_format($itemDrop['monster_level']) ?></td>\n\t\t<td><?php echo Flux::monsterRaceName($itemDrop['monster_race']) ?></td>\n\t\t<td>\n\t\t\tLevel <?php echo floor($itemDrop['monster_ele_lv']) ?>\n\t\t\t<em><?php echo Flux::elementName($itemDrop['monster_element']) ?></em>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php endif ?>\n\n<?php else: ?>\n<p>No such item was found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/itemshop/add.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n?>\n<h2>Item Shop</h2>\n<h3>Add Item to the Shop</h3>\n<?php if ($item): ?>\n<?php if (!empty($errorMessage)): ?>\n<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" enctype=\"multipart/form-data\">\n<?php if (!$stackable): ?>\n<input type=\"hidden\" name=\"qty\" value=\"1\" />\n<?php endif ?>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Item ID</th>\n\t\t<td><?php echo $this->linkToItem($item->item_id, $item->item_id) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Name</th>\n\t\t<td><?php echo htmlspecialchars($item->item_name) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th><label for=\"category\">Category</label></th>\n\t\t<td>\n\t\t\t<select name=\"category\" id=\"category\">\n\t\t\t\t<option value=\"none\"<?php if (is_null($category) || strtolower($category) == 'none') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></option>\n\t\t\t\t<?php foreach ($categories as $categoryID => $cat): ?>\n\t\t\t\t\t<option value=\"<?php echo (int)$categoryID ?>\"<?php if ($category === (string)$categoryID) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars($cat) ?></option>\n\t\t\t\t<?php endforeach ?>\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th><label for=\"cost\">Credits</label></th>\n\t\t<td><input type=\"text\" class=\"short\" name=\"cost\" id=\"cost\" value=\"<?php echo htmlspecialchars($params->get('cost') ?: '') ?>\" /></td>\n\t</tr>\n\t<?php if ($stackable): ?>\n\t<tr>\n\t\t<th><label for=\"qty\">Quantity</label></th>\n\t\t<td><input type=\"text\" class=\"short\" name=\"qty\" id=\"qty\" value=\"<?php echo htmlspecialchars($params->get('qty') ?: '') ?>\" /></td>\n\t</tr>\n\t<?php endif ?>\n\t<tr>\n\t\t<th><label for=\"info\">Info</label></th>\n\t\t<td>\n\t\t\t<textarea name=\"info\" id=\"info\"><?php echo htmlspecialchars($params->get('info') ?: '') ?></textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th><label for=\"image\">Image</label></th>\n\t\t<td>\n\t\t\t<input type=\"file\" name=\"image\" id=\"image\" />\n\t\t\t<label>Attempt to use existing item image? <input type=\"checkbox\" name=\"use_existing\" value=\"1\"<?php if ($params->get('use_existing')) echo ' checked=\"checked\"' ?> /></label>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=\"2\" align=\"right\">\n\t\t\t<input type=\"submit\" value=\"Add\" />\n\t\t</td>\n\t</tr>\n</table>\n</form>\n<?php else: ?>\n<p>Cannot add an unknown item to the item shop. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/itemshop/delete.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Item Shop</h2>\n<p>Failed to delete item. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n"
  },
  {
    "path": "themes/default/itemshop/edit.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n?>\n<h2>Item Shop</h2>\n<h3>Modify Item in the Shop</h3>\n<?php if ($item): ?>\n<?php if (!empty($errorMessage)): ?>\n<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" enctype=\"multipart/form-data\">\n<?php if (!$stackable): ?>\n<input type=\"hidden\" name=\"qty\" value=\"1\" />\n<?php endif ?>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Shop ID</th>\n\t\t<td><?php echo htmlspecialchars($item->shop_item_id) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Item ID</th>\n\t\t<td><?php echo $this->linkToItem($item->shop_item_nameid, $item->shop_item_nameid) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Name</th>\n\t\t<td><?php echo htmlspecialchars($item->shop_item_name) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th><label for=\"category\">Category</label></th>\n\t\t<td>\n\t\t\t<select name=\"category\" id=\"category\">\n\t\t\t\t<option value=\"none\"<?php if (is_null($category) || strtolower($category) == 'none') echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></option>\n\t\t\t\t<?php foreach ($categories as $categoryID => $cat): ?>\n\t\t\t\t\t<option value=\"<?php echo (int)$categoryID ?>\"<?php if ($category === (string)$categoryID) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars($cat) ?></option>\n\t\t\t\t<?php endforeach ?>\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th><label for=\"cost\">Credits</label></th>\n\t\t<td><input type=\"text\" class=\"short\" name=\"cost\" id=\"cost\" value=\"<?php echo htmlspecialchars($cost) ?>\" /></td>\n\t</tr>\n\t<?php if ($stackable): ?>\n\t<tr>\n\t\t<th><label for=\"qty\">Quantity</label></th>\n\t\t<td><input type=\"text\" class=\"short\" name=\"qty\" id=\"qty\" value=\"<?php echo htmlspecialchars($quantity) ?>\" /></td>\n\t</tr>\n\t<?php endif ?>\n\t<tr>\n\t\t<th><label for=\"info\">Info</label></th>\n\t\t<td>\n\t\t\t<textarea name=\"info\" id=\"info\"><?php echo htmlspecialchars($info) ?></textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th><label for=\"image\">Image</label></th>\n\t\t<td>\n\t\t\t<input type=\"file\" name=\"image\" id=\"image\" />\n\t\t\t<label>Attempt to use existing item image? <input type=\"checkbox\" name=\"use_existing\" value=\"1\"<?php if ($item->shop_item_use_existing) echo ' checked=\"checked\"' ?> /></label>\n\t\t\t<?php if ($image=$this->shopItemImage($item->shop_item_id)): ?>\n\t\t\t<p>\n\t\t\t\tCurrent image:\n\t\t\t\t<?php if ($auth->actionAllowed('itemshop', 'imagedel')): ?>\n\t\t\t\t\t<a href=\"<?php echo $this->url('itemshop', 'imagedel', array('id' => $item->shop_item_id)) ?>\">(Delete)</a>\n\t\t\t\t<?php endif ?>\n\t\t\t</p>\n\t\t\t<p><img src=\"<?php echo $image ?>\" /></p>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=\"2\" align=\"right\">\n\t\t\t<input type=\"submit\" value=\"Modify\" />\n\t\t</td>\n\t</tr>\n</table>\n</form>\n<?php else: ?>\n<p>Cannot modify an unknown item to the item shop. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/itemshop/imagedel.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/js/flux.datefields.js",
    "content": "function processDateFields(){\n\tvar dateFields = new Array();\n\tvar dateName;\n\tvar dateCheckBox;\n\tvar dateSelects;\n\tvar dateSelects2;\n\t\n\t$(':checkbox').filter(function(){\n\t\treturn /^use_/.test($(this).attr('id'));\n\t}).each(function(){\n\t\tdateFields[dateFields.length] = this.id.substr('use_'.length);\n\t});\n\t\n\tfor (var i = 0; i < dateFields.length; ++i) {\n\t\tdateName     = dateFields[i];\n\t\tdateCheckBox = $('#use_'+dateName);\n\t\tdateSelects  = $('select[name='+dateName+'_year],select[name='+dateName+'_month],select[name='+dateName+'_day]');\n\t\tdateSelects2 = $('select[name='+dateName+'_hour],select[name='+dateName+'_minute],select[name='+dateName+'_second]');\n\n\t\tprocessDateInit(dateCheckBox, dateSelects, dateSelects2);\n\t\tprocessDateBoxes(dateCheckBox, dateSelects, dateSelects2);\n\t}\t\n}\n\nfunction processDateInit(dateCheckBox, dateSelects, dateSelects2){\n\tif ($(dateCheckBox).attr('checked')) {\n\t\tdateEnable(dateSelects);\n\t\tdateEnable(dateSelects2);\n\t}\n\telse {\n\t\tdateDisable(dateSelects);\n\t\tdateDisable(dateSelects2);\n\t}\n}\n\nfunction processDateBoxes(dateCheckBox, dateSelects, dateSelects2){\n\t$(dateCheckBox).click(function(){\n\t\tprocessDateInit(dateCheckBox, dateSelects, dateSelects2);\n\t});\n}\n\nfunction dateEnable(sel){\n\tsel.attr('disabled', false);\n}\n\nfunction dateDisable(sel){\n\tsel.attr('disabled', 'disabled');\n}\n"
  },
  {
    "path": "themes/default/js/flux.unitip.js",
    "content": "// uniTip - written by Nathan Ford for Unit Interactive\n//\n// uniTip is based on qTip:\n// qTip - CSS Tool Tips - by Craig Erskine\n// http://qrayg.com\n\nvar uniTipTag = \"*\"; //Which tag do you want to uniTip-ize? Keep it lowercase. No spaces around commas.//\nvar uniTipClass = \"\"; //Which classes do you want to uniTip-ize? If you leave this blank, then all the tags designated above will get uniTip-ized. Match case. No spaces around commas.\n\nvar uniTipX = 0; // X offset from cursor//\nvar uniTipY = 15; // Y offset from cursor//\n\n//______________________________________________There's no need to edit anything below this line//\n\nvar offsetX = uniTipX, offsetY = uniTipY, elewidth = null, eleheight = null, tipid = null, tiptop = null, tipbot = null, tipcapin=null, tippointin=null, altText=false;\n\nvar x=0, y=0, WinWidth=0, WinHeight=0, TipWidth=0, TipHeight=0, CapHeight=0, PointHeight=0;\n\n// first, find all the correct elements\ninit = function () {\n\tvar elementList = uniTipTag.split(\",\");\n\tfor(var j = 0; j < elementList.length; j++) {\t\n\t\tvar elements = document.getElementsByTagName(elementList[j]);\n\t\t\n\t\tif(elements) {\n\t\t\tfor (var i = 0; i < elements.length; i ++) {\n\t\t\t\tif (uniTipClass != '') {\n\t\t\t\t\n\t\t\t\t\tvar elClass = elements[i].className;\n\t\t\t\t\tvar elClassList = uniTipClass.split(\",\");\n\t\t\t\t\t\n\t\t\t\t\tfor (var h=0; h < elClassList.length; h++) { if (elClass.match(elClassList[h])) unitipize(elements[i]); }\n\t\t\t\t\t\n\t\t\t\t} else unitipize(elements[i]);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// next, add the tooltip function to those elements\nunitipize = function (element) {\n\tvar a = element;\n\tvar id = a.getAttribute('id');\n\t\n\tif (id != null && id.indexOf('recaptcha_') == 0) {\n\t\treturn;\n\t}\n\t\n\t//altText = (a.alt && a.getAttribute(\"alt\") != '' ) ? true : false;\n\t//var sTitle = (altText == true) ? a.getAttribute(\"alt\") : a.getAttribute(\"title\");\t\t\t\t\n\tvar sTitle = a.getAttribute('title');\n\tif(sTitle) {\n\t\ta.onmouseover = function() {build(a, sTitle);};\n\t\ta.onmouseout = function() {hide(a, sTitle);};\n\t}\n}\n\n// now, we build the tooltip\nbuild = function (a, sTitle) {\n\t\n\tif (a.title) a.title = \"\";\n\tif (altText==true) a.alt = \"\";\n\t\n\tvar tipContainer = document.createElement(\"div\");\n\ttipContainer.setAttribute(\"id\", \"unitip\");\n\tdocument.body.appendChild(tipContainer);\n\t\n\tvar tipContainerTop = document.createElement(\"div\");\n\ttipContainerTop.setAttribute(\"id\", \"unitippoint\");\n\ttipContainer.appendChild(tipContainerTop);\n\t\n\tvar tipContainerMid = document.createElement(\"div\");\n\ttipContainerMid.setAttribute(\"id\", \"unitipmid\");\n\ttipContainer.appendChild(tipContainerMid);\n\t\n\tvar tipContainerBot = document.createElement(\"div\");\n\ttipContainerBot.setAttribute(\"id\", \"unitipcap\");\n\ttipContainer.appendChild(tipContainerBot);\n\n\ttipid = document.getElementById(\"unitip\");\n\ttippoint = document.getElementById(\"unitippoint\");\n\ttipmid = document.getElementById(\"unitipmid\");\n\ttipcap = document.getElementById(\"unitipcap\");\n\t\n\tdocument.getElementById(\"unitipmid\").innerHTML = sTitle;\n\ttipid.style.display = \"block\";\n\t\n\telewidth = document.getElementById(\"unitipmid\").offsetWidth;\n\teleheight = document.getElementById(\"unitip\").offsetHeight;\n\t\n\tWinWidth = document.body.offsetWidth;\n\tWinHeight = (document.body.clientHeight < document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight;\n\t\n\tCapHeight = document.getElementById('unitipcap').offsetHeight;\n\tPointHeight = document.getElementById('unitippoint').offsetHeight;\n\t\n\tif (typeof pngfix==\"function\") { // if IE, rebuilds wraps unitippoint and unitipcap in outer div\n\t\tif (tippoint.currentStyle.backgroundImage.match(/\\.png/gi)) {\n\t\t\tvar tipP = tippoint.innerHTML;\n\t\t\t\n\t\t\ttippoint.id = 'unitipP'; // switch unitippoint to outer div\n\t\t\t\n\t\t\ttippoint.style.overflow = \"hidden\";\n\t\t\ttippoint.style.height = PointHeight + \"px\";\n\t\t\ttippoint.style.width = elewidth + \"px\";\n\t\t\ttippoint.style.position = \"relative\";\n\t\t\ttippoint.style.display = \"block\";\n\t\t\t\n\t\t\ttippoint.innerHTML = '<div id=\"unitippoint\">' + tipP + '</div>'; // inject unitippoint\n\t\t\t\n\t\t\ttippointin = document.getElementById(\"unitippoint\");  // redefine styles for unitippoint to fit filter image\n\t\t\ttippointin.style.width = (elewidth * 2) + \"px\";\n\t\t\ttippointin.style.height = (PointHeight * 2) + \"px\";\n\t\t\ttippointin.style.backgroundImage = tippoint.style.backgroundImage;\n\t\t\ttippointin.style.position = \"absolute\";\n\t\t\t\n\t\t\ttippoint.style.backgroundImage = \"none\";\n\t\t}\n\t\tif (tipcap.currentStyle.backgroundImage.match(/\\.png/gi)) {\n\t\t\tvar tipC = tipcap.innerHTML;\n\t\t\t\n\t\t\ttipcap.id = 'unitipC';\n\t\t\t\n\t\t\ttipcap.style.overflow = \"hidden\";\n\t\t\ttipcap.style.height = CapHeight + \"px\";\n\t\t\ttipcap.style.width = elewidth + \"px\";\n\t\t\ttipcap.style.position = \"relative\";\n\t\t\ttipcap.style.display = \"block\";\n\t\t\t\n\t\t\ttipcap.innerHTML = '<div id=\"unitipcap\">' + tipP + '</div>';\n\t\t\t\n\t\t\ttipcapin = document.getElementById(\"unitipcap\");\n\t\t\ttipcapin.style.height = (CapHeight * 2) + \"px\";\n\t\t\ttipcapin.style.backgroundImage = tipcap.style.backgroundImage;\n\t\t\ttipcapin.style.position = \"absolute\";\n\t\t\t\n\t\t\ttipcap.style.backgroundImage = \"none\";\n\t\t}\n\t\t\n\t\tpngfix(); // png fix\n\t\t\n\t}\n\t\n\tdocument.onmousemove = function (evt) {move (evt)};\n}\n\n// now, we track the mouse and make the tooltip follow\nmove = function (evt) {\n\t\n\tif (window.event) {\n\t\tx = window.event.clientX;\n\t\ty = window.event.clientY;\n\t\t\n\t\tif (document.documentElement.scrollLeft) tipid.style.left = (TipWidth >= WinWidth ) ? ((x - offsetX - elewidth) + document.documentElement.scrollLeft) + \"px\" :  (x + offsetX + document.documentElement.scrollLeft) + \"px\";\n\t\telse tipid.style.left = (TipWidth >= WinWidth ) ? ((x - offsetX - elewidth) + document.body.scrollLeft) + \"px\" :  (x + offsetX + document.body.scrollLeft) + \"px\";\n\t\t\n\t\tif (document.documentElement.scrollTop) tipid.style.top = (TipHeight >= WinHeight) ? ((y - offsetY - eleheight) + document.documentElement.scrollTop) + \"px\" : (y + offsetY + document.documentElement.scrollTop) + \"px\";\n\t\telse tipid.style.top = (TipHeight >= WinHeight) ? ((y - offsetY - eleheight) + document.body.scrollTop) + \"px\" : (y + offsetY + document.body.scrollTop) + \"px\";\n\t\t\n\t} else {\n\t\tx = evt.clientX;\n\t\ty = evt.clientY;\t\n\t\t\n\t\ttipid.style.left = (TipWidth >= WinWidth ) ? ((x - offsetX - elewidth) + window.scrollX) + \"px\" :  (x + offsetX + window.scrollX) + \"px\";\n\t\ttipid.style.top = (TipHeight >= WinHeight) ? ((y - offsetY - eleheight) + window.scrollY) + \"px\" : (y + offsetY + window.scrollY) + \"px\";\n\t}\n\t\n\tTipWidth = x + elewidth + 20;\n\tTipHeight = y + eleheight + 20;\n\t\n\tif (TipHeight >= WinHeight ) { // rearrange the inner divs [123 to 321]\n\t\ttipid.removeChild(tippoint);\n\t\ttipid.removeChild(tipmid);\n\t\ttipid.removeChild(tipcap);\n\t\ttipid.appendChild(tipcap);\n\t\ttipid.appendChild(tipmid);\n\t\ttipid.appendChild(tippoint);\n\t} else {  // rearrange the inner divs [321 to 123]\n\t\ttipid.removeChild(tippoint);\n\t\ttipid.removeChild(tipmid);\n\t\ttipid.removeChild(tipcap);\n\t\ttipid.appendChild(tippoint);\n\t\ttipid.appendChild(tipmid);\n\t\ttipid.appendChild(tipcap);\n\t}\n\t\n\tif (TipHeight >= WinHeight) {\n\t\t\n\t\tif (document.getElementById('uniTipP')) {\n\t\t\ttippointin.style.left = (TipWidth >= WinWidth ) ? \"-\" + elewidth + \"px\" : \"0px\";\n\t\t\ttippointin.style.top = \"-\" + PointHeight + \"px\";\n\t\t} else tippoint.style.backgroundPosition = (TipWidth >= WinWidth ) ? \"right bottom\" : \"left bottom\";\n\t\t\n\t\tif (document.getElementById('uniTipC')) tipcapin.style.top = \"-\" + CapHeight + \"px\";\n\t\telse tipcap.style.backgroundPosition = \"0 -\" + CapHeight + \"px\";\n\t\t\n\t} else {\n\t\t\n\t\tif (document.getElementById('uniTipP')) {\n\t\t\ttippointin.style.left = (TipWidth >= WinWidth ) ? \"-\" + elewidth + \"px\" : \"0px\";\n\t\t\ttippointin.style.top = \"0px\";\n\t\t} else tippoint.style.backgroundPosition = (TipWidth >= WinWidth ) ? \"right top\" : \"left top\";\n\t\t\n\t\tif (document.getElementById('uniTipC')) tipcapin.style.top = \"0px\";\n\t\telse tipcap.style.backgroundPosition = \"0 0\";\n\t\t\n\t}\n}\n\n// lastly, hide the tooltip\nhide = function (a, sTitle) {\n\tdocument.getElementById(\"unitipmid\").innerHTML = \"\";\n\tdocument.onmousemove = '';\n\tdocument.body.removeChild(tipid);\n\ttipid.style.display = \"none\";\n\tif (altText==false) a.setAttribute(\"title\", sTitle);\n\telse a.setAttribute(\"alt\", sTitle);\n\taltText=false;\n}\n\n// add the event to the page\nif (window.addEventListener) window.addEventListener(\"load\", init, false);\nif (window.attachEvent) window.attachEvent(\"onload\", init);\n"
  },
  {
    "path": "themes/default/js/flux.unitpngfix.js",
    "content": "var clear=\"img/clear.gif\" //path to clear.gif\n\npngfix=function(){var els=document.getElementsByTagName('*');var ip=/\\.png/i;var i=els.length;while(i-- >0){var el=els[i];var es=el.style;if(el.src&&el.src.match(ip)&&!es.filter){es.height=el.height;es.width=el.width;es.filter=\"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='\"+el.src+\"',sizingMethod='crop')\";el.src=clear;}else{var elb=el.currentStyle.backgroundImage;if(elb.match(ip)){var path=elb.split('\"');var rep=(el.currentStyle.backgroundRepeat=='no-repeat')?'crop':'scale';es.filter=\"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='\"+path[1]+\"',sizingMethod='\"+rep+\"')\";es.height=el.clientHeight+'px';es.backgroundImage='none';var elkids=el.getElementsByTagName('*');if (elkids){var j=elkids.length;if(el.currentStyle.position!=\"absolute\")es.position='static';while (j-- >0)if(!elkids[j].style.position)elkids[j].style.position=\"relative\";}}}}}\nwindow.attachEvent('onload',pngfix);\n"
  },
  {
    "path": "themes/default/js/ie9.js",
    "content": "/*\n  IE7/IE8/IE9.js - copyright 2004-2010, Dean Edwards\n  http://code.google.com/p/ie7-js/\n  http://www.opensource.org/licenses/mit-license.php\n*/\n;(function(N,p){var h=N.IE7={version:\"2.1(beta4)\",toString:bT(\"[IE7]\")};h.compat=9;var t=h.appVersion=navigator.appVersion.match(/MSIE (\\d\\.\\d)/)[1]-0;if(/ie7_off/.test(top.location.search)||t<5.5||t>=h.compat)return;var E=t<6,bj=bT(),bx=p.documentElement,B,x,cy=\"!\",U=\":link{ie7-link:link}:visited{ie7-link:visited}\",cz=/^[\\w\\.]+[^:]*$/;function bk(c,a){if(cz.test(c))c=(a||\"\")+c;return c};function by(c,a){c=bk(c,a);return c.slice(0,c.lastIndexOf(\"/\")+1)};var bU=p.scripts[p.scripts.length-1],cA=by(bU.src);try{var V=new ActiveXObject(\"Microsoft.XMLHTTP\")}catch(ex){}var bl={};function cB(c,a){try{c=bk(c,a);if(!bl[c]){V.open(\"GET\",c,false);V.send();if(V.status==0||V.status==200){bl[c]=V.responseText}}}catch(ex){}return bl[c]||\"\"};var dA=Array.prototype.slice,dB=/%([1-9])/g,cC=/^\\s\\s*/,cD=/\\s\\s*$/,cE=/([\\/()[\\]{}|*+-.,^$?\\\\])/g,bV=/\\bbase\\b/,bW=[\"constructor\",\"toString\"],bm;function F(){};F.extend=function(g,f){bm=true;var d=new this;O(d,g);bm=false;var c=d.constructor;function a(){if(!bm)c.apply(this,arguments)};d.constructor=a;a.extend=arguments.callee;O(a,f);a.prototype=d;return a};F.prototype.extend=function(a){return O(this,a)};var P=\"#\",Q=\"#\",bc=\".\",bn=\"/\",dC=/\\\\(\\d+)/g,cF=/\\[(\\\\.|[^\\]\\\\])+\\]|\\\\.|\\(\\?/g,cG=/\\(/g,cH=/\\$(\\d+)/,cI=/^\\$\\d+$/,cJ=/(\\[(\\\\.|[^\\]\\\\])+\\]|\\\\.|\\(\\?)|\\(/g,cK=/^<#\\w+>$/,cL=/<#(\\w+)>/g,G=F.extend({constructor:function(a){this[bc]=[];this[Q]={};this.merge(a)},add:function(c,a){delete this[bn];if(c instanceof RegExp){c=c.source}if(!this[P+c])this[bc].push(String(c));return this[Q][P+c]=new G.Item(c,a,this)},compile:function(a){if(a||!this[bn]){this[bn]=new RegExp(this,this.ignoreCase?\"gi\":\"g\")}return this[bn]},merge:function(c){for(var a in c)this.add(a,c[a])},exec:function(o){var k=this,l=k[bc],m=k[Q],j,i=this.compile(true).exec(o);if(i){var g=0,f=1;while((j=m[P+l[g++]])){var d=f+j.length+1;if(i[f]){if(j.replacement===0){return k.exec(o)}else{var c=i.slice(f,d),a=c.length;while(--a)c[a]=c[a]||\"\";c[0]={match:c[0],item:j};return c}}f=d}}return null},parse:function(o){o+=\"\";var k=this,l=k[bc],m=k[Q];return o.replace(this.compile(),function(j){var i=[],g,f=1,d=arguments.length;while(--d)i[d]=arguments[d]||\"\";while((g=m[P+l[d++]])){var c=f+g.length+1;if(i[f]){var a=g.replacement;switch(typeof a){case\"function\":return a.apply(k,i.slice(f,c));case\"number\":return i[f+a];default:return a}}f=c}return j})},toString:function(){var g=[],f=this[bc],d=this[Q],c;for(var a=0;c=d[P+f[a]];a++){g[a]=c.source}return\"(\"+g.join(\")|(\")+\")\"}},{IGNORE:null,Item:F.extend({constructor:function(k,l,m){var j=k.indexOf(\"(\")===-1?0:G.count(k),i=m.dictionary;if(i&&k.indexOf(\"<#\")!==-1){if(cK.test(k)){var g=i[Q][P+k.slice(2,-1)];k=g.replacement;j=g._5}else{k=i.parse(k)}}if(typeof l==\"number\")l=String(l);else if(l==null)l=0;if(typeof l==\"string\"&&cH.test(l)){if(cI.test(l)){var f=l.slice(1)-0;if(f&&f<=j)l=f}else{var d=l,c;l=function(a){if(!c){c=new RegExp(k,\"g\"+(this.ignoreCase?\"i\":\"\"))}return a.replace(c,d)}}}this.length=j;this.source=String(k);this.replacement=l}}),count:function(a){return(String(a).replace(cF,\"\").match(cG)||\"\").length}}),cM=G.extend({parse:function(f){var d=this[Q];return f.replace(cL,function(c,a){a=d[P+a];return a?a._6:c})},add:function(g,f){if(f instanceof RegExp){f=f.source}var d=f.replace(cJ,cN);if(f.indexOf(\"(\")!==-1){var c=G.count(f)}if(f.indexOf(\"<#\")!==-1){f=this.parse(f);d=this.parse(d)}var a=this.base(g,f);a._6=d;a._5=c||a.length;return a},toString:function(){return\"(<#\"+this[PATTERNS].join(\">)|(<#\")+\">)\"}});function cN(c,a){return a||\"(?:\"};function O(i,g){if(i&&g){var f=(typeof g==\"function\"?Function:Object).prototype;var d=bW.length,c;if(bm)while(c=bW[--d]){var a=g[c];if(a!=f[c]){if(bV.test(a)){bX(i,c,a)}else{i[c]=a}}}for(c in g)if(typeof f[c]==\"undefined\"){var a=g[c];if(i[c]&&typeof a==\"function\"&&bV.test(a)){bX(i,c,a)}else{i[c]=a}}}return i};function bX(i,g,f){var d=i[g];i[g]=function(){var c=this.base;this.base=d;var a=f.apply(this,arguments);this.base=c;return a}};function cO(f,d){if(!d)d=f;var c={};for(var a in f)c[a]=d[a];return c};function H(g){var f=arguments,d=new RegExp(\"%([1-\"+arguments.length+\"])\",\"g\");return String(g).replace(d,function(c,a){return a<f.length?f[a]:c})};function bo(c,a){return String(c).match(a)||[]};function bY(a){return String(a).replace(cE,\"\\\\$1\")};function bZ(a){return String(a).replace(cC,\"\").replace(cD,\"\")};function bT(a){return function(){return a}};var ca=G.extend({ignoreCase:true}),cP=/'/g,cb=/'(\\d+)'/g,dD=/\\\\/g,bz=/\\\\([nrtf'\"])/g,W=[],cc=new ca({\"<!\\\\-\\\\-|\\\\-\\\\->\":\"\",\"\\\\/\\\\*[^*]*\\\\*+([^\\\\/][^*]*\\\\*+)*\\\\/\":\"\",\"@(namespace|import)[^;\\\\n]+[;\\\\n]\":\"\",\"'(\\\\\\\\.|[^'\\\\\\\\])*'\":cd,'\"(\\\\\\\\.|[^\"\\\\\\\\])*\"':cd,\"\\\\s+\":\" \"});function cQ(a){return cc.parse(a).replace(bz,\"$1\")};function bd(a){return a.replace(cb,cR)};function cd(c){var a=W.length;W[a]=c.slice(1,-1).replace(bz,\"$1\").replace(cP,\"\\\\'\");return\"'\"+a+\"'\"};function cR(d,c){var a=W[c];if(a==null)return d;return\"'\"+W[c]+\"'\"};function bp(a){return a.indexOf(\"'\")===0?W[a.slice(1,-1)]:a};var cS=new G({Width:\"Height\",width:\"height\",Left:\"Top\",left:\"top\",Right:\"Bottom\",right:\"bottom\",onX:\"onY\"});function ce(a){return cS.parse(a)};var cf=[];function bA(a){cT(a);y(N,\"onresize\",a)};function y(d,c,a){d.attachEvent(c,a);cf.push(arguments)};function cU(d,c,a){try{d.detachEvent(c,a)}catch(ex){}};y(N,\"onunload\",function(){var a;while(a=cf.pop()){cU(a[0],a[1],a[2])}});function be(d,c,a){if(!d.elements)d.elements={};if(a)d.elements[c.uniqueID]=c;else delete d.elements[c.uniqueID];return a};y(N,\"onbeforeprint\",function(){if(!h.CSS.print)new cg(\"print\");h.CSS.print.recalc()});var ch=/^\\d+(px)?$/i,X=/^\\d+%$/,C=function(f,d){if(ch.test(d))return parseInt(d);var c=f.style.left,a=f.runtimeStyle.left;f.runtimeStyle.left=f.currentStyle.left;f.style.left=d||0;d=f.style.pixelLeft;f.style.left=c;f.runtimeStyle.left=a;return d},bB=\"ie7-\",ci=F.extend({constructor:function(){this.fixes=[];this.recalcs=[]},init:bj}),bC=[];function cT(a){bC.push(a)};h.recalc=function(){h.HTML.recalc();h.CSS.recalc();for(var a=0;a<bC.length;a++)bC[a]()};function bq(a){return a.currentStyle[\"ie7-position\"]==\"fixed\"};function bD(c,a){return c.currentStyle[bB+a]||c.currentStyle[a]};function Y(d,c,a){if(d.currentStyle[bB+c]==null){d.runtimeStyle[bB+c]=d.currentStyle[c]}d.runtimeStyle[c]=a};function cj(c){var a=p.createElement(c||\"object\");a.style.cssText=\"position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999\";a.ie7_anon=true;return a};var bE=\"(e.nextSibling&&IE7._1(e,'next'))\",ck=bE.replace(/next/g,\"previous\"),cl=\"e.nodeName>'@'\",cm=\"if(\"+cl+\"){\",cn=\"(e.nodeName==='FORM'?IE7._0(e,'id'):e.id)\",cV=/a(#[\\w-]+)?(\\.[\\w-]+)?:(hover|active)/i,cW=/(.*)(:first-(line|letter))/,cX=/\\s/,cY=/((?:\\\\.|[^{\\\\])+)\\{((?:\\\\.|[^}\\\\])+)\\}/g,cZ=/(?:\\\\.|[^,\\\\])+/g,I=p.styleSheets,bF=[];h.CSS=new(ci.extend({parser:new ca,screen:\"\",print:\"\",styles:[],rules:[],pseudoClasses:t<7?\"first\\\\-child\":\"\",dynamicPseudoClasses:{toString:function(){var c=[];for(var a in this)c.push(a);return c.join(\"|\")}},init:function(){var j=\"^\\x01$\",i=\"\\\\[class=?[^\\\\]]*\\\\]\",g=[];if(this.pseudoClasses)g.push(this.pseudoClasses);var f=this.dynamicPseudoClasses.toString();if(f)g.push(f);g=g.join(\"|\");var d=t<7?[\"[>+~\\\\[(]|([:.])[\\\\w-]+\\\\1\"]:[i];if(g)d.push(\":(\"+g+\")\");this.UNKNOWN=new RegExp(d.join(\"|\")||j,\"i\");var c=t<7?[\"\\\\[[^\\\\]]+\\\\]|[^\\\\s(\\\\[]+\\\\s*[+~]\"]:[i],a=c.concat();if(g)a.push(\":(\"+g+\")\");u.COMPLEX=new RegExp(a.join(\"|\")||j,\"ig\");if(this.pseudoClasses)c.push(\":(\"+this.pseudoClasses+\")\");bf.COMPLEX=new RegExp(c.join(\"|\")||j,\"i\");f=\"not\\\\(:\"+f.split(\"|\").join(\"\\\\)|not\\\\(:\")+\"\\\\)|\"+f;bf.MATCH=new RegExp(f?\"(.*?):(\"+f+\")(.*)\":j,\"i\");this.createStyleSheet();this.refresh()},addEventHandler:function(){y.apply(null,arguments)},addFix:function(c,a){this.parser.add(c,a)},addRecalc:function(i,g,f,d){i=i.source||i;g=new RegExp(\"([{;\\\\s])\"+i+\"\\\\s*:\\\\s*\"+g+\"[^;}]*\");var c=this.recalcs.length;if(typeof d==\"string\")d=i+\":\"+d;this.addFix(g,function(a){if(typeof d==\"function\")d=d(a);return(d?d:a)+\";ie7-\"+a.slice(1)+\";ie7_recalc\"+c+\":1\"});this.recalcs.push(arguments);return c},apply:function(){this.getInlineCSS();new cg(\"screen\");this.trash()},createStyleSheet:function(){p.getElementsByTagName(\"head\")[0].appendChild(p.createElement(\"style\"));this.styleSheet=I[I.length-1];this.styleSheet.ie7=true;this.styleSheet.owningElement.ie7=true;this.styleSheet.cssText=U},getInlineCSS:function(){var d=p.getElementsByTagName(\"style\"),c;for(var a=d.length-1;c=d[a];a--){if(!c.disabled&&!c.ie7){c._7=c.innerHTML}}},getText:function(d,c){try{var a=d.cssText}catch(e){a=\"\"}if(V)a=cB(d.href,c)||a;return a},recalc:function(){this.screen.recalc();var q=/ie7_recalc\\d+/g,n=U.match(/[{,]/g).length,o=this.styleSheet.rules,k,l,m,j,i,g,f,d,c;for(g=n;k=o[g];g++){var a=k.style.cssText;if(l=a.match(q)){j=J(k.selectorText);if(j.length)for(f=0;f<l.length;f++){c=l[f];m=h.CSS.recalcs[c.slice(10)][2];for(d=0;(i=j[d]);d++){if(i.currentStyle[c])m(i,a)}}}}},refresh:function(){this.styleSheet.cssText=U+this.screen+this.print},trash:function(){for(var c=0;c<I.length;c++){if(!I[c].ie7){try{var a=I[c].cssText}catch(e){a=\"\"}if(a)I[c].cssText=\"\"}}}}));var cg=F.extend({constructor:function(a){this.media=a;this.load();h.CSS[a]=this;h.CSS.refresh()},createRule:function(d,c){var a;if(R&&(a=d.match(R.MATCH))){return new R(a[1],a[2],c)}else if(a=d.match(bf.MATCH)){if(!cV.test(a[0])||bf.COMPLEX.test(a[0])){return new bf(d,a[1],a[2],a[3],c)}}else{return new u(d,c)}return d+\" {\"+c+\"}\"},getText:function(){var v=/@media\\s+([^{]+?)\\s*\\{([^@]+\\})\\s*\\}/gi,Z=/@import[^;\\n]+/gi,S=/@import\\s+url\\s*\\(\\s*[\"']?|[\"']?\\s*\\)\\s*/gi,ba=/(url\\s*\\(\\s*['\"]?)([\\w\\.]+[^:\\)]*['\"]?\\))/gi,K=this,L={};function z(k,l,m,j){var i=\"\";if(!j){m=q(k.media);j=0}if(m===\"none\"){k.disabled=true;return\"\"}if(m===\"all\"||m===K.media){try{var g=!!k.cssText}catch(exe){}if(j<3&&g){var f=k.cssText.match(Z);for(var d=0,c;d<k.imports.length;d++){var c=k.imports[d];var a=k._2||k.href;c._2=f[d].replace(S,\"\");i+=z(c,by(a,l),m,j+1)}}i+=cQ(k.href?n(k,l):k.owningElement._7);i=A(i,K.media)}return i};for(var w=0;w<I.length;w++){var r=I[w];if(!r.disabled&&!r.ie7)this.cssText+=z(r)}function A(c,a){s.value=a;return c.replace(v,s)};function s(d,c,a){c=q(c);switch(c){case\"screen\":case\"print\":if(c!==s.value)return\"\";case\"all\":return a}return\"\"};function q(d){if(!d)return\"all\";var c=d.toLowerCase().split(/\\s*,\\s*/);d=\"none\";for(var a=0;a<c.length;a++){if(c[a]===\"all\")return\"all\";if(c[a]===\"screen\"){if(d===\"print\")return\"all\";d=\"screen\"}else if(c[a]===\"print\"){if(d===\"screen\")return\"all\";d=\"print\"}}return d};function n(f,d){var c=f._2||f.href,a=bk(c,d);if(L[a])return\"\";L[a]=f.disabled?\"\":o(h.CSS.getText(f,d),by(c,d));return L[a]};function o(c,a){return c.replace(ba,\"$1\"+a.slice(0,a.lastIndexOf(\"/\")+1)+\"$2\")}},load:function(){this.cssText=\"\";this.getText();this.parse();if(bF.length){this.cssText=da(this.cssText)}this.cssText=bd(this.cssText);bl={}},parse:function(){var j=h.CSS.parser.parse(this.cssText),o=\"\";this.cssText=j.replace(/@charset[^;]+;|@font\\-face[^\\}]+\\}/g,function(a){o+=a+\"\\n\";return\"\"});this.declarations=bd(o);var k=h.CSS.rules.length,l=[],m;while((m=cY.exec(this.cssText))){var j=m[2];if(j){var i=t<7&&j.indexOf(\"AlphaImageLoader\")!==-1;var g=m[1].match(cZ),f;for(var d=0;f=g[d];d++){f=bZ(f);var c=h.CSS.UNKNOWN.test(f);g[d]=c?this.createRule(f,j):f+\"{\"+j+\"}\";if(i)g[d]+=this.createRule(f+\">*\",\"position:relative\")}l.push(g.join(\"\\n\"))}}this.cssText=l.join(\"\\n\");this.rules=h.CSS.rules.slice(k)},recalc:function(){var c,a;for(a=0;(c=this.rules[a]);a++)c.recalc()},toString:function(){return this.declarations+\"@media \"+this.media+\"{\"+this.cssText+\"}\"}}),R,u=h.Rule=F.extend({constructor:function(d,c){this.id=h.CSS.rules.length;this.className=u.PREFIX+this.id;var a=d.match(cW);this.selector=(a?a[1]:d)||\"*\";this.selectorText=this.parse(this.selector)+(a?a[2]:\"\");this.cssText=c;this.MATCH=new RegExp(\"\\\\s\"+this.className+\"(\\\\s|$)\",\"g\");h.CSS.rules.push(this);this.init()},init:bj,add:function(a){a.className+=\" \"+this.className},recalc:function(){var c=J(this.selector);for(var a=0;a<c.length;a++)this.add(c[a])},parse:function(g){var f=g.replace(u.CHILD,\" \").replace(u.COMPLEX,\"\");if(t<7)f=f.replace(u.MULTI,\"\");var d=bo(f,u.TAGS).length-bo(g,u.TAGS).length,c=bo(f,u.CLASSES).length-bo(g,u.CLASSES).length+1;while(c>0&&u.CLASS.test(f)){f=f.replace(u.CLASS,\"\");c--}while(d>0&&u.TAG.test(f)){f=f.replace(u.TAG,\"$1*\");d--}f+=\".\"+this.className;c=Math.min(c,2);d=Math.min(d,2);var a=-10*c-d;if(a>0){f=f+\",\"+u.MAP[a]+\" \"+f}return f},remove:function(a){a.className=a.className.replace(this.MATCH,\"$1\")},toString:function(){return H(\"%1 {%2}\",this.selectorText,this.cssText)}},{CHILD:/>/g,CLASS:/\\.[\\w-]+/,CLASSES:/[.:\\[]/g,MULTI:/(\\.[\\w-]+)+/g,PREFIX:\"ie7_class\",TAG:/^\\w+|([\\s>+~])\\w+/,TAGS:/^\\w|[\\s>+~]\\w/g,MAP:{\"1\":\"html\",\"2\":\"html body\",\"10\":\".ie7_html\",\"11\":\"html.ie7_html\",\"12\":\"html.ie7_html body\",\"20\":\".ie7_html .ie7_body\",\"21\":\"html.ie7_html .ie7_body\",\"22\":\"html.ie7_html body.ie7_body\"}}),bf=u.extend({constructor:function(g,f,d,c,a){this.negated=d.indexOf(\"not\")===0;if(this.negated)d=d.slice(5,-1);this.attach=f||\"*\";this.dynamicPseudoClass=h.CSS.dynamicPseudoClasses[d];this.target=c;this.base(g,a)},recalc:function(){var f=J(this.attach),d;for(var c=0;d=f[c];c++){var a=this.target?J(this.target,d):[d];if(a.length)this.dynamicPseudoClass.apply(d,a,this)}}}),M=F.extend({constructor:function(c,a){this.name=c;this.apply=a;this.instances={};h.CSS.dynamicPseudoClasses[c]=this},register:function(g,f){var d=g[2];if(!f&&d.negated){this.unregister(g,true)}else{g.id=d.id+g[0].uniqueID;if(!this.instances[g.id]){var c=g[1],a;for(a=0;a<c.length;a++)d.add(c[a]);this.instances[g.id]=g}}},unregister:function(g,f){var d=g[2];if(!f&&d.negated){this.register(g,true)}else{if(this.instances[g.id]){var c=g[1],a;for(a=0;a<c.length;a++)d.remove(c[a]);delete this.instances[g.id]}}}}),br=new M(\"hover\",function(c){var a=arguments;h.CSS.addEventHandler(c,\"onmouseenter\",function(){br.register(a)});h.CSS.addEventHandler(c,\"onmouseleave\",function(){br.unregister(a)})});y(p,\"onmouseup\",function(){var c=br.instances;for(var a in c)if(!c[a][0].contains(event.srcElement))br.unregister(c[a])});var co={\"=\":\"%1==='%2'\",\"~=\":\"(' '+%1+' ').indexOf(' %2 ')!==-1\",\"|=\":\"%1==='%2'||%1.indexOf('%2-')===0\",\"^=\":\"%1.indexOf('%2')===0\",\"$=\":\"%1.slice(-'%2'.length)==='%2'\",\"*=\":\"%1.indexOf('%2')!==-1\"};co[\"\"]=\"%1!=null\";var T={\"<#attr>\":function(g,f,d,c){var a=\"IE7._0(e,'\"+f+\"')\";c=bp(c);if(d.length>1){if(!c||d===\"~=\"&&cX.test(c)){return\"false&&\"}a=\"(\"+a+\"||'')\"}return\"(\"+H(co[d],a,c)+\")&&\"},\"<#id>\":cn+\"==='$1'&&\",\"<#class>\":\"e.className&&(' '+e.className+' ').indexOf(' $1 ')!==-1&&\",\":first-child\":\"!\"+ck+\"&&\",\":link\":\"e.currentStyle['ie7-link']=='link'&&\",\":visited\":\"e.currentStyle['ie7-link']=='visited'&&\"};h.HTML=new(ci.extend({fixed:{},init:bj,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var f=0;f<this.fixes.length;f++){var d=J(this.fixes[f][0]);var c=this.fixes[f][1];for(var a=0;a<d.length;a++)c(d[a])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var j=0;j<this.recalcs.length;j++){var i=J(this.recalcs[j][0]);var g=this.recalcs[j][1],f;var d=Math.pow(2,j);for(var c=0;(f=i[c]);c++){var a=f.uniqueID;if((this.fixed[a]&d)===0){f=g(f)||f;this.fixed[a]|=d}}}}}));if(t<7){p.createElement(\"abbr\");h.HTML.addRecalc(\"label\",function(c){if(!c.htmlFor){var a=J(\"input,textarea\",c,true);if(a){y(c,\"onclick\",function(){a.click()})}}})}var bg=\"[.\\\\d]\";(function(){var v=h.Layout={};U+=\"*{boxSizing:content-box}\";v.boxSizing=function(a){if(!a.currentStyle.hasLayout){a.style.height=\"0cm\";if(a.currentStyle.verticalAlign===\"auto\")a.runtimeStyle.verticalAlign=\"top\";Z(a)}};function Z(a){if(a!=x&&a.currentStyle.position!==\"absolute\"){S(a,\"marginTop\");S(a,\"marginBottom\")}};function S(g,f){if(!g.runtimeStyle[f]){var d=g.parentElement;var c=f===\"marginTop\";if(d&&d.currentStyle.hasLayout&&!h._1(g,c?\"previous\":\"next\"))return;var a=g[c?\"firstChild\":\"lastChild\"];if(a&&a.nodeName<\"@\")a=h._1(a,c?\"next\":\"previous\");if(a&&a.currentStyle.styleFloat===\"none\"&&a.currentStyle.hasLayout){S(a,f);margin=ba(g,g.currentStyle[f]);childMargin=ba(a,a.currentStyle[f]);if(margin<0||childMargin<0){g.runtimeStyle[f]=margin+childMargin}else{g.runtimeStyle[f]=Math.max(childMargin,margin)}a.runtimeStyle[f]=\"0px\"}}};function ba(c,a){return a===\"auto\"?0:C(c,a)};var K=/^[.\\d][\\w]*$/,L=/^(auto|0cm)$/,z={};v.borderBox=function(a){z.Width(a);z.Height(a)};var w=function(r){z.Width=function(a){if(!X.test(a.currentStyle.width))A(a);if(r)Z(a)};function A(c,a){if(!c.runtimeStyle.fixedWidth){if(!a)a=c.currentStyle.width;c.runtimeStyle.fixedWidth=K.test(a)?Math.max(0,n(c,a))+\"px\":a;Y(c,\"width\",c.runtimeStyle.fixedWidth)}};function s(c){if(!bq(c)){var a=c.offsetParent;while(a&&!a.currentStyle.hasLayout)a=a.offsetParent}return(a||x).clientWidth};function q(c,a){if(X.test(a))return parseInt(parseFloat(a)/100*s(c));return C(c,a)};var n=function(f,d){var c=f.currentStyle[\"ie7-box-sizing\"]===\"border-box\",a=0;if(E&&!c)a+=o(f)+k(f,\"padding\");else if(!E&&c)a-=o(f)+k(f,\"padding\");return q(f,d)+a};function o(a){return a.offsetWidth-a.clientWidth};function k(c,a){return q(c,c.currentStyle[a+\"Left\"])+q(c,c.currentStyle[a+\"Right\"])};U+=\"*{minWidth:none;maxWidth:none;min-width:none;max-width:none}\";v.minWidth=function(a){if(a.currentStyle[\"min-width\"]!=null){a.style.minWidth=a.currentStyle[\"min-width\"]}if(be(arguments.callee,a,a.currentStyle.minWidth!==\"none\")){v.boxSizing(a);A(a);l(a)}};eval(\"IE7.Layout.maxWidth=\"+String(v.minWidth).replace(/min/g,\"max\"));function l(d){if(d==p.body){var c=d.clientWidth}else{var a=d.getBoundingClientRect();c=a.right-a.left}if(d.currentStyle.minWidth!==\"none\"&&c<n(d,d.currentStyle.minWidth)){d.runtimeStyle.width=d.currentStyle.minWidth}else if(d.currentStyle.maxWidth!==\"none\"&&c>=n(d,d.currentStyle.maxWidth)){d.runtimeStyle.width=d.currentStyle.maxWidth}else{d.runtimeStyle.width=d.runtimeStyle.fixedWidth}};function m(a){if(be(m,a,/^(fixed|absolute)$/.test(a.currentStyle.position)&&bD(a,\"left\")!==\"auto\"&&bD(a,\"right\")!==\"auto\"&&L.test(bD(a,\"width\")))){j(a);v.boxSizing(a)}};v.fixRight=m;function j(d){var c=q(d,d.runtimeStyle._3||d.currentStyle.left),a=s(d)-q(d,d.currentStyle.right)-c-k(d,\"margin\");if(parseInt(d.runtimeStyle.width)===a)return;d.runtimeStyle.width=\"\";if(bq(d)||r||d.offsetWidth<a){if(!E)a-=o(d)+k(d,\"padding\");if(a<0)a=0;d.runtimeStyle.fixedWidth=a;Y(d,\"width\",a)}};var i=0;bA(function(){if(!x)return;var g,f=(i<x.clientWidth);i=x.clientWidth;var d=v.minWidth.elements;for(g in d){var c=d[g];var a=(parseInt(c.runtimeStyle.width)===n(c,c.currentStyle.minWidth));if(f&&a)c.runtimeStyle.width=\"\";if(f==a)l(c)}var d=v.maxWidth.elements;for(g in d){var c=d[g];var a=(parseInt(c.runtimeStyle.width)===n(c,c.currentStyle.maxWidth));if(!f&&a)c.runtimeStyle.width=\"\";if(f!==a)l(c)}for(g in m.elements)j(m.elements[g])});if(E){h.CSS.addRecalc(\"width\",bg,z.Width)}if(t<7){h.CSS.addRecalc(\"max-width\",bg,v.maxWidth);h.CSS.addRecalc(\"right\",bg,m)}else if(t==7){if(r)h.CSS.addRecalc(\"height\",\"[\\\\d.]+%\",function(element){element.runtimeStyle.pixelHeight=parseInt(s(element)*element.currentStyle[\"ie7-height\"].slice(0,-1)/100)})}};eval(\"var _8=\"+ce(w));w();_8(true);if(t<7){h.CSS.addRecalc(\"min-width\",bg,v.minWidth);h.CSS.addFix(/\\bmin-height\\s*/,\"height\")}})();var bG=bk(\"blank.gif\",cA),bH=\"DXImageTransform.Microsoft.AlphaImageLoader\",cp=\"progid:\"+bH+\"(src='%1',sizingMethod='%2')\",bh,bi=[];function cq(c){if(bh.test(c.src)){var a=new Image(c.width,c.height);a.onload=function(){c.width=a.width;c.height=a.height;a=null};a.src=c.src;c.pngSrc=c.src;bs(c)}};if(t<7){h.CSS.addFix(/background(-image)?\\s*:\\s*([^};]*)?url\\(([^\\)]+)\\)([^;}]*)?/,function(g,f,d,c,a){c=bp(c);return bh.test(c)?\"filter:\"+H(cp,c,a.indexOf(\"no-repeat\")===-1?\"scale\":\"crop\")+\";zoom:1;background\"+(f||\"\")+\":\"+(d||\"\")+\"none\"+(a||\"\"):g});h.CSS.addRecalc(/list\\-style(\\-image)?/,\"[^};]*url\",function(f){var d=f.currentStyle.listStyleImage.slice(5,-2);if(bh.test(d)){if(f.nodeName===\"LI\"){cr(f,d)}else if(f.nodeName===\"UL\"){for(var c=0,a;a=f.childNodes[c];c++){if(a.nodeName===\"LI\")cr(a,d)}}}});function cr(i,g){var f=i.runtimeStyle,d=i.offsetHeight,c=new Image;c.onload=function(){var a=i.currentStyle.paddingLeft;a=a===\"0px\"?0:C(i,a);f.paddingLeft=(a+this.width)+\"px\";f.marginLeft=-this.width+\"px\";f.listStyleType=\"none\";f.listStyleImage=\"none\";f.paddingTop=Math.max(d-i.offsetHeight,0)+\"px\";bs(i,\"crop\",g);i.style.zoom=\"100%\"};c.src=g};h.HTML.addRecalc(\"img,input\",function(a){if(a.nodeName===\"INPUT\"&&a.type!==\"image\")return;cq(a);y(a,\"onpropertychange\",function(){if(!bI&&event.propertyName===\"src\"&&a.src.indexOf(bG)===-1)cq(a)})});var bI=false;y(N,\"onbeforeprint\",function(){bI=true;for(var a=0;a<bi.length;a++)db(bi[a])});y(N,\"onafterprint\",function(){for(var a=0;a<bi.length;a++)bs(bi[a]);bI=false})}function bs(f,d,c){var a=f.filters[bH];if(a){a.src=c||f.src;a.enabled=true}else{f.runtimeStyle.filter=H(cp,c||f.src,d||\"scale\");bi.push(f)}f.src=bG};function db(a){a.src=a.pngSrc;a.filters[bH].enabled=false};(function(){if(t>=7)return;h.CSS.addRecalc(\"position\",\"fixed\",o,\"absolute\");h.CSS.addRecalc(\"background(-attachment)?\",\"[^};]*fixed\",q);var z=E?\"body\":\"documentElement\";function w(){if(B.currentStyle.backgroundAttachment!==\"fixed\"){if(B.currentStyle.backgroundImage===\"none\"){B.runtimeStyle.backgroundRepeat=\"no-repeat\";B.runtimeStyle.backgroundImage=\"url(\"+bG+\")\"}B.runtimeStyle.backgroundAttachment=\"fixed\"}w=bj};var r=cj(\"img\");function A(a){return a?bq(a)||A(a.parentElement):false};function s(d,c,a){setTimeout(\"document.all.\"+d.uniqueID+\".runtimeStyle.setExpression('\"+c+\"','\"+a+\"')\",0)};function q(a){if(be(q,a,a.currentStyle.backgroundAttachment===\"fixed\"&&!a.contains(B))){w();j.bgLeft(a);j.bgTop(a);n(a)}};function n(c){r.src=c.currentStyle.backgroundImage.slice(5,-2);var a=c.canHaveChildren?c:c.parentElement;a.appendChild(r);j.setOffsetLeft(c);j.setOffsetTop(c);a.removeChild(r)};function o(a){if(be(o,a,bq(a))){Y(a,\"position\",\"absolute\");Y(a,\"left\",a.currentStyle.left);Y(a,\"top\",a.currentStyle.top);w();h.Layout.fixRight(a);k(a)}};function k(d,c){p.body.getBoundingClientRect();j.positionTop(d,c);j.positionLeft(d,c,true);if(!d.runtimeStyle.autoLeft&&d.currentStyle.marginLeft===\"auto\"&&d.currentStyle.right!==\"auto\"){var a=x.clientWidth-j.getPixelWidth(d,d.currentStyle.right)-j.getPixelWidth(d,d.runtimeStyle._3)-d.clientWidth;if(d.currentStyle.marginRight===\"auto\")a=parseInt(a/2);if(A(d.offsetParent))d.runtimeStyle.pixelLeft+=a;else d.runtimeStyle.shiftLeft=a}if(!d.runtimeStyle.fixedWidth)j.clipWidth(d);if(!d.runtimeStyle.fixedHeight)j.clipHeight(d)};function l(){var c=q.elements;for(var a in c)n(c[a]);c=o.elements;for(a in c){k(c[a],true);k(c[a],true)}m=0};var m;bA(function(){if(!m)m=setTimeout(l,100)});var j={},i=function(g){g.bgLeft=function(a){a.style.backgroundPositionX=a.currentStyle.backgroundPositionX;if(!A(a)){s(a,\"backgroundPositionX\",\"(parseInt(runtimeStyle.offsetLeft)+document.\"+z+\".scrollLeft)||0\")}};g.setOffsetLeft=function(c){var a=A(c)?\"backgroundPositionX\":\"offsetLeft\";c.runtimeStyle[a]=g.getOffsetLeft(c,c.style.backgroundPositionX)-c.getBoundingClientRect().left-c.clientLeft+2};g.getOffsetLeft=function(c,a){switch(a){case\"left\":case\"top\":return 0;case\"right\":case\"bottom\":return x.clientWidth-r.offsetWidth;case\"center\":return(x.clientWidth-r.offsetWidth)/2;default:if(X.test(a)){return parseInt((x.clientWidth-r.offsetWidth)*parseFloat(a)/100)}r.style.left=a;return r.offsetLeft}};g.clipWidth=function(f){var d=f.runtimeStyle.fixWidth;f.runtimeStyle.borderRightWidth=\"\";f.runtimeStyle.width=d?g.getPixelWidth(f,d)+\"px\":\"\";if(f.currentStyle.width!==\"auto\"){var c=f.getBoundingClientRect();var a=f.offsetWidth-x.clientWidth+c.left-2;if(a>=0){f.runtimeStyle.borderRightWidth=\"0px\";a=Math.max(C(f,f.currentStyle.width)-a,0);Y(f,\"width\",a);return a}}};g.positionLeft=function(c,a){if(!a&&X.test(c.currentStyle.width)){c.runtimeStyle.fixWidth=c.currentStyle.width}if(c.runtimeStyle.fixWidth){c.runtimeStyle.width=g.getPixelWidth(c,c.runtimeStyle.fixWidth)}c.runtimeStyle.shiftLeft=0;c.runtimeStyle._3=c.currentStyle.left;c.runtimeStyle.autoLeft=c.currentStyle.right!==\"auto\"&&c.currentStyle.left===\"auto\";c.runtimeStyle.left=\"\";c.runtimeStyle.screenLeft=g.getScreenLeft(c);c.runtimeStyle.pixelLeft=c.runtimeStyle.screenLeft;if(!a&&!A(c.offsetParent)){s(c,\"pixelLeft\",\"runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document.\"+z+\".scrollLeft\")}};g.getScreenLeft=function(d){var c=d.offsetLeft,a=1;if(d.runtimeStyle.autoLeft){c=x.clientWidth-d.offsetWidth-g.getPixelWidth(d,d.currentStyle.right)}if(d.currentStyle.marginLeft!==\"auto\"){c-=g.getPixelWidth(d,d.currentStyle.marginLeft)}while(d=d.offsetParent){if(d.currentStyle.position!==\"static\")a=-1;c+=d.offsetLeft*a}return c};g.getPixelWidth=function(c,a){return X.test(a)?parseInt(parseFloat(a)/100*x.clientWidth):C(c,a)}};eval(\"var _9=\"+ce(i));i(j);_9(j)})();if(t<7){var bJ={backgroundColor:\"transparent\",backgroundImage:\"none\",backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:\"none\",borderTopStyle:\"none\",borderRightStyle:\"none\",borderBottomStyle:\"none\",borderLeftWidth:0,borderLeftColor:\"#000\",borderTopColor:\"#000\",borderRightColor:\"#000\",borderBottomColor:\"#000\",height:null,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,width:\"100%\"};h.CSS.addRecalc(\"overflow\",\"visible\",function(d){if(d.currentStyle.position===\"absolute\")return;if(d.parentNode.ie7_wrapped)return;if(h.Layout&&d.currentStyle[\"max-height\"]!==\"auto\"){h.Layout.maxHeight(d)}if(d.currentStyle.marginLeft===\"auto\")d.style.marginLeft=0;if(d.currentStyle.marginRight===\"auto\")d.style.marginRight=0;var c=p.createElement(cy);c.ie7_wrapped=d;for(var a in bJ){c.style[a]=d.currentStyle[a];if(bJ[a]!=null){d.runtimeStyle[a]=bJ[a]}}c.style.display=\"block\";c.style.position=\"relative\";d.runtimeStyle.position=\"absolute\";d.parentNode.insertBefore(c,d);c.appendChild(d)})}function dc(){var s=\"xx-small,x-small,small,medium,large,x-large,xx-large\".split(\",\");for(var q=0;q<s.length;q++){s[s[q]]=s[q-1]||\"0.67em\"}h.CSS.addFix(/(font(-size)?\\s*:\\s*)([\\w.-]+)/,function(f,d,c,a){return d+(s[a]||a)});var n=/^\\-/,o=/(em|ex)$/i,k=/em$/i,l=/ex$/i;C=function(d,c){if(ch.test(c))return parseInt(c)||0;var a=n.test(c)?-1:1;if(o.test(c))a*=j(d);m.style.width=a<0?c.slice(1):c;B.appendChild(m);c=a*m.offsetWidth;m.removeNode();return parseInt(c)};var m=cj();function j(d){var c=1;m.style.fontFamily=d.currentStyle.fontFamily;m.style.lineHeight=d.currentStyle.lineHeight;while(d!=B){var a=d.currentStyle[\"ie7-font-size\"];if(a){if(k.test(a))c*=parseFloat(a);else if(X.test(a))c*=(parseFloat(a)/100);else if(l.test(a))c*=(parseFloat(a)/2);else{m.style.fontSize=a;return 1}}d=d.parentElement}return c};h.CSS.addFix(/cursor\\s*:\\s*pointer/,\"cursor:hand\");h.CSS.addFix(/display\\s*:\\s*list-item/,\"display:block\");function i(f){var d=f.parentElement,c=d.offsetWidth-f.offsetWidth-g(d),a=(f.currentStyle[\"ie7-margin\"]&&f.currentStyle.marginRight===\"auto\")||f.currentStyle[\"ie7-margin-right\"]===\"auto\";switch(d.currentStyle.textAlign){case\"right\":c=a?parseInt(c/2):0;f.runtimeStyle.marginRight=c+\"px\";break;case\"center\":if(a)c=0;default:if(a)c/=2;f.runtimeStyle.marginLeft=parseInt(c)+\"px\"}};function g(a){return C(a,a.currentStyle.paddingLeft)+C(a,a.currentStyle.paddingRight)};h.CSS.addRecalc(\"margin(-left|-right)?\",\"[^};]*auto\",function(a){if(be(i,a,a.parentElement&&a.currentStyle.display===\"block\"&&a.currentStyle.marginLeft===\"auto\"&&a.currentStyle.position!==\"absolute\")){i(a)}});bA(function(){for(var c in i.elements){var a=i.elements[c];a.runtimeStyle.marginLeft=a.runtimeStyle.marginRight=\"\";i(a)}})};var bK=\"\\\\([^)]+\\\\)\";cc.add(/::(before|after)/,\":$1\");if(t<8){if(h.CSS.pseudoClasses)h.CSS.pseudoClasses+=\"|\";h.CSS.pseudoClasses+=\"before|after|lang\"+bK;function da(a){return a.replace(new RegExp(\"([{;\\\\s])(\"+bF.join(\"|\")+\")\\\\s*:\\\\s*([^;}]+)\",\"g\"),\"$1$2:$3;ie7-$2:$3\")};var dd=/[\\w-]+\\s*:\\s*inherit/g;var de=/ie7\\-|\\s*:\\s*inherit/g;var df=/\\-([a-z])/g;function dg(c,a){return a.toUpperCase()};h.CSS.addRecalc(\"[\\\\w-]+\",\"inherit\",function(g,f){if(g.parentElement){var d=f.match(dd);for(var c=0;c<d.length;c++){var a=d[c].replace(de,\"\");if(g.currentStyle[\"ie7-\"+a]===\"inherit\"){a=a.replace(df,dg);g.runtimeStyle[a]=g.parentElement.currentStyle[a]}}}},function(a){bF.push(bY(a.slice(1).split(\":\")[0]));return a});var bt=new M(\"focus\",function(c){var a=arguments;h.CSS.addEventHandler(c,\"onfocus\",function(){bt.unregister(a);bt.register(a)});h.CSS.addEventHandler(c,\"onblur\",function(){bt.unregister(a)});if(c==p.activeElement){bt.register(a)}});var bL=new M(\"active\",function(c){var a=arguments;h.CSS.addEventHandler(c,\"onmousedown\",function(){bL.register(a)})});y(p,\"onmouseup\",function(){var c=bL.instances;for(var a in c)bL.unregister(c[a])});var dh=/^url\\s*\\(\\s*([^)]*)\\)$/;var di={before0:\"beforeBegin\",before1:\"afterBegin\",after0:\"afterEnd\",after1:\"beforeEnd\"};var R=h.PseudoElement=u.extend({constructor:function(j,i,g){this.position=i;var f=g.match(R.CONTENT),d,c;if(f){f=f[1];d=f.split(/\\s+/);for(var a=0;(c=d[a]);a++){d[a]=/^attr/.test(c)?{attr:c.slice(5,-1)}:c.charAt(0)===\"'\"?bp(c):bd(c)}f=d}this.content=f;this.base(j,bd(g))},init:function(){this.match=J(this.selector);for(var c=0;c<this.match.length;c++){var a=this.match[c].runtimeStyle;if(!a[this.position])a[this.position]={cssText:\"\"};a[this.position].cssText+=\";\"+this.cssText;if(this.content!=null)a[this.position].content=this.content}},create:function(n){var o=n.runtimeStyle[this.position];if(o){var k=[].concat(o.content||\"\");for(var l=0;l<k.length;l++){if(typeof k[l]==\"object\"){k[l]=n.getAttribute(k[l].attr)}}k=k.join(\"\");var m=k.match(dh);var j=\"overflow:hidden;\"+o.cssText.replace(/'/g,'\"');var i=di[this.position+Number(n.canHaveChildren)];var g='ie7_pseudo'+R.count++;n.insertAdjacentHTML(i,H(R.ANON,this.className,g,j,m?\"\":k));if(m){var f=bp(m[1]);var d=p.getElementById(g);d.src=f;bs(d,\"crop\");var c=n.currentStyle.styleFloat!==\"none\";if(d.currentStyle.display===\"inline\"||c){if(t<7&&c&&n.canHaveChildren){n.runtimeStyle.display=\"inline\";n.runtimeStyle.position=\"relative\";d.runtimeStyle.position=\"absolute\"}d.style.display=\"inline-block\";if(n.currentStyle.styleFloat!==\"none\"){d.style.pixelWidth=n.offsetWidth}var a=new Image;a.onload=function(){d.style.pixelWidth=this.width;d.style.pixelHeight=Math.max(this.height,d.offsetHeight)};a.src=f}}n.runtimeStyle[this.position]=null}},recalc:function(){if(this.content==null)return;for(var a=0;a<this.match.length;a++){this.create(this.match[a])}},toString:function(){return\".\"+this.className+\"{display:inline}\"}},{CONTENT:/content\\s*:\\s*([^;]*)(;|$)/,ANON:\"<ie7:! class='ie7_anon %1' id=%2 style='%3'>%4</ie7:!>\",MATCH:/(.*):(before|after).*/,count:0});h._getLang=function(c){var a=\"\";while(c&&c.nodeType===1){a=c.lang||c.getAttribute(\"lang\")||\"\";if(a)break;c=c.parentNode}return a};T=O(T,{\":lang\\\\(([^)]+)\\\\)\":\"((ii=IE7._getLang(e))==='$1'||ii.indexOf('$1-')===0)&&\"})}var dj=/^(submit|reset|button)$/;h.HTML.addRecalc(\"button,input\",function(c){if(c.nodeName===\"BUTTON\"){var a=c.outerHTML.match(/ value=\"([^\"]*)\"/i);c.runtimeStyle.value=a?a[1]:\"\"}if(c.type===\"submit\"){y(c,\"onclick\",function(){c.runtimeStyle.clicked=true;setTimeout(\"document.all.\"+c.uniqueID+\".runtimeStyle.clicked=false\",1)})}});h.HTML.addRecalc(\"form\",function(d){y(d,\"onsubmit\",function(){for(var c,a=0;c=d[a];a++){if(dj.test(c.type)&&!c.disabled&&!c.runtimeStyle.clicked){c.disabled=true;setTimeout(\"document.all.\"+c.uniqueID+\".disabled=false\",1)}else if(c.nodeName===\"BUTTON\"&&c.type===\"submit\"){setTimeout(\"document.all.\"+c.uniqueID+\".value='\"+c.value+\"'\",1);c.value=c.runtimeStyle.value}}})});h.HTML.addRecalc(\"img\",function(a){if(a.alt&&!a.title)a.title=\"\"});if(t<8){h.CSS.addRecalc(\"border-spacing\",bg,function(a){if(a.currentStyle.borderCollapse!==\"collapse\"){a.cellSpacing=C(a,a.currentStyle[\"ie7-border-spacing\"].split(\" \")[0])}});h.CSS.addRecalc(\"box-sizing\",\"content-box\",h.Layout.boxSizing);h.CSS.addRecalc(\"box-sizing\",\"border-box\",h.Layout.borderBox)}if(t<8){var dk=/^image/i;h.HTML.addRecalc(\"object\",function(a){if(dk.test(a.type)){a.body.style.cssText=\"margin:0;padding:0;border:none;overflow:hidden\";return a}})}var bM=\"!IE7._a(e,'next')&&\",cs=bM.replace(\"next\",\"previous\");if(h.CSS.pseudoClasses)h.CSS.pseudoClasses+=\"|\";h.CSS.pseudoClasses+=\"(?:first|last|only)\\\\-(?:child|of\\\\-type)|empty|root|target|\"+(\"not|nth\\\\-child|nth\\\\-last\\\\-child|nth\\\\-of\\\\-type|nth\\\\-last\\\\-of\\\\-type\".split(\"|\").join(bK+\"|\")+bK);var bN=new M(\"checked\",function(c){if(typeof c.checked!==\"boolean\")return;var a=arguments;h.CSS.addEventHandler(c,\"onpropertychange\",function(){if(event.propertyName===\"checked\"){if(c.checked===true)bN.register(a);else bN.unregister(a)}});if(c.checked===true)bN.register(a)}),bO=new M(\"enabled\",function(c){if(typeof c.disabled!==\"boolean\")return;var a=arguments;h.CSS.addEventHandler(c,\"onpropertychange\",function(){if(event.propertyName===\"disabled\"){if(c.disabled===false)bO.register(a);else bO.unregister(a)}});if(c.disabled===false)bO.register(a)}),bP=new M(\"disabled\",function(c){if(typeof c.disabled!==\"boolean\")return;var a=arguments;h.CSS.addEventHandler(c,\"onpropertychange\",function(){if(event.propertyName===\"disabled\"){if(c.disabled===true)bP.register(a);else bP.unregister(a)}});if(c.disabled===true)bP.register(a)}),bQ=new M(\"indeterminate\",function(c){if(typeof c.indeterminate!==\"boolean\")return;var a=arguments;h.CSS.addEventHandler(c,\"onpropertychange\",function(){if(event.propertyName===\"indeterminate\"){if(c.indeterminate===true)bQ.register(a);else bQ.unregister(a)}});h.CSS.addEventHandler(c,\"onclick\",function(){bQ.unregister(a)})}),bR=new M(\"target\",function(c){var a=arguments;if(!c.tabIndex)c.tabIndex=0;h.CSS.addEventHandler(p,\"onpropertychange\",function(){if(event.propertyName===\"activeElement\"){if(c.id&&c.id===location.hash.slice(1))bR.register(a);else bR.unregister(a)}});if(c.id&&c.id===location.hash.slice(1))bR.register(a)}),ct=1,bu={_4:1};h._b=function(l,m,j){var i=l.parentNode;if(!i||i.nodeType!==1)return NaN;var g=j?l.nodeName:\"\";if(g===\"TR\"&&l.sectionRowIndex>=0){var c=l.sectionRowIndex;return m?l.parentNode.rows.length-c+1:c}if((g===\"TD\"||g===\"TH\")&&l.cellIndex>=0){c=l.cellIndex;return m?l.parentNode.cells.length-c+1:c}if(bu._4!==ct){bu={_4:ct}}var f=(i.uniqueID)+\"-\"+g,d=bu[f];if(!d){d={};var c=0,a=i.firstChild;while(a){if(j?a.nodeName===g:a.nodeName>\"@\"){d[a.uniqueID]=++c}a=a.nextSibling}d.length=c;bu[f]=d}c=d[l.uniqueID];return m?d.length-c+1:c};h._c=function(a){a=a.firstChild;while(a){if(a.nodeType===3||a.nodeName>\"@\")return false;a=a.nextSibling}return true};h._a=function(d,c){var a=d.nodeName;c+=\"Sibling\";do{d=d[c];if(d&&d.nodeName===a)break}while(d);return d};var dl={\"+\":1,\"-\":-1},dm=/ /g;T=O(O({\":nth(-last)?-(?:child|(of-type))\\\\((<#nth_arg>)\\\\)(<#filter>)?\":function(m,j,i,g,f){g=g.replace(dm,\"\");var d=\"IE7._b(e,\"+!!j+\",\"+!!i+\")\";if(g===\"even\")g=\"2n\";else if(g===\"odd\")g=\"2n+1\";else if(!isNaN(g))g=\"0n\"+~~g;g=g.split(\"n\");var c=~~(dl[g[0]]||g[0]||1),b=~~g[1];if(c===0){var a=d+\"===\"+b}else{a=\"((ii=\"+d+\")-(\"+b+\"))%\"+c+\"===0&&ii\"+(c<0?\"<\":\">\")+\"=\"+b}return this.parse(f)+a+\"&&\"},\"<#negation>\":function(c,a){if(/:not/i.test(a))bv();if(/^[#.:\\[]/.test(a)){a=\"*\"+a}return\"!(\"+D.parse(a).slice(3,-2)+\")&&\"}},T),{\":checked\":\"e.checked===true&&\",\":disabled\":\"e.disabled===true&&\",\":enabled\":\"e.disabled===false&&\",\":last-child\":\"!\"+bE+\"&&\",\":only-child\":\"!\"+ck+\"&&!\"+bE+\"&&\",\":first-of-type\":cs,\":last-of-type\":bM,\":only-of-type\":cs+bM,\":empty\":\"IE7._c(e)&&\",\":root\":\"e==R&&\",\":target\":\"H&&\"+cn+\"===H&&\"});var dn=\"article,aside,audio,canvas,details,figcaption,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video\".split(\",\");for(var cu=0,cv;cv=dn[cu];cu++)p.createElement(cv);U+=\"datalist{display:none}details{padding-left:40px;display:block;margin:1em 0}meter,progress{vertical-align:-0.2em;width:5em;height:1em;display:inline-block}progress{width:10em;}article,aside,figcaption,footer,header,hgroup,summary,section,nav{display:block;margin:1em 0}figure{margin:1em 40px;display:block}mark{background:yellow}\";h.CSS.addFix(/\\bopacity\\s*:\\s*([\\d.]+)/,function(c,a){return\"zoom:1;filter:Alpha(opacity=\"+((a*100)||1)+\")\"});var D,J=(function(){var o0=/^[>+~]/,bw=false;function dp(f,d,c){f=bZ(f);if(!d)d=p;var a=d;bw=o0.test(f);if(bw){d=d.parentNode;f=\"*\"+f}try{return n.create(f,bw)(d,c?null:[],a)}catch(ex){return c?null:[]}};var dq=/^(\\\\.|[' >+~#.\\[\\]:*(),\\w-\\^|$=]|[^\\x00-\\xa0])+$/,dE=/^(href|src)$/,cw={\"class\":\"className\",\"for\":\"htmlFor\"},dF=/\\sie7_\\w+/g,dr=/^(action|cite|codebase|data|dynsrc|href|longdesc|lowsrc|src|usemap|url)$/i;h._0=function(f,d){if(f.getAttributeNode){var c=f.getAttributeNode(d)}d=cw[d.toLowerCase()]||d;if(!c)c=f.attributes[d];var a=c&&c.specified;if(f[d]&&typeof f[d]==\"boolean\")return d.toLowerCase();if((a&&dr.test(d))||(!c&&E)||d===\"value\"||d===\"type\"){return f.getAttribute(d,2)}if(d===\"style\")return f.style.cssText.toLowerCase()||null;return a?String(c.nodeValue):null};var cx=\"colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc\";O(cw,cO(cx.toLowerCase().split(\",\"),cx.split(\",\")));h._1=function(c,a){a+=\"Sibling\";do{c=c[a];if(c&&c.nodeName>\"@\")break}while(c);return c};var ds=/(^|[, >+~])([#.:\\[])/g,dG=/\\)\\{/g,dt=/,/,dH=/^['\"]/,du=/\\\\([\\da-f]{2,2})/gi,dI=/last/i;h._d=function(f,d){var c=f.all[d]||null;if(!c||(c.nodeType&&h._0(c,\"id\")===d))return c;for(var a=0;a<c.length;a++){if(h._0(c[a],\"id\")===d)return c[a]}return null};var bb=G.extend({dictionary:new cM({ident:/\\-?(\\\\.|[_a-z]|[^\\x00-\\xa0])(\\\\.|[\\w-]|[^\\x00-\\xa0])*/,combinator:/[\\s>+~]/,operator:/[\\^~|$*]?=/,nth_arg:/[+-]?\\d+|[+-]?\\d*n(?:\\s*[+-]\\s*\\d+)?|even|odd/,tag:/\\*|<#ident>/,id:/#(<#ident>)/,'class':/\\.(<#ident>)/,pseudo:/\\:([\\w-]+)(?:\\(([^)]+)\\))?/,attr:/\\[(<#ident>)(?:(<#operator>)((?:\\\\.|[^\\[\\]#.:])+))?\\]/,negation:/:not\\((<#tag>|<#id>|<#class>|<#attr>|<#pseudo>)\\)/,sequence:/(\\\\.|[~*]=|\\+\\d|\\+?\\d*n\\s*\\+\\s*\\d|[^\\s>+~,\\*])+/,filter:/[#.:\\[]<#sequence>/,selector:/[^>+~](\\\\.|[^,])*?/,grammar:/^(<#selector>)((,<#selector>)*)$/}),ignoreCase:true}),dv=new bb({\"\\\\\\\\.|[~*]\\\\s+=|\\\\+\\\\s+\\\\d\":G.IGNORE,\"\\\\[\\\\s+\":\"[\",\"\\\\(\\\\s+\":\"(\",\"\\\\s+\\\\)\":\")\",\"\\\\s+\\\\]\":\"]\",\"\\\\s*([,>+~]|<#operator>)\\\\s*\":\"$1\",\"\\\\s+$\":\"\",\"\\\\s+\":\" \"});function dw(a){a=dv.parse(a.replace(du,\"\\\\x$1\")).replace(bz,\"$1\").replace(ds,\"$1*$2\");if(!dq.test(a))bv();return a};function dJ(a){return a.replace(cb,dx)};function dx(c,a){return W[a]};var dy=/\\{/g,dz=/\\\\{/g;function bS(a){return Array((a.replace(dz,\"\").match(dy)||\"\").length+1).join(\"}\")};T=new bb(T);var v=/:target/i,Z=/:root/i;function S(c){var a=\"\";if(Z.test(c))a+=\",R=d.documentElement\";if(v.test(c))a+=\",H=d.location;H=H&&H.hash.replace('#','')\";if(a||c.indexOf(\"#\")!==-1){a=\",t=c.nodeType,d=t===9?c:c.ownerDocument||(c.document||c).parentWindow.document\"+a}return\"var ii\"+a+\";\"};var ba={\" \":\";while(e!=s&&(e=e.parentNode)&&e.nodeType===1){\",\">\":\".parentElement;if(e){\",\"+\":\";while((e=e.previousSibling)&&!(\"+cl+\"))continue;if(e){\",\"~\":\";while((e=e.previousSibling)){\"+cm},K=/\\be\\b/g;D=new bb({\"(?:(<#selector>)(<#combinator>))?(<#tag>)(<#filter>)?$\":function(j,i,g,f,d){var c=\"\";if(f!==\"*\"){var a=f.toUpperCase();c+=\"if(e.nodeName==='\"+a+(a===f?\"\":\"'||e.nodeName==='\"+f)+\"'){\"}if(d){c+=\"if(\"+T.parse(d).slice(0,-2)+\"){\"}c=c.replace(K,\"e\"+this.index);if(g){c+=\"var e=e\"+(this.index++)+ba[g];c=c.replace(K,\"e\"+this.index)}if(i){c+=this.parse(i)}return c}});var L=\"e0=IE7._d(d,'%1');if(e0){\",z=\"var n=c.getElementsByTagName('%1');\",w=\"if(r==null)return e0;r[k++]=e0;\",r=1,A=new bb({\"^((?:<#selector>)?(?:<#combinator>))(<#tag>)(<#filter>)?$\":true}),s={},q=new bb({\"^(<#tag>)#(<#ident>)(<#filter>)?( [^,]*)?$\":function(j,i,g,f,d){var c=H(L,g),a=\"}\";if(f){c+=D.parse(i+f);a=bS(c)}if(d){c+=\"s=c=e0;\"+n.parse(\"*\"+d)}else{c+=w}return c+a},\"^([^#,]+)#(<#ident>)(<#filter>)?$\":function(g,f,d,c){var a=H(L,d);if(f===\"*\"){a+=w}else{a+=D.parse(f+c)+w+\"break\"}return a+bS(a)},\"^.*$\":\"\"}),n=new bb({\"<#grammar>\":function(k,l,m){if(!this.groups)this.groups=[];var j=A.exec(\" \"+l);if(!j)bv();this.groups.push(j.slice(1));if(m){return this.parse(m.replace(dt,\"\"))}var i=this.groups,g=i[0][r];for(var c=1;j=i[c];c++){if(g!==j[r]){g=\"*\";break}}var f=\"\",d=w+\"continue filtering;\";for(var c=0;j=i[c];c++){D.index=0;if(g!==\"*\")j[r]=\"*\";j=j.join(\"\");if(j===\" *\"){f=d;break}else{j=D.parse(j);if(bw)j+=\"if(e\"+D.index+\"==s){\";f+=j+d+bS(j)}}var a=g===\"*\";return(a?\"var n=c.all;\":H(z,g))+\"filtering:while((e0=n[i++]))\"+(a?cm.replace(K,\"e0\"):\"{\")+f+\"}\"},\"^.*$\":bv}),o=/\\&\\&(e\\d+)\\.nodeType===1(\\)\\{\\s*if\\(\\1\\.nodeName=)/g;n.create=function(d){if(!s[d]){d=dw(d);this.groups=null;D.index=0;var c=this.parse(d);this.groups=null;D.index=0;if(d.indexOf(\"#\")!==-1){var a=q.parse(d);if(a){c=\"if(t===1||t===11|!c.getElementById){\"+c+\"}else{\"+a+\"}\"}}c=c.replace(o,\"$2\");c=S(d)+bd(c);s[d]=new Function(\"return function(c,r,s){var i=0,k=0,e0;\"+c+\"return r}\")()}return s[d]};return dp})();function bv(){throw new SyntaxError(\"Invalid selector.\");};h.loaded=true;(function(){try{if(!p.body)throw\"continue\";bx.doScroll(\"left\")}catch(ex){setTimeout(arguments.callee,1);return}try{eval(bU.innerHTML)}catch(ex){}if(typeof IE7_PNG_SUFFIX==\"object\"){bh=IE7_PNG_SUFFIX}else{bh=new RegExp(bY(N.IE7_PNG_SUFFIX||\"-trans.png\")+\"(\\\\?.*)?$\",\"i\")}B=p.body;x=E?B:bx;B.className+=\" ie7_body\";bx.className+=\" ie7_html\";if(E)dc();h.CSS.init();h.HTML.init();h.HTML.apply();h.CSS.apply();h.recalc()})()})(this,document);\n"
  },
  {
    "path": "themes/default/js/jquery-1.8.3.min.js",
    "content": "/*! jQuery v1.8.3 jquery.com | jquery.org/license */\n(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i=\"data-\"+n.replace(P,\"-$1\").toLowerCase();r=e.getAttribute(i);if(typeof r==\"string\"){try{r=r===\"true\"?!0:r===\"false\"?!1:r===\"null\"?null:+r+\"\"===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t===\"data\"&&v.isEmptyObject(e[t]))continue;if(t!==\"toJSON\")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t==\"string\"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split(\"|\"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n===\"object\"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n===\"input\"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n===\"option\"?t.selected=e.defaultSelected:n===\"input\"||n===\"textarea\"?t.defaultValue=e.defaultValue:n===\"script\"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!=\"undefined\"?e.getElementsByTagName(\"*\"):typeof e.querySelectorAll!=\"undefined\"?e.querySelectorAll(\"*\"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,\"display\")===\"none\"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,\"olddisplay\"),t?(!i[s]&&n.style.display===\"none\"&&(n.style.display=\"\"),n.style.display===\"\"&&Gt(n)&&(i[s]=v._data(n,\"olddisplay\",nn(n.nodeName)))):(r=Dt(n,\"display\"),!i[s]&&r!==\"none\"&&v._data(n,\"olddisplay\",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display===\"none\"||n.style.display===\"\")n.style.display=t?i[s]||\"\":\"none\"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||\"px\"):t}function en(e,t,n,r){var i=n===(r?\"border\":\"content\")?4:t===\"width\"?1:0,s=0;for(;i<4;i+=2)n===\"margin\"&&(s+=v.css(e,n+$t[i],!0)),r?(n===\"content\"&&(s-=parseFloat(Dt(e,\"padding\"+$t[i]))||0),n!==\"margin\"&&(s-=parseFloat(Dt(e,\"border\"+$t[i]+\"Width\"))||0)):(s+=parseFloat(Dt(e,\"padding\"+$t[i]))||0,n!==\"padding\"&&(s+=parseFloat(Dt(e,\"border\"+$t[i]+\"Width\"))||0));return s}function tn(e,t,n){var r=t===\"width\"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,\"boxSizing\")===\"border-box\";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?\"border\":\"content\"),i)+\"px\"}function nn(e){if(Wt[e])return Wt[e];var t=v(\"<\"+e+\">\").appendTo(i.body),n=t.css(\"display\");t.remove();if(n===\"none\"||n===\"\"){Pt=i.body.appendChild(Pt||v.extend(i.createElement(\"iframe\"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(\"<!doctype html><html><body>\"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,\"display\"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+\"[\"+(typeof i==\"object\"?t:\"\")+\"]\",i,n,r)});else if(!n&&v.type(t)===\"object\")for(i in t)fn(e+\"[\"+i+\"]\",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!=\"string\"&&(n=t,t=\"*\");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\\+/.test(r),s&&(r=r.substr(1)||\"*\"),i=e[r]=e[r]||[],i[s?\"unshift\":\"push\"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u==\"string\"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o[\"*\"]&&(u=kn(e,n,r,i,\"*\",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]===\"*\")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader(\"content-type\"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+\" \"+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!==\"*\"){if(u!==\"*\"&&u!==i){n=a[u+\" \"+i]||a[\"* \"+i];if(!n)for(r in a){s=r.split(\" \");if(s[1]===i){n=a[u+\" \"+s[0]]||a[\"* \"+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e[\"throws\"])t=n(t);else try{t=n(t)}catch(l){return{state:\"parsererror\",error:n?l:\"No conversion from \"+u+\" to \"+i}}}u=i}return{state:\"success\",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject(\"Microsoft.XMLHTTP\")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn[\"*\"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&\"expand\"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,\"fx\"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,\"fx\").length||l.empty.fire()})})),e.nodeType===1&&(\"height\"in t||\"width\"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,\"display\")===\"inline\"&&v.css(e,\"float\")===\"none\"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)===\"inline\"?p.display=\"inline-block\":p.zoom=1)),n.overflow&&(p.overflow=\"hidden\",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s===\"toggle\";if(s===(g?\"hide\":\"show\"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,\"fxshow\")||v._data(e,\"fxshow\",{}),\"hidden\"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,\"fxshow\",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i===\"width\"||i===\"height\"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r[\"margin\"+n]=r[\"padding\"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source,g=/\\S/,y=/\\s+/,b=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,w=/^(?:[^#<]*(<[\\w\\W]+>)[^>]*$|#([\\w\\-]*)$)/,E=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,S=/^[\\],:{}\\s]*$/,x=/(?:^|:|,)(?:\\s*\\[)+/g,T=/\\\\(?:[\"\\\\\\/bfnrt]|u[\\da-fA-F]{4})/g,N=/\"[^\"\\\\\\r\\n]*\"|true|false|null|-?(?:\\d\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/g,C=/^-ms-/,k=/-([\\da-z])/gi,L=function(e,t){return(t+\"\").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener(\"DOMContentLoaded\",A,!1),v.ready()):i.readyState===\"complete\"&&(i.detachEvent(\"onreadystatechange\",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e==\"string\"){e.charAt(0)===\"<\"&&e.charAt(e.length-1)===\">\"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:\"\",jquery:\"1.8.3\",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t===\"find\"?r.selector=this.selector+(this.selector?\" \":\"\")+n:t&&(r.selector=this.selector+\".\"+t+\"(\"+n+\")\"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),\"slice\",l.call(arguments).join(\",\"))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u==\"boolean\"&&(l=u,u=arguments[1]||{},a=2),typeof u!=\"object\"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger(\"ready\").off(\"ready\")},isFunction:function(e){return v.type(e)===\"function\"},isArray:Array.isArray||function(e){return v.type(e)===\"array\"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||\"object\"},isPlainObject:function(e){if(!e||v.type(e)!==\"object\"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,\"constructor\")&&!p.call(e.constructor.prototype,\"isPrototypeOf\"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!=\"string\"?null:(typeof t==\"boolean\"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!=\"string\")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,\"@\").replace(N,\"]\").replace(x,\"\")))return(new Function(\"return \"+t))();v.error(\"Invalid JSON: \"+t)},parseXML:function(n){var r,i;if(!n||typeof n!=\"string\")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,\"text/xml\")):(r=new ActiveXObject(\"Microsoft.XMLDOM\"),r.async=\"false\",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName(\"parsererror\").length)&&v.error(\"Invalid XML: \"+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,\"ms-\").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call(\"\\ufeff\\u00a0\")?function(e){return e==null?\"\":d.call(e)}:function(e){return e==null?\"\":(e+\"\").replace(b,\"\")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n===\"string\"||n===\"function\"||n===\"regexp\"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r==\"number\")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a==\"number\"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n==\"string\"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r==\"object\"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState===\"complete\")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener(\"DOMContentLoaded\",A,!1),e.addEventListener(\"load\",v.ready,!1);else{i.attachEvent(\"onreadystatechange\",A),e.attachEvent(\"onload\",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll(\"left\")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each(\"Boolean Number String Function Array Date RegExp Object\".split(\" \"),function(e,t){O[\"[object \"+t+\"]\"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e==\"string\"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i===\"function\"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!==\"string\"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[[\"resolve\",\"done\",v.Callbacks(\"once memory\"),\"resolved\"],[\"reject\",\"fail\",v.Callbacks(\"once memory\"),\"rejected\"],[\"notify\",\"progress\",v.Callbacks(\"memory\")]],n=\"pending\",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+\"With\"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+\"With\"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement(\"div\");p.setAttribute(\"className\",\"t\"),p.innerHTML=\"  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\",n=p.getElementsByTagName(\"*\"),r=p.getElementsByTagName(\"a\")[0];if(!n||!r||!n.length)return{};s=i.createElement(\"select\"),o=s.appendChild(i.createElement(\"option\")),u=p.getElementsByTagName(\"input\")[0],r.style.cssText=\"top:1px;float:left;opacity:.5\",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName(\"tbody\").length,htmlSerialize:!!p.getElementsByTagName(\"link\").length,style:/top/.test(r.getAttribute(\"style\")),hrefNormalized:r.getAttribute(\"href\")===\"/a\",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value===\"on\",optSelected:o.selected,getSetAttribute:p.className!==\"t\",enctype:!!i.createElement(\"form\").enctype,html5Clone:i.createElement(\"nav\").cloneNode(!0).outerHTML!==\"<:nav></:nav>\",boxModel:i.compatMode===\"CSS1Compat\",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent(\"onclick\",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent(\"onclick\"),p.detachEvent(\"onclick\",h)),u=i.createElement(\"input\"),u.value=\"t\",u.setAttribute(\"type\",\"radio\"),t.radioValue=u.value===\"t\",u.setAttribute(\"checked\",\"checked\"),u.setAttribute(\"name\",\"t\"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f=\"on\"+l,c=f in p,c||(p.setAttribute(f,\"return;\"),c=typeof p[f]==\"function\"),t[l+\"Bubbles\"]=c;return v(function(){var n,r,s,o,u=\"padding:0;margin:0;border:0;display:block;overflow:hidden;\",a=i.getElementsByTagName(\"body\")[0];if(!a)return;n=i.createElement(\"div\"),n.style.cssText=\"visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px\",a.insertBefore(n,a.firstChild),r=i.createElement(\"div\"),n.appendChild(r),r.innerHTML=\"<table><tr><td></td><td>t</td></tr></table>\",s=r.getElementsByTagName(\"td\"),s[0].style.cssText=\"padding:0;margin:0;border:0;display:none\",c=s[0].offsetHeight===0,s[0].style.display=\"\",s[1].style.display=\"none\",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML=\"\",r.style.cssText=\"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;\",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!==\"1%\",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:\"4px\"}).width===\"4px\",o=i.createElement(\"div\"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width=\"0\",r.style.width=\"1px\",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!=\"undefined\"&&(r.innerHTML=\"\",r.style.cssText=u+\"width:1px;padding:1px;display:inline;zoom:1\",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display=\"block\",r.style.overflow=\"visible\",r.innerHTML=\"<div></div>\",r.firstChild.style.width=\"5px\",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\\{[\\s\\S]*\\}|\\[[\\s\\S]*\\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:\"jQuery\"+(v.fn.jquery+Math.random()).replace(/\\D/g,\"\"),noData:{embed:!0,object:\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n==\"string\",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n==\"object\"||typeof n==\"function\")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(\" \")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute(\"classid\")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,\"parsedAttrs\")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf(\"data-\")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,\"parsedAttrs\",!0)}}return l}return typeof e==\"object\"?this.each(function(){v.data(this,e)}):(r=e.split(\".\",2),r[1]=r[1]?\".\"+r[1]:\"\",i=r[1]+\"!\",v.access(this,function(n){if(n===t)return l=this.triggerHandler(\"getData\"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler(\"setData\"+i,r),v.data(this,e,n),t.triggerHandler(\"changeData\"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||\"fx\")+\"queue\",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||\"fx\";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i===\"inprogress\"&&(i=n.shift(),r--),i&&(t===\"fx\"&&n.unshift(\"inprogress\"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+\"queueHooks\";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks(\"once memory\").add(function(){v.removeData(e,t+\"queue\",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!=\"string\"&&(n=e,e=\"fx\",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e===\"fx\"&&t[0]!==\"inprogress\"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||\"fx\",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||\"fx\",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!=\"string\"&&(n=e,e=t),e=e||\"fx\";while(u--)r=v._data(o[u],e+\"queueHooks\"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\\t\\r\\n]/g,R=/\\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e==\"string\"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=\" \"+i.className+\" \";for(o=0,u=t.length;o<u;o++)s.indexOf(\" \"+t[o]+\" \")<0&&(s+=t[o]+\" \");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e==\"string\"||e===t){n=(e||\"\").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(\" \"+i.className+\" \").replace(q,\" \");for(s=0,o=n.length;s<o;s++)while(r.indexOf(\" \"+n[s]+\" \")>=0)r=r.replace(\" \"+n[s]+\" \",\" \");i.className=e?v.trim(r):\"\"}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t==\"boolean\";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n===\"string\"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?\"addClass\":\"removeClass\"](i)}else if(n===\"undefined\"||n===\"boolean\")this.className&&v._data(this,\"__className__\",this.className),this.className=this.className||e===!1?\"\":v._data(this,\"__className__\")||\"\"})},hasClass:function(e){var t=\" \"+e+\" \",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(\" \"+this[n].className+\" \").replace(q,\" \").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&\"get\"in n&&(r=n.get(s,\"value\"))!==t?r:(r=s.value,typeof r==\"string\"?r.replace(R,\"\"):r==null?\"\":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s=\"\":typeof s==\"number\"?s+=\"\":v.isArray(s)&&(s=v.map(s,function(e){return e==null?\"\":e+\"\"})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!(\"set\"in n)||n.set(this,s,\"value\")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type===\"select-one\"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute(\"disabled\")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,\"optgroup\"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find(\"option\").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute==\"undefined\")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&\"set\"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+\"\"),r)}return o&&\"get\"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,\"\"),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error(\"type property can't be changed\");else if(!v.support.radioValue&&t===\"radio\"&&v.nodeName(e,\"input\")){var n=e.value;return e.setAttribute(\"type\",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,\"button\")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,\"button\"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:\"tabIndex\",readonly:\"readOnly\",\"for\":\"htmlFor\",\"class\":\"className\",maxlength:\"maxLength\",cellspacing:\"cellSpacing\",cellpadding:\"cellPadding\",rowspan:\"rowSpan\",colspan:\"colSpan\",usemap:\"useMap\",frameborder:\"frameBorder\",contenteditable:\"contentEditable\"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&\"set\"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&\"get\"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode(\"tabindex\");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!=\"boolean\"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!==\"\":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+\"\"}},v.each([\"width\",\"height\"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n===\"\")return e.setAttribute(t,\"auto\"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===\"\"&&(t=\"false\"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each([\"href\",\"src\",\"width\",\"height\"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+\"\"}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype=\"encoding\"),v.support.checkOn||v.each([\"radio\",\"checkbox\"],function(){v.valHooks[this]={get:function(e){return e.getAttribute(\"value\")===null?\"on\":e.value}}}),v.each([\"radio\",\"checkbox\"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\\.]*|)(?:\\.(.+)|)$/,K=/(?:^|\\s)hover(\\.\\S+|)\\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,\"mouseenter$1 mouseleave$1\")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v==\"undefined\"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(\" \");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||\"\").split(\".\").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(\".\")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent(\"on\"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||\"\")).split(\" \");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp(\"(^|\\\\.)\"+f.split(\".\").sort().join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r===\"**\"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,\"events\",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf(\"!\")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(\".\")>=0&&(b=y.split(\".\"),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n==\"object\"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join(\".\"),n.namespace_re=n.namespace?new RegExp(\"(^|\\\\.)\"+b.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,h=y.indexOf(\":\")<0?\"on\"+y:\"\";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,\"events\")||{})[n.type]&&v._data(l,\"handle\"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!==\"click\"||!v.nodeName(s,\"a\"))&&v.acceptData(s)&&h&&s[y]&&(y!==\"focus\"&&y!==\"blur\"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,\"events\")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!==\"click\"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!==\"click\"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:\"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),fixHooks:{},keyHooks:{props:\"char charCode key keyCode\".split(\" \"),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:\"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:\"focusin\"},blur:{delegateType:\"focusout\"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r=\"on\"+t;e.detachEvent&&(typeof e[r]==\"undefined\"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,\"form\"))return!1;v.event.add(this,\"click._submit keypress._submit\",function(e){var n=e.target,r=v.nodeName(n,\"input\")||v.nodeName(n,\"button\")?n.form:t;r&&!v._data(r,\"_submit_attached\")&&(v.event.add(r,\"submit._submit\",function(e){e._submit_bubble=!0}),v._data(r,\"_submit_attached\",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate(\"submit\",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,\"form\"))return!1;v.event.remove(this,\"._submit\")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type===\"checkbox\"||this.type===\"radio\")v.event.add(this,\"propertychange._change\",function(e){e.originalEvent.propertyName===\"checked\"&&(this._just_changed=!0)}),v.event.add(this,\"click._change\",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate(\"change\",this,e,!0)});return!1}v.event.add(this,\"beforeactivate._change\",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,\"_change_attached\")&&(v.event.add(t,\"change._change\",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate(\"change\",this.parentNode,e,!0)}),v._data(t,\"_change_attached\",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!==\"radio\"&&t.type!==\"checkbox\")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,\"._change\"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:\"focusin\",blur:\"focusout\"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e==\"object\"){typeof n!=\"string\"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n==\"string\"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+\".\"+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e==\"object\"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n==\"function\")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||\"**\",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,\"**\"):this.off(t,e||\"**\",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,\"lastToggle\"+e.guid)||0)%r;return v._data(this,\"lastToggle\"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each(\"blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu\".split(\" \"),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!=\"string\")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,\"$1\"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n===\"input\"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n===\"input\"||n===\"button\")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+\" \"];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j,\" \");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir===\"parentNode\",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+\" \"+o+\" \",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a==\"string\"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||\"*\",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[\" \"],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join(\"\").replace(j,\"$1\"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(\"\"))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w=\"0\",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG(\"*\",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type===\"ID\"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,\"\"),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,\"\"),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join(\"\");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p=\"undefined\",d=(\"sizcache\"+Math.random()).replace(\".\",\"\"),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+\" \"]=r},e)},k=C(),L=C(),A=C(),O=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",M=\"(?:\\\\\\\\.|[-\\\\w]|[^\\\\x00-\\\\xa0])+\",_=M.replace(\"w\",\"w#\"),D=\"([*^$|!~]?=)\",P=\"\\\\[\"+O+\"*(\"+M+\")\"+O+\"*(?:\"+D+O+\"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\"+_+\")|)|)\"+O+\"*\\\\]\",H=\":(\"+M+\")(?:\\\\((?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\2|([^()[\\\\]]*|(?:(?:\"+P+\")|[^:]|\\\\\\\\.)*|.*))\\\\)|)\",B=\":(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+O+\"*((?:-\\\\d)?\\\\d*)\"+O+\"*\\\\)|)(?=[^-]|$)\",j=new RegExp(\"^\"+O+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+O+\"+$\",\"g\"),F=new RegExp(\"^\"+O+\"*,\"+O+\"*\"),I=new RegExp(\"^\"+O+\"*([\\\\x20\\\\t\\\\r\\\\n\\\\f>+~])\"+O+\"*\"),q=new RegExp(H),R=/^(?:#([\\w\\-]+)|(\\w+)|\\.([\\w\\-]+))$/,U=/^:not/,z=/[\\x20\\t\\r\\n\\f]*[+~]/,W=/:not\\($/,X=/h\\d/i,V=/input|select|textarea|button/i,$=/\\\\(?!\\\\)/g,J={ID:new RegExp(\"^#(\"+M+\")\"),CLASS:new RegExp(\"^\\\\.(\"+M+\")\"),NAME:new RegExp(\"^\\\\[name=['\\\"]?(\"+M+\")['\\\"]?\\\\]\"),TAG:new RegExp(\"^(\"+M.replace(\"w\",\"w*\")+\")\"),ATTR:new RegExp(\"^\"+P),PSEUDO:new RegExp(\"^\"+H),POS:new RegExp(B,\"i\"),CHILD:new RegExp(\"^:(only|nth|first|last)-child(?:\\\\(\"+O+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+O+\"*(?:([+-]|)\"+O+\"*(\\\\d+)|))\"+O+\"*\\\\)|)\",\"i\"),needsContext:new RegExp(\"^\"+O+\"*[>+~]|\"+B,\"i\")},K=function(e){var t=g.createElement(\"div\");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment(\"\")),!e.getElementsByTagName(\"*\").length}),G=K(function(e){return e.innerHTML=\"<a href='#'></a>\",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute(\"href\")===\"#\"}),Y=K(function(e){e.innerHTML=\"<select></select>\";var t=typeof e.lastChild.getAttribute(\"multiple\");return t!==\"boolean\"&&t!==\"string\"}),Z=K(function(e){return e.innerHTML=\"<div class='hidden e'></div><div class='hidden'></div>\",!e.getElementsByClassName||!e.getElementsByClassName(\"e\").length?!1:(e.lastChild.className=\"e\",e.getElementsByClassName(\"e\").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML=\"<a name='\"+d+\"'></a><div name='\"+d+\"'></div>\",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n=\"\",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent==\"string\")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!==\"HTML\":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]==\"boolean\"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute(\"href\",2)},type:function(e){return e.getAttribute(\"type\")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode(\"id\").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e===\"*\"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,\"\"),e[3]=(e[4]||e[5]||\"\").replace($,\"\"),e[2]===\"~=\"&&(e[3]=\" \"+e[3]+\" \"),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]===\"nth\"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]===\"even\"||e[2]===\"odd\")),e[4]=+(e[6]+e[7]||e[2]===\"odd\")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(\")\",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,\"\"),function(t){return t.getAttribute(\"id\")===e}}:function(e){return e=e.replace($,\"\"),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode(\"id\");return n&&n.value===e}},TAG:function(e){return e===\"*\"?function(){return!0}:(e=e.replace($,\"\").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+\" \"];return t||(t=new RegExp(\"(^|\"+O+\")\"+e+\"(\"+O+\"|$)\"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute(\"class\")||\"\")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t===\"!=\":t?(s+=\"\",t===\"=\"?s===n:t===\"!=\"?s!==n:t===\"^=\"?n&&s.indexOf(n)===0:t===\"*=\"?n&&s.indexOf(n)>-1:t===\"$=\"?n&&s.substr(s.length-n.length)===n:t===\"~=\"?(\" \"+s+\" \").indexOf(n)>-1:t===\"|=\"?s===n||s.substr(0,n.length+1)===n+\"-\":!1):!0}},CHILD:function(e,t,n,r){return e===\"nth\"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case\"only\":case\"first\":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e===\"first\")return!0;n=t;case\"last\":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error(\"unsupported pseudo: \"+e);return r[d]?r(t):r.length>1?(n=[e,e,\"\",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,\"$1\"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t===\"input\"&&!!e.checked||t===\"option\"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>\"@\"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()===\"input\"&&(t=e.type)===\"text\"&&((n=e.getAttribute(\"type\"))==null||n.toLowerCase()===t)},radio:rt(\"radio\"),checkbox:rt(\"checkbox\"),file:rt(\"file\"),password:rt(\"password\"),image:rt(\"image\"),submit:it(\"submit\"),reset:it(\"reset\"),button:function(e){var t=e.nodeName.toLowerCase();return t===\"input\"&&e.type===\"button\"||t===\"button\"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error(\"Syntax error, unrecognized expression: \"+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+\" \"];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\\\/g,r=/\\=[\\x20\\t\\r\\n\\f]*([^'\"\\]]*)[\\x20\\t\\r\\n\\f]*\\]/g,i=[\":focus\"],s=[\":active\"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML=\"<select><option selected=''></option></select>\",e.querySelectorAll(\"[selected]\").length||i.push(\"\\\\[\"+O+\"*(?:checked|disabled|ismap|multiple|readonly|selected|value)\"),e.querySelectorAll(\":checked\").length||i.push(\":checked\")}),K(function(e){e.innerHTML=\"<p test=''></p>\",e.querySelectorAll(\"[test^='']\").length&&i.push(\"[*^$]=\"+O+\"*(?:\\\"\\\"|'')\"),e.innerHTML=\"<input type='hidden'/>\",e.querySelectorAll(\":enabled\").length||i.push(\":enabled\",\":disabled\")}),i=new RegExp(i.join(\"|\")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!==\"object\"){a=ut(e),(l=r.getAttribute(\"id\"))?c=l.replace(n,\"\\\\$&\"):r.setAttribute(\"id\",c),c=\"[id='\"+c+\"'] \",f=a.length;while(f--)a[f]=c+a[f].join(\"\");h=z.test(e)&&r.parentNode||r,p=a.join(\",\")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute(\"id\")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,\"div\");try{u.call(t,\"[test!='']:sizzle\"),s.push(\"!=\",H)}catch(n){}}),s=new RegExp(s.join(\"|\")),nt.matchesSelector=function(t,n){n=n.replace(r,\"='$1']\");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[\":\"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\\[\\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!=\"string\")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack(\"\",\"find\",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),\"not\",e)},filter:function(e){return this.pushStack(ft(this,e,!0),\"filter\",e)},is:function(e){return!!e&&(typeof e==\"string\"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!=\"string\"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,\"closest\",e)},index:function(e){return e?typeof e==\"string\"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e==\"string\"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,\"parentNode\")},parentsUntil:function(e,t,n){return v.dir(e,\"parentNode\",n)},next:function(e){return at(e,\"nextSibling\")},prev:function(e){return at(e,\"previousSibling\")},nextAll:function(e){return v.dir(e,\"nextSibling\")},prevAll:function(e){return v.dir(e,\"previousSibling\")},nextUntil:function(e,t,n){return v.dir(e,\"nextSibling\",n)},prevUntil:function(e,t,n){return v.dir(e,\"previousSibling\",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,\"iframe\")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r==\"string\"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(\",\"))}}),v.extend({filter:function(e,t,n){return n&&(e=\":not(\"+e+\")\"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct=\"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",ht=/ jQuery\\d+=\"(?:null|\\d+)\"/g,pt=/^\\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,vt=/<([\\w:]+)/,mt=/<tbody/i,gt=/<|&#?\\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp(\"<(?:\"+ct+\")[\\\\s/>]\",\"i\"),Et=/^(?:checkbox|radio)$/,St=/checked\\s*(?:[^=]|=\\s*.checked.)/i,xt=/\\/(java|ecma)script/i,Tt=/^\\s*<!(?:\\[CDATA\\[|\\-\\-)|[\\]\\-]{2}>\\s*$/g,Nt={option:[1,\"<select multiple='multiple'>\",\"</select>\"],legend:[1,\"<fieldset>\",\"</fieldset>\"],thead:[1,\"<table>\",\"</table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],col:[2,\"<table><tbody></tbody><colgroup>\",\"</colgroup></table>\"],area:[1,\"<map>\",\"</map>\"],_default:[0,\"\",\"\"]},Ct=lt(i),kt=Ct.appendChild(i.createElement(\"div\"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,\"X<div>\",\"</div>\"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,\"body\")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),\"before\",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),\"after\",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName(\"*\")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName(\"*\"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,\"\"):t;if(typeof e==\"string\"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||[\"\",\"\"])[1].toLowerCase()]){e=e.replace(dt,\"<$1></$2>\");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName(\"*\")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),\"replaceWith\",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!=\"string\"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f==\"string\"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,\"tr\");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],\"table\")?Lt(this[a],\"tbody\"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:\"GET\",dataType:\"script\",async:!1,global:!1,\"throws\":!0}):v.error(\"no ajax\"):v.globalEval((t.text||t.textContent||t.innerHTML||\"\").replace(Tt,\"\")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a==\"string\"&&a.length<512&&n===i&&a.charAt(0)===\"<\"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test(\"<\"+e.nodeName+\">\")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment==\"undefined\")t=i;for(s=0;(u=e[s])!=null;s++){typeof u==\"number\"&&(u+=\"\");if(!u)continue;if(typeof u==\"string\")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement(\"div\"),y.appendChild(c),u=u.replace(dt,\"<$1></$2>\"),a=(vt.exec(u)||[\"\",\"\"])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a===\"table\"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===\"<table>\"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],\"tbody\")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,\"input\")?_t(u):typeof u.getElementsByTagName!=\"undefined\"&&v.grep(u.getElementsByTagName(\"input\"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,\"script\")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!=\"undefined\"&&(g=v.grep(v.merge([],u.getElementsByTagName(\"script\")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \\/]([\\w.]+)/.exec(e)||/(webkit)[ \\/]([\\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(e)||/(msie) ([\\w.]+)/.exec(e)||e.indexOf(\"compatible\")<0&&/(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(e)||[];return{browser:t[1]||\"\",version:t[2]||\"0\"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\\([^)]*\\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp(\"^(\"+m+\")(.*)$\",\"i\"),Ut=new RegExp(\"^(\"+m+\")(?!px)[a-z%]+$\",\"i\"),zt=new RegExp(\"^([-+])=(\"+m+\")\",\"i\"),Wt={BODY:\"block\"},Xt={position:\"absolute\",visibility:\"hidden\",display:\"block\"},Vt={letterSpacing:0,fontWeight:400},$t=[\"Top\",\"Right\",\"Bottom\",\"Left\"],Jt=[\"Webkit\",\"O\",\"Moz\",\"ms\"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e==\"boolean\";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,\"opacity\");return n===\"\"?\"1\":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":v.support.cssFloat?\"cssFloat\":\"styleFloat\"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&\"get\"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o===\"string\"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o=\"number\");if(r==null||o===\"number\"&&isNaN(r))return;o===\"number\"&&!v.cssNumber[a]&&(r+=\"px\");if(!u||!(\"set\"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&\"get\"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s===\"normal\"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===\"\"&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t===\"fontSize\"?\"1em\":i,i=s.pixelLeft+\"px\",s.left=n,r&&(e.runtimeStyle.left=r)),i===\"\"?\"auto\":i}),v.each([\"height\",\"width\"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,\"display\"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,\"boxSizing\")===\"border-box\"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||\"\")?.01*parseFloat(RegExp.$1)+\"\":t?\"1\":\"\"},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?\"alpha(opacity=\"+t*100+\")\":\"\",s=r&&r.filter||n.filter||\"\";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,\"\"))===\"\"&&n.removeAttribute){n.removeAttribute(\"filter\");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+\" \"+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:\"inline-block\"},function(){if(t)return Dt(e,\"marginRight\")})}}),!v.support.pixelPosition&&v.fn.position&&v.each([\"top\",\"left\"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+\"px\":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,\"display\"))===\"none\"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:\"\",padding:\"\",border:\"Width\"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n==\"string\"?n.split(\" \"):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\\[\\]$/,on=/\\r?\\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,\"\\r\\n\")}}):{name:t.name,value:n.replace(on,\"\\r\\n\")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?\"\":t,i[i.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join(\"&\").replace(rn,\"+\")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg,dn=/^(?:about|app|app\\-storage|.+\\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\\/\\//,gn=/\\?/,yn=/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\\w\\+\\.\\-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=[\"*/\"]+[\"*\"];try{cn=s.href}catch(Nn){cn=i.createElement(\"a\"),cn.href=\"\",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!=\"string\"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(\" \");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n==\"object\"&&(s=\"POST\"),v.ajax({url:e,type:s,dataType:\"html\",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v(\"<div>\").append(e.replace(yn,\"\")).find(i):e)}),this},v.each(\"ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend\".split(\" \"),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each([\"get\",\"post\"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,\"script\")},getJSON:function(e,t,n){return v.get(e,t,n,\"json\")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:\"GET\",contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",processData:!0,async:!0,accepts:{xml:\"application/xml, text/xml\",html:\"text/html\",text:\"text/plain\",json:\"application/json, text/javascript\",\"*\":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:\"responseXML\",text:\"responseText\"},converters:{\"* text\":e.String,\"text html\":!0,\"text json\":v.parseJSON,\"text xml\":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||\"\",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader(\"Last-Modified\"),S&&(v.lastModified[r]=S),S=x.getResponseHeader(\"Etag\"),S&&(v.etag[r]=S)),e===304?(T=\"notmodified\",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T=\"error\",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+\"\",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger(\"ajax\"+(l?\"Success\":\"Error\"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger(\"ajaxComplete\",[x,c]),--v.active||v.event.trigger(\"ajaxStop\"))}typeof e==\"object\"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks(\"once memory\"),g=c.statusCode||{},b={},w={},E=0,S=\"canceled\",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+\"\").replace(hn,\"\").replace(mn,ln[1]+\"//\"),c.dataTypes=v.trim(c.dataType||\"*\").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]===\"http:\"?80:443))==(ln[3]||(ln[1]===\"http:\"?80:443)))),c.data&&c.processData&&typeof c.data!=\"string\"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger(\"ajaxStart\");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?\"&\":\"?\")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,\"$1_=\"+N);c.url=C+(C===c.url?(gn.test(c.url)?\"&\":\"?\")+\"_=\"+N:\"\")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader(\"Content-Type\",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader(\"If-Modified-Since\",v.lastModified[r]),v.etag[r]&&x.setRequestHeader(\"If-None-Match\",v.etag[r])),x.setRequestHeader(\"Accept\",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!==\"*\"?\", \"+Tn+\"; q=0.01\":\"\"):c.accepts[\"*\"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S=\"abort\";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,\"No Transport\");else{x.readyState=1,f&&p.trigger(\"ajaxSend\",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort(\"timeout\")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\\?/,Dn=/(=)\\?(?=&|$)|\\?\\?/,Pn=v.now();v.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var e=Mn.pop()||v.expando+\"_\"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter(\"json jsonp\",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a==\"string\"&&!(n.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&Dn.test(a);if(n.dataTypes[0]===\"jsonp\"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,\"$1\"+s):h?n.data=a.replace(Dn,\"$1\"+s):l&&(n.url+=(_n.test(f)?\"&\":\"?\")+n.jsonp+\"=\"+s),n.converters[\"script json\"]=function(){return u||v.error(s+\" was not called\"),u[0]},n.dataTypes[0]=\"json\",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),\"script\"}),v.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/javascript|ecmascript/},converters:{\"text script\":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter(\"script\",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\",e.global=!1)}),v.ajaxTransport(\"script\",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName(\"head\")[0]||i.documentElement;return{send:function(s,o){n=i.createElement(\"script\"),n.async=\"async\",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,\"success\")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&\"withCredentials\"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i[\"X-Requested-With\"]&&(i[\"X-Requested-With\"]=\"XMLHttpRequest\");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=\"\"}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp(\"^(?:([-+])=|)(\"+m+\")([a-z%]*)$\",\"i\"),Wn=/queueHooks$/,Xn=[Gn],Vn={\"*\":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?\"\":\"px\");if(r!==\"px\"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||\".5\",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=[\"*\"]):e=e.split(\" \");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||\"swing\",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?\"\":\"px\")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,\"\"),!t||t===\"auto\"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each([\"toggle\",\"show\",\"hide\"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r==\"boolean\"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css(\"opacity\",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!=\"string\"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||\"fx\",[]),this.each(function(){var t=!0,n=e!=null&&e+\"queueHooks\",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn(\"show\"),slideUp:Zn(\"hide\"),slideToggle:Zn(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e==\"object\"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration==\"number\"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue=\"fx\";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!=\"undefined\"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,\"marginTop\"))||0,n+=parseFloat(v.css(e,\"marginLeft\"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,\"position\");r===\"static\"&&(e.style.position=\"relative\");var i=v(e),s=i.offset(),o=v.css(e,\"top\"),u=v.css(e,\"left\"),a=(r===\"absolute\"||r===\"fixed\")&&v.inArray(\"auto\",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),\"using\"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,\"marginTop\"))||0,n.left-=parseFloat(v.css(e,\"marginLeft\"))||0,r.top+=parseFloat(v.css(t[0],\"borderTopWidth\"))||0,r.left+=parseFloat(v.css(t[0],\"borderLeftWidth\"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,\"position\")===\"static\")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:\"height\",Width:\"width\"},function(e,n){v.each({padding:\"inner\"+e,content:n,\"\":\"outer\"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!=\"boolean\"),u=r||(i===!0||s===!0?\"margin\":\"border\");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement[\"client\"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body[\"scroll\"+e],s[\"scroll\"+e],n.body[\"offset\"+e],s[\"offset\"+e],s[\"client\"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define==\"function\"&&define.amd&&define.amd.jQuery&&define(\"jquery\",[],function(){return v})})(window);\n"
  },
  {
    "path": "themes/default/logdata/branch.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('BranchLogHeading')) ?></h2>\n<?php if ($branchs): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('branch_date', Flux::message('BranchLogDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('account_id', Flux::message('BranchLogAccountIDLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_id', Flux::message('BranchLogCharIDLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_name', Flux::message('BranchLogCharNameLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('map', Flux::message('BranchLogMapLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($branchs as $branch): ?>\n\t<tr>\n\t\t<td align=\"center\"><?php echo $this->formatDateTime($branch->branch_date) ?></td>\n\t\t<td align=\"center\">\n\t\t\t<?php if ($branch->account_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t\t<?php echo $this->linkToAccount($branch->account_id, $branch->account_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $branch->account_id ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\t\n\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td align=\"center\">\n\t\t\t<?php if ($branch->char_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($branch->char_id, $branch->char_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $branch->char_id ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td align=\"center\"><?php echo htmlspecialchars($branch->char_name) ?></td>\n\t\t<td align=\"center\">\n\t\t\t<?php if (strlen(basename($branch->map, '.gat')) > 0): ?>\n\t\t\t\t<?php echo htmlspecialchars(basename($branch->map, '.gat')) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('BranchLogNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/logdata/cashpoints.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('CashLogHeading')) ?></h2>\n<?php if ($logs): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('time', Flux::message('CashLogDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_id', Flux::message('CashLogCharacterLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('type', Flux::message('CashLogTypeLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('amount', Flux::message('CashLogAmountLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('map', Flux::message('CashLogMapLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($logs as $log): ?>\n\t<tr>\n\t\t<td align=\"right\"><?php echo $this->formatDateTime($log->time) ?></td>\n\t\t<td>\n\t\t\t<?php if ($log->char_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<strong><?php echo $this->linkToCharacter($log->char_id, $log->char_name) ?></strong>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<strong><?php echo htmlspecialchars($log->char_name) ?></strong>\t\n\t\t\t\t<?php endif ?>\n\t\t\t<?php elseif ($log->char_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<strong><?php echo $this->linkToCharacter($log->char_id, $log->char_id) ?></strong>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<strong><?php echo htmlspecialchars($log->char_id) ?></strong>\t\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($log->pick_type): ?>\n\t\t\t\t<?php echo htmlspecialchars($log->pick_type) ?>\n\t\t\t<?php elseif ($log->type): ?>\n\t\t\t\t<?php echo $log->type ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $log->amount >= 0 ? '+'.number_format((int)$log->amount) : number_format((int)$log->amount) ?></td>\n\t\t<td>\n\t\t\t<?php if ($log->map): ?>\n\t\t\t\t<?php echo htmlspecialchars(basename($log->map, '.gat')) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('CashLogNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/logdata/char.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('CharLogHeading')) ?></h2>\n<?php if ($chars1): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('time', Flux::message('CharLogDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_msg', Flux::message('CharLogMsgLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('account_id', Flux::message('CharLogAccountIDLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_num', Flux::message('CharLogCharNumLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('name', Flux::message('CharLogCharNameLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($chars1 as $char1): ?>\n\t<tr>\n\t\t<td align=\"center\"><?php echo $this->formatDateTime($char1->time) ?></td>\n\t\t<td align=\"center\"><?php echo htmlspecialchars($char1->char_msg) ?></td>\n\t\t<td align=\"center\">\n\t\t\t<?php if ($char1->account_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t\t<?php echo $this->linkToAccount($char1->account_id, $char1->account_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $char1->account_id ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\t\n\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td align=\"center\"><?php echo htmlspecialchars($char1->char_num) ?></td>\n\t\t<td align=\"center\"><?php echo htmlspecialchars($char1->name) ?></td>\n\t\t\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('CharLogNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/logdata/chat.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Chat Messages</h2>\n<?php if ($messages): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('time', 'Date/Time') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('type', 'Type') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('type_id', 'Type ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('src_charid', 'Char ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('src_accountid', 'Account ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('src_map', 'Map') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('src_map_x', 'X') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('src_map_y', 'Y') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('dst_charname', 'Receiver') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('message', 'Message') ?></th>\n\t</tr>\n\t<?php foreach ($messages as $message): ?>\n\t<tr>\n\t\t<td align=\"right\"><?php echo $this->formatDateTime($message->time) ?></td>\n\t\t<td><?php echo $message->type ?></td>\n\t\t<td>\n\t\t\t<?php if ($message->type_id): ?>\n\t\t\t\t<?php if ($message->type == 'G' && $auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild): ?>\n\t\t\t\t\t<?php echo $this->linkToGuild($message->type_id, $message->type_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $message->type_id ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($message->src_charid): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($message->src_charid, $message->src_charid) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $message->src_charid ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($message->src_accountid): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t\t<?php echo $this->linkToAccount($message->src_accountid, $message->src_accountid) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $message->src_accountid ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if (strlen(basename($message->src_map, '.gat')) > 0): ?>\n\t\t\t\t<?php echo htmlspecialchars(basename($message->src_map, '.gat')) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($message->src_map_x): ?>\n\t\t\t\t<?php echo $message->src_map_x ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($message->src_map_y): ?>\n\t\t\t\t<?php echo $message->src_map_y ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($message->dst_charname): ?>\n\t\t\t\t<?php echo htmlspecialchars($message->dst_charname) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo htmlspecialchars($message->message) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\tNo chat messages found.\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/logdata/command.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('CommandLogHeading')) ?></h2>\n<?php if ($commands): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('atcommand_date', Flux::message('CommandLogDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('account_id', Flux::message('CommandLogAccountIdLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_id', Flux::message('CommandLogCharIdLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_name', Flux::message('CommandLogCharNameLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('command', Flux::message('CommandLogCommandLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('map', Flux::message('CommandLogMapLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($commands as $command): ?>\n\t<tr>\n\t\t<td align=\"right\"><?php echo $this->formatDateTime($command->atcommand_date) ?></td>\n\t\t<td>\n\t\t\t<?php if ($command->account_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t\t<?php echo $this->linkToAccount($command->account_id, $command->account_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $command->account_id ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($command->char_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($command->char_id, $command->char_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $command->char_id ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo htmlspecialchars($command->char_name) ?></td>\n\t\t<td><?php echo htmlspecialchars($command->command) ?></td>\n\t\t<td>\n\t\t\t<?php if (strlen(basename($command->map, '.gat')) > 0): ?>\n\t\t\t\t<?php echo htmlspecialchars(basename($command->map, '.gat')) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('CommandLogNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/logdata/feeding.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars($title) ?></h2>\n\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form class=\"search-form\" method=\"get\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module')) ?>\n\t<p>\n\t\t<label for=\"char_id\">Char ID:</label>\n\t\t<input type=\"text\" name=\"char_id\" id=\"char_id\" value=\"<?php echo htmlspecialchars($params->get('char_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"map\">Map:</label>\n\t\t<input type=\"text\" name=\"map\" id=\"map\" value=\"<?php echo htmlspecialchars($params->get('map') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"target\">Target ID:</label>\n\t\t<input type=\"text\" name=\"target\" id=\"target\" value=\"<?php echo htmlspecialchars($params->get('target') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"item_id\">Item ID:</label>\n\t\t<input type=\"text\" name=\"item_id\" id=\"item_id\" value=\"<?php echo htmlspecialchars($params->get('item_id') ?: '') ?>\" />\n\t\t...\n\t\t<label>Feeding Type:</label><!-- shared same values -->\n\t\t<?php foreach (Flux::config('FeedingTypes')->toArray() as $feedtype => $typename): ?>\n\t\t\t<label title=\"<?php echo $typename ?>\"><input type=\"checkbox\" name=\"type[<?php echo $feedtype ?>]\" value=\"1\" <?php if (in_array($feedtype,$type)) echo \" checked=\\\"yes\\\" \" ?> /> <?php echo $typename ?> ..</label>\n\t\t<?php endforeach ?>\n\t\t<br />\n\t\t<br />\n\t\t<label for=\"from_date\">Date from:</label>\n\t\t<input type=\"date\" name=\"from_date\" id=\"from_date\" value=\"<?php echo htmlspecialchars($params->get('from_date') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"to_date\">Date to:</label>\n\t\t<input type=\"date\" name=\"to_date\" id=\"to_date\" value=\"<?php echo htmlspecialchars($params->get('to_date') ?: '') ?>\" />\n\t\t...\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n\n<?php if ($feeds): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('time', 'Time') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_id', 'Char ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('type', 'Type') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('target_class', 'Target Class') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('intimacy', 'Intimacy') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('item_id', 'Item ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('map', 'Map') ?></th>\n\t</tr>\n\t<?php foreach ($feeds as $log): ?>\n\t<tr>\n\t\t<td align=\"right\"><?php echo $this->formatDateTime($log->time) ?></td>\n\t\t<td>\n\t\t\t<?php if (array_key_exists($log->char_id, $charIDs)): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<strong><?php echo $this->linkToCharacter($log->char_id, $charIDs[$log->char_id]) ?></strong>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<strong><?php echo htmlspecialchars($charIDs[$log->char_id]) ?></strong>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php elseif ($log->char_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<strong><?php echo $this->linkToCharacter($log->char_id, $log->char_id) ?></strong>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<strong><?php echo htmlspecialchars($log->char_id) ?></strong>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($log->type_name): ?>\n\t\t\t\t<?php echo htmlspecialchars($log->type_name) ?>\n\t\t\t<?php elseif ($log->type): ?>\n\t\t\t\t<?php echo $log->type ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($log->target_name): ?>\n\t\t\t\t<?php echo $this->linkToMonster($log->target_class, htmlspecialchars($log->target_name)) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $this->linkToMonster($log->target_class, $log->target_class) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $log->intimacy ?></td>\n\t\t<td>\n\t\t\t<?php if (array_key_exists($log->item_id, $itemIDs)): ?>\n\t\t\t\t<?php echo $this->linkToItem($log->item_id, htmlspecialchars($itemIDs[$log->item_id])) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo $this->linkToItem($log->item_id, $log->item_id) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($log->map): ?>\n\t\t\t\t<?php echo htmlspecialchars(basename($log->map, '.gat')) ?>\n\t\t\t\t<?php echo $log->x ?>,<?php echo $log->y ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('FeedingLogNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/logdata/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>rA Logs</h2>\n<p>You may view the rAthena logs here.</p>\n<p>Please select the log that you would like to view from the available menus.</p>\n"
  },
  {
    "path": "themes/default/logdata/inter.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('InterLogHeading')) ?></h2>\n<?php if ($inters): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('time', Flux::message('InterLogDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('log', Flux::message('InterLogLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($inters as $inter): ?>\n\t<tr>\n\t\t<td align=\"center\"><?php echo $this->formatDateTime($inter->time) ?></td>\n\t\t<td align=\"center\"><?php echo htmlspecialchars($inter->log) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('InterLogNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/logdata/login.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Logins</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form action=\"<?php echo $this->url ?>\" method=\"get\" class=\"search-form\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module'), $params->get('action')) ?>\n\t<p>\n\t\t<label for=\"use_log_after\">Date Between:</label>\n\t\t<input type=\"checkbox\" name=\"use_log_after\" id=\"use_log_after\"<?php if ($params->get('use_log_after')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('log_after') ?>\n\t\t<label for=\"use_log_before\">&mdash;</label>\n\t\t<input type=\"checkbox\" name=\"use_log_before\" id=\"use_log_before\"<?php if ($params->get('use_log_before')) echo ' checked=\"checked\"' ?> />\n\t\t<?php echo $this->dateField('log_before') ?>\n\t</p>\n\t<p>\n\t\t<label for=\"ip\">IP Address:</label>\n\t\t<input type=\"text\" name=\"ip\" id=\"ip\" value=\"<?php echo htmlspecialchars($params->get('ip') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"user\">Username:</label>\n\t\t<input type=\"text\" name=\"user\" id=\"user\" value=\"<?php echo htmlspecialchars($params->get('user') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"log\">Log Message:</label>\n\t\t<input type=\"text\" name=\"log\" id=\"log\" value=\"<?php echo htmlspecialchars($params->get('log') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"rcode\">Response:</label>\n\t\t<input type=\"text\" name=\"rcode\" id=\"rcode\" value=\"<?php echo htmlspecialchars($params->get('rcode') ?: '') ?>\" />\n\t\t\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($logins): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('time', 'Date/Time') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('ip', 'IP Address') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('user', 'Username') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('log', 'Log Message') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('rcode', 'Response') ?></th>\n\t</tr>\n\t<?php foreach ($logins as $login): ?>\n\t<tr>\n\t\t<td align=\"right\"><?php echo htmlspecialchars($this->formatDateTime($login->time)) ?></td>\n\t\t<td>\n\t\t\t<?php if ($auth->actionAllowed('account', 'index')): ?>\n\t\t\t\t<?php echo $this->linkToAccountSearch(array('last_ip' => $login->ip), $login->ip) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($login->ip) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($login->account_id && $auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t<?php echo $this->linkToAccount($login->account_id, $login->user) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($login->user) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo htmlspecialchars($login->log) ?></td>\n\t\t<td><?php echo htmlspecialchars($login->rcode) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\tNo logins found.\n\t<a href=\"javascript:history.go(-1)\">Go back</a>.\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/logdata/mvp.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('MVPLogHeading')) ?></h2>\n<?php if ($mvps): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('mvp_date', Flux::message('MVPLogDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('kill_char_id', Flux::message('MVPLogCharacterLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('monster_id', Flux::message('MVPLogMonsterLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('prize', Flux::message('MVPLogPrizeLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('mvpexp', Flux::message('MVPLogExpLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('map', Flux::message('MVPLogMapLabel')) ?></th\n\t</tr>\n\t<?php foreach ($mvps as $mvp): ?>\n\t<tr>\n\t\t<td align=\"center\"><?php echo $this->formatDateTime($mvp->mvp_date) ?></td>\n\t\t<td align=\"center\">\n\t\t\t<?php if ($mvp->kill_char_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($mvp->kill_char_id, $mvp->kill_char_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $mvp->kill_char_id ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td align=\"center\">\n\t\t<?php if ($auth->actionAllowed('monster', 'view')): ?>\n\t\t\t\t<?php echo $this->linkToMonster($mvp->monster_id, $mvp->monster_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($mvp->monster_id) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td align=\"center\"><?php echo htmlspecialchars($mvp->prize) ?></td>\n\t\t<td align=\"center\"><?php echo htmlspecialchars($mvp->mvpexp) ?></td>\n\t\t<td align=\"center\">\n\t\t\t<?php if (strlen(basename($mvp->map, '.gat')) > 0): ?>\n\t\t\t\t<?php echo htmlspecialchars(basename($mvp->map, '.gat')) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('MVPLogNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/logdata/npc.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('NPCLogHeading')) ?></h2>\n<?php if ($npcs): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('npc_date', Flux::message('NPCLogDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('account_id', Flux::message('NPCLogAccountIDLabe')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_id', Flux::message('CharLogCharIDLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_name', Flux::message('NPCLogCharNameLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('map', Flux::message('NPCLogMapLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('mes', Flux::message('NPCLogMsgLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($npcs as $npc): ?>\n\t<tr>\n\t\t<td align=\"center\"><?php echo $this->formatDateTime($npc->npc_date) ?></td>\n\t\t<td align=\"center\">\n\t\t\t<?php if ($npc->account_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('account', 'view') && $auth->allowedToViewAccount): ?>\n\t\t\t\t\t<?php echo $this->linkToAccount($npc->account_id, $npc->account_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $npc->account_id ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\t\n\t\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td align=\"center\">\n\t\t\t<?php if ($npc->char_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<?php echo $this->linkToCharacter($npc->char_id, $npc->char_id) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo $npc->char_id ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td align=\"center\"><?php echo htmlspecialchars($npc->char_name) ?></td>\n\t\t<td align=\"center\">\n\t\t\t<?php if (strlen(basename($npc->map, '.gat')) > 0): ?>\n\t\t\t\t<?php echo htmlspecialchars(basename($npc->map, '.gat')) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td align=\"center\"><?php echo htmlspecialchars($npc->mes) ?></td>\n\t\t\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('NPCLogNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/logdata/pick.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('PickLogHeading')) ?></h2>\n<?php if ($picks): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('time', Flux::message('PickLogDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_id', Flux::message('PickLogCharacterLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('type', Flux::message('PickLogTypeLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('nameid', Flux::message('PickLogItemLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('amount', Flux::message('PickLogAmountLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('refine', Flux::message('PickLogRefineLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('card0', Flux::message('PickLogCard0Label')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('card1', Flux::message('PickLogCard1Label')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('card2', Flux::message('PickLogCard2Label')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('card3', Flux::message('PickLogCard3Label')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('map', Flux::message('PickLogMapLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($picks as $pick): ?>\n\t<tr>\n\t\t<td align=\"right\"><?php echo $this->formatDateTime($pick->time) ?></td>\n\t\t<td>\n\t\t\t<?php if ($pick->char_name): ?>\n\t\t\t\t<?php if ($pick->type == 'M' || $pick->type == 'L'): ?>\n\t\t\t\t\t<?php if ($auth->actionAllowed('monster', 'view')): ?>\n\t\t\t\t\t\t<em><?php echo $this->linkToMonster($pick->char_id, $pick->char_name) ?></em>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<em><?php echo htmlspecialchars($pick->char_name) ?></em>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t\t<strong><?php echo $this->linkToCharacter($pick->char_id, $pick->char_name) ?></strong>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<strong><?php echo htmlspecialchars($pick->char_name) ?></strong>\t\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php elseif ($pick->char_id): ?>\n\t\t\t\t<?php if ($pick->type == 'M' || $pick->type == 'L'): ?>\n\t\t\t\t\t<?php if ($auth->actionAllowed('monster', 'view')): ?>\n\t\t\t\t\t\t<em><?php echo $this->linkToMonster($pick->char_id, $pick->char_id) ?></em>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<em><?php echo htmlspecialchars($pick->char_id) ?></em>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t\t<strong><?php echo $this->linkToCharacter($pick->char_id, $pick->char_id) ?></strong>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<strong><?php echo htmlspecialchars($pick->char_id) ?></strong>\t\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($pick->pick_type): ?>\n\t\t\t\t<?php echo htmlspecialchars($pick->pick_type) ?>\n\t\t\t<?php elseif ($pick->type): ?>\n\t\t\t\t<?php echo $pick->type ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($pick->item_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($pick->nameid, $pick->item_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($pick->item_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php elseif ($pick->nameid): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($pick->nameid, $pick->nameid) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($pick->nameid) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $pick->amount >= 0 ? '+'.number_format($pick->amount) : number_format($pick->amount) ?></td>\n\t\t<td><?php echo $pick->refine ?></td>\n\t\t<!-- Slot 1 -->\n\t\t<td>\n\t\t\t<?php if ($pick->card0_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($pick->card0, $pick->card0_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($pick->card0_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php elseif ($pick->card0): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($pick->card0, $pick->card0) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($pick->card0) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<!-- Slot 2 -->\n\t\t<td>\n\t\t\t<?php if ($pick->card1_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($pick->card1, $pick->card1_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($pick->card1_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php elseif ($pick->card1): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($pick->card1, $pick->card1) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($pick->card1) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<!-- Slot 3 -->\n\t\t<td>\n\t\t\t<?php if ($pick->card2_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($pick->card2, $pick->card2_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($pick->card2_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php elseif ($pick->card2): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($pick->card2, $pick->card2) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($pick->card2) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<!-- Slot 4 -->\n\t\t<td>\n\t\t\t<?php if ($pick->card3_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($pick->card3, $pick->card3_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($pick->card3_name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php elseif ($pick->card3): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($pick->card3, $pick->card3) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($pick->card3) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($pick->map): ?>\n\t\t\t\t<?php echo htmlspecialchars(basename($pick->map, '.gat')) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('PickLogNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/logdata/zeny.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('ZenyLogHeading')) ?></h2>\n<?php if ($logs): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('time', Flux::message('ZenyLogDateLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('char_id', Flux::message('ZenyLogCharacterLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('src_id', Flux::message('ZenyLogSourceLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('type', Flux::message('ZenyLogTypeLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('amount', Flux::message('ZenyLogAmountLabel')) ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('map', Flux::message('ZenyLogMapLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($logs as $log): ?>\n\t<tr>\n\t\t<td align=\"right\"><?php echo $this->formatDateTime($log->time) ?></td>\n\t\t<td>\n\t\t\t<?php if ($log->char_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<strong><?php echo $this->linkToCharacter($log->char_id, $log->char_name) ?></strong>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<strong><?php echo htmlspecialchars($log->char_name) ?></strong>\t\n\t\t\t\t<?php endif ?>\n\t\t\t<?php elseif ($log->char_id): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t<strong><?php echo $this->linkToCharacter($log->char_id, $log->char_id) ?></strong>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<strong><?php echo htmlspecialchars($log->char_id) ?></strong>\t\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($log->src_name): ?>\n\t\t\t\t<?php if ($log->type == 'M'): ?>\n\t\t\t\t\t<?php if ($auth->actionAllowed('monster', 'view')): ?>\n\t\t\t\t\t\t<em><?php echo $this->linkToMonster($log->src_id, $log->src_name) ?></em>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<em><?php echo htmlspecialchars($log->src_name) ?></em>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t\t<strong><?php echo $this->linkToCharacter($log->src_id, $log->src_name) ?></strong>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<strong><?php echo htmlspecialchars($log->src_name) ?></strong>\t\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php elseif ($log->src_id): ?>\n\t\t\t\t<?php if ($log->type == 'M'): ?>\n\t\t\t\t\t<?php if ($auth->actionAllowed('monster', 'view')): ?>\n\t\t\t\t\t\t<em><?php echo $this->linkToMonster($log->src_id, $log->src_id) ?></em>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<em><?php echo htmlspecialchars($log->src_id) ?></em>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t\t\t<strong><?php echo $this->linkToCharacter($log->src_id, $log->src_id) ?></strong>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<strong><?php echo htmlspecialchars($log->src_id) ?></strong>\t\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($log->pick_type): ?>\n\t\t\t\t<?php echo htmlspecialchars($log->pick_type) ?>\n\t\t\t<?php elseif ($log->type): ?>\n\t\t\t\t<?php echo $log->type ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo $log->amount >= 0 ? '+'.number_format((int)$log->amount) : number_format((int)$log->amount) ?></td>\n\t\t<td>\n\t\t\t<?php if ($log->map): ?>\n\t\t\t\t<?php echo htmlspecialchars(basename($log->map, '.gat')) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('ZenyLogNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/mail/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n?>\n<h2><?php echo htmlspecialchars(Flux::message('MailerHeading')) ?></h2>\n<?php if (!empty($errorMessage)): ?>\n<p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php else: ?>\n<p><?php echo htmlspecialchars(Flux::message('MailerInfo')) ?></p>\n<?php endif ?>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" name=\"mailerform\" class=\"generic-form\">\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<th><label for=\"subject\"><?php echo htmlspecialchars(Flux::message('MailerSubjectLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"subject\" id=\"subject\" /></td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t<th><label for=\"whoto\"><?php echo htmlspecialchars(Flux::message('MailerToLabel')) ?></label></th>\n\t\t\t<td><input type=\"radio\" name=\"whoto\" id=\"whoto\" value=\"1\" checked=\"checked\"> No one<br />\n\t\t\t\t<input type=\"radio\" name=\"whoto\" id=\"whoto\" value=\"2\"> Admins Only<br />\n\t\t\t\t<input type=\"radio\" name=\"whoto\" id=\"whoto\" value=\"3\"> Staff Only<br />\n\t\t\t\t<input type=\"radio\" name=\"whoto\" id=\"whoto\" value=\"5\"> VIPs<br />\n\t\t\t\t<input type=\"radio\" name=\"whoto\" id=\"whoto\" value=\"4\"> Everyone<br />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label for=\"template\"><?php echo htmlspecialchars(Flux::message('MailerSelectTemplateLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<select name=\"template\">\n\t\t\t\t<?php for($index=0; $index < $indexCount; $index++): ?>\n\t\t\t\t\t<?php if (substr(\"$dirArray[$index]\", 0, 1) != \".\" && substr(\"$dirArray[$index]\", 0, 5) != \"index\" && substr(\"$dirArray[$index]\", 0, 10) != \"changemail\" && substr(\"$dirArray[$index]\", 0, 7) != \"confirm\" && substr(\"$dirArray[$index]\", 0, 11) != \"contactform\" && substr(\"$dirArray[$index]\", 0, 7) != \"newpass\" && substr(\"$dirArray[$index]\", 0, 9) != \"newticket\" && substr(\"$dirArray[$index]\", 0, 9) != \"resetpass\" && substr(\"$dirArray[$index]\", 0, 11) != \"ticketreply\"): ?>\t\n\t\t\t\t\t\t<?php $tempexp=explode('.',$dirArray[$index]); ?>\n\t\t\t\t\t\t<option value=\"<?php echo $tempexp[0] ?>\"><?php echo $tempexp[0] ?></option>\t        \n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php endfor ?>\n\t\t\t\t</select>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\" align=\"right\">\n\t\t\t\t<input type=\"submit\" value=\"Send E-mail\" />\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n</form>\n"
  },
  {
    "path": "themes/default/main/balance.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<div class=\"credit-balance\">\n\t<span class=\"balance-text\">Donation Credits</span>\n\t<span class=\"balance-amount\"><?php echo number_format((int)$session->account->balance) ?></span>\n</div>\n"
  },
  {
    "path": "themes/default/main/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n\n<?php if(Flux::config('CMSNewsOnHomepage')): ?>\n\t<h2><?php echo htmlspecialchars(sprintf(Flux::message('MainPageWelcome'), Flux::config('SiteTitle'))) ?></h2>\n\n\t<?php if($newstype == '1'):?>\n\t\t<?php if($news): ?>\n\t\t\t<div class=\"newsDiv\">\n\t\t\t<?php foreach($news as $nrow):?>\n\t\t\t\t<h4><?php echo $nrow->title ?></h4>\n\t\t\t\t<div class=\"newsCont\">\n\t\t\t\t\t<span class=\"newsDate\"><small>by <?php echo $nrow->author ?> on <?php echo date(Flux::config('DateFormat'),strtotime($nrow->created))?></small></span>\n\t\t\t\t\t<p><?php echo $nrow->body ?></p>\n\t\t\t\t\t<?php if($nrow->created != $nrow->modified && Flux::config('CMSDisplayModifiedBy')):?>\n\t\t\t\t\t\t<small><?php echo htmlspecialchars(Flux::message('CMSModifiedLabel')) ?> : <?php echo date(Flux::config('DateFormat'),strtotime($nrow->modified))?></small>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t<?php if($nrow->link): ?>\n\t\t\t\t\t\t<a class=\"news_link\" href=\"<?php echo $nrow->link ?>\"><small><?php echo htmlspecialchars(Flux::message('CMSNewsLink')) ?></small></a>\n\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\t\t\t<?php endforeach; ?> \n\t\t\t</div>\n\t\t<?php else: ?>\n\t\t\t<p><?php echo htmlspecialchars(Flux::message('CMSNewsEmpty')) ?></p>\n\t\t<?php endif ?>\n\n\t<?php elseif($newstype == '2'):?>\n\t\t<?php if(isset($xml) && isset($xml->channel)): ?>\n\t\t<div class=\"newsDiv\">\n\t\t\t<?php foreach($xml->channel->item as $rssItem): ?>\n\t\t\t\t<?php $i++; if($i <= $newslimit): ?>\n\t\t\t\t\t<h2><?php echo $rssItem->title ?></h2>\n\t\t\t\t\t<div class=\"newsCont\">\n\t\t\t\t\t\t<span class=\"newsDate\"><small>Posted on <?php echo date(Flux::config('DateFormat'),strtotime($rssItem->pubDate))?></small></span>\n\t\t\t\t\t\t<p><?php echo $rssItem->description ?></p>\n\t\t\t\t\t\t<a class=\"news_link\" href=\"<?php echo $rssItem->link ?>\"><small><?php echo htmlspecialchars(Flux::message('CMSNewsLink')) ?></small></a>\n\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php endforeach; ?> \n\t\t</div>\n\t\t<?php else: ?>\n\t\t\t<p>\n\t\t\t\t<?php echo htmlspecialchars(Flux::message('CMSNewsRSSNotFound')) ?><br/><br/>\n\t\t\t</p>\n\t\t<?php endif ?>\n\t<?php endif ?>\n\n\n\n\n<?php else: ?>\n\t<h2><?php echo htmlspecialchars(Flux::message('MainPageHeading')) ?></h2>\n\t<p><strong><?php echo htmlspecialchars(Flux::message('MainPageInfo')) ?></strong></p>\n\t<p><?php echo htmlspecialchars(Flux::message('MainPageInfo2')) ?></p>\n\t<ol>\n\t\t<li><p class=\"green\"><?php echo htmlspecialchars(sprintf(Flux::message('MainPageStep1'), __FILE__)) ?></p></li>\n\t\t<li><p class=\"green\"><?php echo htmlspecialchars(Flux::message('MainPageStep2')) ?></p></li>\n\t</ol>\n\t<p style=\"text-align: right\"><strong><em><?php echo htmlspecialchars(Flux::message('MainPageThanks')) ?></em></strong></p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/main/loginbox.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<?php if ($session->isLoggedIn()): ?>\n<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" id=\"loginbox\">\n\t<tr>\n\t\t<td width=\"18\"><img src=\"<?php echo $this->themePath('img/loginbox_tl.gif') ?>\" style=\"display: block\" /></td>\n\t\t<td bgcolor=\"#e1eaf3\"></td>\n\t\t<td width=\"18\"><img src=\"<?php echo $this->themePath('img/loginbox_tr.gif') ?>\" style=\"display: block\" /></td>\n\t</tr>\n\t<tr>\n\t\t<td bgcolor=\"#e1eaf3\"></td>\n\t\t<td bgcolor=\"#e1eaf3\" valign=\"middle\">\n\t\t\t<span style=\"display: inline-block; margin: 2px 2px 2px 0\">\n\t\t\t\tYou are currently logged in as <strong><a href=\"<?php echo $this->url('account', 'view') ?>\" title=\"View account\"><?php echo htmlspecialchars($session->account->userid) ?></a></strong>\n\t\t\t\ton <?php echo htmlspecialchars($session->serverName) ?>.\n\t\t\t\t\n\t\t\t<?php if (count($athenaServerNames=$session->getAthenaServerNames()) > 1): ?>\n\t\t\t\tYour preferred server is:\n\t\t\t\n\t\t\t<select name=\"preferred_server\" onchange=\"updatePreferredServer(this)\"<?php if (count($athenaServerNames=$session->getAthenaServerNames()) === 1) echo ' disabled=\"disabled\"'  ?>>\n\t\t\t\t<?php foreach ($athenaServerNames as $serverName): ?>\n\t\t\t\t<option value=\"<?php echo htmlspecialchars($serverName) ?>\"<?php if ($server->serverName == $serverName) echo ' selected=\"selected\"' ?>><?php echo htmlspecialchars($serverName) ?></option>\n\t\t\t\t<?php endforeach ?>\n\t\t\t</select>.\n\t\t\t<?php endif ?>\n\t\t\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" name=\"preferred_server_form\" style=\"display: none\">\n\t\t\t\t<input type=\"hidden\" name=\"preferred_server\" value=\"\" />\n\t\t\t</form>\n\t\t\t</span>\n\t\t</td>\n\t\t<td bgcolor=\"#e1eaf3\"></td>\n\t</tr>\n\t<?php if (!empty($adminMenuItems) && Flux::config('AdminMenuNewStyle')): ?>\n\t<?php $mItems = array(); foreach ($adminMenuItems as $menuItem) $mItems[] = sprintf('<a href=\"%s\">%s</a>', $menuItem['url'], htmlspecialchars(Flux::message($menuItem['name']))) ?>\n\t<tr>\n\t\t<td bgcolor=\"#e1eaf3\"></td>\n\t\t<td bgcolor=\"#e1eaf3\" valign=\"middle\" class=\"loginbox-admin-menu\">\n\t\t\t<strong>Admin</strong>: <?php echo implode(' • ', $mItems) ?>\n\t\t</td>\n\t\t<td bgcolor=\"#e1eaf3\"></td>\n\t</tr>\n\t<?php endif ?>\n\t<tr>\n\t\t<td><img src=\"<?php echo $this->themePath('img/loginbox_bl.gif') ?>\" style=\"display: block\" /></td>\n\t\t<td bgcolor=\"#e1eaf3\"></td>\n\t\t<td><img src=\"<?php echo $this->themePath('img/loginbox_br.gif') ?>\" style=\"display: block\" /></td>\n\t</tr>\n</table>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/main/page_not_found.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('PageNotFoundHeading')) ?></h2>\n<p><?php echo htmlspecialchars(Flux::message('PageNotFoundInfo')) ?></p>\n<p><span class=\"request\"><?php echo $_SERVER['REQUEST_URI'] ?></span></p>\n"
  },
  {
    "path": "themes/default/main/pagemenu.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<?php $menus = array() ?>\n<?php if (!empty($pageMenuItems)): ?>\n\t<div id=\"pagemenu\"><?php echo empty($title) ? 'Actions for this page' : htmlspecialchars($title) ?>:\n\t<?php foreach ($pageMenuItems as $menuItemName => $menuItemLink): ?>\n\t\t<?php $menus[] = sprintf('<a href=\"%s\" class=\"page-menu-item\">%s</a>', $menuItemLink, htmlspecialchars($menuItemName)) ?>\n\t<?php endforeach ?>\n\t<?php echo implode(', ', $menus) ?>\n\t</div>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/main/sidebar.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$adminMenuItems = $this->getAdminMenuItems();\n$menuItems = $this->getMenuItems();\n?>\n\n<?php if (!empty($adminMenuItems) && !Flux::config('AdminMenuNewStyle')): ?>\n<table id=\"admin_sidebar\">\n\t<tr>\n\t\t<td><img src=\"<?php echo $this->themePath('img/sidebar_admin_complete_top.gif') ?>\" /></td>\n\t</tr>\n\t<tr>\n\t\t<th class=\"menuitem\"><strong>Admin Menu</strong></td>\n\t</tr>\n\t<?php foreach ($adminMenuItems as $menuItem): ?>\n\t<tr>\n\t\t<td class=\"menuitem\">\n\t\t\t<a href=\"<?php echo $this->url($menuItem['module'], $menuItem['action']) ?>\"<?php\n\t\t\t\tif ($menuItem['module'] == 'account' && $menuItem['action'] == 'logout')\n\t\t\t\t\techo ' onclick=\"return confirm(\\'Are you sure you want to logout?\\')\"' ?>>\n\t\t\t\t<span><?php echo htmlspecialchars(Flux::message($menuItem['name'])) ?></span>\n\t\t\t</a>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n\t<tr>\n\t\t<td><img src=\"<?php echo $this->themePath('img/sidebar_admin_complete_bottom.gif') ?>\" /></td>\n\t</tr>\n</table>\n<?php endif ?>\n\n<?php if (!empty($menuItems)): ?>\n<table id=\"sidebar\">\n\t<tr>\n\t\t<td><img src=\"<?php echo $this->themePath('img/sidebar_complete_top.gif') ?>\" /></td>\n\t</tr>\n\t<?php foreach ($menuItems as $menuCategory => $menus): ?>\n\t<?php if (!empty($menus)): ?>\n\t<tr>\n<th class=\"menuitem\"><strong><?php echo htmlspecialchars(Flux::message($menuCategory)) ?></strong></th>\n\t</tr>\n\t<?php foreach ($menus as $menuItem):  ?>\n\t<tr>\n\t\t<td class=\"menuitem\">\n\t\t\t<a href=\"<?php echo $menuItem['url'] ?>\"<?php\n\t\t\t\tif ($menuItem['module'] == 'account' && $menuItem['action'] == 'logout')\n\t\t\t\t\techo ' onclick=\"return confirm(\\'Are you sure you want to logout?\\')\"' ?>>\n\t\t\t\t<span><?php echo htmlspecialchars(Flux::message($menuItem['name'])) ?></span>\n\t\t\t</a>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n\t<?php endif ?>\n\t<?php endforeach ?>\n\t<tr>\n\t\t<td><img src=\"<?php echo $this->themePath('img/sidebar_complete_bottom.gif') ?>\" /></td>\n\t</tr>\n</table>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/main/submenu.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<?php $subMenuItems = $this->getSubMenuItems(); $menus = array() ?>\n<?php if (!empty($subMenuItems)): ?>\n\t<div id=\"submenu\">Menu:\n\t<?php foreach ($subMenuItems as $menuItem): ?>\n\t\t<?php $menus[] = sprintf('<a href=\"%s\" class=\"sub-menu-item%s\">%s</a>',\n\t\t\t$this->url($menuItem['module'], $menuItem['action']),\n\t\t\t$params->get('module') == $menuItem['module'] && $params->get('action') == $menuItem['action'] ? ' current-sub-menu' : '',\n\t\t\thtmlspecialchars($menuItem['name'])) ?>\n\t<?php endforeach ?>\n\t<?php echo implode(' / ', $menus) ?>\n\t</div>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/monster/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Monsters</h2>\n<p class=\"toggler\"><a href=\"javascript:toggleSearchForm()\">Search...</a></p>\n<form class=\"search-form\" method=\"get\">\n\t<?php echo $this->moduleActionFormInputs($params->get('module')) ?>\n\t<p>\n\t\t<label for=\"monster_id\">Monster ID:</label>\n\t\t<input type=\"text\" name=\"monster_id\" id=\"monster_id\" value=\"<?php echo htmlspecialchars($params->get('monster_id') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"name\">Name:</label>\n\t\t<input type=\"text\" name=\"name\" id=\"name\" value=\"<?php echo htmlspecialchars($params->get('name') ?: '') ?>\" />\n\t\t...\n\t\t<label for=\"mvp\">MVP:</label>\n\t\t<select name=\"mvp\" id=\"mvp\">\n\t\t\t<option value=\"all\"<?php if (!($mvpParam=strtolower($params->get('mvp') ?: '')) || $mvpParam == 'all') echo ' selected=\"selected\"' ?>>All</option>\n\t\t\t<option value=\"yes\"<?php if ($mvpParam == 'yes') echo ' selected=\"selected\"' ?>>Yes</option>\n\t\t\t<option value=\"no\"<?php if ($mvpParam == 'no') echo ' selected=\"selected\"' ?>>No</option>\n\t\t</select>\n\t</p>\n\t<p>\n\t\t<label for=\"size\">Size:</label>\n\t\t<select name=\"size\">\n\t\t\t<option value=\"-1\"<?php if (($size=$params->get('size')) === '-1') echo ' selected=\"selected\"' ?>>\n\t\t\t\tAny\n\t\t\t</option>\n\t\t\t<?php foreach (Flux::config('MonsterSizes')->toArray() as $sizeId => $sizeName): ?>\n\t\t\t\t<option value=\"<?php echo $sizeId ?>\"<?php if (($size=$params->get('size')) === strval($sizeId)) echo ' selected=\"selected\"' ?>>\n\t\t\t\t\t<?php echo htmlspecialchars($sizeName) ?>\n\t\t\t\t</option>\n\t\t\t<?php endforeach ?>\n\t\t</select>\n\t\t...\n\t\t<label for=\"race\">Race:</label>\n\t\t<select name=\"race\">\n\t\t\t<option value=\"-1\"<?php if (($race=$params->get('race')) === '-1') echo ' selected=\"selected\"' ?>>\n\t\t\t\tAny\n\t\t\t</option>\n\t\t\t<?php foreach (Flux::config('MonsterRaces')->toArray() as $raceId => $raceName): ?>\n\t\t\t\t<option value=\"<?php echo $raceId ?>\"<?php if (($race=$params->get('race')) === strval($raceId)) echo ' selected=\"selected\"' ?>>\n\t\t\t\t\t<?php echo htmlspecialchars($raceName) ?>\n\t\t\t\t</option>\n\t\t\t<?php endforeach ?>\n\t\t</select>\n\t\t...\n\t\t<label for=\"element\">Element:</label>\n\t\t<select name=\"element\">\n\t\t\t<option value=\"-1\"<?php if (($element=$params->get('element')) === '-1') echo ' selected=\"selected\"' ?>>\n\t\t\t\tAny\n\t\t\t</option>\n\t\t\t<?php foreach (Flux::config('Elements')->toArray() as $elementId => $elementName): ?>\n\t\t\t\t<option value=\"<?php echo $elementId ?>\"<?php if (($element=$params->get('element')) === strval($elementId)) echo ' selected=\"selected\"' ?>>\n\t\t\t\t\t<?php echo htmlspecialchars($elementName) ?>\n\t\t\t\t</option>\n\t\t\t\t<?php for ($elementLevel = 1; $elementLevel <= 4; $elementLevel++): ?>\n\t\t\t\t\t<option value=\"<?php echo $elementId ?>-<?php echo $elementLevel ?>\"<?php if (($element=$params->get('element')) === ($elementId . '-' . $elementLevel)) echo ' selected=\"selected\"' ?>>\n\t\t\t\t\t\t<?php echo htmlspecialchars($elementName . \" (Lv $elementLevel)\") ?>\n\t\t\t\t\t</option>\n\t\t\t\t<?php endfor ?>\n\t\t\t<?php endforeach ?>\n\t\t</select>\n\t</p>\n\t<p>\n\t\t<label for=\"custom\">Custom:</label>\n\t\t<select name=\"custom\" id=\"custom\">\n\t\t\t<option value=\"\"<?php if (!($custom=$params->get('custom'))) echo ' selected=\"selected\"' ?>>All</option>\n\t\t\t<option value=\"yes\"<?php if ($custom == 'yes') echo ' selected=\"selected\"' ?>>Yes</option>\n\t\t\t<option value=\"no\"<?php if ($custom == 'no') echo ' selected=\"selected\"' ?>>No</option>\n\t\t</select>\n\t\t\n\t\t<input type=\"submit\" value=\"Search\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<?php if ($monsters): ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th><?php echo $paginator->sortableColumn('monster_id', 'Monster ID') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('name_japanese', 'kRO Name') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('name_english', 'iRO Name') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('level', 'Level') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('hp', 'HP') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('size', 'Size') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('race', 'Race') ?></th>\n\t\t<th>Element</th>\n\t\t<th><?php echo $paginator->sortableColumn('base_exp', 'Base EXP') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('job_exp', 'Job EXP') ?></th>\n\t\t<th><?php echo $paginator->sortableColumn('origin_table', 'Custom') ?></th>\n\t</tr>\n\t<?php foreach ($monsters as $monster): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('monster', 'view')): ?>\n\t\t\t\t<?php echo $this->linkToMonster($monster->monster_id, $monster->monster_id) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($monster->monster_id) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($monster->mvp_exp): ?>\n\t\t\t<span class=\"mvp\">MVP!</span>\n\t\t\t<?php endif ?>\n\t\t\t<?php echo htmlspecialchars($monster->name_english) ?>\n\t\t</td>\n\t\t<td><?php echo htmlspecialchars($monster->name_english) ?></td>\n\t\t<td><?php echo number_format($monster->level) ?></td>\n\t\t<td><?php echo number_format($monster->hp) ?></td>\n\t\t<td>\n\t\t\t<?php if ($size=Flux::monsterSizeName($monster->size)): ?>\n\t\t\t\t<?php echo htmlspecialchars($size) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<?php if ($race=Flux::monsterRaceName($monster->race)): ?>\n\t\t\t\t<?php echo htmlspecialchars($race) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo Flux::elementName($monster->element) ?> (Lv <?php echo floor($monster->element_level) ?>)</td>\n\t\t<td><?php echo number_format($monster->base_exp * $server->expRates['Base'] / 100) ?></td>\n\t\t<td><?php echo number_format($monster->job_exp * $server->expRates['Job'] / 100) ?></td>\n\t\t<td>\n\t\t\t<?php if (preg_match('/mob_db2$/', $monster->origin_table)): ?>\n\t\t\t\tYes\n\t\t\t<?php else: ?>\n\t\t\t\tNo\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>No monsters found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/monster/view.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Viewing Monster</h2>\n<?php if ($monster): ?>\n<h3>\n\t#<?php echo $monster->monster_id ?>: <?php echo htmlspecialchars($monster->name_english) ?>\n\t<?php if ($monster->mvp_exp): ?>\n\t\t<span class=\"mvp\">(MVP)</span>\n\t<?php endif ?>\n</h3>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Monster ID</th>\n\t\t<td><?php echo $monster->monster_id ?></td>\n\t\t<?php if ($image=$this->monsterImage($monster->monster_id)): ?>\n\t\t<td rowspan=\"12\" style=\"width:150px; text-align: center; vertical-alignment: middle\">\n\t\t\t<img src=\"<?php echo $image ?>\" />\n\t\t</td>\n\t\t<?php endif ?>\n\t\t<th>Sprite</th>\n\t\t<td><?php echo htmlspecialchars($monster->sprite) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>kRO Name</th>\n\t\t<td><?php echo htmlspecialchars($monster->name_japanese) ?></td>\n\t\t<th>Custom</th>\n\t\t<td>\n\t\t\t<?php if (preg_match('/mob_db2$/', $monster->origin_table)): ?>\n\t\t\t\tYes\n\t\t\t<?php else: ?>\n\t\t\t\tNo\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>iRO Name</th>\n\t\t<td><?php echo htmlspecialchars($monster->name_english) ?></td>\n\t\t<th>HP</th>\n\t\t<td><?php echo number_format($monster->hp) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Size</th>\n\t\t<td>\n\t\t\t<?php if ($size=Flux::monsterSizeName($monster->size)): ?>\n\t\t\t\t<?php echo htmlspecialchars($size) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<th>SP</th>\n\t\t<td><?php echo number_format($monster->sp) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Race</th>\n\t\t<td>\n\t\t\t<?php if ($race=Flux::monsterRaceName($monster->race)): ?>\n\t\t\t\t<?php echo htmlspecialchars($race) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\t\n\t\t</td>\n\t\t<th>Level</th>\n\t\t<td><?php echo number_format($monster->level) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Element</th>\n\t\t<td><?php echo Flux::elementName($monster->element) ?> (Lv <?php echo floor($monster->element_level) ?>)</td>\n\t\t<th>Speed</th>\n\t\t<td><?php echo number_format($monster->walk_speed) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Experience</th>\n\t\t<td><?php echo number_format($monster->base_exp) ?></td>\n\t\t<th>Attack</th>\n\t\t<td><?php echo number_format($monster->attack) ?>~<?php echo number_format($monster->attack2) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Job Experience</th>\n\t\t<td><?php echo number_format($monster->job_exp) ?></td>\n\t\t<th>Defense</th>\n\t\t<td><?php echo number_format($monster->defense) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>MVP Experience</th>\n\t\t<td><?php echo number_format($monster->mvp_exp) ?></td>\n\t\t<th>Magic Defense</th>\n\t\t<td><?php echo number_format($monster->magic_defense) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Attack Delay</th>\n\t\t<td><?php echo number_format($monster->attack_delay) ?> ms</td>\n\t\t<th>Attack Range</th>\n\t\t<td><?php echo number_format($monster->attack_range) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Attack Motion</th>\n\t\t<td><?php echo number_format($monster->attack_motion) ?> ms</td>\n\t\t<th>Spell Range</th>\n\t\t<td><?php echo number_format($monster->skill_range) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Delay Motion</th>\n\t\t<td><?php echo number_format($monster->damage_motion) ?> ms</td>\n\t\t<th>Vision Range</th>\n\t\t<td><?php echo number_format($monster->chase_range) ?></td>\n\t</tr>\n\t<tr>\n\t\t<th>Monster Mode</th>\n\t\t<td colspan=\"<?php echo $image ? 4 : 3 ?>\">\n\t\t\t<ul class=\"monster-mode\">\n\t\t\t<?php foreach ($this->monsterMode($modes, $monster->ai) as $mode): ?>\n\t\t\t\t<li><?php echo htmlspecialchars($mode) ?></li>\n\t\t\t<?php endforeach ?>\n\t\t\t</ul>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<th>Monster Stats</th>\n\t\t<td colspan=\"<?php echo $image ? 4 : 3 ?>\">\n\t\t\t<table class=\"character-stats\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td><span class=\"stat-name\">STR</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$monster->strength) ?></span></td>\n\t\t\t\t\t<td><span class=\"stat-name\">AGI</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$monster->agility) ?></span></td>\n\t\t\t\t\t<td><span class=\"stat-name\">VIT</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$monster->vitality) ?></span></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><span class=\"stat-name\">INT</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$monster->intelligence) ?></span></td>\n\t\t\t\t\t<td><span class=\"stat-name\">DEX</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$monster->dexterity) ?></span></td>\n\t\t\t\t\t<td><span class=\"stat-name\">LUK</span></td>\n\t\t\t\t\t<td><span class=\"stat-value\"><?php echo number_format((int)$monster->luck) ?></span></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n</table>\n\n<h3><?php echo htmlspecialchars($monster->name_english) ?> Item Drops</h3>\n<?php if ($itemDrops): ?>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Item ID</th>\n\t\t<th colspan=\"2\">Item Name</th>\n\t\t<th>Drop Chance</th>\n\t\t<th>Can be stealed</th>\n\t</tr>\n\t<?php $mvpDrops = 0; ?>\n\t<?php foreach ($itemDrops as $itemDrop): ?>\n\t<tr class=\"item-drop-<?php echo $itemDrop['type'] ?>\"\n\t\ttitle=\"<strong><?php echo htmlspecialchars($itemDrop['name']) ?></strong> (<?php echo (float)$itemDrop['chance'] ?>%)\">\n\t\t<td align=\"right\">\n\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t<?php echo $this->linkToItem($itemDrop['id'], $itemDrop['id']) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($itemDrop['id']) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<?php if ($image=$this->iconImage($itemDrop['id'])): ?>\n\t\t\t<td><img src=\"<?php echo $image ?>\" /></td>\n\t\t\t<td>\n\t\t\t\t<?php if ($itemDrop['type'] == 'mvp'): ?>\n\t\t\t\t<?php ++$mvpDrops; ?>\n\t\t\t\t\t<span class=\"mvp\">MVP!</span>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php echo htmlspecialchars($itemDrop['name']) ?>\n\t\t\t</td>\n\t\t<?php else: ?>\n\t\t\t<td colspan=\"2\">\n\t\t\t\t<?php if ($itemDrop['type'] == 'mvp'): ?>\n\t\t\t\t<?php ++$mvpDrops; ?>\n\t\t\t\t\t<span class=\"mvp\">MVP!</span>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php echo htmlspecialchars($itemDrop['name']) ?>\n\t\t\t</td>\n\t\t<?php endif ?>\n\t\t<td><?php echo (float)$itemDrop['chance'] ?>%</td>\n\t\t<td><?php echo htmlspecialchars(Flux::message($itemDrop['nosteal'])) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n\t<?php if ($mvpDrops > 1 && !$server->dropRates['MvpItemMode']): ?>\n\t<tr>\n\t\t<td colspan=\"<?php echo ($server->isRenewal) ? 6 : 5; ?>\" align=\"center\">\n\t\t\t<p><em>Note: Only <strong>one</strong> MVP drop will be rewarded.</em></p>\n\t\t</td>\n\t</tr>\n\t<?php endif ?>\n</table>\n<?php else: ?>\n<p>No item drops found for <?php echo htmlspecialchars($monster->name_english) ?>.</p>\n<?php endif ?>\n\n<h3>Monster Skills for “<?php echo htmlspecialchars($monster->name_english) ?>”</h3>\n<?php if ($mobSkills): ?>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Name</th>\n\t\t<th>Level</th>\n\t\t<th>State</th>\n\t\t<th>Rate</th>\n\t\t<th>Cast Time</th>\n\t\t<th>Delay</th>\n\t\t<th>Cancelable</th>\n\t\t<th>Target</th>\n\t\t<th>Condition</th>\n\t\t<th>Value</th>\n\t</tr>\t\n\t<?php foreach ($mobSkills as $skill): ?>\n\t<tr>\n\t\t<td><?php echo htmlspecialchars($skill->INFO) ?></td>\n\t\t<td><?php echo htmlspecialchars($skill->SKILL_LV) ?></td>\n\t\t<td><?php echo htmlspecialchars(ucfirst($skill->STATE)) ?></td>\n\t\t<td><?php echo $skill->RATE/100 ?>%</td>\n\t\t<td><?php echo $skill->CASTTIME/1000 ?>s</td>\n\t\t<td><?php echo $skill->DELAY/1000 ?>s</td>\n\t\t<td><?php echo htmlspecialchars(ucfirst($skill->CANCELABLE)) ?></td>\n\t\t<td><?php echo htmlspecialchars(ucfirst($skill->TARGET)) ?></td>\n\t\t<td><em><?php echo htmlspecialchars($skill->CONDITION) ?></em></td>\n\t\t<td>\n\t\t\t<?php if (!is_null($skill->CONDITION_VALUE) && trim($skill->CONDITION_VALUE) !== ''): ?>\n\t\t\t\t<?php echo htmlspecialchars($skill->CONDITION_VALUE) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php else: ?>\n<p>No skills found for <?php echo htmlspecialchars($monster->name_english) ?>.</p>\n<?php endif ?>\n\n<?php else: ?>\n<p>No such monster was found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/news/add.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n?>\n<script src=\"https://cdn.tiny.cloud/1/<?php echo $tinymce_key ?>/tinymce/6/tinymce.min.js\" referrerpolicy=\"origin\"></script>\n<script>\n    tinymce.init({\n        selector: \"textarea\",\n        skin: \"bootstrap\",\n        plugins: \"anchor autolink charmap codesample emoticons image link lists media searchreplace table visualblocks wordcount checklist mediaembed casechange export formatpainter pageembed linkchecker a11ychecker tinymcespellchecker permanentpen powerpaste advtable advcode editimage advtemplate mentions tableofcontents footnotes autocorrect typography inlinecss\",\n        toolbar: \"undo redo | blocks | bold italic | align | checklist numlist bullist indent outdent | link image | emoticons charmap | removeformat\",\n    });\n</script>\n<h2><?php echo htmlspecialchars(Flux::message('CMSNewsAddTitle')) ?></h2>\n<?php if (!empty($errorMessage)): ?>\n    <p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<table width=\"100%\">\n        <tr>\n            <th width=\"100\"><label for=\"news_title\"><?php echo htmlspecialchars(Flux::message('CMSNewsTitleLabel')) ?></label></th>\n            <td colspan=\"2\"><input type=\"text\" name=\"news_title\" id=\"news_title\" value=\"<?php echo htmlspecialchars($title) ?>\"/></td>\n        </tr>\n        <tr>\n            <th><label for=\"news_body\"><?php echo htmlspecialchars(Flux::message('CMSNewsBodyLabel')) ?></label></th>\n            <td colspan=\"2\">\n\t\t\t\t<textarea name=\"news_body\" cols=\"70\"><?php echo htmlspecialchars($body) ?></textarea>\n\t\t\t</td>\n        </tr>\n\t\t<tr>\n            <th><label for=\"news_link\"><?php echo htmlspecialchars(Flux::message('CMSNewsLinkLabel')) ?></label></th>\n            <td width=\"100\">\n                <input type=\"text\" name=\"news_link\" id=\"news_link\" value=\"<?php echo htmlspecialchars($link) ?>\"/>\n            </td>\n\t\t\t<td align=\"left\"><?php echo htmlspecialchars(Flux::message('CMSOptionalLabel')) ?></td>\n        </tr>\n\t<tr>\n            <th><label for=\"news_author\"><?php echo htmlspecialchars(Flux::message('CMSNewsAuthorLabel')) ?></label></th>\n            <td width=\"100\">\n                <input type=\"text\" name=\"news_author\" id=\"news_author\" value=\"<?php echo htmlspecialchars($author) ?>\"/>\n            </td>\n\t\t\t<td align=\"left\"><?php echo htmlspecialchars(Flux::message('CMSRequiredLabel')) ?></td>\n        </tr>\n        <tr>\n            <td colspan=\"3\"><input type=\"submit\" value=\"Add\" /></td>\n        </tr>\n    </table>\n</form>\n"
  },
  {
    "path": "themes/default/news/delete.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n?>  \n"
  },
  {
    "path": "themes/default/news/edit.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n?>\n<script src=\"https://cdn.tiny.cloud/1/<?php echo $tinymce_key ?>/tinymce/6/tinymce.min.js\" referrerpolicy=\"origin\"></script>\n<script>\n    tinymce.init({\n        selector: \"textarea\",\n        skin: \"bootstrap\",\n        plugins: \"anchor autolink charmap codesample emoticons image link lists media searchreplace table visualblocks wordcount checklist mediaembed casechange export formatpainter pageembed linkchecker a11ychecker tinymcespellchecker permanentpen powerpaste advtable advcode editimage advtemplate mentions tableofcontents footnotes autocorrect typography inlinecss\",\n        toolbar: \"undo redo | blocks | bold italic | align | checklist numlist bullist indent outdent | link image | emoticons charmap | removeformat\",\n    });\n</script>\n<h2><?php echo htmlspecialchars(Flux::message('CMSNewsEditTitle')) ?></h2>\n<?php if (!empty($errorMessage)): ?>\n    <p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<?php if ($new): ?>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<table width=\"100%\">\n        <tr>\n            <th width=\"100\"><label for=\"news_title\"><?php echo htmlspecialchars(Flux::message('CMSNewsTitleLabel')) ?></label></th>\n            <td colspan=\"2\"><input type=\"text\" name=\"news_title\" id=\"news_title\" value=\"<?php echo htmlspecialchars($title) ?>\"/></td>\n        </tr>\n        <tr>\n            <th><label for=\"news_body\"><?php echo htmlspecialchars(Flux::message('CMSNewsBodyLabel')) ?></label></th>\n            <td colspan=\"2\">\n\t\t\t\t<textarea name=\"news_body\" cols=\"70\"><?php echo htmlspecialchars($body) ?></textarea>\n\t\t\t</td>\n        </tr>\n\t\t<tr>\n            <th><label for=\"news_link\"><?php echo htmlspecialchars(Flux::message('CMSNewsLinkLabel')) ?></label></th>\n            <td width=\"100\">\n                <input type=\"text\" name=\"news_link\" id=\"news_link\" value=\"<?php echo htmlspecialchars($link) ?>\"/>\n            </td>\n\t\t\t<td align=\"left\"><?php echo htmlspecialchars(Flux::message('CMSOptionalLabel')) ?></td>\n        </tr>\n\t<tr>\n            <th><label for=\"news_author\"><?php echo htmlspecialchars(Flux::message('CMSNewsAuthorLabel')) ?></label></th>\n            <td width=\"100\">\n                <input type=\"text\" name=\"news_author\" id=\"news_author\" value=\"<?php echo htmlspecialchars($author) ?>\"/>\n            </td>\n\t\t\t<td align=\"left\"><?php echo htmlspecialchars(Flux::message('CMSRequiredLabel')) ?></td>\n        </tr>\n        <tr>\n            <td colspan=\"3\"><input type=\"submit\" value=\"update\" /></td>\n        </tr>\n    </table>\n</form>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('CMSNewsNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('CMSGoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/news/index.php",
    "content": "<?php \nif (!defined('FLUX_ROOT')) exit;\n?>           \n<h2><?php echo htmlspecialchars(Flux::message('CMSNewsHeader')) ?></h2>\n<?php if($newstype == '1'):?>\n\t<?php if($news): ?>\n\t<div class=\"newsDiv\">\n\t\t<?php foreach($news as $nrow):?>\n\t\t\t<h2><?php echo $nrow->title ?></h2>\n\t\t\t<div class=\"newsCont\">\n\t\t\t\t<span class=\"newsDate\"><small>by <?php echo $nrow->author ?> on <?php echo date(Flux::config('DateFormat'),strtotime($nrow->created))?></small></span>\n\t\t\t\t<p><?php echo $nrow->body ?></p>\n\t\t\t\t<?php if($nrow->created != $nrow->modified && Flux::config('CMSDisplayModifiedBy')):?>\n\t\t\t\t\t<small><?php echo htmlspecialchars(Flux::message('CMSModifiedLabel')) ?> : <?php echo date('m-d-y',strtotime($nrow->modified))?></small>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<?php if($nrow->link): ?>\n\t\t\t\t\t<a class=\"news_link\" href=\"<?php echo $nrow->link ?>\"><small><?php echo htmlspecialchars(Flux::message('CMSNewsLink')) ?></small></a>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t<?php endif; ?>\n\t\t\t</div>\n\t\t<?php endforeach; ?> \n\t</div>\n\t<?php else: ?>\n\t\t<p>\n\t\t\t<?php echo htmlspecialchars(Flux::message('CMSNewsEmpty')) ?><br/><br/>\n\t\t</p>\n\t<?php endif ?>\n\n\n\n<?php elseif($newstype == '2'):?>\n\t<?php if(isset($xml) && isset($xml->channel)): ?>\n\t<div class=\"newsDiv\">\n\t\t<?php foreach($xml->channel->item as $rssItem): ?>\n\t\t\t<?php $i++; if($i <= $newslimit): ?>\n\t\t\t\t<h2><?php echo $rssItem->title ?></h2>\n\t\t\t\t<div class=\"newsCont\">\n\t\t\t\t\t<span class=\"newsDate\"><small>Posted on <?php echo date(Flux::config('DateFormat'),strtotime($rssItem->pubDate))?></small></span>\n\t\t\t\t\t<p><?php echo $rssItem->description ?></p>\n\t\t\t\t\t<a class=\"news_link\" href=\"<?php echo $rssItem->link ?>\"><small><?php echo htmlspecialchars(Flux::message('CMSNewsLink')) ?></small></a>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t</div>\n\t\t\t<?php endif ?>\n\t\t<?php endforeach; ?> \n\t</div>\n\t<?php else: ?>\n\t\t<p>\n\t\t\t<?php echo htmlspecialchars(Flux::message('CMSNewsRSSNotFound')) ?><br/><br/>\n\t\t</p>\n\t<?php endif ?>\n\n<?php else: ?>\n\t\t<p>Setting not properly configured.</p>\n\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/news/manage.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;    \n$this->loginRequired();\n?>\n<h2><?php echo htmlspecialchars(Flux::message('CMSNewsHeader')) ?></h2>\n<?php if($news): ?>\n\t<table class=\"horizontal-table\" width=\"100%\">  \n\t\t<tr>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('CMSNewsTitleLabel')) ?></th>    \n\t\t\t<th><?php echo htmlspecialchars(Flux::message('CMSNewsAuthorLabel')) ?></th>    \n\t\t\t<th><?php echo htmlspecialchars(Flux::message('CMSCreatedLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('CMSModifiedLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('CMSActionLabel')) ?></th>    \n\t\t</tr>\n\t\t<?php foreach($news as $nrow):?>\n\t\t\t<tr>\n\t\t\t\t<td><?php echo $nrow->title?></td>\n\t\t\t\t<td><?php echo $nrow->author?></td>\n\t\t\t\t<td><?php echo date('d-m-Y',strtotime($nrow->created))?></td>\n\t\t\t\t<td><?php echo date('d-m-Y',strtotime($nrow->modified))?></td>\n\t\t\t\t<td>\n\t\t\t\t\t<a href=\"<?php echo $this->url('news', 'edit', array('id' => $nrow->id)); ?>\">Edit</a> |\n\t\t\t\t\t<a href=\"<?php echo $this->url('news', 'delete', array('id' => $nrow->id)); ?>\" onclick=\"return confirm('<?php echo htmlspecialchars(Flux::message('CMSConfirmDeleteLabel')) ?>');\">Delete</a>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php endforeach;?>\n\t</table>\n<?php else: ?>\n\t<p>\n\t\t<?php echo htmlspecialchars(Flux::message('CMSNewsEmpty')) ?><br/><br/>\n\t\t<a href=\"<?php echo $this->url('news', 'add') ?>\"><?php echo htmlspecialchars(Flux::message('CMSCreateLabel')) ?></a>\n\t</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/news/view.php",
    "content": "<?php \nif (!defined('FLUX_ROOT')) exit;\n?>           \n<h2><?php echo htmlspecialchars(Flux::message('CMSNewsHomeTitle')) ?></h2>\n<?php if($news): ?>\n<div class=\"newsDiv\">\n\t<?php foreach($news as $nrow):?>\n\t\t<h4><?php echo $nrow->title ?></h4>\n\t\t<div class=\"newsCont\">\n\t\t\t<span class=\"newsDate\"><small>by <?php echo $nrow->author ?> on <?php echo date(Flux::config('DateFormat'),strtotime($nrow->created))?></small></span>\n\t\t\t<p><?php echo $nrow->body ?></p>\n\t\t\t<?php if($nrow->created != $nrow->modified && Flux::config('CMSDisplayModifiedBy')):?>\n\t\t\t\t<small><?php echo htmlspecialchars(Flux::message('CMSModifiedLabel')) ?> : <?php echo date(Flux::config('DateFormat'),strtotime($nrow->modified))?></small>\n\t\t\t<?php endif; ?>\n\t\t\t<?php if($nrow->link): ?>\n\t\t\t\t<a class=\"news_link\" href=\"<?php echo $nrow->link ?>\"><small><?php echo htmlspecialchars(Flux::message('CMSNewsLink')) ?></small></a>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t<?php endif; ?>\n\t\t</div>\n\t<?php endforeach; ?> \n</div>\n<?php else: ?>\n\t<p>\n\t\t<?php echo htmlspecialchars(Flux::message('CMSNewsEmpty')) ?><br/><br/>\n\t</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/pages/add.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n?>\n<script src=\"https://cdn.tiny.cloud/1/<?php echo $tinymce_key ?>/tinymce/6/tinymce.min.js\" referrerpolicy=\"origin\"></script>\n<script>\n    tinymce.init({\n        selector: \"textarea\",\n        skin: \"bootstrap\",\n        plugins: \"anchor autolink charmap codesample emoticons image link lists media searchreplace table visualblocks wordcount checklist mediaembed casechange export formatpainter pageembed linkchecker a11ychecker tinymcespellchecker permanentpen powerpaste advtable advcode editimage advtemplate mentions tableofcontents footnotes autocorrect typography inlinecss\",\n        toolbar: \"undo redo | blocks | bold italic | align | checklist numlist bullist indent outdent | link image | emoticons charmap | removeformat\",\n    });\n</script>\n<h2><?php echo htmlspecialchars(Flux::message('CMSPageAddTitle')) ?></h2>\n<?php if (!empty($errorMessage)): ?>\n    <p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<table width=\"100%\">\n\t\t<tr>\n\t\t\t<th><label for=\"page_title\"><?php echo htmlspecialchars(Flux::message('CMSPageTitleLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"page_title\" id=\"page_title\" value=\"<?php echo htmlspecialchars($title) ?>\"/></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th width=\"100\"><label for=\"page_path\"><?php echo htmlspecialchars(Flux::message('CMSPagePathLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"page_path\" id=\"page_path\" value=\"<?php echo htmlspecialchars($path) ?>\"/></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label><?php echo htmlspecialchars(Flux::message('CMSPageBodyLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<textarea name=\"page_body\"><?php echo htmlspecialchars($body) ?></textarea>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\"><input type=\"submit\" value=\"Add\" /></td>\n\t\t</tr>\n    </table>\n</form>\n"
  },
  {
    "path": "themes/default/pages/content.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n?>\n<h2><?php echo $title ?></h2>\n<?php echo $body ?>\n<?php if(Flux::config('CMSDisplayModifiedBy')):?>\n<p><small><?php echo htmlspecialchars(Flux::message('CMSModifiedLabel')) ?> : <?php echo date(Flux::config('DateFormat'),strtotime($modified))?></small></p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/pages/delete.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n?>\n"
  },
  {
    "path": "themes/default/pages/edit.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n?>\n<script src=\"https://cdn.tiny.cloud/1/<?php echo $tinymce_key ?>/tinymce/6/tinymce.min.js\" referrerpolicy=\"origin\"></script>\n<script>\n    tinymce.init({\n        selector: \"textarea\",\n        skin: \"bootstrap\",\n        plugins: \"anchor autolink charmap codesample emoticons image link lists media searchreplace table visualblocks wordcount checklist mediaembed casechange export formatpainter pageembed linkchecker a11ychecker tinymcespellchecker permanentpen powerpaste advtable advcode editimage advtemplate mentions tableofcontents footnotes autocorrect typography inlinecss\",\n        toolbar: \"undo redo | blocks | bold italic | align | checklist numlist bullist indent outdent | link image | emoticons charmap | removeformat\",\n    });\n</script>\n<h2><?php echo htmlspecialchars(Flux::message('CMSPageEditTitle')) ?></h2>\n<?php if (!empty($errorMessage)): ?>\n    <p class=\"red\"><?php echo htmlspecialchars($errorMessage) ?></p>\n<?php endif ?>\n<?php if ($page): ?>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\" class=\"generic-form\">\n\t<input type=\"hidden\" name=\"page_id\" value=\"<?php echo $id?>\" />\n\t<table width=\"100%\">\n\t\t<tr>\n\t\t\t<th><label for=\"page_title\"><?php echo htmlspecialchars(Flux::message('CMSPageTitleLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"page_title\" id=\"page_title\" value=\"<?php echo htmlspecialchars($title) ?>\"/></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th width=\"100\"><label for=\"page_path\"><?php echo htmlspecialchars(Flux::message('CMSPagePathLabel')) ?></label></th>\n\t\t\t<td><input type=\"text\" name=\"page_path\" id=\"page_path\" value=\"<?php echo htmlspecialchars($path) ?>\"/></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label><?php echo htmlspecialchars(Flux::message('CMSPageBodyLabel')) ?></label></th>\n\t\t\t<td>\n\t\t\t\t<textarea name=\"page_body\"><?php echo htmlspecialchars($body) ?></textarea>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\"><input type=\"submit\" value=\"Update\" /></td>\n\t\t</tr>\n    </table>\n</form>\n<?php else: ?>\n<p>\n\t<?php echo htmlspecialchars(Flux::message('PageNotFound')) ?>\n\t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('CMSGoBackLabel')) ?></a>\n</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/pages/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();   \n?>\n<h2><?php echo htmlspecialchars(Flux::message('CMSPageHeader')) ?></h2>\n<p><?php echo htmlspecialchars(Flux::message('CMSPageText')) ?></p>\n<?php if($pages): ?>\n\t<table class=\"horizontal-table\" width=\"100%\">  \n\t\t<tr>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('CMSPageTitleLabel')) ?></th>\n\t\t\t<th><?php echo htmlspecialchars(Flux::message('CMSActionLabel')) ?></th>    \n\t\t</tr>\n\t\t<?php foreach($pages as $prow):?>\n\t\t\t<tr >\n\t\t\t\t<td><a href=\"<?php echo $this->url('pages', 'content', array('path' => $prow->path))?>\" title=\"View the <?php echo $prow->title?> Page\"><?php echo $prow->title?></a></td>\n\t\t\t\t<td align=\"center\">\n\t\t\t\t\t<a href=\"<?php echo $this->url('pages', 'edit', array('id' => $prow->id)); ?>\"><?php echo htmlspecialchars(Flux::message('CMSEdit')) ?></a> |\n\t\t\t\t\t<a href=\"<?php echo $this->url('pages', 'delete', array('id' => $prow->id)); ?>\" onclick=\"return confirm('<?php echo htmlspecialchars(Flux::message('CMSConfirmDelete')) ?>');\"><?php echo htmlspecialchars(Flux::message('CMSDelete')) ?></a>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php endforeach;?>\n\t</table>\n<?php else: ?>\n\t<p>\n\t\t<?php echo htmlspecialchars(Flux::message('CMSPageEmpty')) ?><br/><br/>\n\t\t<a href=\"<?php echo $this->url('pages', 'add') ?>\"><?php echo htmlspecialchars(Flux::message('CMSPageCreate')) ?></a>\n\t</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/purchase/add.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/purchase/cart.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>View Cart</h2>\n<p class=\"cart-info-text\">You have <span class=\"cart-item-count\"><?php echo number_format(count($items)) ?></span> item(s) in your cart.</p>\n<p class=\"cart-total-text\">Your current subtotal is <span class=\"cart-sub-total\"><?php echo number_format($total=$server->cart->getTotal()) ?></span> credit(s).</p>\n<br />\n<p class=\"checkout-text\"><a href=\"<?php echo $this->url('purchase', 'checkout') ?>\">Proceed to Checkout Area</a></p>\n<form action=\"<?php echo $this->url('purchase', 'remove') ?>\" method=\"post\">\n\t<table class=\"vertical-table cart\">\n\t\t<?php foreach ($items as $num => $item): ?>\n\t\t<tr>\n\t\t\t<td class=\"shop-item-image\">\n\t\t\t<?php if (($item->shop_item_use_existing && ($image=$this->itemImage($item->shop_item_nameid))) || ($image=$this->shopItemImage($item->shop_item_id))): ?>\n\t\t\t\t<img src=\"<?php echo $image ?>?nocache=<?php echo rand() ?>\" />\n\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<h4>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"num[]\" value=\"<?php echo $num ?>\" />\n\t\t\t\t\t\t<?php echo htmlspecialchars($item->shop_item_name) ?>\n\t\t\t\t\t</label>\n\t\t\t\t</h4>\n\t\t\t\t<?php if ($item->shop_item_qty > 1): ?>\n\t\t\t\t<p class=\"shop-item-qty\">Quantity: <span class=\"qty\"><?php echo number_format($item->shop_item_qty) ?></span></p>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<p class=\"shop-item-cost\"><span class=\"cost\"><?php echo number_format($item->shop_item_cost) ?></span> credits</p>\n\t\t\t\t<p class=\"shop-item-action\">\n\t\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t\t<?php echo $this->linkToItem($item->shop_item_nameid, 'View Item') ?> /\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<a href=\"<?php echo $this->url('purchase', 'remove', array('num' => $num)) ?>\">Remove from Cart</a> /\n\t\t\t\t\t<a href=\"<?php echo $this->url('purchase', 'add', array('id' => $item->shop_item_id, 'cart' => true)) ?>\">Add Another to Cart</a>\n\t\t\t\t</p>\n\t\t\t\t<p><?php echo nl2br(htmlspecialchars($item->shop_item_info)) ?></p>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php endforeach ?>\n\t</table>\n\t<p class=\"remove-from-cart\">\n\t\t<input type=\"submit\" value=\"Remove Selected Items from Cart\" />\n\t</p>\n</form>\n<form action=\"<?php echo $this->url('purchase', 'clear') ?>\" method=\"post\">\n\t<p class=\"remove-from-cart\">\n\t\t<input type=\"submit\" value=\"Empty Out Your Cart\" />\n\t</p>\n</form>\n"
  },
  {
    "path": "themes/default/purchase/checkout.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Checkout</h2>\n<p>The checkout process is fairly simple, and when you're done you'll be ready to redeem your items in-game through our <span class=\"keyword\">Redemption NPC</span>.</p>\n\n<h3>Purchase Information</h3>\n<p class=\"cart-total-text\">Your current subtotal is <span class=\"cart-sub-total\"><?php echo number_format($total=$server->cart->getTotal()) ?></span> credit(s).</p>\n<p class=\"checkout-info-text\">Your remaining balance after this purchase will be <span class=\"remaining-balance\"><?php echo number_format($session->account->balance - $total) ?></span> credit(s).</p>\n<p>After reviewing the below item information, you can proceed with your checkout by clicking the “Purchase Items” button.</p>\n<p class=\"important\">Note: These items are for redemption on the <span class=\"server-name\"><?php echo htmlspecialchars($server->serverName) ?></span> server ONLY.</p>\n<p>\n\t<form action=\"<?php echo $this->url ?>\" method=\"post\">\n\t\t<?php echo $this->moduleActionFormInputs($params->get('module'), 'checkout') ?>\n\t\t<input type=\"hidden\" name=\"process\" value=\"1\" />\n\t\t<button type=\"submit\" onclick=\"return confirm('Are you sure you want to continue purchasing the below item(s)?')\">\n\t\t\t<strong>Purchase Items</strong>\n\t\t</button>\n\t</form>\n</p>\n\n<h3>Items Currently in Your Cart:</h3>\n<p class=\"cart-info-text\">You have <span class=\"cart-item-count\"><?php echo number_format(count($items)) ?></span> item(s) in your cart.</p>\n<table class=\"vertical-table cart\">\n\t<?php foreach ($items as $item): ?>\n\t<tr>\n\t\t<td>\n\t\t\t<h4>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($item->shop_item_nameid, $item->shop_item_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($item->shop_item_nameid) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</h4>\n\t\t\t<?php if ($item->shop_item_qty > 1): ?>\n\t\t\t<p class=\"shop-item-qty\">Quantity: <span class=\"qty\"><?php echo number_format($item->shop_item_qty) ?></span></p>\n\t\t\t<?php endif ?>\n\t\t\t<p class=\"shop-item-cost\"><span class=\"cost\"><?php echo number_format($item->shop_item_cost) ?></span> credits</p>\n\t\t\t<p><?php echo nl2br(htmlspecialchars($item->shop_item_info)) ?></p>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n"
  },
  {
    "path": "themes/default/purchase/clear.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/purchase/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Purchase</h2>\n<p>Items in this shop are purchased using <span class=\"keyword\">donation credits</span> and not real money.  Donation Credits are rewarded to players who <a href=\"<?php echo $this->url('donate') ?>\">make a donation to our server</a>, helping us cover the costs of maintaining and running the server.</p>\n<h2><span class=\"shop-server-name\"><?php echo htmlspecialchars($server->serverName) ?></span> Item Shop</h2>\n<p class=\"action\">\n\t<a href=\"<?php echo $this->url('purchase', 'index') ?>\"<?php if (is_null($category)) echo ' class=\"current-shop-category\"' ?>>\n\t\t<?php echo htmlspecialchars(Flux::message('AllLabel')) ?> (<?php echo number_format($total) ?>)\n\t</a>\n<?php foreach ($categories as $catID => $catName): ?>\n\t/\n\t<a href=\"<?php echo $this->url('purchase', 'index', array('category' => $catID)) ?>\"<?php if (!is_null($category) && $category === (string)$catID) echo ' class=\"current-shop-category\"' ?>>\n\t\t<?php echo htmlspecialchars($catName) ?> (<?php echo number_format($categoryCount[$catID]) ?>)\n\t</a>\n<?php endforeach ?>\n</p>\n<?php if ($categoryName): ?>\n<h3>Category: <?php echo htmlspecialchars($categoryName) ?></h3>\n<?php endif ?>\n<?php if ($items): ?>\n<?php if ($session->isLoggedIn()): ?>\n\t<?php if ($cartItems=$server->cart->getCartItemNames()): ?><p class=\"cart-items-text\">Items in your cart: <span class=\"cart-item-name\"><?php echo implode('</span>, <span class=\"cart-item-name\">', array_map('htmlspecialchars', $cartItems)) ?></span>.</p><?php endif ?>\n\t<p class=\"cart-info-text\">You have <span class=\"cart-item-count\"><?php echo number_format(count($cartItems)) ?></span> item(s) in your cart.</p>\n\t<p class=\"cart-total-text\">Your current subtotal is <span class=\"cart-sub-total\"><?php echo number_format($server->cart->getTotal()) ?></span> credit(s).</p>\n<?php endif ?>\n<?php echo $paginator->infoText() ?>\n<table class=\"shop-table\">\n\t<?php foreach ($items as $item): ?>\n\t<tr>\n\t\t<td class=\"shop-item-image\">\n\t\t<?php if (($item->shop_item_use_existing && ($image=$this->itemImage($item->shop_item_nameid))) || ($image=$this->shopItemImage($item->shop_item_id))): ?>\n\t\t\t<img src=\"<?php echo $image ?>?nocache=<?php echo rand() ?>\" />\n\t\t<?php endif ?>\n\t\t</td>\n\t\t<td>\n\t\t\t<h4 class=\"shop-item-name\">\n\t\t\t\t<?php if ($item->shop_item_qty > 1): ?>\n\t\t\t\t<span class=\"qty\"><?php echo number_format($item->shop_item_qty) ?>x</span>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php echo $this->linkToItem($item->shop_item_nameid, $item->shop_item_name) ?>\n\t\t\t</h4>\n\t\t\t<p class=\"shop-item-info\"><?php echo $item->shop_item_info ?></p>\n\t\t\t<p class=\"shop-item-action\">\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t<?php echo $this->linkToItem($item->shop_item_nameid, 'View Item') ?>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($auth->allowedToEditShopItem): ?>\n\t\t\t\t/ <a href=\"<?php echo $this->url('itemshop', 'edit', array('id' => $item->shop_item_id)) ?>\">Modify</a>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if ($auth->allowedToDeleteShopItem): ?>\n\t\t\t\t/ <a href=\"<?php echo $this->url('itemshop', 'delete', array('id' => $item->shop_item_id)) ?>\"\n\t\t\t\t\tonclick=\"return confirm('Are you sure you want to remove this item from the item shop?')\">Delete</a>\n\t\t\t\t<?php endif ?>\n\t\t\t</p>\n\t\t</td>\n\t\t<td class=\"shop-item-cost-qty\">\n\t\t\t<p><span class=\"cost\"><?php echo number_format($item->shop_item_cost) ?></span> credits.</p>\n\t\t\t<p class=\"shop-item-action\">\n\t\t\t\t<?php if ($auth->actionAllowed('purchase', 'add')): ?>\n\t\t\t\t<a href=\"<?php echo $this->url('purchase', 'add', array('id' => $item->shop_item_id)) ?>\"><strong>Add to Cart</strong></a>\n\t\t\t\t<?php endif ?>\n\t\t\t</p>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php echo $paginator->getHTML() ?>\n<?php else: ?>\n<p>There are currently no items for sale.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/purchase/pending.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Pending Redemption</h2>\n<?php if ($items): ?>\n<p>You have <?php echo number_format($total) ?> item(s) pending redemption.</p>\n<table class=\"vertical-table\">\n\t<tr>\n\t\t<th>Item Name</th>\n\t\t<th>Quantity</th>\n\t\t<th>Cost</th>\n\t\t<th>Balance (Before)</th>\n\t\t<th>Balance (After)</th>\n\t\t<th>Purchase Date</th>\n\t</tr>\n\t<?php foreach ($items as $item): ?>\n\t<tr>\n\t\t<td align=\"right\">\n\t\t\t<?php if ($item->item_name): ?>\n\t\t\t\t<?php if ($auth->actionAllowed('item', 'view')): ?>\n\t\t\t\t\t<?php echo $this->linkToItem($item->nameid, $item->item_name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($item->nameid) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<span class=\"not-applicable\">Unknown</span>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<td><?php echo number_format($item->quantity) ?></td>\n\t\t<td><?php echo number_format($item->cost) ?></td>\n\t\t<td><?php echo number_format($item->credits_before) ?></td>\n\t\t<td><?php echo number_format($item->credits_after) ?></td>\n\t\t\n\t\t<td><?php echo $this->formatDateTime($item->purchase_date) ?></td>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php else: ?>\n<p>You currently have no items pending redemption.\n\tIf you would like to make a purchase, please go to the <a href=\"<?php echo $this->url('purchase') ?>\">shop</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/purchase/remove.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/ranking/alchemist.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Alchemist Ranking</h2>\n<h3>\n\tTop <?php echo number_format($limit=(int)Flux::config('AlchemistRankingLimit')) ?> Alchemist Characters\n\t<?php if (!is_null($jobClass)): ?>\n\t(<?php echo htmlspecialchars($className=$this->jobClassText($jobClass)) ?>)\n\t<?php endif ?>\n\ton <?php echo htmlspecialchars($server->serverName) ?>\n</h3>\n<?php if ($chars): ?>\n<form action=\"\" method=\"get\" class=\"search-form2\">\n\t<?php echo $this->moduleActionFormInputs('ranking', 'alchemist') ?>\n\t<p>\n\t\t<label for=\"jobclass\">Filter by job class:</label>\n\t\t<select name=\"jobclass\" id=\"jobclass\">\n\t\t\t<option value=\"\"<?php if (is_null($jobClass)) echo 'selected=\"selected\"' ?>>All</option>\n\t\t<?php foreach ($alchemistJobs as $jobClassIndex => $jobClassName): ?>\n\t\t\t<option value=\"<?php echo $jobClassIndex ?>\"\n\t\t\t\t<?php if (!is_null($jobClass) && $jobClass == $jobClassIndex) echo ' selected=\"selected\"' ?>>\n\t\t\t\t<?php echo htmlspecialchars($jobClassName) ?>\n\t\t\t</option>\n\t\t<?php endforeach ?>\n\t\t</select>\n\t\t\n\t\t<input type=\"submit\" value=\"Filter\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th>Rank</th>\n\t\t<th>Character Name</th>\n\t\t<th>Fame Points</th>\n\t\t<th>Job Class</th>\n\t\t<th>Base Level</th>\n\t\t<th>Job Level</th>\n\t\t<th colspan=\"2\">Guild Name</th>\n\t</tr>\n\t<?php $topRankType = !is_null($jobClass) ? $className : 'character' ?>\n\t<?php for ($i = 0; $i < $limit; ++$i): ?>\n\t<tr<?php if (!isset($chars[$i])) echo ' class=\"empty-row\"'; if ($i === 0) echo ' class=\"top-ranked\" title=\"<strong>'.htmlspecialchars($chars[$i]->char_name).'</strong> is the richest '.$topRankType.'!\"' ?>>\n\t\t<td align=\"right\"><?php echo number_format($i + 1) ?></td>\n\t\t<?php if (isset($chars[$i])): ?>\n\t\t<td><strong>\n\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t<?php echo $this->linkToCharacter($chars[$i]->char_id, $chars[$i]->char_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($chars[$i]->char_name) ?>\n\t\t\t<?php endif ?>\n\t\t</strong></td>\n\t\t<td><?php echo number_format((int)$chars[$i]->fame) ?></td>\n\t\t<td><?php echo $this->jobClassText($chars[$i]->char_class) ?></td>\n\t\t<td><?php echo number_format($chars[$i]->base_level) ?></td>\n\t\t<td><?php echo number_format($chars[$i]->job_level) ?></td>\n\t\t<?php if ($chars[$i]->guild_name): ?>\n\t\t<?php if ($chars[$i]->emblem): ?>\n\t\t<td width=\"24\"><img src=\"<?php echo $this->emblem($chars[$i]->guild_id) ?>\" /></td>\n\t\t<?php endif ?>\n\t\t<td<?php if (!$chars[$i]->emblem) echo ' colspan=\"2\"' ?>>\n\t\t\t<?php if ($auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild): ?>\n\t\t\t\t<?php echo $this->linkToGuild($chars[$i]->guild_id, $chars[$i]->guild_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($chars[$i]->guild_name) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<?php else: ?>\n\t\t<td colspan=\"2\"><span class=\"not-applicable\">None</span></td>\n\t\t<?php endif ?>\n\t\t<?php else: ?>\n\t\t<td colspan=\"8\"></td>\n\t\t<?php endif ?>\n\t</tr>\n\t<?php endfor ?>\n</table>\n<?php else: ?>\n<p>There are no characters. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/ranking/blacksmith.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Blacksmith Ranking</h2>\n<h3>\n\tTop <?php echo number_format($limit=(int)Flux::config('BlacksmithRankingLimit')) ?> Blacksmith Characters\n\t<?php if (!is_null($jobClass)): ?>\n\t(<?php echo htmlspecialchars($className=$this->jobClassText($jobClass)) ?>)\n\t<?php endif ?>\n\ton <?php echo htmlspecialchars($server->serverName) ?>\n</h3>\n<?php if ($chars): ?>\n<form action=\"\" method=\"get\" class=\"search-form2\">\n\t<?php echo $this->moduleActionFormInputs('ranking', 'blacksmith') ?>\n\t<p>\n\t\t<label for=\"jobclass\">Filter by job class:</label>\n\t\t<select name=\"jobclass\" id=\"jobclass\">\n\t\t\t<option value=\"\"<?php if (is_null($jobClass)) echo 'selected=\"selected\"' ?>>All</option>\n\t\t<?php foreach ($blacksmithJobs as $jobClassIndex => $jobClassName): ?>\n\t\t\t<option value=\"<?php echo $jobClassIndex ?>\"\n\t\t\t\t<?php if (!is_null($jobClass) && $jobClass == $jobClassIndex) echo ' selected=\"selected\"' ?>>\n\t\t\t\t<?php echo htmlspecialchars($jobClassName) ?>\n\t\t\t</option>\n\t\t<?php endforeach ?>\n\t\t</select>\n\t\t\n\t\t<input type=\"submit\" value=\"Filter\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th>Rank</th>\n\t\t<th>Character Name</th>\n\t\t<th>Fame Points</th>\n\t\t<th>Job Class</th>\n\t\t<th>Base Level</th>\n\t\t<th>Job Level</th>\n\t\t<th colspan=\"2\">Guild Name</th>\n\t</tr>\n\t<?php $topRankType = !is_null($jobClass) ? $className : 'character' ?>\n\t<?php for ($i = 0; $i < $limit; ++$i): ?>\n\t<tr<?php if (!isset($chars[$i])) echo ' class=\"empty-row\"'; if ($i === 0) echo ' class=\"top-ranked\" title=\"<strong>'.htmlspecialchars($chars[$i]->char_name).'</strong> is the richest '.$topRankType.'!\"' ?>>\n\t\t<td align=\"right\"><?php echo number_format($i + 1) ?></td>\n\t\t<?php if (isset($chars[$i])): ?>\n\t\t<td><strong>\n\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t<?php echo $this->linkToCharacter($chars[$i]->char_id, $chars[$i]->char_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($chars[$i]->char_name) ?>\n\t\t\t<?php endif ?>\n\t\t</strong></td>\n\t\t<td><?php echo number_format((int)$chars[$i]->fame) ?></td>\n\t\t<td><?php echo $this->jobClassText($chars[$i]->char_class) ?></td>\n\t\t<td><?php echo number_format($chars[$i]->base_level) ?></td>\n\t\t<td><?php echo number_format($chars[$i]->job_level) ?></td>\n\t\t<?php if ($chars[$i]->guild_name): ?>\n\t\t<?php if ($chars[$i]->emblem): ?>\n\t\t<td width=\"24\"><img src=\"<?php echo $this->emblem($chars[$i]->guild_id) ?>\" /></td>\n\t\t<?php endif ?>\n\t\t<td<?php if (!$chars[$i]->emblem) echo ' colspan=\"2\"' ?>>\n\t\t\t<?php if ($auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild): ?>\n\t\t\t\t<?php echo $this->linkToGuild($chars[$i]->guild_id, $chars[$i]->guild_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($chars[$i]->guild_name) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<?php else: ?>\n\t\t<td colspan=\"2\"><span class=\"not-applicable\">None</span></td>\n\t\t<?php endif ?>\n\t\t<?php else: ?>\n\t\t<td colspan=\"8\"></td>\n\t\t<?php endif ?>\n\t</tr>\n\t<?php endfor ?>\n</table>\n<?php else: ?>\n<p>There are no characters. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/ranking/character.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Character Ranking</h2>\n<h3>\n\tTop <?php echo number_format($limit=(int)Flux::config('CharRankingLimit')) ?> Characters\n\t<?php if (!is_null($jobClass)): ?>\n\t(<?php echo htmlspecialchars($className=$this->jobClassText($jobClass)) ?>)\n\t<?php endif ?>\n\ton <?php echo htmlspecialchars($server->serverName) ?>\n</h3>\n<?php if ($chars): ?>\n<form action=\"\" method=\"get\" class=\"search-form2\">\n\t<?php echo $this->moduleActionFormInputs('ranking', 'character') ?>\n\t<p>\n\t\t<label for=\"jobclass\">Filter by job class:</label>\n\t\t<select name=\"jobclass\" id=\"jobclass\">\n\t\t\t<option value=\"\"<?php if (is_null($jobClass)) echo 'selected=\"selected\"' ?>>All</option>\n\t\t<?php foreach ($classes as $jobClassIndex => $jobClassName): ?>\n\t\t\t<option value=\"<?php echo $jobClassIndex ?>\"\n\t\t\t\t<?php if (!is_null($jobClass) && $jobClass == $jobClassIndex) echo ' selected=\"selected\"' ?>>\n\t\t\t\t<?php echo htmlspecialchars($jobClassName) ?>\n\t\t\t</option>\n\t\t<?php endforeach ?>\n\t\t</select>\n\t\t\n\t\t<input type=\"submit\" value=\"Filter\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th>Rank</th>\n\t\t<th>Character Name</th>\n\t\t<th>Job Class</th>\n\t\t<th colspan=\"2\">Guild Name</th>\n\t\t<th>Base Level</th>\n\t\t<th>Job Level</th>\n\t\t<th>Base Experience</th>\n\t\t<th>Job Experience</th>\n\t</tr>\n\t<?php $topRankType = !is_null($jobClass) ? $className : 'character' ?>\n\t<?php for ($i = 0; $i < $limit; ++$i): ?>\n\t<tr<?php if (!isset($chars[$i])) echo ' class=\"empty-row\"'; if ($i === 0) echo ' class=\"top-ranked\" title=\"<strong>'.htmlspecialchars($chars[$i]->char_name).'</strong> is the top ranked '.$topRankType.'!\"' ?>>\n\t\t<td align=\"right\"><?php echo number_format($i + 1) ?></td>\n\t\t<?php if (isset($chars[$i])): ?>\n\t\t<td><strong>\n\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t<?php echo $this->linkToCharacter($chars[$i]->char_id, $chars[$i]->char_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($chars[$i]->char_name) ?>\n\t\t\t<?php endif ?>\n\t\t</strong></td>\n\t\t<td><?php echo $this->jobClassText($chars[$i]->char_class) ?></td>\n\t\t<?php if ($chars[$i]->guild_name): ?>\n\t\t<?php if ($chars[$i]->emblem): ?>\n\t\t<td width=\"24\"><img src=\"<?php echo $this->emblem($chars[$i]->guild_id) ?>\" /></td>\n\t\t<?php endif ?>\n\t\t<td<?php if (!$chars[$i]->emblem) echo ' colspan=\"2\"' ?>>\n\t\t\t<?php if ($auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild): ?>\n\t\t\t\t<?php echo $this->linkToGuild($chars[$i]->guild_id, $chars[$i]->guild_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($chars[$i]->guild_name) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<?php else: ?>\n\t\t<td colspan=\"2\"><span class=\"not-applicable\">None</span></td>\n\t\t<?php endif ?>\n\t\t<td><?php echo number_format($chars[$i]->base_level) ?></td>\n\t\t<td><?php echo number_format($chars[$i]->job_level) ?></td>\n\t\t<td><?php echo number_format($chars[$i]->base_exp) ?></td>\n\t\t<td><?php echo number_format($chars[$i]->job_exp) ?></td>\n\t\t<?php else: ?>\n\t\t<td colspan=\"8\"></td>\n\t\t<?php endif ?>\n\t</tr>\n\t<?php endfor ?>\n</table>\n<?php else: ?>\n<p>There are no characters. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/ranking/death.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Death Ranking</h2>\n<h3>\n\tTop <?php echo number_format($limit=(int)Flux::config('DeathRankingLimit')) ?> Most Killed Characters\n\t<?php if (!is_null($jobClass)): ?>\n\t(<?php echo htmlspecialchars($className=$this->jobClassText($jobClass)) ?>)\n\t<?php endif ?>\n\ton <?php echo htmlspecialchars($server->serverName) ?>\n</h3>\n<?php if ($chars): ?>\n<form action=\"\" method=\"get\" class=\"search-form2\">\n\t<?php echo $this->moduleActionFormInputs('ranking', 'death') ?>\n\t<p>\n\t\t<label for=\"jobclass\">Filter by job class:</label>\n\t\t<select name=\"jobclass\" id=\"jobclass\">\n\t\t\t<option value=\"\"<?php if (is_null($jobClass)) echo 'selected=\"selected\"' ?>>All</option>\n\t\t<?php foreach ($classes as $jobClassIndex => $jobClassName): ?>\n\t\t\t<option value=\"<?php echo $jobClassIndex ?>\"\n\t\t\t\t<?php if (!is_null($jobClass) && $jobClass == $jobClassIndex) echo ' selected=\"selected\"' ?>>\n\t\t\t\t<?php echo htmlspecialchars($jobClassName) ?>\n\t\t\t</option>\n\t\t<?php endforeach ?>\n\t\t</select>\n\t\t\n\t\t<input type=\"submit\" value=\"Filter\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th>Rank</th>\n\t\t<th>Character Name</th>\n\t\t<th>Deaths</th>\n\t\t<th>Job Class</th>\n\t\t<th>Base Level</th>\n\t\t<th>Job Level</th>\n\t\t<th colspan=\"2\">Guild Name</th>\n\t</tr>\n\t<?php $topRankType = !is_null($jobClass) ? $className : 'character' ?>\n\t<?php for ($i = 0; $i < $limit; ++$i): ?>\n\t<tr<?php if (!isset($chars[$i])) echo ' class=\"empty-row\"'; if ($i === 0) echo ' class=\"top-ranked\" title=\"<strong>'.htmlspecialchars($chars[$i]->char_name).'</strong> is the most killed '.$topRankType.'!\"' ?>>\n\t\t<td align=\"right\"><?php echo number_format($i + 1) ?></td>\n\t\t<?php if (isset($chars[$i])): ?>\n\t\t<td><strong>\n\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t<?php echo $this->linkToCharacter($chars[$i]->char_id, $chars[$i]->char_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($chars[$i]->char_name) ?>\n\t\t\t<?php endif ?>\n\t\t</strong></td>\n\t\t<td><?php echo number_format((int)$chars[$i]->death_count) ?></td>\n\t\t<td><?php echo $this->jobClassText($chars[$i]->char_class) ?></td>\n\t\t<td><?php echo number_format($chars[$i]->base_level) ?></td>\n\t\t<td><?php echo number_format($chars[$i]->job_level) ?></td>\n\t\t<?php if ($chars[$i]->guild_name): ?>\n\t\t<?php if ($chars[$i]->emblem): ?>\n\t\t<td width=\"24\"><img src=\"<?php echo $this->emblem($chars[$i]->guild_id) ?>\" /></td>\n\t\t<?php endif ?>\n\t\t<td<?php if (!$chars[$i]->emblem) echo ' colspan=\"2\"' ?>>\n\t\t\t<?php if ($auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild): ?>\n\t\t\t\t<?php echo $this->linkToGuild($chars[$i]->guild_id, $chars[$i]->guild_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($chars[$i]->guild_name) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<?php else: ?>\n\t\t<td colspan=\"2\"><span class=\"not-applicable\">None</span></td>\n\t\t<?php endif ?>\n\t\t<?php else: ?>\n\t\t<td colspan=\"8\"></td>\n\t\t<?php endif ?>\n\t</tr>\n\t<?php endfor ?>\n</table>\n<?php else: ?>\n<p>There are no characters. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/ranking/guild.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Guild Ranking</h2>\n<h3>\n\tTop <?php echo number_format($limit=(int)Flux::config('GuildRankingLimit')) ?> Guilds\n\ton <?php echo htmlspecialchars($server->serverName) ?>\n</h3>\n<?php if ($guilds): ?>\n\t<table class=\"horizontal-table\">\n\t\t<tr>\n\t\t\t<th>Rank</th>\n\t\t\t<th colspan=\"2\">Guild Name</th>\n\t\t\t<th>Guild Level</th>\n\t\t\t<th>Castles Owned</th>\n\t\t\t<th>Members</th>\n\t\t\t<th>Average Level</th>\n\t\t\t<th>Experience</th>\n\t\t</tr>\n\t\t<?php for ($i = 0; $i < $limit; ++$i): ?>\n\t\t<tr<?php if (!isset($guilds[$i])) echo ' class=\"empty-row\"'; if ($i === 0) echo ' class=\"top-ranked\" title=\"<strong>'.htmlspecialchars($guilds[$i]->name).'</strong> is the top ranked guild!\"' ?>>\n\t\t\t<td align=\"right\"><?php echo number_format($i + 1) ?></td>\n\t\t\t<?php if (isset($guilds[$i])): ?>\n\t\t\t<?php if ($guilds[$i]->emblem): ?>\n\t\t\t<td width=\"24\"><img src=\"<?php echo $this->emblem($guilds[$i]->guild_id) ?>\" /></td>\n\t\t\t<?php endif ?>\n\t\t\t<td<?php if (!$guilds[$i]->emblem) echo ' colspan=\"2\"' ?>><strong>\n\t\t\t\t<?php if ($auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild): ?>\n\t\t\t\t\t<?php echo $this->linkToGuild($guilds[$i]->guild_id, $guilds[$i]->name) ?>\n\t\t\t\t<?php else: ?>\n\t\t\t\t\t<?php echo htmlspecialchars($guilds[$i]->name) ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</strong></td>\n\t\t\t<td><?php echo number_format($guilds[$i]->guild_lv) ?></td>\n\t\t\t<td><?php echo number_format($guilds[$i]->castles) ?></td>\n\t\t\t<td><?php echo number_format($guilds[$i]->members) ?></td>\n\t\t\t<td><?php echo number_format($guilds[$i]->average_lv) ?></td>\n\t\t\t<td><?php echo number_format($guilds[$i]->exp) ?></td>\n\t\t\t<?php else: ?>\n\t\t\t<td colspan=\"8\"></td>\n\t\t\t<?php endif ?>\n\t\t</tr>\n\t\t<?php endfor ?>\n\t</table>\n<?php else: ?>\n<p>No guilds found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/ranking/homunculus.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Homunculus Ranking</h2>\n<h3>\n\tTop <?php echo number_format($limit=(int)Flux::config('HomunRankingLimit')) ?> Homunculi\n\t<?php if (!is_null($homunClass)): ?>\n\t(<?php echo htmlspecialchars($className=$this->homunClassText($homunClass)) ?>)\n\t<?php endif ?>\n\ton <?php echo htmlspecialchars($server->serverName) ?>\n</h3>\n<?php if ($homuns): ?>\n<form action=\"\" method=\"get\" class=\"search-form2\">\n\t<?php echo $this->moduleActionFormInputs('ranking', 'homunculus') ?>\n\t<p>\n\t\t<label for=\"homunclass\">Filter by class:</label>\n\t\t<select name=\"homunclass\" id=\"homunclass\">\n\t\t\t<option value=\"\"<?php if (is_null($homunClass)) echo 'selected=\"selected\"' ?>>All</option>\n\t\t<?php foreach ($classes as $homunClassIndex => $homunClassName): ?>\n\t\t\t<option value=\"<?php echo $homunClassIndex ?>\"\n\t\t\t\t<?php if (!is_null($homunClass) && $homunClass == $homunClassIndex) echo ' selected=\"selected\"' ?>>\n\t\t\t\t<?php echo htmlspecialchars($homunClassName) ?>\n\t\t\t</option>\n\t\t<?php endforeach ?>\n\t\t</select>\n\t\t\n\t\t<input type=\"submit\" value=\"Filter\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th>Rank</th>\n\t\t<th>Homunculus</th>\n\t\t<th>Owner Name</th>\n\t\t<th>Intimacy</th>\n\t\t<th>Level</th>\n\t\t<th>Experience</th>\n\t</tr>\n\t<?php $topRankType = !is_null($homunClass) ? $className : 'homunculus' ?>\n\t<?php for ($i = 0; $i < $limit; ++$i): ?>\n\t<tr<?php if (!isset($homuns[$i])) echo ' class=\"empty-row\"'; if ($i === 0) echo ' class=\"top-ranked\" title=\"<strong>'.htmlspecialchars($homuns[$i]->homun_name).'</strong> is the top ranked '.$topRankType.'!\"' ?>>\n\t\t<td align=\"right\"><?php echo number_format($i + 1) ?></td>\n\t\t<?php if (isset($homuns[$i])): ?>\n\t\t<td><strong><?php echo htmlspecialchars($homuns[$i]->homun_name) ?></strong></td>\n\t\t<td><strong>\n\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t<?php echo $this->linkToCharacter($homuns[$i]->owner, $homuns[$i]->owner_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($homuns[$i]->owner_name) ?>\n\t\t\t<?php endif ?>\n\t\t</strong></td>\n\t\t<td><?php echo number_format($homuns[$i]->intimacy) ?></td>\n\t\t<td><?php echo number_format($homuns[$i]->level) ?></td>\n\t\t<td><?php echo number_format($homuns[$i]->exp) ?></td>\n\t\t<?php else: ?>\n\t\t<td colspan=\"8\"></td>\n\t\t<?php endif ?>\n\t</tr>\n\t<?php endfor ?>\n</table>\n<?php else: ?>\n<p>There are no homunculi. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/ranking/mvp.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>MVP Ranking</h2>\n<h3>Search</h3>\n<form action=\"\" method=\"get\" class=\"search-form2\">\n\t<?php echo $this->moduleActionFormInputs('ranking', 'mvp') ?>\n\t<p>\n\t\t<label for=\"mvpdata\">Filter by monster:</label>\n\t\t<select name=\"mvpdata\" id=\"mvpdata\">\n\t\t<?php foreach ($moblist as $mob): ?>\n\t\t\t<option value=\"<?php echo $mob->id ?>\" <?php if ($mvpdata && $mob->id == $mvpdata) echo \"selected\" ?>>\n\t\t\t\t<?php echo htmlspecialchars($mob->name_english) ?> (<?php echo htmlspecialchars($mob->name_aegis) ?>)\n\t\t\t</option>\n\t\t<?php endforeach ?>\n\t\t</select>\n\t\t\n\t\t<input type=\"submit\" value=\"Filter\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n\n\n\n\n<?php if ($mvpdata): ?>\n    <?php if($kills):?>\n    <h3>Latest <?php echo Flux::config('MVPRankingLimit') ?> Kills</h3>\n    <table class=\"horizontal-table\">\n    \t<tr>\n    \t\t<th><?php echo Flux::message('MVPLogCharacterLabel') ?></th>\n    \t\t<th><?php echo Flux::message('MVPLogMonsterLabel') ?></th>\n    \t\t<th>Kills</th>\n    \t</tr>\n    \t<?php foreach ($kills as $kill): ?>\n    \t<tr>\n    \t\t<td align=\"center\">\n    \t\t\t<?php if ($kill->kill_char_id): ?>\n    \t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n    \t\t\t\t\t<?php echo $this->linkToCharacter($kill->kill_char_id, $char_ids[$kill->kill_char_id] ? htmlspecialchars($char_ids[$kill->kill_char_id]['name']) : \"Char Deleted\") ?>\n    \t\t\t\t<?php else: ?>\n    \t\t\t\t\t<?php echo $char_ids[$kill->kill_char_id] ? htmlspecialchars($char_ids[$kill->kill_char_id]['name']) : \"Char Deleted\" ?>\n    \t\t\t\t<?php endif ?>\n    \t\t\t<?php else: ?>\n    \t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n    \t\t\t<?php endif ?>\n    \t\t</td>\n    \t\t<td align=\"center\">\n    \t\t<?php if ($auth->actionAllowed('monster', 'view')): ?>\n    \t\t\t\t<?php echo $this->linkToMonster($kill->monster_id, $monsters[$kill->monster_id] ? htmlspecialchars($monsters[$kill->monster_id]) : htmlspecialchars(Flux::message('UnknownLabel'))) ?>\n    \t\t\t<?php else: ?>\n    \t\t\t\t<?php echo $monsters[$kill->monster_id] ? htmlspecialchars($monsters[$kill->monster_id]) : htmlspecialchars(Flux::message('UnknownLabel')) ?>\n    \t\t\t<?php endif ?>\n    \t\t</td>\n    \t\t<td align=\"center\"><?php echo htmlspecialchars(number_format($kill->count)) ?></td>\n        </tr>\n        <?php endforeach ?>\n    </table>\n    <?php else: ?>\n    <p>\n    \t<?php echo htmlspecialchars(Flux::message('MVPLogNotFound')) ?>\n    \t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n    </p>\n    <?php endif ?>\n\n<?php else: ?>\n    <?php if($mvps):?>\n    <h3>Latest <?php echo Flux::config('MVPRankingLimit') ?> Kills</h3>\n    <table class=\"horizontal-table\">\n    \t<tr>\n    \t\t<th><?php echo Flux::message('MVPLogDateLabel') ?></th>\n    \t\t<th><?php echo Flux::message('MVPLogCharacterLabel') ?></th>\n    \t\t<th><?php echo Flux::message('MVPLogMonsterLabel') ?></th>\n    \t\t<th><?php echo Flux::message('MVPLogExpLabel') ?></th>\n    \t\t<th><?php echo Flux::message('MVPLogMapLabel') ?></th\n    \t</tr>\n    \t<?php foreach ($mvps as $mvp): ?>\n    \t<tr>\n    \t\t<td align=\"center\"><?php echo $this->formatDateTime($mvp->mvp_date) ?></td>\n    \t\t<td align=\"center\">\n    \t\t\t<?php if ($mvp->kill_char_id): ?>\n    \t\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n    \t\t\t\t\t<?php echo $this->linkToCharacter($mvp->kill_char_id, $char_ids[$mvp->kill_char_id] ? htmlspecialchars($char_ids[$mvp->kill_char_id]['name']) : \"Char Deleted\") ?>\n    \t\t\t\t<?php else: ?>\n    \t\t\t\t\t<?php echo $char_ids[$mvp->kill_char_id] ? htmlspecialchars($char_ids[$mvp->kill_char_id]['name']) : \"Char Deleted\" ?>\n    \t\t\t\t<?php endif ?>\n    \t\t\t<?php else: ?>\n    \t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n    \t\t\t<?php endif ?>\n    \t\t</td>\n    \t\t<td align=\"center\">\n    \t\t<?php if ($auth->actionAllowed('monster', 'view')): ?>\n    \t\t\t\t<?php echo $this->linkToMonster($mvp->monster_id, $monsters[$mvp->monster_id] ? htmlspecialchars($monsters[$mvp->monster_id]) : htmlspecialchars(Flux::message('UnknownLabel'))) ?>\n    \t\t\t<?php else: ?>\n    \t\t\t\t<?php echo $monsters[$mvp->monster_id] ? htmlspecialchars($monsters[$mvp->monster_id]) : htmlspecialchars(Flux::message('UnknownLabel')) ?>\n    \t\t\t<?php endif ?>\n    \t\t</td>\n    \t\t<td align=\"center\"><?php echo htmlspecialchars(number_format($mvp->mvpexp)) ?></td>\n    \t\t<td align=\"center\">\n    \t\t\t<?php if (strlen(basename($mvp->map, '.gat')) > 0): ?>\n    \t\t\t\t<?php echo htmlspecialchars(basename($mvp->map, '.gat')) ?>\n    \t\t\t<?php else: ?>\n    \t\t\t\t<span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('NoneLabel')) ?></span>\n    \t\t\t<?php endif ?>\n    \t\t</td>\n            \n        </tr>\n        <?php endforeach ?>\n    </table>\n    <?php else: ?>\n    <p>\n    \t<?php echo htmlspecialchars(Flux::message('MVPLogNotFound')) ?>\n    \t<a href=\"javascript:history.go(-1)\"><?php echo htmlspecialchars(Flux::message('GoBackLabel')) ?></a>\n    </p>\n    <?php endif ?>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/ranking/zeny.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Zeny Ranking</h2>\n<h3>\n\tTop <?php echo number_format($limit=(int)Flux::config('ZenyRankingLimit')) ?> Richest Characters\n\t<?php if (!is_null($jobClass)): ?>\n\t(<?php echo htmlspecialchars($className=$this->jobClassText($jobClass)) ?>)\n\t<?php endif ?>\n\ton <?php echo htmlspecialchars($server->serverName) ?>\n</h3>\n<?php if ($chars): ?>\n<form action=\"\" method=\"get\" class=\"search-form2\">\n\t<?php echo $this->moduleActionFormInputs('ranking', 'zeny') ?>\n\t<p>\n\t\t<label for=\"jobclass\">Filter by job class:</label>\n\t\t<select name=\"jobclass\" id=\"jobclass\">\n\t\t\t<option value=\"\"<?php if (is_null($jobClass)) echo 'selected=\"selected\"' ?>>All</option>\n\t\t<?php foreach ($classes as $jobClassIndex => $jobClassName): ?>\n\t\t\t<option value=\"<?php echo $jobClassIndex ?>\"\n\t\t\t\t<?php if (!is_null($jobClass) && $jobClass == $jobClassIndex) echo ' selected=\"selected\"' ?>>\n\t\t\t\t<?php echo htmlspecialchars($jobClassName) ?>\n\t\t\t</option>\n\t\t<?php endforeach ?>\n\t\t</select>\n\t\t\n\t\t<input type=\"submit\" value=\"Filter\" />\n\t\t<input type=\"button\" value=\"Reset\" onclick=\"reload()\" />\n\t</p>\n</form>\n<table class=\"horizontal-table\">\n\t<tr>\n\t\t<th>Rank</th>\n\t\t<th>Character Name</th>\n\t\t<th>Zeny</th>\n\t\t<th>Job Class</th>\n\t\t<th>Base Level</th>\n\t\t<th>Job Level</th>\n\t\t<th colspan=\"2\">Guild Name</th>\n\t</tr>\n\t<?php $topRankType = !is_null($jobClass) ? $className : 'character' ?>\n\t<?php for ($i = 0; $i < $limit; ++$i): ?>\n\t<tr<?php if (!isset($chars[$i])) echo ' class=\"empty-row\"'; if ($i === 0) echo ' class=\"top-ranked\" title=\"<strong>'.htmlspecialchars($chars[$i]->char_name).'</strong> is the richest '.$topRankType.'!\"' ?>>\n\t\t<td align=\"right\"><?php echo number_format($i + 1) ?></td>\n\t\t<?php if (isset($chars[$i])): ?>\n\t\t<td><strong>\n\t\t\t<?php if ($auth->actionAllowed('character', 'view') && $auth->allowedToViewCharacter): ?>\n\t\t\t\t<?php echo $this->linkToCharacter($chars[$i]->char_id, $chars[$i]->char_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($chars[$i]->char_name) ?>\n\t\t\t<?php endif ?>\n\t\t</strong></td>\n\t\t<td><?php echo number_format((int)$chars[$i]->zeny) ?></td>\n\t\t<td><?php echo $this->jobClassText($chars[$i]->char_class) ?></td>\n\t\t<td><?php echo number_format($chars[$i]->base_level) ?></td>\n\t\t<td><?php echo number_format($chars[$i]->job_level) ?></td>\n\t\t<?php if ($chars[$i]->guild_name): ?>\n\t\t<?php if ($chars[$i]->emblem): ?>\n\t\t<td width=\"24\"><img src=\"<?php echo $this->emblem($chars[$i]->guild_id) ?>\" /></td>\n\t\t<?php endif ?>\n\t\t<td<?php if (!$chars[$i]->emblem) echo ' colspan=\"2\"' ?>>\n\t\t\t<?php if ($auth->actionAllowed('guild', 'view') && $auth->allowedToViewGuild): ?>\n\t\t\t\t<?php echo $this->linkToGuild($chars[$i]->guild_id, $chars[$i]->guild_name) ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<?php echo htmlspecialchars($chars[$i]->guild_name) ?>\n\t\t\t<?php endif ?>\n\t\t</td>\n\t\t<?php else: ?>\n\t\t<td colspan=\"2\"><span class=\"not-applicable\">None</span></td>\n\t\t<?php endif ?>\n\t\t<?php else: ?>\n\t\t<td colspan=\"8\"></td>\n\t\t<?php endif ?>\n\t</tr>\n\t<?php endfor ?>\n</table>\n<?php else: ?>\n<p>There are no characters. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/server/info.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('ServerInfoHeading')) ?></h2>\n<p><?php echo htmlspecialchars(Flux::message('ServerInfoText')) ?></p>\n\n<h3><?php echo htmlspecialchars(sprintf(Flux::message('ServerInfoSubHeading'), $server->serverName)) ?></h3>\n<div class=\"generic-form-div\">\n\t<table class=\"generic-form-table\">\n\t\t<tr>\n\t\t\t<th><label><?php echo htmlspecialchars(Flux::message('ServerInfoAccountLabel')) ?></label></th>\n\t\t\t<td><p><?php echo number_format($info['accounts']) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label><?php echo htmlspecialchars(Flux::message('ServerInfoCharLabel')) ?></label></th>\n\t\t\t<td><p><?php echo number_format($info['characters']) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label><?php echo htmlspecialchars(Flux::message('ServerInfoGuildLabel')) ?></label></th>\n\t\t\t<td><p><?php echo number_format($info['guilds']) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label><?php echo htmlspecialchars(Flux::message('ServerInfoPartyLabel')) ?></label></th>\n\t\t\t<td><p><?php echo number_format($info['parties']) ?></p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th><label><?php echo htmlspecialchars(Flux::message('ServerInfoZenyLabel')) ?></label></th>\n\t\t\t<td><p><?php echo number_format($info['zeny']) ?></p></td>\n\t\t</tr>\n\t</table>\n</div>\n\n<h3><?php echo htmlspecialchars(sprintf(Flux::message('ServerInfoSubHeading2'), $server->serverName)) ?></h3>\n<div class=\"generic-form-div\">\n\t<table class=\"generic-form-table job-classes\">\n\t\t<tr>\n\t\t<?php $i = 1; $x = 5 ?>\n\t\t<?php foreach ($info['classes'] as $class => $total): ?>\n\t\t\t<th><label><?php echo htmlspecialchars($class) ?></label></th>\n\t\t\t<td><p class=\"important\"><?php echo number_format($total) ?></p></td>\n\t\t<?php if ($i++ % $x === 0): ?>\n\t\t</tr>\n\t\t<tr>\n\t\t<?php endif ?>\n\t\t<?php endforeach ?>\n\t\t<?php --$i ?>\n\t\t<?php while (($i++) % $x): ?>\n\t\t\t<th>&nbsp;</th>\n\t\t\t<td>&nbsp;</td>\n\t\t<?php endwhile ?>\n\t\t</tr>\n\t</table>\n</div>\n"
  },
  {
    "path": "themes/default/server/status-xml.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n"
  },
  {
    "path": "themes/default/server/status.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('ServerStatusHeading')) ?></h2>\n<p><?php echo htmlspecialchars(Flux::message('ServerStatusInfo')) ?></p>\n<?php foreach ($serverStatus as $privServerName => $gameServers): ?>\n<h3>Server Status for <?php echo htmlspecialchars($privServerName) ?></h3>\n<table id=\"server_status\">\n\t<tr>\n\t\t<td class=\"status\"><?php echo htmlspecialchars(Flux::message('ServerStatusServerLabel')) ?></td>\n\t\t<td class=\"status\"><?php echo htmlspecialchars(Flux::message('ServerStatusLoginLabel')) ?></td>\n\t\t<td class=\"status\"><?php echo htmlspecialchars(Flux::message('ServerStatusCharLabel')) ?></td>\n\t\t<td class=\"status\"><?php echo htmlspecialchars(Flux::message('ServerStatusMapLabel')) ?></td>\n\t\t<td class=\"status\"><?php echo htmlspecialchars(Flux::message('ServerStatusOnlineLabel')) ?></td>\n\t\t<?php if(Flux::config('EnablePeakDisplay')): ?>\n\t\t\t<td class=\"status\"><?php echo htmlspecialchars(Flux::message('ServerStatusPeakLabel')) ?></td>\n\t\t<?php endif ?>\n\t</tr>\n\t<?php foreach ($gameServers as $serverName => $gameServer): ?>\n\t<tr>\n\t\t<th class=\"server\"><?php echo htmlspecialchars($serverName) ?></th>\n\t\t<td class=\"status\"><?php echo $this->serverUpDown($gameServer['loginServerUp']) ?></td>\n\t\t<td class=\"status\"><?php echo $this->serverUpDown($gameServer['charServerUp']) ?></td>\n\t\t<td class=\"status\"><?php echo $this->serverUpDown($gameServer['mapServerUp']) ?></td>\n\t\t<td class=\"status\"><?php echo $gameServer['playersOnline'] ?></td>\n\t\t<?php if(Flux::config('EnablePeakDisplay')): ?>\n\t\t\t<td class=\"status\"><?php echo $gameServer['playersPeak'] ?></td>\n\t\t<?php endif ?>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n\n\n<?php endforeach ?>\n"
  },
  {
    "path": "themes/default/service/tos.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('TermsHeading')) ?></h2>\n<p style=\"font-style: italic\"><?php echo htmlspecialchars(Flux::message('TermsInfo')) ?></p>\n<p class=\"note\"><?php echo htmlspecialchars(sprintf(Flux::message('TermsInfo2'), __FILE__)) ?></p>\n"
  },
  {
    "path": "themes/default/servicedesk/catcontrol.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n?>\n<h2>Category Control</h2>\n<h3><?php echo Flux::message('SDH3CurrentCat') ?></h3>\n<?php if($catlist): ?>\n\t<table class=\"horizontal-table\" width=\"100%\"> \n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th>ID</th>\n\t\t\t<th>Category Name</th>\n\t\t\t<th>Display?</th>\n\t\t\t<th>Options</th>\n\t\t</tr>\n\t\t<?php foreach($catlist as $trow):?>\n\t\t\t<tr >\n\t\t\t\t<td><?php echo $trow->cat_id?></td>\n\t\t\t\t<td><?php echo $trow->name?></td>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if($trow->display=='1'): ?>\n\t\t\t\t\tYes\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t<i>Hidden</i>\n\t\t\t\t\t<?php endif ?></td>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if($trow->display=='1'): ?>\n\t\t\t\t\t\t<a href=\"<?php echo $this->url('servicedesk', 'catcontrol', array('option' => 'hide', 'catid' => $trow->cat_id))?>\" >Hide</a>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<a href=\"<?php echo $this->url('servicedesk', 'catcontrol', array('option' => 'show', 'catid' => $trow->cat_id))?>\" >Show</a>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php endforeach;?>\n\t\t</tbody>\n\t</table>\n<?php else: ?>\n\t<p>\n\t\t<?php echo Flux::message('SDNoCats') ?><br/><br/>\n\t</p>\n<?php endif ?>\n<br />\n<h3><?php echo Flux::message('SDH3CreateCat') ?></h3>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\">\n\t<table class=\"horizontal-table\" width=\"100%\">\n\t\t<tr>\n\t\t\t<th>Category Name</th>\n\t\t\t<th>Display?</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td><input type=\"text\" name=\"name\" /></td>\n\t\t\t<td><select name=\"display\"><option value=\"1\">Yes</option><option value=\"0\">No</option></select></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\">\n\t\t\t<input type=\"submit\" value=\"Add Category\" /></td>\n\t\t</tr>\n    </table>\n</form>\n"
  },
  {
    "path": "themes/default/servicedesk/create.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n?>\n<h2><?php echo htmlspecialchars(Flux::message('SDCreateNew')) ?></h2>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\">\n\t<h3>Required Information</h3>\n\t<table class=\"vertical-table\" width=\"100%\">\n\t\t<tr>\n\t\t\t<th>Account ID</th>\n\t\t\t<td><input type=\"text\" name=\"account_id\" id=\"account_id\" value=\"<?php echo $session->account->account_id ?>\" readonly=\"readonly\" /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Character</th>\n\t\t\t<td><select name=\"char_id\"><?php echo $charselect ?></select></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Subject</th>\n\t\t\t<td><input type=\"text\" name=\"subject\" id=\"subject\" size=\"50\" /><br />Type a very brief description about the ticket.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Category</th>\n\t\t\t<td><select name=\"category\" id=\"category\" onchange=\"showInfo()\">\n\t\t\t\t<?php if(!$catlist): ?>\n\t\t\t\t\t<option value=\"-1\"><?php echo Flux::message('SDNoCatsAvailable') ?></option>\n\t\t\t\t<?php else: ?>\n\t\t\t\t<?php foreach($catlist as $cat):?>\n\t\t\t\t\t<option value=\"<?php echo $cat->cat_id ?>\"><?php echo $cat->name ?></option>\n\t\t\t\t<?php endforeach ?>\n\t\t\t\t<?php endif ?>\n\t\t\t\t</select></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Tell us what happened</th>\n\t\t\t<td>\n\t\t\t\t<textarea name=\"text\"></textarea>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t\n\t<h3>Optional Additional Information</h3>\n\t<table class=\"vertical-table\" width=\"100%\">\n\t\t<tbody id=\"chatrow\">\n\t\t<tr>\n\t\t\t<th>Chatlog</th>\n\t\t\t<td><input type=\"text\" name=\"chatlink\" id=\"chatlink\" size=\"50\" /><br /><?php echo Flux::message('SDPointerChatLog') ?></td>\n\t\t</tr>\n\t\t</tbody>\n\t\t\n\t\t<tbody id=\"ssrow\">\n\t\t<tr>\n\t\t\t<th>Screenshot Proof</th>\n\t\t\t<td><input type=\"text\" name=\"sslink\" id=\"sslink\" size=\"50\" /><br /><?php echo Flux::message('SDPointerScreenShot') ?></td>\n\t\t</tr>\n\t\t</tbody>\n\t\t\n\t\t<tbody id=\"videorow\">\n\t\t<tr>\n\t\t\t<th>Video Capture</th>\n\t\t\t<td><input type=\"text\" name=\"videolink\" id=\"chatlink\" size=\"50\" /><br /><?php echo Flux::message('SDPointerVideoLink') ?></td>\n\t\t</tr>\n\t\t</tbody>\n\n\t\t<tr>\n\t\t\t<td colspan=\"2\"><input type=\"hidden\" name=\"ip\" value=\"<?php echo $_SERVER['REMOTE_ADDR'] ?>\" /><input type=\"submit\" value=\"Create Ticket\" /></td>\n\t\t</tr>\n    </table>\n</form>\n"
  },
  {
    "path": "themes/default/servicedesk/index.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n?>\n<h2><?php echo htmlspecialchars(Flux::message('SDHeader')) ?></h2>\n<p><?php echo htmlspecialchars(Flux::message('SDWelcomeText')) ?>, <?php echo $session->account->userid ?>. </p>\n<p>\n\t\t<a href=\"<?php echo $this->url('servicedesk', 'create') ?>\"><?php echo Flux::message('SDLinkOpenNew') ?></a>\n</p>\n<h3><?php echo Flux::message('SDH3ActiveTickets') ?></h3>\n<?php if($rowoutput): ?>\n\t<table class=\"horizontal-table\" width=\"100%\"> \n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderID')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderSubject')) ?></th>    \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderCategory')) ?></th>    \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderStatus')) ?></th> \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderLastAuthor')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderTeam')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderTimestamp')) ?></th>   \n\t\t</tr>\n\t\t<?php echo $rowoutput ?>\n\t\t</tbody>\n\t</table>\n<?php else: ?>\n\t<p>\n\t\t<?php echo Flux::message('SDNoOpenTickets') ?><br /><br />\n\t</p>\n<?php endif ?><br /><Br />\n<h3><?php echo Flux::message('SDH3InActiveTickets') ?></h3>\n<?php if($oldrowoutput): ?>\n\t<table class=\"horizontal-table\" width=\"100%\"> \n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderID')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderSubject')) ?></th>    \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderCategory')) ?></th>    \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderStatus')) ?></th> \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderLastAuthor')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderTeam')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderTimestamp')) ?></th>   \n\t\t</tr>\n\t\t<?php echo $oldrowoutput ?>\n\t\t</tbody>\n\t</table>\n<?php else: ?>\n\t<p>\n\t\t<?php echo Flux::message('SDNoInactiveTickets') ?><br /><br />\n\t</p>\n<?php endif ?><br /><Br />\n"
  },
  {
    "path": "themes/default/servicedesk/staffindex.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n?>\n<h2><?php echo htmlspecialchars(Flux::message('SDHeader')) ?> - Staff Area</h2>\n<h3><?php echo Flux::message('SDH3ActiveTickets') ?></h3>\n<?php if($rowoutput): ?>\n\t<table class=\"horizontal-table\" width=\"100%\"> \n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderID')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderAccount')) ?></th>   \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderSubject')) ?></th>    \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderCategory')) ?></th>    \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderStatus')) ?></th> \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderLastAuthor')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderTeam')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderTimestamp')) ?></th>   \n\t\t</tr>\n\t\t<?php echo $rowoutput ?>\n\t\t</tbody>\n\t</table>\n<?php else: ?>\n\t<p>\n\t\t<?php echo Flux::message('SDNoOpenTickets') ?><br /><br />\n\t</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/servicedesk/staffsettings.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n?>\n<h2>Staff Settings</h2>\n<h3><?php echo Flux::message('SDH3StaffList') ?></h3>\n<?php if($stafflist): ?>\n\t<table class=\"horizontal-table\" width=\"100%\"> \n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th>Account Name</th>\n\t\t\t<th>Preferred Name</th>\n\t\t\t<th>Team</th>\n\t\t\t<th>Enable Emails</th>\n\t\t\t<?php if(isset($staffsess) && $staffsess->team>'1'): ?>\n\t\t\t<th>Options</th>\n\t\t\t<?php endif ?>\n\t\t</tr>\n\t\t<?php foreach($stafflist as $trow):?>\n\t\t\t<tr >\n\t\t\t\t<td><?php echo $trow->account_name?></td>\n\t\t\t\t<td><?php echo $trow->prefered_name?></td>\n\t\t\t\t<td><?php echo Flux::message('SDGroup'. $trow->team) ?></td>\n\t\t\t\t<td>\n\t\t\t\t\t<?php if($trow->emailalerts=='1'): ?>\n\t\t\t\t\tYes\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\tNo\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t\n\t\t\t\t\t<?php if($trow->account_id==$session->account->account_id): ?>\n\t\t\t\t\t\t<a href=\"<?php echo $this->url('servicedesk', 'staffsettings', array('option' => 'alerttoggle', 'staffid' => $trow->account_id, 'cur' => $trow->emailalerts))?>\" ><i>(toggle)</i></a>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t</td>\n\t\t\t\t<?php if(isset($staffsess) && $staffsess->team>'1'): ?>\n\t\t\t\t<td><a href=\"<?php echo $this->url('servicedesk', 'staffsettings', array('option' => 'delete', 'staffid' => $trow->account_id))?>\" >Delete</a></td>\n\t\t\t\t<?php endif ?>\n\t\t\t</tr>\n\t\t<?php endforeach;?>\n\t\t</tbody>\n\t</table>\n<?php else: ?>\n\t<p>\n\t\tThere are no current staff settings<br/><br/>\n\t</p>\n<?php endif ?>\n<br />\n<h3><?php echo Flux::message('SDH3StaffCreate') ?></h3>\n<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\">\n\t<table class=\"horizontal-table\" width=\"100%\">\n\t\t<tr>\n\t\t\t<th>Account Name</th>\n\t\t\t<th>Preferred Name</th>\n\t\t\t<th>Team</th>\n\t\t\t<th>Enable Emails</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td><input type=\"text\" name=\"account_name\" value=\"<?php echo $session->account->userid ?>\" readonly=\"readonly\" /></td>\n\t\t\t<td><input type=\"text\" name=\"prefered_name\" /></td>\n\t\t\t<td><select name=\"team\"><option value=\"1\"><?php echo Flux::message('SDGroup1') ?></option><option value=\"2\"><?php echo Flux::message('SDGroup2') ?></option><option value=\"3\"><?php echo Flux::message('SDGroup3') ?></option></select></td>\n\t\t\t<td><input type=\"checkbox\" name=\"emailalerts\" value=\"1\" /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"4\">\n\t\t\t<input type=\"hidden\" name=\"account_id\" value=\"<?php echo $session->account->account_id ?>\" />\n\t\t\t<input type=\"submit\" value=\"Add Staff\" /></td>\n\t\t</tr>\n    </table>\n</form>\n"
  },
  {
    "path": "themes/default/servicedesk/staffview.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n?>\n<?php if($ticketlist): ?>\n<h2><?php echo Flux::message('SDHeaderID') ?><?php echo htmlspecialchars($trow->ticket_id) ?> - <?php echo htmlspecialchars($trow->subject) ?> - Staff Area</h2>\n\t<table class=\"vertical-table\" width=\"100%\">\n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th>Account</th>\n\t\t\t\t<td><?php echo $this->linkToAccount($trow->account_id,''. $ticketaccount->userid .' ('.$trow->account_id.')') ?></td>\n\t\t\t<th>Characters Affected</th>\n\t\t\t\t<?php if($trow->char_id=='0'):?>\n\t\t\t\t<td><i>All Characters</i></td>\n\t\t\t\t<?php elseif($trow->char_id=='-1'):?>\n\t\t\t\t<td><i>None on account</i></td>\n\t\t\t\t<?php else:?>\n\t\t\t\t<td><?php echo $this->linkToCharacter($trow->char_id,$char->name) ?></td>\n\t\t\t\t<?php endif ?>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Category</th>\n\t\t\t<td><?php echo $catname ?></td>\n\t\t\t<th>Current Status</th>\n\t\t\t<td><?php echo htmlspecialchars($trow->status) ?></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Date/Time Submitted</th>\n\t\t\t\t<td><?php echo htmlspecialchars($trow->timestamp) ?></td>\n\t\t\t<th>Team</th>\n\t\t\t\t<td><?php if($trow->team=='1'): ?><?php echo Flux::message('SDGroup1') ?>\n\t\t\t\t<?php elseif($trow->team=='2'): ?><?php echo Flux::message('SDGroup2') ?>\n\t\t\t\t<?php elseif($trow->team=='3'): ?><?php echo Flux::message('SDGroup3') ?>\n\t\t\t\t<?php endif ?></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Subject</th>\n\t\t\t\t<td colspan=\"3\"><?php echo nl2br($trow->subject) ?></td>\n\t\t</tr>\n\t\t<?php if($trow->chatlink!='0'): ?>\n\t\t<tr>\n\t\t\t<th>Chat Logs</th>\n\t\t\t<td colspan=\"3\"><a href=\"<?php echo htmlspecialchars($trow->chatlink) ?>\" target=\"_blank\"><?php echo htmlspecialchars($trow->chatlink) ?></a></td></tr>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<?php if($trow->sslink!='0'): ?>\n\t\t<tr>\n\t\t\t<th>Screenshots</th>\n\t\t\t<td colspan=\"3\"><a href=\"<?php echo $trow->sslink ?>\" target=\"_blank\"><img src=\"<?php echo $trow->sslink ?>\" width=\"100px\" height=\"100\"></a></td></tr>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<?php if($trow->videolink!='0'): ?>\n\t\t<tr>\n\t\t\t<th>Video Capture</th>\n\t\t\t<td colspan=\"3\"><?php echo htmlspecialchars($trow->videolink) ?></td></tr>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<tr>\n\t\t\t<th>Report<br />&nbsp;<br />&nbsp;<br />&nbsp;</th>\n\t\t\t<td colspan=\"3\"><?php echo htmlspecialchars($trow->text) ?></td></tr>\n\t\t</tr>\n\t\t</tbody>\n\t</table>\n\t<br />\n\n\t<?php if($replylist): ?>\n\t<?php foreach($replylist as $rrow): ?>\n\t<table class=\"vertical-table\" width=\"100%\">\n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th width=\"100\">Reply By</th>\n\t\t\t<td><?php if($rrow->isstaff==1): ?>\n\t\t\t\t\t<font color=\"<?php echo Flux::config('StaffReplyColour') ?>\"><?php echo $rrow->author ?></font>\n\t\t\t\t<?php elseif($rrow->isstaff==0): ?>\n\t\t\t\t\t<?php echo $rrow->author ?>\n\t\t\t\t<?php endif ?></td>\n\t\t</tr>\n\t\t<?php if($rrow->text!='0'): ?>\n\t\t<tr>\n\t\t\t<th>Response</th>\n\t\t\t<td><?php echo nl2br(stripslashes($rrow->text)) ?></td>\n\t\t</tr>\n\n\t\t<?php endif ?>\n\t\t<?php if($rrow->action!='0'): ?>\n\t\t<tr>\n\t\t\t<th>Action</th>\n\t\t\t<td><?php echo $rrow->action ?></td>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<tr>\n\t\t\t<th>Timestamp</th>\n\t\t\t<td><?php echo $rrow->timestamp ?></td>\n\t\t</tr>\n\t\t</tbody>\n\t</table><br />\n\t<?php endforeach ?>\n\t<?php else: ?>\n\t\t<table class=\"vertical-table\" width=\"100%\">\n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th>There are no replies to this ticket.</th>\n\t\t</tr>\n\t\t</tbody>\n\t</table>\n\t<?php endif ?>\n\t<br />\n\n\t<?php if($trow->status!='Resolved' || $trow->status!='Closed'): ?>\n\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\">\n\t<table class=\"vertical-table\" width=\"100%\">\n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th width=\"100\">Response</th>\n\t\t\t<td><textarea cols=\"30\" rows=\"10\" name=\"response\" placeholder=\"Click here to enter a response.\"></textarea></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Actions</th>\n\t\t\t<td><table class=\"generic-form-table\">\n\t\t\t\t<?php if($trow->status!=\"Resolved\" && $trow->status!=\"Closed\"): ?>\n\t\t\t\t\t<tr><td><?php echo Flux::message('SDRespTable1') ?>:</td><td><input type=\"radio\" name=\"secact\" value=\"1\" checked=\"checked\" /></td></tr>\n\t\t\t\t\t<tr><td><?php echo Flux::message('SDRespTable2') ?>:</td><td><input type=\"radio\" name=\"secact\" value=\"2\" /></td></tr>\n\t\t\t\t\t<tr><td><?php echo Flux::message('SDRespTable3') ?>:</td><td><input type=\"radio\" name=\"secact\" value=\"3\" /></td></tr>\n\t\t\t\t\t<?php if(Flux::config('SDEnableCreditRewards')):?>\n\t\t\t\t\t<tr><td><?php echo Flux::message('SDRespTable7') ?>: <input type=\"number\" value=\"<?php echo Flux::config('SDCreditReward') ?>\" name=\"award_credits\" style=\"width:50px;\"/></td><td><input type=\"radio\" name=\"secact\" value=\"7\" /></td></tr>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php if($trow->team<3): ?>\n\t\t\t\t\t\t<tr><td><?php echo Flux::message('SDRespTable4') ?>:</td><td><input type=\"radio\" name=\"secact\" value=\"4\" /></td></tr>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"curteam\" value=\"<?php echo $trow->team ?>\" />\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if($staffsess->team>=2 && $trow->status==\"Resolved\"): ?>\n\t\t\t\t\t<tr><td><?php echo Flux::message('SDRespTable5') ?>:</td><td><input type=\"radio\" name=\"secact\" value=\"5\" /></td></tr>\n\t\t\t\t<?php endif ?>\n\t\t\t\t<?php if($trow->status==\"Resolved\" || $trow->status==\"Closed\"): ?>\n\t\t\t\t\t<tr><td><?php echo Flux::message('SDRespTable6') ?>:</td><td><input type=\"radio\" name=\"secact\" value=\"6\" checked=\"checked\" /></td></tr>\n\t\t\t\t<?php endif ?>\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\">\n\t\t\t<?php if(Flux::config('SDEnableCreditRewards')):?>\n\t\t\t<input type=\"hidden\" name=\"account_id\" value=\"<?php echo $trow->account_id ?>\" />\n\t\t\t<?php endif ?>\n\t\t\t<input type=\"hidden\" name=\"staff_reply_name\" value=\"<?php echo $staffsess->prefered_name ?>\" />\n\t\t\t<input type=\"hidden\" name=\"curemail\" value=\"<?php echo $trow->curemail ?>\" />\n\t\t\t<input type=\"hidden\" name=\"postreply\" value=\"gogolol\" />\n\t\t\t<input type=\"submit\" name=\"submit\" value=\"Add Reply\" /></td>\n\t\t</tr>\n\t\t</tbody>\n\t</table>\n\t</form>\n\t<?php endif ?>\n\n<?php else: ?>\n\t<p>\n\t\t<?php echo htmlspecialchars(Flux::message('SDHuh')) ?>\n\t</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/servicedesk/staffviewclosed.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n?>\n<h2><?php echo htmlspecialchars(Flux::message('SDHeader')) ?> - Staff Area</h2>\n<h3><?php echo Flux::message('SDH3ClosedTickets') ?></h3>\n<?php if($rowoutput): ?>\n\t<table class=\"horizontal-table\" width=\"100%\"> \n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderID')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderAccount')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderSubject')) ?></th>    \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderCategory')) ?></th>    \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderStatus')) ?></th> \n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderLastAuthor')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderTeam')) ?></th>\n\t\t\t<th><?php  echo htmlspecialchars(Flux::message('SDHeaderTimestamp')) ?></th>   \n\t\t</tr>\n\t\t<?php echo $rowoutput ?>\n\t\t</tbody>\n\t</table>\n<?php else: ?>\n\t<p>\n\t\t<?php  echo htmlspecialchars(Flux::message('SDNoClosedTickets')) ?><br /><br />\n\t</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/servicedesk/view.php",
    "content": "<?php\nif (!defined('FLUX_ROOT')) exit;\n$this->loginRequired(); \n?>\n<?php if($ticketlist): ?>\n<h2><?php echo Flux::message('SDHeaderID') ?><?php echo htmlspecialchars($trow->ticket_id) ?> - <?php echo htmlspecialchars($trow->subject) ?></h2>\n\t<table class=\"vertical-table\" width=\"100%\"> \n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th>Account</th>\n\t\t\t\t<td><?php echo $this->linkToAccount($trow->account_id,$session->account->userid . ' ('.$session->account->account_id.')') ?></td>\n\t\t\t<th>Characters Affected</th>\n\t\t\t\t<?php if($trow->char_id=='0'):?>\n\t\t\t\t<td><i>All Characters</i></td>\n\t\t\t\t<?php elseif($trow->char_id=='-1'):?>\n\t\t\t\t<td><i>None on account</i></td>\n\t\t\t\t<?php else:?>\n\t\t\t\t<td><?php echo $this->linkToCharacter($trow->char_id,$char->name) ?></td>\n\t\t\t\t<?php endif ?>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Category</th>\n\t\t\t<td><?php echo $catname ?></td>\n\t\t\t<th>Current Status</th>\n\t\t\t<td><?php echo htmlspecialchars($trow->status) ?></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Date/Time Submitted</th>\n\t\t\t\t<td><?php echo htmlspecialchars($trow->timestamp) ?></td>\n\t\t\t<th>Team</th>\n\t\t\t\t<td><?php if($trow->team=='1'): ?><?php echo Flux::message('SDGroup1') ?>\n\t\t\t\t<?php elseif($trow->team=='2'): ?><?php echo Flux::message('SDGroup2') ?>\n\t\t\t\t<?php elseif($trow->team=='3'): ?><?php echo Flux::message('SDGroup3') ?>\n\t\t\t\t<?php endif ?></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Subject</th>\n\t\t\t\t<td colspan=\"3\"><?php echo nl2br($trow->subject) ?></td>\n\t\t</tr>\n\t\t<?php if($trow->chatlink!='0'): ?>\n\t\t<tr>\n\t\t\t<th>Chat Logs</th>\n\t\t\t<td colspan=\"3\"><a href=\"<?php echo htmlspecialchars($trow->chatlink) ?>\" target=\"_blank\"><?php echo htmlspecialchars($trow->chatlink) ?></a></td></tr>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<?php if($trow->sslink!='0'): ?>\n\t\t<tr>\n\t\t\t<th>Screenshots</th>\n\t\t\t<td colspan=\"3\"><a href=\"<?php echo htmlspecialchars($trow->sslink) ?>\" target=\"_blank\"><img src=\"<?php echo htmlspecialchars($trow->sslink) ?>\" width=\"100px\" height=\"100\"></a></td></tr>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<?php if($trow->videolink!='0'): ?>\n\t\t<tr>\n\t\t\t<th>Video Capture</th>\n\t\t\t<td colspan=\"3\"><?php echo htmlspecialchars($trow->videolink) ?></td></tr>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<tr>\n\t\t\t<th>Body<br />&nbsp;<br />&nbsp;<br />&nbsp;</th>\n\t\t\t<td colspan=\"3\"><?php echo nl2br($trow->text) ?></td></tr>\n\t\t</tr>\n\t\t</tbody>\n\t</table>\n\t<br />\n\n\t<?php if($replylist): ?>\n\t<?php foreach($replylist as $rrow): ?>\n\t<table class=\"vertical-table\" width=\"100%\"> \n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th width=\"100\">Reply By</th>\n\t\t\t<td>\n\t\t\t\t<?php if($rrow->isstaff==1): ?>\n\t\t\t\t\t<font color=\"<?php echo Flux::config('StaffReplyColour') ?>\"><?php echo $rrow->author ?></font>\n\t\t\t\t<?php elseif($rrow->isstaff==0): ?>\n\t\t\t\t\t<?php echo $rrow->author ?>\n\t\t\t\t<?php endif ?>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php if($rrow->text!='0'): ?>\n\t\t<tr>\n\t\t\t<th>Response</th>\n\t\t\t<td><?php echo nl2br(stripslashes($rrow->text)) ?></td>\n\t\t</tr>\n\t\t\n\t\t<?php endif ?>\n\t\t<?php if($rrow->action!='0'): ?>\n\t\t<tr>\n\t\t\t<th>Action</th>\n\t\t\t<td><?php echo $rrow->action ?></td>\n\t\t</tr>\n\t\t<?php endif ?>\n\t\t<tr>\n\t\t\t<th>Timestamp</th>\n\t\t\t<td><?php echo $rrow->timestamp ?></td>\n\t\t</tr>\n\t\t</tbody>\n\t</table><br />\n\t<?php endforeach ?>\n\t<?php else: ?>\n\t\t<table class=\"vertical-table\" width=\"100%\"> \n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th>There are no replies to this ticket.</th>\n\t\t</tr>\n\t\t</tbody>\n\t</table>\n\t<?php endif ?>\n\t<br />\n\t<?php if($trow->status!='Resolved' || $trow->status!='Closed'): ?>\n\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\">\n\t<table class=\"vertical-table\" width=\"100%\"> \n\t\t<tbody>\n\t\t<tr>\n\t\t\t<th width=\"100\">Response</th>\n\t\t\t<td><textarea cols=\"30\" rows=\"10\" name=\"response\" placeholder=\"Click here to enter a response.\"></textarea></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Actions</th>\n\t\t\t<td><table class=\"generic-form-table\">\n\t\t\t<?php if($trow->status==\"Resolved\" || $trow->status==\"Closed\"): ?>\n\t\t\t\t<tr><td><?php echo Flux::message('SDRespTable6') ?>:</td><td><input type=\"radio\" name=\"secact\" value=\"6\" checked=\"checked\" /></td></tr>\n\t\t\t<?php else: ?>\n\t\t\t<tr><td><?php echo Flux::message('SDRespTable2') ?>:</td><td><input type=\"radio\" name=\"secact\" value=\"2\" checked=\"checked\" /></td></tr>\n\t\t\t<tr><td><?php echo Flux::message('SDRespTable3') ?>:</td><td><input type=\"radio\" name=\"secact\" value=\"3\" /></td></tr>\n\t\t\t<?php endif ?>\n\t\t\t</table></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"2\">\n\t\t\t<input type=\"hidden\" name=\"postreply\" value=\"gogolol\" />\n\t\t\t<input type=\"submit\" name=\"submit\" value=\"Add Reply\" /></td>\n\t\t</tr>\n\t\t</tbody>\n\t</table>\n\t</form>\n\t<?php endif ?>\n\t\n\t\n<?php else: ?>\n\t<p>\n\t\t<?php echo htmlspecialchars(Flux::message('SDHuh')) ?>\n\t</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/unauthorized/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2 class=\"red\"><?php echo htmlspecialchars(Flux::message('UnauthorizedHeading')) ?></h2>\n<p><?php printf(Flux::message('UnauthorizedInfo'), $metaRefresh['location']) ?></p>\n"
  },
  {
    "path": "themes/default/vending/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>Vendors</h2>\n\n<?php if ($vendings): ?>\n    <?php echo $paginator->infoText() ?>\n    <table class=\"horizontal-table\">\n        <thead>\n            <tr>\n                <th><?php echo $paginator->sortableColumn('id', 'Vendor ID') ?></th>\n                <th> <?php echo $paginator->sortableColumn('char_name', 'Vendor Name') ?></th>\n                <th>Title</th>\n                <th><?php echo $paginator->sortableColumn('map', 'Map') ?></th>\n                <th>X</th>\n                <th>Y</th>\n                <th>Gender</th>\n            </tr>\n        </thead>\n        <tbody>\n            <?php foreach ($vendings as $vending): ?>\n                <tr>\n                    <td width=\"50\" align=\"right\"  style=\"\">\n                        <?php if ($auth->actionAllowed('vending', 'viewshop')): ?>\n                            <a href=\"<?php echo $this->url('vending', 'viewshop', array(\"id\" => $vending->id)); ?>\"><?php echo $vending->id; ?></a>\n                        <?php else: ?>\n                            <?php echo $vending->id ?>\n                        <?php endif ?>\n                    </td>\n                    <td style=\"font-weight:bold;\"> <?php echo $vending->char_name; ?></td>\n                    \n                    <td>\n                       <img src=\"<?php echo $this->iconImage(671) ?>?nocache=<?php echo rand() ?>\" />\n                      <?php if ($auth->actionAllowed('vending', 'viewshop')): ?>\n                            <a href=\"<?php echo $this->url('vending', 'viewshop', array(\"id\" => $vending->id)); ?>\"><?php echo htmlspecialchars($vending->title); ?></a>\n                        <?php else: ?>\n                            <?php echo htmlspecialchars($vending->title) ?>\n                        <?php endif ?>\n                    </td>\n                      \n                    <td  style=\"color:blue;\">\n                      <?php echo $vending->map ?>\n                    </td>\n                    \n                    <td>\n                      <?php echo $vending->x ?>\n                    </td>\n                    \n                    <td>\n                      <?php echo $vending->y ?>\n                    </td>\n                    \n                     <td>\n                      <?php echo $vending->sex ?>\n                    </td>\n                   \n                </tr>\n\n            <?php endforeach ?>\n        </tbody>\n    </table>\n    <?php echo $paginator->getHTML() ?>\n<?php else: ?>\n    <p>No Vendors found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/vending/viewshop.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars($title); ?></h2>\n<?php if ($vending): ?>\n    <h3 style=\"text-align:right; margin:0; padding:0;font-style: italic\"><img style=\"position:relative;top:7px;\" src=\"<?php echo $this->iconImage(671) ?>?nocache=<?php echo rand() ?>\" /> <?php echo htmlspecialchars($vending->title) ?> </h3>\n    <h4 style=\"text-align:right; color:blue; margin:0; margin-bottom:15px; \"> <?php echo $vending->map; ?>, <?php echo $vending->x; ?>, <?php echo $vending->y; ?> </h4>\n\n    <?php if ($vending_items): ?>\n        <table class=\"horizontal-table\">\n            <thead>\n                <tr>\n                    <th>ID</th>\n                    <th>Name</th>\n                    <th>Refine</th>\n                    <th>Slots</th>\n                    <th>Slot 1</th>\n                    <th>Slot 2</th>\n                    <th>Slot 3</th>\n                    <th>Slot 4</th>\n                    <?php if($server->isRenewal): ?>\n\t\t\t\t\t\t<th><?php echo htmlspecialchars(Flux::message('ItemRandOptionsLabel')) ?></th>\n                    <?php endif ?>\n                    <th>Price</th>\n                    <th>Amount</th>\n                </tr>\n            </thead>\n            <tbody>\n                <?php foreach ($vending_items as $item): ?>\n                    <tr>\n                        <td width=\"50\" align=\"right\"  style=\"\">\n\n                            <?php if ($auth->actionAllowed('item', 'view')): ?>\n                                <a href=\"<?php echo $this->url('item', 'view', array(\"id\" => $item->nameid)); ?>\"><?php echo $item->nameid; ?></a>\n                            <?php else: ?>\n                                <?php echo $item->nameid ?>\n                            <?php endif ?>\n\n\n                        </td>\n                        <td>\n\n                            <img src=\"<?php echo $this->iconImage($item->nameid) ?>?nocache=<?php echo rand() ?>\" />\n                            <?php if ($auth->actionAllowed('item', 'view')): ?>\n                                <a href=\"<?php echo $this->url('item', 'view', array(\"id\" => $item->nameid)); ?>\"><?php echo $item->item_name; ?></a>\n                            <?php else: ?>\n                                <?php echo $item->item_name ?>\n                            <?php endif ?>\n                            <?php if ($item->char_name): ?>\n                                Of <?php echo $item->char_name ?>\n                            <?php endif; ?>\n\n\n                        </td>\n\n                        <td>\n                            <?php if ($item->refine > 0): ?>\n                                <img src=\"<?php echo $this->iconImage(613) ?>?nocache=<?php echo rand() ?>\" />\n                                <strong><?php echo $item->refine ?></strong>\n                            <?php endif; ?>\n\n                            <?php if ($item->card0 == 255 && intval($item->card1 / 1280) > 0): ?>\n                                <?php $itemcard1 = intval($item->card1/1280); ?>\n                                <?php for ($i = 0; $i < $itemcard1; $i++): ?>\n                                    Very\n                                <?php endfor ?>\n                                Strong\n                            <?php endif ?>\n\n                            <?php if ($item->card0 == 254 || $item->card0 == 255): ?>\n                                <?php if ($item->char_name): ?>\n                                    <?php if ($auth->actionAllowed('character', 'view') && ($isMine || (!$isMine && $auth->allowedToViewCharacter))): ?>\n                                        <?php echo $this->linkToCharacter($item->char_id, $item->char_name, $session->serverName) . \"'s\" ?>\n                                    <?php else: ?>\n                                        <?php echo htmlspecialchars($item->char_name . \"'s\") ?>\n                                    <?php endif ?>\n                                <?php else: ?>\n                                    <span class=\"not-applicable\"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>'s\n                                <?php endif ?>\n                            <?php endif ?>\n\n                            <?php if ($item->card0 == 255 && array_key_exists($item->card1 % 1280, $itemAttributes)): ?>\n                                <?php echo htmlspecialchars($itemAttributes[$item->card1 % 1280]) ?>\n                            <?php endif ?>\n                        </td>\n\n                        <td>\n                        <?php if ($item->slots): ?>\n                            <?php echo htmlspecialchars(' [' . $item->slots . ']') ?>\n                        <?php endif ?>\n                        </td>\n\n                        <td>\n                            <?php if ($item->card0 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n                                <?php if (!empty($cards[$item->card0])): ?>\n                                    <?php echo $this->linkToItem($item->card0, $cards[$item->card0]) ?>\n                                <?php else: ?>\n                                    <?php echo $this->linkToItem($item->card0, $item->card0) ?>\n                                <?php endif ?>\n                            <?php else: ?>\n                                <span class=\"not-applicable\">None</span>\n                            <?php endif ?>\n                        </td>\n                        <td>\n                            <?php if ($item->card1 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 255 && $item->card0 != -256): ?>\n                                <?php if (!empty($cards[$item->card1])): ?>\n                                    <?php echo $this->linkToItem($item->card1, $cards[$item->card1]) ?>\n                                <?php else: ?>\n                                    <?php echo $this->linkToItem($item->card1, $item->card1) ?>\n                                <?php endif ?>\n                            <?php else: ?>\n                                <span class=\"not-applicable\">None</span>\n                            <?php endif ?>\n                        </td>\n                        <td>\n                            <?php if ($item->card2 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n                                <?php if (!empty($cards[$item->card2])): ?>\n                                    <?php echo $this->linkToItem($item->card2, $cards[$item->card2]) ?>\n                                <?php else: ?>\n                                    <?php echo $this->linkToItem($item->card2, $item->card2) ?>\n                                <?php endif ?>\n                            <?php else: ?>\n                                <span class=\"not-applicable\">None</span>\n                            <?php endif ?>\n                        </td>\n                        <td>\n                            <?php if ($item->card3 && ($item->type == $type_list['armor'] || $item->type == $type_list['weapon']) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?>\n                                <?php if (!empty($cards[$item->card3])): ?>\n                                    <?php echo $this->linkToItem($item->card3, $cards[$item->card3]) ?>\n                                <?php else: ?>\n                                    <?php echo $this->linkToItem($item->card3, $item->card3) ?>\n                                <?php endif ?>\n                            <?php else: ?>\n                                <span class=\"not-applicable\">None</span>\n                            <?php endif ?>\n                        </td>\n\t\t\t\t\t\t<?php if($server->isRenewal): ?>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<?php if($item->rndopt): ?>\n\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t<?php foreach($item->rndopt as $rndopt) echo \"<li>\".$this->itemRandOption($rndopt[0], $rndopt[1]).\"</li>\"; ?>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t\t\t<span class=\"not-applicable\">None</span>\n\t\t\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<?php endif ?>\n                        <td style=\"color:goldenrod; text-shadow:1px 1px 0px brown;\">\n                            <?php echo number_format($item->price, 0, ',', ' '); ?> z\n                        </td>\n\n                        <td>\n                            <?php echo $item->amount ?>\n                        </td>\n\n                    </tr>\n\n                <?php endforeach ?>\n            </tbody>\n        </table>\n    <?php else: ?>\n        <p>No Items found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n    <?php endif ?>\n<?php else: ?>\n    <p>No Vendor found. <a href=\"javascript:history.go(-1)\">Go back</a>.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/webcommands/index.php",
    "content": "<?php\n if (!defined('FLUX_ROOT')) exit;\n$this->loginRequired();\n\n\n?>\n<h2><?php echo $pageTitle ?></h2>\n\n<table width=\"950\">\n<?php if(!isset($_POST['updatefile'])): ?>\n\t<tr><td>Please enter the commands to run below.</td></tr>\n\t<tr><td>\n\t\t\t<form method=\"post\" action=\"<?php echo $this->url('webcommands', 'index') ?>\">\n\t\t\t\t\t<center>\n\t\t\t\t\t\t<input type=\"text\" name=\"command\" value=\"\" />\n\t\t\t\t\t\t<input type=\"submit\" name=\"submit\" onclick=\"this.value='Sending Command..';\" class=\"button\" value=\"Send Command\">\n\t\t\t\t\t</center>\n\t\t\t\t</form>\n\t\t\t</td>\n\t\t</tr>\n<?php endif ?>\n\n<?php if(isset($_POST['command'])): ?>\n\n\n\t<tr><td colspan=\"2\">Command sent.<meta http-equiv=\"refresh\" content=\"1;URL='<?php echo $this->url('webcommands', 'index') ?>'\"></td></tr>\n\n\n<?php endif ?>\n\n</table>\n\n\n\n<table>\n<?php echo $output ?>\n</table>\n"
  },
  {
    "path": "themes/default/woe/custom.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2>War of Emperium Hours</h2>\n<?php if ($woeTimes): ?>\n<p>Below are the WoE hours for <?php echo htmlspecialchars($session->loginAthenaGroup->serverName) ?>.</p>\n<p>These hours are subject to change at anytime, but let's hope not.</p>\n<table class=\"woe-table\">\n\t<tr>\n\t\t<th>Servers</th>\n\t\t<th colspan=\"3\">War of Emperium Times</th>\n\t</tr>\n\t<?php foreach ($woeTimes as $serverName => $times): ?>\n\t<tr>\n\t\t<td class=\"server\" rowspan=\"<?php echo count($times) ?>\">\n\t\t\t<?php echo htmlspecialchars($serverName)  ?>\n\t\t</td>\n\t\t<?php foreach ($times as $time): ?>\n\t\t<td class=\"time\">\n\t\t\t<?php echo htmlspecialchars($time['startingDay']) ?>\n\t\t\t@ <?php echo htmlspecialchars($time['startingHour']) ?>\n\t\t</td>\n\t\t<td>~</td>\n\t\t<td class=\"time\">\n\t\t\t<?php echo htmlspecialchars($time['endingDay']) ?>\n\t\t\t@ <?php echo htmlspecialchars($time['endingHour']) ?>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<?php endforeach ?>\n\t</tr>\n\t<?php endforeach ?>\n</table>\n<?php else: ?>\n<p>There are no scheduled WoE hours.</p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/default/woe/index.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<h2><?php echo htmlspecialchars(Flux::message('WoeHeading')) ?></h2>\n<?php if ($woeTimes): ?>\n<p><?php echo htmlspecialchars(sprintf(Flux::message('WoeInfo'), $session->loginAthenaGroup->serverName)) ?></p>\n<p><?php echo htmlspecialchars(Flux::message('WoeServerTimeInfo')) ?> <strong class=\"important\"><?php echo $server->getServerTime('Y-m-d H:i:s (l)') ?></strong>.</p>\n<table class=\"woe-table\">\n\t<tr>\n\t\t<th><?php echo htmlspecialchars(Flux::message('WoeServerLabel')) ?></th>\n\t\t<th colspan=\"3\"><?php echo htmlspecialchars(Flux::message('WoeTimesLabel')) ?></th>\n\t</tr>\n\t<?php foreach ($woeTimes as $serverName => $times): ?>\n\t<tr>\n\t\t<td class=\"server\" rowspan=\"<?php echo count($times)+1 ?>\">\n\t\t\t<?php echo htmlspecialchars($serverName)  ?>\n\t\t</td>\n\t</tr>\n\t<?php foreach ($times as $time): ?>\n\t<tr>\n\t\t<td class=\"time\">\n\t\t\t<?php echo htmlspecialchars($time['startingDay']) ?>\n\t\t\t@ <?php echo htmlspecialchars($time['startingHour']) ?>\n\t\t</td>\n\t\t<td>~</td>\n\t\t<td class=\"time\">\n\t\t\t<?php echo htmlspecialchars($time['endingDay']) ?>\n\t\t\t@ <?php echo htmlspecialchars($time['endingHour']) ?>\n\t\t</td>\n\t</tr>\n\t<?php endforeach ?>\n\t<?php endforeach ?>\n</table>\n<?php else: ?>\n<p><?php echo htmlspecialchars(Flux::message('WoeNotScheduledInfo')) ?></p>\n<?php endif ?>\n"
  },
  {
    "path": "themes/installer/footer.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\t\n\t\t\t</div>\n\t\t</div>\n\t\t<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js\" integrity=\"sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe\" crossorigin=\"anonymous\"></script>\n\t</body>\n</html>\n"
  },
  {
    "path": "themes/installer/header.php",
    "content": "<?php if (!defined('FLUX_ROOT')) exit; ?>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n        <link rel=\"icon\" type=\"image/x-icon\" href=\"./favicon.ico\" />\n\t\t<title>FluxCP: Install &amp; Update</title>\n\t\t<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ\" crossorigin=\"anonymous\">\n\t\t<!--[if lt IE 9]>\n\t\t<script src=\"https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js\"></script>\n\t\t<script src=\"https://oss.maxcdn.com/respond/1.4.2/respond.min.js\"></script>\n\t\t<![endif]-->\n\t\t<style type=\"text/css\">\n\t\t\tbody { background-color: #ebeef2; }\n\t\t\t.contentcontainer {\n\t\t\t\tbackground-color: #FFFFFF;\n\t\t\t\tborder:1px black solid;\n\t\t\t\tborder-radius:5px;\n\t\t\t\tpadding:30px;\n\t\t\t}\n\t\t\t.header { padding-bottom: 10%; background-color: #3c6994; margin-bottom: -8%; }\n\t\t</style>\n\t</head>\n\n\t<body>\n\t\t<div class=\"header\"></div>\n\t\t<div class=\"container\">\n\t\t\t<div class=\"row pb-3\">\n\t\t\t\t<div class=\"col\">\n\t\t\t\t\t<img src=\"<?php echo $this->themePath('rathena-001.png') ?>\" alt=\"Logo\" style=\"max-height: 110px;\">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"contentcontainer\">\n\t\t\t\t\t\t\t<h1>Install &amp; Update</h1>\n\t\t\t\t\t<?php if ($message=$session->getMessage()): ?>\n\t\t\t\t\t\t<p class=\"message\"><?php echo htmlspecialchars($message) ?></p>\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t<?php if (!empty($errorMessage)): ?>\n\t\t\t\t\t\t<p class=\"error\"><?php echo htmlspecialchars($errorMessage) ?></p>\n\t\t\t\t\t<?php endif ?>\n"
  },
  {
    "path": "themes/installer/install/index.php",
    "content": "<?php if (!$session->installerAuth): ?>\n\t<?php $success = TRUE; ?>\n\t<h3>Requirement Checks</h3>\n\n\t<p>Before you can continue with the installation, you must meet the following requirements.</p>\n\n\n\t<h4>Base Requirements</h4>\n\t<table class=\"table\">\n\t\t<tr><td style=\"width:20%;\">PHP Version</td><td>\n\t\t\t<?php if ( version_compare( PHP_VERSION, $minimumVersionCheck['php']['required'] ) >= 0 ): ?>\n\t\t\t\t<span class=\"text-success\"><?php echo PHP_VERSION ?></span>\n\t\t\t<?php else: $success = FALSE; ?>\n\t\t\t\t<span class=\"text-danger\">You are not running a compatible version of PHP. You need PHP <?php echo $minimumVersionCheck['php']['required']; ?> or above (<?php echo $requirements['php']['recommended']; ?> or above recommended). You should contact your hosting provider or system administrator to ask for an upgrade.</span>\n\t\t\t<?php endif ?>\n\t\t</td><td><?php echo $minimumVersionCheck['php']['required'] ?> required</td><td><?php echo $minimumVersionCheck['php']['recommended'] ?> recommended</td></tr>\n\t\t<tr><td>MySQL Version</td><td>\n\t\t\t<?php if ( version_compare( $res->mysql_version, $minimumVersionCheck['mysql']['required'] ) >= 0 ): ?>\n\t\t\t\t<span class=\"text-success\"><?php echo $res->mysql_version ?></span>\n\t\t\t<?php else: $success = FALSE; ?>\n\t\t\t\t<span class=\"text-danger\">You are not running a compatible version of MySQL. You need MySQL <?php echo $minimumVersionCheck['mysql']['required']; ?> or above (<?php echo $requirements['mysql']['recommended']; ?> or above recommended). You should contact your hosting provider or system administrator to ask for an upgrade.</span>\n\t\t\t<?php endif ?>\n\t\t\t</td><td><?php echo $minimumVersionCheck['mysql']['required'] ?> required</td><td><?php echo $minimumVersionCheck['mysql']['recommended'] ?> recommended</td></tr>\n\t</table>\n\t<p class=\"pb-4\">The Base Requirements are the minimum requirements to run FluxCP. If you do not meet these requirements, FluxCP will not run.</p>\n\n\t<h4>PHP Extensions</h4>\n\t<table class=\"table\">\n\t\t<?php foreach($requiredExtensions as $requirement): ?>\n\t\t\t<tr><td style=\"width:20%;\"><?php echo $requirement ?></td><td>\n\t\t\t\t<?php if ( extension_loaded($requirement) ): ?>\n\t\t\t\t\t<span class=\"text-success\">Installed</span>\n\t\t\t\t<?php else: $success = FALSE; ?>\n\t\t\t\t\t<span class=\"text-danger\">Not Installed</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td></tr>\n\t\t<?php endforeach ?>\n\t</table>\n\t<p class=\"pb-4\">The PHP Extensions are required for FluxCP to operate correctly. Most of these extensions are required for normal use, some are optional based on configs. For the sake of \"proper\" installs, all are set as required.</p>\n\n\n\t<h4>File Permissions</h4>\n\n\t<table class=\"table\">\n\t\t<?php foreach($permissionsChecks as $pathCheck => $pathDesc): ?>\n\t\t\t<?php $pathCheck = realpath($pathCheck); ?>\n\t\t\t<tr><td style=\"width:20%;\"><?php echo $pathCheck ?></td><td>\n\t\t\t\t<?php if ( is_writable($pathCheck) ): ?>\n\t\t\t\t\t<span class=\"text-success\"><?php echo $pathDesc ?> is writable</span>\n\t\t\t\t<?php else: $success = FALSE; ?>\n\t\t\t\t\t<span class=\"text-danger\"><?php echo $pathDesc ?> is not writable. Remedy with `chmod 0600 <?php echo $pathDesc ?>`</span>\n\t\t\t\t<?php endif ?>\n\t\t\t</td></tr>\n\t\t<?php endforeach ?>\n\t</table>\n\t<p class=\"pb-4\">The File Permissions are required for FluxCP to operate correctly. If you do not meet these requirements, FluxCP will not run.</p>\n\n\n\t<?php if($success == TRUE): ?>\n\t\t<form action=\"<?php echo $this->url ?>\" method=\"post\" class=\"row g-3\">\n\t\t\t<p>\n\t\t\t\tPlease enter your <em>installer password</em> to continue with the update.\n\t\t\t</p>\n\t\t\t<div class=\"col-auto\">\n\t\t\t\t<label for=\"installer_password\">Password:</label>\n\t\t\t</div>\n\t\t\t<div class=\"col-auto\">\n\t\t\t\t<input class=\"form-control\" type=\"password\" id=\"installer_password\" name=\"installer_password\" />\n\t\t\t</div>\n\t\t\t<div class=\"col-auto\">\n\t\t\t\t<button type=\"submit\" class=\"btn btn-success\">Authenticate</button>\n\t\t\t</div>\n\t\t</form>\n\t<?php else: ?>\n\t\t<div class=\"alert alert-danger mb-5\">\n\t\t\t<strong>Error:</strong> It looks like you do not meet the requirements to run FluxCP. Please fix the issues above and try again.\n\t\t</div>\n\t<?php endif; ?>\n<?php else: ?>\n\t<?php if (isset($permissionError)): ?>\n\t\t<h2 class=\"error\">MySQL Permission Error Encountered</h2>\n\t\t<p>Uh oh, the installer encountered a permission error while trying to execute one of the schema definitions!</p>\n\t\t<p>This typically means that the query failed due to lack of user/database/table permissions in MySQL.</p>\n\t\t<table class=\"schema-info\">\n\t\t\t<!--\n\t\t\t<tr>\n\t\t\t\t<th>Schema Type</th>\n\t\t\t\t<td><?php echo $permissionError->isLoginDbSchema() ? 'Login Server Database' : 'Char/Map Server Database' ?></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>Schema File</th>\n\t\t\t\t<td><?php echo htmlspecialchars(realpath($permissionError->schemaFile)) ?></td>\n\t\t\t</tr>\n\t\t\t-->\n\t\t\t<tr>\n\t\t\t\t<th>Server</th>\n\t\t\t\t<td>\n\t\t\t\t\t<?php echo htmlspecialchars($permissionError->mainServerName) ?>\n\t\t\t\t\t<?php if ($permissionError->charMapServerName): ?>\n\t\t\t\t\t\t(<?php echo htmlspecialchars($permissionError->charMapServerName) ?>)\n\t\t\t\t\t<?php endif ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>Database</th>\n\t\t\t\t<td><?php echo htmlspecialchars($permissionError->databaseName) ?></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>Error</th>\n\t\t\t\t<td><?php echo htmlspecialchars($permissionError->getMessage()) ?></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>SQL Query</th>\n\t\t\t\t<td><code><?php echo nl2br(htmlspecialchars($permissionError->query)) ?></code></td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<h4 style=\"margin: 9px 0 0 0\">The recommended solution to a problem like this is to grant the user the the privileges to\n\t\t\trun the query on the database or table.</h4>\n\t\t<h4 style=\"margin: 4px 0 0 0\">Manually running the SQL query is not a supported method because schema versioning will break\n\t\t\tand the installer will not go away.</h4>\n\t<?php else: ?>\n\t<div>\n\t\t<p class=\"menu\">\n\t\t\t<a href=\"<?php echo $this->url($params->get('module'), null, array('logout' => 1)) ?>\" onclick=\"return confirm('Are you sure you want to log out?')\">Logout</a> |\n\t\t\t<a href=\"<?php echo $this->url($params->get('module'), null, array('update_all' => 1)) ?>\" onclick=\"return confirm('By performing this action, changes to your database will be made.\\n\\nAre you sure you want to continue installing Flux and its associated updates?')\"><strong>Install or Update Everything</strong></a>\n\t\t</p>\n\t\t<p>\"Install or Update Everything\" will use the pre-configured MySQL username and password for each server.</p>\n\t\t<p>Shown below is a list of currently installed / need-to-be-installed schemas.</p>\n\t\t<form action=\"<?php echo $this->urlWithQs ?>\" method=\"post\">\n\t\t\t<?php foreach ($installer->servers as $mainServerName => $mainServer): ?>\n\t\t\t<?php $servName = base64_encode($mainServerName) ?>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col\"><h3><?php echo htmlspecialchars($mainServerName) ?></h3></div>\n\t\t\t</div>\n\t\t\t<div class=\"row pb-2\">\n\t\t\t\t<div class=\"col\">Alternative MySQL username/password</div>\n\t\t\t</div>\n\t\t\t<div class=\"row pb-2\">\n\t\t\t\t<div class=\"col-6\">\n\t\t\t\t\t<label for=\"username_<?php echo $servName ?>\">MySQL username</label>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col\"><input class=\"form-control\" type=\"text\" name=\"username[<?php echo $servName ?>]\" id=\"username_<?php echo $servName ?>\" /></div>\n\t\t\t</div>\n\t\t\t<div class=\"row pb-3\">\n\t\t\t\t<div class=\"col-6\">\n\t\t\t\t\t<label for=\"password_<?php echo $servName ?>\">MySQL password</label>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col\"><input class=\"form-control\" type=\"password\" name=\"password[<?php echo $servName ?>]\" id=\"password_<?php echo $servName ?>\" /></div>\n\t\t\t</div>\n\t\t\t<div class=\"row pb-5\">\n\t\t\t\t<div class=\"col text-center\">\n\t\t\t\t\t<button type=\"submit\" name=\"update[<?php echo $servName ?>]\" class=\"btn btn-success\">\n\t\t\t\t\t\tUpdate <strong><?php echo htmlspecialchars($mainServerName) ?></strong>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row\">\n\t\t\t\t<table class=\"table\">\n\t\t\t\t\t<th>Schema Name</th>\n\t\t\t\t\t<th>Latest Version</th>\n\t\t\t\t\t<th>Version Installed</th>\n\t\t\t</tr>\n\t\t\t\t\t<?php foreach ($mainServer->schemas as $schema): ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<span class=\"text-<?php echo ($schema->versionInstalled == $schema->latestVersion) ? 'success' : 'danger' ?>\">\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($schema->schemaInfo['name']) ?>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php if ($schema->latestVersion > $schema->versionInstalled): ?>\n\t\t\t\t\t\t\t<span class=\"schema-query\" title=\"<?php echo htmlspecialchars(file_get_contents($schema->schemaInfo['files'][$schema->latestVersion])) ?>\">\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($schema->latestVersion) ?>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($schema->latestVersion) ?>\n\t\t\t\t\t\t<?php endif ?>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td><?php echo $schema->versionInstalled ? htmlspecialchars($schema->versionInstalled) : '<span class=\"none\">None</span>' ?></td>\n\t\t\t\t</tr>\n\t\t\t\t\t<?php endforeach ?>\n\n\t\t\t\t\t<?php foreach ($mainServer->charMapServers as $charMapServerName => $charMapServer): ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"3\" class=\"pt-4\"><h4><?php echo htmlspecialchars($charMapServerName) ?></h4></th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Schema Name</th>\n\t\t\t\t\t<th>Latest Version</th>\n\t\t\t\t\t<th>Version Installed</th>\n\t\t\t\t</tr>\n\t\t\t\t\t\t<?php foreach ($charMapServer->schemas as $schema): ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<span class=\"text-<?php echo ($schema->versionInstalled == $schema->latestVersion) ? 'success' : 'danger' ?>\">\n\t\t\t\t\t\t\t<?php echo htmlspecialchars($schema->schemaInfo['name']) ?>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td><?php echo htmlspecialchars($schema->latestVersion) ?></td>\n\t\t\t\t\t<td><?php echo $schema->versionInstalled ? htmlspecialchars($schema->versionInstalled) : '<span class=\"none\">None</span>' ?></td>\n\t\t\t\t</tr>\n\t\t\t\t\t\t<?php endforeach ?>\n\n\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t<?php endforeach ?>\n\t\t\t</table>\n\t\t\t\t\t\t</div>\n\t\t</form>\n\t\t</div>\n\t<?php endif ?>\n<?php endif ?>\n"
  }
]