[
  {
    "path": ".gitignore",
    "content": "# ignore os/app generated files\nThumbs.db\n.DS_Store\n*.esproj\n*.project\n*.sublime-project\n*.sublime-workspace\n\n# ignore user .htaccess\n/.htaccess\n\n# ignore user sitemap\n/sitemap.xml\n\n# ignore user defines\n/monstra/boot/defines.php\n\n# ignore debug and custom themes\n/public/themes/*\n/admin/themes/*\n!/public/themes/default\n!/admin/themes/default\n\n# ignore user plugins\n/plugins/*\n!/plugins/box\n!/plugins/captcha\n!/plugins/markitup\n!/plugins/sandbox\n\n# ignore user files and folders\n/backups/*\n/public/*\n/storage/*\n/tmp/*"
  },
  {
    "path": "CHANGELOG.md",
    "content": "Monstra 3.0.4, 2016-04-05\n------------------------\n- Fixed User Security by adding a check that compares POST id with SESSION\nid for none admin edits\n- Fixed ability to read robots.txt\n- Stylesheet: Changed minified URIs to eliminate query strings\n- FilesManager: added alphabetical order for files and directories\n- Localization: Major Fixes for ES locale\n\nMonstra 3.0.3, 2016-01-29\n------------------------\n- Improved Monstra Security\n- Minimum PHP version for Monstra is 5.3.2\n- Admin: Fixed 404 error when using certain server configurations\n- Localization: Major Fixes for SR, KA-GE, and ES\n- Install Script Fixes\n\nMonstra 3.0.2, 2015-10-16\n------------------------\n- Added Monstra MIT LICENSE instead of GNU GENERAL PUBLIC LICENSE v3\n- Code standards fixes.\n- Localization: Major Fixes for ES and SR\n\nMonstra 3.0.1, 2014-08-10\n------------------------\n- Minimum php is 5.3\n- Themes Plugin: Imposible to create new CSS - fixed\n- Themes Plugin: js and css counter does not recalculate - fixed\n- Error in Monstra Notifications - fixed\n- Updated plugins url from plugins.monstra.org to monstra.org/download/plugins\n\nMonstra 3.0.0, 2014-08-01\n------------------------\n- Mobile Ready! Monstra fully responsive for mobile devices, tablets, and normal computer screens.\n- Twitter Bootstrap updated to 3.1.1\n- Idiorm updated to 1.4.1\n- jQuery updated to 2.1.0\n- Admin: New Modern User Interface\n- Site: New default theme\n- Layout fixes according to World Wide Web Consortium (W3C) Standards\n- Prefetch DNS to reduce look up times\n- Files Manager: added ability to create & rename directories.\n- Files Manager: Maximum upload file size message - added.\n- Files Manager: Bootstrap fileinput.js updated to 3.0.0\n- Files Manager: File Info Popup\n- Backup: Restore Site from Backup added\n- Plugins Manager: Uploading new plugins via the admin panel added\n- Plugins Manager: Read plugin help(README.MD) ability added.\n- Responsive Chocolat Lightbox instead of TB Lightbox\n- Blog Plugin as a part of Monstra CMS\n- CodeMirror Plugin as a part of Monstra CMS\n- Markdown Plugin as a part of Monstra CMS\n- MarkItUp Color Pallete fixes\n- Site Url without trailing slashes\n- Admin Help Section - added.\n- Pages Plugin: tags field added.\n- Pages Plugin: Meta Title added.\n- Sitemap Errors Fixes.\n- Monstra automatically renames files - fixed\n- Monstra Dashboard created and set as default Plugin for Admin Panel\n- Ink Framework for Monstra Email Templates\n- iCheck plugin for checkboxes added.\n- Emails Manager Plugin added.\n- HubSpot Messaging Library added for notifications\n- Gelato: Unzip Functionality added.\n- Gelato: Number Class new method convertToBytes() added.\n- Gelato: ErroHandler styles updates\n- Users Plugin getGravatarURL() improve\n- Plugin API - Actions - Closure support added.\n- Plugin API - Filters - Closure support added.\n- Core: Better statuses notification (error,success,warning)\n- Core: Store user_email in Session\n- Core: Javascript may be broken if there is no break line - fixed\n- Core: Added ability to avoid caching JS/CSS by the browser.\n- Core: Monstra automatically rename files Issue - fixed\n- Sandbox Plugin cleanup\n- New Flags: Japanese(JA), Indonesian(ID), Chinese(ZH-CN), Turkish(TR) added.\n- Localization: Japanese(JA), Indonesian(ID), Chinese(ZH-CN), Turkish(TR) translations added.\n- Localization: Major Fixes\n\nMonstra 2.3.1, 2013-12-25\n------------------------\n- Localization: Major Fixes\n- Gelato: Image.php Major Fixes\n- Sitemap: Errors #175 - fixes\n- New favicon added #182 - by bernte\n- Layouts: General Fixes - by bernte\n- Installer: SERVER_PORT issue - fixed by KANekT\n- Gelato: Number Class - updated bytes format (JEDEC & IEC 60027) by mbarzda\n- Email Layout: footer fixes\n\nMonstra 2.3.0, 2013-12-19\n------------------------\n- Update Twitter Bootstrap to 2.3.2\n- Security: Added limits for login attempts #104\n- Security: Obfuscate users email to prevent spam-bots from sniffing it.\n- Core: Added ability to map Monstra Engine Directory.\n- Core: Maintenance Mode Improvements\n- Core: ORM::configure - driver options added\n- Gelato: Image.php fix for PNG files\n- Gelato: Number.php: Undefined offset fix\n- XMLDB: error select for empty table fix\n- Plugin API: Stylesheet.php updates - sourcecode misses a linebreak after minified css\n- Files Manager: jasny bootstrap-fileupload - added #89\n- Users Plugin: login page fixes\n- Users Plugin: Deleting users - fixed by Oleg Gatseluk #158\n- Pages Plugin: General method getPages() created #123\n- Pages Plugin: page expand ajax bug #115 - fixed\n- Pages Plugin: Improved available() method to show only published pages\n- Pages Plugin: Bug with pages renaming - fixed\n- Monstra Email Templates #164\n- Localization: Major Fixes\n- Localization: PL added\n- Localization: NL added\n- .htaccess SEO improvements\n\nMonstra 2.2.1, 2013-04-06\n------------------------\n- Update Gelato to 1.0.3\n- Error Handler turned off for Production environment\n- Localization: Farsi(fa) translations fixes.\n- Pages Manager: fix translates #107\n- Missing Translation on Login Page - fixed #106\n- Lithuanian flag and other languages fixes. Thanks to mbarzda\n\nMonstra 2.2.0, 2013-03-25\n------------------------\n- Mobile Ready! Monstra fully responsive for mobile devices, tablets, and normal computer screens.\n- Improved Monstra Architecture!\n- New Stand-alone Monstra Library (Gelato) was created! Totally improved old classes and added new classes!\n- Monstra Library with new useful classes - ClassLoader, ErrorHandler, Log, MinifyJS, MinifyCSS, MinifyHTML, Token, Registry.\n- Adopted PSR-0 PSR-1 PSR-2\n- Localization: Farsi(fa), Magyar(hu), Français(fr), Spanish(es), Serbian(sr-yu), Slovakian(sk) translations added. Thanks to Abdulhalim, Lez, Neri, Mapadesign, Hugomano and Nakome.\n- Idiorm Updated to 1.3.0\n- jQuery Updated to 1.9.1\n- Twitter Bootstrap Updated to 2.3.0\n- Default Theme: Social Meta Tags - added.\n- Default Theme: Hook \"theme_meta\" - added.\n- Admin Default Theme: Added missing meta tags.\n- Improve Installer Usability. Flags Added.\n- Default Site Email added.\n- PHPMailer added.\n- Pages Manager: added ability to quickly update page status and page access.\n- Intstaller Layout: Added missing meta tags.\n- Filesmanager plugin: added ability to view images.\n- Filesmanager Plugin: forbidden types array - updated.\n- CSRF detection text - updated.\n- Engine Uri: code improvements.\n- XMLDB: Table Class - fixed select method. Thanks to DmitriyMX\n- Bootstrap CSS: Icons url - fixed.\n- Plugins Manager: buttons confirm dialog message - fixed.\n- Pages Manager: page cloning problem - fixed.\n- Localizations: translations fixes.\n\nMonstra 2.1.3, 2012-12-09\n------------------------\n- Pages Plugin: New shortcodes added - page_author, page_slug, page_url page_available, page_breadcrumbs, page_date, page_content.\n- Pages Plugin: add ability to get content for specific page.\n- XMLDB: New method factory() added.\n- Twitter Bootstrap updated to Version 2.2.2\n- Sitemap Plugin: `_blank` removed.\n- Filesmanager Plugin: fixes.\n- Backup Plugin: fixes.\n\nMonstra 2.1.2, 2012-12-05\n------------------------\n- Blocks Plugin: added ability create and render inline content blocks with {block_inline} and {block_inline_create}\n- Site Module: methods keywords() and description() fixes.\n- Pages Plugin: pages.js fixes.\n- Admin main index.php fixes.\n\nMonstra 2.1.1, 2012-11-30\n------------------------\n- Plugins: Minify bug #71 - fixed.\n- Menu Plugin: bug with categories #70 - fixed.\n- Localization: IT translations - fixed.\n\nMonstra 2.1.0, 2012-11-29\n------------------------\n- Localization: PT-BR, UK translations added.\n- Default theme: hook \"theme_header\" added.\n- System Plugin: new action \"admin_system_extra_index_template_actions\" added.\n- Shortcodes API: new delete() clear() exists() methods added.\n- Options API: new exists() method added.\n- Core: new constant VERSION - added.\n- Core: added ability to load: defines, actions, filters, shortcodes for current environment.\n- Defines: deprecated constants: MONSTRA_GZIP_STYLES, MONSTRA_VERSION, MONSTRA_VERSION_ID, MONSTRA_SITEURL, MONSTRA_MOBILE deleted.\n- Box Plugins: used Core::VERSION to compare Monstra CMS version.\n- Installer: use version_compare() function to compare php versions.\n- Installer: Get system timezone with date_default_timezone_get() function.\n- Admin Default Theme: general improvements.\n- Users Plugin: user profile editing fixed.\n- Shortcodes API: bug with similar shortcode names fixed.\n- Site: template() method improvements. Added ability to get template from specific theme.\n- Menu Plugin: added ability to select children pages.\n- Snippets Plugin: added ability to add parameters for snippets.\n- Themes Plugin: added ability to add parameters for chunks.\n- Pages Plugin: pages expand/collapse feature added.\n- Pages Plugin: pages \"access\" feature added.\n- Pages Plugin: tab \"seo\" changed to \"metadata\"\n- Pages Table: \"expand, \"access\" fields added.\n- Information Plugin: new \"Directory Permissions\" tab added.\n- Twitter Bootstrap updated to Version 2.2.1\n- MarkitUp! updated to Version 1.1.13\n- Sitemap Plugin: links title issue fixed.\n- Core: Init Site module on frontend only.\n- Core: IDIORM optimization.\n- Site Class: code optimization.\n- Sitemap Plugin: bug with priority fixed.\n- File .gitignore added.\n- Monstra logo updated.\n- README: general updates\n- Pages Plugin: \"delete\" action fixes.\n- Plugins Manager: add ability to Cleanup minify with new plugin installation or plugin uninstallation.\n- MarkitUp Plugin: unnecessary files removed.\n- XMLDB: select() method fixes.\n- XMLDB: new method existsField() added.\n- Information Plugin: shows \"PHP Built On\", \"Web Server\", \"WebServer to PHP Interface\" information.\n- Installer: general fixes.\n- Blocks Plugin: view embed codes feature added.\n- Snippets Plugin: view embed codes feature added.\n- Text Helper: method strpSlashes() fixed.\n- Text Helper: new method increment() added.\n- Pages Plugin: method robots() fixes.\n- Pages Plugin: improved page author detection.\n- Pages Plugin: add, edit, delete, clone actions improvements.\n- Users Plugin: apply \"content\" filter for \"about_me\" field.\n- Plugin API: Stylesheet and Javascript load() methods - fixed.\n- Pages Plugin: Page editing date issue - fixed.\n- Localization: EN, RU, IT, LT, DE translations fixed.\n- Imformation Plugin: config file(defines.php) checking removed.\n- Box Plugins: general code refactoring.\n\nMonstra 2.0.1, 2012-10-18\n------------------------\n- Localization: DE, LT, IT translations added\n- Validation Helper: Updated email, ip and url methods with filter_var instead preg_match function.\n- Localization: EN, RU translations fixed\n- Users Plugin: field \"about_me\" fixed\n\nMonstra 2.0.0, 2012-10-09\n------------------------\n- Idiorm Added! Idiorm - a lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5.\n- Added Crypt Capthca Plugin\n- Users Plugin: Added ability to close users frontend registration. Updated frontend and backend templates. Using Capthca Plugin instead of Captca Helper for more secure.\n- Admin Password Reset Page: Capthca Plugin added.\n- Backup Plugin: Loading state button added. Shows \"Creating...\" while site backups create.\n- Pages Plugin: Added new actions: admin_pages_action_add, admin_pages_action_edit, admin_pages_action_clone, admin_pages_action_delete\n- Pages Plugin: Updated date() method - added ability to set date format.\n- Pages Plugin: UI and Logic updates.\n- Users Plugin: Email templates added.\n- Users Table: Added new fields: hash, about_me\n- Users Plugin: Admin - New User Registration Validation - Fixed\n- Users Plugin: Added ability to set \"about me\" information.\n- Improved Password Reset Logic.\n- Information Plugin: Added new tab \"Server\" with common server information.\n- Box Plugins: CSRF vulnerability resolved.\n- Sitemap Plugin: Basic search engine optimization.\n- Improved Menu Plugin. Added ability to manage items categories.\n- Improved Admin Theme - built with best frontend optimization practice. Updated architecture and User Interface. Admin theme more responsive now!\n- Added Twitter Bootstrap 2.1.1.\n- Added Twitter Bootstrap icons.\n- Dir Helper: Fixed size() method.\n- New Default Theme: built with best frontend optimization practice.\n- Options API: Updated get() method. Return empty string if option value doesnt exists.\n- CSS variables: Added - @theme_site_url @theme_admin_url\n- CSS variables: Deleted - @theme_url\n- Themes Plugin: Added ability to create/edit/clone JavaScripts. Added ability to change admin theme in one click.\n- Apply filter 'content' to Blocks.\n- Array Helper: get() method improved. New methods keyExists() isAssoc() set() delete() random() added.\n- Plugin API: Fixed Javascript and Stylesheet class.\n- Plugin API: Added ability to set view file from current theme folder.\n- New options theme_admin_name, theme_site_name, users_frontend_registration added.\n- Form Helper: Custom Macros - added\n- Install Script Improvments.\n- Monstra Localization Improvments. Added locales array to I18N class.\n- Translates updates.\n- Path updates.\n- And a lot of general engine improvements.\n\nMonstra 1.3.1, 2012-09-02\n------------------------\n- Fix Plugins Output\n\nMonstra 1.3.0, 2012-09-01\n------------------------\n- Improve Multi-user system. Front-end registration, authorization, profile editing added.\n- Improve Default Monstra theme.\n- Security: Fix Script Insertion Vulnerability.\n- Blocks and Snippets plugins code fix. Issue #35, Issue #34\n- XMLDB: new method updateField()\n- Plugin API: path updates.\n- Dir Helper: new method size()\n- Filesmanager: shows directory size.\n- Security Helper: update safeName() method.\n- Pages Plugin: new method children() Get children pages for a specific parent page.\n- Update translates.\n- And a lot of general engine improvements.\n\nMonstra 1.2.1, 2012-08-09\n------------------------\n- Admin styles: add .error class\n- Fix translates\n- Security: fix Cross Site Request Forgery\n- Site Module: fix template() function\n- Html Helper: fix nbsp() function\n- Site Module: fix template() function\n\nMonstra 1.2.0, 2012-07-03\n------------------------\n- Improve I18N\n- Improve Monstra Check Version: set priority 9999\n- XMLDB: fix updateWhere function\n- Fix Agent Helper\n- Sitemap: use time() instead of mktime()\n- Security Helper: add Tokenizer\n\nMonstra 1.1.6, 2012-06-12\n------------------------\n- Sitemap Plugin: return content instead of displaying.\n- Improve content filtering.\n\nMonstra 1.1.5, 2012-06-10\n------------------------\n- Improve Monstra Error Handler\n- Cookie Helper: fix set() function\n\nMonstra 1.1.4, 2012-06-09\n------------------------\n- Improve Monstra Error Handler\n\nMonstra 1.1.3, 2012-06-06\n------------------------\n- Improve Monstra Error Handler\n\nMonstra 1.1.2, 2012-06-05\n------------------------\n- Remove Fatal Error Handler\n- File helper: fix writable() function\n\nMonstra 1.1.1, 2012-06-04\n------------------------\n- Fix error reporting!\n- Themes Plugin: fix Chunk class\n\nMonstra 1.1.0, 2012-06-02\n------------------------\n- Menu plugin: added ability to add plugins(components) to site menu.\n- Improve installation script: add ability to change Monstra language.\n- Improve installation script: better error checking.\n- Improve monstra check version\n- Update Users table autoincrement value to 0\n- Pages Plugin: return empty meta robots if current component is not pages\n- Html Helper: fix arrow() function.\n- XMLDB: fix select function.\n- Themes Plugin: fix theme navigation item order. set 2\n- Time Zones updates\n- Fix translates\n\nMonstra 1.0.1, 2012-04-26\n------------------------\n- Cleanup minify during saving the theme\n- add new css variables: @site_url and @theme_url\n- Remove deprecated @url css variable\n\nMonstra 1.0.0, 2012-04-24\n------------------------\n- Initial release\n"
  },
  {
    "path": "LICENSE.md",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2012 - 2016 Monstra Content Management\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# THIS PROJECT IS NOT SUPPORTED ANYMORE!<br>Check FLEXTYPE.ORG\n\n## Monstra\nMonstra is a modern and lightweight Content Management System.\n\n[![Join the chat at https://gitter.im/monstra-cms/monstra](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/monstra-cms/monstra?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n## System Requirements\nOperation system: Unix, Linux, Windows, Mac OS\nMiddleware: PHP 5.3.2 or higher with PHP's [SimpleXML module](http://php.net/simplexml) and [Multibyte String module](http://php.net/mbstring)\nWebserver: Apache with [Mod Rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) or Ngnix with [Rewrite Module](http://wiki.nginx.org/HttpRewriteModule)\n\n## Steps to Install\n1. [Download the latest version.](http://monstra.org/download)\n2. Unzip the contents to a new folder on your local computer.\n3. Upload that whole folder with an FTP client to your host.\n4. You may also need to recursively CHMOD the folder /storage/, /tmp/, /backups/ and /public/ to 755(or 777) if your host doesn't set it implicitly.\n5. Also you may also need to recursively CHMOD the /install.php, /.htaccess and /sitemap.xml to 755(or 777) if your host doesn't set it implicitly.\n6. Type http://example.org/install.php in the browser.\n\n## Contributing\n1. Help on the [Forum.](http://forum.monstra.org)\n2. Donate to keep Monstra free. We will add you to Monstra [Sponsors Page.](http://monstra.org/contribute/sponsors)\n3. Develop a new plugin.\n4. Create a new theme.\n5. Find and [report issues.](https://github.com/monstra-cms/monstra/issues)\n6. Link back to [Monstra](http://monstra.org).\n\n## Links\n- [Site](http://monstra.org)\n- [Forum](http://forum.monstra.org)\n- [Documentation](http://monstra.org/documentation)\n- [GitHub Documentation](https://github.com/monstra-cms/monstra-cms-documentation)\n- [GitHub Repository](https://github.com/monstra-cms/monstra)\n\n## License\nSee [LICENSE](https://github.com/monstra-cms/monstra/blob/master/LICENSE.md)\n"
  },
  {
    "path": "admin/index.php",
    "content": "<?php\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\n// Main engine defines\ndefine('DS', DIRECTORY_SEPARATOR);\ndefine('ROOT', rtrim(str_replace(array('admin'), array(''), dirname(__FILE__)), '\\\\/'));\ndefine('BACKEND', true);\ndefine('MONSTRA_ACCESS', true);\n\n// Load Monstra engine _init.php file\nrequire_once ROOT. DS .'engine'. DS .'_init.php';\n\n// Errors var when users login failed\n$login_error = '';\n\n// Get users Table\n$users = new Table('users');\n\n// Admin login\nif (Request::post('login_submit')) {\n    if (Cookie::get('login_attempts') && Cookie::get('login_attempts') >= 5) {\n        $login_error = __('You are banned for 10 minutes. Try again later', 'users');\n    } else {\n        $user = $users->select(\"[login='\" . trim(Request::post('login')) . \"']\", null);\n        if (count($user) !== 0) {\n            if ($user['login'] == Request::post('login')) {\n                if (trim($user['password']) == Security::encryptPassword(Request::post('password'))) {\n                    if ($user['role'] == 'admin' || $user['role'] == 'editor') {\n                        Session::set('admin', true);\n                        Session::set('user_id', (int) $user['id']);\n                        Session::set('user_login', (string) $user['login']);\n                        Session::set('user_role', (string) $user['role']);\n                        Session::set('user_email', (string) $user['email']);\n                        Request::redirect('index.php');\n                    }\n                } else {\n                    $login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');\n\n                    if (Cookie::get('login_attempts')) {\n                        if (Cookie::get('login_attempts') < 5) {\n                            $attempts = Cookie::get('login_attempts') + 1;\n                            Cookie::set('login_attempts', $attempts, 600);\n                        } else {\n                            $login_error = __('You are banned for 10 minutes. Try again later', 'users');\n                        }\n                    } else {\n                        Cookie::set('login_attempts', 1, 600);\n                    }\n                }\n            }\n        } else {\n            $login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');\n\n            if (Cookie::get('login_attempts')) {\n                if (Cookie::get('login_attempts') < 5) {\n                    $attempts = Cookie::get('login_attempts') + 1;\n                    Cookie::set('login_attempts', $attempts, 600);\n                } else {\n                    $login_error = __('You are banned for 10 minutes. Try again later', 'users');\n                }\n            } else {\n                Cookie::set('login_attempts', 1, 600);\n            }\n        }\n    }\n\n    Notification::setNow('error', $login_error);\n}\n\n// Errors\n$errors = array();\n\n$site_url  = Option::get('siteurl');\n$site_name = Option::get('sitename');\n\n$user_login = trim(Request::post('login'));\n\n// Reset Password Form Submit\nif (Request::post('reset_password_submit')) {\n    if (Option::get('captcha_installed') == 'true' && ! CryptCaptcha::check(Request::post('answer'))) {\n        $errors['users_captcha_wrong'] = __('Captcha code is wrong', 'users');\n    }\n    if ($user_login == '') {\n        $errors['users_empty_field'] = __('Required field', 'users');\n    }\n    if ($user_login != '' && ! $users->select(\"[login='\".$user_login.\"']\")) {\n        $errors['users_user_doesnt_exists'] = __('This user doesnt exist', 'users');\n    }\n\n    if (count($errors) == 0) {\n\n        // Get user\n        $user = $users->select(\"[login='\" . $user_login . \"']\", null);\n\n        // Generate new hash\n        $new_hash = Text::random('alnum', 12);\n\n        // Update user hash\n        $users->updateWhere(\"[login='\" . $user_login . \"']\", array('hash' => $new_hash));\n\n        $mail = new PHPMailer();\n        $mail->CharSet = 'utf-8';\n        $mail->ContentType = 'text/html';\n        $mail->SetFrom(Option::get('system_email'));\n        $mail->AddReplyTo(Option::get('system_email'));\n        $mail->AddAddress($user['email'], $user['login']);\n        $mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));\n        $mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')\n            ->assign('site_url', $site_url)\n            ->assign('site_name', $site_name)\n            ->assign('user_id', $user['id'])\n            ->assign('user_login', $user['login'])\n            ->assign('new_hash', $new_hash)\n            ->assign('email_template', 'reset-password')\n            ->render());\n        $mail->Send();\n\n        // Set notification\n        Notification::set('success', __('Your login details for :site_name has been sent', 'users', array(':site_name' => $site_name)));\n        Notification::set('reset_password', 'reset_password');\n\n        // Redirect to password-reset page\n        Request::redirect(Site::url().'/admin');\n    }\n\n    Notification::setNow('reset_password', 'reset_password');\n}\n\n// If admin user is login = true then set is_admin = true\nif (Session::exists('admin') && Session::get('admin') == true) {\n    $is_admin = true;\n} else {\n    $is_admin = false;\n}\n\n// Logout user from system\nif (Request::get('logout') && Request::get('logout') == 'do') {\n    Session::destroy();\n}\n\n// If is admin then load admin area\nif ($is_admin) {\n\n    // If id is empty then redirect to default plugin PAGES\n    if (Request::get('id')) {\n        $area = Request::get('id');\n    } else {\n        Request::redirect(Site::url().'/admin/index.php?id=dashboard');\n    }\n\n    $plugins_registered = Plugin::$plugins;\n    foreach ($plugins_registered as $plugin) {\n        $plugins_registered_areas[] = $plugin['id'];\n    }\n\n    // Show plugins admin area only for registered plugins\n    if (in_array($area, $plugins_registered_areas)) {\n        $plugin_admin_area = true;\n    } else {\n        $plugin_admin_area = false;\n    }\n\n    // Backend pre render\n    Action::run('admin_pre_render');\n\n    // Display admin template\n    require 'themes'. DS . Option::get('theme_admin_name') . DS . 'index.template.php';\n\n    // Backend post render\n    Action::run('admin_post_render');\n} else {\n\n    // Display login template\n    require 'themes'. DS . Option::get('theme_admin_name') . DS . 'login.template.php';\n}\n\n// Flush (send) the output buffer and turn off output buffering\nob_end_flush();\n"
  },
  {
    "path": "admin/themes/default/css/default.css",
    "content": "/************************************\n  Monstra\n  default.css\n*************************************\n  CONTENTS\n    1. GENERAL\n    2. COMPONENTS\n    3. MEDIA QUERIES\n\n*************************************\n    1. GENERAL\n*************************************/\n\n@font-face {\n    font-family: 'Glyphicons Halflings';\n\n    src: url('@site_url/public/assets/fonts/glyphicons-halflings-regular.eot');\n    src: url('@site_url/public/assets/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),\n    url('@site_url/public/assets/fonts/glyphicons-halflings-regular.woff') format('woff'),\n    url('@site_url/public/assets/fonts/glyphicons-halflings-regular.ttf') format('truetype'),\n    url('@site_url/public/assets/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');\n}\n\nbody {\n    background: #fafafa;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5 {\n    color: #222;\n}\n\n.error-none {\n    display: none;\n}\n\n.error-field {\n    border: 1px solid red!important;\n}\n\n.error-message {\n    color: red;\n}\n\na.btn-expand {\n    font-size: 14px;\n    font-weight: bold;\n\n    padding-right: 4px;\n    padding-left: 4px;\n\n    text-decoration: none;\n\n    color: #333;\n}\n\n.btn:active,\n.btn.active {\n    outline: 0;\n    background-image: none;\n    box-shadow: none;\n}\n\n.login-footer,\n.login-footer a {\n    font-size: 12px;\n\n    color: #777;\n}\n\nfooter {\n    margin-top: 40px;\n}\n\nfooter,\nfooter a {\n    font-size: 12px;\n\n    color: #777;\n}\n\nfooter span {\n    padding-top: 10px;\n\n    border-top: 1px solid #e0e0e0;\n}\n\nfooter .highlight {\n    color: #333;\n}\n\n/*************************************\n    2. COMPONENTS\n*************************************/\n\n/* Well */\n.well {\n    color: #555;\n    border: none;\n    border-radius: 0px;\n    background: #fff;\n    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.13);\n            box-shadow: 0 1px 3px rgba(0,0,0,.13);\n\n    -webkit-font-smoothing: subpixel-antialiased;\n}\n\n.dashboard-well {\n    padding-top: 6px;\n    padding-bottom: 6px;\n}\n\n.dashboard-well a.welcome-back {\n    font-size: 16px;\n\n    padding-left: 0;\n\n    text-decoration: none;\n\n    color: #333;\n}\n\n/* Admin Form */\n.form-signin {\n    max-width: 400px;\n}\n\n.form-signin {\n    margin-top: 40px;\n}\n\n.form-signin .administration-area,\n.form-signin .reset-password-area {\n    margin-top: 40px;\n}\n\n/* Dropdown Menu */\n.dropdown-menu .divider {\n    background-color: #555454;\n}\n\n.dropdown-menu {\n    border: 1px solid #333;\n    background: #333;\n    box-shadow: none;\n}\n\n.dropdown-menu > li > a {\n    color: #eee;\n}\n\n/* Navbar */\n.navbar-inverse .navbar-nav > li > a {\n    color: #eee;\n}\n\n.navbar-inverse {\n    background: #222;\n}\n\n.navbar-default {\n    border-radius: 0px;\n}\n\nul.navbar-nav {\n    min-height: 60px;\n}\n\n.navbar-nav > li {\n    min-height: 60px;\n}\n\n.navbar-nav > li > a {\n    line-height: 30px;\n}\n\n.navbar-brand {\n    font-size: 24px;\n    line-height: inherit;\n\n    padding: 13px 15px;\n}\n\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n    background: #333;\n}\n\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n    background: #333;\n}\n\na.navbar-brand {\n    font-weight: bold;\n\n    color: #fafafa!important;\n}\n\n.navbar-nav .dropdown-menu {\n    padding-top: 0;\n    padding-bottom: 0;\n}\n\n.navbar-nav .dropdown-menu > li > a {\n    padding: 7px 20px;\n}\n\n.nav > li > a {\n    padding-top: 15px;\n    padding-right: 20px;\n    padding-bottom: 15px;\n    padding-left: 20px;\n}\n\n.nav > li > a > img {\n    width: 28px;\n    height: 28px;\n    margin: 0 0 0 4px;\n\n    border: 1px solid #888;\n}\n\n/* Flat Elements */\n.form-control,\n.btn,\n.dropdown-menu,\n.modal-content,\n.badge,\n.label,\n.input-group-addon,\n.alert,\n.tooltip,\n.tooltip-inner,\npre,\ncode {\n    border-radius: 0px;\n}\n.badge,\n.tooltip,\n.tooltip-inner,\n.label,\npre,\ncode {\n    font-weight: normal;\n\n    text-shadow: none;\n}\n\npre {\n    border: none;\n}\n\n/* Inputs */\nselect,\ntextarea,\ninput[type=\"text\"],\ninput[type=\"password\"],\ninput[type=\"datetime\"],\ninput[type=\"datetime-local\"],\ninput[type=\"date\"],\ninput[type=\"month\"],\ninput[type=\"time\"],\ninput[type=\"week\"],\ninput[type=\"number\"],\ninput[type=\"email\"],\ninput[type=\"url\"],\ninput[type=\"search\"],\ninput[type=\"tel\"],\ninput[type=\"color\"],\n.form-control,\n.uneditable-input {\n    color: #3c3c3c;\n    border-color: #d0d0d0;\n    background-color: #fff;\n}\nselect:focus,\ntextarea:focus,\ninput[type=\"text\"]:focus,\ninput[type=\"password\"]:focus,\ninput[type=\"datetime\"]:focus,\ninput[type=\"datetime-local\"]:focus,\ninput[type=\"date\"]:focus,\ninput[type=\"month\"]:focus,\ninput[type=\"time\"]:focus,\ninput[type=\"week\"]:focus,\ninput[type=\"number\"]:focus,\ninput[type=\"email\"]:focus,\ninput[type=\"url\"]:focus,\ninput[type=\"search\"]:focus,\ninput[type=\"tel\"]:focus,\ninput[type=\"color\"]:focus,\n.form-control:focus,\n.uneditable-input:focus {\n    border-color: #aaaaaa;\n    -webkit-box-shadow: 0 0 8px #dce1e5;\n       -moz-box-shadow: 0 0 8px #dce1e5;\n            box-shadow: 0 0 8px #dce1e5;\n}\n\n/* Datapicker */\n.datapicker {\n    width: 200px;\n}\n\n/* Breadcrumb */\n.breadcrumb {\n    border-radius: 0px;\n    background: #fff;\n}\n\n/* Tabs */\n.nav-tabs > li > a {\n    border-radius: 0px;\n}\n\n.tab-page {\n    background: #fff;\n}\n\n.tab-pane > table {\n    border-top: none!important;\n}\n\n.tab-content {\n    overflow: visible;\n}\n\n.tab-page {\n    padding: 20px 10px 10px;\n\n    border-right: 1px solid #dddddd;\n    border-bottom: 1px solid #dddddd;\n    border-left: 1px solid #dddddd;\n}\n\n/* Tables */\ntable {\n    max-width: 100%;\n\n    border-spacing: 0;\n    border-collapse: collapse;\n\n    background-color: transparent;\n}\n.table {\n    width: 100%;\n    margin-bottom: 18px;\n}\n.table th,\n.table td {\n    line-height: 18px;\n\n    padding: 8px;\n\n    text-align: left;\n\n    border-top: 1px solid #dddddd;\n    background: #fff;\n}\n.table th {\n    font-weight: bold;\n}\n.table thead th {\n    vertical-align: bottom;\n}\n.table colgroup + thead tr:first-child th,\n.table colgroup + thead tr:first-child td,\n.table thead:first-child tr:first-child th,\n.table thead:first-child tr:first-child td {\n    border-top: 0;\n}\n.table tbody + tbody {\n    border-top: 2px solid #dddddd;\n}\n.table-condensed th,\n.table-condensed td {\n    padding: 4px 5px;\n}\n.table-bordered {\n    border-collapse: separate;\n\n    border: 1px solid #dddddd;\n    border-left: 0;\n\n    *border-collapse: collapsed;\n}\n.table-bordered th:first-child,\n.table-bordered td:first-child {\n    border-left: 1px solid #dddddd;\n}\n\n.table-bordered td:first-child {\n    padding-left: 15px;\n}\n\n.table-bordered thead:first-child tr:first-child th,\n.table-bordered tbody:first-child tr:first-child th,\n.table-bordered tbody:first-child tr:first-child td {\n    border-top: 0;\n}\n\n.table-bordered thead tr th {\n    font-weight: bold;\n\n    background-color: #fff;\n}\n\n.table-bordered thead:first-child tr:first-child > th:first-child,\n.table-bordered tbody:first-child tr:first-child > td:first-child {\n    border-top-left-radius: 0px;\n}\n\n.table-bordered thead:last-child tr:last-child > th:last-child,\n.table-bordered tbody:last-child tr:last-child > td:last-child {\n    border-top-right-radius: 0px;\n}\n\n.table-striped tbody tr:nth-child(odd) td,\n.table-striped tbody tr:nth-child(odd) th {\n    background-color: #f9f9f9;\n}\n\n.table tbody tr:hover td,\n.table tbody tr:hover th {\n    background-color: #f5f5f5;\n}\n\n.table-bordered th,\n.table-bordered td {\n    height: 50px;\n\n    border-left: none;\n}\n\n.table-bordered > thead > tr {\n    height: 45px;\n}\n\ntd,\nth {\n    display: table-cell;\n\n    vertical-align: inherit!important;\n}\n\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n    border: 0;\n    border-bottom: 1px solid #ccc;\n}\n\n.vertical-align {\n    display: table;\n\n    width: 100%;\n}\n\n.vertical-align > div {\n    display: table-cell;\n\n    vertical-align: middle;\n}\n\n.vertical-align > div > h1,\n.vertical-align > div > h2,\n.vertical-align > div > h3,\n.vertical-align > div > h4,\n.vertical-align > div > h5 {\n    margin-top: 10px;\n    margin-bottom: 10px;\n}\n\n.margin-top-1 {\n    margin-top: 1em;\n}\n\n.margin-top-2 {\n    margin-top: 2em;\n}\n\n.margin-bottom-1 {\n    margin-bottom: 1em;\n}\n\n.margin-bottom-2 {\n    margin-bottom: 2em;\n}\n\n/* Editor */\n#editor_area {\n    font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n    font-size: 14px;\n    line-height: 1.428571429;\n\n    height: 400px!important;\n    padding: 6px 9px;\n\n    color: #555;\n    border: 1px solid #ccc;\n}\n\n.markItUpHeader ul li {\n    padding: 5px;\n}\n\n.markItUpHeader ul .markItUpSeparator {\n    display: none;\n}\n\n.modal-header {\n    border-bottom: 1px solid #f3f3f3;\n}\n\n.modal-header .close {\n    font-size: 26px;\n}\n\n.modal-footer {\n    border-top: 1px solid #f3f3f3;\n}\n\n.drop-file-here {\n    margin-left: 4px;\n    padding: 5px 40px;\n\n    color: #ccc;\n    border: 3px dashed #d5d5d5;\n    background: #ccc;\n    background: #f7f7f7;\n}\n\n.modal-backdrop {\n    background-color: #000;\n}\n\n.modal-backdrop.in {\n    opacity: 0.8;\n}\n\n.modal-content {\n    border: none;\n    box-shadow: none;\n}\n\n#readme .modal-dialog {\n    width: 70%;\n}\n\n#readme .modal-body {\n    padding-top: 0px;\n}\n\n#Choco_container_via {\n    display: none;\n}\n\n/*************************************\n    3. MEDIA QUERIES\n*************************************/\n\n\n@media (max-width: 480px) {\n    /* MarkItUp */\n    .markItUpButton11,\n    .markItUpButton12,\n    .markItUpButton13,\n    .markItUpButton14,\n    .markItUpButton15,\n    .markItUpButton16,\n    .markItUpButton17,\n    .markItUpButton18 {\n        display: none;\n    }\n    .markItUpSeparator {\n        display: none;\n    }\n\n    /* Dashboard */\n    .dashboard-well .col-xs-6 {\n        width: 100%;\n    }\n    .dashboard-well .col-xs-6 .pull-right {\n        float: left!important;\n    }\n\n\n    .btn-phone {\n        width: 100%;\n    }\n\n    .row-phone {\n        display: block!important;\n\n        width: 100%!important;\n\n        text-align: left!important;\n    }\n\n    /* Users */\n    .users-btns > div {\n        display: block;\n\n        width: 100%;\n        margin-top: 10px;\n\n        text-align: left;\n    }\n\n    .users-btns > div:nth-child(2) {\n        margin-top: 15px;\n    }\n\n    .page-users .btn-cancel {\n        margin-bottom: 20px;\n    }\n}\n\n\n@media (max-width: 768px) {\n    .nav > li > a {\n        padding: 15px 9px!important;\n    }\n}\n\n@media (max-width: 320px) {\n    .mobile-nav-tabs .nav-tabs > li {\n        width: 100%;\n        height: 46px;\n        margin: 0px;\n    }\n    .mobile-nav-tabs .nav-tabs > li > a {\n        border: 0;\n        background: #fff;\n    }\n    .mobile-nav-tabs .nav-tabs > li.active > a,\n    .mobile-nav-tabs .nav-tabs > li.active > a:hover,\n    .mobile-nav-tabs .nav-tabs > li.active > a:focus {\n        color: #fff;\n        border: 0;\n        background-color: #428bca;\n    }\n    .mobile-nav-tabs .nav-tabs {\n        margin-top: 10px;\n        margin-bottom: 10px;\n\n        border: 0;\n    }\n    .mobile-nav-tabs .tab-pane > table {\n        border-top: 1px solid #ddd!important;\n    }\n}\n"
  },
  {
    "path": "admin/themes/default/index.template.php",
    "content": "<?php if ( ! defined('MONSTRA_ACCESS')) exit('No direct script access allowed'); ?><!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"utf-8\">\n\n    <meta http-equiv=\"x-dns-prefetch-control\" content=\"on\">\n    <link rel=\"dns-prefetch\" href=\"<?php echo Site::url(); ?>\" />\n    <link rel=\"dns-prefetch\" href=\"//www.google-analytics.com\" />\n    <link rel=\"dns-prefetch\" href=\"//www.gravatar.com\" />\n\n    <title>Monstra :: <?php echo __('Administration', 'system'); ?></title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <meta name=\"description\" content=\"Monstra Admin Area\" />\n    <link rel=\"icon\" href=\"<?php echo Option::get('siteurl'); ?>/favicon.ico\" type=\"image/x-icon\" />\n    <link rel=\"shortcut icon\" href=\"<?php echo Option::get('siteurl'); ?>/favicon.ico\" type=\"image/x-icon\" />\n\n    <!-- Styles -->\n    <link rel=\"stylesheet\" href=\"<?php echo Site::url(); ?>/public/assets/css/bootstrap.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"<?php echo Site::url(); ?>/public/assets/css/messenger.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"<?php echo Site::url(); ?>/public/assets/css/messenger-theme-flat.css\" type=\"text/css\" />\n    <?php Stylesheet::add('public/assets/css/chocolat.css', 'backend', 2); ?>\n    <?php Stylesheet::add('public/assets/css/bootstrap-fileupload.css', 'backend', 3); ?>\n    <?php Stylesheet::add('public/assets/css/icheck-blue.css', 'backend', 4); ?>\n    <?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 5); ?>\n    <?php Stylesheet::load(); ?>\n\n    <!-- JavaScripts -->\n    <script src=\"<?php echo Site::url(); ?>/public/assets/js/jquery.min.js\"></script>\n    <script src=\"<?php echo Site::url(); ?>/public/assets/js/bootstrap.min.js\"></script>\n    <script src=\"<?php echo Site::url(); ?>/public/assets/js/messenger.min.js\"></script>\n    <script src=\"<?php echo Site::url(); ?>/public/assets/js/icheck.min.js\"></script>\n    <?php Javascript::add('public/assets/js/jquery.chocolat.js', 'backend', 3); ?>\n    <?php Javascript::add('public/assets/js/bootstrap-fileupload.js', 'backend', 4); ?>\n    <?php Javascript::add('admin/themes/default/js/default.js', 'backend', 5); ?>\n    <?php Javascript::load(); ?>\n\n    <?php Action::run('admin_header'); ?>\n\n    <script>\n        $(document).ready(function() {\n\n          $('.chocolat').Chocolat({\n              overlayColor          : '#000',\n              leftImg               : \"<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/left.gif\",\n              rightImg              : \"<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/right.gif\",\n              closeImg              : \"<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/close.gif\",\n              loadingImg            : \"<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/loading.gif\"\n          });\n\n          $('input').iCheck({\n              checkboxClass: 'icheckbox_square-blue',\n              radioClass: 'iradio_square-blue',\n              increaseArea: '20%'\n          });\n\n        });\n    </script>\n\n    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->\n    <!--[if lt IE 9]>\n      <script src=\"//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js\"></script>\n      <script src=\"//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js\"></script>\n    <![endif]-->\n  </head>\n\n  <body class=\"page-<?php echo Request::get('id'); ?>\">\n\n    <nav class=\"navbar navbar-default navbar-inverse\" role=\"navigation\">\n      <div class=\"container\">\n          <div class=\"navbar-header\">\n            <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\"#bs-example-navbar-collapse-1\">\n              <span class=\"sr-only\">Toggle navigation</span>\n              <span class=\"icon-bar\"></span>\n              <span class=\"icon-bar\"></span>\n              <span class=\"icon-bar\"></span>\n            </button>\n            <a class=\"navbar-brand\" href=\"<?php echo Site::url(); ?>/admin/index.php?id=dashboard\">MONSTRA</a>\n          </div>\n\n          <div class=\"collapse navbar-collapse\" id=\"bs-example-navbar-collapse-1\">\n            <ul class=\"nav navbar-nav\">\n              <li<?php if (Request::get('id') == 'dashboard') { ?> class=\"active\"<?php } ?>><a href=\"<?php echo Site::url(); ?>/admin/index.php?id=dashboard\"><?php echo __('Dashboard', 'dashboard'); ?></a></li>\n              <li class=\"dropdown\">\n                <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><?php echo __('Content', 'pages'); ?> <b class=\"caret\"></b></a>\n                <ul class=\"dropdown-menu\">\n                    <?php Navigation::draw('content'); ?>\n                </ul>\n              </li>\n              <?php if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { ?>\n              <li class=\"dropdown\">\n                <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><?php echo __('Extends', 'system'); ?> <b class=\"caret\"></b></a>\n                <ul class=\"dropdown-menu\">\n                    <?php Navigation::draw('extends'); ?>\n                </ul>\n              </li>\n              <?php } ?>\n              <li class=\"dropdown\">\n                <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><?php echo __('System', 'system'); ?> <b class=\"caret\"></b></a>\n                <ul class=\"dropdown-menu\">\n                    <?php Navigation::draw('system'); ?>\n                </ul>\n              </li>\n              <li class=\"dropdown\">\n                <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><?php echo __('Help', 'system'); ?> <b class=\"caret\"></b></a>\n                <ul class=\"dropdown-menu\">\n                    <li><a href=\"http://monstra.org/documentation\" target=\"_blank\"><?php echo __('Documentation', 'system'); ?></a></li>\n                    <?php if (Option::get('language') == 'ru') { ?>\n                    <li><a href=\"http://ru.forum.monstra.org\" target=\"_blank\"><?php echo __('Official Support Forum', 'system'); ?></a></li>\n                    <?php } else { ?>\n                    <li><a href=\"http://forum.monstra.org\" target=\"_blank\"><?php echo __('Official Support Forum', 'system'); ?></a></li>\n                    <?php } ?>\n                </ul>\n              </li>\n            </ul>\n            <ul class=\"nav navbar-nav navbar-right\">\n              <li><a href=\"<?php echo Site::url(); ?>\" target=\"_blank\"><?php echo __('View Site', 'system'); ?></a></li>\n              <li class=\"dropdown\">\n                <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><?php echo Session::get('user_login'); ?> <img src=\"<?php echo Users::getGravatarURL(Session::get('user_email'), 28); ?>\" alt=\"\"> <b class=\"caret\"></b></a>\n                <ul class=\"dropdown-menu\">\n                  <li><a href=\"<?php echo Site::url(); ?>/admin/index.php?id=users&action=edit&user_id=<?php echo Session::get('user_id'); ?>\"><?php echo __('Profile', 'users')?></a></li>\n                  <li><a href=\"<?php echo Site::url(); ?>/admin/?logout=do\"><?php echo __('Log Out', 'users'); ?></a></li>\n                </ul>\n              </li>\n            </ul>\n          </div>\n      </div>\n    </nav>\n\n    <div class=\"container\">\n\n        <?php\n            // Monstra Notifications\n            Notification::get('success') AND Alert::success(Notification::get('success'));\n            Notification::get('warning') AND Alert::warning(Notification::get('warning'));\n            Notification::get('error')   AND Alert::error(Notification::get('error'));\n        ?>\n\n        <div id=\"update-monstra\"></div>\n        <div><?php Action::run('admin_pre_template'); ?></div>\n        <div>\n            <?php\n                if ($plugin_admin_area) {\n                    if (is_callable(ucfirst(Plugin::$plugins[$area]['id']).'Admin::main')) {\n                        call_user_func(ucfirst(Plugin::$plugins[$area]['id']).'Admin::main');\n                    } else {\n                        echo '<div class=\"message-error\">'.__('Plugin main admin function does not exist', 'system').'</div>';\n                    }\n                } else {\n                    echo '<div class=\"message-error\">'.__('Plugin does not exist', 'system').'</div>';\n                }\n            ?>\n        </div>\n        <div><?php Action::run('admin_post_template'); ?></div>\n      </div>\n      <div class=\"margin-top-1  margin-bottom-1 hidden-md\"></div>\n      <footer class=\"container visible-md visible-lg\">\n          <p class=\"pull-right\">\n            <span>\n              <a href=\"http://monstra.org\" target=\"_blank\">Monstra</a> was made by <a href=\"http://awilum.github.io\" target=\"_blank\" class=\"highlight\">Sergey Romanenko</a> and is maintained by <a href=\"https://github.com/monstra-cms/monstra/network/members\" target=\"_blank\" class=\"highlight\">Monstra Community</a> / © 2012 - 2016 <a href=\"http://monstra.org/about/license\" target=\"_blank\">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?>\n            </span>\n          </p>\n      </footer>\n</body>\n</html>\n"
  },
  {
    "path": "admin/themes/default/js/default.js",
    "content": "/**\n * Monstra JS module\n *\n * This source file is part of the Monstra Engine. More information,\n * documentation and tutorials can be found at http://monstra.org\n *\n * @package     Monstra\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n/* Confirm delete */\nfunction confirmDelete(msg){var data=confirm(msg+\" ?\"); return data;}\n\n/* Messanger */\nMessenger.options = {\n    extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',\n    theme: 'flat'\n}"
  },
  {
    "path": "admin/themes/default/login.template.php",
    "content": "<?php  if ( ! defined('MONSTRA_ACCESS')) exit('No direct script access allowed'); ?><!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <meta charset=\"utf-8\">\n        <title>Monstra :: <?php echo __('Administration', 'system'); ?></title>\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n        <meta name=\"description\" content=\"Monstra Admin Area\">\n        <link rel=\"icon\" href=\"<?php echo Option::get('siteurl'); ?>/favicon.ico\" type=\"image/x-icon\" />\n        <link rel=\"shortcut icon\" href=\"<?php echo Option::get('siteurl'); ?>/favicon.ico\" type=\"image/x-icon\" />\n\n        <!-- Styles -->\n        <link rel=\"stylesheet\" href=\"<?php echo Site::url(); ?>/public/assets/css/bootstrap.css\" type=\"text/css\" />\n        <link rel=\"stylesheet\" href=\"<?php echo Site::url(); ?>/public/assets/css/messenger.css\" type=\"text/css\" />\n        <link rel=\"stylesheet\" href=\"<?php echo Site::url(); ?>/public/assets/css/messenger-theme-flat.css\" type=\"text/css\" />\n        <?php Stylesheet::add('public/assets/css/bootstrap-lightbox.css', 'backend', 2); ?>\n        <?php Stylesheet::add('public/assets/css/bootstrap-fileupload.css', 'backend', 3); ?>\n        <?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 5); ?>\n        <?php Stylesheet::load(); ?>\n\n        <!-- JavaScripts -->\n        <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js\"></script>\n        <script src=\"<?php echo Site::url(); ?>/public/assets/js/bootstrap.min.js\"></script>\n        <script src=\"<?php echo Site::url(); ?>/public/assets/js/messenger.min.js\"></script>\n        <script src=\"<?php echo Site::url(); ?>/public/assets/js/messenger-theme-flat.js\"></script>\n        <?php Javascript::add('public/assets/js/bootstrap-lightbox.js', 'backend', 3); ?>\n        <?php Javascript::add('public/assets/js/bootstrap-fileupload.js', 'backend', 4); ?>\n        <?php Javascript::add('admin/themes/default/js/default.js', 'backend', 5); ?>\n        <?php Javascript::load(); ?>\n\n        <script type=\"text/javascript\">\n            $().ready(function () {\n                <?php if (Notification::get('reset_password') == 'reset_password') { ?>\n                    $('.reset-password-area, .administration-btn').show();\n                    $('.administration-area, .reset-password-btn').hide();\n                <?php } else { ?>\n                    $('.reset-password-area, .administration-btn').hide();\n                    $('.administration-area, .reset-password-btn').show();\n                <?php } ?>\n\n                $('.reset-password-btn').click(function() {\n                    $('.reset-password-area, .administration-btn').show();\n                    $('.administration-area, .reset-password-btn').hide();\n                });\n\n                $('.administration-btn').click(function() {\n                    $('.reset-password-area, .administration-btn').hide();\n                    $('.administration-area, .reset-password-btn').show();\n                });\n            });\n        </script>\n\n        <?php Action::run('admin_header'); ?>\n\n    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->\n    <!--[if lt IE 9]>\n      <script src=\"//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js\"></script>\n      <script src=\"//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js\"></script>\n    <![endif]-->\n    </head>\n    <body class=\"login-body\">\n\n        <?php\n            // Monstra Notifications\n            Notification::get('success') AND Alert::success(Notification::get('success'));\n            Notification::get('warning') AND Alert::warning(Notification::get('warning'));\n            Notification::get('error')   AND Alert::error(Notification::get('error'));\n        ?>\n\n        <div class=\"container form-signin\">\n\n            <div class=\"text-center\"><a class=\"brand\" href=\"<?php echo Option::get('siteurl'); ?>/admin\"><img src=\"<?php echo Option::get('siteurl'); ?>/public/assets/img/monstra-logo-256px.png\" alt=\"monstra\" /></a></div>\n            <div class=\"administration-area well\">\n                <div>\n                    <form method=\"post\">\n                        <div class=\"form-group\">\n                            <label><?php echo __('Username', 'users'); ?></label>\n                            <input class=\"form-control\" name=\"login\" type=\"text\" />\n                        </div>\n                        <div class=\"form-group\">\n                            <label><?php echo __('Password', 'users'); ?></label>\n                            <input class=\"form-control\" name=\"password\" type=\"password\" />\n                        </div>\n                        <div class=\"form-group\">\n                            <input type=\"submit\" name=\"login_submit\" class=\"btn btn-primary\" value=\"<?php echo __('Log In', 'users'); ?>\" />\n                        </div>\n                    </form>\n                </div>\n            </div>\n\n            <div class=\"reset-password-area well\">\n                <div>\n                    <form method=\"post\">\n                        <div class=\"form-group\">\n                        <label><?php echo __('Username', 'users'); ?></label>\n                        <input name=\"login\" class=\"form-control\" type=\"text\" value=\"<?php echo $user_login; ?>\" />\n                        </div>\n                        <?php if (Option::get('captcha_installed') == 'true') { ?>\n                        <div class=\"form-group\">\n                        <label><?php echo __('Captcha', 'users'); ?></label>\n                        <input type=\"text\" name=\"answer\" class=\"form-control\">\n                        <br>\n                        <?php CryptCaptcha::draw(); ?>\n                        </div>\n                        <?php } ?>\n                        <br>\n                        <?php\n                            if (count($errors) > 0) {\n                                foreach ($errors as $error) {\n                                    Alert::error($error);\n                                }\n                            }\n                        ?>\n                        <div class=\"form-group\">\n                            <input type=\"submit\" name=\"reset_password_submit\" class=\"btn btn-primary\" value=\"<?php echo __('Send New Password', 'users')?>\" />\n                        </div>\n                    </form>\n                </div>\n            </div>\n\n        </div>\n\n        <div class=\"login-footer\">\n\n            <div class=\"text-center\">\n                <a href=\"<?php echo Option::get('siteurl'); ?>\"><?php echo __('Back to Website', 'system');?></a> -\n                <a class=\"reset-password-btn\" href=\"javascript:;\"><?php echo __('Forgot your password ?', 'system');?></a>\n                <a class=\"administration-btn\" href=\"javascript:;\"><?php echo __('Log In', 'users');?></a>\n            </div>\n\n            <div class=\"text-center\">\n                © 2012 - 2016 <a href=\"http://monstra.org/about/license\" target=\"_blank\">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?>\n            </div>\n        </div>\n    </body>\n</html>\n"
  },
  {
    "path": "boot/defines.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra Defines\n */\n\n/**\n * The filesystem path to the site 'themes' folder\n */\ndefine('THEMES_SITE', ROOT . DS . 'public' . DS . 'themes');\n\n/**\n * The filesystem path to the admin 'themes' folder\n */\ndefine('THEMES_ADMIN', ROOT . DS . 'admin' . DS . 'themes');\n\n/**\n * The filesystem path to the 'plugins' folder\n */\ndefine('PLUGINS', ROOT . DS . 'plugins');\n\n/**\n * The filesystem path to the 'box' folder which is contained within\n * the 'plugins' folder\n */\ndefine('PLUGINS_BOX', PLUGINS . DS . 'box');\n\n/**\n * The filesystem path to the 'storage' folder\n */\ndefine('STORAGE', ROOT . DS . 'storage');\n\n/**\n * The filesystem path to the 'xmldb' folder\n */\ndefine('XMLDB', STORAGE . DS . 'database');\n\n/**\n * The filesystem path to the 'cache' folder\n */\ndefine('CACHE', ROOT . DS . 'tmp' . DS . 'cache');\n\n/**\n * The filesystem path to the 'minify' folder\n */\ndefine('MINIFY', ROOT . DS . 'tmp' . DS . 'minify');\n\n/**\n * The filesystem path to the 'logs' folder\n */\ndefine('LOGS', ROOT . DS . 'tmp' . DS . 'logs');\n\n/**\n * The filesystem path to the 'assets' folder\n */\ndefine('ASSETS', ROOT . DS . 'public' . DS . 'assets');\n\n/**\n * The filesystem path to the 'uploads' folder\n */\ndefine('UPLOADS', ROOT . DS . 'public' . DS . 'uploads');\n\n/**\n * Set password salt\n */\ndefine('MONSTRA_PASSWORD_SALT', 'YOUR_SALT_HERE');\n\n/**\n * Set date format\n */\ndefine('MONSTRA_DATE_FORMAT', 'Y-m-d / H:i:s');\n\n/**\n * Set eval php\n */\ndefine('MONSTRA_EVAL_PHP', false);\n\n/**\n * Check Monstra CMS version\n */\ndefine('CHECK_MONSTRA_VERSION', true);\n\n/**\n * Set gzip output\n */\ndefine('MONSTRA_GZIP', false);\n\n/**\n * Monstra database settings\n */\n//define('MONSTRA_DB_DSN', 'mysql:dbname=monstra;host=localhost;port=3306');\n//define('MONSTRA_DB_USER', 'root');\n//define('MONSTRA_DB_PASSWORD', 'password');\n\n"
  },
  {
    "path": "engine/Alert.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Alert\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Show success message\n     *\n     *  <code>\n     *      Alert::success('Message here...');\n     *  </code>\n     *\n     * @param string  $message Message\n     * @param integer $seconds Seconds\n     */\n    public static function success($message, $seconds = 3)\n    {\n        // Redefine vars\n        $message = (string) $message;\n        $seconds    = (int) $seconds;\n\n        echo '<script type=\"text/javascript\">\n                Messenger().post({\n                    type: \"success\",\n                    message : \"'.$message.'\",                    \n                    hideAfter: '.$seconds.'\n                });\n             </script>';\n    }\n\n    /**\n     * Show warning message\n     *\n     *  <code>\n     *      Alert::warning('Message here...');\n     *  </code>\n     *\n     * @param string  $message Message\n     * @param integer $seconds Seconds\n     */\n    public static function warning($message, $seconds = 3)\n    {\n        // Redefine vars\n        $message = (string) $message;\n        $seconds    = (int) $seconds;\n\n        echo '<script type=\"text/javascript\">\n                Messenger().post({\n                    type: \"info\",\n                    message : \"'.$message.'\",\n                    hideAfter: '.$seconds.'\n                });\n             </script>';\n    }\n\n    /**\n     * Show error message\n     *\n     *  <code>\n     *      Alert::error('Message here...');\n     *  </code>\n     *\n     * @param string  $message Message\n     * @param integer $seconds Seconds\n     */\n    public static function error($message, $seconds = 3)\n    {\n        // Redefine vars\n        $message = (string) $message;\n        $seconds    = (int) $seconds;\n\n        echo '<script type=\"text/javascript\">\n                Messenger().post({\n                    type: \"error\",\n                    message : \"'.$message.'\",\n                    hideAfter: '.$seconds.'\n                });\n             </script>';\n    }\n}\n"
  },
  {
    "path": "engine/Monstra.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Monstra\n{\n    /**\n     * An instance of the Monstra class\n     *\n     * @var core\n     */\n    protected static $instance = null;\n\n    /**\n     * Common environment type constants for consistency and convenience\n     */\n    const PRODUCTION  = 1;\n    const STAGING     = 2;\n    const TESTING     = 3;\n    const DEVELOPMENT = 4;\n\n    /**\n     * The version of Monstra\n     */\n    const VERSION = '3.0.4';\n\n\n    /**\n     * Monstra environment\n     *\n     * @var string\n     */\n    public static $environment = Monstra::PRODUCTION;\n\n    /**\n     * Monstra environment names\n     *\n     * @var array\n     */\n    public static $environment_names = array(\n        Monstra::PRODUCTION  => 'production',\n        Monstra::STAGING     => 'staging',\n        Monstra::TESTING     => 'testing',\n        Monstra::DEVELOPMENT => 'development',\n    );\n\n    /**\n     * Protected clone method to enforce singleton behavior.\n     *\n     * @access  protected\n     */\n    protected function __clone()\n    {\n        // Nothing here.\n    }\n\n    /**\n     * Protected Construct\n     */\n    protected function __construct()\n    {\n        /**\n         * Load core defines\n         */\n        Monstra::loadDefines();\n\n        /**\n         * Compress HTML with gzip\n         */\n        if (MONSTRA_GZIP) {\n            if (! ob_start(\"ob_gzhandler\")) {\n                ob_start();\n            }\n        } else {\n            ob_start();\n        }\n\n        /**\n         * Send default header and set internal encoding\n         */\n        header('Content-Type: text/html; charset=UTF-8');\n        function_exists('mb_language') and mb_language('uni');\n        function_exists('mb_regex_encoding') and mb_regex_encoding('UTF-8');\n        function_exists('mb_internal_encoding') and mb_internal_encoding('UTF-8');\n\n        /**\n         * Gets the current configuration setting of magic_quotes_gpc\n         * and kill magic quotes\n         */\n        if (get_magic_quotes_gpc()) {\n            function stripslashesGPC(&$value)\n            {\n                $value = stripslashes($value);\n            }\n            array_walk_recursive($_GET, 'stripslashesGPC');\n            array_walk_recursive($_POST, 'stripslashesGPC');\n            array_walk_recursive($_COOKIE, 'stripslashesGPC');\n            array_walk_recursive($_REQUEST, 'stripslashesGPC');\n        }\n\n        /**\n         * Set Gelato Display Errors to False for Production environment.\n         */\n        if (Monstra::$environment == Monstra::PRODUCTION) {\n            define('GELATO_DEVELOPMENT', false);\n        }\n\n        /**\n         * Define Monstra Folder for Gelato Logs\n         */\n        define('GELATO_LOGS_PATH', LOGS);\n\n        /**\n         * Include Gelato Library\n         */\n        include ROOT . DS . 'libraries'. DS .'Gelato'. DS .'Gelato.php';\n\n        /**\n         * Map Monstra Engine Directory\n         */\n        ClassLoader::directory(ROOT . DS . 'engine' . DS);\n\n        /**\n         * Map all Monstra Classes\n         */\n        ClassLoader::mapClasses(array(\n\n            // Site Modules\n            'Security'  => ROOT . DS .'engine'. DS .'Security.php',\n            'Uri'       => ROOT . DS .'engine'. DS .'Uri.php',\n            'Site'      => ROOT . DS .'engine'. DS .'Site.php',\n            'Alert'     => ROOT . DS .'engine'. DS .'Alert.php',\n\n            // XMLDB API\n            'XML'       => ROOT . DS .'engine'. DS .'Xmldb'. DS .'XML.php',\n            'DB'        => ROOT . DS .'engine'. DS .'Xmldb'. DS .'DB.php',\n            'Table'     => ROOT . DS .'engine'. DS .'Xmldb'. DS .'Table.php',\n\n            // Plugin API\n            'Plugin'     => ROOT . DS .'engine'. DS .'Plugin'. DS .'Plugin.php',\n            'Frontend'   => ROOT . DS .'engine'. DS .'Plugin'. DS .'Frontend.php',\n            'Backend'    => ROOT . DS .'engine'. DS .'Plugin'. DS .'Backend.php',\n            'Action'     => ROOT . DS .'engine'. DS .'Plugin'. DS .'Action.php',\n            'Filter'     => ROOT . DS .'engine'. DS .'Plugin'. DS .'Filter.php',\n            'View'       => ROOT . DS .'engine'. DS .'Plugin'. DS .'View.php',\n            'I18n'       => ROOT . DS .'engine'. DS .'Plugin'. DS .'I18n.php',\n            'Stylesheet' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Stylesheet.php',\n            'Javascript' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Javascript.php',\n            'Navigation' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Navigation.php',\n\n            // Option API\n            'Option'    => ROOT . DS .'engine'. DS .'Option.php',\n\n            // Shortcode API\n            'Shortcode' => ROOT . DS .'engine'. DS .'Shortcode.php',\n\n            // Idiorm\n            'ORM'       => ROOT . DS .'libraries'. DS . 'Idiorm'. DS .'ORM.php',\n\n            // PHPMailer\n            'PHPMailer' => ROOT . DS .'libraries'. DS . 'PHPMailer'. DS .'PHPMailer.php',\n        ));\n\n        /**\n         *  Start session\n         */\n        Session::start();\n\n        /**\n         * Init Idiorm\n         */\n        if (defined('MONSTRA_DB_DSN')) {\n            ORM::configure(MONSTRA_DB_DSN);\n            ORM::configure('username', MONSTRA_DB_USER);\n            ORM::configure('password',  MONSTRA_DB_PASSWORD);\n            ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n        }\n\n        /**\n         * Auto cleanup if DEVELOPMENT environment\n         */\n        if (Monstra::$environment == Monstra::DEVELOPMENT) {\n            Monstra::cleanTmp();\n        }\n\n        /**\n         * Set Cache dir\n         */\n        Cache::configure('cache_dir', CACHE);\n\n        /**\n         * Init Options API module\n         */\n        Option::init();\n\n        /**\n         * Set default timezone\n         */\n        @ini_set('date.timezone', Option::get('timezone'));\n        if (function_exists('date_default_timezone_set')) {\n            date_default_timezone_set(Option::get('timezone'));\n        } else {\n            putenv('TZ='.Option::get('timezone'));\n        }\n\n        /**\n         * Sanitize URL to prevent XSS - Cross-site scripting\n         */\n        Security::runSanitizeURL();\n\n        /**\n         * Load default\n         */\n        Monstra::loadPluggable();\n\n        /**\n         * Init I18n\n         */\n        I18n::init(Option::get('language'));\n\n        /**\n         * Init Plugins API\n         */\n        Plugin::init();\n\n        /**\n         * Init Notification service\n         */\n        Notification::init();\n\n        /**\n         * Init site module\n         */\n        if (! BACKEND) {\n            Site::init();\n        }\n    }\n\n    /**\n     * Load Defines\n     */\n    protected static function loadDefines()\n    {\n        $root_defines         = ROOT . DS . 'boot' . DS . 'defines.php';\n        $environment_defines  = ROOT . DS . 'boot' . DS . Monstra::$environment_names[Monstra::$environment] . DS . 'defines.php';\n        $monstra_defines      = ROOT . DS . 'engine' . DS . 'boot' . DS . 'defines.php';\n\n        if (file_exists($root_defines)) {\n            include $root_defines;\n        } elseif (file_exists($environment_defines)) {\n            include $environment_defines;\n        } elseif (file_exists($monstra_defines)) {\n            include $monstra_defines;\n        } else {\n            throw new RuntimeException(\"The defines file does not exist.\");\n        }\n    }\n\n    /**\n     * Load Pluggable\n     */\n    protected static function loadPluggable()\n    {\n        $root_pluggable         = ROOT . DS . 'boot';\n        $environment_pluggable  = ROOT . DS . 'boot' . DS . Monstra::$environment_names[Monstra::$environment];\n        $monstra_pluggable      = ROOT . DS . 'engine' . DS . 'boot';\n\n        if (file_exists($root_pluggable . DS . 'filters.php')) {\n            include $root_pluggable . DS . 'filters.php';\n        } elseif (file_exists($environment_pluggable . DS . 'filters.php')) {\n            include $environment_pluggable . DS . 'filters.php';\n        } elseif (file_exists($monstra_pluggable . DS . 'filters.php')) {\n            include $monstra_pluggable . DS . 'filters.php';\n        } else {\n            throw new RuntimeException(\"The pluggable filters.php file does not exist.\");\n        }\n\n        if (file_exists($root_pluggable . DS . 'actions.php')) {\n            include $root_pluggable . DS . 'actions.php';\n        } elseif (file_exists($environment_pluggable . DS . 'actions.php')) {\n            include $environment_pluggable . DS . 'actions.php';\n        } elseif (file_exists($monstra_pluggable . DS . 'actions.php')) {\n            include $monstra_pluggable . DS . 'actions.php';\n        } else {\n            throw new RuntimeException(\"The pluggable actions.php file does not exist.\");\n        }\n\n        if (file_exists($root_pluggable . DS . 'shortcodes.php')) {\n            include $root_pluggable . DS . 'shortcodes.php';\n        } elseif (file_exists($environment_pluggable . DS . 'shortcodes.php')) {\n            include $environment_pluggable . DS . 'shortcodes.php';\n        } elseif (file_exists($monstra_pluggable . DS . 'shortcodes.php')) {\n            include $monstra_pluggable . DS . 'shortcodes.php';\n        } else {\n            throw new RuntimeException(\"The pluggable shortcodes.php file does not exist.\");\n        }\n    }\n\n    /**\n     * Clean Monstra TMP folder.\n     */\n    public static function cleanTmp()\n    {\n        // Cleanup minify\n        if (count($files = File::scan(MINIFY, array('css', 'js', 'php'))) > 0) {\n            foreach ($files as $file) {\n                File::delete(MINIFY . DS . $file);\n            }\n        }\n\n        // Cleanup cache\n        if (count($namespaces = Dir::scan(CACHE)) > 0) {\n            foreach ($namespaces as $namespace) {\n                Dir::delete(CACHE . DS . $namespace);\n            }\n        }\n    }\n\n    /**\n     * Initialize Monstra Engine\n     *\n     * @return Monstra\n     */\n    public static function init()\n    {\n        if (! isset(self::$instance)) {\n            self::$instance = new Monstra();\n        }\n        return self::$instance;\n    }\n}\n"
  },
  {
    "path": "engine/Option.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Option\n{\n    /**\n     * Options\n     *\n     * @var array\n     */\n    protected static $options = null;\n\n    /**\n     * An instance of the Option class\n     *\n     * @var option\n     */\n    protected static $instance = null;\n\n    /**\n     * Initializing options\n     *\n     * @param string $name Options file\n     */\n    public static function init()\n    {\n        if (! isset(self::$instance)) {\n            self::$instance = new Option();\n        }\n        return self::$instance;\n    }\n\n    /**\n     * Protected clone method to enforce singleton behavior.\n     *\n     * @access  protected\n     */\n    protected function __clone()\n    {\n        // Nothing here.\n    }\n\n    /**\n     *  Construct\n     */\n    protected function __construct()\n    {\n        Option::$options = new Table('options');\n    }\n\n    /**\n     * Add a new option\n     *\n     *  <code>\n     *      Option::add('pages_limit', 10);\n     *      Option::add(array('pages_count' => 10, 'pages_default' => 'home'));\n     *  </code>\n     *\n     * @param  mixed   $option Name of option to add.\n     * @param  mixed   $value  Option value.\n     * @return boolean\n     */\n    public static function add($option, $value = null)\n    {\n        if (is_array($option)) {\n            foreach ($option as $k => $v) {\n                $_option = Option::$options->select('[name=\"'.$k.'\"]', null);\n                if (count($_option) == 0) {\n                    Option::$options->insert(array('name' => $k, 'value' => $v));\n                }\n            }\n        } else {\n            $_option = Option::$options->select('[name=\"'.$option.'\"]', null);\n            if (count($_option) == 0) {\n                return Option::$options->insert(array('name' => $option, 'value' => $value));\n            }\n        }\n    }\n\n    /**\n     * Update option value\n     *\n     *  <code>\n     *      Option::update('pages_limit', 12);\n     *      Option::update(array('pages_count' => 10, 'pages_default' => 'home'));\n     *  </code>\n     *\n     * @param  mixed   $option Name of option to update.\n     * @param  mixed   $value  Option value.\n     * @return boolean\n     */\n    public static function update($option, $value = null)\n    {\n        if (is_array($option)) {\n            foreach ($option as $k => $v) {\n                Option::$options->updateWhere('[name=\"'.$k.'\"]', array('value' => $v));\n            }\n        } else {\n            return Option::$options->updateWhere('[name=\"'.$option.'\"]', array('value' => $value));\n        }\n    }\n\n    /**\n     * Get option value\n     *\n     *  <code>\n     *      $pages_limit = Option::get('pages_limit');\n     *      if ($pages_limit == '10') {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param  string $option Name of option to get.\n     * @return string\n     */\n    public static function get($option)\n    {\n        // Redefine vars\n        $option = (string) $option;\n\n        // Select specific option\n        $option_name = Option::$options->select('[name=\"'.$option.'\"]', null);\n\n        // Return specific option value\n        return isset($option_name['value']) ? $option_name['value'] : '';\n    }\n\n    /**\n     * Delete option\n     *\n     *  <code>\n     *      Option::delete('pages_limit');\n     *  </code>\n     *\n     * @param  string  $option Name of option to delete.\n     * @return boolean\n     */\n    public static function delete($option)\n    {\n        // Redefine vars\n        $option = (string) $option;\n\n        // Delete specific option\n        return Option::$options->deleteWhere('[name=\"'.$option.'\"]');\n    }\n\n    /**\n     * Check if option exist\n     *\n     *  <code>\n     *      if (Option::exists('pages_limit')) {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param  string  $option Name of option to check.\n     * @return boolean\n     */\n    public static function exists($option)\n    {\n        // Redefine vars\n        $option = (string) $option;\n\n        // Check if option exists\n        return (count(Option::$options->select('[name=\"'.$option.'\"]', null)) > 0) ? true : false;\n    }\n}\n"
  },
  {
    "path": "engine/Plugin/Action.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Action\n{\n    /**\n     * Actions\n     *\n     * @var array\n     */\n    public static $actions = array();\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     *  Hooks a function on to a specific action.\n     *\n     *  <code>\n     *      // Hooks a function \"newLink\" on to a \"footer\" action.\n     *      Action::add('footer', 'newLink', 10);\n     *\n     *      function newLink() {\n     *          echo '<a href=\"#\">My link</a>';\n     *      }\n     *  </code>\n     *\n     * @param string  $action_name    Action name\n     * @param mixed   $added_function Added function\n     * @param integer $priority       Priority. Default is 10\n     * @param array   $args           Arguments\n     */\n    public static function add($action_name, $added_function, $priority = 10, array $args = null)\n    {\n        // Hooks a function on to a specific action.\n        Action::$actions[] = array(\n                        'action_name' => (string) $action_name,\n                        'function'    => $added_function,\n                        'priority'    => (int) $priority,\n                        'args'        => $args\n        );\n    }\n\n    /**\n     * Run functions hooked on a specific action hook.\n     *\n     *  <code>\n     *      // Run functions hooked on a \"footer\" action hook.\n     *      Action::run('footer');\n     *  </code>\n     *\n     * @param  string  $action_name Action name\n     * @param  array   $args        Arguments\n     * @param  boolean $return      Return data or not. Default is false\n     * @return mixed\n     */\n    public static function run($action_name, $args = array(), $return = false)\n    {\n        // Redefine arguments\n        $action_name = (string) $action_name;\n        $return      = (bool) $return;\n\n        // Run action\n        if (count(Action::$actions) > 0) {\n\n            // Sort actions by priority\n            $actions = Arr::subvalSort(Action::$actions, 'priority');\n\n            // Loop through $actions array\n            foreach ($actions as $action) {\n\n                // Execute specific action\n                if ($action['action_name'] == $action_name) {\n\n                    // isset arguments ?\n                    if (isset($args)) {\n\n                        // Return or Render specific action results ?\n                        if ($return) {\n                            return call_user_func_array($action['function'], $args);\n                        } else {\n                            call_user_func_array($action['function'], $args);\n                        }\n                    } else {\n                        if ($return) {\n                            return call_user_func_array($action['function'], $action['args']);\n                        } else {\n                            call_user_func_array($action['function'], $action['args']);\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "engine/Plugin/Backend.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Backend\n{\n    public static function main()\n    {\n    }\n}\n"
  },
  {
    "path": "engine/Plugin/Filter.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Filter\n{\n    /**\n     * Filters\n     *\n     * @var array\n     */\n    public static $filters = array();\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Apply filters\n     *\n     *  <code>\n     *      Filter::apply('content', $content);\n     *  </code>\n     *\n     * @param  string $filter_name The name of the filter hook.\n     * @param  mixed  $value       The value on which the filters hooked.\n     * @return mixed\n     */\n    public static function apply($filter_name, $value)\n    {\n        // Redefine arguments\n        $filter_name = (string) $filter_name;\n\n        $args = array_slice(func_get_args(), 2);\n\n        if (! isset(Filter::$filters[$filter_name])) {\n            return $value;\n        }\n\n        foreach (Filter::$filters[$filter_name] as $priority => $functions) {\n            if (! is_null($functions)) {\n                foreach ($functions as $function) {\n                    $all_args = array_merge(array($value), $args);\n                    $function_name = $function['function'];\n                    $accepted_args = $function['accepted_args'];\n                    if ($accepted_args == 1) {\n                        $the_args = array($value);\n                    } elseif ($accepted_args > 1) {\n                        $the_args = array_slice($all_args, 0, $accepted_args);\n                    } elseif ($accepted_args == 0) {\n                        $the_args = null;\n                    } else {\n                        $the_args = $all_args;\n                    }\n                    $value = call_user_func_array($function_name, $the_args);\n                }\n            }\n        }\n\n        return $value;\n    }\n\n    /**\n     * Add filter\n     *\n     *  <code>\n     *      Filter::add('content', 'replacer');\n     *\n     *      function replacer($content) {\n     *          return preg_replace(array('/\\[b\\](.*?)\\[\\/b\\]/ms'), array('<strong>\\1</strong>'), $content);\n     *      }\n     *  </code>\n     *\n     * @param  string  $filter_name     The name of the filter to hook the $function_to_add to.\n     * @param  mixed   $function_to_add The name of the function to be called when the filter is applied.\n     * @param  integer $priority        Function to add priority - default is 10.\n     * @param  integer $accepted_args   The number of arguments the function accept default is 1.\n     * @return boolean\n     */\n    public static function add($filter_name, $function_to_add, $priority = 10, $accepted_args = 1)\n    {\n        // Redefine arguments\n        $filter_name     = (string) $filter_name;\n        $function_to_add = $function_to_add;\n        $priority        = (int) $priority;\n        $accepted_args   = (int) $accepted_args;\n\n        // Check that we don't already have the same filter at the same priority. Thanks to WP :)\n        if (isset(Filter::$filters[$filter_name][\"$priority\"])) {\n            foreach (Filter::$filters[$filter_name][\"$priority\"] as $filter) {\n                if ($filter['function'] == $function_to_add) {\n                    return true;\n                }\n            }\n        }\n\n        Filter::$filters[$filter_name][\"$priority\"][] = array('function' => $function_to_add, 'accepted_args' => $accepted_args);\n\n        // Sort\n        ksort(Filter::$filters[$filter_name][\"$priority\"]);\n\n        return true;\n    }\n}\n"
  },
  {
    "path": "engine/Plugin/Frontend.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Frontend\n{\n    public static function main()\n    {\n    }\n    public static function title()\n    {\n        return '';\n    }\n    public static function description()\n    {\n        return '';\n    }\n    public static function keywords()\n    {\n        return '';\n    }\n    public static function template()\n    {\n        return 'index';\n    }\n    public static function content()\n    {\n        return '';\n    }\n}\n"
  },
  {
    "path": "engine/Plugin/I18n.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass I18n\n{\n    /**\n     * Locales array\n     *\n     * @var array\n     */\n    public static $locales = array(\n        'ar' => 'العربية',\n        'bg' => 'Български',\n        'ca' => 'Català',\n        'cs' => 'Česky',\n        'da' => 'Dansk',\n        'de' => 'Deutsch',\n        'el' => 'Ελληνικά',\n        'en' => 'English',\n        'es' => 'Español',\n        'fa' => 'Farsi',\n        'fi' => 'Suomi',\n        'fr' => 'Français',\n        'gl' => 'Galego',\n        'ka-ge' => 'Georgian',\n        'hu' => 'Magyar',\n        'it' => 'Italiano',\n        'id' => 'Bahasa Indonesia',\n        'ja' => '日本語',\n        'lt' => 'Lietuvių',\n        'nl' => 'Nederlands',\n        'no' => 'Norsk',\n        'pl' => 'Polski',\n        'pt' => 'Português',\n        'pt-br' => 'Português do Brasil',\n        'ru' => 'Русский',\n        'sk' => 'Slovenčina',\n        'sl' => 'Slovenščina',\n        'sv' => 'Svenska',\n        'sr' => 'Srpski',\n        'tr' => 'Türkçe',\n        'uk' => 'Українська',\n        'zh-cn' => '简体中文',\n    );\n\n    /**\n     * Dictionary\n     *\n     * @var array\n     */\n    public static $dictionary = array();\n\n    /**\n     * An instance of the I18n class\n     *\n     * @var I18n\n     */\n    protected static $instance = null;\n\n    /**\n     * Initializing I18n\n     *\n     * @param string $dir Plugins directory\n     */\n    public static function init($locale)\n    {\n        if (! isset(self::$instance)) {\n            self::$instance = new I18n($locale);\n        }\n        return self::$instance;\n    }\n\n    /**\n     * Protected clone method to enforce singleton behavior.\n     *\n     * @access  protected\n     */\n    protected function __clone()\n    {\n        // Nothing here.\n    }\n\n    /**\n     * Construct\n     */\n    protected function __construct($locale)\n    {\n        // Redefine arguments\n        $locale = (string) $locale;\n\n        // Get lang table for current locale\n        $lang_table = Cache::get('i18n', $locale);\n\n        // If lang_table is empty then create new\n        if (! $lang_table) {\n\n            // Get plugins Table\n            $plugins = new Table('plugins');\n\n            // Get all plugins\n            $records = $plugins->select(null, 'all', null, array('location', 'priority'), 'priority', 'ASC');\n\n            // Init var\n            $lang_table = array();\n\n            // Loop through each installed plugin\n            foreach ($records as $record) {\n                if (is_dir(ROOT . DS . dirname($record['location']) . DS . 'languages')) {\n\n                    // Init var\n                    $t = array();\n\n                    // Check lang file\n                    if (file_exists(ROOT . DS . dirname($record['location']) . DS . 'languages' . DS . $locale . '.lang.php')) {\n\n                        // Merge the language strings into the sub table\n                        $t = array_merge($t, include ROOT . DS . dirname($record['location']) . DS . 'languages' . DS . $locale . '.lang.php');\n                    }\n\n                    // Append the sub table, preventing less specific language files from overloading more specific files\n                    $lang_table += $t;\n                }\n            }\n\n            // Save lang table for current locale\n            Cache::put('i18n', $locale, $lang_table);\n\n            // Update dictionary\n            I18n::$dictionary = $lang_table;\n        }\n\n        // Update dictionary\n        I18n::$dictionary = $lang_table;\n    }\n\n    /**\n     * Returns translation of a string. If no translation exists, the original\n     * string will be returned. No parameters are replaced.\n     *\n     *  <code>\n     *      $hello = I18n::find('Hello friends, my name is :name', 'namespace');\n     *  <code>\n     *\n     * @param  string $string    Text to translate\n     * @param  string $namespace Namespace\n     * @return string\n     */\n    public static function find($string, $namespace = null)\n    {\n        // Redefine arguments\n        $string = (string) $string;\n\n        // Return string\n        if (isset(I18n::$dictionary[$namespace][$string])) {\n            return I18n::$dictionary[$namespace][$string];\n        } else {\n            return $string;\n        }\n    }\n}\n\n/**\n * Global Translation/internationalization function.\n * Accepts an English string and returns its translation\n * to the active system language. If the given string is not available in the\n * current dictionary the original English string will be returned.\n *\n *  <code>\n *      // Display a translated message\n *      echo __('Hello, world', 'namespace');\n *\n *      // With parameter replacement\n *      echo __('Hello, :user', 'namespace', array(':user' => $username));\n *  </code>\n *\n * @global array  $dictionary Dictionary\n * @param  string $string    String to translate\n * @param  array  $values    Values to replace in the translated text\n * @param  string $namespace Namespace\n * @return string\n */\nfunction __($string, $namespace = null, array $values = null)\n{\n    // Redefine arguments\n    $string = (string) $string;\n\n    // Find string in dictionary\n    $string = I18n::find($string, $namespace);\n\n    // Return string\n    return empty($values) ? $string : strtr($string, $values);\n}\n"
  },
  {
    "path": "engine/Plugin/Javascript.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Javascript\n{\n    /**\n     * Javascripts\n     *\n     * @var array\n     */\n    public static $javascripts = array();\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Add javascript\n     *\n     *  <code>\n     *      Javascript::add('path/to/my/script1.js');\n     *      Javascript::add('path/to/my/script2.js', 'frontend', 11);\n     *      Javascript::add('path/to/my/script3.js', 'backend', 12);\n     *  <code>\n     *\n     * @param string  $file     File path\n     * @param string  $load     Load script on frontend, backend or both\n     * @param inteeer $priority Priority default is 10\n     */\n    public static function add($file, $load = 'frontend', $priority = 10)\n    {\n        Javascript::$javascripts[] = array(\n            'file'     => (string) $file,\n            'load'     => (string) $load,\n            'priority' => (int) $priority,\n        );\n    }\n\n    /**\n     *  Combine and load site javascript\n     */\n    public static function load()\n    {\n        $backend_site_js_path  = MINIFY . DS . 'backend_site.minify.js';\n        $frontend_site_js_path = MINIFY . DS . 'frontend_site.minify.'.Option::get('javascript_version').'.js';\n\n        // Load javascripts\n        if (count(Javascript::$javascripts) > 0) {\n            $backend_buffer = '';\n            $backend_regenerate = false;\n\n            $frontend_buffer = '';\n            $frontend_regenerate = false;\n\n            // Sort javascripts by priority\n            $javascripts = Arr::subvalSort(Javascript::$javascripts, 'priority');\n\n            if (BACKEND) {\n\n                // Build backend site javascript\n                foreach ($javascripts as $javascript) {\n                    if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both'))) {\n                        if (! file_exists($backend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($backend_site_js_path)) {\n                            $backend_regenerate = true;\n                            break;\n                        }\n                    }\n                }\n\n                // Regenerate site javascript\n                if ($backend_regenerate) {\n                    foreach ($javascripts as $javascript) {\n                        if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both'))) {\n                            $backend_buffer .= file_get_contents(ROOT . DS . $javascript['file']).\"\\n\";\n                        }\n                    }\n                    file_put_contents($backend_site_js_path, $backend_buffer);\n                    $backend_regenerate = false;\n                }\n            } else {\n\n                // Build frontend site javascript\n                foreach ($javascripts as $javascript) {\n                    if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both'))) {\n                        if (! file_exists($frontend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($frontend_site_js_path)) {\n                            $frontend_regenerate = true;\n                            break;\n                        }\n                    }\n                }\n\n                // Regenerate site javascript\n                if ($frontend_regenerate) {\n                    foreach ($javascripts as $javascript) {\n                        if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both'))) {\n                            $frontend_buffer .= file_get_contents(ROOT . DS . $javascript['file']).\"\\n\";\n                        }\n                    }\n                    file_put_contents($frontend_site_js_path, $frontend_buffer);\n                    $frontend_regenerate = false;\n                }\n            }\n\n            // Render\n            if (BACKEND) {\n                echo '<script type=\"text/javascript\" src=\"'.Option::get('siteurl').'/tmp/minify/backend_site.minify.js?'.Option::get('javascript_version').'\"></script>';\n            } else {\n                echo '<script type=\"text/javascript\" src=\"'.Option::get('siteurl').'/tmp/minify/frontend_site.minify.'.Option::get('javascript_version').'.js\"></script>'.\"\\n\";\n            }\n        }\n    }\n\n    /**\n     *  javascriptVersionIncrement\n     */\n    public static function javascriptVersionIncrement()\n    {\n        Option::update('javascript_version', (int) Option::get('javascript_version') + 1);\n    }\n}\n"
  },
  {
    "path": "engine/Plugin/Navigation.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Navigation\n{\n    /**\n     * Items\n     *\n     * @var array\n     */\n    public static $items = array();\n\n    /**\n     * Navigation types\n     */\n    const LEFT = 1;\n    const TOP  = 2;\n\n    /**\n     * Add new item\n     *\n     *  <code>\n     *      // Add link for left navigation\n     *      Navigation::add(__('Blog'), 'content', 'blog', 11);\n     *\n     *      // Add link for top navigation\n     *      Navigation::add(__('View site'), 'top', 'http://site.com/', 11, Navigation::TOP, true);\n     *  <code>\n     *\n     * @param string  $name     Name\n     * @param string  $category Category\n     * @param stirng  $link     Link\n     * @param integer $priority Priority. Default is 10\n     * @param integer $type     Type. Default is LEFT\n     * @param bool    $external External or not. Default is false\n     */\n    public static function add($name, $category, $id, $priority = 10, $type = Navigation::LEFT, $external = false)\n    {\n        Navigation::$items[] = array(\n            'name'      => (string) $name,\n            'category'  => (string) $category,\n            'id'        => (string) $id,\n            'priority'  => (int) $priority,\n            'type'      => (int) $type,\n            'external'  => (bool) $external,\n        );\n    }\n\n    /**\n     * Draw items\n     *\n     *  <code>\n     *      Navigation::draw('content');\n     *      Navigation::draw('top', Navigation::TOP);\n     *  <code>\n     *\n     * @param string  $category Category\n     * @param integer $type     Type. Default is LEFT\n     */\n    public static function draw($category, $type = Navigation::LEFT)\n    {\n        // Sort items by priority\n        $items = Arr::subvalSort(Navigation::$items, 'priority');\n\n        // Draw left navigation\n        if ($type == Navigation::LEFT) {\n\n            // Loop trough the items\n            foreach ($items as $item) {\n\n                // If current plugin id == selected item id then set class to current\n                if (Request::get('id') == $item['id'] && $item['external'] == false) {\n                    $class = 'class = \"current\" ';\n                } else {\n                    $class = '';\n                }\n\n                // If current category == item category and navigation type is left them draw this item\n                if ($item['category'] == $category && $item['type'] == Navigation::LEFT) {\n\n                    // Is external item id or not ?\n                    if ($item['external'] == false) {\n                        echo '<li><a '.$class.'href=\"index.php?id='.$item['id'].'\">'.$item['name'].'</a></li>';\n                    } else {\n                        echo '<li><a target=\"_blank\" href=\"'.$item['id'].'\">'.$item['name'].'</a></li>';\n                    }\n                }\n            }\n        } elseif ($type == Navigation::TOP) {\n            // Draw top navigation\n            foreach ($items as $item) {\n                if ($item['category'] == $category && $item['type'] == Navigation::TOP) {\n                    if ($item['external'] == false) {\n                        echo '<a class=\"btn btn-small btn-inverse\" href=\"index.php?id='.$item['id'].'\">'.$item['name'].'</a>'.Html::nbsp(2);\n                    } else {\n                        echo '<a target=\"_blank\" class=\"btn btn-small btn-inverse\" href=\"'.$item['id'].'\">'.$item['name'].'</a>'.Html::nbsp(2);\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * Draw items\n     *\n     *  <code>\n     *      Navigation::draw('content');\n     *      Navigation::draw('top', Navigation::TOP);\n     *  <code>\n     *\n     * @param string  $category Category\n     * @param integer $type     Type. Default is LEFT\n     */\n    public static function get($category, $type = Navigation::LEFT)\n    {\n        // Sort items by priority\n        $items = Arr::subvalSort(Navigation::$items, 'priority');\n\n        // Draw left navigation\n        if ($type == Navigation::LEFT) {\n\n            // Loop trough the items\n            foreach ($items as $item) {\n\n                // If current plugin id == selected item id then set class to current\n                if (Request::get('id') == $item['id'] && $item['external'] == false) {\n                    $class = 'class = \"current\" ';\n                } else {\n                    $class = '';\n                }\n\n                // If current category == item category and navigation type is left them draw this item\n                if ($item['category'] == $category && $item['type'] == Navigation::LEFT) {\n\n                    // Is external item id or not ?\n                    if ($item['external'] == false) {\n                        echo '<li><a '.$class.'href=\"index.php?id='.$item['id'].'\">'.$item['name'].'</a></li>';\n                    } else {\n                        echo '<li><a target=\"_blank\" href=\"'.$item['id'].'\">'.$item['name'].'</a></li>';\n                    }\n                }\n            }\n        } elseif ($type == Navigation::TOP) {\n            // Draw top navigation\n            foreach ($items as $item) {\n                if ($item['category'] == $category && $item['type'] == Navigation::TOP) {\n                    if ($item['external'] == false) {\n                        echo '<a class=\"btn btn-small btn-inverse\" href=\"index.php?id='.$item['id'].'\">'.$item['name'].'</a>'.Html::nbsp(2);\n                    } else {\n                        echo '<a target=\"_blank\" class=\"btn btn-small btn-inverse\" href=\"'.$item['id'].'\">'.$item['name'].'</a>'.Html::nbsp(2);\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * Draw dropdown items\n     *\n     *  <code>\n     *      Navigation::getDropdown('content');\n     *  <code>\n     *\n     * @param string $category Category\n     */\n    public static function getDropdown($category)\n    {\n        // Sort items by priority\n        $items = Arr::subvalSort(Navigation::$items, 'priority');\n\n        // Loop trough the items\n        foreach ($items as $item) {\n\n            // If current plugin id == selected item id then set class to current\n            if (Request::get('id') == $item['id'] && $item['external'] == false) {\n                $class = 'selected = \"selected\" ';\n            } else {\n                $class = '';\n            }\n\n            // If current category == item category and navigation type is left them draw this item\n            if ($item['category'] == $category && $item['type'] == Navigation::LEFT) {\n\n                // Is external item id or not ?\n                if ($item['external'] == false) {\n                    echo '<option '.$class.'rel=\"index.php?id='.$item['id'].'\">'.$item['name'].'</option>';\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "engine/Plugin/Plugin.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Plugin\n{\n    /**\n     * Plugins\n     *\n     * @var array\n     */\n    public static $plugins = array();\n\n    /**\n     * Components\n     *\n     * @var array\n     */\n    public static $components = array();\n\n    /**\n     * An instance of the Plugin class\n     *\n     * @var plugin\n     */\n    protected static $instance = null;\n\n    /**\n     * Initializing plugins\n     *\n     * @return Plugin\n     */\n    public static function init()\n    {\n        if (! isset(self::$instance)) {\n            self::$instance = new Plugin();\n        }\n        return self::$instance;\n    }\n\n    /**\n     * Protected clone method to enforce singleton behavior.\n     *\n     * @access  protected\n     */\n    protected function __clone()\n    {\n        // Nothing here.\n    }\n\n    /**\n     * Construct\n     */\n    protected function __construct()\n    {\n        // Get plugins Table\n        $plugins = new Table('plugins');\n\n        // Select all plugins\n        $records = $plugins->select(null, 'all', null, array('location', 'status', 'priority'), 'priority', 'ASC');\n\n        // Now include plugins from $records plugins array\n        // If plugin is active then load it to the system.\n        foreach ($records as $record) {\n            if ($record['status'] == 'active') {\n                include_once ROOT . DS . $record['location'];\n            }\n        }\n    }\n\n    /**\n     * Get plugin admin\n     *\n     *  <code>\n     *      // Get admin for Blog plugin\n     *      Plugin::admin('blog');\n     *  </code>\n     *\n     * @param string $plug       Plugin Name\n     * @param string $alt_folder Alternative plugin folder\n     */\n    public static function admin($plug, $alt_folder = null)\n    {\n        // Redefine arguments\n        $plug = (string) $plug;\n\n        // Plugin admin extension\n        $ext = '.admin.php';\n\n        // Plugin admin can be loaded only in backend\n        if (BACKEND) {\n\n            // Plugin admin folder\n            if (! empty($alt_folder)) {\n                $folder = $alt_folder . DS . strtolower($plug);\n            } else {\n                $folder = strtolower($plug);\n            }\n\n            // Path to plugin admin file\n            $path = PLUGINS . DS . $folder . DS . $plug . $ext;\n\n            // Load plugin admin\n            if (File::exists($path)) {\n                include $path;\n            }\n        }\n    }\n\n    /**\n     * Register new plugin in system\n     *\n     *  <code>\n     *      // Register plugin\n     *      Plugin::register( __FILE__,\n     *                        __('Blog'),\n     *                        __('Blog plugin'),\n     *                        '1.0.0',\n     *                        'Awilum',\n     *                        'http://example.org/',\n     *                        'blog');\n     *  </code>\n     *\n     * @param string  $file        Plugin file\n     * @param string  $title       Plugin title\n     * @param string  $description Plugin description\n     * @param string  $version     Plugin version\n     * @param string  $author      Plugin author\n     * @param string  $author_uri  Plugin author uri\n     * @param string  $component   Plugin as component\n     * @param boolean $box         Plugin as box\n     */\n    public static function register($file, $title, $description = null, $version = null, $author = null, $author_uri = null, $component = null, $box = false)\n    {\n        // Redefine arguments\n        $file            = (string) $file;\n        $title           = (string) $title;\n        $description     = ($description === null)    ? null : (string) $description;\n        $version         = ($version === null)        ? null : (string) $version;\n        $author          = ($author === null)         ? null : (string) $author;\n        $author_uri      = ($author_uri === null)     ? null : (string) $author_uri;\n        $component       = ($component === null)      ? null : (string) $component;\n        $box             = (bool) $box;\n\n        // Get plugin id from name.plugin.php\n        $id = strtolower(basename($file, '.plugin.php'));\n\n        // Set plugin privilege 'box' if $box is true\n        if ($box) {\n            $privilege = 'box';\n        } else {\n            $privilege = '';\n        }\n\n        // Register plugin in global plugins array.\n        Plugin::$plugins[$id] = array(\n          'id'              => $id,\n          'title'           => $title,\n          'privilege'       => $privilege,\n          'version'         => $version,\n          'description'     => $description,\n          'author'          => $author,\n          'author_uri'      => $author_uri,\n        );\n\n        // Add plugin as a component\n        // Plugin - component will be available at the link sitename/component_name\n        // Example:\n        //    www.example.org/guestbook\n        //    www.example.org/news\n        if (! empty($component)) {\n            Plugin::$components[] = $component;\n        }\n    }\n}\n"
  },
  {
    "path": "engine/Plugin/Stylesheet.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Stylesheet\n{\n    /**\n     * Stylesheets\n     *\n     * @var array\n     */\n    public static $stylesheets = array();\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Add stylesheet\n     *\n     *  <code>\n     *      Stylesheet::add('path/to/my/stylesheet1.css');\n     *      Stylesheet::add('path/to/my/stylesheet2.css', 'frontend', 11);\n     *      Stylesheet::add('path/to/my/stylesheet3.css', 'backend',12);\n     *  <code>\n     *\n     * @param string  $file     File path\n     * @param string  $load     Load stylesheet on frontend, backend or both\n     * @param integer $priority Priority. Default is 10\n     */\n    public static function add($file, $load = 'frontend', $priority = 10)\n    {\n        Stylesheet::$stylesheets[] = array(\n            'file'     => (string) $file,\n            'load'     => (string) $load,\n            'priority' => (int) $priority,\n        );\n    }\n\n    /**\n     *  Minify, combine and load site stylesheet\n     */\n    public static function load()\n    {\n        $backend_site_css_path  = MINIFY . DS . 'backend_site.minify.css';\n        $frontend_site_css_path = MINIFY . DS . 'frontend_site.minify.'.Option::get('styles_version').'.css';\n\n        // Load stylesheets\n        if (count(Stylesheet::$stylesheets) > 0) {\n            $backend_buffer = '';\n            $backend_regenerate = false;\n\n            $frontend_buffer = '';\n            $frontend_regenerate = false;\n\n            // Sort stylesheets by priority\n            $stylesheets = Arr::subvalSort(Stylesheet::$stylesheets, 'priority');\n\n            if (BACKEND) {\n\n                // Build backend site stylesheets\n                foreach ($stylesheets as $stylesheet) {\n                    if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both'))) {\n                        if (! file_exists($backend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($backend_site_css_path)) {\n                            $backend_regenerate = true;\n                            break;\n                        }\n                    }\n                }\n\n                // Regenerate site stylesheet\n                if ($backend_regenerate) {\n                    foreach ($stylesheets as $stylesheet) {\n                        if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both'))) {\n                            $backend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']);\n                        }\n                    }\n                    $backend_buffer = Stylesheet::parseVariables($backend_buffer);\n                    file_put_contents($backend_site_css_path, MinifyCSS::process($backend_buffer));\n                    $backend_regenerate = false;\n                }\n            } else {\n\n                // Build frontend site stylesheets\n                foreach ($stylesheets as $stylesheet) {\n                    if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both'))) {\n                        if (! file_exists($frontend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($frontend_site_css_path)) {\n                            $frontend_regenerate = true;\n                            break;\n                        }\n                    }\n                }\n\n                // Regenerate site stylesheet\n                if ($frontend_regenerate) {\n                    foreach ($stylesheets as $stylesheet) {\n                        if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both'))) {\n                            $frontend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']);\n                        }\n                    }\n                    $frontend_buffer = Stylesheet::parseVariables($frontend_buffer);\n                    file_put_contents($frontend_site_css_path, MinifyCSS::process($frontend_buffer));\n                    $frontend_regenerate = false;\n                }\n            }\n\n            // Render\n            if (BACKEND) {\n                echo '<link rel=\"stylesheet\" href=\"'.Option::get('siteurl').'/tmp/minify/backend_site.minify.css?'.Option::get('styles_version').'\" type=\"text/css\" />';\n            } else {\n                echo '<link rel=\"stylesheet\" href=\"'.Option::get('siteurl').'/tmp/minify/frontend_site.minify.'.Option::get('styles_version').'.css\" type=\"text/css\" />'.\"\\n\";\n            }\n        }\n    }\n\n    /**\n     * CSS Parser\n     */\n    public static function parseVariables($frontend_buffer)\n    {\n        return str_replace(array('@site_url',\n                                 '@theme_site_url',\n                                 '@theme_admin_url'),\n                           array(Option::get('siteurl'),\n                                 Option::get('siteurl').'/public/themes/'.Option::get('theme_site_name'),\n                                 Option::get('siteurl').'/admin/themes/'.Option::get('theme_admin_name')),\n                           $frontend_buffer);\n    }\n\n    /**\n     * stylesVersionIncrement\n     */\n    public static function stylesVersionIncrement()\n    {\n        Option::update('styles_version',  (int) Option::get('styles_version') + 1);\n    }\n}\n"
  },
  {
    "path": "engine/Plugin/View.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass View\n{\n    /**\n     * Path to view file.\n     *\n     * @var string\n     */\n    protected $view_file;\n\n    /**\n     * View variables.\n     *\n     * @var array\n     */\n    protected $vars = array();\n\n    /**\n     * Global view variables.\n     *\n     * @var array\n     */\n    protected static $global_vars = array();\n\n    /**\n     * The output.\n     *\n     * @var string\n     */\n    protected $output;\n\n    /**\n     * Create a new view object.\n     *\n     *  <code>\n     *      // Create new view object\n     *      $view = new View('blog/views/backend/index');\n     *\n     *      // Assign some new variables\n     *      $view->assign('msg', 'Some message...');\n     *\n     *      // Get view\n     *      $output = $view->render();\n     *\n     *      // Display view\n     *      echo $output;\n     *  </code>\n     *\n     * @param string $view      Name of the view file\n     * @param array  $variables Array of view variables\n     */\n    public function __construct($view, array $variables = array())\n    {\n        // Set view file\n        // From current theme folder or from plugin folder\n        if (File::exists($theme_view_file = THEMES_SITE . DS . Site::theme() . DS . $view . '.view.php') && BACKEND == false) {\n            $this->view_file = $theme_view_file;\n        } else {\n            $this->view_file = PLUGINS . DS . $view . '.view.php';\n        }\n\n        // Is view file exists ?\n        if (file_exists($this->view_file) === false) {\n            throw new RuntimeException(vsprintf(\"%s(): The '%s' view does not exist.\", array(__METHOD__, $view)));\n        }\n\n        // Set view variables\n        $this->vars = $variables;\n    }\n\n    /**\n     * View factory\n     *\n     *  <code>\n     *      // Create new view object, assign some variables\n     *      // and displays the rendered view in the browser.\n     *      View::factory('blog/views/backend/index')\n     *          ->assign('msg', 'Some message...')\n     *          ->display();\n     *  </code>\n     *\n     * @param  string $view      Name of the view file\n     * @param  array  $variables Array of view variables\n     * @return View\n     */\n    public static function factory($view, array $variables = array())\n    {\n        return new View($view, $variables);\n    }\n\n    /**\n     * Assign a view variable.\n     *\n     *  <code>\n     *      $view->assign('msg', 'Some message...');\n     *  </code>\n     *\n     * @param  string  $key    Variable name\n     * @param  mixed   $value  Variable value\n     * @param  boolean $global Set variable available in all views\n     * @return View\n     */\n    public function assign($key, $value, $global = false)\n    {\n        // Assign a new view variable (global or locale)\n        if ($global === false) {\n            $this->vars[$key] = $value;\n        } else {\n            View::$global_vars[$key] = $value;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Include the view file and extracts the view variables before returning the generated output.\n     *\n     *  <code>\n     *      // Get view\n     *      $output = $view->render();\n     *\n     *      // Display output\n     *      echo $output;\n     *  </code>\n     *\n     * @param  string $filter Callback function used to filter output\n     * @return string\n     */\n    public function render($filter = null)\n    {\n        // Is output empty ?\n        if (empty($this->output)) {\n\n            // Extract variables as references\n            extract(array_merge($this->vars, View::$global_vars), EXTR_REFS);\n\n            // Turn on output buffering\n            ob_start();\n\n            // Include view file\n            include($this->view_file);\n\n            // Output...\n            $this->output = ob_get_clean();\n        }\n\n        // Filter output ?\n        if ($filter !== null) {\n            $this->output = call_user_func($filter, $this->output);\n        }\n\n        // Return output\n        return $this->output;\n    }\n\n    /**\n     * Displays the rendered view in the browser.\n     *\n     *  <code>\n     *      $view->display();\n     *  </code>\n     *\n     */\n    public function display()\n    {\n        echo $this->render();\n    }\n\n    /**\n     * Magic setter method that assigns a view variable.\n     *\n     * @param string $key   Variable name\n     * @param mixed  $value Variable value\n     */\n    public function __set($key, $value)\n    {\n        $this->vars[$key] = $value;\n    }\n\n    /**\n     * Magic getter method that returns a view variable.\n     *\n     * @param  string $key Variable name\n     * @return mixed\n     */\n    public function __get($key)\n    {\n        if (isset($this->vars[$key])) {\n            return $this->vars[$key];\n        }\n    }\n\n    /**\n     * Magic isset method that checks if a view variable is set.\n     *\n     * @param  string  $key Variable name\n     * @return boolean\n     */\n    public function __isset($key)\n    {\n        return isset($this->vars[$key]);\n    }\n\n    /**\n     * Magic unset method that unsets a view variable.\n     *\n     * @param string $key Variable name\n     */\n    public function __unset($key)\n    {\n        unset($this->vars[$key]);\n    }\n\n    /**\n     * Method that magically converts the view object into a string.\n     *\n     * @return string\n     */\n    public function __toString()\n    {\n        return $this->render();\n    }\n}\n"
  },
  {
    "path": "engine/Security.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Security\n{\n    /**\n     * Key name for token storage\n     *\n     * @var  string\n     */\n    protected static $token_name = 'security_token';\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Generate and store a unique token which can be used to help prevent\n     * [CSRF](http://wikipedia.org/wiki/Cross_Site_Request_Forgery) attacks.\n     *\n     *  <code>\n     *      $token = Security::token();\n     *  </code>\n     *\n     * You can insert this token into your forms as a hidden field:\n     *\n     *  <code>\n     *      echo Form::hidden('csrf', Security::token());\n     *  </code>\n     *\n     * This provides a basic, but effective, method of preventing CSRF attacks.\n     *\n     * @param  boolean $new force a new token to be generated?. Default is false\n     * @return string\n     */\n    public static function token($new = false)\n    {\n        // Get the current token\n        $token = Session::get(Security::$token_name);\n\n        // Create a new unique token\n        if ($new === true or ! $token) {\n\n            // Generate a new unique token\n            $token = sha1(uniqid(mt_rand(), true));\n\n            // Store the new token\n            Session::set(Security::$token_name, $token);\n        }\n\n        // Return token\n        return $token;\n    }\n\n    /**\n     * Check that the given token matches the currently stored security token.\n     *\n     *  <code>\n     *     if (Security::check($token)) {\n     *         // Pass\n     *     }\n     *  </code>\n     *\n     * @param  string  $token token to check\n     * @return boolean\n     */\n    public static function check($token)\n    {\n        return Security::token() === $token;\n    }\n\n    /**\n     * Encrypt password\n     *\n     *  <code>\n     *      $encrypt_password = Security::encryptPassword('password');\n     *  </code>\n     *\n     * @param string $password Password to encrypt\n     */\n    public static function encryptPassword($password)\n    {\n        return md5(md5(trim($password) . MONSTRA_PASSWORD_SALT));\n    }\n\n    /**\n     * Create safe name. Use to create safe username, filename, pagename.\n     *\n     *  <code>\n     *      $safe_name = Security::safeName('hello world');\n     *  </code>\n     *\n     * @param  string  $str       String\n     * @param  mixed   $delimiter String delimiter\n     * @param  boolean $lowercase String Lowercase\n     * @return string\n     */\n    public static function safeName($str, $delimiter = '-', $lowercase = false)\n    {\n        // Redefine vars\n        $str       = (string) $str;\n        $delimiter = $delimiter;\n        $lowercase = (bool) $lowercase;\n        $delimiter = $delimiter;\n\n        // Remove tags\n        $str = filter_var($str, FILTER_SANITIZE_STRING);\n\n        // Decode all entities to their simpler forms\n        $str = html_entity_decode($str, ENT_QUOTES, 'UTF-8');\n\n        // Reserved characters (RFC 3986)\n        $reserved_characters = array(\n            '/', '?', ':', '@', '#', '[', ']',\n            '!', '$', '&', '\\'', '(', ')', '*',\n            '+', ',', ';', '='\n        );\n\n        // Remove reserved characters\n        $str = str_replace($reserved_characters, ' ', $str);\n\n        // Set locale to en_US.UTF8\n        setlocale(LC_ALL, 'en_US.UTF8');\n\n        // Translit ua,ru => latin\n        $str = Text::translitIt($str);\n\n        // Convert string\n        $str = iconv('UTF-8', 'ASCII//TRANSLIT', $str);\n\n        // Remove characters\n        $str = preg_replace(\"/[^a-zA-Z0-9\\/_|+ -]/\", '', $str);\n        if ($delimiter != null) {\n            $str = preg_replace(\"/[\\/_|+ -]+/\", $delimiter, $str);\n            $str = trim($str, $delimiter);\n        }\n\n        // Lowercase\n        if ($lowercase === true) {\n            $str = Text::lowercase($str);\n        }\n\n        // Return safe name\n        return $str;\n    }\n\n    /**\n     * Create safe url.\n     *\n     *  <code>\n     *      $url = Security::sanitizeURL('http://test.com');\n     *  </code>\n     *\n     * @param  string $url Url to sanitize\n     * @return string\n     */\n    public static function sanitizeURL($url)\n    {\n        $url = trim($url);\n        $url = rawurldecode($url);\n        $url = str_replace(array('--', '&quot;', '!', '@', '#', '$', '%', '^', '*', '(', ')', '+', '{', '}', '|', ':', '\"', '<', '>',\n                                  '[', ']', '\\\\', ';', \"'\", ',', '*', '+', '~', '`', 'laquo', 'raquo', ']>', '&#8216;', '&#8217;', '&#8220;', '&#8221;', '&#8211;', '&#8212;'),\n                            array('-', '-', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),\n                            $url);\n        $url = str_replace('--', '-', $url);\n        $url = rtrim($url, \"-\");\n\n        $url = str_replace('..', '', $url);\n        $url = str_replace('//', '', $url);\n        $url = preg_replace('/^\\//', '', $url);\n        $url = preg_replace('/^\\./', '', $url);\n\n        return $url;\n    }\n\n    /**\n     * Sanitize URL to prevent XSS - Cross-site scripting\n     */\n    public static function runSanitizeURL()\n    {\n        $_GET = array_map('Security::sanitizeURL', $_GET);\n    }\n\n    /**\n     * That prevents null characters between ascii characters.\n     *\n     * @param string $str String\n     */\n    public static function removeInvisibleCharacters($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        // Thanks to ci for this tip :)\n        $non_displayables = array('/%0[0-8bcef]/', '/%1[0-9a-f]/', '/[\\x00-\\x08]/', '/\\x0b/', '/\\x0c/', '/[\\x0e-\\x1f]/');\n\n        do {\n            $cleaned = $str;\n            $str = preg_replace($non_displayables, '', $str);\n        } while ($cleaned != $str);\n\n        // Return safe string\n        return $str;\n    }\n\n    /**\n     * Sanitize data to prevent XSS - Cross-site scripting\n     *\n     * @param string $str String\n     */\n    public static function xssClean($str)\n    {\n        // Remove invisible characters\n        $str = Security::removeInvisibleCharacters($str);\n\n        // Convert html to plain text\n        $str = Html::toText($str);\n\n        // Return safe string\n        return $str;\n    }\n}\n"
  },
  {
    "path": "engine/Shortcode.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Shortcode\n{\n    /**\n     * Shortcode tags array\n     *\n     * @var shortcode_tags\n     */\n    protected static $shortcode_tags = array();\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Add new shortcode\n     *\n     *  <code>\n     *      function returnSiteUrl() {\n     *          return Option::get('siteurl');\n     *      }\n     *\n     *      // Add shortcode {siteurl}\n     *      Shortcode::add('siteurl', 'returnSiteUrl');\n     *  </code>\n     *\n     * @param string $shortcode         Shortcode tag to be searched in content.\n     * @param string $callback_function The callback function to replace the shortcode with.\n     */\n    public static function add($shortcode, $callback_function)\n    {\n        // Redefine vars\n        $shortcode = (string) $shortcode;\n\n        // Add new shortcode\n        if (is_callable($callback_function)) {\n            Shortcode::$shortcode_tags[$shortcode] = $callback_function;\n        }\n    }\n\n    /**\n     * Remove a specific registered shortcode.\n     *\n     *  <code>\n     *      Shortcode::delete('shortcode_name');\n     *  </code>\n     *\n     * @param string $shortcode Shortcode tag.\n     */\n    public static function delete($shortcode)\n    {\n        // Redefine vars\n        $shortcode = (string) $shortcode;\n\n        // Delete shortcode\n        if (Shortcode::exists($shortcode)) {\n            unset(Shortcode::$shortcode_tags[$shortcode]);\n        }\n    }\n\n    /**\n     * Remove all registered shortcodes.\n     *\n     *  <code>\n     *      Shortcode::clear();\n     *  </code>\n     *\n     */\n    public static function clear()\n    {\n        Shortcode::$shortcode_tags = array();\n    }\n\n    /**\n     * Check if a shortcode has been registered.\n     *\n     *  <code>\n     *      if (Shortcode::exists('shortcode_name')) {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param string $shortcode Shortcode tag.\n     */\n    public static function exists($shortcode)\n    {\n        // Redefine vars\n        $shortcode = (string) $shortcode;\n\n        // Check shortcode\n        return array_key_exists($shortcode, Shortcode::$shortcode_tags);\n    }\n\n    /**\n     * Parse a string, and replace any registered shortcodes within it with the result of the mapped callback.\n     *\n     *  <code>\n     *      $content = Shortcode::parse($content);\n     *  </code>\n     *\n     * @param  string $content Content\n     * @return string\n     */\n    public static function parse($content)\n    {\n        if (! Shortcode::$shortcode_tags) {\n            return $content;\n        }\n\n        $shortcodes = implode('|', array_map('preg_quote', array_keys(Shortcode::$shortcode_tags)));\n        $pattern    = \"/(.?)\\{([$shortcodes]+)(.*?)(\\/)?\\}(?(4)|(?:(.+?)\\{\\/\\s*\\\\2\\s*\\}))?(.?)/s\";\n\n        return preg_replace_callback($pattern, 'Shortcode::_handle', $content);\n    }\n\n    /**\n     * _handle()\n     */\n    protected static function _handle($matches)\n    {\n        $prefix    = $matches[1];\n        $suffix    = $matches[6];\n        $shortcode = $matches[2];\n\n        // Allow for escaping shortcodes by enclosing them in {{shortcode}}\n        if ($prefix == '{' && $suffix == '}') {\n            return substr($matches[0], 1, -1);\n        }\n\n        $attributes = array(); // Parse attributes into into this array.\n\n        if (preg_match_all('/(\\w+) *= *(?:([\\'\"])(.*?)\\\\2|([^ \"\\'>]+))/', $matches[3], $match, PREG_SET_ORDER)) {\n            foreach ($match as $attribute) {\n                if (! empty($attribute[4])) {\n                    $attributes[strtolower($attribute[1])] = $attribute[4];\n                } elseif (! empty($attribute[3])) {\n                    $attributes[strtolower($attribute[1])] = $attribute[3];\n                }\n            }\n        }\n\n        // Check if this shortcode realy exists then call user function else return empty string\n        return (isset(Shortcode::$shortcode_tags[$shortcode])) ? $prefix . call_user_func(Shortcode::$shortcode_tags[$shortcode], $attributes, $matches[5], $shortcode) . $suffix : '';\n    }\n}\n"
  },
  {
    "path": "engine/Site.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Site\n{\n    /**\n     * An instance of the Site class\n     *\n     * @var site\n     */\n    protected static $instance = null;\n\n    /**\n     * Initializing site\n     *\n     * @return Site\n     */\n    public static function init()\n    {\n        if (! isset(self::$instance)) {\n            self::$instance = new Site();\n        }\n        return self::$instance;\n    }\n\n    /**\n     * Protected clone method to enforce singleton behavior.\n     *\n     * @access  protected\n     */\n    protected function __clone()\n    {\n        // Nothing here.\n    }\n\n    /**\n     * Construct\n     */\n    protected function __construct()\n    {\n        call_user_func(ucfirst(Uri::command()).'::main');\n    }\n\n    /**\n     * Get site name\n     *\n     *  <code>\n     *      echo Site::name();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function name()\n    {\n        return Option::get('sitename');\n    }\n\n    /**\n     * Get site theme\n     *\n     *  <code>\n     *      echo Site::theme();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function theme()\n    {\n        return Option::get('theme_site_name');\n    }\n\n    /**\n     * Get Page title\n     *\n     *  <code>\n     *      echo Site::title();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function title()\n    {\n        return call_user_func(ucfirst(Uri::command()).'::title');\n    }\n\n    /**\n     * Get page description\n     *\n     *  <code>\n     *      echo Site::description();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function description()\n    {\n        return (($description = trim(call_user_func(ucfirst(Uri::command()).'::description'))) == '') ? Html::toText(Option::get('description')) : Html::toText($description);\n    }\n\n    /**\n     * Get page keywords\n     *\n     *  <code>\n     *      echo Site::keywords();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function keywords()\n    {\n        return (($keywords = trim(call_user_func(ucfirst(Uri::command()).'::keywords'))) == '') ? Html::toText(Option::get('keywords')) : Html::toText($keywords);\n    }\n\n    /**\n     * Get site slogan\n     *\n     *  <code>\n     *      echo Site::slogan();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function slogan()\n    {\n        return Option::get('slogan');\n    }\n\n    /**\n     * Get page content\n     *\n     *  <code>\n     *      echo Site::content();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function content()\n    {\n        return Filter::apply('content', call_user_func(ucfirst(Uri::command()).'::content'));\n    }\n\n    /**\n     * Get compressed template\n     *\n     *  <code>\n     *      echo Site::template();\n     *  </code>\n     *\n     * @param  string $theme Theme name\n     * @return mixed\n     */\n    public static function template($theme = null)\n    {\n        // Get specific theme or current theme\n        $current_theme = ($theme == null) ? Option::get('theme_site_name') : $theme ;\n\n        // Get template\n        $template = call_user_func(ucfirst(Uri::command()).'::template');\n\n        // Check whether is there such a template in the current theme\n        // else return default template: index\n        // also compress template file :)\n        if (File::exists(THEMES_SITE . DS . $current_theme . DS . $template . '.template.php')) {\n            if (! file_exists(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php') or\n                filemtime(THEMES_SITE . DS . $current_theme . DS . $template .'.template.php') > filemtime(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php')) {\n                $buffer = file_get_contents(THEMES_SITE. DS . $current_theme . DS . $template .'.template.php');\n                $buffer = MinifyHTML::process($buffer);\n                file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php', $buffer);\n            }\n\n            return 'minify.'.$template;\n        } else {\n            if (! File::exists(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php') or\n                filemtime(THEMES_SITE . DS . $current_theme . DS . 'index.template.php') > filemtime(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php')) {\n                $buffer = file_get_contents(THEMES_SITE . DS . $current_theme . DS . 'index.template.php');\n                $buffer = MinifyHTML::process($buffer);\n                file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php', $buffer);\n            }\n\n            return 'minify.index';\n        }\n    }\n\n    /**\n     * Get site url\n     *\n     *  <code>\n     *      echo Site::url();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function url()\n    {\n        return Option::get('siteurl');\n    }\n\n    /**\n     * Get copyright information\n     *\n     *  <code>\n     *      echo Site::powered();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function powered()\n    {\n        return __('Powered by', 'system').' <a href=\"http://monstra.org\" target=\"_blank\">Monstra</a> ' . Monstra::VERSION;\n    }\n}\n"
  },
  {
    "path": "engine/Uri.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Uri\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Default component\n     *\n     * @var string\n     */\n    public static $default_component = 'pages';\n\n    /**\n     *\tGet uri and explode command/param1/param2\n     *\n     *  <code>\n     *      $segments = Uri::segments();\n     *  </code>\n     *\n     *  @return array\n     */\n    public static function segments()\n    {\n        // Get request uri and current script path\n        $request_uri = explode('/', $_SERVER['REQUEST_URI']);\n        $script_name = explode('/', $_SERVER['SCRIPT_NAME']);\n\n        // Delete script name\n        for ($i = 0; $i < sizeof($script_name); $i++) {\n            if ($request_uri[$i] == $script_name[$i]) {\n                unset($request_uri[$i]);\n            }\n        }\n\n        // Get all the values of an array\n        $uri = array_values($request_uri);\n\n        // Ability to pass parameters\n        foreach ($uri as $i => $u) {\n            if (isset($uri[$i])) {\n                $pos = strrpos($uri[$i], \"?\");\n                if ($pos === false) {\n                    $uri[$i] = Security::sanitizeURL($uri[$i]);\n                } else {\n                    $uri[$i] = Security::sanitizeURL(substr($uri[$i], 0, $pos));\n                }\n            }\n        }\n\n        // Return uri segments\n        return $uri;\n    }\n\n    /**\n     *  Get uri segment\n     *\n     *  <code>\n     *      $segment = Uri::segment(1);\n     *  </code>\n     *\n     *  @param  integer $segment Segment\n     *  @return mixed\n     */\n    public static function segment($segment)\n    {\n        $segments = Uri::segments();\n\n        return isset($segments[$segment]) ? $segments[$segment] : null;\n    }\n\n    /**\n     *\tGet command/component from registed components\n     *\n     *  <code>\n     *      $command = Uri::command();\n     *  </code>\n     *\n     *  @return array\n     */\n    public static function command()\n    {\n        // Get uri segments\n        $uri = Uri::segments();\n\n        if (! isset($uri[0])) {\n            $uri[0] = Uri::$default_component;\n        } else {\n            if (! in_array($uri[0], Plugin::$components)) {\n                $uri[0] = Uri::$default_component;\n            } else {\n                $uri[0] = $uri[0];\n            }\n        }\n\n        return $uri[0];\n    }\n\n    /**\n     *\tGet uri parammeters\n     *\n     *  <code>\n     *      $params = Uri::params();\n     *  </code>\n     *\n     *  @return array\n     */\n    public static function params()\n    {\n        //Init data array\n        $data = array();\n\n        // Get URI\n        $uri = Uri::segments();\n\n        // http://site.com/ and http://site.com/index.php same main home pages\n        if (! isset($uri[0])) {\n            $uri[0] = '';\n        }\n\n        // param1/param2\n        if ($uri[0] !== Uri::$default_component) {\n            if (isset($uri[1])) {\n                foreach ($uri as $part) {\n                    $data[] = $part;\n                }\n            } else { // default\n                $data[0] = $uri[0];\n            }\n        } else {\n            // This is good for box plugin Pages\n            // parent/child\n            if (isset($uri[2])) {\n                $data[0] = $uri[1];\n                $data[1] = $uri[2];\n            } else { // default\n                $data[0] = $uri[1];\n            }\n        }\n\n        return $data;\n    }\n}\n"
  },
  {
    "path": "engine/Xmldb/DB.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass DB\n{\n    /**\n     * XMLDB directory\n     *\n     * @var string\n     */\n    public static $db_dir = STORAGE;\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Configure the settings of XMLDB\n     *\n     * @param mixed $setting Setting name\n     * @param mixed $value   Setting value\n     */\n    public static function configure($setting, $value)\n    {\n        if (property_exists(\"db\", $setting)) {\n            DB::$$setting = $value;\n        }\n    }\n\n    /**\n     * Create new database\n     *\n     * @param  string  $db_name Database name\n     * @param  integer $mode    Mode\n     * @return boolean\n     */\n    public static function create($db_name, $chmod = 0775)\n    {\n        // Redefine vars\n        $db_name = (string) $db_name;\n\n        // Create\n        if (is_dir(DB::$db_dir . '/' . $db_name)) {\n            return false;\n        }\n        return mkdir(DB::$db_dir . '/' . $db_name, $chmod);\n    }\n\n    /**\n     * Drop database\n     *\n     * @param  string  $db_name Database name\n     * @return boolean\n     */\n    public static function drop($db_name)\n    {\n        // Redefine vars\n        $db_name = (string) $db_name;\n\n        // Drop\n        if (is_dir(DB::$db_dir . '/' . $db_name)) {\n            $ob=scandir(DB::$db_dir . '/' . $db_name); foreach ($ob as $o) {\n     if ($o!='.'&&$o!='..') {\n         if (filetype(DB::$db_dir . '/' . $db_name.'/'.$o)=='dir') {\n             DB::drop(DB::$db_dir . '/' . $db_name.'/'.$o);\n         } else {\n             unlink(DB::$db_dir . '/' . $db_name.'/'.$o);\n         }\n     }\n }\n        }\n        reset($ob);\n        rmdir(DB::$db_dir . '/' . $db_name);\n    }\n}\n"
  },
  {
    "path": "engine/Xmldb/Table.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass Table\n{\n    /**\n     * XMLDB Tables directory\n     *\n     * @var string\n     */\n    public static $tables_dir = XMLDB;\n\n    /**\n     * Table\n     *\n     * @var object\n     */\n    private $table;\n\n    /**\n     * Table name\n     *\n     * @var string\n     */\n    private $name;\n\n    /**\n     * Configure the settings of XMLDB Tables\n     *\n     * @param mixed $setting Setting name\n     * @param mixed $value   Setting value\n     */\n    public static function configure($setting, $value)\n    {\n        if (property_exists(\"table\", $setting)) {\n            Table::$$setting = $value;\n        }\n    }\n\n    /**\n     * Table factory.\n     *\n     *  <code>\n     *      $users = Table::factory('table_name');\n     *  </code>\n     *\n     * @param  string $table_name Table name\n     * @return Table\n     */\n    public static function factory($table_name)\n    {\n        return new Table($table_name);\n    }\n\n    /**\n     * Table construct\n     *\n     *  <code>\n     *      $users = new Table('table_name');\n     *  </code>\n     *\n     * @param string $table_name Table name\n     */\n    public function __construct($table_name)\n    {\n        // Redefine vars\n        $table_name = (string) $table_name;\n\n        $this->table = Table::get($table_name);\n        $this->name  = $table_name;\n    }\n\n    /**\n     * Create new table\n     *\n     * XMLDB Table structure:\n     *\n     *  <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n     *  <root>\n     *      <options><autoincrement>0</autoincrement></options>\n     *      <fields>\n     *          <field1/>\n     *          <field2/>\n     *      </fields>\n     *      <record>\n     *          <field1>value</field1>\n     *          <field2>value</field2>\n     *      </record>\n     *  </root>\n     *\n     *  <code>\n     *      Table::create('table_name', array('field1', 'field2'));\n     *  </code>\n     *\n     * @param  string  $table_name Table name\n     * @param  array   $fields     Fields\n     * @return boolean\n     */\n    public static function create($table_name, $fields)\n    {\n        // Redefine vars\n        $table_name = (string) $table_name;\n\n        if (! file_exists(Table::$tables_dir . '/' . $table_name . '.table.xml') &&\n            is_dir(dirname(Table::$tables_dir)) &&\n            is_writable(dirname(Table::$tables_dir)) &&\n            isset($fields) &&\n            is_array($fields)) {\n\n            // Create table fields\n            $_fields = '<fields>';\n            foreach ($fields as $field) {\n                $_fields .= \"<$field/>\";\n            }\n            $_fields .= '</fields>';\n\n            // Create new table\n            return file_put_contents(Table::$tables_dir . '/' . $table_name . '.table.xml', '<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><options><autoincrement>0</autoincrement></options>'.$_fields.'</root>', LOCK_EX);\n        } else {\n\n            // Something wrong... return false\n            return false;\n        }\n    }\n\n    /**\n     * Delete table\n     *\n     *  <code>\n     *      Table::drop('table_name');\n     *  </code>\n     *\n     * @param  string  $table_name Table name\n     * @return boolean\n     */\n    public static function drop($table_name)\n    {\n        // Redefine vars\n        $table_name = (string) $table_name;\n\n        // Drop\n        if (! is_dir(Table::$tables_dir . '/' . $table_name . '.table.xml')) {\n            return unlink(Table::$tables_dir . '/' . $table_name . '.table.xml');\n        }\n\n        return false;\n    }\n\n    /**\n     * Get table\n     *\n     *  <code>\n     *     $table = Table::get('table_name');\n     *  </code>\n     *\n     * @param  array $table_name Table name\n     * @return mixed\n     */\n    public static function get($table_name)\n    {\n        // Redefine vars\n        $table_name = (string) $table_name;\n\n        // Load table\n        if (file_exists(Table::$tables_dir . '/' . $table_name.'.table.xml') && is_file(Table::$tables_dir . '/' . $table_name.'.table.xml')) {\n            $data = array('xml_object'   => XML::loadFile(Table::$tables_dir . '/' . $table_name.'.table.xml'),\n                          'xml_filename' => Table::$tables_dir . '/' . $table_name.'.table.xml');\n\n            return $data;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * Get information about table\n     *\n     *  <code>\n     *      var_dump($users->info());\n     *  </code>\n     *\n     * @return array\n     */\n    public function info()\n    {\n        return array(\n            'table_name'        => basename($this->table['xml_filename'], '.table.xml'),\n            'table_size'        => filesize($this->table['xml_filename']),\n            'table_last_change' => filemtime($this->table['xml_filename']),\n            'table_last_access' => fileatime($this->table['xml_filename']),\n            'table_fields'      => $this->fields(),\n            'records_count'     => $this->count(),\n            'records_last_id'   => $this->lastId()\n        );\n    }\n\n    /**\n     * Get table fields\n     *\n     *  <code>\n     *      var_dump($users->fields());\n     *  </code>\n     *\n     * @return array\n     */\n    public function fields()\n    {\n        // Select fields\n        $fields_obj = Table::_selectOne($this->table, \"fields\");\n\n        // Create fields array\n        foreach ($fields_obj as $key => $field) {\n            $fields[] = $key;\n        }\n\n        // Return array of fields\n        return $fields;\n    }\n\n    /**\n     * Add new field\n     *\n     *  <code>\n     *      $users->addField('test');\n     *  </code>\n     *\n     * @param  string  $name Field name\n     * @return boolean\n     */\n    public function addField($name)\n    {\n        // Redefine vars\n        $name = (string) $name;\n\n        // Get table\n        $table = $this->table;\n\n        // Select all fields\n        $fields = Table::_selectOne($this->table, \"fields\");\n\n        // Select current field\n        $field  = Table::_selectOne($this->table, \"fields/{$name}\");\n\n        // If field dosnt exists than create new field\n        if ($field == null) {\n\n            // Create new field\n            $fields->addChild($name, '');\n\n            // Save table\n            return Table::_save($table);\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * Delete field\n     *\n     *  <code>\n     *      $users->deleteField('test');\n     *  </code>\n     *\n     * @param  string  $name Field name\n     * @return boolean\n     */\n    public function deleteField($name)\n    {\n        // Redefine vars\n        $name = (string) $name;\n\n        // Get table\n        $table = $this->table;\n\n        // Select field\n        $field = Table::_selectOne($this->table, \"fields/{$name}\");\n\n        // If field exist than delete it\n        if ($field != null) {\n\n            // Delete field\n            unset($field[0]);\n\n            // Save table\n            return Table::_save($table);\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * Update field\n     *\n     *  <code>\n     *      $users->updateField('login', 'username');\n     *  </code>\n     *\n     * @param  string  $old_name Old field name\n     * @param  string  $new_name New field name\n     * @return boolean\n     */\n    public function updateField($old_name, $new_name)\n    {\n        if (file_exists(Table::$tables_dir . '/' . $this->name.'.table.xml') && is_file(Table::$tables_dir . '/' . $this->name.'.table.xml')) {\n            $table = strtr(file_get_contents(Table::$tables_dir . '/' . $this->name.'.table.xml'), array('<'.$old_name.'>' => '<'.$new_name.'>',\n                                                                                                         '</'.$old_name.'>' => '</'.$new_name.'>',\n                                                                                                         '<'.$old_name.'/>' => '<'.$new_name.'/>'));\n            if (file_put_contents(Table::$tables_dir . '/' . $this->name.'.table.xml', $table)) {\n                return true;\n            } else {\n                return false;\n            }\n        }\n    }\n\n    /**\n     * Check if field exist\n     *\n     *  <code>\n     *      if ($users->existsField('field_name')) {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param  string  $name Name of field to check.\n     * @return boolean\n     */\n    public function existsField($name)\n    {\n        // Redefine vars\n        $name = (string) $name;\n\n        // Get table\n        $table = $this->table;\n\n        // Select field\n        $field = Table::_selectOne($this->table, \"fields/{$name}\");\n\n        // Return true or false\n        return ($field == null) ? false : true;\n    }\n\n    /**\n     * Add new record\n     *\n     *  <code>\n     *      $users->insert(array('login'=>'admin', 'password'=>'pass'));\n     *  </code>\n     *\n     * @param  array   $fields Record fields to insert\n     * @return boolean\n     */\n    public function insert(array $fields = null)\n    {\n        // Set save flag to true\n        $save = true;\n\n        // Foreach fields check is current field alredy exists\n        if (count($fields) !== 0) {\n            foreach ($fields as $key => $value) {\n                if (Table::_selectOne($this->table, \"fields/{$key}\") == null) {\n                    $save = false;\n                    break;\n                }\n            }\n        }\n\n        // Get table fields and create fields names array\n        $_fields = Table::_selectOne($this->table, \"fields\");\n        foreach ($_fields as $key => $value) {\n            $field_names[(string) $key] = (string) $key;\n        }\n\n        // Save record\n        if ($save) {\n\n            // Find autoincrement option\n            $inc = Table::_selectOne($this->table, \"options/autoincrement\");\n\n            // Increment\n            $inc_upd = $inc + 1;\n\n            // Add record\n            $node = $this->table['xml_object']->addChild(XML::safe($this->name));\n\n            // Update autoincrement\n            Table::_updateWhere($this->table, \"options\", array('autoincrement' => $inc_upd));\n\n            // Add common record fields: id and uid\n            $node->addChild('id', $inc_upd);\n            $node->addChild('uid', Table::_generateUID());\n\n            // If exists fields to insert then insert them\n            if (count($fields) !== 0) {\n                $table_fields = array_diff_key($field_names, $fields);\n\n                // Defined fields\n                foreach ($table_fields as $table_field) {\n                    $node->addChild($table_field, '');\n                }\n\n                // User fields\n                foreach ($fields as $key => $value) {\n                    $node->addChild($key, XML::safe($value));\n                }\n            }\n\n            // Save table\n            return Table::_save($this->table);\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * Select record(s) in table\n     *\n     *  <code>\n     *      $records = $users->select('[id=2]');\n     *      $records = $users->select(null, 'all');\n     *      $records = $users->select(null, 'all', null, array('login'));\n     *      $records = $users->select(null, 2, 1);\n     *  </code>\n     *\n     * @param  string  $query     XPath query\n     * @param  integer $row_count Row count. To select all records write 'all'\n     * @param  integer $offset    Offset\n     * @param  array   $fields    Fields\n     * @param  string  $order_by  Order by\n     * @param  string  $order     Order type\n     * @return array\n     */\n    public function select($query = null, $row_count = 'all', $offset = null, array $fields = null, $order_by = 'id', $order = 'ASC')\n    {\n        // Redefine vars\n        $query    = ($query === null)  ? null : (string) $query;\n        $offset   = ($offset === null) ? null : (int) $offset;\n        $order_by = (string) $order_by;\n        $order    = (string) $order;\n\n        // Execute query\n        if ($query !== null) {\n            $tmp = $this->table['xml_object']->xpath('//'.$this->name.$query);\n        } else {\n            $tmp = $this->table['xml_object']->xpath($this->name);\n        }\n\n        // Init vars\n        $data     = array();\n        $records  = array();\n        $_records = array();\n\n        $one_record = false;\n\n        // If row count is null then select only one record\n        // eg: $users->select('[login=\"admin\"]', null);\n        if ($row_count == null) {\n            if (isset($tmp[0])) {\n                $_records   = $tmp[0];\n                $one_record = true;\n            }\n        } else {\n\n            // If row count is 'all' then select all records\n            // eg:\n            //     $users->select('[status=\"active\"]', 'all');\n            // or\n            //     $users->select('[status=\"active\"]');\n            foreach ($tmp as $record) {\n                $data[] = $record;\n            }\n\n            $_records = $data;\n        }\n\n        // If array of fields is exits then get records with this fields only\n        if (count($fields) > 0) {\n            if (count($_records) > 0) {\n                $count = 0;\n                foreach ($_records as $key => $record) {\n                    foreach ($fields as $field) {\n                        $record_array[$count][$field] = (string) $record->$field;\n                    }\n\n                    $record_array[$count]['id'] = (int) $record->id;\n\n                    if ($order_by == 'id') {\n                        $record_array[$count]['sort'] = (int) $record->$order_by;\n                    } else {\n                        $record_array[$count]['sort'] = (string) $record->$order_by;\n                    }\n\n                    $count++;\n                }\n\n                // Sort records\n                $records = Table::subvalSort($record_array, 'sort', $order);\n\n                // Slice records array\n                if ($offset === null && is_int($row_count)) {\n                    $records = array_slice($records, -$row_count, $row_count);\n                } elseif ($offset !== null && is_int($row_count)) {\n                    $records = array_slice($records, $offset, $row_count);\n                }\n            }\n        } else {\n\n            // Convert from XML object to array\n\n            if (! $one_record) {\n                $count = 0;\n                foreach ($_records as $xml_objects) {\n                    $vars = get_object_vars($xml_objects);\n\n                    foreach ($vars as $key => $value) {\n                        $records[$count][$key] = (string) $value;\n\n                        if ($order_by == 'id') {\n                            $records[$count]['sort'] = (int) $vars['id'];\n                        } else {\n                            $records[$count]['sort'] = (string) $vars[$order_by];\n                        }\n                    }\n\n                    $count++;\n                }\n\n                // Sort records\n                $records = Table::subvalSort($records, 'sort', $order);\n\n                // Slice records array\n                if ($offset === null && is_int($row_count)) {\n                    $records = array_slice($records, -$row_count, $row_count);\n                } elseif ($offset !== null && is_int($row_count)) {\n                    $records = array_slice($records, $offset, $row_count);\n                }\n            } else {\n\n                // Single record\n                $vars = get_object_vars($_records[0]);\n                foreach ($vars as $key => $value) {\n                    $records[$key] = (string) $value;\n                }\n            }\n        }\n\n        // Return records\n        return $records;\n    }\n\n    /**\n     * Delete current record in table\n     *\n     *  <code>\n     *      $users->delete(2);\n     *  </code>\n     *\n     * @param  integer $id Record ID\n     * @return boolean\n     */\n    public function delete($id)\n    {\n        // Redefine vars\n        $id = (int) $id;\n\n        // Find record to delete\n        $xml_arr = Table::_selectOne($this->table, \"//\".$this->name.\"[id='\".$id.\"']\");\n\n        // If its exists then delete it\n        if (count($xml_arr) !== 0) {\n\n            // Delete\n            unset($xml_arr[0]);\n        }\n\n        // Save table\n        return Table::_save($this->table);\n    }\n\n    /**\n     * Delete with xPath query record in xml file\n     *\n     *  <code>\n     *      $users->deleteWhere('[id=2]');\n     *  </code>\n     *\n     * @param  string  $query xPath query\n     * @return boolean\n     */\n    public function deleteWhere($query)\n    {\n        // Redefine vars\n        $query = (string) $query;\n\n        // Find record to delete\n        $xml_arr = Table::_selectOne($this->table, '//'.$this->name.$query);\n\n        // If its exists then delete it\n        if (count($xml_arr) !== 0) {\n\n            // Delete\n            unset($xml_arr[0]);\n        }\n\n        // Save table\n        return Table::_save($this->table);\n    }\n\n    /**\n     * Update record with xPath query in XML file\n     *\n     *  <code>\n     *      $users->updateWhere('[id=2]', array('login'=>'Admin', 'password'=>'new pass'));\n     *  </code>\n     *\n     * @param  string  $query  XPath query\n     * @param  array   $fields Record fields to udpate\n     * @return boolean\n     */\n    public function updateWhere($query, array $fields = null)\n    {\n        // Redefine vars\n        $query = (string) $query;\n\n        // Set save flag to true\n        $save = true;\n\n        // Foreach fields check is current field alredy exists\n        if (count($fields) !== 0) {\n            foreach ($fields as $key => $value) {\n                if (Table::_selectOne($this->table, \"fields/{$key}\") == null) {\n                    $save = false;\n                    break;\n                }\n            }\n        }\n\n        // Get table fields and create fields names array\n        $_fields = Table::_selectOne($this->table, \"fields\");\n        foreach ($_fields as $key => $value) {\n            $field_names[(string) $key] = (string) $key;\n        }\n\n        // Save record\n        if ($save) {\n\n            // Find record\n            $xml_arr = Table::_selectOne($this->table, '//'.$this->name.$query);\n\n            // If its exists then delete it\n            if (count($fields) !== 0) {\n                foreach ($fields as $key => $value) {\n                    // Else: Strict Mode Error\n                    // Creating default object from empty value\n                    @$xml_arr->$key = XML::safe($value, false);\n                }\n            }\n\n            // Save table\n            return Table::_save($this->table);\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * Update current record in table\n     *\n     *  <code>\n     *      $users->update(1, array('login'=>'Admin','password'=>'new pass'));\n     *  </code>\n     *\n     * @param  integer $id     Record ID\n     * @param  array   $fields Record fields to udpate\n     * @return boolean\n     */\n    public function update($id, array $fields = null)\n    {\n        // Redefine vars\n        $id = (int) $id;\n\n        // Set save flag to true\n        $save = true;\n\n        // Foreach fields check is current field alredy exists\n        if (count($fields) !== 0) {\n            foreach ($fields as $key => $value) {\n                if (Table::_selectOne($this->table, \"fields/{$key}\") == null) {\n                    $save = false;\n                    break;\n                }\n            }\n        }\n\n        // Get table fields and create fields names array\n        $_fields = Table::_selectOne($this->table, \"fields\");\n        foreach ($_fields as $key => $value) {\n            $field_names[(string) $key] = (string) $key;\n        }\n\n        // Save record\n        if ($save) {\n\n            // Find record to delete\n            $xml_arr = Table::_selectOne($this->table, \"//\".$this->name.\"[id='\".(int) $id.\"']\");\n\n            // If its exists then update it\n            if (count($fields) !== 0) {\n                foreach ($fields as $key => $value) {\n\n                    // Delete current\n                    unset($xml_arr->$key);\n\n                    // And add new one\n                    $xml_arr->addChild($key, XML::safe($value, false));\n                }\n            }\n\n            // Save table\n            return Table::_save($this->table);\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * Get last record id\n     *\n     *  <code>\n     *      echo $users->lastId();\n     *  </code>\n     *\n     * @return integer\n     */\n    public function lastId()\n    {\n        $data = $this->table['xml_object']->xpath(\"//root/node()[last()]\");\n\n        return (int) $data[0]->id;\n    }\n\n    /**\n     * Get count of records\n     *\n     *  <code>\n     *      echo $users->count();\n     *  </code>\n     *\n     * @return integer\n     */\n    public function count()\n    {\n        return count($this->table['xml_object'])-2;\n    }\n\n    /**\n     * Subval sort\n     *\n     * @param  array  $a      Array\n     * @param  string $subkey Key\n     * @param  string $order  Order type DESC or ASC\n     * @return array\n     */\n    protected static function subvalSort($a, $subkey, $order = null)\n    {\n        if (count($a) != 0 || (!empty($a))) {\n            foreach ($a as $k=>$v) {\n                $b[$k] = function_exists('mb_strtolower') ? mb_strtolower($v[$subkey]) : strtolower($v[$subkey]);\n            }\n            if ($order==null || $order== 'ASC') {\n                asort($b);\n            } elseif ($order == 'DESC') {\n                arsort($b);\n            }\n            foreach ($b as $key=>$val) {\n                $c[] = $a[$key];\n            }\n\n            return $c;\n        }\n        return $a;\n    }\n\n    /**\n     * _selectOne\n     */\n    protected static function _selectOne($table, $query)\n    {\n        $tmp = $table['xml_object']->xpath($query);\n\n        return isset($tmp[0])? $tmp[0]: null;\n    }\n\n    /**\n     * _updateWhere\n     */\n    protected static function _updateWhere($table, $query, $fields = array())\n    {\n        // Find record to delete\n        $xml_arr = Table::_selectOne($table, $query);\n\n        // If its exists then delete it\n        if (count($fields) !== 0) {\n            foreach ($fields as $key => $value) {\n                $xml_arr->$key = XML::safe($value, false);\n            }\n        }\n\n        // Save table\n        Table::_save($table);\n    }\n\n    /**\n     * _generateUID\n     */\n    protected static function _generateUID()\n    {\n        return substr(md5(uniqid(rand(), true)), 0, 10);\n    }\n\n    /**\n     * Format XML and save\n     *\n     * @param array $table Array of database name and XML object\n     */\n    protected static function _save($table)\n    {\n        $dom = new DOMDocument('1.0', 'utf-8');\n        $dom->preserveWhiteSpace = false;\n\n        // Save new xml data to xml file only if loadXML successful.\n        // Preventing the destruction of the database by unsafe data.\n        // note: If loadXML !successful then _save() add&save empty record.\n        //       This record cant be removed by delete[Where]() Problem solved by hand removing...\n        //       Possible solution: modify delete[Where]() or prevent add&saving of such records.\n        // the result now: database cant be destroyed :)\n        if ($dom->loadXML($table['xml_object']->asXML())) {\n            $dom->save($table['xml_filename']);\n\n            return true;\n        } else {\n            return false;\n            // report about errors...\n        }\n    }\n}\n"
  },
  {
    "path": "engine/Xmldb/XML.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\nclass XML\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Create safe xml data. Removes dangerous characters for string.\n     *\n     *  <code>\n     *      $xml_safe = XML::safe($xml_unsafe);\n     *  </code>\n     *\n     * @param  string  $str  String\n     * @param  boolean $flag Flag\n     * @return string\n     */\n    public static function safe($str, $flag = true)\n    {\n        // Redefine vars\n        $str  = (string) $str;\n        $flag = (bool) $flag;\n\n        // Remove invisible chars\n        $non_displayables = array('/%0[0-8bcef]/', '/%1[0-9a-f]/', '/[\\x00-\\x08]/', '/\\x0b/', '/\\x0c/', '/[\\x0e-\\x1f]/');\n        do {\n            $cleaned = $str;\n            $str = preg_replace($non_displayables, '', $str);\n        } while ($cleaned != $str);\n\n        // htmlspecialchars\n        if ($flag) {\n            $str = htmlspecialchars($str, ENT_QUOTES, 'utf-8');\n        }\n\n        // Return safe string\n        return $str;\n    }\n\n    /**\n     * Get XML file\n     *\n     *  <code>\n     *      $xml_file = XML::loadFile('path/to/file.xml');\n     *  </code>\n     *\n     * @param  string  $file  File name\n     * @param  boolean $force Method\n     * @return array\n     */\n    public static function loadFile($file, $force = false)\n    {\n        // Redefine vars\n        $file  = (string) $file;\n        $force = (bool) $force;\n\n        // For CMS API XML file force method\n        if ($force) {\n            $xml = file_get_contents($file);\n            $data = simplexml_load_string($xml);\n\n            return $data;\n        } else {\n            if (file_exists($file) && is_file($file)) {\n                $xml = file_get_contents($file);\n                $data = simplexml_load_string($xml);\n\n                return $data;\n            } else {\n                return false;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "engine/_init.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n *  Monstra requires PHP 5.3.2 or greater\n */\nif (version_compare(PHP_VERSION, \"5.3.2\", \"<\")) {\n    exit(\"Monstra requires PHP 5.3.2 or greater.\");\n}\n\n/**\n *  Include Monstra Engine\n */\ninclude ROOT . DS .'engine'. DS .'Monstra.php';\n\n/**\n * Set Monstra Environment\n *\n * Monstra has four predefined environments:\n *   Monstra::DEVELOPMENT - The development environment.\n *   Monstra::TESTING     - The test environment.\n *   Monstra::STAGING     - The staging environment.\n *   Monstra::PRODUCTION  - The production environment.\n */\nMonstra::$environment = Monstra::PRODUCTION;\n\n/**\n * Report Errors\n */\nif (Monstra::$environment == Monstra::PRODUCTION) {\n    error_reporting(0);\n} else {\n    error_reporting(-1);\n}\n\n/**\n * Initialize Monstra\n */\nMonstra::init();\n"
  },
  {
    "path": "engine/boot/actions.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Set meta generator\n */\nAction::add('theme_meta', 'setMetaGenerator');\nfunction setMetaGenerator()\n{\n    echo '<meta name=\"generator\" content=\"Powered by Monstra '.Monstra::VERSION.'\" />'.\"\\n\";\n}\n"
  },
  {
    "path": "engine/boot/defines.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Monstra Defines\n */\n\n/**\n * The filesystem path to the site 'themes' folder\n */\ndefine('THEMES_SITE', ROOT . DS . 'public' . DS . 'themes');\n\n/**\n * The filesystem path to the admin 'themes' folder\n */\ndefine('THEMES_ADMIN', ROOT . DS . 'admin' . DS . 'themes');\n\n/**\n * The filesystem path to the 'plugins' folder\n */\ndefine('PLUGINS', ROOT . DS . 'plugins');\n\n/**\n * The filesystem path to the 'box' folder which is contained within\n * the 'plugins' folder\n */\ndefine('PLUGINS_BOX', PLUGINS . DS . 'box');\n\n/**\n * The filesystem path to the 'storage' folder\n */\ndefine('STORAGE', ROOT . DS . 'storage');\n\n/**\n * The filesystem path to the 'xmldb' folder\n */\ndefine('XMLDB', STORAGE . DS . 'database');\n\n/**\n * The filesystem path to the 'cache' folder\n */\ndefine('CACHE', ROOT . DS . 'tmp' . DS . 'cache');\n\n/**\n * The filesystem path to the 'minify' folder\n */\ndefine('MINIFY', ROOT . DS . 'tmp' . DS . 'minify');\n\n/**\n * The filesystem path to the 'logs' folder\n */\ndefine('LOGS', ROOT . DS . 'tmp' . DS . 'logs');\n\n/**\n * The filesystem path to the 'assets' folder\n */\ndefine('ASSETS', ROOT . DS . 'public' . DS . 'assets');\n\n/**\n * The filesystem path to the 'uploads' folder\n */\ndefine('UPLOADS', ROOT . DS . 'public' . DS . 'uploads');\n\n/**\n * Set password salt\n */\ndefine('MONSTRA_PASSWORD_SALT', 'YOUR_SALT_HERE');\n\n/**\n * Set date format\n */\ndefine('MONSTRA_DATE_FORMAT', 'Y-m-d / H:i:s');\n\n/**\n * Set eval php\n */\ndefine('MONSTRA_EVAL_PHP', false);\n\n/**\n * Check Monstra CMS version\n */\ndefine('CHECK_MONSTRA_VERSION', true);\n\n/**\n * Set gzip output\n */\ndefine('MONSTRA_GZIP', false);\n\n/**\n * Monstra database settings\n */\n//define('MONSTRA_DB_DSN', 'mysql:dbname=monstra;host=localhost;port=3306');\n//define('MONSTRA_DB_USER', 'root');\n//define('MONSTRA_DB_PASSWORD', 'password');\n\n"
  },
  {
    "path": "engine/boot/filters.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Evaluate a string as PHP code\n */\nif (MONSTRA_EVAL_PHP) {\n    Filter::add('content', 'evalPHP');\n}\nfunction obEval($mathes)\n{\n    ob_start();\n    eval($mathes[1]);\n    $mathes = ob_get_contents();\n    ob_end_clean();\n\n    return $mathes;\n}\nfunction evalPHP($str)\n{\n    return preg_replace_callback('/\\[php\\](.*?)\\[\\/php\\]/ms', 'obEval', $str);\n}\n\n/**\n * Add shortcode parser filter\n */\nFilter::add('content', 'Shortcode::parse', 11);\n"
  },
  {
    "path": "engine/boot/shortcodes.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n/**\n * Add new shortcode {siteurl}\n */\nShortcode::add('siteurl', 'returnSiteUrl');\nfunction returnSiteUrl()\n{\n    return Option::get('siteurl');\n}\n"
  },
  {
    "path": "index.php",
    "content": "<?php\n\n/**\n * Monstra\n *\n * @package Monstra\n * @author Romanenko Sergey / Awilum <awilum@msn.com>\n * @link http://monstra.org\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n\n// Main engine defines\ndefine('DS', DIRECTORY_SEPARATOR);\ndefine('ROOT', rtrim(dirname(__FILE__), '\\\\/'));\ndefine('BACKEND', false);\ndefine('MONSTRA_ACCESS', true);\n\n// First check for installer then go\nif (file_exists('install.php')) {\n    if (isset($_GET['install'])) {\n        if ($_GET['install'] == 'done') {\n            // Try to delete install file if not delete manually\n            @unlink('install.php');\n            // Redirect to main page\n            header('location: index.php');\n        }\n    } else {\n        include 'install.php';\n    }\n} else {\n\n    // Load Engine init file\n    require_once ROOT. DS . 'engine'. DS . '_init.php';\n\n    // Check for maintenance mod\n    if ('on' == Option::get('maintenance_status')) {\n\n        // Set maintenance mode for all except admin and editor\n        if ((Session::exists('user_role')) and (Session::get('user_role') == 'admin' or Session::get('user_role') == 'editor')) {\n            // Monstra show this page :)\n        } else {\n            header('HTTP/1.1 503 Service Temporarily Unavailable');\n            header('Status: 503 Service Temporarily Unavailable');\n            header('Retry-After: 600');\n            die(Text::toHtml(Option::get('maintenance_message')));\n        }\n    }\n\n    // Frontend pre render\n    Action::run('frontend_pre_render');\n\n    // Load site template\n    require MINIFY . DS . 'theme.' . Site::theme() . '.' . Site::template() . '.template.php';\n\n    // Frontend pre render\n    Action::run('frontend_post_render');\n\n    // Flush (send) the output buffer and turn off output buffering\n    ob_end_flush();\n}\n"
  },
  {
    "path": "install.php",
    "content": "<?php\n\n    /**\n     * Monstra :: Installator\n     */\n\n    // Main engine defines\n    if (! defined('DS')) {\n        define('DS', DIRECTORY_SEPARATOR);\n    }\n    if (! defined('ROOT')) {\n        define('ROOT', rtrim(dirname(__FILE__), '\\\\/'));\n    }\n    if (! defined('BACKEND')) {\n        define('BACKEND', false);\n    }\n    if (! defined('MONSTRA_ACCESS')) {\n        define('MONSTRA_ACCESS', true);\n    }\n\n    // Load bootstrap file\n    require_once(ROOT . DS . 'engine' . DS . '_init.php');\n\n    // Get array with the names of all modules compiled and loaded\n    $php_modules = get_loaded_extensions();\n\n    // Protocol to use\n    $protocol = 'http';\n\n    // Get server port\n    if ($_SERVER[\"SERVER_PORT\"] == \"80\") {\n        $port = \"\";\n    } elseif ($_SERVER[\"SERVER_PORT\"] == \"443\") {\n        $port = \"\";\n        $protocol = 'https';\n    } else {\n        $port = ':'.$_SERVER[\"SERVER_PORT\"];\n    }\n\n    // Get site URL\n    $site_url = $protocol . '://'.$_SERVER[\"SERVER_NAME\"].$port.str_replace(array(\"index.php\", \"install.php\"), \"\", $_SERVER['PHP_SELF']);\n\n    // Replace last slash in site_url\n    $site_url = rtrim($site_url, '/');\n\n    // Rewrite base\n    $rewrite_base = str_replace(array(\"index.php\", \"install.php\"), \"\", $_SERVER['PHP_SELF']);\n\n    // Errors array\n    $errors = array();\n\n    // Directories to check\n    $dir_array = array('public', 'storage', 'backups', 'tmp');\n\n    // Languages array\n    $languages_array = array('en', 'ru', 'fr', 'de', 'it', 'es', 'lt', 'pl', 'pt-br', 'hu', 'fa' , 'sk', 'uk', 'nl', 'sr', 'id', 'ja', 'zh-cn', 'tr');\n\n    // Select Monstra language\n    if (Request::get('language')) {\n        if (Request::get('action') && Request::get('action') == 'install') {\n            $action = '?action=install';\n        } else {\n            $action = '';\n        }\n        if (in_array(Request::get('language'), $languages_array)) {\n            if (Option::update('language', Request::get('language'))) {\n                Request::redirect($site_url.$action);\n            }\n        } else {\n            Request::redirect($site_url.$action);\n        }\n    }\n\n    // If pressed <Install> button then try to install\n    if (Request::post('install_submit')) {\n        if (Request::post('sitename') == '') {\n            $errors['sitename'] = __('Field \"Site name\" is empty', 'system');\n        }\n        if (Request::post('siteurl') == '') {\n            $errors['siteurl'] = __('Field \"Site url\" is empty', 'system');\n        }\n        if (Request::post('login') == '') {\n            $errors['login'] = __('Field \"Username\" is empty', 'system');\n        }\n        if (Request::post('password') == '') {\n            $errors['password'] = __('Field \"Password\" is empty', 'system');\n        }\n        if (Request::post('email') == '') {\n            $errors['email'] = __('Field \"Email\" is empty', 'system');\n        }\n        if (! Valid::email(Request::post('email'))) {\n            $errors['email_valid'] = __('Email not valid', 'system');\n        }\n        if (trim(Request::post('php') !== '')) {\n            $errors['php'] = true;\n        }\n        if (trim(Request::post('simplexml') !== '')) {\n            $errors['simplexml'] = true;\n        }\n        if (trim(Request::post('mod_rewrite') !== '')) {\n            $errors['mod_rewrite'] = true;\n        }\n        if (trim(Request::post('htaccess') !== '')) {\n            $errors['htaccess'] = true;\n        }\n        if (trim(Request::post('sitemap') !== '')) {\n            $errors['sitemap'] = true;\n        }\n        if (trim(Request::post('install') !== '')) {\n            $errors['install'] = true;\n        }\n        if (trim(Request::post('public') !== '')) {\n            $errors['public'] = true;\n        }\n        if (trim(Request::post('storage') !== '')) {\n            $errors['storage'] = true;\n        }\n        if (trim(Request::post('backups') !== '')) {\n            $errors['backups'] = true;\n        }\n        if (trim(Request::post('tmp') !== '')) {\n            $errors['tmp'] = true;\n        }\n\n        // If errors is 0 then install cms\n        if (count($errors) == 0) {\n\n            // Update options\n            Option::update(array('maintenance_status' => 'off',\n                                 'sitename'           => Request::post('sitename'),\n                                 'siteurl'            => Request::post('siteurl'),\n                                 'description'        => __('Site description', 'system'),\n                                 'keywords'           => __('Site keywords', 'system'),\n                                 'slogan'             => __('Site slogan', 'system'),\n                                 'defaultpage'        => 'home',\n                                 'timezone'           => Request::post('timezone'),\n                                 'system_email'       => Request::post('email'),\n                                 'theme_site_name'    => 'default',\n                                 'theme_admin_name'   => 'default'));\n\n            // Get users table\n            $users = new Table('users');\n\n            // Insert new user with role = admin\n            $users->insert(array('login'           => Security::safeName(Request::post('login')),\n                                 'password'        => Security::encryptPassword(Request::post('password')),\n                                 'email'           => Request::post('email'),\n                                 'hash'            => Text::random('alnum', 12),\n                                 'date_registered' => time(),\n                                 'role'            => 'admin'));\n\n            // Write .htaccess\n            $htaccess = file_get_contents('.htaccess');\n            $save_htaccess_content = str_replace(\"/%siteurlhere%/\", $rewrite_base, $htaccess);\n\n            $handle = fopen('.htaccess', \"w\");\n            fwrite($handle, $save_htaccess_content);\n            fclose($handle);\n\n            // Installation done :)\n            header(\"location: index.php?install=done\");\n        } else {\n            Notification::setNow('errors', $errors);\n        }\n    }\n?>\n<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <meta charset=\"utf-8\">\n        <title>Monstra :: Install</title>\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n        <meta name=\"description\" content=\"Monstra Install Area\">\n        <link rel=\"icon\" href=\"<?php echo $site_url; ?>/favicon.ico\" type=\"image/x-icon\" />\n        <link rel=\"shortcut icon\" href=\"<?php echo $site_url; ?>/favicon.ico\" type=\"image/x-icon\" />\n        <link rel=\"stylesheet\" href=\"<?php echo $site_url; ?>/public/assets/css/bootstrap.css\" media=\"all\" type=\"text/css\" />\n        <link rel=\"stylesheet\" href=\"<?php echo $site_url; ?>/admin/themes/default/css/default.css\" media=\"all\" type=\"text/css\" />\n\n        <style>\n\n            .install-body {\n                margin-top: 40px;\n                background: #FAFAFA;\n            }\n\n            .install-languages {\n                margin: 20px auto 20px;\n                text-align: center;\n                width: 600px;\n            }\n\n            .install-block,\n            .monstra-dialog,\n            .install-block-footer {\n                margin: 0 auto;\n                width: 600px;\n            }\n\n            .install-block-footer {\n                margin-top: 20px;\n                margin-bottom: 20px;\n            }\n\n            .well {\n                border: none;\n                border-radius: 0px;\n                background: #fff;\n                color: #555;\n                -webkit-font-smoothing: subpixel-antialiased;\n                -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.13);\n                        box-shadow: 0 1px 3px rgba(0,0,0,.13);\n            }\n\n\n            .form-control {\n                border-radius: 0px;\n            }\n\n            .monstra-says {\n                margin: 20px;\n            }\n\n            .error {\n                color:#8E0505;\n                padding-top: 5px;\n                padding-bottom: 5px;\n                padding-top: 5px;\n                padding-bottom: 5px;\n                margin-bottom: 5px;\n            }\n\n            .ok {\n                color:#00853F;\n                padding-top: 5px;\n                padding-bottom: 5px;\n                margin-bottom: 5px;\n            }\n\n            .warn {\n                color: #F74C18;\n                padding-top: 5px;\n                padding-bottom: 5px;\n            }\n\n            .install-languages a {\n                padding-left: 2px;\n                padding-right: 2px;\n            }\n\n            .language-link img {\n                -ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)\";\n                filter: alpha(opacity=30);\n                -khtml-opacity: 0.3;\n                  -moz-opacity:0.3;\n                       opacity: 0.3;\n            }\n\n            .language-link-current img {\n                -ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)\";\n                filter: alpha(opacity=100);\n                -moz-opacity:1.0;\n                -khtml-opacity: 1.0;\n                opacity: 1.0;\n            }\n\n            .install-languages a img:hover {\n                -ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)\";\n                filter: alpha(opacity=100);\n                -moz-opacity:1.0;\n                -khtml-opacity: 1.0;\n                opacity: 1.0;\n            }\n\n            .continue {\n                width: 100%;\n            }\n\n       </style>\n       <script src=\"<?php echo $site_url; ?>/public/assets/js/jquery.min.js\"></script>\n       <script src=\"<?php echo $site_url; ?>/public/assets/js/bootstrap.min.js\"></script>\n    </head>\n    <body class=\"install-body\">\n\n\n    <?php\n        if (version_compare(PHP_VERSION, \"5.3.2\", \"<\")) {\n            $errors['php'] = 'error';\n        } else {\n            $errors['php'] = '';\n        }\n\n        if (in_array('SimpleXML', $php_modules)) {\n            $errors['simplexml'] = '';\n        } else {\n            $errors['simplexml'] = 'error';\n        }\n\n        if (function_exists('apache_get_modules')) {\n            if (! in_array('mod_rewrite', apache_get_modules())) {\n                $errors['mod_rewrite'] = 'error';\n            } else {\n                $errors['mod_rewrite'] = '';\n            }\n        } else {\n            $errors['mod_rewrite'] = '';\n        }\n\n        if (is_writable(__FILE__)) {\n            $errors['install'] = '';\n        } else {\n            $errors['install'] = 'error';\n        }\n\n        if (is_writable('sitemap.xml')) {\n            $errors['sitemap'] = '';\n        } else {\n            $errors['sitemap'] = 'error';\n        }\n\n        if (is_writable('.htaccess')) {\n            $errors['htaccess'] = '';\n        } else {\n            $errors['htaccess'] = 'error';\n        }\n\n        // Dirs 'public', 'storage', 'backups', 'tmp'\n        foreach ($dir_array as $dir) {\n            if (is_writable($dir.'/')) {\n                $errors[$dir] = '';\n            } else {\n                $errors[$dir] = 'error';\n            }\n        }\n    ?>\n\n        <div class=\"text-center\"><a class=\"brand\" href=\"<?php echo Html::toText($site_url); ?>\"><img src=\"<?php echo $site_url; ?>/public/assets/img/monstra-logo-256px.png\" alt=\"Monstra\"></a></div>\n\n        <div class=\"install-languages\">\n            <?php\n                if (Request::get('action') && Request::get('action') == 'install') {\n                    $action = '&action=install';\n                } else {\n                    $action = '';\n                }\n            ?>\n            <?php foreach ($languages_array as $lang_code) {\n    ?>\n            <a data-placement=\"top\" data-toggle=\"tooltip\" class=\"language-link<?php if (Option::get('language') == $lang_code) {\n    echo ' language-link-current';\n}\n    ?>\" title=\"<?php echo I18n::$locales[$lang_code];\n    ?>\" href=\"<?php echo $site_url.'/?language=' . $lang_code.$action;\n    ?>\"><img src=\"<?php echo $site_url;\n    ?>/public/assets/img/flags/<?php echo $lang_code?>.png\" alt=\"<?php echo $lang_code?>\"></a>\n            <?php\n\n} ?>\n        </div>\n\n        <div class=\"install-block <?php if (Request::get('action') && Request::get('action') == 'install') {\n    ?><?php\n\n} else {\n    ?> hide <?php\n\n} ?>\">\n\n            <ul class=\"list-unstyled\">\n            <?php\n                // Monstra Notifications\n                if (Notification::get('errors') && count(Notification::get('errors') > 0)) {\n                    foreach (Notification::get('errors') as $error) {\n                        ?>\n                 <li class=\"error alert alert-danger\"><?php echo $error;\n                        ?></li>\n            <?php\n\n                    }\n                }\n            ?>\n            </ul>\n\n        <div class=\"well\">\n            <form action=\"install.php?action=install\" method=\"post\">\n                <input type=\"hidden\" name=\"php\" value=\"<?php echo $errors['php']; ?>\">\n                <input type=\"hidden\" name=\"simplexml\" value=\"<?php echo $errors['simplexml']; ?>\">\n                <input type=\"hidden\" name=\"mod_rewrite\" value=\"<?php echo $errors['mod_rewrite']; ?>\">\n                <input type=\"hidden\" name=\"install\" value=\"<?php echo $errors['install']; ?>\">\n                <input type=\"hidden\" name=\"sitemap\" value=\"<?php echo $errors['sitemap']; ?>\">\n                <input type=\"hidden\" name=\"htaccess\" value=\"<?php echo $errors['htaccess']; ?>\">\n                <input type=\"hidden\" name=\"public\" value=\"<?php echo $errors['public']; ?>\">\n                <input type=\"hidden\" name=\"storage\" value=\"<?php echo $errors['storage']; ?>\">\n                <input type=\"hidden\" name=\"backups\" value=\"<?php echo $errors['backups']; ?>\">\n                <input type=\"hidden\" name=\"tmp\" value=\"<?php echo $errors['tmp']; ?>\">\n\n                <div class=\"form-group\">\n                    <label><?php echo __('Site Name', 'system'); ?></label>\n                    <input class=\"form-control\" name=\"sitename\" type=\"text\" value=\"<?php if (Request::post('sitename')) {\n    echo Html::toText(Request::post('sitename'));\n} ?>\" />\n                </div>\n\n                <div class=\"form-group\">\n                    <label><?php echo __('Site Url', 'system'); ?></label>\n                    <input class=\"form-control\" name=\"siteurl\" type=\"text\" value=\"<?php echo Html::toText($site_url); ?>\" />\n                </div>\n\n                <div class=\"form-group\">\n                    <label><?php echo __('Username', 'users'); ?></label>\n                    <input class=\"form-control login\" name=\"login\" value=\"<?php if (Request::post('login')) {\n    echo Html::toText(Request::post('login'));\n} ?>\" type=\"text\" />\n                </div>\n\n                <div class=\"form-group\">\n                    <label><?php echo __('Password', 'users'); ?></label>\n                    <input class=\"form-control\" name=\"password\" type=\"password\" />\n                </div>\n\n                <div class=\"form-group\">\n                    <label><?php echo __('Time zone', 'system'); ?></label>\n                    <select class=\"form-control\" name=\"timezone\">\n                        <option value=\"Kwajalein\">(GMT-12:00) International Date Line West</option>\n                        <option value=\"Pacific/Samoa\">(GMT-11:00) Midway Island, Samoa</option>\n                        <option value=\"Pacific/Honolulu\">(GMT-10:00) Hawaii</option>\n                        <option value=\"America/Anchorage\">(GMT-09:00) Alaska</option>\n                        <option value=\"America/Los_Angeles\">(GMT-08:00) Pacific Time (US &amp; Canada)</option>\n                        <option value=\"America/Tijuana\">(GMT-08:00) Tijuana, Baja California</option>\n                        <option value=\"America/Denver\">(GMT-07:00) Mountain Time (US &amp; Canada)</option>\n                        <option value=\"America/Chihuahua\">(GMT-07:00) Chihuahua, La Paz, Mazatlan</option>\n                        <option value=\"America/Phoenix\">(GMT-07:00) Arizona</option>\n                        <option value=\"America/Regina\">(GMT-06:00) Saskatchewan</option>\n                        <option value=\"America/Tegucigalpa\">(GMT-06:00) Central America</option>\n                        <option value=\"America/Chicago\">(GMT-06:00) Central Time (US &amp; Canada)</option>\n                        <option value=\"America/Mexico_City\">(GMT-06:00) Guadalajara, Mexico City, Monterrey</option>\n                        <option value=\"America/New_York\">(GMT-05:00) Eastern Time (US &amp; Canada)</option>\n                        <option value=\"America/Bogota\">(GMT-05:00) Bogota, Lima, Quito, Rio Branco</option>\n                        <option value=\"America/Indiana/Indianapolis\">(GMT-05:00) Indiana (East)</option>\n                        <option value=\"America/Caracas\">(GMT-04:30) Caracas</option>\n                        <option value=\"America/Halifax\">(GMT-04:00) Atlantic Time (Canada)</option>\n                        <option value=\"America/Manaus\">(GMT-04:00) Manaus</option>\n                        <option value=\"America/Santiago\">(GMT-04:00) Santiago</option>\n                        <option value=\"America/La_Paz\">(GMT-04:00) La Paz</option>\n                        <option value=\"America/St_Johns\">(GMT-03:30) Newfoundland</option>\n                        <option value=\"America/Argentina/Buenos_Aires\">(GMT-03:00) Buenos Aires</option>\n                        <option value=\"America/Sao_Paulo\">(GMT-03:00) Brasilia</option>\n                        <option value=\"America/Godthab\">(GMT-03:00) Greenland</option>\n                        <option value=\"America/Montevideo\">(GMT-03:00) Montevideo</option>\n                        <option value=\"America/Argentina/Buenos_Aires\">(GMT-03:00) Georgetown</option>\n                        <option value=\"Atlantic/South_Georgia\">(GMT-02:00) Mid-Atlantic</option>\n                        <option value=\"Atlantic/Azores\">(GMT-01:00) Azores</option>\n                        <option value=\"Atlantic/Cape_Verde\">(GMT-01:00) Cape Verde Is.</option>\n                        <option value=\"Europe/London\">(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London</option>\n                        <option value=\"Atlantic/Reykjavik\">(GMT) Monrovia, Reykjavik</option>\n                        <option value=\"Africa/Casablanca\">(GMT) Casablanca</option>\n                        <option value=\"Europe/Belgrade\">(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague</option>\n                        <option value=\"Europe/Sarajevo\">(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb</option>\n                        <option value=\"Europe/Brussels\">(GMT+01:00) Brussels, Copenhagen, Madrid, Paris</option>\n                        <option value=\"Africa/Algiers\">(GMT+01:00) West Central Africa</option>\n                        <option value=\"Europe/Amsterdam\">(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna</option>\n                        <option value=\"Africa/Cairo\">(GMT+02:00) Cairo</option>\n                        <option value=\"Europe/Helsinki\">(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius</option>\n                        <option value=\"Europe/Athens\">(GMT+02:00) Athens, Bucharest, Istanbul</option>\n                        <option value=\"Asia/Jerusalem\">(GMT+02:00) Jerusalem</option>\n                        <option value=\"Asia/Amman\">(GMT+02:00) Amman</option>\n                        <option value=\"Asia/Beirut\">(GMT+02:00) Beirut</option>\n                        <option value=\"Africa/Windhoek\">(GMT+02:00) Windhoek</option>\n                        <option value=\"Africa/Harare\">(GMT+02:00) Harare, Pretoria</option>\n                        <option value=\"Asia/Kuwait\">(GMT+03:00) Kuwait, Riyadh</option>\n                        <option value=\"Asia/Baghdad\">(GMT+03:00) Baghdad</option>\n                        <option value=\"Europe/Minsk\">(GMT+03:00) Minsk</option>\n                        <option value=\"Africa/Nairobi\">(GMT+03:00) Nairobi</option>\n                        <option value=\"Asia/Tbilisi\">(GMT+03:00) Tbilisi</option>\n                        <option value=\"Asia/Tehran\">(GMT+03:30) Tehran</option>\n                        <option value=\"Asia/Muscat\">(GMT+04:00) Abu Dhabi, Muscat</option>\n                        <option value=\"Asia/Baku\">(GMT+04:00) Baku</option>\n                        <option value=\"Europe/Moscow\">(GMT+04:00) Moscow, St. Petersburg, Volgograd</option>\n                        <option value=\"Asia/Yerevan\">(GMT+04:00) Yerevan</option>\n                        <option value=\"Asia/Karachi\">(GMT+05:00) Islamabad, Karachi</option>\n                        <option value=\"Asia/Tashkent\">(GMT+05:00) Tashkent</option>\n                        <option value=\"Asia/Kolkata\">(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi</option>\n                        <option value=\"Asia/Colombo\">(GMT+05:30) Sri Jayawardenepura</option>\n                        <option value=\"Asia/Katmandu\">(GMT+05:45) Kathmandu</option>\n                        <option value=\"Asia/Dhaka\">(GMT+06:00) Astana, Dhaka</option>\n                        <option value=\"Asia/Yekaterinburg\">(GMT+06:00) Ekaterinburg</option>\n                        <option value=\"Asia/Rangoon\">(GMT+06:30) Yangon (Rangoon)</option>\n                        <option value=\"Asia/Novosibirsk\">(GMT+07:00) Almaty, Novosibirsk</option>\n                        <option value=\"Asia/Bangkok\">(GMT+07:00) Bangkok, Hanoi, Jakarta</option>\n                        <option value=\"Asia/Beijing\">(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi</option>\n                        <option value=\"Asia/Krasnoyarsk\">(GMT+08:00) Krasnoyarsk</option>\n                        <option value=\"Asia/Ulaanbaatar\">(GMT+08:00) Irkutsk, Ulaan Bataar</option>\n                        <option value=\"Asia/Kuala_Lumpur\">(GMT+08:00) Kuala Lumpur, Singapore</option>\n                        <option value=\"Asia/Taipei\">(GMT+08:00) Taipei</option>\n                        <option value=\"Australia/Perth\">(GMT+08:00) Perth</option>\n                        <option value=\"Asia/Seoul\">(GMT+09:00) Seoul</option>\n                        <option value=\"Asia/Tokyo\">(GMT+09:00) Osaka, Sapporo, Tokyo</option>\n                        <option value=\"Australia/Darwin\">(GMT+09:30) Darwin</option>\n                        <option value=\"Australia/Adelaide\">(GMT+09:30) Adelaide</option>\n                        <option value=\"Australia/Sydney\">(GMT+10:00) Canberra, Melbourne, Sydney</option>\n                        <option value=\"Australia/Brisbane\">(GMT+10:00) Brisbane</option>\n                        <option value=\"Australia/Hobart\">(GMT+10:00) Hobart</option>\n                        <option value=\"Asia/Yakutsk\">(GMT+10:00) Yakutsk</option>\n                        <option value=\"Pacific/Guam\">(GMT+10:00) Guam, Port Moresby</option>\n                        <option value=\"Asia/Vladivostok\">(GMT+11:00) Vladivostok</option>\n                        <option value=\"Pacific/Fiji\">(GMT+12:00) Fiji, Kamchatka, Marshall Is.</option>\n                        <option value=\"Asia/Magadan\">(GMT+12:00) Magadan, Solomon Is., New Caledonia</option>\n                        <option value=\"Pacific/Auckland\">(GMT+12:00) Auckland, Wellington</option>\n                        <option value=\"Pacific/Tongatapu\">(GMT+13:00) Nukualofa</option>\n                    </select>\n                </div>\n\n                <div class=\"form-group\">\n                    <label><?php echo __('Email', 'users'); ?></label>\n                    <input name=\"email\" class=\"form-control\" value=\"<?php if (Request::post('email')) {\n    echo Html::toText(Request::post('email'));\n} ?>\" type=\"text\" />\n                </div>\n                <div class=\"form-group\">\n                    <input type=\"submit\" class=\"btn btn-primary\" name=\"install_submit\" value=\"<?php echo __('Install', 'system'); ?>\" />\n                </div>\n            </form>\n\n            </div>\n        </div>\n\n        <div class=\"monstra-dialog <?php if (Request::get('action') && Request::get('action') == 'install') {\n    ?>hide<?php\n\n} ?>\">\n            <ul class=\"list-unstyled\">\n            <?php\n\n                if (version_compare(PHP_VERSION, \"5.3.2\", \"<\")) {\n                    echo '<li class=\"error alert alert-danger\">'.__('PHP 5.3.2 or greater is required', 'system').'</li>';\n                } else {\n                    echo '<li class=\"ok alert alert-success\">'.__('PHP Version', 'system').' '.PHP_VERSION.'</li>';\n                }\n\n                if (in_array('SimpleXML', $php_modules)) {\n                    echo '<li class=\"ok alert alert-success\">'.__('Module SimpleXML is installed', 'system').'</li>';\n                } else {\n                    echo '<li class=\"error alert alert-danger\">'.__('SimpleXML module is required', 'system').'</li>';\n                }\n\n                if (in_array('dom', $php_modules)) {\n                    echo '<li class=\"ok alert alert-success\">'.__('Module DOM is installed', 'system').'</li>';\n                } else {\n                    echo '<li class=\"error alert alert-danger\">'.__('Module DOM is required', 'system').'</li>';\n                }\n\n                if (function_exists('apache_get_modules')) {\n                    if (! in_array('mod_rewrite', apache_get_modules())) {\n                        echo '<li class=\"error alert alert-danger\">'.__('Apache Mod Rewrite is required', 'system').'</li>';\n                    } else {\n                        echo '<li class=\"ok alert alert-success\">'.__('Module Mod Rewrite is installed', 'system').'</li>';\n                    }\n                } else {\n                    echo '<li class=\"ok alert alert-success\">'.__('Module Mod Rewrite is installed', 'system').'</li>';\n                }\n\n                foreach ($dir_array as $dir) {\n                    if (is_writable($dir.'/')) {\n                        echo '<li class=\"ok alert alert-success\">'.__('Directory: <b> :dir </b> writable', 'system', array(':dir' => $dir)).'</li>';\n                    } else {\n                        echo '<li class=\"error alert alert-danger\">'.__('Directory: <b> :dir </b> not writable', 'system', array(':dir' => $dir)).'</li>';\n                    }\n                }\n\n                if (is_writable(__FILE__)) {\n                    echo '<li class=\"ok alert alert-success\">'.__('Install script writable', 'system').'</li>';\n                } else {\n                    echo '<li class=\"error alert alert-danger\">'.__('Install script not writable', 'system').'</li>';\n                }\n\n                if (is_writable('sitemap.xml')) {\n                    echo '<li class=\"ok alert alert-success\">'.__('Sitemap file writable', 'system').'</li>';\n                } else {\n                    echo '<li class=\"error alert alert-danger\">'.__('Sitemap file not writable', 'system').'</li>';\n                }\n\n                if (is_writable('.htaccess')) {\n                    echo '<li class=\"ok alert alert-success\">'.__('Main .htaccess file writable', 'system').'</li>';\n                } else {\n                    echo '<li class=\"error alert alert-danger\">'.__('Main .htaccess file not writable', 'system').'</li>';\n                }\n\n                if (isset($errors['sitename'])) {\n                    echo '<li class=\"error\">'.$errors['sitename'].'</li>';\n                }\n                if (isset($errors['siteurl'])) {\n                    echo '<li class=\"error\">'.$errors['siteurl'].'</li>';\n                }\n                if (isset($errors['login'])) {\n                    echo '<li class=\"error\">'.$errors['login'].'</li>';\n                }\n                if (isset($errors['password'])) {\n                    echo '<li class=\"error\">'.$errors['password'].'</li>';\n                }\n                if (isset($errors['email'])) {\n                    echo '<li class=\"error\">'.$errors['email'].'</li>';\n                }\n                if (isset($errors['email_valid'])) {\n                    echo '<li class=\"error\">'.$errors['email_valid'].'</li>';\n                }\n            ?>\n            </ul>\n            <a href=\"install.php?action=install\" class=\"btn btn-primary continue\"><?php echo __('Continue', 'system'); ?></a>\n        </div>\n\n        <div class=\"install-block-footer login-footer\">\n            <div class=\"text-center\">\n                <span>© 2012 - 2016 <a href=\"http://monstra.org\" class=\"small-grey-text\" target=\"_blank\">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>\n            </div>\n        </div>\n\n       <script type=\"text/javascript\">\n            $('.language-link').tooltip();\n\n            $(document).ready(function() {\n                $('.continue').click(function() {\n                    $('.monstra-dialog').addClass('hide');\n                    $('.install-block').removeClass('hide');\n                });\n            });\n       </script>\n    </body>\n</html>\n"
  },
  {
    "path": "libraries/Gelato/Agent/Agent.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Agent\n{\n    /**\n     * Mobiles\n     *\n     * @var array\n     */\n    public static $mobiles = array (\n        'ipad',\n        'iphone',\n        'ipod',\n        'android',\n        'windows ce',\n        'windows phone',\n        'mobileexplorer',\n        'opera mobi',\n        'opera mini',\n        'fennec',\n        'blackberry',\n        'nokia',\n        'kindle',\n        'ericsson',\n        'motorola',\n        'minimo',\n        'iemobile',\n        'symbian',\n        'webos',\n        'hiptop',\n        'palmos',\n        'palmsource',\n        'xiino',\n        'avantgo',\n        'docomo',\n        'up.browser',\n        'vodafone',\n        'portable',\n        'pocket',\n        'mobile',\n        'phone',\n    );\n\n    /**\n     * Robots\n     *\n     * @var array\n     */\n    public static $robots = array(\n        'googlebot',\n        'msnbot',\n        'slurp',\n        'yahoo',\n        'askjeeves',\n        'fastcrawler',\n        'infoseek',\n        'lycos',\n        'ia_archiver',\n        'yandex',\n        'mail.ru',\n        'ask.com',\n        'Copyscape.com',\n        'bing.com',\n\n    );\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Searches for a string in the user agent string.\n     *\n     * @param  array   $agents Array of strings to look for\n     * @return boolean\n     */\n    protected static function find($agents)\n    {\n        // If isset HTTP_USER_AGENT ?\n        if (isset($_SERVER['HTTP_USER_AGENT'])) {\n\n            // Loop through $agents array\n            foreach ($agents as $agent) {\n\n                // If current user agent == agents[agent] then return true\n                if (stripos($_SERVER['HTTP_USER_AGENT'], $agent) !== false) {\n                    return true;\n                }\n            }\n        }\n\n        // Else return false\n        return false;\n    }\n\n    /**\n     * Returns true if the user agent that made the request is identified as a mobile device.\n     *\n     *\t<code>\n     *\t\tif (Agent::isMobile()) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\t</code>\n     *\n     * @return boolean\n     */\n    public static function isMobile()\n    {\n        return Agent::find(Agent::$mobiles);\n    }\n\n    /**\n     * Returns true if the user agent that made the request is identified as a robot/crawler.\n     *\n     *\t<code>\n     *\t\tif (Agent::isRobot()) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\t</code>\n     *\n     * @return boolean\n     */\n    public static function isRobot()\n    {\n        return Agent::find(Agent::$robots);\n    }\n\n    /**\n     * Returns TRUE if the string you're looking for exists in the user agent string and FALSE if not.\n     *\n     *\t<code>\n     *\t\tif (Agent::is('iphone')) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\n     *\t\tif (Agent::is(array('iphone', 'ipod'))) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\t</code>\n     *\n     * @param  mixed   $device String or array of strings you're looking for\n     * @return boolean\n     */\n    public static function is($device)\n    {\n        return Agent::find((array) $device);\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Arr/Arr.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Arr\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Subval sort\n     *\n     *  <code>\n     *      $new_array = Arr::subvalSort($old_array, 'sort');\n     *  </code>\n     *\n     * @param  array  $a      Array\n     * @param  string $subkey Key\n     * @param  string $order  Order type DESC or ASC\n     * @return array\n     */\n    public static function subvalSort($a, $subkey, $order = null)\n    {\n        if (count($a) != 0 || (!empty($a))) {\n            foreach ($a as $k => $v) $b[$k] = function_exists('mb_strtolower') ? mb_strtolower($v[$subkey]) : strtolower($v[$subkey]);\n            if ($order == null || $order == 'ASC') asort($b); else if ($order == 'DESC') arsort($b);\n            foreach ($b as $key => $val) $c[] = $a[$key];\n\n            return $c;\n        }\n    }\n\n    /**\n     * Returns value from array using \"dot notation\".\n     * If the key does not exist in the array, the default value will be returned instead.\n     *\n     *  <code>\n     *      $login = Arr::get($_POST, 'login');\n     *\n     *      $array = array('foo' => 'bar');\n     *      $foo = Arr::get($array, 'foo');\n     *\n     *      $array = array('test' => array('foo' => 'bar'));\n     *      $foo = Arr::get($array, 'test.foo');\n     *  </code>\n     *\n     * @param  array  $array   Array to extract from\n     * @param  string $path    Array path\n     * @param  mixed  $default Default value\n     * @return mixed\n     */\n    public static function get($array, $path, $default = null)\n    {\n        // Get segments from path\n        $segments = explode('.', $path);\n\n        // Loop through segments\n        foreach ($segments as $segment) {\n\n            // Check\n            if ( ! is_array($array) || !isset($array[$segment])) {\n                return $default;\n            }\n\n            // Write\n            $array = $array[$segment];\n        }\n\n        // Return\n        return $array;\n    }\n\n    /**\n     * Deletes an array value using \"dot notation\".\n     *\n     *  <code>\n     *      Arr::delete($array, 'foo.bar');\n     *  </code>\n     *\n     * @access  public\n     * @param  array   $array Array you want to modify\n     * @param  string  $path  Array path\n     * @return boolean\n     */\n    public static function delete(&$array, $path)\n    {\n        // Get segments from path\n        $segments = explode('.', $path);\n\n        // Loop through segments\n        while (count($segments) > 1) {\n\n            $segment = array_shift($segments);\n\n            if ( ! isset($array[$segment]) || !is_array($array[$segment])) {\n                return false;\n            }\n\n            $array =& $array[$segment];\n        }\n\n        unset($array[array_shift($segments)]);\n\n        return true;\n    }\n\n    /**\n     * Checks if the given dot-notated key exists in the array.\n     *\n     *  <code>\n     *      if (Arr::keyExists($array, 'foo.bar')) {\n     *          // Do something...\n     *      }\n     *  </code>\n     *\n     * @param  array   $array The search array\n     * @param  mixed   $path  Array path\n     * @return boolean\n     */\n    public static function keyExists($array, $path)\n    {\n        foreach (explode('.', $path) as $segment) {\n\n            if ( ! is_array($array) or ! array_key_exists($segment, $array)) {\n                return false;\n            }\n\n            $array = $array[$segment];\n        }\n\n        return true;\n    }\n\n    /**\n     * Returns a random value from an array.\n     *\n     *  <code>\n     *      Arr::random(array('php', 'js', 'css', 'html'));\n     *  </code>\n     *\n     * @access  public\n     * @param  array $array Array path\n     * @return mixed\n     */\n    public static function random($array)\n    {\n        return $array[array_rand($array)];\n    }\n\n    /**\n     * Returns TRUE if the array is associative and FALSE if not.\n     *\n     *  <code>\n     *      if (Arr::isAssoc($array)) {\n     *          // Do something...\n     *      }\n     *  </code>\n     *\n     * @param  array   $array Array to check\n     * @return boolean\n     */\n    public static function isAssoc($array)\n    {\n        return (bool) count(array_filter(array_keys($array), 'is_string'));\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Cache/Cache.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Cache\n{\n    /**\n     * Cache directory\n     *\n     * @var string\n     */\n    protected static $cache_dir = '';\n\n    /**\n     * Cache file ext\n     *\n     * @var string\n     */\n    protected static $cache_file_ext = 'txt';\n\n    /**\n     * Cache life time (in seconds)\n     *\n     * @var int\n     */\n    public static $cache_time = 31556926;\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Configure the settings of Cache\n     *\n     *  <code>\n     *      Cache::configure('cache_dir', 'path/to/cache/dir');\n     *  </code>\n     *\n     * @param mixed $setting Setting name\n     * @param mixed $value   Setting value\n     */\n    public static function configure($setting, $value)\n    {\n        if (property_exists(\"cache\", $setting)) Cache::$$setting = $value;\n    }\n\n    /**\n     * Get data from cache\n     *\n     *  <code>\n     *      $profile = Cache::get('profiles', 'profile');\n     *  </code>\n     *\n     * @param  string  $namespace Namespace\n     * @param  string  $key       Cache key\n     * @return boolean\n     */\n    public static function get($namespace, $key)\n    {\n        // Redefine vars\n        $namespace = (string) $namespace;\n\n        // Get cache file id\n        $cache_file_id = Cache::getCacheFileID($namespace, $key);\n\n        // Is cache file exists ?\n        if (file_exists($cache_file_id)) {\n\n            // If cache file has not expired then fetch it\n            if ((time() - filemtime($cache_file_id)) < Cache::$cache_time) {\n\n               $handle = fopen($cache_file_id, 'r');\n\n               $cache = '';\n\n               while ( ! feof($handle)) {\n                   $cache .= fgets($handle);\n               }\n\n               fclose($handle);\n\n               return unserialize($cache);\n\n            } else {\n                unlink($cache_file_id);\n\n                return false;\n            }\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * Create new cache file $key in namescapce $namespace with the given data $data\n     *\n     *  <code>\n     *      $profile = array('login' => 'Awilum',\n     *                       'email' => 'awilum@msn.com');\n     *      Cache::put('profiles', 'profile', $profile);\n     *  </code>\n     *\n     * @param  string  $namespace Namespace\n     * @param  string  $key       Cache key\n     * @param  mixed   $data      The variable to store\n     * @return boolean\n     */\n    public static function put($namespace, $key, $data)\n    {\n        // Redefine vars\n        $namespace = (string) $namespace;\n\n        // Is CACHE directory writable ?\n        if (file_exists(CACHE) === false || is_readable(CACHE) === false || is_writable(CACHE) === false) {\n            throw new RuntimeException(vsprintf(\"%s(): Cache directory ('%s') is not writable.\", array(__METHOD__, CACHE)));\n        }\n\n        // Create namespace\n        if ( ! file_exists(Cache::getNamespaceID($namespace))) {\n            mkdir(Cache::getNamespaceID($namespace), 0775, true);\n        }\n\n        // Write cache to specific namespace\n        return file_put_contents(Cache::getCacheFileID($namespace, $key), serialize($data), LOCK_EX);\n    }\n\n    /**\n     * Deletes a cache in specific namespace\n     *\n     *  <code>\n     *      Cache::delete('profiles', 'profile');\n     *  </code>\n     *\n     * @param  string  $namespace Namespace\n     * @param  string  $key       Cache key\n     * @return boolean\n     */\n    public static function delete($namespace, $key)\n    {\n        // Redefine vars\n        $namespace = (string) $namespace;\n\n        if (file_exists(Cache::getCacheFileID($namespace, $key))) unlink(Cache::getCacheFileID($namespace, $key)); else return false;\n    }\n\n    /**\n     * Clean specific cache namespace.\n     *\n     *  <code>\n     *      Cache::clean('profiles');\n     *  </code>\n     *\n     * @param  string $namespace Namespace\n     * @return null\n     */\n    public static function clean($namespace)\n    {\n        // Redefine vars\n        $namespace = (string) $namespace;\n\n        array_map(\"unlink\", glob(Cache::$cache_dir . DS . md5($namespace) . DS . \"*.\" . Cache::$cache_file_ext));\n    }\n\n    /**\n     * Get cache file ID\n     *\n     * @param  string $namespace Namespace\n     * @param  string $key       Cache key\n     * @return string\n     */\n    protected static function getCacheFileID($namespace, $key)\n    {\n        // Redefine vars\n        $namespace = (string) $namespace;\n\n        return Cache::$cache_dir . DS . md5($namespace) . DS . md5($key) . '.' . Cache::$cache_file_ext;\n    }\n\n    /**\n     * Get namespace ID\n     *\n     * @param  string $namespace Namespace\n     * @return string\n     */\n    protected static function getNamespaceID($namespace)\n    {\n        // Redefine vars\n        $namespace = (string) $namespace;\n\n        return Cache::$cache_dir . DS . md5($namespace);\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/ClassLoader/ClassLoader.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass ClassLoader\n{\n\n    /**\n     * Mapping from class names to paths.\n     *\n     * @var array\n     */\n    protected static $classes = array();\n\n    /**\n     * PSR-0 directories.\n     *\n     * @var array\n     */\n    protected static $directories = array();\n\n    /**\n     * Registered namespaces.\n     *\n     * @var array\n     */\n    protected static $namespaces = array();\n\n    /**\n     * Class aliases.\n     *\n     * @var array\n     */\n    protected static $aliases = array();\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Add class to mapping.\n     *\n     *  <code>\n     *      ClassLoader::mapClass('ClassName', 'path/to/class');\n     *  </code>\n     *\n     * @access  public\n     * @param string $className Class name\n     * @param string $classPath Full path to class\n     */\n    public static function mapClass($className, $classPath)\n    {\n        ClassLoader::$classes[$className] = $classPath;\n    }\n\n    /**\n     * Add multiple classes to mapping.\n     *\n     *  <code>\n     *      ClassLoader::mapClasses(array('ClassName' => 'path/to/class','ClassName' => 'path/to/class'));\n     *  </code>\n     *\n     * @access  public\n     * @param array $classes Array of classes to map (key = class name and value = class path)\n     */\n    public static function mapClasses(array $classes)\n    {\n        foreach ($classes as $name => $path) {\n            ClassLoader::$classes[$name] = $path;\n        }\n    }\n\n    /**\n     * Adds a PSR-0 directory path.\n     *\n     *  <code>\n     *      ClassLoader::directory('path/to/classes');\n     *  </code>\n     *\n     * @access  public\n     * @param string $path Path to PSR-0 directory\n     */\n    public static function directory($path)\n    {\n        ClassLoader::$directories[] = rtrim($path, '/');\n    }\n\n    /**\n     * Registers a namespace.\n     *\n     *  <code>\n     *      ClassLoader::registerNamespace('Namespace', '/path/to/namespace/');\n     *  </code>\n     *\n     * @access  public\n     * @param string $namespace Namespace\n     * @param string $path      Path\n     */\n    public static function registerNamespace($namespace, $path)\n    {\n        ClassLoader::$namespaces[trim($namespace, '\\\\') . '\\\\'] = rtrim($path, '/');\n    }\n\n    /**\n     * Set an alias for a class.\n     *\n     *  <code>\n     *      ClassLoader::alias('ClassNameAlias', 'ClassName');\n     *  </code>\n     *\n     * @access  public\n     * @param string $alias     Class alias\n     * @param string $className Class name\n     */\n    public static function alias($alias, $className)\n    {\n        ClassLoader::$aliases[$alias] = $className;\n    }\n\n    /**\n     * Try to load a PSR-0 compatible class.\n     *\n     * @access  protected\n     * @param  string  $className Class name\n     * @param  string  $directory (Optional) Overrides the array of PSR-0 paths\n     * @return boolean\n     */\n    protected static function loadPSR0($className, $directory = null)\n    {\n        $classPath = '';\n\n        if (($pos = strripos($className, '\\\\')) !== false) {\n            $namespace = substr($className, 0, $pos);\n            $className = substr($className, $pos + 1);\n            $classPath = str_replace('\\\\', '/', $namespace) . '/';\n        }\n\n        $classPath .= str_replace('_', '/', $className) . '.php';\n\n        $directories = ($directory === null) ? ClassLoader::$directories : array($directory);\n\n        foreach ($directories as $directory) {\n            if (file_exists($directory . '/' . $classPath)) {\n                include($directory . '/' . $classPath);\n\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    /**\n     * Autoloader.\n     *\n     *  <code>\n     *      ClassLoader::load();\n     *  </code>\n     *\n     * @access  public\n     * @param  string  $className Class name\n     * @return boolean\n     */\n    public static function load($className)\n    {\n\n        $className = ltrim($className, '\\\\');\n\n        /**\n         * Try to autoload an aliased class\n         */\n        if (isset(ClassLoader::$aliases[$className])) {\n            return class_alias(ClassLoader::$aliases[$className], $className);\n        }\n\n        /**\n         * Try to load a mapped class\n         */\n        if (isset(ClassLoader::$classes[$className]) && file_exists(ClassLoader::$classes[$className])) {\n            include ClassLoader::$classes[$className];\n\n            return true;\n        }\n\n        /**\n         * Try to load class from a registered namespace\n         */\n        foreach (ClassLoader::$namespaces as $namespace => $path) {\n            if (strpos($className, $namespace) === 0) {\n                if (ClassLoader::loadPSR0(substr($className, strlen($namespace)), $path)) {\n                    return true;\n                }\n            }\n        }\n\n        /**\n         * Try to load a PSR-0 compatible class\n         * The second call to the loadPSR0 method is used to autoload legacy code\n         */\n        if (ClassLoader::loadPSR0($className) || ClassLoader::loadPSR0(strtolower($className))) {\n            return true;\n        }\n\n        return false;\n    }\n\n    /**\n     * Register the Gelato ClassLoader to the SPL autoload stack.\n     *\n     * @return  void\n     */\n    public static function register()\n    {\n        spl_autoload_register('ClassLoader::load', true);\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Cookie/Cookie.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Cookie\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Send a cookie\n     *\n     *  <code>\n     *      Cookie::set('limit', 10);\n     *  </code>\n     *\n     * @param  string  $key      A name for the cookie.\n     * @param  mixed   $value    The value to be stored. Keep in mind that they will be serialized.\n     * @param  integer $expire   The number of seconds that this cookie will be available.\n     * @param  string  $path     The path on the server in which the cookie will be availabe. Use / for the entire domain, /foo if you just want it to be available in /foo.\n     * @param  string  $domain   The domain that the cookie is available on. Use .example.com to make it available on all subdomains of example.com.\n     * @param  boolean $secure   Should the cookie be transmitted over a HTTPS-connection? If true, make sure you use a secure connection, otherwise the cookie won't be set.\n     * @param  boolean $httpOnly Should the cookie only be available through HTTP-protocol? If true, the cookie can't be accessed by Javascript, ...\n     * @return boolean\n     */\n    public static function set($key, $value, $expire = 86400, $domain = '', $path = '/', $secure = false, $httpOnly = false)\n    {\n        // Redefine vars\n        $key      = (string) $key;\n        $value    = serialize($value);\n        $expire   = time() + (int) $expire;\n        $path     = (string) $path;\n        $domain   = (string) $domain;\n        $secure   = (bool) $secure;\n        $httpOnly = (bool) $httpOnly;\n\n        // Set cookie\n        return setcookie($key, $value, $expire, $path, $domain, $secure, $httpOnly);\n    }\n\n    /**\n     * Get a cookie\n     *\n     *  <code>\n     *      $limit = Cookie::get('limit');\n     *  </code>\n     *\n     * @param  string $key The name of the cookie that should be retrieved.\n     * @return mixed\n     */\n    public static function get($key)\n    {\n        // Redefine key\n        $key = (string) $key;\n\n        // Cookie doesn't exist\n        if( ! isset($_COOKIE[$key])) return false;\n\n        // Fetch base value\n        $value = (get_magic_quotes_gpc()) ? stripslashes($_COOKIE[$key]) : $_COOKIE[$key];\n\n        // Unserialize\n        $actual_value = @unserialize($value);\n\n        // If unserialize failed\n        if($actual_value === false && serialize(false) != $value) return false;\n\n        // Everything is fine\n        return $actual_value;\n\n    }\n\n\n    /**\n     * Delete a cookie\n     *\n     *  <code>\n     *    \tCookie::delete('limit');\n     *  </code>\n     *\n     * @param string $name The name of the cookie that should be deleted.\n     */\n    public static function delete($key)\n    {\n        unset($_COOKIE[$key]);\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Curl/Curl.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Curl\n{\n    /**\n     * Default curl options.\n     *\n     * @var array\n     */\n    protected static $default_options = array(\n        CURLOPT_USERAGENT      => 'Mozilla/5.0 (compatible; Monstra CMS; +http://monstra.org)',\n        CURLOPT_RETURNTRANSFER => true\n    );\n\n    /**\n     * Information about the last transfer.\n     *\n     * @var array\n     */\n    protected static $info;\n\n    /**\n     * Performs a curl GET request.\n     *\n     *  <code>\n     *      $res = Curl::get('http://site.com/');\n     *  </code>\n     *\n     * @param  string $url     The URL to fetch\n     * @param  array  $options An array specifying which options to set and their values\n     * @return string\n     */\n    public static function get($url, array $options = null)\n    {\n        // Redefine vars\n        $url = (string) $url;\n\n        // Check if curl is available\n        if ( ! function_exists('curl_init')) throw new RuntimeException(vsprintf(\"%s(): This method requires cURL (http://php.net/curl), it seems like the extension isn't installed.\", array(__METHOD__)));\n\n        // Initialize a cURL session\n        $handle = curl_init($url);\n\n        // Merge options\n        $options = (array) $options + Curl::$default_options;\n\n        // Set multiple options for a cURL transfer\n        curl_setopt_array($handle, $options);\n\n        // Perform a cURL session\n        $response = curl_exec($handle);\n\n        // Set information regarding a specific transfer\n        Curl::$info = curl_getinfo($handle);\n\n        // Close a cURL session\n        curl_close($handle);\n\n        // Return response\n        return $response;\n    }\n\n    /**\n     * Performs a curl POST request.\n     *\n     *  <code>\n     *      $res = Curl::post('http://site.com/login');\n     *  </code>\n     *\n     * @param  string  $url       The URL to fetch\n     * @param  array   $data      An array with the field name as key and field data as value\n     * @param  boolean $multipart True to send data as multipart/form-data and false to send as application/x-www-form-urlencoded\n     * @param  array   $options   An array specifying which options to set and their values\n     * @return string\n     */\n    public static function post($url, array $data = null, $multipart = false, array $options = null)\n    {\n        // Redefine vars\n        $url = (string) $url;\n\n        // Check if curl is available\n        if ( ! function_exists('curl_init')) throw new RuntimeException(vsprintf(\"%s(): This method requires cURL (http://php.net/curl), it seems like the extension isn't installed.\", array(__METHOD__)));\n\n        // Initialize a cURL session\n        $handle = curl_init($url);\n\n        // Merge options\n        $options = (array) $options + Curl::$default_options;\n\n        // Add options\n        $options[CURLOPT_POST]       = true;\n        $options[CURLOPT_POSTFIELDS] = ($multipart === true) ? (array) $data : http_build_query((array) $data);\n\n        // Set multiple options for a cURL transfer\n        curl_setopt_array($handle, $options);\n\n        // Perform a cURL session\n        $response = curl_exec($handle);\n\n        // Set information regarding a specific transfer\n        Curl::$info = curl_getinfo($handle);\n\n        // Close a cURL session\n        curl_close($handle);\n\n        // Return response\n        return $response;\n    }\n\n    /**\n     * Gets information about the last transfer.\n     *\n     *  <code>\n     *      $res = Curl::getInfo();\n     *  </code>\n     *\n     * @param  string $value Array key of the array returned by curl_getinfo()\n     * @return mixed\n     */\n    public static function getInfo($value = null)\n    {\n        if (empty(Curl::$info)) {\n            return false;\n        }\n\n        return ($value === null) ? Curl::$info : Curl::$info[$value];\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Date/Date.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Date\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Get format date\n     *\n     *  <code>\n     *      echo Date::format($date, 'j.n.Y');\n     *  </code>\n     *\n     * @param  integer $date   Unix timestamp\n     * @param  string  $format Date format\n     * @return integer\n     */\n    public static function format($date, $format = 'j.n.Y')\n    {\n        // Redefine vars\n        $format = (string) $format;\n        $date   = (int) $date;\n\n        return date($format, $date);\n    }\n\n    /**\n     * Get number of seconds in a minute, incrementing by a step.\n     *\n     *  <code>\n     *      $seconds = Date::seconds();\n     *  </code>\n     *\n     * @param  integer $step  Amount to increment each step by, 1 to 30\n     * @param  integer $start Start value\n     * @param  integer $end   End value\n     * @return array\n     */\n    public static function seconds($step = 1, $start = 0, $end = 60)\n    {\n        // Redefine vars\n        $step  = (int) $step;\n        $start = (int) $start;\n        $end   = (int) $end;\n\n        return Date::_range($step, $start, $end);\n    }\n\n    /**\n     * Get number of minutes in a hour, incrementing by a step.\n     *\n     *  <code>\n     *      $minutes = Date::minutes();\n     *  </code>\n     *\n     * @param  integer $step  Amount to increment each step by, 1 to 30\n     * @param  integer $start Start value\n     * @param  integer $end   End value\n     * @return array\n     */\n    public static function minutes($step = 5, $start = 0, $end = 60)\n    {\n        // Redefine vars\n        $step  = (int) $step;\n        $start = (int) $start;\n        $end   = (int) $end;\n\n        return Date::_range($step, $start, $end);\n    }\n\n    /**\n     * Get number of hours, incrementing by a step.\n     *\n     *  <code>\n     *      $hours = Date::hours();\n     *  </code>\n     *\n     * @param  integer $step  Amount to increment each step by, 1 to 30\n     * @param  integer $long  Start value\n     * @param  integer $start End value\n     * @return array\n     */\n    public static function hours($step = 1, $long = false, $start = null)\n    {\n        // Redefine vars\n        $step  = (int) $step;\n        $long  = (bool) $long;\n\n        if ($start === null) $start = ($long === FALSE) ? 1 : 0;\n        $end = ($long === true) ? 23 : 12;\n\n        return Date::_range($step, $start, $end, true);\n    }\n\n    /**\n     * Get number of months.\n     *\n     *  <code>\n     *      $months = Date::months();\n     *  </code>\n     *\n     * @return array\n     */\n    public static function months()\n    {\n        return Date::_range(1, 1, 12, true);\n    }\n\n    /**\n     * Get number of days.\n     *\n     *  <code>\n     *      $months = Date::days();\n     *  </code>\n     *\n     * @return array\n     */\n    public static function days()\n    {\n        return Date::_range(1, 1, Date::daysInMonth((int) date('M')), true);\n    }\n\n    /**\n     * Returns the number of days in the requested month\n     *\n     *  <code>\n     *      $days = Date::daysInMonth(1);\n     *  </code>\n     *\n     * @param  integer $month Month as a number (1-12)\n     * @param  integer $year  The year\n     * @return integer\n     */\n    public static function daysInMonth($month, $year = null)\n    {\n        // Redefine vars\n        $month = (int) $month;\n        $year   = ! empty($year) ? (int) $year : (int) date('Y');\n\n        if ($month < 1 or $month > 12) {\n            return false;\n        } elseif ($month == 2) {\n            if ($year % 400 == 0 or ($year % 4 == 0 and $year % 100 != 0)) {\n                return 29;\n            }\n        }\n\n        $days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n\n        return $days_in_month[$month-1];\n    }\n\n    /**\n     * Get number of years.\n     *\n     *  <code>\n     *      $years = Date::years();\n     *  </code>\n     *\n     * @param  integer $long  Start value\n     * @param  integer $start End value\n     * @return array\n     */\n    public static function years($start = 1980, $end = 2024)\n    {\n        // Redefine vars\n        $start = (int) $start;\n        $end   = (int) $end;\n\n        return Date::_range(1, $start, $end, true);\n    }\n\n    /**\n     * Get current season name\n     *\n     *  <code>\n     *      echo Date::season();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function season()\n    {\n        $seasons = array(\"Winter\", \"Spring\", \"Summer\", \"Autumn\");\n\n        return $seasons[(int) ((date(\"n\") %12)/3)];\n    }\n\n    /**\n     * Get today date\n     *\n     *  <code>\n     *      echo Date::today();\n     *  </code>\n     *\n     * @param  string $format Date format\n     * @return string\n     */\n    public static function today($format = '')\n    {\n        // Redefine vars\n        $format = (string) $format;\n\n        if ($format != '') { return date($format); } else { return date(MONSTRA_DATE_FORMAT); }\n    }\n\n    /**\n     * Get yesterday date\n     *\n     *  <code>\n     *      echo Date::yesterday();\n     *  </code>\n     *\n     * @param  string $format Date format\n     * @return string\n     */\n    public static function yesterday($format = '')\n    {\n        // Redefine vars\n        $format = (string) $format;\n\n        if ($format != '') { return date($format, strtotime(\"-1 day\")); } else { return date(MONSTRA_DATE_FORMAT, strtotime(\"-1 day\")); }\n    }\n\n    /**\n     * Get tomorrow date\n     *\n     *  <code>\n     *      echo Date::tomorrow();\n     *  </code>\n     *\n     * @param  string $format Date format\n     * @return string\n     */\n    public static function tomorrow($format = '')\n    {\n        // Redefine vars\n        $format = (string) $format;\n\n        if ($format != '') { return date($format, strtotime(\"+1 day\")); } else { return date(MONSTRA_DATE_FORMAT, strtotime(\"-1 day\")); }\n    }\n\n    /**\n     * Converts a UNIX timestamp to DOS format.\n     *\n     *  <code>\n     *      $dos = Date::unix2dos($unix);\n     *  </code>\n     *\n     * @param  integer $timestamp UNIX timestamp\n     * @return integer\n     */\n    public static function unix2dos($timestamp = 0)\n    {\n        $timestamp = ($_timestamp == 0) ? getdate() : getdate($_timestamp);\n\n        if ($timestamp['year'] < 1980) return (1 << 21 | 1 << 16);\n\n        $timestamp['year'] -= 1980;\n\n        return ($timestamp['year']    << 25 | $timestamp['mon']     << 21 |\n                $timestamp['mday']    << 16 | $timestamp['hours']   << 11 |\n                $timestamp['minutes'] << 5  | $timestamp['seconds'] >> 1);\n    }\n\n    /**\n     * Converts a DOS timestamp to UNIX format.\n     *\n     *  <code>\n     *      $unix = Date::dos2unix($dos);\n     *  </code>\n     *\n     * @param  integer $timestamp DOS timestamp\n     * @return integer\n     */\n    public static function dos2unix($timestamp)\n    {\n        $sec  = 2 * ($timestamp & 0x1f);\n        $min  =  ($timestamp >> 5) & 0x3f;\n        $hrs  =  ($timestamp >> 11) & 0x1f;\n        $day  =  ($timestamp >> 16) & 0x1f;\n        $mon  = (($timestamp >> 21) & 0x0f);\n        $year = (($timestamp >> 25) & 0x7f) + 1980;\n\n        return mktime($hrs, $min, $sec, $mon, $day, $year);\n    }\n\n    /**\n     * Get Time zones\n     *\n     * @return array\n     */\n    public static function timezones()\n    {\n        return array('Kwajalein'=>'(GMT-12:00) International Date Line West',\n                    'Pacific/Samoa'=>'(GMT-11:00) Midway Island, Samoa',\n                    'Pacific/Honolulu'=>'(GMT-10:00) Hawaii',\n                    'America/Anchorage'=>'(GMT-09:00) Alaska',\n                    'America/Los_Angeles'=>'(GMT-08:00) Pacific Time (US &amp; Canada)',\n                    'America/Tijuana'=>'(GMT-08:00) Tijuana, Baja California',\n                    'America/Denver'=>'(GMT-07:00) Mountain Time (US &amp; Canada)',\n                    'America/Chihuahua'=>'(GMT-07:00) Chihuahua, La Paz, Mazatlan',\n                    'America/Phoenix'=>'(GMT-07:00) Arizona',\n                    'America/Regina'=>'(GMT-06:00) Saskatchewan',\n                    'America/Tegucigalpa'=>'(GMT-06:00) Central America',\n                    'America/Chicago'=>'(GMT-06:00) Central Time (US &amp; Canada)',\n                    'America/Mexico_City'=>'(GMT-06:00) Guadalajara, Mexico City, Monterrey',\n                    'America/New_York'=>'(GMT-05:00) Eastern Time (US &amp; Canada)',\n                    'America/Bogota'=>'(GMT-05:00) Bogota, Lima, Quito, Rio Branco',\n                    'America/Indiana/Indianapolis'=>'(GMT-05:00) Indiana (East)',\n                    'America/Caracas'=>'(GMT-04:30) Caracas',\n                    'America/Halifax'=>'(GMT-04:00) Atlantic Time (Canada)',\n                    'America/Manaus'=>'(GMT-04:00) Manaus',\n                    'America/Santiago'=>'(GMT-04:00) Santiago',\n                    'America/La_Paz'=>'(GMT-04:00) La Paz',\n                    'America/St_Johns'=>'(GMT-03:30) Newfoundland',\n                    'America/Argentina/Buenos_Aires'=>'(GMT-03:00) Buenos Aires',\n                    'America/Sao_Paulo'=>'(GMT-03:00) Brasilia',\n                    'America/Godthab'=>'(GMT-03:00) Greenland',\n                    'America/Montevideo'=>'(GMT-03:00) Montevideo',\n                    'America/Argentina/Buenos_Aires'=>'(GMT-03:00) Georgetown',\n                    'Atlantic/South_Georgia'=>'(GMT-02:00) Mid-Atlantic',\n                    'Atlantic/Azores'=>'(GMT-01:00) Azores',\n                    'Atlantic/Cape_Verde'=>'(GMT-01:00) Cape Verde Is.',\n                    'Europe/London'=>'(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London',\n                    'Atlantic/Reykjavik'=>'(GMT) Monrovia, Reykjavik',\n                    'Africa/Casablanca'=>'(GMT) Casablanca',\n                    'Europe/Belgrade'=>'(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague',\n                    'Europe/Sarajevo'=>'(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb',\n                    'Europe/Brussels'=>'(GMT+01:00) Brussels, Copenhagen, Madrid, Paris',\n                    'Africa/Algiers'=>'(GMT+01:00) West Central Africa',\n                    'Europe/Amsterdam'=>'(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna',\n                    'Africa/Cairo'=>'(GMT+02:00) Cairo',\n                    'Europe/Helsinki'=>'(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius',\n                    'Europe/Athens'=>'(GMT+02:00) Athens, Bucharest, Istanbul',\n                    'Asia/Jerusalem'=>'(GMT+02:00) Jerusalem',\n                    'Asia/Amman'=>'(GMT+02:00) Amman',\n                    'Asia/Beirut'=>'(GMT+02:00) Beirut',\n                    'Africa/Windhoek'=>'(GMT+02:00) Windhoek',\n                    'Africa/Harare'=>'(GMT+02:00) Harare, Pretoria',\n                    'Asia/Kuwait'=>'(GMT+03:00) Kuwait, Riyadh',\n                    'Asia/Baghdad'=>'(GMT+03:00) Baghdad',\n                    'Europe/Minsk'=>'(GMT+03:00) Minsk',\n                    'Africa/Nairobi'=>'(GMT+03:00) Nairobi',\n                    'Asia/Tbilisi'=>'(GMT+03:00) Tbilisi',\n                    'Asia/Tehran'=>'(GMT+03:30) Tehran',\n                    'Asia/Muscat'=>'(GMT+04:00) Abu Dhabi, Muscat',\n                    'Asia/Baku'=>'(GMT+04:00) Baku',\n                    'Europe/Moscow'=>'(GMT+04:00) Moscow, St. Petersburg, Volgograd',\n                    'Asia/Yerevan'=>'(GMT+04:00) Yerevan',\n                    'Asia/Karachi'=>'(GMT+05:00) Islamabad, Karachi',\n                    'Asia/Tashkent'=>'(GMT+05:00) Tashkent',\n                    'Asia/Kolkata'=>'(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi',\n                    'Asia/Colombo'=>'(GMT+05:30) Sri Jayawardenepura',\n                    'Asia/Katmandu'=>'(GMT+05:45) Kathmandu',\n                    'Asia/Dhaka'=>'(GMT+06:00) Astana, Dhaka',\n                    'Asia/Yekaterinburg'=>'(GMT+06:00) Ekaterinburg',\n                    'Asia/Rangoon'=>'(GMT+06:30) Yangon (Rangoon)',\n                    'Asia/Novosibirsk'=>'(GMT+07:00) Almaty, Novosibirsk',\n                    'Asia/Bangkok'=>'(GMT+07:00) Bangkok, Hanoi, Jakarta',\n                    'Asia/Beijing'=>'(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi',\n                    'Asia/Ulaanbaatar'=>'(GMT+08:00) Irkutsk, Ulaan Bataar',\n                    'Asia/Krasnoyarsk'=>'(GMT+08:00) Krasnoyarsk',\n                    'Asia/Kuala_Lumpur'=>'(GMT+08:00) Kuala Lumpur, Singapore',\n                    'Asia/Taipei'=>'(GMT+08:00) Taipei',\n                    'Australia/Perth'=>'(GMT+08:00) Perth',\n                    'Asia/Seoul'=>'(GMT+09:00) Seoul',\n                    'Asia/Tokyo'=>'(GMT+09:00) Osaka, Sapporo, Tokyo',\n                    'Australia/Darwin'=>'(GMT+09:30) Darwin',\n                    'Australia/Adelaide'=>'(GMT+09:30) Adelaide',\n                    'Australia/Sydney'=>'(GMT+10:00) Canberra, Melbourne, Sydney',\n                    'Australia/Brisbane'=>'(GMT+10:00) Brisbane',\n                    'Australia/Hobart'=>'(GMT+10:00) Hobart',\n                    'Asia/Yakutsk'=>'(GMT+10:00) Yakutsk',\n                    'Pacific/Guam'=>'(GMT+10:00) Guam, Port Moresby',\n                    'Asia/Vladivostok'=>'(GMT+11:00) Vladivostok',\n                    'Pacific/Fiji'=>'(GMT+12:00) Fiji, Kamchatka, Marshall Is.',\n                    'Asia/Magadan'=>'(GMT+12:00) Magadan, Solomon Is., New Caledonia',\n                    'Pacific/Auckland'=>'(GMT+12:00) Auckland, Wellington',\n                    'Pacific/Tongatapu'=>'(GMT+13:00) Nukualofa'\n                    );\n    }\n\n    /**\n     * _range()\n     */\n    protected static function _range($step, $start, $end, $flag = false)\n    {\n        $result = array();\n        if ($flag) {\n            for ($i = $start; $i <= $end; $i += $step) $result[$i] = (string) $i;\n        } else {\n            for ($i = $start; $i < $end; $i += $step) $result[$i]  = sprintf('%02d', $i);\n        }\n\n        return $result;\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Debug/Debug.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Debug\n{\n    /**\n     * Time\n     *\n     * @var array\n     */\n    protected static $time = array();\n\n    /**\n     * Memory\n     *\n     * @var array\n     */\n    protected static $memory = array();\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Save current time for current point\n     *\n     *  <code>\n     *      Debug::elapsedTimeSetPoint('point_name');\n     *  </code>\n     *\n     * @param string $point_name Point name\n     */\n    public static function elapsedTimeSetPoint($point_name)\n    {\n        Debug::$time[$point_name] = microtime(true);\n    }\n\n    /**\n     * Get elapsed time for current point\n     *\n     *  <code>\n     *      echo Debug::elapsedTime('point_name');\n     *  </code>\n     *\n     * @param  string $point_name Point name\n     * @return string\n     */\n    public static function elapsedTime($point_name)\n    {\n        if (isset(Debug::$time[$point_name])) return sprintf(\"%01.4f\", microtime(true) - Debug::$time[$point_name]);\n    }\n\n    /**\n     * Save current memory for current point\n     *\n     *  <code>\n     *      Debug::memoryUsageSetPoint('point_name');\n     *  </code>\n     *\n     * @param string $point_name Point name\n     */\n    public static function memoryUsageSetPoint($point_name)\n    {\n        Debug::$memory[$point_name] = memory_get_usage();\n    }\n\n    /**\n     * Get memory usage for current point\n     *\n     *  <code>\n     *      echo Debug::memoryUsage('point_name');\n     *  </code>\n     *\n     * @param  string $point_name Point name\n     * @return string\n     */\n    public static function memoryUsage($point_name)\n    {\n        if (isset(Debug::$memory[$point_name])) return Number::byteFormat(memory_get_usage() - Debug::$memory[$point_name]);\n    }\n\n    /**\n     * Print the variable $data and exit if exit = true\n     *\n     *  <code>\n     *      Debug::dump($data);\n     *  </code>\n     *\n     * @param mixed   $data Data\n     * @param boolean $exit Exit\n     */\n    public static function dump($data, $exit = false)\n    {\n        echo \"<pre>dump \\n---------------------- \\n\\n\" . print_r($data, true) . \"\\n----------------------</pre>\";\n        if ($exit) exit;\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/ErrorHandler/ErrorHandler.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass ErrorHandler\n{\n\n    /**\n     * Error Levels\n     */\n    public static $levels = array (        \n        E_ERROR             => 'Fatal Error',\n        E_PARSE             => 'Parse Error',\n        E_COMPILE_ERROR     => 'Compile Error',\n        E_COMPILE_WARNING   => 'Compile Warning',\n        E_STRICT            => 'Strict Mode Error',\n        E_NOTICE            => 'Notice',\n        E_WARNING           => 'Warning',\n        E_RECOVERABLE_ERROR => 'Recoverable Error',        \n        E_USER_NOTICE       => 'Notice',\n        E_USER_WARNING      => 'Warning',\n        E_USER_ERROR        => 'Error',\n        /*E_DEPRECATED        => 'Deprecated',*/ /* PHP 5.3 only */\n        /*E_USER_DEPRECATED   => 'Deprecated'*/ /* PHP 5.3 only */\n    );\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Returns an array of lines from a file.\n     *\n     * @access  public\n     * @param  string $file    File in which you want to highlight a line\n     * @param  int    $line    Line number to highlight\n     * @param  int    $padding (optional) Number of padding lines\n     * @return array\n     */\n    protected static function highlightCode($file, $line, $padding = 6)\n    {\n        if ( ! is_readable($file)) {\n            return false;\n        }\n\n        $handle      = fopen($file, 'r');\n        $lines       = array();\n        $currentLine = 0;\n\n        while ( ! feof($handle)) {\n            $currentLine++;\n\n            $temp = fgets($handle);\n\n            if ($currentLine > $line + $padding) {\n                break; // Exit loop after we have found what we were looking for\n            }\n\n            if ($currentLine >= ($line - $padding) && $currentLine <= ($line + $padding)) {\n                $lines[] = array\n                (\n                    'number'      => str_pad($currentLine, 4, ' ', STR_PAD_LEFT),\n                    'highlighted' => ($currentLine === $line),\n                    'code'        => ErrorHandler::highlightString($temp),\n                );\n            }\n        }\n\n        fclose($handle);\n\n        return $lines;\n    }\n\n    /**\n     * Converts errors to ErrorExceptions.\n     *\n     * @param  integer $code    The error code\n     * @param  string  $message The error message\n     * @param  string  $file    The filename where the error occurred\n     * @param  integer $line    The line number where the error occurred\n     * @return boolean\n     */\n    public static function error($code, $message, $file, $line)\n    {\n        // If isset error_reporting and $code then throw new error exception\n        if ((error_reporting() & $code) !== 0) {\n\n            /**\n             * Dont thow NOTICE exception for PRODUCTION Environment. Just write to log.\n             */\n            if (GELATO_DEVELOPMENT == false && $code == 8) {\n\n                // Get exception info\n                $error['code']    = $code;\n                $error['message'] = $message;\n                $error['file']    = $file;\n                $error['line']    = $line;\n                $error['type']    = 'ErrorException: ';\n\n                $codes = array (\n                    E_USER_NOTICE       => 'Notice',\n                );\n\n                $error['type'] .= in_array($error['code'], array_keys($codes)) ? $codes[$error['code']] : 'Unknown Error';\n\n                // Write to log\n                Log::write(\"{$error['type']}: {$error['message']} in {$error['file']} at line {$error['line']}\");\n\n            } else {\n                throw new ErrorException($message, $code, 0, $file, $line);\n            }\n        }\n\n        // Don't execute PHP internal error handler\n        return true;\n    }\n\n    /**\n     * Highlight string\n     *\n     * @param  string $string String\n     * @return string\n     */\n    protected static function highlightString($string)\n    {\n        $search  = array(\"\\r\\n\", \"\\n\\r\", \"\\r\", \"\\n\", '<code>', '</code>', '<span style=\"color: #0000BB\">&lt;?php&nbsp;', '#$@r4!/*');\n        $replace = array('', '', '', '', '', '', '<span style=\"color: #0000BB\">', '/*');\n\n        return str_replace($search, $replace, highlight_string('<?php ' . str_replace('/*', '#$@r4!/*', $string), true));\n    }\n\n    /**\n     * Modifies the backtrace array.\n     *\n     * @access  protected\n     * @param  array $backtrace Array returned by the getTrace() method of an exception object\n     * @return array\n     */\n    protected static function formatBacktrace($backtrace)\n    {\n        if (is_array($backtrace) === false || count($backtrace) === 0) {\n            return $backtrace;\n        }\n\n        /**\n         * Remove unnecessary info from backtrace\n         */\n        if ($backtrace[0]['function'] == '{closure}') {\n            unset($backtrace[0]);\n        }\n\n        /**\n         * Format backtrace\n         */\n        $trace = array();\n\n        foreach ($backtrace as $entry) {\n\n            /**\n             * Function\n             */\n            $function = '';\n\n            if (isset($entry['class'])) {\n                $function .= $entry['class'] . $entry['type'];\n            }\n\n            $function .= $entry['function'] . '()';\n\n            /**\n             * Arguments\n             */\n            $arguments = array();\n\n            if (isset($entry['args']) && count($entry['args']) > 0) {\n                foreach ($entry['args'] as $arg) {\n                    ob_start();\n\n                    var_dump($arg);\n\n                    $arg = htmlspecialchars(ob_get_contents());\n\n                    ob_end_clean();\n\n                    $arguments[] = $arg;\n                }\n            }\n\n            /**\n             * Location\n             */\n            $location = array();\n\n            if (isset($entry['file'])) {\n                $location['file'] = $entry['file'];\n                $location['line'] = $entry['line'];\n                $location['code'] = self::highlightCode($entry['file'], $entry['line']);\n            }\n\n            /**\n             * Compile into array\n             */\n            $trace[] = array\n            (\n                'function'  => $function,\n                'arguments' => $arguments,\n                'location'  => $location,\n            );\n        }\n\n        return $trace;\n    }\n\n    /**\n     * Convert errors not caught by the error handler to ErrorExceptions.\n     */\n    public static function fatal()\n    {\n        $e = error_get_last();\n\n        if ($e !== null && (error_reporting() & $e['type']) !== 0) {\n            ErrorHandler::exception(new ErrorException($e['message'], $e['type'], 0, $e['file'], $e['line']));\n\n            exit(1);\n        }\n    }\n\n    /**\n     * Handles uncaught exceptions and returns a pretty error screen.\n     *\n     * @access  public\n     * @param Exception $exception An exception object\n     */\n    public static function exception($exception)\n    {\n        try {\n\n            // Empty output buffers\n            while(ob_get_level() > 0) ob_end_clean();\n\n            // Get exception info\n            $error['code']    = $exception->getCode();\n            $error['message'] = $exception->getMessage();\n            $error['file']    = $exception->getFile();\n            $error['line']    = $exception->getLine();\n\n            // Determine error type\n            if ($exception instanceof ErrorException) {\n                $error['type'] = 'ErrorException: ';\n                $error['type'] .= in_array($error['code'], array_keys(ErrorHandler::$levels)) ? ErrorHandler::$levels[$error['code']] : 'Unknown Error';\n            } else {\n                $error['type'] = get_class($exception);\n            }\n\n            // Write to log\n            Log::write(\"{$error['type']}: {$error['message']} in {$error['file']} at line {$error['line']}\");\n\n            // Send headers and output\n            @header('Content-Type: text/html; charset=UTF-8');\n\n            if (GELATO_DEVELOPMENT) {\n\n                $error['backtrace'] = $exception->getTrace();\n\n                if ($exception instanceof ErrorException) {\n                    $error['backtrace'] = array_slice($error['backtrace'], 1); //Remove call to error handler from backtrace\n                }\n\n                $error['backtrace']   = self::formatBacktrace($error['backtrace']);\n                $error['highlighted'] = self::highlightCode($error['file'], $error['line']);\n\n                @header('HTTP/1.1 500 Internal Server Error');\n                include 'Resources/Views/Errors/exception.php';\n\n            } else {\n\n                @header('HTTP/1.1 500 Internal Server Error');\n                include 'Resources/Views/Errors/production.php';\n\n            }\n\n        } catch (Exception $e) {\n\n            // Empty output buffers\n            while(ob_get_level() > 0) ob_end_clean();\n\n            echo $e->getMessage() . ' in ' . $e->getFile() . ' (line ' . $e->getLine() . ').';\n        }\n\n        exit(1);\n    }\n}\n"
  },
  {
    "path": "libraries/Gelato/ErrorHandler/Resources/Views/Errors/exception.php",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n<style type=\"text/css\">\nbody {\n    background: #F5F5F5;\n    padding: 0;\n    margin: 0;\n}\n#gelato-error {\n    background:#F5F5F5;\n    color:0;\n    width:100%;\n    font-size:14px;\n    font-family:Verdana, Arial, Helvetica, \"Nimbus Sans\", FreeSans, Malayalam, sans-serif;\n}\n\n#gelato-error pre {\n    font-family:\"Andale Mono\", \"Courier New\", Courier;\n    font-size:12px;\n    margin:0;\n    padding:0;\n}\n\n#gelato-error a {\n    color:#DC143C;\n    text-decoration:none;\n}\n\n#gelato-error .error {\n    background:#DC143C;\n    color:#fff;\n    font-size:24px;\n    font-weight:700;\n    padding:10px;\n\n}\n\n#gelato-error .body {\n    border:0 solid #ccc;\n    padding:10px;\n}\n\n#gelato-error .code {\n    background:#fff;\n    border:1px solid #ccc;\n    overflow:auto;\n}\n\n#gelato-error .heading {\n    background:#444;\n    color:#fff;\n    font-size:18px;\n    font-weight:700;\n    padding:10px;\n}\n\n#gelato-error .line {\n    background:#777;\n    color:#fff;\n    padding-left:4px;\n    padding-right:4px;\n}\n\n#gelato-error .highlighted {\n    background:#fceb71;\n    border-top:1px solid #ccc;\n    border-bottom:1px solid #ccc;\n}\n\n#gelato-error .backtrace {\n    background:#fff;\n    margin-bottom:10px;\n    border:1px solid #ccc;\n    padding:10px;\n}\n\n#gelato-error .backtrace ol {\n    padding-left:40px;\n}\n\n#gelato-error table {\n    border-spacing:0;\n    border-collapse:collapse;\n    border-color:#ddd;\n    border-style:solid;\n    border-width:0 0 1px 1px;\n}\n\n#gelato-error td {\n    font-size:14px;\n    background:#fff;\n    border-color:#ddd;\n    border-style:solid;\n    border-width:1px 1px 0 0;\n    margin:0;\n    padding:4px;\n}\n\n.pull-right {\n    float:right;\n}\n</style>\n<body>\n<div id=\"gelato-error\">\n\n    <div class=\"error\">\n    <?php echo $error['type']; ?><?php if(isset($error['code'])): ?> <span style=\"color:#e1e1e1;padding:0px\">[<?php echo $error['code']; ?>]</span><?php endif; ?>\n    <span class=\"pull-right\">Gelato</span>\n    </div>\n    <div class=\"body\">\n    <strong>Message:</strong> <?php echo htmlspecialchars($error['message'], ENT_COMPAT, 'UTF-8', false); ?>\n\n    <?php if(!empty($error['file'])): ?>\n    <br><br>\n    <strong>Location:</strong> <?php echo $error['file']; ?> (line <?php echo $error['line']; ?>)\n    <?php endif; ?>\n\n    <?php if(!empty($error['highlighted'])): ?>\n    <br><br>\n    <div class=\"code\">\n    <?php foreach($error['highlighted'] as $line): ?>\n    <pre<?php if($line['highlighted']): ?> class=\"highlighted\"<?php endif; ?>><span class=\"line\"><?php echo $line['number']; ?></span> <?php echo $line['code']; ?></pre>\n    <?php endforeach; ?>\n    </div>\n    <?php endif; ?>\n    </div>\n\n    <?php if(!empty($error['backtrace'])): ?>\n    <div class=\"heading\">\n    Backtrace <a href=\"#\" onclick=\"return toggle('backtrace', this);\" style=\"float:right\">+</a>\n    </div>\n    <div class=\"body\" style=\"display:none;\" id=\"backtrace\">\n    <?php foreach($error['backtrace'] as $trace): ?>\n    <div class=\"backtrace\">\n    <p><strong>Function:</strong> <?php echo $trace['function']; ?></p>\n    <?php if(!empty($trace['arguments'])): $id =  md5(uniqid('', true)); ?>\n    <p><strong>Arguments: [<a href=\"#\" onclick=\"return toggle('<?php echo $id; ?>', this);\">+</a>]</strong></p>\n    <div style=\"display:none\" id=\"<?php echo $id; ?>\">\n    <ol>\n    <?php foreach($trace['arguments'] as $arg): ?>\n    <li><pre><?php echo $arg; ?></pre></li>\n    <?php endforeach; ?>\n    </ol>\n    </div>\n    <?php endif; ?>\n    <?php if(!empty($trace['location'])): $id = md5(uniqid('', true)); ?>\n    <p><strong>Location:</strong> <?php echo $trace['location']['file']; ?> (<a href=\"#\" onclick=\"return toggle('<?php echo $id; ?>');\">line <?php echo $trace['location']['line']; ?></a>)</p>\n    <div class=\"code\" style=\"display:none\" id=\"<?php echo $id; ?>\">\n    <?php foreach($trace['location']['code'] as $line): ?>\n    <pre<?php if($line['highlighted']): ?> class=\"highlighted\"<?php endif; ?>><span class=\"line\"><?php echo $line['number']; ?></span> <?php echo $line['code']; ?></pre>\n    <?php endforeach; ?>\n    </div>\n    <?php endif; ?>\n    </div>\n    <?php endforeach; ?>\n    </div>\n    <?php endif; ?>\n\n    <div class=\"heading\">\n    Superglobals <a href=\"#\" onclick=\"return toggle('superglobals', this);\" style=\"float:right\">+</a>\n    </div>\n    <div class=\"body\" style=\"display:none;\" id=\"superglobals\">\n\n    <?php if(!empty($_SERVER)): ?>\n    <p><b>$_SERVER [<a href=\"#\" onclick=\"return toggle('_server', this);\">+</a>]</b></p>\n    <div id=\"_server\" style=\"display:none\">\n    <table width=\"100%\">\n    <?php foreach($_SERVER as $k => $v): ?>\n    <tr>\n    <td width=\"15%\"><?php echo htmlspecialchars($k); ?></td>\n    <td width=\"85%\"><pre><?php ob_start(); var_dump($v); echo htmlspecialchars(ob_get_clean()); ?></pre></td>\n    </tr>\n    <?php endforeach; ?>\n    </table>\n    </div>\n    <?php endif; ?>\n\n    <?php if(!empty($_GET)): ?>\n    <p><b>$_GET [<a href=\"#\" onclick=\"return toggle('_get', this);\">+</a>]</b></p>\n    <div id=\"_get\" style=\"display:none\">\n    <table width=\"100%\">\n    <?php foreach($_GET as $k => $v): ?>\n    <tr>\n    <td width=\"15%\"><?php echo htmlspecialchars($k); ?></td>\n    <td width=\"85%\"><pre><?php ob_start(); var_dump($v); echo htmlspecialchars(ob_get_clean()); ?></pre></td>\n    </tr>\n    <?php endforeach; ?>\n    </table>\n    </div>\n    <?php endif; ?>\n\n    <?php if(!empty($_POST)): ?>\n    <p><b>$_POST [<a href=\"#\" onclick=\"return toggle('_post', this);\">+</a>]</b></p>\n    <div id=\"_post\" style=\"display:none\">\n    <table width=\"100%\">\n    <?php foreach($_POST as $k => $v): ?>\n    <tr>\n    <td width=\"15%\"><?php echo htmlspecialchars($k); ?></td>\n    <td width=\"85%\"><pre><?php ob_start(); var_dump($v); echo htmlspecialchars(ob_get_clean()); ?></pre></td>\n    </tr>\n    <?php endforeach; ?>\n    </table>\n    </div>\n    <?php endif; ?>\n\n    <?php if(!empty($_FILES)): ?>\n    <p><b>$_FILES [<a href=\"#\" onclick=\"return toggle('_files', this);\">+</a>]</b></p>\n    <div id=\"_files\" style=\"display:none\">\n    <table width=\"100%\">\n    <?php foreach($_FILES as $k => $v): ?>\n    <tr>\n    <td width=\"15%\"><?php echo htmlspecialchars($k); ?></td>\n    <td width=\"85%\"><pre><?php ob_start(); var_dump($v); echo htmlspecialchars(ob_get_clean()); ?></pre></td>\n    </tr>\n    <?php endforeach; ?>\n    </table>\n    </div>\n    <?php endif; ?>\n\n    <?php if(!empty($_COOKIE)): ?>\n    <p><b>$_COOKIE [<a href=\"#\" onclick=\"return toggle('_cookie', this);\">+</a>]</b></p>\n    <div id=\"_cookie\" style=\"display:none\">\n    <table width=\"100%\">\n    <?php foreach($_COOKIE as $k => $v): ?>\n    <tr>\n    <td width=\"15%\"><?php echo htmlspecialchars($k); ?></td>\n    <td width=\"85%\"><?php ob_start(); var_dump($v); echo htmlspecialchars(ob_get_clean()); ?></td>\n    </tr>\n    <?php endforeach; ?>\n    </table>\n    </div>\n    <?php endif; ?>\n\n    <?php if(!empty($_SESSION)): ?>\n    <p><b>$_SESSION [<a href=\"#\" onclick=\"return toggle('_session', this);\">+</a>]</b></p>\n    <div id=\"_session\" style=\"display:none\">\n    <table width=\"100%\">\n    <?php foreach($_SESSION as $k => $v): ?>\n    <tr>\n    <td width=\"15%\"><?php echo htmlspecialchars($k); ?></td>\n    <td width=\"85%\"><pre><?php ob_start(); var_dump($v); echo htmlspecialchars(ob_get_clean()); ?></pre></td>\n    </tr>\n    <?php endforeach; ?>\n    </table>\n    </div>\n    <?php endif; ?>\n\n    <?php if(!empty($_ENV)): ?>\n    <p><b>$_ENV [<a href=\"#\" onclick=\"return toggle('_env', this);\">+</a>]</b></p>\n    <div id=\"_env\" style=\"display:none\">\n    <table width=\"100%\">\n    <?php foreach($_ENV as $k => $v): ?>\n    <tr>\n    <td width=\"15%\"><?php echo htmlspecialchars($k); ?></td>\n    <td width=\"85%\"><pre><?php ob_start(); var_dump($v); echo htmlspecialchars(ob_get_clean()); ?></pre></td>\n    </tr>\n    <?php endforeach; ?>\n    </table>\n    </div>\n    <?php endif; ?>\n    </div>\n\n    <div class=\"heading\">\n    Included Files <a href=\"#\" onclick=\"return toggle('files', this);\" style=\"float:right\">+</a>\n    </div>\n    <div class=\"body\" style=\"display:none;\" id=\"files\">\n    <table width=\"100%\">\n    <?php foreach(get_included_files() as $k => $v): ?>\n    <tr>\n    <td width=\"5%\"><?php echo $k + 1; ?></td>\n    <td width=\"95%\"><?php echo $v; ?></td>\n    </tr>\n    <?php endforeach; ?>\n    </table>\n    </div>\n    <div style=\"padding-top:20px;padding-bottom:20px; padding-left:10px;\">\n        <a href=\"http://monstra.org\">MONSTRA</a>\n        <a href=\"http://gelato.monstra.org\">GELATO</a>\n    </div>\n</div>\n\n<script type=\"text/javascript\">\nfunction toggle(id, link)\n{\n    var div = document.getElementById(id);\n\n    if (div.style.display == \"none\") {\n        if (link != null) {\n            link.innerHTML    = '-';\n        }\n        div.style.display = \"block\";\n    } else {\n        if (link != null) {\n            link.innerHTML    = '+';\n        }\n        div.style.display = \"none\";\n    }\n\n    return false;\n}\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "libraries/Gelato/ErrorHandler/Resources/Views/Errors/production.php",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n<style type=\"text/css\">\nbody {\n    height:100%;\n    background:#eee;\n    padding:0px;\n    margin:0px;\n    height: 100%;\n    font-size: 100%;\n    color:#333;\n    font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n    line-height: 100%;\n}\na {\n    color:#0088cc;\n    text-decoration:none;\n}\na:hover {\n    color:#005580;\n    text-decoration:underline;\n}\nh1 {\n    font-size: 4em;\n}\nsmall {\n    font-size: 0.7em;\n    color: #999;\n    font-weight: normal;\n}\nhr {\n    border:0px;\n    border-bottom:1px #ddd solid;\n}\n#message {\n    width: 700px;\n    margin: 15% auto;\n}\n</style>\n</head>\n<body>\n    <div id=\"message\">\n        <h1>Error</h1>\n        <hr>\n        <p>Aw, snap! An error has occurred while processing your request.</p>\n    </div>\n</body>\n</html>\n"
  },
  {
    "path": "libraries/Gelato/FileSystem/Dir.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Dir\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Creates a directory\n     *\n     *  <code>\n     *      Dir::create('folder1');\n     *  </code>\n     *\n     * @param  string  $dir   Name of directory to create\n     * @param  integer $chmod Chmod\n     * @return boolean\n     */\n    public static function create($dir, $chmod = 0775)\n    {\n        // Redefine vars\n        $dir = (string) $dir;\n\n        // Create new dir if $dir !exists\n        return ( ! Dir::exists($dir)) ? @mkdir($dir, $chmod, true) : true;\n    }\n\n    /**\n     * Checks if this directory exists.\n     *\n     *  <code>\n     *      if (Dir::exists('folder1')) {\n     *          // Do something...\n     *      }\n     *  </code>\n     *\n     * @param  string  $dir Full path of the directory to check.\n     * @return boolean\n     */\n    public static function exists($dir)\n    {\n        // Redefine vars\n        $dir = (string) $dir;\n\n        // Directory exists\n        if (file_exists($dir) && is_dir($dir)) return true;\n\n        // Doesn't exist\n        return false;\n    }\n\n\n    /**\n     * Check dir permission\n     *\n     *  <code>\n     *      echo Dir::checkPerm('folder1');\n     *  </code>\n     *\n     * @param  string $dir Directory to check\n     * @return string\n     */\n    public static function checkPerm($dir)\n    {\n        // Redefine vars\n        $dir = (string) $dir;\n\n        // Clear stat cache\n        clearstatcache();\n\n        // Return perm\n        return substr(sprintf('%o', fileperms($dir)), -4);\n    }\n\n\n    /**\n     * Delete directory\n     *\n     *  <code>\n     *      Dir::delete('folder1');\n     *  </code>\n     *\n     * @param string $dir Name of directory to delete\n     */\n    public static function delete($dir)\n    {\n        // Redefine vars\n        $dir = (string) $dir;\n\n        // Delete dir\n        if (is_dir($dir)){$ob=scandir($dir);foreach ($ob as $o) {if ($o!='.'&&$o!='..') {if(filetype($dir.'/'.$o)=='dir')Dir::delete($dir.'/'.$o); else unlink($dir.'/'.$o);}}}\n        reset($ob); rmdir($dir);\n    }\n\n\n    /**\n     * Get list of directories\n     *\n     *  <code>\n     *      $dirs = Dir::scan('folders');\n     *  </code>\n     *\n     * @param string $dir Directory\n     */\n    public static function scan($dir)\n    {\n        // Redefine vars\n        $dir = (string) $dir;\n\n        // Scan dir\n        if (is_dir($dir)&&$dh=opendir($dir)){$f=array();while ($fn=readdir($dh)) {if($fn!='.'&&$fn!='..'&&is_dir($dir.DS.$fn))$f[]=$fn;}return$f;}\n    }\n\n\n    /**\n     * Check if a directory is writable.\n     *\n     *  <code>\n     *      if (Dir::writable('folder1')) {\n     *          // Do something...\n     *      }\n     *  </code>\n     *\n     * @param  string   $path The path to check.\n     * @return booleans\n     */\n    public static function writable($path)\n    {\n        // Redefine vars\n        $path = (string) $path;\n\n        // Create temporary file\n        $file = tempnam($path, 'writable');\n\n        // File has been created\n        if ($file !== false) {\n\n            // Remove temporary file\n            File::delete($file);\n\n            //  Writable\n            return true;\n        }\n\n        // Else not writable\n        return false;\n    }\n\n\n    /**\n     * Get directory size.\n     *\n     *  <code>\n     *      echo Dir::size('folder1');\n     *  </code>\n     *\n     * @param  string  $path The path to directory.\n     * @return integer\n     */\n    public static function size($path)\n    {\n        // Redefine vars\n        $path = (string) $path;\n\n        $total_size = 0;\n        $files = scandir($path);\n        $clean_path = rtrim($path, '/') . '/';\n\n        foreach ($files as $t) {\n            if ($t <> \".\" && $t <> \"..\") {\n                $current_file = $clean_path . $t;\n                if (is_dir($current_file)) {\n                    $total_size += Dir::size($current_file);\n                } else {\n                    $total_size += filesize($current_file);\n                }\n            }\n        }\n\n        // Return total size\n        return $total_size;\n    }\n\n    /**\n     * Copy directory.\n     * <code>\n     *      Dir::copy('source_folder_path', 'destination_folder_path);\n     *  </code>\n     * @param $src\n     * @param $dst\n     */\n    public static function copy($src, $dst) {\n        $dir = opendir($src);\n        @mkdir($dst);\n        while(false !== ( $file = readdir($dir)) ) {\n            if (( $file != '.' ) && ( $file != '..' )) {\n                if ( is_dir($src .'/'. $file) ) {\n                    self::copy($src .'/'. $file, $dst .'/'. $file);\n                } else {\n                    copy($src .'/'. $file,$dst .'/'. $file);\n                }\n            }\n        }\n        closedir($dir);\n    }\n}\n"
  },
  {
    "path": "libraries/Gelato/FileSystem/File.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass File\n{\n    /**\n     * Mime type list\n     *\n     * @var array\n     */\n    public static $mime_types = array(\n        'aac'        => 'audio/aac',\n        'atom'       => 'application/atom+xml',\n        'avi'        => 'video/avi',\n        'bmp'        => 'image/x-ms-bmp',\n        'c'          => 'text/x-c',\n        'class'      => 'application/octet-stream',\n        'css'        => 'text/css',\n        'csv'        => 'text/csv',\n        'deb'        => 'application/x-deb',\n        'dll'        => 'application/x-msdownload',\n        'dmg'        => 'application/x-apple-diskimage',\n        'doc'        => 'application/msword',\n        'docx'       => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n        'exe'        => 'application/octet-stream',\n        'flv'        => 'video/x-flv',\n        'gif'        => 'image/gif',\n        'gz'         => 'application/x-gzip',\n        'h'          => 'text/x-c',\n        'htm'        => 'text/html',\n        'html'       => 'text/html',\n        'ini'        => 'text/plain',\n        'jar'        => 'application/java-archive',\n        'java'       => 'text/x-java',\n        'jpeg'       => 'image/jpeg',\n        'jpg'        => 'image/jpeg',\n        'js'         => 'text/javascript',\n        'json'       => 'application/json',\n        'mid'        => 'audio/midi',\n        'midi'       => 'audio/midi',\n        'mka'        => 'audio/x-matroska',\n        'mkv'        => 'video/x-matroska',\n        'mp3'        => 'audio/mpeg',\n        'mp4'        => 'application/mp4',\n        'mpeg'       => 'video/mpeg',\n        'mpg'        => 'video/mpeg',\n        'odt'        => 'application/vnd.oasis.opendocument.text',\n        'ogg'        => 'audio/ogg',\n        'pdf'        => 'application/pdf',\n        'php'        => 'text/x-php',\n        'png'        => 'image/png',\n        'psd'        => 'image/vnd.adobe.photoshop',\n        'py'         => 'application/x-python',\n        'ra'         => 'audio/vnd.rn-realaudio',\n        'ram'        => 'audio/vnd.rn-realaudio',\n        'rar'        => 'application/x-rar-compressed',\n        'rss'        => 'application/rss+xml',\n        'safariextz' => 'application/x-safari-extension',\n        'sh'         => 'text/x-shellscript',\n        'shtml'      => 'text/html',\n        'swf'        => 'application/x-shockwave-flash',\n        'tar'        => 'application/x-tar',\n        'tif'        => 'image/tiff',\n        'tiff'       => 'image/tiff',\n        'torrent'    => 'application/x-bittorrent',\n        'txt'        => 'text/plain',\n        'wav'        => 'audio/wav',\n        'webp'       => 'image/webp',\n        'wma'        => 'audio/x-ms-wma',\n        'xls'        => 'application/vnd.ms-excel',\n        'xml'        => 'text/xml',\n        'zip'        => 'application/zip',\n    );\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Returns true if the File exists.\n     *\n     *  <code>\n     *      if (File::exists('filename.txt')) {\n     *          // Do something...\n     *      }\n     *  </code>\n     *\n     * @param  string  $filename The file name\n     * @return boolean\n     */\n    public static function exists($filename)\n    {\n        // Redefine vars\n        $filename = (string) $filename;\n\n        // Return\n        return (file_exists($filename) && is_file($filename));\n    }\n\n    /**\n     * Delete file\n     *\n     *  <code>\n     *      File::delete('filename.txt');\n     *  </code>\n     *\n     * @param  mixed   $filename The file name or array of files\n     * @return boolean\n     */\n    public static function delete($filename)\n    {\n        // Is array\n        if (is_array($filename)) {\n\n            // Delete each file in $filename array\n            foreach ($filename as $file) {\n                @unlink((string) $file);\n            }\n\n        } else {\n            // Is string\n            return @unlink((string) $filename);\n        }\n\n    }\n\n    /**\n     * Rename file\n     *\n     *  <code>\n     *      File::rename('filename1.txt', 'filename2.txt');\n     *  </code>\n     *\n     * @param  string  $from Original file location\n     * @param  string  $to   Desitination location of the file\n     * @return boolean\n     */\n    public static function rename($from, $to)\n    {\n        // Redefine vars\n        $from = (string) $from;\n        $to   = (string) $to;\n\n        // If file exists $to than rename it\n        if ( ! File::exists($to)) return rename($from, $to);\n\n        // Else return false\n        return false;\n    }\n\n    /**\n     * Copy file\n     *\n     *  <code>\n     *      File::copy('folder1/filename.txt', 'folder2/filename.txt');\n     *  </code>\n     *\n     * @param  string  $from Original file location\n     * @param  string  $to   Desitination location of the file\n     * @return boolean\n     */\n    public static function copy($from, $to)\n    {\n        // Redefine vars\n        $from = (string) $from;\n        $to   = (string) $to;\n\n        // If file !exists $from and exists $to then return false\n        if ( ! File::exists($from) || File::exists($to)) return false;\n\n        // Else copy file\n        return copy($from, $to);\n    }\n\n    /**\n     * Get the File extension.\n     *\n     *  <code>\n     *      echo File::ext('filename.txt');\n     *  </code>\n     *\n     * @param  string $filename The file name\n     * @return string\n     */\n    public static function ext($filename)\n    {\n        // Redefine vars\n        $filename = (string) $filename;\n\n        // Return file extension\n        return substr(strrchr($filename, '.'), 1);\n    }\n\n    /**\n     * Get the File name\n     *\n     *  <code>\n     *      echo File::name('filename.txt');\n     *  </code>\n     *\n     * @param  string $filename The file name\n     * @return string\n     */\n    public static function name($filename)\n    {\n        // Redefine vars\n        $filename = (string) $filename;\n\n        // Return filename\n        return basename($filename, '.'.File::ext($filename));\n    }\n\n    /**\n     * Get list of files in directory recursive\n     *\n     *  <code>\n     *      $files = File::scan('folder');\n     *      $files = File::scan('folder', 'txt');\n     *      $files = File::scan('folder', array('txt', 'log'));\n     *  </code>\n     *\n     * @param  string $folder Folder\n     * @param  mixed  $type   Files types\n     * @return array\n     */\n    public static function scan($folder, $type = null)\n    {\n        $data = array();\n        if (is_dir($folder)) {\n            $iterator = new RecursiveDirectoryIterator($folder);\n            foreach (new RecursiveIteratorIterator($iterator) as $file) {\n                if ($type !== null) {\n                    if (is_array($type)) {\n                        $file_ext = substr(strrchr($file->getFilename(), '.'), 1);\n                        if (in_array($file_ext, $type)) {\n                            if (strpos($file->getFilename(), $file_ext, 1)) {\n                                $data[] = $file->getFilename();\n                            }\n                        }\n                    } else {\n                        if (strpos($file->getFilename(), $type, 1)) {\n                            $data[] = $file->getFilename();\n                        }\n                    }\n                } else {\n                    if ($file->getFilename() !== '.' && $file->getFilename() !== '..') $data[] = $file->getFilename();\n                }\n            }\n\n            return $data;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * Fetch the content from a file or URL.\n     *\n     *  <code>\n     *      echo File::getContent('filename.txt');\n     *  </code>\n     *\n     * @param  string  $filename The file name\n     * @return boolean\n     */\n    public static function getContent($filename)\n    {\n        // Redefine vars\n        $filename = (string) $filename;\n\n        // If file exists load it\n        if (File::exists($filename)) {\n            return file_get_contents($filename);\n        }\n    }\n\n    /**\n     * Writes a string to a file.\n     *\n     * @param  string  $filename   The path of the file.\n     * @param  string  $content    The content that should be written.\n     * @param  boolean $createFile Should the file be created if it doesn't exists?\n     * @param  boolean $append     Should the content be appended if the file already exists?\n     * @param  integer $chmod      Mode that should be applied on the file.\n     * @return boolean\n     */\n    public static function setContent($filename, $content, $create_file = true, $append = false, $chmod = 0666)\n    {\n        // Redefine vars\n        $filename    = (string) $filename;\n        $content     = (string) $content;\n        $create_file = (bool) $create_file;\n        $append      = (bool) $append;\n\n        // File may not be created, but it doesn't exist either\n        if ( ! $create_file && File::exists($filename)) throw new RuntimeException(vsprintf(\"%s(): The file '{$filename}' doesn't exist\", array(__METHOD__)));\n\n        // Create directory recursively if needed\n        Dir::create(dirname($filename));\n\n        // Create file & open for writing\n        $handler = ($append) ? @fopen($filename, 'a') : @fopen($filename, 'w');\n\n        // Something went wrong\n        if ($handler === false) throw new RuntimeException(vsprintf(\"%s(): The file '{$filename}' could not be created. Check if PHP has enough permissions.\", array(__METHOD__)));\n\n        // Store error reporting level\n        $level = error_reporting();\n\n        // Disable errors\n        error_reporting(0);\n\n        // Write to file\n        $write = fwrite($handler, $content);\n\n        // Validate write\n        if($write === false) throw new RuntimeException(vsprintf(\"%s(): The file '{$filename}' could not be created. Check if PHP has enough permissions.\", array(__METHOD__)));\n\n        // Close the file\n        fclose($handler);\n\n        // Chmod file\n        chmod($filename, $chmod);\n\n        // Restore error reporting level\n        error_reporting($level);\n\n        // Return\n        return true;\n    }\n\n    /**\n     * Get time(in Unix timestamp) the file was last changed\n     *\n     *  <code>\n     *      echo File::lastChange('filename.txt');\n     *  </code>\n     *\n     * @param  string  $filename The file name\n     * @return boolean\n     */\n    public static function lastChange($filename)\n    {\n        // Redefine vars\n        $filename = (string) $filename;\n\n        // If file exists return filemtime\n        if (File::exists($filename)) {\n            return filemtime($filename);\n        }\n\n        // Return\n        return false;\n\n    }\n\n    /**\n     * Get last access time\n     *\n     *  <code>\n     *      echo File::lastAccess('filename.txt');\n     *  </code>\n     *\n     * @param  string  $filename The file name\n     * @return boolean\n     */\n    public static function lastAccess($filename)\n    {\n        // Redefine vars\n        $filename = (string) $filename;\n\n        // If file exists return fileatime\n        if (File::exists($filename)) {\n            return fileatime($filename);\n        }\n\n        // Return\n        return false;\n    }\n\n    /**\n     * Returns the mime type of a file. Returns false if the mime type is not found.\n     *\n     *  <code>\n     *      echo File::mime('filename.txt');\n     *  </code>\n     *\n     * @param  string  $file  Full path to the file\n     * @param  boolean $guess Set to false to disable mime type guessing\n     * @return string\n     */\n    public static function mime($file, $guess = true)\n    {\n        // Redefine vars\n        $file  = (string) $file;\n        $guess = (bool) $guess;\n\n        // Get mime using the file information functions\n        if (function_exists('finfo_open')) {\n\n            $info = finfo_open(FILEINFO_MIME_TYPE);\n\n            $mime = finfo_file($info, $file);\n\n            finfo_close($info);\n\n            return $mime;\n\n        } else {\n\n            // Just guess mime by using the file extension\n            if ($guess === true) {\n\n                $mime_types = File::$mime_types;\n\n                $extension = pathinfo($file, PATHINFO_EXTENSION);\n\n                return isset($mime_types[$extension]) ? $mime_types[$extension] : false;\n            } else {\n                return false;\n            }\n        }\n    }\n\n    /**\n     * Forces a file to be downloaded.\n     *\n     *  <code>\n     *      File::download('filename.txt');\n     *  </code>\n     *\n     * @param string  $file         Full path to file\n     * @param string  $content_type Content type of the file\n     * @param string  $filename     Filename of the download\n     * @param integer $kbps         Max download speed in KiB/s\n     */\n    public static function download($file, $content_type = null, $filename = null, $kbps = 0)\n    {\n        // Redefine vars\n        $file         = (string) $file;\n        $content_type = ($content_type === null) ? null : (string) $content_type;\n        $filename     = ($filename === null) ? null : (string) $filename;\n        $kbps         = (int) $kbps;\n\n        // Check that the file exists and that its readable\n        if (file_exists($file) === false || is_readable($file) === false) {\n            throw new RuntimeException(vsprintf(\"%s(): Failed to open stream.\", array(__METHOD__)));\n        }\n\n        // Empty output buffers\n        while (ob_get_level() > 0) ob_end_clean();\n\n        // Send headers\n        if ($content_type === null) $content_type = File::mime($file);\n\n        if ($filename === null) $filename = basename($file);\n\n        header('Content-type: ' . $content_type);\n        header('Content-Disposition: attachment; filename=\"' . $filename . '\"');\n        header('Content-Length: ' . filesize($file));\n\n        // Read file and write it to the output\n        @set_time_limit(0);\n\n        if ($kbps === 0) {\n\n            readfile($file);\n\n        } else {\n\n            $handle = fopen($file, 'r');\n\n            while ( ! feof($handle) && !connection_aborted()) {\n\n                $s = microtime(true);\n\n                echo fread($handle, round($kbps * 1024));\n\n                if (($wait = 1e6 - (microtime(true) - $s)) > 0) usleep($wait);\n\n            }\n\n            fclose($handle);\n        }\n\n        exit();\n    }\n\n    /**\n     * Display a file in the browser.\n     *\n     *  <code>\n     *      File::display('filename.txt');\n     *  </code>\n     *\n     * @param string $file         Full path to file\n     * @param string $content_type Content type of the file\n     * @param string $filename     Filename of the download\n     */\n    public static function display($file, $content_type = null, $filename = null)\n    {\n        // Redefine vars\n        $file         = (string) $file;\n        $content_type = ($content_type === null) ? null : (string) $content_type;\n        $filename     = ($filename === null) ? null : (string) $filename;\n\n        // Check that the file exists and that its readable\n        if (file_exists($file) === false || is_readable($file) === false) {\n            throw new RuntimeException(vsprintf(\"%s(): Failed to open stream.\", array(__METHOD__)));\n        }\n\n        // Empty output buffers\n        while (ob_get_level() > 0) ob_end_clean();\n\n        // Send headers\n        if ($content_type === null) $content_type = File::mime($file);\n\n        if($filename === null) $filename = basename($file);\n\n        header('Content-type: ' . $content_type);\n        header('Content-Disposition: inline; filename=\"' . $filename . '\"');\n        header('Content-Length: ' . filesize($file));\n\n        // Read file and write to output\n        readfile($file);\n\n        exit();\n    }\n\n    /**\n     * Tests whether a file is writable for anyone.\n     *\n     *  <code>\n     *      if (File::writable('filename.txt')) {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param  string  $file File to check\n     * @return boolean\n     */\n    public static function writable($file)\n    {\n        // Redefine vars\n        $file = (string) $file;\n\n        // Is file exists ?\n        if ( ! file_exists($file)) throw new RuntimeException(vsprintf(\"%s(): The file '{$file}' doesn't exist\", array(__METHOD__)));\n\n        // Gets file permissions\n        $perms = fileperms($file);\n\n        // Is writable ?\n        if (is_writable($file) || ($perms & 0x0080) || ($perms & 0x0010) || ($perms & 0x0002)) return true;\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Form/Form.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Form\n{\n    /**\n     * The registered custom macros.\n     *\n     * @var array\n     */\n    public static $macros = array();\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Registers a custom macro.\n     *\n     *  <code>\n     *\n     *      // Registering a Form macro\n     *      Form::macro('my_field', function() {\n     *          return '<input type=\"text\" name=\"my_field\">';\n     *      });\n     *\n     *      // Calling a custom Form macro\n     *      echo Form::my_field();\n     *\n     *\n     *      // Registering a Form macro with parameters\n     *      Form::macro('my_field', function($value = '') {\n     *          return '<input type=\"text\" name=\"my_field\" value=\"'.$value.'\">';\n     *      });\n     *\n     *      // Calling a custom Form macro with parameters\n     *      echo Form::my_field('Monstra');\n     *\n     *  </code>\n     *\n     * @param string  $name  Name\n     * @param Closure $macro Macro\n     */\n    public static function macro($name, $macro)\n    {\n        Form::$macros[$name] = $macro;\n    }\n\n    /**\n     * Create an opening HTML form tag.\n     *\n     *  <code>\n     *      // Form will submit back to the current page using POST\n     *      echo Form::open();\n     *\n     *      // Form will submit to 'search' using GET\n     *      echo Form::open('search', array('method' => 'get'));\n     *\n     *      // When \"file\" inputs are present, you must include the \"enctype\"\n     *      echo Form::open(null, array('enctype' => 'multipart/form-data'));\n     *  </code>\n     *\n     * @param mixed $action     Form action, defaults to the current request URI.\n     * @param array $attributes HTML attributes.\n     * @uses   Url::base\n     * @uses   Html::attributes\n     * @return string\n     */\n    public static function open($action = null, array $attributes = null)\n    {\n        if (! $action) {\n\n            // Submits back to the current url\n            $action = '';\n\n        } elseif (strpos($action, '://') === false) {\n\n            // Make the URI absolute\n            $action = Url::base() . '/' . $action;\n        }\n\n        // Add the form action to the attributes\n        $attributes['action'] = $action;\n\n        if ( ! isset($attributes['method'])) {\n\n            // Use POST method\n            $attributes['method'] = 'post';\n        }\n\n        return '<form'.Html::attributes($attributes).'>';\n    }\n\n    /**\n     * Create a form input.\n     * Text is default input type.\n     *\n     *  <code>\n     *      echo Form::input('username', $username);\n     *  </code>\n     *\n     * @param string $name       Input name\n     * @param string $value      Input value\n     * @param array  $attributes HTML attributes\n     * @uses   Html::attributes\n     * @return string\n     */\n    public static function input($name, $value = null, array $attributes = null)\n    {\n        // Set the input name\n        $attributes['name'] = $name;\n\n        // Set the input id\n        $attributes['id'] = (isset($attributes['id']))?$attributes['id']:$name;\n\n        // Set the input value\n        $attributes['value'] = $value;\n\n        if ( ! isset($attributes['type'])) {\n            // Default type is text\n            $attributes['type'] = 'text';\n        }\n\n        return '<input'.Html::attributes($attributes).'>';\n    }\n\n    /**\n     * Create a hidden form input.\n     *\n     *  <code>\n     *      echo Form::hidden('user_id', $user_id);\n     *  </code>\n     *\n     * @param string $name       Input name\n     * @param string $value      Input value\n     * @param array  $attributes HTML attributes\n     * @uses   Form::input\n     * @return string\n     */\n    public static function hidden($name, $value = null, array $attributes = null)\n    {\n        // Set the input type\n        $attributes['type'] = 'hidden';\n\n        return Form::input($name, $value, $attributes);\n    }\n\n    /**\n     * Creates a password form input.\n     *\n     *  <code>\n     *     echo Form::password('password');\n     *  </code>\n     *\n     * @param string $name       Input name\n     * @param string $value      Input value\n     * @param array  $attributes HTML attributes\n     * @uses   Form::input\n     * @return string\n     */\n    public static function password($name, $value = null, array $attributes = null)\n    {\n        // Set the input type\n        $attributes['type'] = 'password';\n\n        return Form::input($name, $value, $attributes);\n    }\n\n    /**\n     * Creates a file upload form input.\n     *\n     *  <code>\n     *      echo Form::file('image');\n     *  </code>\n     *\n     * @param string $name       Input name\n     * @param array  $attributes HTML attributes\n     * @uses   Form::input\n     * @return string\n     */\n    public static function file($name, array $attributes = null)\n    {\n        // Set the input type\n        $attributes['type'] = 'file';\n\n        return Form::input($name, null, $attributes);\n    }\n\n    /**\n     * Creates a checkbox form input.\n     *\n     *  <code>\n     *      echo Form::checkbox('i_am_not_a_robot');\n     *  </code>\n     *\n     * @param string  $name       Input name\n     * @param string  $input      Input value\n     * @param boolean $checked    Checked status\n     * @param array   $attributes HTML attributes\n     * @uses   Form::input\n     * @return string\n     */\n    public static function checkbox($name, $value = null, $checked = false, array $attributes = null)\n    {\n        // Set the input type\n        $attributes['type'] = 'checkbox';\n\n        if ($checked === true) {\n            // Make the checkbox active\n            $attributes['checked'] = 'checked';\n        }\n\n        return Form::input($name, $value, $attributes);\n    }\n\n    /**\n     * Creates a radio form input.\n     *\n     *  <code>\n     *      echo Form::radio('i_am_not_a_robot');\n     *  </code>\n     *\n     * @param string  $name       Input name\n     * @param string  $value      Input value\n     * @param boolean $checked    Checked status\n     * @param array   $attributes HTML attributes\n     * @uses   Form::input\n     * @return string\n     */\n    public static function radio($name, $value = null, $checked = null, array $attributes = null)\n    {\n        // Set the input type\n        $attributes['type'] = 'radio';\n\n        if ($checked === true) {\n            // Make the radio active\n            $attributes['checked'] = 'checked';\n        }\n\n        return Form::input($name, $value, $attributes);\n    }\n\n    /**\n     * Creates a textarea form input.\n     *\n     *  <code>\n     *      echo Form::textarea('text', $text);\n     *  </code>\n     *\n     * @param string $name       Name\n     * @param string $body       Body\n     * @param array  $attributes HTML attributes\n     * @uses   Html::attributes\n     * @return string\n     */\n    public static function textarea($name, $body = '', array $attributes = null)\n    {\n        // Set the input name\n        $attributes['name'] = $name;\n\n        // Set the input id\n        $attributes['id'] = (isset($attributes['id']))?$attributes['id']:$name;\n\n        return '<textarea'.Html::attributes($attributes).'>'.$body.'</textarea>';\n    }\n\n    /**\n     * Creates a select form input.\n     *\n     *  <code>\n     *      echo Form::select('themes', array('default', 'classic', 'modern'));\n     *  </code>\n     *\n     * @param string $name       Name\n     * @param array  $options    Options array\n     * @param string $selected   Selected option\n     * @param array  $attributes HTML attributes\n     * @uses   Html::attributes\n     * @return string\n     */\n    public static function select($name, array $options = null, $selected = null, array $attributes = null)\n    {\n        // Set the input name\n        $attributes['name'] = $name;\n\n        // Set the input id\n        $attributes['id'] = (isset($attributes['id']))?$attributes['id']:$name;\n\n        $options_output = '';\n\n        foreach ($options as $value => $name) {\n            if ($selected == $value) $current = ' selected '; else $current = '';\n            $options_output .= '<option value=\"'.$value.'\" '.$current.'>'.$name.'</option>';\n        }\n\n        return '<select'.Html::attributes($attributes).'>'.$options_output.'</select>';\n    }\n\n    /**\n     * Creates a submit form input.\n     *\n     *  <code>\n     *      echo Form::submit('save', 'Save');\n     *  </code>\n     *\n     * @param string $name       Input name\n     * @param string $value      Input value\n     * @param array  $attributes HTML attributes\n     * @uses   Form::input\n     * @return string\n     */\n    public static function submit($name, $value, array $attributes = null)\n    {\n        // Set the input type\n        $attributes['type'] = 'submit';\n\n        return Form::input($name, $value, $attributes);\n    }\n\n    /**\n     * Creates a button form input.\n     *\n     *  <code>\n     *      echo Form::button('save', 'Save Profile', array('type' => 'submit'));\n     *  </code>\n     *\n     * @param string $name       Input name\n     * @param string $value      Input value\n     * @param array  $attributes HTML attributes\n     * @uses   Html::attributes\n     * @return string\n     */\n    public static function button($name, $body, array $attributes = null)\n    {\n        // Set the input name\n        $attributes['name'] = $name;\n\n        return '<button'.Html::attributes($attributes).'>'.$body.'</button>';\n    }\n\n    /**\n     * Creates a form label.\n     *\n     *  <code>\n     *      echo Form::label('username', 'Username');\n     *  </code>\n     *\n     * @param string $input      Target input\n     * @param string $text       Label text\n     * @param array  $attributes HTML attributes\n     * @uses   Html::attributes\n     * @return string\n     */\n    public static function label($input, $text, array $attributes = null)\n    {\n        // Set the label target\n        $attributes['for'] = $input;\n\n        return '<label'.Html::attributes($attributes).'>'.$text.'</label>';\n    }\n\n    /**\n     * Create closing form tag.\n     *\n     *  <code>\n     *      echo Form::close();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function close()\n    {\n        return '</form>';\n    }\n\n    /**\n     * Dynamically handle calls to custom macros.\n     *\n     * @param  string $method\n     * @param  array  $parameters\n     * @return mixed\n     */\n    public static function __callStatic($method, $parameters)\n    {\n        if (isset(Form::$macros[$method])) {\n            return call_user_func_array(Form::$macros[$method], $parameters);\n        }\n\n        throw new RuntimeException(\"Method [$method] does not exist.\");\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Gelato.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n/**\n * The version of Gelato\n */\ndefine('GELATO_VERSION', '1.0.3');\n\n/** \n * Define __DIR__ constant for PHP 5.2.x\n */\nif ( ! defined('__DIR__')) {\n    define('__DIR__', dirname(__FILE__));\n}\n\n/**\n * Display Gelato Errors or not ?\n */\nif ( ! defined('GELATO_DEVELOPMENT')) {\n    define('GELATO_DEVELOPMENT', true);\n}\n\n/**\n * Use Gelato Class Loader or not ?\n */\nif ( ! defined('GELATO_CLASS_LOADER')) {\n    define('GELATO_CLASS_LOADER', true);\n}\n\n/**\n * Load Gelato Logger\n */\nrequire_once __DIR__ . '/Log/Log.php';\n\n/**\n * Use Gelato Logger default path or not ?\n */\nif ( ! defined('GELATO_LOGS_PATH')) {\n    define('GELATO_LOGS_PATH', __DIR__. '/_logs');\n}\n\n/**\n * Configure Gelato Logger\n */\nLog::configure('path', GELATO_LOGS_PATH);\n\n/**\n * Load Gelato Error Handler\n */\nrequire_once __DIR__ . '/ErrorHandler/ErrorHandler.php';\n\n/**\n * Set Error Handler\n */\nset_error_handler('ErrorHandler::error');\n\n/**\n * Set Fatal Error Handler\n */\nregister_shutdown_function('ErrorHandler::fatal');\n\n/**\n * Set Exception Handler\n */\nset_exception_handler('ErrorHandler::exception');\n\n/**\n * Gelato Class Loader\n */\nrequire_once __DIR__ . '/ClassLoader/ClassLoader.php';\n\n/**\n * Map all Gelato Classes\n */\nClassLoader::mapClasses(array(\n    'Agent'        => __DIR__.'/Agent/Agent.php',\n    'Arr'          => __DIR__.'/Arr/Arr.php',\n    'Cache'        => __DIR__.'/Cache/Cache.php',\n    'Cookie'       => __DIR__.'/Cookie/Cookie.php',\n    'Curl'         => __DIR__.'/Curl/Curl.php',\n    'Date'         => __DIR__.'/Date/Date.php',\n    'Debug'        => __DIR__.'/Debug/Debug.php',\n    'File'         => __DIR__.'/FileSystem/File.php',\n    'Dir'          => __DIR__.'/FileSystem/Dir.php',\n    'Form'         => __DIR__.'/Form/Form.php',\n    'Html'         => __DIR__.'/Html/Html.php',\n    'Image'        => __DIR__.'/Image/Image.php',\n    'Inflector'    => __DIR__.'/Inflector/Inflector.php',\n    'MinifyCSS'    => __DIR__.'/Minify/MinifyCSS.php',\n    'MinifyHTML'   => __DIR__.'/Minify/MinifyHTML.php',\n    'MinifyJS'     => __DIR__.'/Minify/MinifyJS.php',\n    'Notification' => __DIR__.'/Notification/Notification.php',\n    'Number'       => __DIR__.'/Number/Number.php',\n    'Registry'     => __DIR__.'/Registry/Registry.php',\n    'Request'      => __DIR__.'/Http/Request.php',\n    'Response'     => __DIR__.'/Http/Response.php',\n    'Token'        => __DIR__.'/Security/Token.php',\n    'Text'         => __DIR__.'/Text/Text.php',\n    'Session'      => __DIR__.'/Session/Session.php',\n    'Url'          => __DIR__.'/Url/Url.php',\n    'Valid'        => __DIR__.'/Validation/Valid.php',\n    'Zip'          => __DIR__.'/Zip/Zip.php',\n));\n\n/**\n * Register Gelato Class Loader\n */\nif (GELATO_CLASS_LOADER) {\n    ClassLoader::register();\n}\n"
  },
  {
    "path": "libraries/Gelato/Html/Html.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\nclass Html\n{\n    /**\n     * Preferred order of attributes\n     *\n     * @var array\n     */\n    public static $attribute_order = array (\n        'action', 'method', 'type', 'id', 'name', 'value',\n        'href', 'src', 'width', 'height', 'cols', 'rows',\n        'size', 'maxlength', 'rel', 'media', 'accept-charset',\n        'accept', 'tabindex', 'accesskey', 'alt', 'title', 'class',\n        'style', 'selected', 'checked', 'readonly', 'disabled',\n    );\n\t\n\t/**\n\t * The registered custom macros.\n\t *\n\t * @var array\n\t */\n\tpublic static $macros = array();\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Registers a custom macro.\n     *\n     *  <code>\n     *\n     *      // Registering a Html macro\n     *      Html::macro('my_element', function() {\n     *          return '<element id=\"monstra\">';\n     *      });\n     *\n     *      // Calling a custom Html macro\n     *      echo Html::my_element();\n     *\n     *\n     *      // Registering a Html macro with parameters\n     *      Html::macro('my_element', function($id = '') {\n     *      \treturn '<element id=\"'.$id.'\">';\n     *      });\n     *\n     *      // Calling a custom Html macro with parameters\n     *      echo Html::my_element('monstra');\n     *\n     *  </code>\n     *\n     * @param string  $name  Name\n     * @param Closure $macro Macro\n     */\n    public static function macro($name, $macro)\n    {\n        Html::$macros[$name] = $macro;\n    }\n\n    /**\n     * Convert special characters to HTML entities. All untrusted content\n     * should be passed through this method to prevent XSS injections.\n     *\n     *\t<code>\n     *\t\techo Html::chars($username);\n     *\t</code>\n     *\n     * @param  string  $value         String to convert\n     * @param  boolean $double_encode Encode existing entities\n     * @return string\n     */\n    public static function chars($value, $double_encode = true)\n    {\n        return htmlspecialchars((string) $value, ENT_QUOTES, 'utf-8', $double_encode);\n    }\n\n    /**\n     * Compiles an array of HTML attributes into an attribute string.\n     * Attributes will be sorted using Html::$attribute_order for consistency.\n     *\n     *\t<code>\n     *\t\techo '<div'.Html::attributes($attrs).'>'.$content.'</div>';\n     *\t</code>\n     *\n     * @param  array  $attributes Attribute list\n     * @return string\n     */\n    public static function attributes(array $attributes = null)\n    {\n        if (empty($attributes)) return '';\n\n        // Init var\n        $sorted = array();\n\n        foreach (Html::$attribute_order as $key) {\n\n            if (isset($attributes[$key])) {\n                // Add the attribute to the sorted list\n                $sorted[$key] = $attributes[$key];\n            }\n\n        }\n\n        // Combine the sorted attributes\n        $attributes = $sorted + $attributes;\n\n        $compiled = '';\n        foreach ($attributes as $key => $value) {\n\n            if ($value === NULL) {\n                // Skip attributes that have NULL values\n                continue;\n            }\n\n            if (is_int($key)) {\n                // Assume non-associative keys are mirrored attributes\n                $key = $value;\n            }\n\n            // Add the attribute value\n            $compiled .= ' '.$key.'=\"'.Html::chars($value).'\"';\n        }\n\n        return $compiled;\n    }\n\n    /**\n     * Create br tags\n     *\n     *\t<code>\n     *\t \techo Html::br(2);\n     *\t</code>\n     *\n     * @param  integer $num Count of line break tag\n     * @return string\n     */\n    public static function br($num = 1)\n    {\n        return str_repeat(\"<br>\",(int) $num);\n    }\n\n    /**\n     * Create &nbsp;\n     *\n     *\t<code>\n     *\t\techo Html::nbsp(2);\n     *\t</code>\n     *\n     * @param  integer $num Count of &nbsp;\n     * @return string\n     */\n    public static function nbsp($num = 1)\n    {\n        return str_repeat(\"&nbsp;\", (int) $num);\n    }\n\n    /**\n     * Create an arrow\n     *\n     *\t<code>\n     *\t\techo Html::arrow('right');\n     *\t</code>\n     *\n     * @param  string  $direction Arrow direction [up,down,left,right]\n     * @param  boolean $render    If this option is true then render html object else return it\n     * @return string\n     */\n    public static function arrow($direction)\n    {\n        switch ($direction) {\n            case \"up\": \t  $output = '<span class=\"arrow\">&uarr;</span>'; break;\n            case \"down\":  $output = '<span class=\"arrow\">&darr;</span>'; break;\n            case \"left\":  $output = '<span class=\"arrow\">&larr;</span>'; break;\n            case \"right\": $output = '<span class=\"arrow\">&rarr;</span>'; break;\n        }\n\n           return $output;\n    }\n\n    /**\n     * Create HTML link anchor.\n     *\n     *\t<code>\n     *\t\techo Html::anchor('About', 'http://sitename.com/about');\n     *\t</code>\n     *\n     * @param string $title Anchor title\n     * @param string $url   Anchor url\n      * @param array  $attributes Anchor attributes\n      * @uses  Html::attributes\n      * @return string\n     */\n    public static function anchor($title, $url = null, array $attributes = null)\n    {\n        // Add link\n        if ($url !== null) $attributes['href'] = $url;\n        return '<a'.Html::attributes($attributes).'>'.$title.'</a>';\n    }\n\n    /**\n     * Create HTML <h> tag\n     *\n     *\t<code>\n     *\t\techo Html::heading('Title', 1);\n     *\t</code>\n     *\n     * @param string  $title      Text\n     * @param integer $h          Number [1-6]\n     * @param array   $attributes Heading attributes\n     * @uses  Html::attributes\n     * @return string\n     */\n    public static function heading($title, $h = 1, array $attributes = null)\n    {\n        $output = '<h'.(int) $h.Html::attributes($attributes).'>'.$title.'</h'.(int) $h.'>';\n\n        return $output;\n    }\n\n    /**\n     * Generate document type declarations\n     *\n     *\t<code>\n     *\t\techo Html::doctype('html5');\n     *\t</code>\n     *\n     * @param  string $type Doctype to generated\n     * @return mixed\n     */\n    public static function doctype($type = 'html5')\n    {\n        $doctypes = array('xhtml11' => '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">',\n                  'xhtml1-strict' => '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">',\n                  'xhtml1-trans'  => '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">',\n                  'xhtml1-frame'  => '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">',\n                  'html5'\t  => '<!DOCTYPE html>',\n                  'html4-strict'  => '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">',\n                  'html4-trans'\t  => '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">',\n                  'html4-frame'\t  => '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" \"http://www.w3.org/TR/html4/frameset.dtd\">');\n\n        if (isset($doctypes[$type])) return $doctypes[$type]; else return false;\n\n    }\n\n    /**\n     * Create image\n     *\n     *\t<code>\n     *  \techo Html::image('data/files/pic1.jpg');\n     * \t</code>\n     *\n     * @param array  $attributes Image attributes\n     * @param string $file       File\n     * @uses  Url::base\n     * @return string\n     */\n    public static function image($file, array $attributes = null)\n    {\n        if (strpos($file, '://') === FALSE) {\n            $file = Url::base().'/'.$file;\n        }\n\n        // Add the image link\n        $attributes['src'] = $file;\n        $attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($file, PATHINFO_FILENAME);\n\n        return '<img'.Html::attributes($attributes).'>';\n    }    \n    \n\t/**\n\t * Obfuscate an e-mail address to prevent spam-bots from sniffing it.\n     *\n     *  <code>\n     *  \techo Html::email('gelato@monstra.org');\n     * \t</code>\n     *\n\t * @param  string  $email\n\t * @return string\n\t */\n\t public static function email($email)\n\t {\n\t     return str_replace('@', '&#64;', Html::obfuscate($email));\n\t }\n    \n    /**\n\t * Obfuscate a string to prevent spam-bots from sniffing it.\n\t *\n     * This method obfuscate the value, randomly convert each\n     * letter to its entity or hexadecimal representation, keeping a\n     * bot from sniffing the randomly obfuscated letters.\n     *\n     *  <code>\n     *  \techo Html::obfuscate('gelato@monstra.org');\n     * \t</code>\n     *\n\t * @param  string  $value\n\t * @return string\n\t */\n\tpublic static function obfuscate($value)\n\t{\n\t\t$safe = '';\n\n\t\tforeach (str_split($value) as $letter) {\n\t\t\tswitch (rand(1, 3)) {\n\t\t\t\tcase 1:\n\t\t\t\t\t$safe .= '&#'.ord($letter).';';\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$safe .= '&#x'.dechex(ord($letter)).';';\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$safe .= $letter;\n\t\t\t}\n\t\t}\n\n\t\treturn $safe;\n\t}\n\n    /**\n     * Convert html to plain text\n     *\n     *\t<code>\n     *  \techo Html::toText('test');\n     * \t</code>\n     *\n     * @param  string $str String\n     * @return string\n     */\n    public static function toText($str)\n    {\n        return htmlspecialchars($str, ENT_QUOTES, 'utf-8');\n    }\n\n    /**\n     * Dynamically handle calls to custom macros.\n     *\n     * @param  string $method\n     * @param  array  $parameters\n     * @return mixed\n     */\n    public static function __callStatic($method, $parameters)\n    {\n        if (isset(Html::$macros[$method])) {\n            return call_user_func_array(Html::$macros[$method], $parameters);\n        }\n\n        throw new RuntimeException(\"Method [$method] does not exist.\");\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Http/Request.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Request\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Redirects the browser to a page specified by the $url argument.\n     *\n     *  <code>\n     *\t\tRequest::redirect('test');\n     *  </code>\n     *\n     * @param string  $url    The URL\n     * @param integer $status Status\n     * @param integer $delay  Delay\n     */\n    public static function redirect($url, $status = 302, $delay = null)\n    {\n        // Redefine vars\n        $url \t= (string) $url;\n        $status = (int) $status;\n\n        // Status codes\n        $messages = array();\n        $messages[301] = '301 Moved Permanently';\n        $messages[302] = '302 Found';\n\n        // Is Headers sent ?\n        if (headers_sent()) {\n\n            echo \"<script>document.location.href='\" . $url . \"';</script>\\n\";\n\n        } else {\n\n            // Redirect headers\n            Request::setHeaders('HTTP/1.1 ' . $status . ' ' . Arr::get($messages, $status, 302));\n\n            // Delay execution\n            if ($delay !== null) sleep((int) $delay);\n\n            // Redirect\n            Request::setHeaders(\"Location: $url\");\n\n            // Shutdown request\n            Request::shutdown();\n\n        }\n\n    }\n\n    /**\n     * Set one or multiple headers.\n     *\n     *  <code>\n     *\t\tRequest::setHeaders('Location: http://site.com/');\n     *  </code>\n     *\n     * @param mixed $headers String or array with headers to send.\n     */\n    public static function setHeaders($headers)\n    {\n        // Loop elements\n        foreach ((array) $headers as $header) {\n\n            // Set header\n            header((string) $header);\n\n        }\n\n    }\n\n    /**\n     * Get\n     *\n     *  <code>\n     *\t\t$action = Request::get('action');\n     *  </code>\n     *\n     * @param string $key Key\n     * @param mixed\n     */\n    public static function get($key)\n    {\n        return Arr::get($_GET, $key);\n    }\n\n    /**\n     * Post\n     *\n     *  <code>\n     *\t\t$login = Request::post('login');\n     *  </code>\n     *\n     * @param string $key Key\n     * @param mixed\n     */\n    public static function post($key)\n    {\n        return Arr::get($_POST, $key);\n    }\n\n    /**\n     * Returns whether this is an ajax request or not\n     *\n     *  <code>\n     *\t\tif (Request::isAjax()) {\n     *\t\t\t// do something...\n     *\t\t}\n     *  </code>\n     *\n     * @return boolean\n     */\n    public static function isAjax()\n    {\n        return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest';\n    }\n\n    /**\n     * Terminate request\n     *\n     *  <code>\n     *\t\tRequest::shutdown();\n     *  </code>\n     *\n     */\n    public static function shutdown()\n    {\n        exit(0);\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Http/Response.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Response\n{\n    /**\n     * HTTP status codes and messages\n     *\n     * @var array\n     */\n    public static $messages = array(\n        100 => 'Continue',\n        101 => 'Switching Protocols',\n        102 => 'Processing',            // RFC2518\n        200 => 'OK',\n        201 => 'Created',\n        202 => 'Accepted',\n        203 => 'Non-Authoritative Information',\n        204 => 'No Content',\n        205 => 'Reset Content',\n        206 => 'Partial Content',\n        207 => 'Multi-Status',          // RFC4918\n        208 => 'Already Reported',      // RFC5842\n        226 => 'IM Used',               // RFC3229\n        300 => 'Multiple Choices',\n        301 => 'Moved Permanently',\n        302 => 'Found',\n        303 => 'See Other',\n        304 => 'Not Modified',\n        305 => 'Use Proxy',\n        306 => 'Reserved',\n        307 => 'Temporary Redirect',\n        308 => 'Permanent Redirect',    // RFC-reschke-http-status-308-07\n        400 => 'Bad Request',\n        401 => 'Unauthorized',\n        402 => 'Payment Required',\n        403 => 'Forbidden',\n        404 => 'Not Found',\n        405 => 'Method Not Allowed',\n        406 => 'Not Acceptable',\n        407 => 'Proxy Authentication Required',\n        408 => 'Request Timeout',\n        409 => 'Conflict',\n        410 => 'Gone',\n        411 => 'Length Required',\n        412 => 'Precondition Failed',\n        413 => 'Request Entity Too Large',\n        414 => 'Request-URI Too Long',\n        415 => 'Unsupported Media Type',\n        416 => 'Requested Range Not Satisfiable',\n        417 => 'Expectation Failed',\n        418 => 'I\\'m a teapot',                                               // RFC2324\n        422 => 'Unprocessable Entity',                                        // RFC4918\n        423 => 'Locked',                                                      // RFC4918\n        424 => 'Failed Dependency',                                           // RFC4918\n        425 => 'Reserved for WebDAV advanced collections expired proposal',   // RFC2817\n        426 => 'Upgrade Required',                                            // RFC2817\n        428 => 'Precondition Required',                                       // RFC6585\n        429 => 'Too Many Requests',                                           // RFC6585\n        431 => 'Request Header Fields Too Large',                             // RFC6585\n        500 => 'Internal Server Error',\n        501 => 'Not Implemented',\n        502 => 'Bad Gateway',\n        503 => 'Service Unavailable',\n        504 => 'Gateway Timeout',\n        505 => 'HTTP Version Not Supported',\n        506 => 'Variant Also Negotiates (Experimental)',                      // RFC2295\n        507 => 'Insufficient Storage',                                        // RFC4918\n        508 => 'Loop Detected',                                               // RFC5842\n        510 => 'Not Extended',                                                // RFC2774\n        511 => 'Network Authentication Required',                             // RFC6585\n    );\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Set header status\n     *\n     *  <code>\n     *\t\tResponse::status(404);\n     *  </code>\n     *\n     * @param integer $status Status code\n     */\n    public static function status($status)\n    {\n        if (array_key_exists($status, Response::$messages)) header('HTTP/1.1 ' . $status . ' ' . Response::$messages[$status]);\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Image/Image.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Image\n{\n    /**\n     * Resizing contraint.\n     *\n     * @var integer\n     */\n    const AUTO = 1;\n\n    /**\n     * Resizing contraint.\n     *\n     * @var integer\n     */\n    const WIDTH = 2;\n\n    /**\n     * Resizing contraint.\n     *\n     * @var integer\n     */\n    const HEIGHT = 3;\n\n    /**\n     * Watermark position.\n     */\n    const TOP_LEFT = 4;\n\n    /**\n     * Watermark position.\n     */\n    const TOP_RIGHT = 5;\n\n    /**\n     * Watermark position.\n     */\n    const BOTTOM_LEFT = 6;\n\n    /**\n     * Watermark position.\n     */\n    const BOTTOM_RIGHT = 7;\n\n    /**\n     * Watermark position.\n     */\n    const CENTER = 8;\n\n    /**\n     * Holds info about the image.\n     *\n     * @var array\n     */\n    protected $image_info;\n\n    /**\n     * Get value\n     *\n     * @param  string $key Key\n     * @return mixed\n     */\n    public function __get($key)\n    {\n        if (array_key_exists($key, $this->image_info)) return $this->image_info[$key];\n    }\n\n    /**\n     * Set value for specific key\n     *\n     * @param string $key   Key\n     * @param mixed  $value Value\n     */\n    public function __set($key, $value)\n    {\n        $this->image_info[$key] = $value;\n    }\n\n    /**\n     * Image factory.\n     *\n     *  <code>\n     *      $image = Image::factory('original.png');\n     *  </code>\n     *\n     * @param  string $filename Filename\n     * @return Image\n     */\n    public static function factory($filename)\n    {\n        return new Image($filename);\n    }\n\n    /**\n     * Construct\n     *\n     * @param string $file Filename\n     */\n    public function __construct($file)\n    {\n        // Redefine vars\n        $file = (string) $file;\n\n        // Check if the file exists\n        if (file_exists($file)) {\n\n            // Extract attributes of the image file\n            list($this->width, $this->height, $type, $a) = getimagesize($file);\n\n            // Save image type\n            $this->type = $type;\n\n            // Create a new image\n            $this->image = $this->createImage($file, $type);\n        } else {\n            throw new RuntimeException(vsprintf(\"%s(): The file '{$file}' doesn't exist\", array(__METHOD__)));\n        }\n    }\n\n    /**\n     * Create a new image from file.\n     *\n     * @param  string   $file Path to the image file\n     * @param  integer  $type Image type\n     * @return resource\n     */\n    protected function createImage($file, $type)\n    {\n        // Create image from file\n        switch ($type) {\n            case IMAGETYPE_JPEG:\n                return imagecreatefromjpeg($file);\n            break;\n            case IMAGETYPE_GIF:\n                return imagecreatefromgif($file);\n            break;\n            case IMAGETYPE_PNG:\n                return imagecreatefrompng($file);\n            break;\n            default:\n                throw new RuntimeException(vsprintf(\"%s(): Unable to open '%s'. Unsupported image type.\", array(__METHOD__, $type)));\n        }\n    }\n\n    /**\n     * Resizes the image to the chosen size.\n     *\n     *  <code>\n     *      Image::factory('original.png')->resize(800, 600)->save('edited.png');\n     *  </code>\n     *\n     * @param  integer $width        Width of the image\n     * @param  integer $height       Height of the image\n     * @param  integer $aspect_ratio Aspect ratio (Image::AUTO Image::WIDTH Image::HEIGHT)\n     * @return Image\n     */\n    public function resize($width, $height = null, $aspect_ratio = null)\n    {\n        // Redefine vars\n        $width        = (int) $width;\n        $height       = ($height === null) ? null : (int) $height;\n        $aspect_ratio = ($aspect_ratio === null) ? null : (int) $aspect_ratio;\n        $xpos = $ypos = 0;\n\n        // Resizes the image to {$width}% of the original size\n        if ($height === null) {\n\n            $new_width  = round($this->width  * ($width / 100));\n            $new_height = round($this->height * ($width / 100));\n\n        } else {\n\n            // Resizes the image to the smalles possible dimension while maintaining aspect ratio\n            if ($aspect_ratio === Image::AUTO || $aspect_ratio === null) {\n\n                // Calculate smallest size based on given height and width while maintaining aspect ratio\n                $percentage = min(($width / $this->width), ($height / $this->height));\n\n                $new_width  = round($this->width * $percentage);\n                $new_height = round($this->height * $percentage);\n                \n                if ($aspect_ratio === null) {\n                    $xpos = (int)(($width - $new_width) / 2);\n                    $ypos = (int)(($height - $new_height) / 2);\n                }\n\n            // Resizes the image using the width to maintain aspect ratio\n            } elseif ($aspect_ratio === Image::WIDTH) {\n\n                // Base new size on given width while maintaining aspect ratio\n                $new_width  = $width;\n                $new_height = round($this->height * ($width / $this->width));\n\n            // Resizes the image using the height to maintain aspect ratio\n            } elseif ($aspect_ratio === Image::HEIGHT) {\n\n                // Base new size on given height while maintaining aspect ratio\n                $new_width  = round($this->width * ($height / $this->height));\n                $new_height = $height;\n\n            // Resizes the image to a dimension of {$width}x{$height} pixels while ignoring the aspect ratio\n            } else {\n\n                $new_width  = $width;\n                $new_height = $height;\n            }\n        }\n\n        $old_image = $this->image;\n        \n        if ($aspect_ratio === null) {\n            $this->image = imagecreatetruecolor($width, $height);\n        } else {\n            $this->image = imagecreatetruecolor($new_width, $new_height);\n        }\n        \n        if ($this->type === IMAGETYPE_PNG) {\n            $bgcolor = imagecolorallocatealpha($this->image, 0, 0, 0, 127);\n        } else {\n            $bgcolor = imagecolorallocate($this->image, 255, 255, 255);\n        }\n        \n        imagefill($this->image, 0, 0, $bgcolor);\n\n        // Copy and resize part of an image with resampling\n        imagecopyresampled($this->image, $old_image, $xpos, $ypos, 0, 0, $new_width, $new_height, $this->width, $this->height);\n\n        // Destroy an image\n        imagedestroy($old_image);\n        \n        // Save new width and height\n        $this->width = $new_width;\n        $this->height = $new_height;\n\n        return $this;\n    }\n\n    /**\n     * Crops the image\n     *\n     *  <code>\n     *      Image::factory('original.png')->crop(800, 600, 0, 0)->save('edited.png');\n     *  </code>\n     *\n     * @param  integer $width  Width of the crop\n     * @param  integer $height Height of the crop\n     * @param  integer $x      The X coordinate of the cropped region's top left corner\n     * @param  integer $y      The Y coordinate of the cropped region's top left corner\n     * @return Image\n     */\n    public function crop($width, $height, $x, $y)\n    {\n        // Redefine vars\n        $width  = (int) $width;\n        $height = (int) $height;\n        $x      = (int) $x;\n        $y      = (int) $y;\n\n        // Calculate\n        if ($x + $width > $this->width)   $width = $this->width - $x;\n        if ($y + $height > $this->height) $height = $this->height - $y;\n        if ($width <= 0 || $height <= 0) return false;\n\n        $old_image = $this->image;\n        \n        // Create a new true color image\n        $this->image = imagecreatetruecolor($width, $height);\n        \n        $transparent = imagecolorallocatealpha($this->image, 0, 0, 0, 127);\n        imagefill($this->image, 0, 0, $transparent);\n\n        // Copy and resize part of an image with resampling\n        imagecopyresampled($this->image, $old_image, 0, 0, $x, $y, $width, $height, $width, $height);\n\n        // Destroy an image\n        imagedestroy($old_image);\n        \n        // Save new width and height\n        $this->width  = $width;\n        $this->height = $height;\n\n        return $this;\n    }\n\n    /**\n      * Adds a watermark to the image.\n     *\n     * @param  string  $file     Path to the image file\n     * @param  integer $position Position of the watermark\n     * @param  integer $opacity  Opacity of the watermark in percent\n     * @return Image\n     */\n    public function watermark($file, $position = null, $opacity = 100)\n    {\n        // Check if the image exists\n        if ( ! file_exists($file)) {\n            throw new RuntimeException(vsprintf(\"%s(): The image file ('%s') does not exist.\", array(__METHOD__, $file)));\n        }\n\n        $watermark = $this->createImage($file, $this->type);\n\n        $watermarkW = imagesx($watermark);\n        $watermarkH = imagesy($watermark);\n\n        // Make sure that opacity is between 0 and 100\n        $opacity = max(min((int) $opacity, 100), 0);\n\n        if ($opacity < 100) {\n\n            if (GD_BUNDLED === 0) {\n                throw new RuntimeException(vsprintf(\"%s(): Setting watermark opacity requires the 'imagelayereffect' function which is only available in the bundled version of GD.\", array(__METHOD__)));\n            }\n\n            // Convert alpha to 0-127\n            $alpha = min(round(abs(($opacity * 127 / 100) - 127)), 127);\n\n            $transparent = imagecolorallocatealpha($watermark, 0, 0, 0, $alpha);\n\n            imagelayereffect($watermark, IMG_EFFECT_OVERLAY);\n\n            imagefilledrectangle($watermark, 0, 0, $watermarkW, $watermarkH, $transparent);\n        }\n\n        // Position the watermark.\n        switch ($position) {\n            case Image::TOP_RIGHT:\n                $x = imagesx($this->image) - $watermarkW;\n                $y = 0;\n            break;\n            case Image::BOTTOM_LEFT:\n                $x = 0;\n                $y = imagesy($this->image) - $watermarkH;\n            break;\n            case Image::BOTTOM_RIGHT:\n                $x = imagesx($this->image) - $watermarkW;\n                $y = imagesy($this->image) - $watermarkH;\n            break;\n            case Image::CENTER:\n                $x = (imagesx($this->image) / 2) - ($watermarkW / 2);\n                $y = (imagesy($this->image) / 2) - ($watermarkH / 2);\n            break;\n            default:\n                $x = 0;\n                $y = 0;\n        }\n\n        imagealphablending($this->image, true);\n\n        imagecopy($this->image, $watermark, $x, $y, 0, 0, $watermarkW, $watermarkH);\n\n        imagedestroy($watermark);\n\n        // Return Image\n        return $this;\n    }\n\n    /**\n     * Convert image into grayscale\n     *\n     *  <code>\n     *      Image::factory('original.png')->grayscale()->save('edited.png');\n     *  </code>\n     *\n     * @return Image\n     */\n    public function grayscale()\n    {\n        imagefilter($this->image, IMG_FILTER_GRAYSCALE);\n\n        return $this;\n    }\n\n    /**\n     * Convert image into sepia\n     *\n     *  <code>\n     *      Image::factory('original.png')->sepia()->save('edited.png');\n     *  </code>\n     *\n     * @return Image\n     */\n    public function sepia()\n    {\n        imagefilter($this->image, IMG_FILTER_GRAYSCALE);\n        imagefilter($this->image, IMG_FILTER_COLORIZE, 112, 66, 20);\n\n        return $this;\n    }\n\n    /**\n     * Convert image into brightness\n     *\n     *  <code>\n     *      Image::factory('original.png')->brightness(60)->save('edited.png');\n     *  </code>\n     *\n     * @param  integer $level Level. From -255(min) to 255(max)\n     * @return Image\n     */\n    public function brightness($level = 0)\n    {\n        imagefilter($this->image, IMG_FILTER_BRIGHTNESS, (int) $level);\n\n        return $this;\n    }\n\n    /**\n     * Convert image into colorize\n     *\n     *  <code>\n     *      Image::factory('original.png')->colorize(60, 0, 0)->save('edited.png');\n     *  </code>\n     *\n     * @param  integer $red   Red\n     * @param  integer $green Green\n     * @param  integer $blue  Blue\n     * @return Image\n     */\n    public function colorize($red, $green, $blue)\n    {\n        imagefilter($this->image, IMG_FILTER_COLORIZE, (int) $red, (int) $green, (int) $blue);\n\n        return $this;\n    }\n\n    /**\n     * Convert image into contrast\n     *\n     *  <code>\n     *      Image::factory('original.png')->contrast(60)->save('edited.png');\n     *  </code>\n     *\n     * @param  integer $level Level. From -100(max) to 100(min)\tnote the direction!\n     * @return Image\n     */\n    public function contrast($level)\n    {\n        imagefilter($this->image, IMG_FILTER_CONTRAST, (int) $level);\n\n        return $this;\n    }\n\n    /**\n     * Creates a color based on a hex value.\n     *\n     * @param  string  $hex       Hex code of the color\n     * @param  integer $alpha     Alpha. Default is 100\n     * @param  boolean $returnRGB FALSE returns a color identifier, TRUE returns a RGB array\n     * @return integer\n     */\n    protected function createColor($hex, $alpha = 100, $return_rgb = false)\n    {\n        // Redefine vars\n        $hex   \t\t= (string) $hex;\n        $alpha \t\t= (int) $alpha;\n        $return_rgb = (bool) $return_rgb;\n\n        $hex = str_replace('#', '', $hex);\n\n        if (preg_match('/^([a-f0-9]{3}){1,2}$/i', $hex) === 0) {\n            throw new RuntimeException(vsprintf(\"%s(): Invalid color code ('%s').\", array(__METHOD__, $hex)));\n        }\n\n        if (strlen($hex) === 3) {\n\n            $r = hexdec(str_repeat(substr($hex, 0, 1), 2));\n            $g = hexdec(str_repeat(substr($hex, 1, 1), 2));\n            $b = hexdec(str_repeat(substr($hex, 2, 1), 2));\n\n        } else {\n\n            $r = hexdec(substr($hex, 0, 2));\n            $g = hexdec(substr($hex, 2, 2));\n            $b = hexdec(substr($hex, 4, 2));\n\n        }\n\n        if ($return_rgb === true) {\n            return array('r' => $r, 'g' => $g, 'b' => $b);\n\n        } else {\n\n            // Convert alpha to 0-127\n            $alpha = min(round(abs(($alpha * 127 / 100) - 127)), 127);\n\n            return imagecolorallocatealpha($this->image, $r, $g, $b, $alpha);\n        }\n    }\n\n    /**\n     * Rotates the image using the given angle in degrees.\n     *\n     *  <code>\n     *      Image::factory('original.png')->rotate(90)->save('edited.png');\n     *  </code>\n     *\n     * @param  integer $degrees Degrees to rotate the image\n     * @return Image\n     */\n    public function rotate($degrees)\n    {\n        if (GD_BUNDLED === 0) {\n            throw new RuntimeException(vsprintf(\"%s(): This method requires the 'imagerotate' function which is only available in the bundled version of GD.\", array(__METHOD__)));\n        }\n\n        // Redefine vars\n        $degrees = (int) $degrees;\n\n        // Get image width and height\n        $width  = imagesx($this->image);\n        $height = imagesy($this->image);\n\n        // Allocate a color for an image\n        $transparent = imagecolorallocatealpha($this->image, 0, 0, 0, 127);\n\n        // Rotate gif image\n        if ($this->image_info['type'] === IMAGETYPE_GIF) {\n\n            // Create a new true color image\n            $temp = imagecreatetruecolor($width, $height);\n\n            // Flood fill\n            imagefill($temp, 0, 0, $transparent);\n\n            // Copy part of an image\n            imagecopy($temp, $this->image, 0, 0, 0, 0, $width, $height);\n\n            // Destroy an image\n            imagedestroy($this->image);\n\n            // Save temp image\n            $this->image = $temp;\n        }\n\n        // Rotate an image with a given angle\n        $this->image = imagerotate($this->image, (360 - $degrees), $transparent);\n\n        // Define a color as transparent\n        imagecolortransparent($this->image, $transparent);\n\n        return $this;\n    }\n\n    /**\n     * Adds a border to the image.\n     *\n     *  <code>\n     *      Image::factory('original.png')->border('#000', 5)->save('edited.png');\n     *  </code>\n     *\n     * @param  string  $color     Hex code for the color\n     * @param  integer $thickness Thickness of the frame in pixels\n     * @return Image\n     */\n    public function border($color = '#000', $thickness = 5)\n    {\n        // Redefine vars\n        $color \t   = (string) $color;\n        $thickness = (int) $thickness;\n\n        // Get image width and height\n        $width  = imagesx($this->image);\n        $height = imagesy($this->image);\n\n        // Creates a color based on a hex value\n        $color = $this->createColor($color);\n\n        // Create border\n        for ($i = 0; $i < $thickness; $i++) {\n\n            if ($i < 0) {\n\n                $x = $width + 1;\n                $y = $hidth + 1;\n\n            } else {\n\n                $x = --$width;\n                $y = --$height;\n\n            }\n\n            imagerectangle($this->image, $i, $i, $x, $y, $color);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Save image\n     *\n     *  <code>\n     *      Image::factory('original.png')->save('edited.png');\n     *  </code>\n     *\n     * @param  string  $dest    Desitination location of the file\n     * @param  integer $quality Image quality. Default is 100\n     * @return Image\n     */\n    public function save($file, $quality = 100)\n    {\n        // Redefine vars\n        $file \t = (string) $file;\n        $quality = (int) $quality;\n\n        $path_info = pathinfo($file);\n\n        if ( ! is_writable($path_info['dirname'])) {\n            throw new RuntimeException(vsprintf(\"%s(): '%s' is not writable.\", array(__METHOD__, $path_info['dirname'])));\n        }\n\n        // Make sure that quality is between 0 and 100\n        $quality = max(min((int) $quality, 100), 0);\n\n        // Save image\n        switch ($path_info['extension']) {\n            case 'jpg':\n            case 'jpeg':\n                imagejpeg($this->image, $file, $quality);\n            break;\n            case 'gif':\n                imagegif($this->image, $file);\n            break;\n            case 'png':\n                imagealphablending($this->image, true);\n                imagesavealpha($this->image, true);\n                imagepng($this->image, $file, (9 - (round(($quality / 100) * 9))));\n            break;\n            default:\n                throw new RuntimeException(vsprintf(\"%s(): Unable to save to '%s'. Unsupported image format.\", array(__METHOD__, $path_info['extension'])));\n        }\n\n        // Return Image\n        return $this;\n    }\n\n    /**\n     * Destructor\n     */\n    public function __destruct()\n    {\n        imagedestroy($this->image);\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Inflector/Inflector.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Inflector\n{\n    /**\n     * Plural rules\n     *\n     * @var array\n     */\n    protected static $plural_rules = array(\n        '/^(ox)$/'                 => '\\1\\2en',     // ox\n        '/([m|l])ouse$/'           => '\\1ice',      // mouse, louse\n        '/(matr|vert|ind)ix|ex$/'  => '\\1ices',     // matrix, vertex, index\n        '/(x|ch|ss|sh)$/'          => '\\1es',       // search, switch, fix, box, process, address\n        '/([^aeiouy]|qu)y$/'       => '\\1ies',      // query, ability, agency\n        '/(hive)$/'                => '\\1s',        // archive, hive\n        '/(?:([^f])fe|([lr])f)$/'  => '\\1\\2ves',    // half, safe, wife\n        '/sis$/'                   => 'ses',        // basis, diagnosis\n        '/([ti])um$/'              => '\\1a',        // datum, medium\n        '/(p)erson$/'              => '\\1eople',    // person, salesperson\n        '/(m)an$/'                 => '\\1en',       // man, woman, spokesman\n        '/(c)hild$/'               => '\\1hildren',  // child\n        '/(buffal|tomat)o$/'       => '\\1\\2oes',    // buffalo, tomato\n        '/(bu|campu)s$/'           => '\\1\\2ses',    // bus, campus\n        '/(alias|status|virus)$/'  => '\\1es',       // alias\n        '/(octop)us$/'             => '\\1i',        // octopus\n        '/(ax|cris|test)is$/'      => '\\1es',       // axis, crisis\n        '/s$/'                     => 's',          // no change (compatibility)\n        '/$/'                      => 's',\n    );\n\n    /**\n     * Singular rules\n     *\n     * @var array\n     */\n    protected static $singular_rules = array(\n        '/(matr)ices$/'         => '\\1ix',\n        '/(vert|ind)ices$/'     => '\\1ex',\n        '/^(ox)en/'             => '\\1',\n        '/(alias)es$/'          => '\\1',\n        '/([octop|vir])i$/'     => '\\1us',\n        '/(cris|ax|test)es$/'   => '\\1is',\n        '/(shoe)s$/'            => '\\1',\n        '/(o)es$/'              => '\\1',\n        '/(bus|campus)es$/'     => '\\1',\n        '/([m|l])ice$/'         => '\\1ouse',\n        '/(x|ch|ss|sh)es$/'     => '\\1',\n        '/(m)ovies$/'           => '\\1\\2ovie',\n        '/(s)eries$/'           => '\\1\\2eries',\n        '/([^aeiouy]|qu)ies$/'  => '\\1y',\n        '/([lr])ves$/'          => '\\1f',\n        '/(tive)s$/'            => '\\1',\n        '/(hive)s$/'            => '\\1',\n        '/([^f])ves$/'          => '\\1fe',\n        '/(^analy)ses$/'        => '\\1sis',\n        '/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/' => '\\1\\2sis',\n        '/([ti])a$/'            => '\\1um',\n        '/(p)eople$/'           => '\\1\\2erson',\n        '/(m)en$/'              => '\\1an',\n        '/(s)tatuses$/'         => '\\1\\2tatus',\n        '/(c)hildren$/'         => '\\1\\2hild',\n        '/(n)ews$/'             => '\\1\\2ews',\n        '/([^us])s$/'           => '\\1',\n    );\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Returns a camelized string from a string using underscore syntax.\n     *\n     *  <code>\n     *\t\t// \"some_text_here\" becomes \"SomeTextHere\"\n     *      echo Inflector::camelize('some_text_here');\n     *  </code>\n     *\n     * @param  string $string Word to camelize.\n     * @return string Camelized word.\n     */\n    public static function camelize($string)\n    {\n        // Redefine vars\n        $string = (string) $string;\n\n        return str_replace(' ', '', ucwords(str_replace('_', ' ', $string)));\n    }\n\n    /**\n     * Returns a string using underscore syntax from a camelized string.\n     *\n     *  <code>\n     *\t\t// \"SomeTextHere\" becomes \"some_text_here\"\n     *      echo Inflector::underscore('SomeTextHere');\n     *  </code>\n     *\n     * @param  string $string CamelCased word\n     * @return string Underscored version of the $string\n     */\n    public static function underscore($string)\n    {\n        // Redefine vars\n        $string = (string) $string;\n\n        return strtolower(preg_replace('/(?<=\\\\w)([A-Z])/', '_\\\\1', $string));\n    }\n\n    /**\n     * Returns a humanized string from a string using underscore syntax.\n     *\n     *  <code>\n     *\t\t// \"some_text_here\" becomes \"Some text here\"\n     *      echo Inflector::humanize('some_text_here');\n     *  </code>\n     *\n     * @param  string $string String using underscore syntax.\n     * @return string Humanized version of the $string\n     */\n    public static function humanize($string)\n    {\n        // Redefine vars\n        $string = (string) $string;\n\n        return ucfirst(strtolower(str_replace('_', ' ', $string)));\n    }\n\n    /**\n     * Returns ordinalize number.\n     *\n     *  <code>\n     *      // 1 becomes 1st\n     *      echo Inflector::ordinalize(1);\n     *  </code>\n     *\n     * @param  integer $number Number to ordinalize\n     * @return string\n     */\n    public static function ordinalize($number)\n    {\n        if ( ! is_numeric($number)) {\n            return $number;\n        }\n\n        if (in_array(($number % 100), range(11, 13))) {\n            return $number . 'th';\n        } else {\n            switch ($number % 10) {\n                case 1:  return $number . 'st'; break;\n                case 2:  return $number . 'nd'; break;\n                case 3:  return $number . 'rd'; break;\n                default: return $number . 'th'; break;\n            }\n        }\n    }\n\n    /**\n     * Returns the plural version of the given word\n     *\n     *  <code>\n     *      echo Inflector::pluralize('cat');\n     *  </code>\n     *\n     * @param  string $word Word to pluralize\n     * @return string\n     */\n    public static function pluralize($word)\n    {\n        $result = (string) $word;\n\n        foreach (Inflector::$plural_rules as $rule => $replacement) {\n            if (preg_match($rule, $result)) {\n                $result = preg_replace($rule, $replacement, $result);\n                break;\n            }\n        }\n\n        return $result;\n    }\n\n    /**\n     * Returns the singular version of the given word\n     *\n     *  <code>\n     *      echo Inflector::singularize('cats');\n     *  </code>\n     *\n     * @param  string $word Word to singularize\n     * @return string\n     */\n    public static function singularize($word)\n    {\n        $result = (string) $word;\n\n        foreach (Inflector::$singular_rules as $rule => $replacement) {\n            if (preg_match($rule, $result)) {\n                $result = preg_replace($rule, $replacement, $result);\n                break;\n            }\n        }\n\n        return $result;\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Log/Log.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Log\n{\n\n    /**\n     * Path to the logs.\n     *\n     * @var string\n     */\n    protected static $path = '';\n  \n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Configure Log\n     *\n     * @access  public\n     * @param  string  $setting The setting\n     * @param  string  $value   The value\n     */\n    public static function configure($setting, $value)\n    {\n        if (property_exists(\"log\", $setting)) Log::$$setting = $value;\n    }\n\n    /**\n     * Writes message to log.\n     *\n     * @access  public\n     * @param  string  $message The message to write to the log\n     * @return boolean\n     */\n    public static function write($message)\n    {\n        return (bool) file_put_contents(rtrim(Log::$path, '/') . '/' . gmdate('Y_m_d') . '.log',\n                                        '[' . gmdate('d-M-Y H:i:s') . '] ' . $message . PHP_EOL,\n                                        FILE_APPEND);\n    }\n}\n"
  },
  {
    "path": "libraries/Gelato/Minify/MinifyCSS.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @author      Stephen Clay <steve@mrclay.org>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass MinifyCSS\n{\n\n    /**\n     * @var array\n     */\n    protected $_options = null;\n\n    /**\n     * Are we \"in\" a hack? I.e. are some browsers targetted until the next comment?\n     *\n     * @var bool\n     */\n    protected $_inHack = false;\n\n    /**\n     * Constructor\n     *\n     * @param array $options (currently ignored)\n     */\n    private function __construct($options)\n    {\n        $this->_options = $options;\n    }\n\n    /**\n     * Minify a CSS string\n     *\n     * @param string $css\n     *\n     * @param array $options (currently ignored)\n     *\n     * @return string\n     */\n    public static function process($css, $options = array())\n    {\n        $obj = new MinifyCSS($options);\n\n        return $obj->_process($css);\n    }\n\n    /**\n     * Minify a CSS string\n     *\n     * @param string $css\n     *\n     * @return string\n     */\n    protected function _process($css)\n    {\n        $css = str_replace(\"\\r\\n\", \"\\n\", $css);\n\n        // preserve empty comment after '>'\n        // http://www.webdevout.net/css-hacks#in_css-selectors\n        $css = preg_replace('@>/\\\\*\\\\s*\\\\*/@', '>/*keep*/', $css);\n\n        // preserve empty comment between property and value\n        // http://css-discuss.incutio.com/?page=BoxModelHack\n        $css = preg_replace('@/\\\\*\\\\s*\\\\*/\\\\s*:@', '/*keep*/:', $css);\n        $css = preg_replace('@:\\\\s*/\\\\*\\\\s*\\\\*/@', ':/*keep*/', $css);\n\n        // apply callback to all valid comments (and strip out surrounding ws\n        $css = preg_replace_callback('@\\\\s*/\\\\*([\\\\s\\\\S]*?)\\\\*/\\\\s*@'\n            ,array($this, '_commentCB'), $css);\n\n        // remove ws around { } and last semicolon in declaration block\n        $css = preg_replace('/\\\\s*{\\\\s*/', '{', $css);\n        $css = preg_replace('/;?\\\\s*}\\\\s*/', '}', $css);\n\n        // remove ws surrounding semicolons\n        $css = preg_replace('/\\\\s*;\\\\s*/', ';', $css);\n\n        // remove ws around urls\n        $css = preg_replace('/\n                url\\\\(      # url(\n                \\\\s*\n                ([^\\\\)]+?)  # 1 = the URL (really just a bunch of non right parenthesis)\n                \\\\s*\n                \\\\)         # )\n            /x', 'url($1)', $css);\n\n        // remove ws between rules and colons\n        $css = preg_replace('/\n                \\\\s*\n                ([{;])              # 1 = beginning of block or rule separator\n                \\\\s*\n                ([\\\\*_]?[\\\\w\\\\-]+)  # 2 = property (and maybe IE filter)\n                \\\\s*\n                :\n                \\\\s*\n                (\\\\b|[#\\'\"-])        # 3 = first character of a value\n            /x', '$1$2:$3', $css);\n\n        // minimize hex colors\n        /*$css = preg_replace('/([^=])#([a-f\\\\d])\\\\2([a-f\\\\d])\\\\3([a-f\\\\d])\\\\4([\\\\s;\\\\}])/i'\n            , '$1#$2$3$4$5', $css);*/\n\n        // remove spaces between font families\n        $css = preg_replace_callback('/font-family:([^;}]+)([;}])/'\n            ,array($this, '_fontFamilyCB'), $css);\n\n        $css = preg_replace('/@import\\\\s+url/', '@import url', $css);\n\n        // replace any ws involving newlines with a single newline\n        $css = preg_replace('/[ \\\\t]*\\\\n+\\\\s*/', \"\\n\", $css);\n\n        // separate common descendent selectors w/ newlines (to limit line lengths)\n        $css = preg_replace('/([\\\\w#\\\\.\\\\*]+)\\\\s+([\\\\w#\\\\.\\\\*]+){/', \"$1\\n$2{\", $css);\n\n        // Use newline after 1st numeric value (to limit line lengths).\n        $css = preg_replace('/\n            ((?:padding|margin|border|outline):\\\\d+(?:px|em)?) # 1 = prop : 1st numeric value\n            \\\\s+\n            /x'\n            ,\"$1\\n\", $css);\n\n        // prevent triggering IE6 bug: http://www.crankygeek.com/ie6pebug/\n        $css = preg_replace('/:first-l(etter|ine)\\\\{/', ':first-l$1 {', $css);\n\n        return trim($css);\n    }\n\n    /**\n     * Replace what looks like a set of selectors\n     *\n     * @param array $m regex matches\n     *\n     * @return string\n     */\n    protected function _selectorsCB($m)\n    {\n        // remove ws around the combinators\n        return preg_replace('/\\\\s*([,>+~])\\\\s*/', '$1', $m[0]);\n    }\n\n    /**\n     * Process a comment and return a replacement\n     *\n     * @param array $m regex matches\n     *\n     * @return string\n     */\n    protected function _commentCB($m)\n    {\n        $hasSurroundingWs = (trim($m[0]) !== $m[1]);\n        $m = $m[1];\n        // $m is the comment content w/o the surrounding tokens,\n        // but the return value will replace the entire comment.\n        if ($m === 'keep') {\n            return '/**/';\n        }\n        if ($m === '\" \"') {\n            // component of http://tantek.com/CSS/Examples/midpass.html\n            return '/*\" \"*/';\n        }\n        if (preg_match('@\";\\\\}\\\\s*\\\\}/\\\\*\\\\s+@', $m)) {\n            // component of http://tantek.com/CSS/Examples/midpass.html\n            return '/*\";}}/* */';\n        }\n        if ($this->_inHack) {\n            // inversion: feeding only to one browser\n            if (preg_match('@\n                    ^/               # comment started like /*/\n                    \\\\s*\n                    (\\\\S[\\\\s\\\\S]+?)  # has at least some non-ws content\n                    \\\\s*\n                    /\\\\*             # ends like /*/ or /**/\n                @x', $m, $n)) {\n                // end hack mode after this comment, but preserve the hack and comment content\n                $this->_inHack = false;\n\n                return \"/*/{$n[1]}/**/\";\n            }\n        }\n        if (substr($m, -1) === '\\\\') { // comment ends like \\*/\n            // begin hack mode and preserve hack\n            $this->_inHack = true;\n\n            return '/*\\\\*/';\n        }\n        if ($m !== '' && $m[0] === '/') { // comment looks like /*/ foo */\n            // begin hack mode and preserve hack\n            $this->_inHack = true;\n\n            return '/*/*/';\n        }\n        if ($this->_inHack) {\n            // a regular comment ends hack mode but should be preserved\n            $this->_inHack = false;\n\n            return '/**/';\n        }\n        // Issue 107: if there's any surrounding whitespace, it may be important, so\n        // replace the comment with a single space\n        return $hasSurroundingWs // remove all other comments\n            ? ' '\n            : '';\n    }\n\n    /**\n     * Process a font-family listing and return a replacement\n     *\n     * @param array $m regex matches\n     *\n     * @return string\n     */\n    protected function _fontFamilyCB($m)\n    {\n        // Issue 210: must not eliminate WS between words in unquoted families\n        $pieces = preg_split('/(\\'[^\\']+\\'|\"[^\"]+\")/', $m[1], null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n        $out = 'font-family:';\n        while (null !== ($piece = array_shift($pieces))) {\n            if ($piece[0] !== '\"' && $piece[0] !== \"'\") {\n                $piece = preg_replace('/\\\\s+/', ' ', $piece);\n                $piece = preg_replace('/\\\\s?,\\\\s?/', ',', $piece);\n            }\n            $out .= $piece;\n        }\n\n        return $out . $m[2];\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Minify/MinifyHTML.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass MinifyHTML\n{\n    /**\n     * Minify html\n     *\n     *  <code>\n     *      echo MinifyHTML::process($html);\n     *  </code>\n     *\n     * @param  string $buffer html\n     * @return string\n     */\n    public static function process($html)\n    {\n        // Remove HTML comments (not containing IE conditional comments).\n        $html = preg_replace_callback('/<!--([\\\\s\\\\S]*?)-->/', 'MinifyHTML::_comments', $html);\n\n        // Trim each line.\n        $html = preg_replace('/^\\\\s+|\\\\s+$/m', '', $html);\n\n        // Return HTML\n        return $html;\n    }\n\n    protected static function _comments($m)\n    {\n        return (0 === strpos($m[1], '[') || false !== strpos($m[1], '<![')) ? $m[0] : '';\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Minify/MinifyJS.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass MinifyJS\n{\n    /**\n     * Minify js\n     *\n     *  <code>\n     *      echo MinifyJS::process($js);\n     *  </code>\n     *\n     * @param  string $buffer html\n     * @return string\n     */\n    public static function process($js)\n    {\n        // newlines > linefeed\n        $js = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \"\\n\", $js);\n\n        // empty lines > collapse\n        $js = preg_replace('/^[ \\t]*|[ \\t]*$/m', '', $js);\n        $js = preg_replace('/\\n+/m', \"\\n\", $js);\n        $js = trim($js);\n\n        // redundant whitespace > remove\n        $js = preg_replace('/(?<=[{}\\[\\]\\(\\)=><&\\|;:,\\?!\\+-])[ \\t]*|[ \\t]*(?=[{}\\[\\]\\(\\)=><&\\|;:,\\?!\\+-])/i', '', $js);\n        $js = preg_replace('/[ \\t]+/', ' ', $js);\n\n        // redundant semicolons (followed by another semicolon or closing curly bracket) > remove\n        $js = preg_replace('/;\\s*(?=[;}])/s', '', $js);\n\n        // Return JS\n        return $js;\n    }\n}\n"
  },
  {
    "path": "libraries/Gelato/Notification/Notification.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Notification\n{\n    /**\n     * Notifications session key\n     *\n     * @var string\n     */\n    const SESSION_KEY = 'notifications';\n\n    /**\n     * Notifications array\n     *\n     * @var array\n     */\n    private static $notifications = array();\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Returns a specific variable from the Notifications array.\n     *\n     *  <code>\n     *      echo Notification::get('success');\n     *      echo Notification::get('errors');\n     *  </code>\n     *\n     * @param  string $key Variable name\n     * @return mixed\n     */\n    public static function get($key)\n    {\n        // Redefine arguments\n        $key = (string) $key;\n\n        // Return specific variable from the Notifications array\n        return isset(Notification::$notifications[$key]) ? Notification::$notifications[$key] : null;\n    }\n\n    /**\n     * Adds specific variable to the Notifications array.\n     *\n     *  <code>\n     *      Notification::set('success', 'Data has been saved with success!');\n     *      Notification::set('errors', 'Data not saved!');\n     *  </code>\n     *\n     * @param string $key   Variable name\n     * @param mixed  $value Variable value\n     */\n    public static function set($key, $value)\n    {\n        // Redefine arguments\n        $key = (string) $key;\n\n        // Save specific variable to the Notifications array\n        $_SESSION[Notification::SESSION_KEY][$key] = $value;\n    }\n\n    /**\n     * Adds specific variable to the Notifications array for current page.\n     *\n     *  <code>\n     *      Notification::setNow('success', 'Success!');\n     *  </code>\n     *\n     * @param string $var   Variable name\n     * @param mixed  $value Variable value\n     */\n    public static function setNow($key, $value)\n    {\n        // Redefine arguments\n        $key = (string) $key;\n\n        // Save specific variable for current page only\n        Notification::$notifications[$key] = $value;\n    }\n\n    /**\n     * Clears the Notifications array.\n     *\n     *  <code>\n     *      Notification::clean();\n     *  </code>\n     *\n     * Data that previous pages stored will not be deleted, just the data that\n     * this page stored itself.\n     */\n    public static function clean()\n    {\n        $_SESSION[Notification::SESSION_KEY] = array();\n    }\n\n    /**\n     * Initializes the Notification service.\n     *\n     *  <code>\n     *      Notification::init();\n     *  </code>\n     *\n     * This will read notification/flash data from the $_SESSION variable and load it into\n     * the $this->previous array.\n     */\n    public static function init()\n    {\n        // Get notification/flash data...\n\n        if ( ! empty($_SESSION[Notification::SESSION_KEY]) && is_array($_SESSION[Notification::SESSION_KEY])) {\n            Notification::$notifications = $_SESSION[Notification::SESSION_KEY];\n        }\n\n        $_SESSION[Notification::SESSION_KEY] = array();\n\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Number/Number.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Number\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Convert bytes in 'KB','MB','GB','TiB','PiB'\n     *\n     *  <code>\n     *      echo Number::byteFormat(10000);\n     *  </code>\n     *\n     * @param  integer $size Data to convert\n     * @return string\n     */\n    public static function byteFormat($size)\n    {\n        // Redefine vars\n        $size = (int) $size;\n\n        $unit = array('B', 'KB', 'MB', 'GB', 'TiB', 'PiB');\n\n        return @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[($i < 0 ? 0 : $i)];\n    }\n\n    /**\n     * Convert 'KB','MB','GB' in bytes\n     *\n     *  <code>\n     *      echo Number::convertToBytes('10MB');\n     *  </code>\n     *\n     * @param  string $num Number to convert\n     * @return int\n     */\n    public static function convertToBytes( $num ) {\n        $num  = strtolower( $num );\n        $bytes = (int) $num;\n        if ( strpos( $num, 'k' ) !== false )\n            $bytes = intval( $num ) * 1024;\n        elseif ( strpos( $num, 'm' ) !== false )\n            $bytes = intval($num) * 1024 * 1024;\n        elseif ( strpos( $num, 'g' ) !== false )\n            $bytes = intval( $num ) * 1024 * 1024 * 1024;\n        return $bytes;\n    }\n\n    /**\n     * Converts a number into a more readable human-type number.\n     *\n     *  <code>\n     *      echo Number::quantity(7000); // 7K\n     *      echo Number::quantity(7500); // 8K\n     *      echo Number::quantity(7500, 1); // 7.5K\n     *  </code>\n     *\n     * @param  integer $num      Num to convert\n     * @param  integer $decimals Decimals\n     * @return string\n     */\n    public static function quantity($num, $decimals = 0)\n    {\n        // Redefine vars\n        $num      = (int) $num;\n        $decimals = (int) $decimals;\n\n        if ($num >= 1000 && $num < 1000000) {\n            return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000)).'K';\n        } elseif ($num >= 1000000 && $num < 1000000000) {\n            return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000000)).'M';\n        } elseif ($num >= 1000000000) {\n            return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000000000)).'B';\n        }\n\n        return $num;\n    }\n\n    /**\n     * Checks if the value is between the minimum and maximum (min & max included).\n     *\n     *  <code>\n     *      if (Number::between(2, 10, 5)) {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param  float   $minimum The minimum.\n     * @param  float   $maximum The maximum.\n     * @param  float   $value   The value to validate.\n     * @return boolean\n     */\n    public static function between($minimum, $maximum, $value)\n    {\n        return ((float) $value >= (float) $minimum && (float) $value <= (float) $maximum);\n    }\n\n    /**\n     * Checks the value for an even number.\n     *\n     *  <code>\n     *      if (Number::even(2)) {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param  integer $value The value to validate.\n     * @return boolean\n     */\n    public static function even($value)\n    {\n        return (((int) $value % 2) == 0);\n    }\n\n    /**\n     * Checks if the value is greather than a given minimum.\n     *\n     *  <code>\n     *      if (Number::greaterThan(2, 10)) {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param  float   $minimum The minimum as a float.\n     * @param  float   $value   The value to validate.\n     * @return boolean\n     */\n    public static function greaterThan($minimum, $value)\n    {\n        return ((float) $value > (float) $minimum);\n    }\n\n    /**\n     * Checks if the value is smaller than a given maximum.\n     *\n     *  <code>\n     *      if (Number::smallerThan(2, 10)) {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param  integer $maximum The maximum.\n     * @param  integer $value   The value to validate.\n     * @return boolean\n     */\n    public static function smallerThan($maximum, $value)\n    {\n        return ((int) $value < (int) $maximum);\n    }\n\n    /**\n     * Checks if the value is not greater than or equal a given maximum.\n     *\n     *  <code>\n     *      if (Number::maximum(2, 10)) {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param  integer $maximum The maximum.\n     * @param  integer $value   The value to validate.\n     * @return boolean\n     */\n    public static function maximum($maximum, $value)\n    {\n        return ((int) $value <= (int) $maximum);\n    }\n\n    /**\n     * Checks if the value is greater than or equal to a given minimum.\n     *\n     *  <code>\n     *      if (Number::minimum(2, 10)) {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param  integer $minimum The minimum.\n     * @param  integer $value   The value to validate.\n     * @return boolean\n     */\n    public static function minimum($minimum, $value)\n    {\n        return ((int) $value >= (int) $minimum);\n    }\n\n    /**\n     * Checks the value for an odd number.\n     *\n     *  <code>\n     *      if (Number::odd(2)) {\n     *          // do something...\n     *      }\n     *  </code>\n     *\n     * @param  integer $value The value to validate.\n     * @return boolean\n     */\n    public static function odd($value)\n    {\n        return ! Number::even((int) $value);\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/README.md",
    "content": "# Gelato Library\n\nGelato is a PHP5 library for kickass Web Applications.\n\n## Links\n- [Site](http://gelato.monstra.org)\n- [Github Repository](https://github.com/MonstrLab/gelato)\n\nCopyright (C) 2013 Romanenko Sergey / Awilum [awilum@msn.com]"
  },
  {
    "path": "libraries/Gelato/Registry/Registry.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Registry\n{\n\n    /**\n     * Registry of variables\n     *\n     * @var array\n     */\n    private static $registry = array();\n\n    /**\n     * Checks if an object with this name is in the registry.\n     *\n     *  <code>\n     *      if (Registry::exists('var')) {\n     *          // Do something...\n     *      }\n     *  </code>\n     *\n     * @return bool\n     * @param  string $name The name of the registry item to check for existence.\n     */\n    public static function exists($name)\n    {\n        return isset(Registry::$registry[(string) $name]);\n    }\n\n    /**\n     * Registers a given value under a given name.\n     *\n     *  <code>\n     *      Registry::set('var', 'value');\n     *  </code>\n     *\n     * @param string          $name  The name of the value to store.\n     * @param mixed[optional] $value The value that needs to be stored.\n     */\n    public static function set($name, $value = null)\n    {\n        // redefine name\n        $name = (string) $name;\n\n        // delete item\n        if ($value === null) {\n            unset(Registry::$registry[$name]);\n        } else {\n            Registry::$registry[$name] = $value;\n\n            return Registry::get($name);\n        }\n    }\n\n    /**\n     * Fetch an item from the registry.\n     *\n     *  <code>\n     *      $var = Registry::get('var', 'value');\n     *  </code>\n     *\n     * @return mixed\n     * @param  string $name The name of the item to fetch.\n     */\n    public static function get($name)\n    {\n        $name = (string) $name;\n\n        if ( ! isset(Registry::$registry[$name])) {\n            throw new RuntimeException('No item \"' . $name . '\" exists in the registry.');\n        }\n\n        return Registry::$registry[$name];\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Security/Token.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Token\n{\n    /**\n     * Key name for token storage\n     *\n     * @var  string\n     */\n    protected static $token_name = 'security_token';\n\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Generate and store a unique token which can be used to help prevent\n     * [CSRF](http://wikipedia.org/wiki/Cross_Site_Request_Forgery) attacks.\n     *\n     *  <code>\n     *      $token = Token::generate();\n     *  </code>\n     *\n     * You can insert this token into your forms as a hidden field:\n     *\n     *  <code>\n     *      echo Form::hidden('csrf', Token::generate());\n     *  </code>\n     *\n     * This provides a basic, but effective, method of preventing CSRF attacks.\n     *\n     * @param  boolean $new force a new token to be generated?. Default is false\n     * @return string\n     */\n    public static function generate($new = false)\n    {\n        // Get the current token\n        $token = Session::get(Token::$token_name);\n\n        // Create a new unique token\n        if ($new === true or ! $token) {\n\n            // Generate a new unique token\n            $token = sha1(uniqid(mt_rand(), true));\n\n            // Store the new token\n            Session::set(Token::$token_name, $token);\n        }\n\n        // Return token\n        return $token;\n    }\n\n    /**\n     * Check that the given token matches the currently stored security token.\n     *\n     *  <code>\n     *     if (Token::check($token)) {\n     *         // Pass\n     *     }\n     *  </code>\n     *\n     * @param  string  $token token to check\n     * @return boolean\n     */\n    public static function check($token)\n    {\n        return Token::token() === $token;\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Session/Session.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Session\n{\n    /**\n     * Starts the session.\n     *\n     *  <code>\n     *      Session::start();\n     *  </code>\n     *\n     */\n    public static function start()\n    {\n        // Is session already started?\n        if ( ! session_id()) {\n\n            // Start the session\n            return @session_start();\n        }\n\n        // If already started\n        return true;\n    }\n\n    /**\n     * Deletes one or more session variables.\n     *\n     *  <code>\n     *      Session::delete('user');\n     *  </code>\n     *\n     */\n    public static function delete()\n    {\n        // Loop all arguments\n        foreach (func_get_args() as $argument) {\n\n            // Array element\n            if (is_array($argument)) {\n\n                // Loop the keys\n                foreach ($argument as $key) {\n\n                    // Unset session key\n                    unset($_SESSION[(string) $key]);\n                }\n            } else {\n\n                // Remove from array\n                unset($_SESSION[(string) $argument]);\n            }\n        }\n    }\n\n    /**\n     * Destroys the session.\n     *\n     *  <code>\n     *      Session::destroy();\n     *  </code>\n     *\n     */\n    public static function destroy()\n    {\n        // Destroy\n        if (session_id()) {\n            session_unset();\n            session_destroy();\n            $_SESSION = array();\n        }\n\n    }\n\n    /**\n     * Checks if a session variable exists.\n     *\n     *  <code>\n     *      if (Session::exists('user')) {\n     * \t\t\t// Do something...\n     *  \t}\n     *  </code>\n     *\n     * @return boolean\n     */\n    public static function exists()\n    {\n        // Start session if needed\n        if ( ! session_id()) Session::start();\n\n        // Loop all arguments\n        foreach (func_get_args() as $argument) {\n\n            // Array element\n            if (is_array($argument)) {\n\n                // Loop the keys\n                foreach ($argument as $key) {\n\n                    // Does NOT exist\n                    if ( ! isset($_SESSION[(string) $key])) return false;\n                }\n            } else {\n\n                // Does NOT exist\n                if ( ! isset($_SESSION[(string) $argument])) return false;\n            }\n        }\n\n        return true;\n    }\n\n    /**\n     * Gets a variable that was stored in the session.\n     *\n     *  <code>\n     *      echo Session::get('user');\n     *  </code>\n     *\n     * @param  string $key The key of the variable to get.\n     * @return mixed\n     */\n    public static function get($key)\n    {\n        // Start session if needed\n        if ( ! session_id()) self::start();\n\n        // Redefine key\n        $key = (string) $key;\n\n        // Fetch key\n        if (Session::exists((string) $key)) return $_SESSION[(string) $key];\n\n        // Key doesn't exist\n        return null;\n    }\n\n\n    /**\n     * Returns the sessionID.\n     *\n     *  <code>\n     *      echo Session::getSessionId();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function getSessionId()\n    {\n        if ( ! session_id()) Session::start();\n        return session_id();\n    }\n\n\n    /**\n     * Stores a variable in the session.\n     *\n     *  <code>\n     *      Session::set('user', 'Awilum');\n     *  </code>\n     *\n     * @param string $key   The key for the variable.\n     * @param mixed  $value The value to store.\n     */\n    public static function set($key, $value)\n    {\n        // Start session if needed\n        if ( ! session_id()) self::start();\n\n        // Set key\n        $_SESSION[(string) $key] = $value;\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Text/Text.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Text\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Translit function ua,ru => latin\n     *\n     *  <code>\n     *      echo Text::translitIt('Привет');\n     *  </code>\n     *\n     * @param  string $str [ua,ru] string\n     * @return string $str\n     */\n    public static function translitIt($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        $patern = array(\n            \"А\" => \"A\", \"Б\" => \"B\", \"В\" => \"V\", \"Г\" => \"G\",\n            \"Д\" => \"D\", \"Е\" => \"E\", \"Ж\" => \"J\", \"З\" => \"Z\",\n            \"И\" => \"I\", \"Й\" => \"Y\", \"К\" => \"K\", \"Л\" => \"L\",\n            \"М\" => \"M\", \"Н\" => \"N\", \"О\" => \"O\", \"П\" => \"P\",\n            \"Р\" => \"R\", \"С\" => \"S\", \"Т\" => \"T\", \"У\" => \"U\",\n            \"Ф\" => \"F\", \"Х\" => \"H\", \"Ц\" => \"TS\", \"Ч\" => \"CH\",\n            \"Ш\" => \"SH\", \"Щ\" => \"SCH\", \"Ъ\" => \"\", \"Ы\" => \"YI\",\n            \"Ь\" => \"\", \"Э\" => \"E\", \"Ю\" => \"YU\", \"Я\" => \"YA\",\n            \"а\" => \"a\", \"б\" => \"b\", \"в\" => \"v\", \"г\" => \"g\",\n            \"д\" => \"d\", \"е\" => \"e\", \"ж\" => \"j\", \"з\" => \"z\",\n            \"и\" => \"i\", \"й\" => \"y\", \"к\" => \"k\", \"л\" => \"l\",\n            \"м\" => \"m\", \"н\" => \"n\", \"о\" => \"o\",\"п\" => \"p\",\n            \"р\" => \"r\", \"с\" => \"s\", \"т\" => \"t\", \"у\" => \"u\",\n            \"ф\" => \"f\", \"х\" => \"h\", \"ц\" => \"ts\", \"ч\" => \"ch\",\n            \"ш\" => \"sh\", \"щ\" => \"sch\", \"ъ\" => \"y\", \"ї\" => \"i\",\n            \"Ї\" => \"Yi\", \"є\" => \"ie\", \"Є\" => \"Ye\", \"ы\" => \"yi\",\n            \"ь\" => \"\", \"э\" => \"e\", \"ю\" => \"yu\", \"я\" => \"ya\", \"ё\" => \"yo\"\n        );\n\n        return strtr($str, $patern);\n    }\n\n    /**\n     * Removes any leading and traling slashes from a string\n     *\n     *  <code>\n     *      echo Text::trimSlashes('some text here/');\n     *  </code>\n     *\n     * @param  string $str String with slashes\n     * @return string\n     */\n    public static function trimSlashes($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        return trim($str, '/');\n    }\n\n    /**\n     * Removes slashes contained in a string or in an array\n     *\n     *  <code>\n     *      echo Text::strpSlashes('some \\ text \\ here');\n     *  </code>\n     *\n     * @param  mixed $str String or array of strings with slashes\n     * @return mixed\n     */\n    public static function strpSlashes($str)\n    {\n        if (is_array($str)) {\n            foreach ($str as $key => $val) {\n                $result[$key] = stripslashes($val);\n            }\n        } else {\n            $result = stripslashes($str);\n        }\n\n        return $result;\n    }\n\n    /**\n     * Removes single and double quotes from a string\n     *\n     *  <code>\n     *      echo Text::stripQuotes('some \"text\" here');\n     *  </code>\n     *\n     * @param  string $str String with single and double quotes\n     * @return string\n     */\n    public static function stripQuotes($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        return str_replace(array('\"', \"'\"), '', $str);\n    }\n\n    /**\n     * Convert single and double quotes to entities\n     *\n     *  <code>\n     *      echo Text::quotesToEntities('some \"text\" here');\n     *  </code>\n     *\n     * @param  string $str String with single and double quotes\n     * @return string\n     */\n    public static function quotesToEntities($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        return str_replace(array(\"\\'\", \"\\\"\", \"'\", '\"'), array(\"&#39;\", \"&quot;\", \"&#39;\", \"&quot;\"), $str);\n    }\n\n    /**\n     * Creates a random string of characters\n     *\n     *  <code>\n     *      echo Text::random();\n     *  </code>\n     *\n     * @param  string  $type   The type of string. Default is 'alnum'\n     * @param  integer $length The number of characters. Default is 16\n     * @return string\n     */\n    public static function random($type = 'alnum', $length = 16)\n    {\n        // Redefine vars\n        $type   = (string) $type;\n        $length = (int) $length;\n\n        switch ($type) {\n\n            case 'basic':\n                return mt_rand();\n            break;\n\n            default:\n                case 'alnum':\n                case 'numeric':\n                case 'nozero':\n                case 'alpha':\n                case 'distinct':\n                case 'hexdec':\n                    switch ($type) {\n                        case 'alpha':\n                            $pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n                        break;\n\n                        default:\n                        case 'alnum':\n                            $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n                        break;\n\n                        case 'numeric':\n                            $pool = '0123456789';\n                        break;\n\n                        case 'nozero':\n                            $pool = '123456789';\n                        break;\n\n                        case 'distinct':\n                            $pool = '2345679ACDEFHJKLMNPRSTUVWXYZ';\n                        break;\n\n                        case 'hexdec':\n                            $pool = '0123456789abcdef';\n                        break;\n                    }\n\n                    $str = '';\n                    for ($i=0; $i < $length; $i++) {\n                        $str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);\n                    }\n\n                    return $str;\n                break;\n\n            case 'unique':\n                return md5(uniqid(mt_rand()));\n            break;\n\n            case 'sha1' :\n                return sha1(uniqid(mt_rand(), true));\n            break;\n        }\n    }\n\n    /**\n     * Add's _1 to a string or increment the ending number to allow _2, _3, etc\n     *\n     *  <code>\n     *      $str = Text::increment($str);\n     *  </code>\n     *\n     * @param  string  $str       String to increment\n     * @param  integer $first     Start with\n     * @param  string  $separator Separator\n     * @return string\n     */\n    public static function increment($str, $first = 1, $separator = '_')\n    {\n        preg_match('/(.+)'.$separator.'([0-9]+)$/', $str, $match);\n\n        return isset($match[2]) ? $match[1].$separator.($match[2] + 1) : $str.$separator.$first;\n    }\n\n\n    /**\n     * Cut string\n     *\n     *  <code>\n     *      echo Text::cut('Some text here', 5);\n     *  </code>\n     *\n     * @param  string  $str     Input string\n     * @param  integer $length  Length after cut\n     * @param  string  $cut_msg Message after cut string\n     * @return string\n     */\n    public static function cut($str, $length, $cut_msg = null)\n    {\n        // Redefine vars\n        $str \t= (string) $str;\n        $length = (int) $length;\n\n        if (isset($cut_msg)) $msg = $cut_msg; else $msg = '...';\n        return function_exists('mb_substr') ? mb_substr($str, 0, $length, 'utf-8') . $msg : substr($str, 0, $length) . $msg;\n    }\n\n\n    /**\n     * Lowercase\n     *\n     *  <code>\n     *      echo Text::lowercase('Some text here');\n     *  </code>\n     *\n     * @param  string $str String\n     * @return string\n     */\n    public static function lowercase($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        return function_exists('mb_strtolower') ? mb_strtolower($str, 'utf-8') : strtolower($str);\n    }\n\n\n    /**\n     * Uppercase\n     *\n     *  <code>\n     *      echo Text::uppercase('some text here');\n     *  </code>\n     *\n     * @param  string $str String\n     * @return string\n     */\n    public static function uppercase($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        return function_exists('mb_strtoupper') ? mb_strtoupper($str, 'utf-8') : strtoupper($str);\n    }\n\n\n    /**\n     * Get length\n     *\n     *  <code>\n     *      echo Text::length('Some text here');\n     *  </code>\n     *\n     * @param  string $str String\n     * @return string\n     */\n    public static function length($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        return function_exists('mb_strlen') ? mb_strlen($str, 'utf-8') : strlen($str);\n    }\n\n\n    /**\n     * Create a lorem ipsum text\n     *\n     *  <code>\n     *      echo Text::lorem(2);\n     *  </code>\n     *\n     * @param  integer $num Count\n     * @return string\n     */\n    public static function lorem($num = 1)\n    {\n        // Redefine vars\n        $num = (int) $num;\n\n        return str_repeat('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', (int) $num);\n    }\n\n\n    /**\n     * Extract the last `$num` characters from a string.\n     *\n     *  <code>\n     *      echo Text::right('Some text here', 4);\n     *  </code>\n     *\n     * @param  string  $str The string to extract the characters from.\n     * @param  integer $num The number of characters to extract.\n     * @return string\n     */\n    public static function right($str, $num)\n    {\n        // Redefine vars\n        $str = (string) $str;\n        $num = (int) $num;\n\n        return substr($str, Text::length($str)-$num, $num);\n    }\n\n\n    /**\n     * Extract the first `$num` characters from a string.\n     *\n     *  <code>\n     *      echo Text::left('Some text here', 4);\n     *  </code>\n     *\n     * @param  string  $str The string to extract the characters from.\n     * @param  integer $num The number of characters to extract.\n     * @return string\n     */\n    public static function left($str, $num)\n    {\n        // Redefine vars\n        $str = (string) $str;\n        $num = (int) $num;\n\n        return substr($str, 0, $num);\n    }\n\n\n    /**\n     * Replaces newline with <br> or <br />.\n     *\n     *  <code>\n     *      echo Text::nl2br(\"Some \\n text \\n here\");\n     *  </code>\n     *\n     * @param  string  $str   The input string\n     * @param  boolean $xhtml Xhtml or not\n     * @return string\n     */\n    public static function nl2br($str, $xhtml = true)\n    {\n        // Redefine vars\n        $str   = (string) $str;\n        $xhtml = (bool) $xhtml;\n\n        return str_replace(array(\"\\r\\n\", \"\\n\\r\", \"\\n\", \"\\r\"), (($xhtml) ? '<br />' : '<br>'), $str);\n    }\n\n\n    /**\n     * Replaces <br> and <br /> with newline.\n     *\n     *  <code>\n     *      echo Text::br2nl(\"Some <br /> text <br /> here\");\n     *  </code>\n     *\n     * @param  string $str The input string\n     * @return string\n     */\n    public static function br2nl($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        return str_replace(array('<br>', '<br/>', '<br />'), \"\\n\", $str);\n    }\n\n\n    /**\n     * Converts & to &amp;.\n     *\n     *  <code>\n     *      echo Text::ampEncode(\"M&CMS\");\n     *  </code>\n     *\n     * @param  string $str The input string\n     * @return string\n     */\n    public static function ampEncode($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        return str_replace('&', '&amp;', $str);\n    }\n\n\n    /**\n     * Converts &amp; to &.\n     *\n     *  <code>\n     *      echo Text::ampEncode(\"M&amp;CMS\");\n     *  </code>\n     *\n     * @param  string $str The input string\n     * @return string\n     */\n    public static function ampDecode($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        return str_replace('&amp;', '&', $str);\n    }\n\n\n    /**\n     * Convert plain text to html\n     *\n     *\t<code>\n     *  \techo Text::toHtml('test');\n     * \t</code>\n     *\n     * @param  string $str String\n     * @return string\n     */\n    public static function toHtml($str)\n    {\n        // Redefine vars\n        $str = (string) $str;\n\n        return html_entity_decode($str, ENT_QUOTES, 'utf-8');\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Url/Url.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Url\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Takes a long url and uses the TinyURL API to return a shortened version.\n     *\n     *  <code>\n     *      echo Url::tiny('http:://sitename.com');\n     *  </code>\n     *\n     * @param  string $url Long url\n     * @return string\n     */\n    public static function tiny($url)\n    {\n        return file_get_contents('http://tinyurl.com/api-create.php?url='.(string) $url);\n    }\n\n    /**\n     * Check is url exists\n     *\n     *  <code>\n     *      if (Url::exists('http:://sitename.com')) {\n     *\t\t\t// Do something...\n     *\t\t}\n     *  </code>\n     *\n     * @param  string  $url Url\n     * @return boolean\n     */\n    public static function exists($url)\n    {\n        $a_url = parse_url($url);\n        if ( ! isset($a_url['port'])) $a_url['port'] = 80;\n        $errno = 0;\n        $errstr = '';\n        $timeout = 30;\n        if (isset($a_url['host']) && $a_url['host']!=gethostbyname($a_url['host'])) {\n            $fid = fsockopen($a_url['host'], $a_url['port'], $errno, $errstr, $timeout);\n            if ( ! $fid) return false;\n            $page  = isset($a_url['path']) ? $a_url['path'] : '';\n            $page .= isset($a_url['query']) ? '?'.$a_url['query'] : '';\n            fputs($fid, 'HEAD '.$page.' HTTP/1.0'.\"\\r\\n\".'Host: '.$a_url['host'].\"\\r\\n\\r\\n\");\n            $head = fread($fid, 4096);\n            fclose($fid);\n\n            return preg_match('#^HTTP/.*\\s+[200|302]+\\s#i', $head);\n        } else {\n            return false;\n        }\n    }\n\n    /**\n      * Gets the base URL\n      *\n     *  <code>\n     *      echo Url::base();\n     *  </code>\n     *\n      * @return string\n     */\n    public static function base()\n    {\n        $https = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://';\n\n        return $https . rtrim(rtrim($_SERVER['HTTP_HOST'], '\\\\/') . dirname($_SERVER['PHP_SELF']), '\\\\/');\n    }\n\n    /**\n     * Gets current URL\n     *\n     *  <code>\n     *      echo Url::current();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function current()\n    {\n        return (!empty($_SERVER['HTTPS'])) ? \"https://\".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : \"http://\".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Validation/Valid.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Valid\n{\n    /**\n     * Protected constructor since this is a static class.\n     *\n     * @access  protected\n     */\n    protected function __construct()\n    {\n        // Nothing here\n    }\n\n    /**\n     * Check an email address for correct format.\n     *\n     *\t<code>\n     *\t\tif (Valid::email('test@test.com')) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\t</code>\n     *\n     * @param  string  $email email address\n     * @return boolean\n     */\n    public static function email($email)\n    {\n        return (bool) filter_var((string) $email, FILTER_VALIDATE_EMAIL);\n    }\n\n    /**\n     * Check an ip address for correct format.\n     *\n     *\t<code>\n     *\t\tif (Valid::ip('127.0.0.1') || Valid::ip('0:0:0:0:0:0:7f00:1')) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\t</code>\n     *\n     * @param  string  $ip ip address\n     * @return boolean\n     */\n    public static function ip($ip)\n    {\n        return (bool) filter_var((string) $ip, FILTER_VALIDATE_IP);\n    }\n\n    /**\n     * Check an credit card for correct format.\n     *\n     *\t<code>\n     *\t\tif (Valid::creditCard(7711111111111111, 'Visa')) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\t</code>\n     *\n     * @param integer $num  Credit card num\n     * @param string  $type Credit card type:\n     *\t\t\t\t\t\t  American - American Express\n     *\t\t\t\t\t\t  Dinners - Diner's Club\n     *\t\t\t\t\t\t  Discover - Discover Card\n     *\t\t\t\t\t \t  Master - Mastercard\n     *\t\t\t\t\t\t  Visa - Visa\n     * @return boolean\n     */\n    public static function creditCard($num, $type)\n    {\n        // Redefine vars\n        $num  = (int) $num;\n        $type = (string) $type;\n\n        switch ($type) {\n            case \"American\": return (bool) preg_match(\"/^([34|37]{2})([0-9]{13})$/\", $num);\n            case \"Dinners\":  return (bool) preg_match(\"/^([30|36|38]{2})([0-9]{12})$/\", $num);\n            case \"Discover\": return (bool) preg_match(\"/^([6011]{4})([0-9]{12})$/\", $num);\n            case \"Master\":   return (bool) preg_match(\"/^([51|52|53|54|55]{2})([0-9]{14})$/\", $num);\n            case \"Visa\":     return (bool) preg_match(\"/^([4]{1})([0-9]{12,15})$/\", $num);\n        }\n    }\n\n\n    /**\n     * Check an phone number for correct format.\n     *\n     *\t<code>\n     *\t\tif (Valid::phone(0661111117)) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\t</code>\n     *\n     * @param  string  $num Phone number\n     * @return boolean\n     */\n    public static function phone($num)\n    {\n        return (bool) preg_match(\"/^([0-9\\(\\)\\/\\+ \\-]*)$/\", (string) $num);\n    }\n\n\n    /**\n     * Check an url for correct format.\n     *\n     *\t<code>\n     *\t\tif (Valid::url('http://site.com/')) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\t</code>\n     *\n     * @param  string  $url Url\n     * @return boolean\n     */\n    public static function url($url)\n    {\n        return (bool) filter_var((string) $url, FILTER_VALIDATE_URL);\n    }\n\n\n    /**\n     * Check an date for correct format.\n     *\n     *\t<code>\n     *\t\tif (Valid::date('12/12/12')) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\t</code>\n     *\n     * @param  string  $str Date\n     * @return boolean\n     */\n    public static function date($str)\n    {\n        return (strtotime($str) !== false);\n    }\n\n\n    /**\n     * Checks whether a string consists of digits only (no dots or dashes).\n     *\n     *\t<code>\n     *\t\tif (Valid::digit('12')) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\t</code>\n     *\n     * @param  string  $str String\n     * @return boolean\n     */\n    public static function digit($str)\n    {\n        return (bool) preg_match (\"/[^0-9]/\", $str);\n    }\n\n\n    /**\n     * Checks whether a string is a valid number (negative and decimal numbers allowed).\n     *\n     *\t<code>\n     *\t\tif (Valid::numeric('3.14')) {\n     *\t\t\t// Do something...\n     *  \t}\n     *\t</code>\n     *\n     * Uses {@link http://www.php.net/manual/en/function.localeconv.php locale conversion}\n     * to allow decimal point to be locale specific.\n     *\n     * @param  string  $str String\n     * @return boolean\n     */\n    public static function numeric($str)\n    {\n        $locale = localeconv();\n\n        return (bool) preg_match('/^-?[0-9'.$locale['decimal_point'].']++$/D', (string) $str);\n    }\n\n\n    /**\n     * Checks if the given regex statement is valid.\n     *\n     * @param  string  $regexp The value to validate.\n     * @return boolean\n     */\n    public static function regexp($regexp)\n    {\n        // dummy string\n        $dummy = 'Gelato is a PHP5 library for kickass Web Applications.';\n\n        // validate\n        return (@preg_match((string) $regexp, $dummy) !== false);\n\n    }\n\n}\n"
  },
  {
    "path": "libraries/Gelato/Zip/Zip.php",
    "content": "<?php\n\n/**\n * Gelato Library\n *\n * This source file is part of the Gelato Library. More information,\n * documentation and tutorials can be found at http://gelato.monstra.org\n *\n * @package     Gelato\n *\n * @author      Romanenko Sergey / Awilum <awilum@msn.com>\n * @copyright   2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nclass Zip\n{\n    public $zipdata    = '';\n    public $directory  = '';\n    public $entries    = 0;\n    public $file_num   = 0;\n    public $offset     = 0;\n    public $now;\n\n    private $_archive_info  = array();\n    private $_zip_signature = \"\\x50\\x4b\\x03\\x04\";\n    private $_dir_signature = \"\\x50\\x4b\\x01\\x02\";\n    private $_central_signature_end = \"\\x50\\x4b\\x05\\x06\";\n    private $farc = null;\n    \n    /**\n     * Constructor\n     */\n    public function __construct()\n    {\n        $this->now = time();\n    }\n\n    /**\n     * Zip factory\n     *\n     *  <code>\n     *      Zip::factory();\n     *  </code>\n     *\n     * @return Zip\n     */\n    public static function factory()\n    {\n        return new Zip();\n    }\n\n    /**\n     * Add Directory\n     *\n     *  <code>\n     *      Zip::factory()->addDir('test');\n     *  </code>\n     *\n     * @param mixed $directory The directory name. Can be string or array\n     */\n    public function addDir($directory)\n    {\n        foreach ((array) $directory as $dir) {\n\n            if ( ! preg_match(\"|.+/$|\", $dir)) {\n                $dir .= '/';\n            }\n\n            $dir_time = $this->_get_mod_time($dir);\n\n            $this->_add_dir($dir, $dir_time['file_mtime'], $dir_time['file_mdate']);\n        }\n\n        return $this;\n    }\n\n    /**\n     *  Get file/directory modification time\n     *\n     *  @param  string $dir Full path to the dir\n     *  @return array\n     */\n    protected function _get_mod_time($dir)\n    {\n        // If this is a newly created file/dir, we will set the time to 'now'\n        $date = (@filemtime($dir)) ? filemtime($dir) : getdate($this->now);\n\n        $time['file_mtime'] = ($date['hours'] << 11) + ($date['minutes'] << 5) + $date['seconds'] / 2;\n        $time['file_mdate'] = (($date['year'] - 1980) << 9) + ($date['mon'] << 5) + $date['mday'];\n\n        return $time;\n    }\n\n    /**\n     * Add Directory\n     *\n     * @param string  $dir        The directory name\n     * @param integer $file_mtime File mtime\n     * @param integer $file_mdate File mdate\n     */\n    private function _add_dir($dir, $file_mtime, $file_mdate)\n    {\n        $dir = str_replace(\"\\\\\", \"/\", $dir);\n\n        $this->zipdata .=\n            \"\\x50\\x4b\\x03\\x04\\x0a\\x00\\x00\\x00\\x00\\x00\"\n            .pack('v', $file_mtime)\n            .pack('v', $file_mdate)\n            .pack('V', 0) // crc32\n            .pack('V', 0) // compressed filesize\n            .pack('V', 0) // uncompressed filesize\n            .pack('v', strlen($dir)) // length of pathname\n            .pack('v', 0) // extra field length\n            .$dir\n            // below is \"data descriptor\" segment\n            .pack('V', 0) // crc32\n            .pack('V', 0) // compressed filesize\n            .pack('V', 0); // uncompressed filesize\n\n        $this->directory .=\n            \"\\x50\\x4b\\x01\\x02\\x00\\x00\\x0a\\x00\\x00\\x00\\x00\\x00\"\n            .pack('v', $file_mtime)\n            .pack('v', $file_mdate)\n            .pack('V',0) // crc32\n            .pack('V',0) // compressed filesize\n            .pack('V',0) // uncompressed filesize\n            .pack('v', strlen($dir)) // length of pathname\n            .pack('v', 0) // extra field length\n            .pack('v', 0) // file comment length\n            .pack('v', 0) // disk number start\n            .pack('v', 0) // internal file attributes\n            .pack('V', 16) // external file attributes - 'directory' bit set\n            .pack('V', $this->offset) // relative offset of local header\n            .$dir;\n\n        $this->offset = strlen($this->zipdata);\n        $this->entries++;\n    }\n\n    /**\n     * Add Data to Zip\n     *\n     *  <code>\n     *      Zip::factory()->addData('test.txt', 'Some test text here');\n     *  </code>\n     *\n     * Lets you add files to the archive. If the path is included\n     * in the filename it will be placed within a directory.  Make\n     * sure you use add_dir() first to create the folder.\n     *\n     * @param mixed  $filepath Full path to the file\n     * @param string $data     Data\n     */\n    public function addData($filepath, $data = null)\n    {\n        if (is_array($filepath)) {\n            foreach ($filepath as $path => $data) {\n                $file_data = $this->_get_mod_time($path);\n                $this->_add_data($path, $data, $file_data['file_mtime'], $file_data['file_mdate']);\n            }\n        } else {\n            $file_data = $this->_get_mod_time($filepath);\n            $this->_add_data($filepath, $data, $file_data['file_mtime'], $file_data['file_mdate']);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Add Data to Zip\n     *\n     * @param string  $filepath   Full path to the file\n     * @param string  $data       The data to be encoded\n     * @param integer $file_mtime File mtime\n     * @param integer $file_mdate File mdate\n     */\n    private function _add_data($filepath, $data, $file_mtime, $file_mdate)\n    {\n        $filepath = str_replace(\"\\\\\", \"/\", $filepath);\n\n        $uncompressed_size = strlen($data);\n        $crc32  = crc32($data);\n\n        $gzdata = gzcompress($data);\n        $gzdata = substr($gzdata, 2, -4);\n        $compressed_size = strlen($gzdata);\n\n        $this->zipdata .=\n            \"\\x50\\x4b\\x03\\x04\\x14\\x00\\x00\\x00\\x08\\x00\"\n            .pack('v', $file_mtime)\n            .pack('v', $file_mdate)\n            .pack('V', $crc32)\n            .pack('V', $compressed_size)\n            .pack('V', $uncompressed_size)\n            .pack('v', strlen($filepath)) // length of filename\n            .pack('v', 0) // extra field length\n            .$filepath\n            .$gzdata; // \"file data\" segment\n\n        $this->directory .=\n            \"\\x50\\x4b\\x01\\x02\\x00\\x00\\x14\\x00\\x00\\x00\\x08\\x00\"\n            .pack('v', $file_mtime)\n            .pack('v', $file_mdate)\n            .pack('V', $crc32)\n            .pack('V', $compressed_size)\n            .pack('V', $uncompressed_size)\n            .pack('v', strlen($filepath)) // length of filename\n            .pack('v', 0) // extra field length\n            .pack('v', 0) // file comment length\n            .pack('v', 0) // disk number start\n            .pack('v', 0) // internal file attributes\n            .pack('V', 32) // external file attributes - 'archive' bit set\n            .pack('V', $this->offset) // relative offset of local header\n            .$filepath;\n\n        $this->offset = strlen($this->zipdata);\n        $this->entries++;\n        $this->file_num++;\n    }\n\n    /**\n     * Read the contents of a file and add it to the zip\n     *\n     *  <code>\n     *      Zip::factory()->readFile('test.txt');\n     *  </code>\n     *\n     * @param  string  $path              Path\n     * @param  boolean $preserve_filepath Preserve filepath\n     * @return mixed\n     */\n    public function readFile($path, $preserve_filepath = false)\n    {\n        if ( ! file_exists($path)) {\n            return false;\n        }\n\n        if (false !== ($data = file_get_contents($path))) {\n\n            $name = str_replace(\"\\\\\", \"/\", $path);\n\n            if ($preserve_filepath === false) {\n                $name = preg_replace(\"|.*/(.+)|\", \"\\\\1\", $name);\n            }\n\n            $this->addData($name, $data);\n\n            return $this;\n        }\n\n        return false;\n    }\n\n    /**\n     * Read a directory and add it to the zip.\n     *\n     *  <code>\n     *      Zip::factory()->readDir('test/');\n     *  </code>\n     *\n     * This function recursively reads a folder and everything it contains (including\n     * sub-folders) and creates a zip based on it.  Whatever directory structure\n     * is in the original file path will be recreated in the zip file.\n     *\n     * @param  string  $path              Path to source\n     * @param  boolean $preserve_filepath Preserve filepath\n     * @param  string  $root_path         Root path\n     * @return mixed\n     */\n    public function readDir($path, $preserve_filepath = true, $root_path = null, $exclude_files = array())\n    {\n        if ( ! $fp = @opendir($path)) {\n            return false;\n        }\n\n        // Set the original directory root for child dir's to use as relative\n        if ($root_path === null) {\n            $root_path = dirname($path) . '/';\n        }\n\n        while (false !== ($file = readdir($fp))) {\n\n            if (substr($file, 0, 1) == '.' || in_array($path.$file, $exclude_files)) {\n                continue;\n            }\n\n            if (@is_dir($path.$file)) {\n                $this->readDir($path.$file.\"/\", $preserve_filepath, $root_path, $exclude_files);\n            } else {\n                if (false !== ($data = file_get_contents($path.$file))) {\n                    $name = str_replace(\"\\\\\", \"/\", $path);\n\n                    if ($preserve_filepath === false) {\n                        $name = str_replace($root_path, '', $name);\n                    }\n\n                    $this->addData($name.$file, $data);\n                }\n            }\n        }\n\n        return $this;\n    }\n\n\n    /**\n     * Get the Zip file\n     *\n     *  <code>\n     *      Zip::factory()->getZip();\n     *  </code>\n     *\n     * @return string\n     */\n    public function getZip()\n    {\n        // Is there any data to return?\n        if ($this->entries == 0) {\n            return false;\n        }\n\n        $zip_data  = $this->zipdata;\n        $zip_data .= $this->directory.\"\\x50\\x4b\\x05\\x06\\x00\\x00\\x00\\x00\";\n        $zip_data .= pack('v', $this->entries); // total # of entries \"on this disk\"\n        $zip_data .= pack('v', $this->entries); // total # of entries overall\n        $zip_data .= pack('V', strlen($this->directory)); // size of central dir\n        $zip_data .= pack('V', strlen($this->zipdata)); // offset to start of central dir\n        $zip_data .= \"\\x00\\x00\"; // .zip file comment length\n\n        return $zip_data;\n    }\n\n\n    /**\n     * Write File to the specified directory\n     *\n     *  <code>\n     *      Zip::factory()->readDir('test1/')->readDir('test2/')->archive('test.zip');\n     *  </code>\n     *\n     * @param  string  $filepath The file name\n     * @return boolean\n     */\n    public function archive($filepath)\n    {\n        if ( ! ($fp = @fopen($filepath, \"w\"))) {\n            return false;\n        }\n\n        flock($fp, LOCK_EX);\n        fwrite($fp, $this->getZip());\n        flock($fp, LOCK_UN);\n        fclose($fp);\n\n        return true;\n    }\n\n\n    /**\n     * Initialize Data\n     *\n     *  <code>\n     *      Zip::factory()->clearData();\n     *  </code>\n     *\n     * Lets you clear current zip data.  Useful if you need to create\n     * multiple zips with different data.\n     */\n    public function clearData()\n    {\n        $this->zipdata      = '';\n        $this->directory    = '';\n        $this->entries      = 0;\n        $this->file_num     = 0;\n        $this->offset       = 0;\n    }\n\n    public function extract($zip_file, $target_dir = null)\n    {\n        $chmod = 0777;\n        $this->_archive_info = array();\n\n        $files = $this->_read_archive($zip_file);\n\n        if (!$files) {\n            return false;\n        }\n\n        $file_locations = array();\n        foreach ($files as $file => $trash) {\n            $dirname = pathinfo($file, PATHINFO_DIRNAME);\n\n            $folders = explode('/', $dirname);\n            $out_dn = $target_dir . '/' . $dirname;\n\n            if ( !is_dir($out_dn)) {\n                $str = '';\n                foreach ($folders as $folder) {\n                    $str = $str ? $str . '/' . $folder : $folder;\n                    if ( !is_dir($target_dir . '/' . $str)) {\n                        if ( ! @mkdir($target_dir . '/' . $str)) {\n                            return false;\n                        }\n\n                        chmod($target_dir . '/' . $str, $chmod);\n                    }\n                }\n            }\n\n            if (substr($file, -1, 1) == '/') {\n                continue;\n            }\n\n            $file_locations[] = $file_location = $target_dir . '/' . $file;\n\n            $this->_extract_file($file, $file_location);\n        }\n\n        $this->_archive_info = array();\n\n        return $file_locations;\n    }\n\n    private function _read_archive($zip_file)\n    {\n        if (sizeof($this->_archive_info)) {\n            return $this->_archive_info;\n        }\n\n        $fh = fopen($zip_file, 'r');\n        $this->farc = &$fh;\n\n        if ( !$fh) {\n            return false;\n        }\n\n        if ( !$this->_read_file_list_by_eof($fh)) {\n            if ( !$this->_read_files_by_signatures($fh)) {\n                return false;\n            }\n        }\n\n        return $this->_archive_info;\n    }\n\n    private function _read_file_list_by_eof(&$fh)\n    {\n        for ($x = 0; $x < 1024; $x++) {\n            fseek($fh, -22 - $x, SEEK_END);\n\n            $signature = fread($fh, 4);\n\n            if ($signature == $this->_central_signature_end) {\n                $eodir['disk_number_this'] = unpack(\"v\", fread($fh, 2));\n                $eodir['disk_number'] = unpack(\"v\", fread($fh, 2));\n                $eodir['total_entries_this'] = unpack(\"v\", fread($fh, 2));\n                $eodir['total_entries'] = unpack(\"v\", fread($fh, 2));\n                $eodir['size_of_cd'] = unpack(\"V\", fread($fh, 4));\n                $eodir['offset_start_cd'] = unpack(\"V\", fread($fh, 4));\n                $zip_comment_lenght = unpack(\"v\", fread($fh, 2));\n                $eodir['zipfile_comment'] = $zip_comment_lenght[1] ? fread($fh, $zip_comment_lenght[1]) : '';\n\n                fseek($fh, $eodir['offset_start_cd'][1]);\n                $signature = fread($fh, 4);\n\n                while ($signature == $this->_dir_signature) {\n                    $dir['version_madeby'] = unpack(\"v\", fread($fh, 2));\n                    $dir['version_needed'] = unpack(\"v\", fread($fh, 2));\n                    $dir['general_bit_flag'] = unpack(\"v\", fread($fh, 2));\n                    $dir['compression_method'] = unpack(\"v\", fread($fh, 2));\n                    $dir['lastmod_time'] = unpack(\"v\", fread($fh, 2));\n                    $dir['lastmod_date'] = unpack(\"v\", fread($fh, 2));\n                    $dir['crc-32'] = fread($fh, 4);\n                    $dir['compressed_size'] = unpack(\"V\", fread($fh, 4));\n                    $dir['uncompressed_size'] = unpack(\"V\", fread($fh, 4));\n                    $zip_file_length = unpack(\"v\", fread($fh, 2));\n                    $extra_field_length = unpack(\"v\", fread($fh, 2));\n                    $fileCommentLength = unpack(\"v\", fread($fh, 2));\n                    $dir['disk_number_start'] = unpack(\"v\", fread($fh, 2));\n                    $dir['internal_attributes'] = unpack(\"v\", fread($fh, 2));\n                    $dir['external_attributes1'] = unpack(\"v\", fread($fh, 2));\n                    $dir['external_attributes2'] = unpack(\"v\", fread($fh, 2));\n                    $dir['relative_offset'] = unpack(\"V\", fread($fh, 4));\n                    $dir['file_name'] = fread($fh, $zip_file_length[1]);\n                    $dir['extra_field'] = $extra_field_length[1] ? fread($fh, $extra_field_length[1]) : '';\n                    $dir['file_comment'] = $fileCommentLength[1] ? fread($fh, $fileCommentLength[1]) : '';\n\n                    $binary_mod_date = str_pad(decbin($dir['lastmod_date'][1]), 16, '0', STR_PAD_LEFT);\n                    $binary_mod_time = str_pad(decbin($dir['lastmod_time'][1]), 16, '0', STR_PAD_LEFT);\n                    $last_mod_year = bindec(substr($binary_mod_date, 0, 7)) + 1980;\n                    $last_mod_month = bindec(substr($binary_mod_date, 7, 4));\n                    $last_mod_day = bindec(substr($binary_mod_date, 11, 5));\n                    $last_mod_hour = bindec(substr($binary_mod_time, 0, 5));\n                    $last_mod_minute = bindec(substr($binary_mod_time, 5, 6));\n                    $last_mod_second = bindec(substr($binary_mod_time, 11, 5));\n\n                    $central_dir_list[$dir['file_name']] = array(\n                        'version_madeby' => $dir['version_madeby'][1],\n                        'version_needed' => $dir['version_needed'][1],\n                        'general_bit_flag' => str_pad(decbin($dir['general_bit_flag'][1]), 8, '0', STR_PAD_LEFT),\n                        'compression_method' => $dir['compression_method'][1],\n                        'lastmod_datetime' => mktime($last_mod_hour, $last_mod_minute, $last_mod_second, $last_mod_month, $last_mod_day, $last_mod_year),\n                        'crc-32' => str_pad(dechex(ord($dir['crc-32'][3])), 2, '0', STR_PAD_LEFT) .\n                            str_pad(dechex(ord($dir['crc-32'][2])), 2, '0', STR_PAD_LEFT) .\n                            str_pad(dechex(ord($dir['crc-32'][1])), 2, '0', STR_PAD_LEFT) .\n                            str_pad(dechex(ord($dir['crc-32'][0])), 2, '0', STR_PAD_LEFT),\n                        'compressed_size' => $dir['compressed_size'][1],\n                        'uncompressed_size' => $dir['uncompressed_size'][1],\n                        'disk_number_start' => $dir['disk_number_start'][1],\n                        'internal_attributes' => $dir['internal_attributes'][1],\n                        'external_attributes1' => $dir['external_attributes1'][1],\n                        'external_attributes2' => $dir['external_attributes2'][1],\n                        'relative_offset' => $dir['relative_offset'][1],\n                        'file_name' => $dir['file_name'],\n                        'extra_field' => $dir['extra_field'],\n                        'file_comment' => $dir['file_comment'],\n                    );\n\n                    $signature = fread($fh, 4);\n                }\n\n                if (isset($central_dir_list)) {\n                    foreach ($central_dir_list as $filename => $details) {\n                        $i = $this->_get_file_header($fh, $details['relative_offset']);\n\n                        $this->_archive_info[$filename]['file_name'] = $filename;\n                        $this->_archive_info[$filename]['compression_method'] = $details['compression_method'];\n                        $this->_archive_info[$filename]['version_needed'] = $details['version_needed'];\n                        $this->_archive_info[$filename]['lastmod_datetime'] = $details['lastmod_datetime'];\n                        $this->_archive_info[$filename]['crc-32'] = $details['crc-32'];\n                        $this->_archive_info[$filename]['compressed_size'] = $details['compressed_size'];\n                        $this->_archive_info[$filename]['uncompressed_size'] = $details['uncompressed_size'];\n                        $this->_archive_info[$filename]['lastmod_datetime'] = $details['lastmod_datetime'];\n                        $this->_archive_info[$filename]['extra_field'] = $i['extra_field'];\n                        $this->_archive_info[$filename]['contents_start_offset'] = $i['contents_start_offset'];\n                    }\n                }\n\n                return true;\n            }\n        }\n        return true;\n    }\n\n    private function _read_files_by_signatures(&$fh)\n    {\n        fseek($fh, 0);\n\n        $return = false;\n        for (;;) {\n            $details = $this->_get_file_header($fh);\n\n            if ( !$details) {\n                fseek($fh, 12 - 4, SEEK_CUR);\n                $details = $this->_get_file_header($fh);\n            }\n\n            if ( !$details) {\n                break;\n            }\n\n            $filename = $details['file_name'];\n            $this->_archive_info[$filename] = $details;\n            $return = true;\n        }\n\n        return $return;\n    }\n\n    private function _get_file_header(&$fh, $start_offset = FALSE)\n    {\n        if ($start_offset !== false) {\n            fseek($fh, $start_offset);\n        }\n\n        $signature = fread($fh, 4);\n\n        if ($signature == $this->_zip_signature) {\n            $file['version_needed'] = unpack(\"v\", fread($fh, 2));\n            $file['general_bit_flag'] = unpack(\"v\", fread($fh, 2));\n            $file['compression_method'] = unpack(\"v\", fread($fh, 2));\n            $file['lastmod_time'] = unpack(\"v\", fread($fh, 2));\n            $file['lastmod_date'] = unpack(\"v\", fread($fh, 2));\n            $file['crc-32'] = fread($fh, 4);\n            $file['compressed_size'] = unpack(\"V\", fread($fh, 4));\n            $file['uncompressed_size'] = unpack(\"V\", fread($fh, 4));\n            $zip_file_length = unpack(\"v\", fread($fh, 2));\n            $extra_field_length = unpack(\"v\", fread($fh, 2));\n            $file['file_name'] = fread($fh, $zip_file_length[1]);\n            $file['extra_field'] = $extra_field_length[1] ? fread($fh, $extra_field_length[1]) : '';\n            $file['contents_start_offset'] = ftell($fh);\n\n            fseek($fh, $file['compressed_size'][1], SEEK_CUR);\n\n            $binary_mod_date = str_pad(decbin($file['lastmod_date'][1]), 16, '0', STR_PAD_LEFT);\n            $binary_mod_time = str_pad(decbin($file['lastmod_time'][1]), 16, '0', STR_PAD_LEFT);\n\n            $last_mod_year = bindec(substr($binary_mod_date, 0, 7)) + 1980;\n            $last_mod_month = bindec(substr($binary_mod_date, 7, 4));\n            $last_mod_day = bindec(substr($binary_mod_date, 11, 5));\n            $last_mod_hour = bindec(substr($binary_mod_time, 0, 5));\n            $last_mod_minute = bindec(substr($binary_mod_time, 5, 6));\n            $last_mod_second = bindec(substr($binary_mod_time, 11, 5));\n\n            return array(\n                'file_name' => $file['file_name'],\n                'compression_method' => $file['compression_method'][1],\n                'version_needed' => $file['version_needed'][1],\n                'lastmod_datetime' => mktime($last_mod_hour, $last_mod_minute, $last_mod_second, $last_mod_month, $last_mod_day, $last_mod_year),\n                'crc-32' => str_pad(dechex(ord($file['crc-32'][3])), 2, '0', STR_PAD_LEFT) .\n                    str_pad(dechex(ord($file['crc-32'][2])), 2, '0', STR_PAD_LEFT) .\n                    str_pad(dechex(ord($file['crc-32'][1])), 2, '0', STR_PAD_LEFT) .\n                    str_pad(dechex(ord($file['crc-32'][0])), 2, '0', STR_PAD_LEFT),\n                'compressed_size' => $file['compressed_size'][1],\n                'uncompressed_size' => $file['uncompressed_size'][1],\n                'extra_field' => $file['extra_field'],\n                'general_bit_flag' => str_pad(decbin($file['general_bit_flag'][1]), 8, '0', STR_PAD_LEFT),\n                'contents_start_offset' => $file['contents_start_offset']\n            );\n        }\n\n        return false;\n    }\n\n    private function _extract_file($compressed_file_name, $target_file_name = false)\n    {\n        if ( !sizeof($this->_archive_info)) {\n            return false;\n        }\n\n        $fdetails = &$this->_archive_info[$compressed_file_name];\n\n        if ( ! isset($this->_archive_info[$compressed_file_name])) {\n            return false;\n        }\n\n        if (substr($compressed_file_name, -1) == '/') {\n            return false;\n        }\n\n        if ( !$fdetails['uncompressed_size']) {\n            return $target_file_name ? file_put_contents($target_file_name, '') : '';\n        }\n\n        fseek($this->farc, $fdetails['contents_start_offset']);\n        $ret = $this->_uncompress(\n            fread($this->farc, $fdetails['compressed_size']),\n            $fdetails['compression_method'],\n            $fdetails['uncompressed_size'],\n            $target_file_name\n        );\n\n        if ($target_file_name) {\n            chmod($target_file_name, 0644);\n        }\n\n        return $ret;\n    }\n\n    private function _uncompress($content, $mode, $uncompressed_size, $target_file_name = false)\n    {\n        switch ($mode) {\n            case 0:\n                return $target_file_name ? file_put_contents($target_file_name, $content) : $content;\n            case 8:\n                return $target_file_name\n                    ? file_put_contents($target_file_name, gzinflate($content, $uncompressed_size))\n                    : gzinflate($content, $uncompressed_size);\n            case 12:\n                return $target_file_name\n                    ? file_put_contents($target_file_name, bzdecompress($content)) : bzdecompress($content);\n            default:\n                return false;\n        }\n    }\n}\n"
  },
  {
    "path": "libraries/Gelato/_logs/.empty",
    "content": ""
  },
  {
    "path": "libraries/Gelato/changelog.txt",
    "content": "Gelato 1.0.3, 2013-04-03\n------------------------\n- Html Class: obfuscate() method added.\n- Html Class: email() method added.\n- Html Class: missing $macros var added.\n\nGelato 1.0.2, 2013-03-17\n------------------------\n- Added support for PHP 5.2.3\n\nGelato 1.0.1, 2013-03-05\n------------------------\n- New constant GELATO_CLASS_LOADER instead of GELATO_AUTOLOADER\n- ErrorHanler Class Improvements.\n- Log Class Improvements.\n- ClassLoader: new method register() added.\n- Define __DIR__ constant for PHP 5.2.x\n\nGelato 1.0.0, 2013-02-26\n------------------------\n- Initial release\n"
  },
  {
    "path": "libraries/Gelato/license.txt",
    "content": "GNU GENERAL PUBLIC LICENSE\nVersion 3, 29 June 2007\n\nCopyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n\nEveryone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.\n\nPreamble\nThe GNU General Public License is a free, copyleft license for software and other kinds of works.\n\nThe licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.\n\nWhen we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.\n\nTo protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.\n\nFor example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.\n\nDevelopers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.\n\nFor the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.\n\nSome devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.\n\nFinally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.\n\nThe precise terms and conditions for copying, distribution and modification follow.\n\nTERMS AND CONDITIONS\n0. Definitions.\n�This License� refers to version 3 of the GNU General Public License.\n\n�Copyright� also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.\n\n�The Program� refers to any copyrightable work licensed under this License. Each licensee is addressed as �you�. �Licensees� and �recipients� may be individuals or organizations.\n\nTo �modify� a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a �modified version� of the earlier work or a work �based on� the earlier work.\n\nA �covered work� means either the unmodified Program or a work based on the Program.\n\nTo �propagate� a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.\n\nTo �convey� a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.\n\nAn interactive user interface displays �Appropriate Legal Notices� to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.\n\n1. Source Code.\nThe �source code� for a work means the preferred form of the work for making modifications to it. �Object code� means any non-source form of a work.\n\nA �Standard Interface� means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.\n\nThe �System Libraries� of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A �Major Component�, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.\n\nThe �Corresponding Source� for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.\n\nThe Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.\n\nThe Corresponding Source for a work in source code form is that same work.\n\n2. Basic Permissions.\nAll rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.\n\nYou may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.\n\nConveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.\n\n3. Protecting Users' Legal Rights From Anti-Circumvention Law.\nNo covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.\n\nWhen you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.\n\n4. Conveying Verbatim Copies.\nYou may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.\n\nYou may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.\n\n5. Conveying Modified Source Versions.\nYou may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:\n\na) The work must carry prominent notices stating that you modified it, and giving a relevant date.\nb) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to �keep intact all notices�.\nc) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.\nd) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.\nA compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an �aggregate� if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.\n\n6. Conveying Non-Source Forms.\nYou may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:\n\na) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.\nb) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.\nc) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.\nd) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.\ne) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.\nA separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.\n\nA �User Product� is either (1) a �consumer product�, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, �normally used� refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.\n\n�Installation Information� for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.\n\nIf you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).\n\nThe requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.\n\nCorresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.\n\n7. Additional Terms.\n�Additional permissions� are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.\n\nWhen you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.\n\nNotwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:\n\na) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or\nb) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or\nc) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or\nd) Limiting the use for publicity purposes of names of licensors or authors of the material; or\ne) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or\nf) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.\nAll other non-permissive additional terms are considered �further restrictions� within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.\n\nIf you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.\n\nAdditional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.\n\n8. Termination.\nYou may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).\n\nHowever, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.\n\nMoreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.\n\nTermination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.\n\n9. Acceptance Not Required for Having Copies.\nYou are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.\n\n10. Automatic Licensing of Downstream Recipients.\nEach time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.\n\nAn �entity transaction� is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.\n\nYou may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.\n\n11. Patents.\nA �contributor� is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's �contributor version�.\n\nA contributor's �essential patent claims� are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, �control� includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.\n\nEach contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.\n\nIn the following three paragraphs, a �patent license� is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To �grant� such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.\n\nIf you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. �Knowingly relying� means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.\n\nIf, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.\n\nA patent license is �discriminatory� if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.\n\nNothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.\n\n12. No Surrender of Others' Freedom.\nIf conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.\n\n13. Use with the GNU Affero General Public License.\nNotwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.\n\n14. Revised Versions of this License.\nThe Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.\n\nEach version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License �or any later version� applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.\n\nIf the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.\n\nLater license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.\n\n15. Disclaimer of Warranty.\nTHERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM �AS IS� WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n16. Limitation of Liability.\nIN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n17. Interpretation of Sections 15 and 16.\nIf the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.\n\nEND OF TERMS AND CONDITIONS\n\nHow to Apply These Terms to Your New Programs\nIf you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.\n\nTo do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the �copyright� line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program 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\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\nThe hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an �about box�.\n\nYou should also get your employer (if you work as a programmer) or school, if any, to sign a �copyright disclaimer� for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.\n\nThe GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>."
  },
  {
    "path": "libraries/Idiorm/ORM.php",
    "content": "<?php\n\n    /**\n     *\n     * Idiorm\n     *\n     * http://github.com/j4mie/idiorm/\n     *\n     * A single-class super-simple database abstraction layer for PHP.\n     * Provides (nearly) zero-configuration object-relational mapping\n     * and a fluent interface for building basic, commonly-used queries.\n     *\n     * BSD Licensed.\n     *\n     * Copyright (c) 2010, Jamie Matthews\n     * All rights reserved.\n     *\n     * Redistribution and use in source and binary forms, with or without\n     * modification, are permitted provided that the following conditions are met:\n     *\n     * * Redistributions of source code must retain the above copyright notice, this\n     *   list of conditions and the following disclaimer.\n     *\n     * * Redistributions in binary form must reproduce the above copyright notice,\n     *   this list of conditions and the following disclaimer in the documentation\n     *   and/or other materials provided with the distribution.\n     *\n     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n     * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n     * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n     * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n     * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n     * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n     * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n     * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n     * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n     *\n     */\n\n    class ORM implements ArrayAccess {\n\n        // ----------------------- //\n        // --- CLASS CONSTANTS --- //\n        // ----------------------- //\n\n        // WHERE and HAVING condition array keys\n        const CONDITION_FRAGMENT = 0;\n        const CONDITION_VALUES = 1;\n\n        const DEFAULT_CONNECTION = 'default';\n\n        // Limit clause style\n        const LIMIT_STYLE_TOP_N = \"top\";\n        const LIMIT_STYLE_LIMIT = \"limit\";\n\n        // ------------------------ //\n        // --- CLASS PROPERTIES --- //\n        // ------------------------ //\n\n        // Class configuration\n        protected static $_default_config = array(\n            'connection_string' => 'sqlite::memory:',\n            'id_column' => 'id',\n            'id_column_overrides' => array(),\n            'error_mode' => PDO::ERRMODE_EXCEPTION,\n            'username' => null,\n            'password' => null,\n            'driver_options' => null,\n            'identifier_quote_character' => null, // if this is null, will be autodetected\n            'limit_clause_style' => null, // if this is null, will be autodetected\n            'logging' => false,\n            'logger' => null,\n            'caching' => false,\n            'return_result_sets' => false,\n        );\n\n        // Map of configuration settings\n        protected static $_config = array();\n\n        // Map of database connections, instances of the PDO class\n        protected static $_db = array();\n\n        // Last query run, only populated if logging is enabled\n        protected static $_last_query;\n\n        // Log of all queries run, mapped by connection key, only populated if logging is enabled\n        protected static $_query_log = array();\n\n        // Query cache, only used if query caching is enabled\n        protected static $_query_cache = array();\n\n        // Reference to previously used PDOStatement object to enable low-level access, if needed\n        protected static $_last_statement = null;\n\n        // --------------------------- //\n        // --- INSTANCE PROPERTIES --- //\n        // --------------------------- //\n\n        // Key name of the connections in self::$_db used by this instance\n        protected $_connection_name;\n\n        // The name of the table the current ORM instance is associated with\n        protected $_table_name;\n\n        // Alias for the table to be used in SELECT queries\n        protected $_table_alias = null;\n\n        // Values to be bound to the query\n        protected $_values = array();\n\n        // Columns to select in the result\n        protected $_result_columns = array('*');\n\n        // Are we using the default result column or have these been manually changed?\n        protected $_using_default_result_columns = true;\n\n        // Join sources\n        protected $_join_sources = array();\n\n        // Should the query include a DISTINCT keyword?\n        protected $_distinct = false;\n\n        // Is this a raw query?\n        protected $_is_raw_query = false;\n\n        // The raw query\n        protected $_raw_query = '';\n\n        // The raw query parameters\n        protected $_raw_parameters = array();\n\n        // Array of WHERE clauses\n        protected $_where_conditions = array();\n\n        // LIMIT\n        protected $_limit = null;\n\n        // OFFSET\n        protected $_offset = null;\n\n        // ORDER BY\n        protected $_order_by = array();\n\n        // GROUP BY\n        protected $_group_by = array();\n\n        // HAVING\n        protected $_having_conditions = array();\n\n        // The data for a hydrated instance of the class\n        protected $_data = array();\n\n        // Fields that have been modified during the\n        // lifetime of the object\n        protected $_dirty_fields = array();\n\n        // Fields that are to be inserted in the DB raw\n        protected $_expr_fields = array();\n\n        // Is this a new object (has create() been called)?\n        protected $_is_new = false;\n\n        // Name of the column to use as the primary key for\n        // this instance only. Overrides the config settings.\n        protected $_instance_id_column = null;\n\n        // ---------------------- //\n        // --- STATIC METHODS --- //\n        // ---------------------- //\n\n        /**\n         * Pass configuration settings to the class in the form of\n         * key/value pairs. As a shortcut, if the second argument\n         * is omitted and the key is a string, the setting is\n         * assumed to be the DSN string used by PDO to connect\n         * to the database (often, this will be the only configuration\n         * required to use Idiorm). If you have more than one setting\n         * you wish to configure, another shortcut is to pass an array\n         * of settings (and omit the second argument).\n         * @param string $key\n         * @param mixed $value\n         * @param string $connection_name Which connection to use\n         */\n        public static function configure($key, $value = null, $connection_name = self::DEFAULT_CONNECTION) {\n            self::_setup_db_config($connection_name); //ensures at least default config is set\n\n            if (is_array($key)) {\n                // Shortcut: If only one array argument is passed,\n                // assume it's an array of configuration settings\n                foreach ($key as $conf_key => $conf_value) {\n                    self::configure($conf_key, $conf_value, $connection_name);\n                }\n            } else {\n                if (is_null($value)) {\n                    // Shortcut: If only one string argument is passed, \n                    // assume it's a connection string\n                    $value = $key;\n                    $key = 'connection_string';\n                }\n                self::$_config[$connection_name][$key] = $value;\n            }\n        }\n\n        /**\n         * Retrieve configuration options by key, or as whole array.\n         * @param string $key\n         * @param string $connection_name Which connection to use\n         */\n        public static function get_config($key = null, $connection_name = self::DEFAULT_CONNECTION) {\n            if ($key) {\n                return self::$_config[$connection_name][$key];\n            } else {\n                return self::$_config[$connection_name];\n            }\n        }\n\n        /**\n         * Delete all configs in _config array.\n         */\n        public static function reset_config() {\n            self::$_config = array();\n        }\n        \n        /**\n         * Despite its slightly odd name, this is actually the factory\n         * method used to acquire instances of the class. It is named\n         * this way for the sake of a readable interface, ie\n         * ORM::for_table('table_name')->find_one()-> etc. As such,\n         * this will normally be the first method called in a chain.\n         * @param string $table_name\n         * @param string $connection_name Which connection to use\n         * @return ORM\n         */\n        public static function for_table($table_name, $connection_name = self::DEFAULT_CONNECTION) {\n            self::_setup_db($connection_name);\n            return new self($table_name, array(), $connection_name);\n        }\n\n        /**\n         * Set up the database connection used by the class\n         * @param string $connection_name Which connection to use\n         */\n        protected static function _setup_db($connection_name = self::DEFAULT_CONNECTION) {\n            if (!array_key_exists($connection_name, self::$_db) ||\n                !is_object(self::$_db[$connection_name])) {\n                self::_setup_db_config($connection_name);\n\n                $db = new PDO(\n                    self::$_config[$connection_name]['connection_string'],\n                    self::$_config[$connection_name]['username'],\n                    self::$_config[$connection_name]['password'],\n                    self::$_config[$connection_name]['driver_options']\n                );\n\n                $db->setAttribute(PDO::ATTR_ERRMODE, self::$_config[$connection_name]['error_mode']);\n                self::set_db($db, $connection_name);\n            }\n        }\n\n       /**\n        * Ensures configuration (mulitple connections) is at least set to default.\n        * @param string $connection_name Which connection to use\n        */\n        protected static function _setup_db_config($connection_name) {\n            if (!array_key_exists($connection_name, self::$_config)) {\n                self::$_config[$connection_name] = self::$_default_config;\n            }\n        }\n\n        /**\n         * Set the PDO object used by Idiorm to communicate with the database.\n         * This is public in case the ORM should use a ready-instantiated\n         * PDO object as its database connection. Accepts an optional string key\n         * to identify the connection if multiple connections are used.\n         * @param PDO $db\n         * @param string $connection_name Which connection to use\n         */\n        public static function set_db($db, $connection_name = self::DEFAULT_CONNECTION) {\n            self::_setup_db_config($connection_name);\n            self::$_db[$connection_name] = $db;\n            self::_setup_identifier_quote_character($connection_name);\n            self::_setup_limit_clause_style($connection_name);\n        }\n\n        /**\n         * Delete all registered PDO objects in _db array.\n         */\n        public static function reset_db() {\n            self::$_db = array();\n        }\n\n        /**\n         * Detect and initialise the character used to quote identifiers\n         * (table names, column names etc). If this has been specified\n         * manually using ORM::configure('identifier_quote_character', 'some-char'),\n         * this will do nothing.\n         * @param string $connection_name Which connection to use\n         */\n        protected static function _setup_identifier_quote_character($connection_name) {\n            if (is_null(self::$_config[$connection_name]['identifier_quote_character'])) {\n                self::$_config[$connection_name]['identifier_quote_character'] =\n                    self::_detect_identifier_quote_character($connection_name);\n            }\n        }\n\n        /**\n         * Detect and initialise the limit clause style (\"SELECT TOP 5\" /\n         * \"... LIMIT 5\"). If this has been specified manually using \n         * ORM::configure('limit_clause_style', 'top'), this will do nothing.\n         * @param string $connection_name Which connection to use\n         */\n        public static function _setup_limit_clause_style($connection_name) {\n            if (is_null(self::$_config[$connection_name]['limit_clause_style'])) {\n                self::$_config[$connection_name]['limit_clause_style'] =\n                    self::_detect_limit_clause_style($connection_name);\n            }\n        }\n\n        /**\n         * Return the correct character used to quote identifiers (table\n         * names, column names etc) by looking at the driver being used by PDO.\n         * @param string $connection_name Which connection to use\n         * @return string\n         */\n        protected static function _detect_identifier_quote_character($connection_name) {\n            switch(self::$_db[$connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME)) {\n                case 'pgsql':\n                case 'sqlsrv':\n                case 'dblib':\n                case 'mssql':\n                case 'sybase':\n                case 'firebird':\n                    return '\"';\n                case 'mysql':\n                case 'sqlite':\n                case 'sqlite2':\n                default:\n                    return '`';\n            }\n        }\n\n        /**\n         * Returns a constant after determining the appropriate limit clause\n         * style\n         * @param string $connection_name Which connection to use\n         * @return string Limit clause style keyword/constant\n         */\n        protected static function _detect_limit_clause_style($connection_name) {\n            switch(self::$_db[$connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME)) {\n                case 'sqlsrv':\n                case 'dblib':\n                case 'mssql':\n                    return ORM::LIMIT_STYLE_TOP_N;\n                default:\n                    return ORM::LIMIT_STYLE_LIMIT;\n            }\n        }\n\n        /**\n         * Returns the PDO instance used by the the ORM to communicate with\n         * the database. This can be called if any low-level DB access is\n         * required outside the class. If multiple connections are used,\n         * accepts an optional key name for the connection.\n         * @param string $connection_name Which connection to use\n         * @return PDO\n         */\n        public static function get_db($connection_name = self::DEFAULT_CONNECTION) {\n            self::_setup_db($connection_name); // required in case this is called before Idiorm is instantiated\n            return self::$_db[$connection_name];\n        }\n\n        /**\n         * Executes a raw query as a wrapper for PDOStatement::execute.\n         * Useful for queries that can't be accomplished through Idiorm,\n         * particularly those using engine-specific features.\n         * @example raw_execute('SELECT `name`, AVG(`order`) FROM `customer` GROUP BY `name` HAVING AVG(`order`) > 10')\n         * @example raw_execute('INSERT OR REPLACE INTO `widget` (`id`, `name`) SELECT `id`, `name` FROM `other_table`')\n         * @param string $query The raw SQL query\n         * @param array  $parameters Optional bound parameters\n         * @param string $connection_name Which connection to use\n         * @return bool Success\n         */\n        public static function raw_execute($query, $parameters = array(), $connection_name = self::DEFAULT_CONNECTION) {\n            self::_setup_db($connection_name);\n            return self::_execute($query, $parameters, $connection_name);\n        }\n\n        /**\n         * Returns the PDOStatement instance last used by any connection wrapped by the ORM.\n         * Useful for access to PDOStatement::rowCount() or error information\n         * @return PDOStatement\n         */\n        public static function get_last_statement() {\n            return self::$_last_statement;\n        }\n\n       /**\n        * Internal helper method for executing statments. Logs queries, and\n        * stores statement object in ::_last_statment, accessible publicly\n        * through ::get_last_statement()\n        * @param string $query\n        * @param array $parameters An array of parameters to be bound in to the query\n        * @param string $connection_name Which connection to use\n        * @return bool Response of PDOStatement::execute()\n        */\n        protected static function _execute($query, $parameters = array(), $connection_name = self::DEFAULT_CONNECTION) {\n            self::_log_query($query, $parameters, $connection_name);\n            $statement = self::$_db[$connection_name]->prepare($query);\n\n            self::$_last_statement = $statement;\n\n            return $statement->execute($parameters);\n        }\n\n        /**\n         * Add a query to the internal query log. Only works if the\n         * 'logging' config option is set to true.\n         *\n         * This works by manually binding the parameters to the query - the\n         * query isn't executed like this (PDO normally passes the query and\n         * parameters to the database which takes care of the binding) but\n         * doing it this way makes the logged queries more readable.\n         * @param string $query\n         * @param array $parameters An array of parameters to be bound in to the query\n         * @param string $connection_name Which connection to use\n         * @return bool\n         */\n        protected static function _log_query($query, $parameters, $connection_name) {\n            // If logging is not enabled, do nothing\n            if (!self::$_config[$connection_name]['logging']) {\n                return false;\n            }\n\n            if (!isset(self::$_query_log[$connection_name])) {\n                self::$_query_log[$connection_name] = array();\n            }\n\n            if (count($parameters) > 0) {\n                // Escape the parameters\n                $parameters = array_map(array(self::$_db[$connection_name], 'quote'), $parameters);\n\n                // Avoid %format collision for vsprintf\n                $query = str_replace(\"%\", \"%%\", $query);\n\n                // Replace placeholders in the query for vsprintf\n                if(false !== strpos($query, \"'\") || false !== strpos($query, '\"')) {\n                    $query = IdiormString::str_replace_outside_quotes(\"?\", \"%s\", $query);\n                } else {\n                    $query = str_replace(\"?\", \"%s\", $query);\n                }\n\n                // Replace the question marks in the query with the parameters\n                $bound_query = vsprintf($query, $parameters);\n            } else {\n                $bound_query = $query;\n            }\n\n            self::$_last_query = $bound_query;\n            self::$_query_log[$connection_name][] = $bound_query;\n            \n            \n            if(is_callable(self::$_config[$connection_name]['logger'])){\n                $logger = self::$_config[$connection_name]['logger'];\n                $logger($bound_query);\n            }\n            \n            return true;\n        }\n\n        /**\n         * Get the last query executed. Only works if the\n         * 'logging' config option is set to true. Otherwise\n         * this will return null. Returns last query from all connections if\n         * no connection_name is specified\n         * @param null|string $connection_name Which connection to use\n         * @return string\n         */\n        public static function get_last_query($connection_name = null) {\n            if ($connection_name === null) {\n                return self::$_last_query;\n            }\n            if (!isset(self::$_query_log[$connection_name])) {\n                return '';\n            }\n\n            return end(self::$_query_log[$connection_name]);\n        }\n\n        /**\n         * Get an array containing all the queries run on a\n         * specified connection up to now.\n         * Only works if the 'logging' config option is\n         * set to true. Otherwise, returned array will be empty.\n         * @param string $connection_name Which connection to use\n         */\n        public static function get_query_log($connection_name = self::DEFAULT_CONNECTION) {\n            if (isset(self::$_query_log[$connection_name])) {\n                return self::$_query_log[$connection_name];\n            }\n            return array();\n        }\n\n        /**\n         * Get a list of the available connection names\n         * @return array\n         */\n        public static function get_connection_names() {\n            return array_keys(self::$_db);\n        }\n\n        // ------------------------ //\n        // --- INSTANCE METHODS --- //\n        // ------------------------ //\n\n        /**\n         * \"Private\" constructor; shouldn't be called directly.\n         * Use the ORM::for_table factory method instead.\n         */\n        protected function __construct($table_name, $data = array(), $connection_name = self::DEFAULT_CONNECTION) {\n            $this->_table_name = $table_name;\n            $this->_data = $data;\n\n            $this->_connection_name = $connection_name;\n            self::_setup_db_config($connection_name);\n        }\n\n        /**\n         * Create a new, empty instance of the class. Used\n         * to add a new row to your database. May optionally\n         * be passed an associative array of data to populate\n         * the instance. If so, all fields will be flagged as\n         * dirty so all will be saved to the database when\n         * save() is called.\n         */\n        public function create($data=null) {\n            $this->_is_new = true;\n            if (!is_null($data)) {\n                return $this->hydrate($data)->force_all_dirty();\n            }\n            return $this;\n        }\n\n        /**\n         * Specify the ID column to use for this instance or array of instances only.\n         * This overrides the id_column and id_column_overrides settings.\n         *\n         * This is mostly useful for libraries built on top of Idiorm, and will\n         * not normally be used in manually built queries. If you don't know why\n         * you would want to use this, you should probably just ignore it.\n         */\n        public function use_id_column($id_column) {\n            $this->_instance_id_column = $id_column;\n            return $this;\n        }\n\n        /**\n         * Create an ORM instance from the given row (an associative\n         * array of data fetched from the database)\n         */\n        protected function _create_instance_from_row($row) {\n            $instance = self::for_table($this->_table_name, $this->_connection_name);\n            $instance->use_id_column($this->_instance_id_column);\n            $instance->hydrate($row);\n            return $instance;\n        }\n\n        /**\n         * Tell the ORM that you are expecting a single result\n         * back from your query, and execute it. Will return\n         * a single instance of the ORM class, or false if no\n         * rows were returned.\n         * As a shortcut, you may supply an ID as a parameter\n         * to this method. This will perform a primary key\n         * lookup on the table.\n         */\n        public function find_one($id=null) {\n            if (!is_null($id)) {\n                $this->where_id_is($id);\n            }\n            $this->limit(1);\n            $rows = $this->_run();\n\n            if (empty($rows)) {\n                return false;\n            }\n\n            return $this->_create_instance_from_row($rows[0]);\n        }\n\n        /**\n         * Tell the ORM that you are expecting multiple results\n         * from your query, and execute it. Will return an array\n         * of instances of the ORM class, or an empty array if\n         * no rows were returned.\n         * @return array|\\IdiormResultSet\n         */\n        public function find_many() {\n            if(self::$_config[$this->_connection_name]['return_result_sets']) {\n                return $this->find_result_set();\n            }\n            return $this->_find_many();\n        }\n\n        /**\n         * Tell the ORM that you are expecting multiple results\n         * from your query, and execute it. Will return an array\n         * of instances of the ORM class, or an empty array if\n         * no rows were returned.\n         * @return array\n         */\n        protected function _find_many() {\n            $rows = $this->_run();\n            return array_map(array($this, '_create_instance_from_row'), $rows);\n        }\n\n        /**\n         * Tell the ORM that you are expecting multiple results\n         * from your query, and execute it. Will return a result set object\n         * containing instances of the ORM class.\n         * @return \\IdiormResultSet\n         */\n        public function find_result_set() {\n            return new IdiormResultSet($this->_find_many());\n        }\n\n        /**\n         * Tell the ORM that you are expecting multiple results\n         * from your query, and execute it. Will return an array,\n         * or an empty array if no rows were returned.\n         * @return array\n         */\n        public function find_array() {\n            return $this->_run(); \n        }\n\n        /**\n         * Tell the ORM that you wish to execute a COUNT query.\n         * Will return an integer representing the number of\n         * rows returned.\n         */\n        public function count($column = '*') {\n            return $this->_call_aggregate_db_function(__FUNCTION__, $column);\n        }\n\n        /**\n         * Tell the ORM that you wish to execute a MAX query.\n         * Will return the max value of the choosen column.\n         */\n        public function max($column)  {\n            return $this->_call_aggregate_db_function(__FUNCTION__, $column);\n        }\n\n        /**\n         * Tell the ORM that you wish to execute a MIN query.\n         * Will return the min value of the choosen column.\n         */\n        public function min($column)  {\n            return $this->_call_aggregate_db_function(__FUNCTION__, $column);\n        }\n\n        /**\n         * Tell the ORM that you wish to execute a AVG query.\n         * Will return the average value of the choosen column.\n         */\n        public function avg($column)  {\n            return $this->_call_aggregate_db_function(__FUNCTION__, $column);\n        }\n\n        /**\n         * Tell the ORM that you wish to execute a SUM query.\n         * Will return the sum of the choosen column.\n         */\n        public function sum($column)  {\n            return $this->_call_aggregate_db_function(__FUNCTION__, $column);\n        }\n\n        /**\n         * Execute an aggregate query on the current connection.\n         * @param string $sql_function The aggregate function to call eg. MIN, COUNT, etc\n         * @param string $column The column to execute the aggregate query against\n         * @return int\n         */\n        protected function _call_aggregate_db_function($sql_function, $column) {\n            $alias = strtolower($sql_function);\n            $sql_function = strtoupper($sql_function);\n            if('*' != $column) {\n                $column = $this->_quote_identifier($column);\n            }\n            $result_columns = $this->_result_columns;\n            $this->_result_columns = array();\n            $this->select_expr(\"$sql_function($column)\", $alias);\n            $result = $this->find_one();\n            $this->_result_columns = $result_columns;\n\n            $return_value = 0;\n            if($result !== false && isset($result->$alias)) {\n                if((int) $result->$alias == (float) $result->$alias) {\n                    $return_value = (int) $result->$alias;\n                } else {\n                    $return_value = (float) $result->$alias;\n                }\n            }\n            return $return_value;\n        }\n\n         /**\n         * This method can be called to hydrate (populate) this\n         * instance of the class from an associative array of data.\n         * This will usually be called only from inside the class,\n         * but it's public in case you need to call it directly.\n         */\n        public function hydrate($data=array()) {\n            $this->_data = $data;\n            return $this;\n        }\n\n        /**\n         * Force the ORM to flag all the fields in the $data array\n         * as \"dirty\" and therefore update them when save() is called.\n         */\n        public function force_all_dirty() {\n            $this->_dirty_fields = $this->_data;\n            return $this;\n        }\n\n        /**\n         * Perform a raw query. The query can contain placeholders in\n         * either named or question mark style. If placeholders are\n         * used, the parameters should be an array of values which will\n         * be bound to the placeholders in the query. If this method\n         * is called, all other query building methods will be ignored.\n         */\n        public function raw_query($query, $parameters = array()) {\n            $this->_is_raw_query = true;\n            $this->_raw_query = $query;\n            $this->_raw_parameters = $parameters;\n            return $this;\n        }\n\n        /**\n         * Add an alias for the main table to be used in SELECT queries\n         */\n        public function table_alias($alias) {\n            $this->_table_alias = $alias;\n            return $this;\n        }\n\n        /**\n         * Internal method to add an unquoted expression to the set\n         * of columns returned by the SELECT query. The second optional\n         * argument is the alias to return the expression as.\n         */\n        protected function _add_result_column($expr, $alias=null) {\n            if (!is_null($alias)) {\n                $expr .= \" AS \" . $this->_quote_identifier($alias);\n            }\n\n            if ($this->_using_default_result_columns) {\n                $this->_result_columns = array($expr);\n                $this->_using_default_result_columns = false;\n            } else {\n                $this->_result_columns[] = $expr;\n            }\n            return $this;\n        }\n\n        /**\n         * Add a column to the list of columns returned by the SELECT\n         * query. This defaults to '*'. The second optional argument is\n         * the alias to return the column as.\n         */\n        public function select($column, $alias=null) {\n            $column = $this->_quote_identifier($column);\n            return $this->_add_result_column($column, $alias);\n        }\n\n        /**\n         * Add an unquoted expression to the list of columns returned\n         * by the SELECT query. The second optional argument is\n         * the alias to return the column as.\n         */\n        public function select_expr($expr, $alias=null) {\n            return $this->_add_result_column($expr, $alias);\n        }\n\n        /**\n         * Add columns to the list of columns returned by the SELECT\n         * query. This defaults to '*'. Many columns can be supplied\n         * as either an array or as a list of parameters to the method.\n         * \n         * Note that the alias must not be numeric - if you want a\n         * numeric alias then prepend it with some alpha chars. eg. a1\n         * \n         * @example select_many(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5');\n         * @example select_many('column', 'column2', 'column3');\n         * @example select_many(array('column', 'column2', 'column3'), 'column4', 'column5');\n         * \n         * @return \\ORM\n         */\n        public function select_many() {\n            $columns = func_get_args();\n            if(!empty($columns)) {\n                $columns = $this->_normalise_select_many_columns($columns);\n                foreach($columns as $alias => $column) {\n                    if(is_numeric($alias)) {\n                        $alias = null;\n                    }\n                    $this->select($column, $alias);\n                }\n            }\n            return $this;\n        }\n\n        /**\n         * Add an unquoted expression to the list of columns returned\n         * by the SELECT query. Many columns can be supplied as either \n         * an array or as a list of parameters to the method.\n         * \n         * Note that the alias must not be numeric - if you want a\n         * numeric alias then prepend it with some alpha chars. eg. a1\n         * \n         * @example select_many_expr(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5')\n         * @example select_many_expr('column', 'column2', 'column3')\n         * @example select_many_expr(array('column', 'column2', 'column3'), 'column4', 'column5')\n         * \n         * @return \\ORM\n         */\n        public function select_many_expr() {\n            $columns = func_get_args();\n            if(!empty($columns)) {\n                $columns = $this->_normalise_select_many_columns($columns);\n                foreach($columns as $alias => $column) {\n                    if(is_numeric($alias)) {\n                        $alias = null;\n                    }\n                    $this->select_expr($column, $alias);\n                }\n            }\n            return $this;\n        }\n\n        /**\n         * Take a column specification for the select many methods and convert it\n         * into a normalised array of columns and aliases.\n         * \n         * It is designed to turn the following styles into a normalised array:\n         * \n         * array(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5'))\n         * \n         * @param array $columns\n         * @return array\n         */\n        protected function _normalise_select_many_columns($columns) {\n            $return = array();\n            foreach($columns as $column) {\n                if(is_array($column)) {\n                    foreach($column as $key => $value) {\n                        if(!is_numeric($key)) {\n                            $return[$key] = $value;\n                        } else {\n                            $return[] = $value;\n                        }\n                    }\n                } else {\n                    $return[] = $column;\n                }\n            }\n            return $return;\n        }\n\n        /**\n         * Add a DISTINCT keyword before the list of columns in the SELECT query\n         */\n        public function distinct() {\n            $this->_distinct = true;\n            return $this;\n        }\n\n        /**\n         * Internal method to add a JOIN source to the query.\n         *\n         * The join_operator should be one of INNER, LEFT OUTER, CROSS etc - this\n         * will be prepended to JOIN.\n         *\n         * The table should be the name of the table to join to.\n         *\n         * The constraint may be either a string or an array with three elements. If it\n         * is a string, it will be compiled into the query as-is, with no escaping. The\n         * recommended way to supply the constraint is as an array with three elements:\n         *\n         * first_column, operator, second_column\n         *\n         * Example: array('user.id', '=', 'profile.user_id')\n         *\n         * will compile to\n         *\n         * ON `user`.`id` = `profile`.`user_id`\n         *\n         * The final (optional) argument specifies an alias for the joined table.\n         */\n        protected function _add_join_source($join_operator, $table, $constraint, $table_alias=null) {\n\n            $join_operator = trim(\"{$join_operator} JOIN\");\n\n            $table = $this->_quote_identifier($table);\n\n            // Add table alias if present\n            if (!is_null($table_alias)) {\n                $table_alias = $this->_quote_identifier($table_alias);\n                $table .= \" {$table_alias}\";\n            }\n\n            // Build the constraint\n            if (is_array($constraint)) {\n                list($first_column, $operator, $second_column) = $constraint;\n                $first_column = $this->_quote_identifier($first_column);\n                $second_column = $this->_quote_identifier($second_column);\n                $constraint = \"{$first_column} {$operator} {$second_column}\";\n            }\n\n            $this->_join_sources[] = \"{$join_operator} {$table} ON {$constraint}\";\n            return $this;\n        }\n\n        /**\n         * Add a simple JOIN source to the query\n         */\n        public function join($table, $constraint, $table_alias=null) {\n            return $this->_add_join_source(\"\", $table, $constraint, $table_alias);\n        }\n\n        /**\n         * Add an INNER JOIN souce to the query\n         */\n        public function inner_join($table, $constraint, $table_alias=null) {\n            return $this->_add_join_source(\"INNER\", $table, $constraint, $table_alias);\n        }\n\n        /**\n         * Add a LEFT OUTER JOIN souce to the query\n         */\n        public function left_outer_join($table, $constraint, $table_alias=null) {\n            return $this->_add_join_source(\"LEFT OUTER\", $table, $constraint, $table_alias);\n        }\n\n        /**\n         * Add an RIGHT OUTER JOIN souce to the query\n         */\n        public function right_outer_join($table, $constraint, $table_alias=null) {\n            return $this->_add_join_source(\"RIGHT OUTER\", $table, $constraint, $table_alias);\n        }\n\n        /**\n         * Add an FULL OUTER JOIN souce to the query\n         */\n        public function full_outer_join($table, $constraint, $table_alias=null) {\n            return $this->_add_join_source(\"FULL OUTER\", $table, $constraint, $table_alias);\n        }\n\n        /**\n         * Internal method to add a HAVING condition to the query\n         */\n        protected function _add_having($fragment, $values=array()) {\n            return $this->_add_condition('having', $fragment, $values);\n        }\n\n        /**\n         * Internal method to add a HAVING condition to the query\n         */\n        protected function _add_simple_having($column_name, $separator, $value) {\n            return $this->_add_simple_condition('having', $column_name, $separator, $value);\n        }\n\n        /**\n         * Internal method to add a WHERE condition to the query\n         */\n        protected function _add_where($fragment, $values=array()) {\n            return $this->_add_condition('where', $fragment, $values);\n        }\n\n        /**\n         * Internal method to add a WHERE condition to the query\n         */\n        protected function _add_simple_where($column_name, $separator, $value) {\n            return $this->_add_simple_condition('where', $column_name, $separator, $value);\n        }\n\n        /**\n         * Internal method to add a HAVING or WHERE condition to the query\n         */\n        protected function _add_condition($type, $fragment, $values=array()) {\n            $conditions_class_property_name = \"_{$type}_conditions\";\n            if (!is_array($values)) {\n                $values = array($values);\n            }\n            array_push($this->$conditions_class_property_name, array(\n                self::CONDITION_FRAGMENT => $fragment,\n                self::CONDITION_VALUES => $values,\n            ));\n            return $this;\n        }\n\n       /**\n         * Helper method to compile a simple COLUMN SEPARATOR VALUE\n         * style HAVING or WHERE condition into a string and value ready to\n         * be passed to the _add_condition method. Avoids duplication\n         * of the call to _quote_identifier\n         */\n        protected function _add_simple_condition($type, $column_name, $separator, $value) {\n            // Add the table name in case of ambiguous columns\n            if (count($this->_join_sources) > 0 && strpos($column_name, '.') === false) {\n                $table = $this->_table_name;\n                if (!is_null($this->_table_alias)) {\n                    $table = $this->_table_alias;\n                }\n\n                $column_name = \"{$table}.{$column_name}\";\n            }\n            $column_name = $this->_quote_identifier($column_name);\n            return $this->_add_condition($type, \"{$column_name} {$separator} ?\", $value);\n        } \n\n        /**\n         * Return a string containing the given number of question marks,\n         * separated by commas. Eg \"?, ?, ?\"\n         */\n        protected function _create_placeholders($fields) {\n            if(!empty($fields)) {\n                $db_fields = array();\n                foreach($fields as $key => $value) {\n                    // Process expression fields directly into the query\n                    if(array_key_exists($key, $this->_expr_fields)) {\n                        $db_fields[] = $value;\n                    } else {\n                        $db_fields[] = '?';\n                    }\n                }\n                return implode(', ', $db_fields);\n            }\n        }\n\n        /**\n         * Add a WHERE column = value clause to your query. Each time\n         * this is called in the chain, an additional WHERE will be\n         * added, and these will be ANDed together when the final query\n         * is built.\n         */\n        public function where($column_name, $value) {\n            return $this->where_equal($column_name, $value);\n        }\n\n        /**\n         * More explicitly named version of for the where() method.\n         * Can be used if preferred.\n         */\n        public function where_equal($column_name, $value) {\n            return $this->_add_simple_where($column_name, '=', $value);\n        }\n\n        /**\n         * Add a WHERE column != value clause to your query.\n         */\n        public function where_not_equal($column_name, $value) {\n            return $this->_add_simple_where($column_name, '!=', $value);\n        }\n\n        /**\n         * Special method to query the table by its primary key\n         */\n        public function where_id_is($id) {\n            return $this->where($this->_get_id_column_name(), $id);\n        }\n\n        /**\n         * Add a WHERE ... LIKE clause to your query.\n         */\n        public function where_like($column_name, $value) {\n            return $this->_add_simple_where($column_name, 'LIKE', $value);\n        }\n\n        /**\n         * Add where WHERE ... NOT LIKE clause to your query.\n         */\n        public function where_not_like($column_name, $value) {\n            return $this->_add_simple_where($column_name, 'NOT LIKE', $value);\n        }\n\n        /**\n         * Add a WHERE ... > clause to your query\n         */\n        public function where_gt($column_name, $value) {\n            return $this->_add_simple_where($column_name, '>', $value);\n        }\n\n        /**\n         * Add a WHERE ... < clause to your query\n         */\n        public function where_lt($column_name, $value) {\n            return $this->_add_simple_where($column_name, '<', $value);\n        }\n\n        /**\n         * Add a WHERE ... >= clause to your query\n         */\n        public function where_gte($column_name, $value) {\n            return $this->_add_simple_where($column_name, '>=', $value);\n        }\n\n        /**\n         * Add a WHERE ... <= clause to your query\n         */\n        public function where_lte($column_name, $value) {\n            return $this->_add_simple_where($column_name, '<=', $value);\n        }\n\n        /**\n         * Add a WHERE ... IN clause to your query\n         */\n        public function where_in($column_name, $values) {\n            $column_name = $this->_quote_identifier($column_name);\n            $placeholders = $this->_create_placeholders($values);\n            return $this->_add_where(\"{$column_name} IN ({$placeholders})\", $values);\n        }\n\n        /**\n         * Add a WHERE ... NOT IN clause to your query\n         */\n        public function where_not_in($column_name, $values) {\n            $column_name = $this->_quote_identifier($column_name);\n            $placeholders = $this->_create_placeholders($values);\n            return $this->_add_where(\"{$column_name} NOT IN ({$placeholders})\", $values);\n        }\n\n        /**\n         * Add a WHERE column IS NULL clause to your query\n         */\n        public function where_null($column_name) {\n            $column_name = $this->_quote_identifier($column_name);\n            return $this->_add_where(\"{$column_name} IS NULL\");\n        }\n\n        /**\n         * Add a WHERE column IS NOT NULL clause to your query\n         */\n        public function where_not_null($column_name) {\n            $column_name = $this->_quote_identifier($column_name);\n            return $this->_add_where(\"{$column_name} IS NOT NULL\");\n        }\n\n        /**\n         * Add a raw WHERE clause to the query. The clause should\n         * contain question mark placeholders, which will be bound\n         * to the parameters supplied in the second argument.\n         */\n        public function where_raw($clause, $parameters=array()) {\n            return $this->_add_where($clause, $parameters);\n        }\n\n        /**\n         * Add a LIMIT to the query\n         */\n        public function limit($limit) {\n            $this->_limit = $limit;\n            return $this;\n        }\n\n        /**\n         * Add an OFFSET to the query\n         */\n        public function offset($offset) {\n            $this->_offset = $offset;\n            return $this;\n        }\n\n        /**\n         * Add an ORDER BY clause to the query\n         */\n        protected function _add_order_by($column_name, $ordering) {\n            $column_name = $this->_quote_identifier($column_name);\n            $this->_order_by[] = \"{$column_name} {$ordering}\";\n            return $this;\n        }\n\n        /**\n         * Add an ORDER BY column DESC clause\n         */\n        public function order_by_desc($column_name) {\n            return $this->_add_order_by($column_name, 'DESC');\n        }\n\n        /**\n         * Add an ORDER BY column ASC clause\n         */\n        public function order_by_asc($column_name) {\n            return $this->_add_order_by($column_name, 'ASC');\n        }\n\n        /**\n         * Add an unquoted expression as an ORDER BY clause\n         */\n        public function order_by_expr($clause) {\n            $this->_order_by[] = $clause;\n            return $this;\n        }\n\n        /**\n         * Add a column to the list of columns to GROUP BY\n         */\n        public function group_by($column_name) {\n            $column_name = $this->_quote_identifier($column_name);\n            $this->_group_by[] = $column_name;\n            return $this;\n        }\n\n        /**\n         * Add an unquoted expression to the list of columns to GROUP BY \n         */\n        public function group_by_expr($expr) {\n            $this->_group_by[] = $expr;\n            return $this;\n        }\n\n        /**\n         * Add a HAVING column = value clause to your query. Each time\n         * this is called in the chain, an additional HAVING will be\n         * added, and these will be ANDed together when the final query\n         * is built.\n         */\n        public function having($column_name, $value) {\n            return $this->having_equal($column_name, $value);\n        }\n\n        /**\n         * More explicitly named version of for the having() method.\n         * Can be used if preferred.\n         */\n        public function having_equal($column_name, $value) {\n            return $this->_add_simple_having($column_name, '=', $value);\n        }\n\n        /**\n         * Add a HAVING column != value clause to your query.\n         */\n        public function having_not_equal($column_name, $value) {\n            return $this->_add_simple_having($column_name, '!=', $value);\n        }\n\n        /**\n         * Special method to query the table by its primary key\n         */\n        public function having_id_is($id) {\n            return $this->having($this->_get_id_column_name(), $id);\n        }\n\n        /**\n         * Add a HAVING ... LIKE clause to your query.\n         */\n        public function having_like($column_name, $value) {\n            return $this->_add_simple_having($column_name, 'LIKE', $value);\n        }\n\n        /**\n         * Add where HAVING ... NOT LIKE clause to your query.\n         */\n        public function having_not_like($column_name, $value) {\n            return $this->_add_simple_having($column_name, 'NOT LIKE', $value);\n        }\n\n        /**\n         * Add a HAVING ... > clause to your query\n         */\n        public function having_gt($column_name, $value) {\n            return $this->_add_simple_having($column_name, '>', $value);\n        }\n\n        /**\n         * Add a HAVING ... < clause to your query\n         */\n        public function having_lt($column_name, $value) {\n            return $this->_add_simple_having($column_name, '<', $value);\n        }\n\n        /**\n         * Add a HAVING ... >= clause to your query\n         */\n        public function having_gte($column_name, $value) {\n            return $this->_add_simple_having($column_name, '>=', $value);\n        }\n\n        /**\n         * Add a HAVING ... <= clause to your query\n         */\n        public function having_lte($column_name, $value) {\n            return $this->_add_simple_having($column_name, '<=', $value);\n        }\n\n        /**\n         * Add a HAVING ... IN clause to your query\n         */\n        public function having_in($column_name, $values) {\n            $column_name = $this->_quote_identifier($column_name);\n            $placeholders = $this->_create_placeholders($values);\n            return $this->_add_having(\"{$column_name} IN ({$placeholders})\", $values);\n        }\n\n        /**\n         * Add a HAVING ... NOT IN clause to your query\n         */\n        public function having_not_in($column_name, $values) {\n            $column_name = $this->_quote_identifier($column_name);\n            $placeholders = $this->_create_placeholders($values);\n            return $this->_add_having(\"{$column_name} NOT IN ({$placeholders})\", $values);\n        }\n\n        /**\n         * Add a HAVING column IS NULL clause to your query\n         */\n        public function having_null($column_name) {\n            $column_name = $this->_quote_identifier($column_name);\n            return $this->_add_having(\"{$column_name} IS NULL\");\n        }\n\n        /**\n         * Add a HAVING column IS NOT NULL clause to your query\n         */\n        public function having_not_null($column_name) {\n            $column_name = $this->_quote_identifier($column_name);\n            return $this->_add_having(\"{$column_name} IS NOT NULL\");\n        }\n\n        /**\n         * Add a raw HAVING clause to the query. The clause should\n         * contain question mark placeholders, which will be bound\n         * to the parameters supplied in the second argument.\n         */\n        public function having_raw($clause, $parameters=array()) {\n            return $this->_add_having($clause, $parameters);\n        }\n\n        /**\n         * Build a SELECT statement based on the clauses that have\n         * been passed to this instance by chaining method calls.\n         */\n        protected function _build_select() {\n            // If the query is raw, just set the $this->_values to be\n            // the raw query parameters and return the raw query\n            if ($this->_is_raw_query) {\n                $this->_values = $this->_raw_parameters;\n                return $this->_raw_query;\n            }\n\n            // Build and return the full SELECT statement by concatenating\n            // the results of calling each separate builder method.\n            return $this->_join_if_not_empty(\" \", array(\n                $this->_build_select_start(),\n                $this->_build_join(),\n                $this->_build_where(),\n                $this->_build_group_by(),\n                $this->_build_having(),\n                $this->_build_order_by(),\n                $this->_build_limit(),\n                $this->_build_offset(),\n            ));\n        }\n\n        /**\n         * Build the start of the SELECT statement\n         */\n        protected function _build_select_start() {\n            $fragment = 'SELECT ';\n            $result_columns = join(', ', $this->_result_columns);\n\n            if (!is_null($this->_limit) &&\n                self::$_config[$this->_connection_name]['limit_clause_style'] === ORM::LIMIT_STYLE_TOP_N) {\n                $fragment .= \"TOP {$this->_limit} \";\n            }\n\n            if ($this->_distinct) {\n                $result_columns = 'DISTINCT ' . $result_columns;\n            }\n\n            $fragment .= \"{$result_columns} FROM \" . $this->_quote_identifier($this->_table_name);\n\n            if (!is_null($this->_table_alias)) {\n                $fragment .= \" \" . $this->_quote_identifier($this->_table_alias);\n            }\n            return $fragment;\n        }\n\n        /**\n         * Build the JOIN sources\n         */\n        protected function _build_join() {\n            if (count($this->_join_sources) === 0) {\n                return '';\n            }\n\n            return join(\" \", $this->_join_sources);\n        }\n\n        /**\n         * Build the WHERE clause(s)\n         */\n        protected function _build_where() {\n            return $this->_build_conditions('where');\n        }\n\n        /**\n         * Build the HAVING clause(s)\n         */\n        protected function _build_having() {\n            return $this->_build_conditions('having');\n        }\n\n        /**\n         * Build GROUP BY\n         */\n        protected function _build_group_by() {\n            if (count($this->_group_by) === 0) {\n                return '';\n            }\n            return \"GROUP BY \" . join(\", \", $this->_group_by);\n        }\n\n        /**\n         * Build a WHERE or HAVING clause\n         * @param string $type\n         * @return string\n         */\n        protected function _build_conditions($type) {\n            $conditions_class_property_name = \"_{$type}_conditions\";\n            // If there are no clauses, return empty string\n            if (count($this->$conditions_class_property_name) === 0) {\n                return '';\n            }\n\n            $conditions = array();\n            foreach ($this->$conditions_class_property_name as $condition) {\n                $conditions[] = $condition[self::CONDITION_FRAGMENT];\n                $this->_values = array_merge($this->_values, $condition[self::CONDITION_VALUES]);\n            }\n\n            return strtoupper($type) . \" \" . join(\" AND \", $conditions);\n        }\n\n        /**\n         * Build ORDER BY\n         */\n        protected function _build_order_by() {\n            if (count($this->_order_by) === 0) {\n                return '';\n            }\n            return \"ORDER BY \" . join(\", \", $this->_order_by);\n        }\n\n        /**\n         * Build LIMIT\n         */\n        protected function _build_limit() {\n            $fragment = '';\n            if (!is_null($this->_limit) &&\n                self::$_config[$this->_connection_name]['limit_clause_style'] == ORM::LIMIT_STYLE_LIMIT) {\n                if (self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') {\n                    $fragment = 'ROWS';\n                } else {\n                    $fragment = 'LIMIT';\n                }\n                $fragment .= \" {$this->_limit}\";\n            }\n            return $fragment;\n        }\n\n        /**\n         * Build OFFSET\n         */\n        protected function _build_offset() {\n            if (!is_null($this->_offset)) {\n                $clause = 'OFFSET';\n                if (self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') {\n                    $clause = 'TO';\n                }\n                return \"$clause \" . $this->_offset;\n            }\n            return '';\n        }\n\n        /**\n         * Wrapper around PHP's join function which\n         * only adds the pieces if they are not empty.\n         */\n        protected function _join_if_not_empty($glue, $pieces) {\n            $filtered_pieces = array();\n            foreach ($pieces as $piece) {\n                if (is_string($piece)) {\n                    $piece = trim($piece);\n                }\n                if (!empty($piece)) {\n                    $filtered_pieces[] = $piece;\n                }\n            }\n            return join($glue, $filtered_pieces);\n        }\n\n        /**\n         * Quote a string that is used as an identifier\n         * (table names, column names etc). This method can\n         * also deal with dot-separated identifiers eg table.column\n         */\n        protected function _quote_identifier($identifier) {\n            $parts = explode('.', $identifier);\n            $parts = array_map(array($this, '_quote_identifier_part'), $parts);\n            return join('.', $parts);\n        }\n\n        /**\n         * This method performs the actual quoting of a single\n         * part of an identifier, using the identifier quote\n         * character specified in the config (or autodetected).\n         */\n        protected function _quote_identifier_part($part) {\n            if ($part === '*') {\n                return $part;\n            }\n\n            $quote_character = self::$_config[$this->_connection_name]['identifier_quote_character'];\n            // double up any identifier quotes to escape them\n            return $quote_character .\n                   str_replace($quote_character,\n                               $quote_character . $quote_character,\n                               $part\n                   ) . $quote_character;\n        }\n\n        /**\n         * Create a cache key for the given query and parameters.\n         */\n        protected static function _create_cache_key($query, $parameters) {\n            $parameter_string = join(',', $parameters);\n            $key = $query . ':' . $parameter_string;\n            return sha1($key);\n        }\n\n        /**\n         * Check the query cache for the given cache key. If a value\n         * is cached for the key, return the value. Otherwise, return false.\n         */\n        protected static function _check_query_cache($cache_key, $connection_name = self::DEFAULT_CONNECTION) {\n            if (isset(self::$_query_cache[$connection_name][$cache_key])) {\n                return self::$_query_cache[$connection_name][$cache_key];\n            }\n            return false;\n        }\n\n        /**\n         * Clear the query cache\n         */\n        public static function clear_cache() {\n            self::$_query_cache = array();\n        }\n\n        /**\n         * Add the given value to the query cache.\n         */\n        protected static function _cache_query_result($cache_key, $value, $connection_name = self::DEFAULT_CONNECTION) {\n            if (!isset(self::$_query_cache[$connection_name])) {\n                self::$_query_cache[$connection_name] = array();\n            }\n            self::$_query_cache[$connection_name][$cache_key] = $value;\n        }\n\n        /**\n         * Execute the SELECT query that has been built up by chaining methods\n         * on this class. Return an array of rows as associative arrays.\n         */\n        protected function _run() {\n            $query = $this->_build_select();\n            $caching_enabled = self::$_config[$this->_connection_name]['caching'];\n\n            if ($caching_enabled) {\n                $cache_key = self::_create_cache_key($query, $this->_values);\n                $cached_result = self::_check_query_cache($cache_key, $this->_connection_name);\n\n                if ($cached_result !== false) {\n                    return $cached_result;\n                }\n            }\n\n            self::_execute($query, $this->_values, $this->_connection_name);\n            $statement = self::get_last_statement();\n\n            $rows = array();\n            while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n                $rows[] = $row;\n            }\n\n            if ($caching_enabled) {\n                self::_cache_query_result($cache_key, $rows, $this->_connection_name);\n            }\n\n            // reset Idiorm after executing the query\n            $this->_values = array();\n            $this->_result_columns = array('*');\n            $this->_using_default_result_columns = true;\n\n            return $rows;\n        }\n\n        /**\n         * Return the raw data wrapped by this ORM\n         * instance as an associative array. Column\n         * names may optionally be supplied as arguments,\n         * if so, only those keys will be returned.\n         */\n        public function as_array() {\n            if (func_num_args() === 0) {\n                return $this->_data;\n            }\n            $args = func_get_args();\n            return array_intersect_key($this->_data, array_flip($args));\n        }\n\n        /**\n         * Return the value of a property of this object (database row)\n         * or null if not present.\n         */\n        public function get($key) {\n            return isset($this->_data[$key]) ? $this->_data[$key] : null;\n        }\n\n        /**\n         * Return the name of the column in the database table which contains\n         * the primary key ID of the row.\n         */\n        protected function _get_id_column_name() {\n            if (!is_null($this->_instance_id_column)) {\n                return $this->_instance_id_column;\n            }\n            if (isset(self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name])) {\n                return self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name];\n            }\n            return self::$_config[$this->_connection_name]['id_column'];\n        }\n\n        /**\n         * Get the primary key ID of this object.\n         */\n        public function id() {\n            return $this->get($this->_get_id_column_name());\n        }\n\n        /**\n         * Set a property to a particular value on this object.\n         * To set multiple properties at once, pass an associative array\n         * as the first parameter and leave out the second parameter.\n         * Flags the properties as 'dirty' so they will be saved to the\n         * database when save() is called.\n         */\n        public function set($key, $value = null) {\n            return $this->_set_orm_property($key, $value);\n        }\n\n        /**\n         * Set a property to a particular value on this object.\n         * To set multiple properties at once, pass an associative array\n         * as the first parameter and leave out the second parameter.\n         * Flags the properties as 'dirty' so they will be saved to the\n         * database when save() is called. \n         * @param string|array $key\n         * @param string|null $value\n         */\n        public function set_expr($key, $value = null) {\n            return $this->_set_orm_property($key, $value, true);\n        }\n\n        /**\n         * Set a property on the ORM object.\n         * @param string|array $key\n         * @param string|null $value\n         * @param bool $raw Whether this value should be treated as raw or not\n         */\n        protected function _set_orm_property($key, $value = null, $expr = false) {\n            if (!is_array($key)) {\n                $key = array($key => $value);\n            }\n            foreach ($key as $field => $value) {\n                $this->_data[$field] = $value;\n                $this->_dirty_fields[$field] = $value;\n                if (false === $expr and isset($this->_expr_fields[$field])) {\n                    unset($this->_expr_fields[$field]);\n                } else if (true === $expr) {\n                    $this->_expr_fields[$field] = true;\n                }\n            }\n            return $this;\n        }\n\n        /**\n         * Check whether the given field has been changed since this\n         * object was saved.\n         */\n        public function is_dirty($key) {\n            return isset($this->_dirty_fields[$key]);\n        }\n\n        /**\n         * Check whether the model was the result of a call to create() or not\n         * @return bool\n         */\n        public function is_new() {\n            return $this->_is_new;\n        }\n\n        /**\n         * Save any fields which have been modified on this object\n         * to the database.\n         */\n        public function save() {\n            $query = array();\n\n            // remove any expression fields as they are already baked into the query\n            $values = array_values(array_diff_key($this->_dirty_fields, $this->_expr_fields));\n\n            if (!$this->_is_new) { // UPDATE\n                // If there are no dirty values, do nothing\n                if (empty($values) && empty($this->_expr_fields)) {\n                    return true;\n                }\n                $query = $this->_build_update();\n                $values[] = $this->id();\n            } else { // INSERT\n                $query = $this->_build_insert();\n            }\n\n            $success = self::_execute($query, $values, $this->_connection_name);\n\n            // If we've just inserted a new record, set the ID of this object\n            if ($this->_is_new) {\n                $this->_is_new = false;\n                if (is_null($this->id())) {\n                    if(self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') {\n                        $this->_data[$this->_get_id_column_name()] = self::get_last_statement()->fetchColumn();\n                    } else {\n                        $this->_data[$this->_get_id_column_name()] = self::$_db[$this->_connection_name]->lastInsertId();\n                    }\n                }\n            }\n\n            $this->_dirty_fields = $this->_expr_fields = array();\n            return $success;\n        }\n\n        /**\n         * Build an UPDATE query\n         */\n        protected function _build_update() {\n            $query = array();\n            $query[] = \"UPDATE {$this->_quote_identifier($this->_table_name)} SET\";\n\n            $field_list = array();\n            foreach ($this->_dirty_fields as $key => $value) {\n                if(!array_key_exists($key, $this->_expr_fields)) {\n                    $value = '?';\n                }\n                $field_list[] = \"{$this->_quote_identifier($key)} = $value\";\n            }\n            $query[] = join(\", \", $field_list);\n            $query[] = \"WHERE\";\n            $query[] = $this->_quote_identifier($this->_get_id_column_name());\n            $query[] = \"= ?\";\n            return join(\" \", $query);\n        }\n\n        /**\n         * Build an INSERT query\n         */\n        protected function _build_insert() {\n            $query[] = \"INSERT INTO\";\n            $query[] = $this->_quote_identifier($this->_table_name);\n            $field_list = array_map(array($this, '_quote_identifier'), array_keys($this->_dirty_fields));\n            $query[] = \"(\" . join(\", \", $field_list) . \")\";\n            $query[] = \"VALUES\";\n\n            $placeholders = $this->_create_placeholders($this->_dirty_fields);\n            $query[] = \"({$placeholders})\";\n\n            if (self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') {\n                $query[] = 'RETURNING ' . $this->_quote_identifier($this->_get_id_column_name());\n            }\n\n            return join(\" \", $query);\n        }\n\n        /**\n         * Delete this record from the database\n         */\n        public function delete() {\n            $query = join(\" \", array(\n                \"DELETE FROM\",\n                $this->_quote_identifier($this->_table_name),\n                \"WHERE\",\n                $this->_quote_identifier($this->_get_id_column_name()),\n                \"= ?\",\n            ));\n\n            return self::_execute($query, array($this->id()), $this->_connection_name);\n        }\n\n        /**\n         * Delete many records from the database\n         */\n        public function delete_many() {\n            // Build and return the full DELETE statement by concatenating\n            // the results of calling each separate builder method.\n            $query = $this->_join_if_not_empty(\" \", array(\n                \"DELETE FROM\",\n                $this->_quote_identifier($this->_table_name),\n                $this->_build_where(),\n            ));\n\n            return self::_execute($query, $this->_values, $this->_connection_name);\n        }\n\n        // --------------------- //\n        // ---  ArrayAccess  --- //\n        // --------------------- //\n\n        public function offsetExists($key) {\n            return isset($this->_data[$key]);\n        }\n\n        public function offsetGet($key) {\n            return $this->get($key);\n        }\n\n        public function offsetSet($key, $value) {\n            if(is_null($key)) {\n                throw new InvalidArgumentException('You must specify a key/array index.');\n            }\n            $this->set($key, $value);\n        }\n\n        public function offsetUnset($key) {\n            unset($this->_data[$key]);\n            unset($this->_dirty_fields[$key]);\n        }\n\n        // --------------------- //\n        // --- MAGIC METHODS --- //\n        // --------------------- //\n        public function __get($key) {\n            return $this->offsetGet($key);\n        }\n\n        public function __set($key, $value) {\n            $this->offsetSet($key, $value);\n        }\n\n        public function __unset($key) {\n            $this->offsetUnset($key);\n        }\n\n\n        public function __isset($key) {\n            return $this->offsetExists($key);\n        }\n\n        /**\n         * Magic method to capture calls to undefined class methods.\n         * In this case we are attempting to convert camel case formatted \n         * methods into underscore formatted methods.\n         *\n         * This allows us to call ORM methods using camel case and remain \n         * backwards compatible.\n         * \n         * @param  string   $name\n         * @param  array    $arguments\n         * @return ORM\n         */\n        public function __call($name, $arguments)\n        {\n            $method = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));\n\n            return call_user_func_array(array($this, $method), $arguments);\n        }\n\n        /**\n         * Magic method to capture calls to undefined static class methods. \n         * In this case we are attempting to convert camel case formatted \n         * methods into underscore formatted methods.\n         *\n         * This allows us to call ORM methods using camel case and remain \n         * backwards compatible.\n         * \n         * @param  string   $name\n         * @param  array    $arguments\n         * @return ORM\n         */\n        public static function __callStatic($name, $arguments)\n        {\n            $method = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));\n\n            return call_user_func_array(array('ORM', $method), $arguments);\n        }\n    }\n\n    /**\n     * A class to handle str_replace operations that involve quoted strings\n     * @example IdiormString::str_replace_outside_quotes('?', '%s', 'columnA = \"Hello?\" AND columnB = ?');\n     * @example IdiormString::value('columnA = \"Hello?\" AND columnB = ?')->replace_outside_quotes('?', '%s');\n     * @author Jeff Roberson <ridgerunner@fluxbb.org>\n     * @author Simon Holywell <treffynnon@php.net>\n     * @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer\n     */\n    class IdiormString {\n        protected $subject;\n        protected $search;\n        protected $replace;\n\n        /**\n         * Get an easy to use instance of the class\n         * @param string $subject\n         * @return \\self\n         */\n        public static function value($subject) {\n            return new self($subject);\n        }\n\n        /**\n         * Shortcut method: Replace all occurrences of the search string with the replacement\n         * string where they appear outside quotes.\n         * @param string $search\n         * @param string $replace\n         * @param string $subject\n         * @return string\n         */\n        public static function str_replace_outside_quotes($search, $replace, $subject) {\n            return self::value($subject)->replace_outside_quotes($search, $replace);\n        }\n\n        /**\n         * Set the base string object\n         * @param string $subject\n         */\n        public function __construct($subject) {\n            $this->subject = (string) $subject;\n        }\n\n        /**\n         * Replace all occurrences of the search string with the replacement\n         * string where they appear outside quotes\n         * @param string $search\n         * @param string $replace\n         * @return string\n         */\n        public function replace_outside_quotes($search, $replace) {\n            $this->search = $search;\n            $this->replace = $replace;\n            return $this->_str_replace_outside_quotes();\n        }\n\n        /**\n         * Validate an input string and perform a replace on all ocurrences\n         * of $this->search with $this->replace\n         * @author Jeff Roberson <ridgerunner@fluxbb.org>\n         * @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer\n         * @return string\n         */\n        protected function _str_replace_outside_quotes(){\n            $re_valid = '/\n                # Validate string having embedded quoted substrings.\n                ^                           # Anchor to start of string.\n                (?:                         # Zero or more string chunks.\n                  \"[^\"\\\\\\\\]*(?:\\\\\\\\.[^\"\\\\\\\\]*)*\"  # Either a double quoted chunk,\n                | \\'[^\\'\\\\\\\\]*(?:\\\\\\\\.[^\\'\\\\\\\\]*)*\\'  # or a single quoted chunk,\n                | [^\\'\"\\\\\\\\]+               # or an unquoted chunk (no escapes).\n                )*                          # Zero or more string chunks.\n                \\z                          # Anchor to end of string.\n                /sx';\n            if (!preg_match($re_valid, $this->subject)) {\n                throw new IdiormStringException(\"Subject string is not valid in the replace_outside_quotes context.\");\n            }\n            $re_parse = '/\n                # Match one chunk of a valid string having embedded quoted substrings.\n                  (                         # Either $1: Quoted chunk.\n                    \"[^\"\\\\\\\\]*(?:\\\\\\\\.[^\"\\\\\\\\]*)*\"  # Either a double quoted chunk,\n                  | \\'[^\\'\\\\\\\\]*(?:\\\\\\\\.[^\\'\\\\\\\\]*)*\\'  # or a single quoted chunk.\n                  )                         # End $1: Quoted chunk.\n                | ([^\\'\"\\\\\\\\]+)             # or $2: an unquoted chunk (no escapes).\n                /sx';\n            return preg_replace_callback($re_parse, array($this, '_str_replace_outside_quotes_cb'), $this->subject);\n        }\n\n        /**\n         * Process each matching chunk from preg_replace_callback replacing\n         * each occurrence of $this->search with $this->replace\n         * @author Jeff Roberson <ridgerunner@fluxbb.org>\n         * @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer\n         * @param array $matches\n         * @return string\n         */\n        protected function _str_replace_outside_quotes_cb($matches) {\n            // Return quoted string chunks (in group $1) unaltered.\n            if ($matches[1]) return $matches[1];\n            // Process only unquoted chunks (in group $2).\n            return preg_replace('/'. preg_quote($this->search, '/') .'/',\n                $this->replace, $matches[2]);\n        }\n    }\n\n    /**\n     * A result set class for working with collections of model instances\n     * @author Simon Holywell <treffynnon@php.net>\n     */\n    class IdiormResultSet implements Countable, IteratorAggregate, ArrayAccess, Serializable {\n        /**\n         * The current result set as an array\n         * @var array\n         */\n        protected $_results = array();\n\n        /**\n         * Optionally set the contents of the result set by passing in array\n         * @param array $results\n         */\n        public function __construct(array $results = array()) {\n            $this->set_results($results);\n        }\n\n        /**\n         * Set the contents of the result set by passing in array\n         * @param array $results\n         */\n        public function set_results(array $results) {\n            $this->_results = $results;\n        }\n\n        /**\n         * Get the current result set as an array\n         * @return array\n         */\n        public function get_results() {\n            return $this->_results;\n        }\n\n        /**\n         * Get the current result set as an array\n         * @return array\n         */\n        public function as_array() {\n            return $this->get_results();\n        }\n        \n        /**\n         * Get the number of records in the result set\n         * @return int\n         */\n        public function count() {\n            return count($this->_results);\n        }\n\n        /**\n         * Get an iterator for this object. In this case it supports foreaching\n         * over the result set.\n         * @return \\ArrayIterator\n         */\n        public function getIterator() {\n            return new ArrayIterator($this->_results);\n        }\n\n        /**\n         * ArrayAccess\n         * @param int|string $offset\n         * @return bool\n         */\n        public function offsetExists($offset) {\n            return isset($this->_results[$offset]);\n        }\n\n        /**\n         * ArrayAccess\n         * @param int|string $offset\n         * @return mixed\n         */\n        public function offsetGet($offset) {\n            return $this->_results[$offset];\n        }\n        \n        /**\n         * ArrayAccess\n         * @param int|string $offset\n         * @param mixed $value\n         */\n        public function offsetSet($offset, $value) {\n            $this->_results[$offset] = $value;\n        }\n\n        /**\n         * ArrayAccess\n         * @param int|string $offset\n         */\n        public function offsetUnset($offset) {\n            unset($this->_results[$offset]);\n        }\n\n        /**\n         * Serializable\n         * @return string\n         */\n        public function serialize() {\n            return serialize($this->_results);\n        }\n\n        /**\n         * Serializable\n         * @param string $serialized\n         * @return array\n         */\n        public function unserialize($serialized) {\n            return unserialize($serialized);\n        }\n\n        /**\n         * Call a method on all models in a result set. This allows for method\n         * chaining such as setting a property on all models in a result set or\n         * any other batch operation across models.\n         * @example ORM::for_table('Widget')->find_many()->set('field', 'value')->save();\n         * @param string $method\n         * @param array $params\n         * @return \\IdiormResultSet\n         */\n        public function __call($method, $params = array()) {\n            foreach($this->_results as $model) {\n                call_user_func_array(array($model, $method), $params);\n            }\n            return $this;\n        }\n    }\n\n    /**\n     * A placeholder for exceptions eminating from the IdiormString class\n     */\n    class IdiormStringException extends Exception {}"
  },
  {
    "path": "libraries/PHPMailer/PHPMailer.php",
    "content": "<?php\n/*~ class.phpmailer.php\n.---------------------------------------------------------------------------.\n|  Software: PHPMailer - PHP email class                                    |\n|   Version: 5.2.4                                                          |\n|      Site: https://code.google.com/a/apache-extras.org/p/phpmailer/       |\n| ------------------------------------------------------------------------- |\n|     Admin: Jim Jagielski (project admininistrator)                        |\n|   Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |\n|          : Marcus Bointon (coolbru) coolbru@users.sourceforge.net         |\n|          : Jim Jagielski (jimjag) jimjag@gmail.com                        |\n|   Founder: Brent R. Matzelle (original founder)                           |\n| Copyright (c) 2010-2012, Jim Jagielski. All Rights Reserved.              |\n| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved.               |\n| Copyright (c) 2001-2003, Brent R. Matzelle                                |\n| ------------------------------------------------------------------------- |\n|   License: Distributed under the Lesser General Public License (LGPL)     |\n|            http://www.gnu.org/copyleft/lesser.html                        |\n| 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/**\n * PHPMailer - PHP email creation and transport class\n * NOTE: Requires PHP version 5 or later\n * @package PHPMailer\n * @author Andy Prevost\n * @author Marcus Bointon\n * @author Jim Jagielski\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 */\n\nif (version_compare(PHP_VERSION, '5.0.0', '<') ) exit(\"Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\\n\");\n\n/**\n * PHP email creation and transport class\n * @package PHPMailer\n */\nclass PHPMailer\n{\n  /////////////////////////////////////////////////\n  // PROPERTIES, PUBLIC\n  /////////////////////////////////////////////////\n\n  /**\n   * Email priority (1 = High, 3 = Normal, 5 = low).\n   * @var int\n   */\n  public $Priority          = 3;\n\n  /**\n   * Sets the CharSet of the message.\n   * @var string\n   */\n  public $CharSet           = 'iso-8859-1';\n\n  /**\n   * Sets the Content-type of the message.\n   * @var string\n   */\n  public $ContentType       = 'text/plain';\n\n  /**\n   * Sets the Encoding of the message. Options for this are\n   *  \"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   * Sets the From email address for the message.\n   * @var string\n   */\n  public $From              = 'root@localhost';\n\n  /**\n   * Sets the From name of the message.\n   * @var string\n   */\n  public $FromName          = 'Root User';\n\n  /**\n   * Sets the Sender email (Return-Path) of the message.  If not empty,\n   * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.\n   * @var string\n   */\n  public $Sender            = '';\n\n  /**\n   * Sets the Return-Path of the message.  If empty, it will\n   * be set to either From or Sender.\n   * @var string\n   */\n  public $ReturnPath        = '';\n\n  /**\n   * Sets the Subject of the message.\n   * @var string\n   */\n  public $Subject           = '';\n\n  /**\n   * Sets the Body of the message.  This can be either an HTML or text body.\n   * If HTML then run IsHTML(true).\n   * @var string\n   */\n  public $Body              = '';\n\n  /**\n   * Sets the text-only body of the message.  This automatically sets the\n   * email to multipart/alternative.  This body can be read by mail\n   * clients that do not have HTML email capability such as mutt. Clients\n   * that can read HTML will view the normal Body.\n   * @var string\n   */\n  public $AltBody           = '';\n\n  /**\n   * Stores the complete compiled MIME message body.\n   * @var string\n   * @access protected\n   */\n  protected $MIMEBody       = '';\n\n  /**\n   * Stores the complete compiled MIME message headers.\n   * @var string\n   * @access protected\n   */\n  protected $MIMEHeader     = '';\n\n  /**\n   * Stores the extra header list which CreateHeader() doesn't fold in\n   * @var string\n   * @access protected\n  */\n  protected $mailHeader     = '';\n\n  /**\n   * Sets word wrapping on the body of the message to a given number of\n   * characters.\n   * @var int\n   */\n  public $WordWrap          = 0;\n\n  /**\n   * Method to send mail: (\"mail\", \"sendmail\", or \"smtp\").\n   * @var string\n   */\n  public $Mailer            = 'mail';\n\n  /**\n   * Sets the path of the sendmail program.\n   * @var string\n   */\n  public $Sendmail          = '/usr/sbin/sendmail';\n\n  /**\n   * Determine if mail() uses a fully sendmail compatible MTA that\n   * supports sendmail's \"-oi -f\" options\n   * @var boolean\n   */\n  public $UseSendmailOptions  = true;\n\n  /**\n   * Path to PHPMailer plugins.  Useful if the SMTP class\n   * is in a different directory than the PHP include path.\n   * @var string\n   */\n  public $PluginDir         = '';\n\n  /**\n   * Sets the email address that a reading confirmation will be sent.\n   * @var string\n   */\n  public $ConfirmReadingTo  = '';\n\n  /**\n   * Sets the hostname to use in Message-Id and Received headers\n   * and as default HELO string. If empty, the value returned\n   * by SERVER_NAME is used or 'localhost.localdomain'.\n   * @var string\n   */\n  public $Hostname          = '';\n\n  /**\n   * Sets the message ID to be used in the Message-Id header.\n   * If empty, a unique id will be generated.\n   * @var string\n   */\n  public $MessageID         = '';\n\n  /**\n   * Sets 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  // PROPERTIES FOR SMTP\n  /////////////////////////////////////////////////\n\n  /**\n   * Sets the SMTP hosts.\n   *\n   * All hosts must be separated by a\n   * semicolon.  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   * Hosts will be tried in order.\n   * @var string\n   */\n  public $Host          = 'localhost';\n\n  /**\n   * Sets the default SMTP server port.\n   * @var int\n   */\n  public $Port          = 25;\n\n  /**\n   * Sets the SMTP HELO of the message (Default is $Hostname).\n   * @var string\n   */\n  public $Helo          = '';\n\n  /**\n   * Sets connection prefix. Options are \"\", \"ssl\" or \"tls\"\n   * @var string\n   */\n  public $SMTPSecure    = '';\n\n  /**\n   * Sets SMTP authentication. Utilizes the Username and Password variables.\n   * @var bool\n   */\n  public $SMTPAuth      = false;\n\n  /**\n   * Sets SMTP username.\n   * @var string\n   */\n  public $Username      = '';\n\n  /**\n   * Sets SMTP password.\n   * @var string\n   */\n  public $Password      = '';\n\n  /**\n   *  Sets SMTP auth type. Options are LOGIN | PLAIN | NTLM  (default LOGIN)\n   *  @var string\n   */\n  public $AuthType      = '';\n\n  /**\n   *  Sets SMTP realm.\n   *  @var string\n   */\n  public $Realm         = '';\n\n  /**\n   *  Sets SMTP workstation.\n   *  @var string\n   */\n  public $Workstation   = '';\n\n  /**\n   * Sets the SMTP server timeout in seconds.\n   * This function will not work with the win32 version.\n   * @var int\n   */\n  public $Timeout       = 10;\n\n  /**\n   * Sets SMTP class debugging on or off.\n   * @var bool\n   */\n  public $SMTPDebug     = false;\n\n  /**\n   * Sets the function/method to use for debugging output.\n   * Right now we only honor \"echo\" or \"error_log\"\n   * @var string\n   */\n  public $Debugoutput     = \"echo\";\n\n  /**\n   * Prevents the SMTP connection from being closed after each mail\n   * sending.  If this is set to true then to close the connection\n   * requires an explicit call to SmtpClose().\n   * @var bool\n   */\n  public $SMTPKeepAlive = false;\n\n  /**\n   * Provides the ability to have the TO field process individual\n   * emails, instead of sending to entire TO addresses\n   * @var bool\n   */\n  public $SingleTo      = false;\n\n   /**\n   * If SingleTo is true, this provides the array to hold the email addresses\n   * @var bool\n   */\n  public $SingleToArray = array();\n\n /**\n   * Provides the ability to change the generic 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   * Used with DKIM Signing\n   * required parameter if DKIM is enabled\n   *\n   * domain selector example domainkey\n   * @var string\n   */\n  public $DKIM_selector   = '';\n\n  /**\n   * Used with DKIM Signing\n   * required if DKIM is enabled, in format of email address 'you@yourdomain.com' typically used as the source of the email\n   * @var string\n   */\n  public $DKIM_identity   = '';\n\n  /**\n   * Used with DKIM Signing\n   * optional parameter if your private key requires a passphras\n   * @var string\n   */\n  public $DKIM_passphrase   = '';\n\n  /**\n   * Used with DKIM Singing\n   * required if DKIM is enabled, in format of email address 'domain.com'\n   * @var string\n   */\n  public $DKIM_domain     = '';\n\n  /**\n   * Used with DKIM Signing\n   * required if DKIM is enabled, path to private key file\n   * @var string\n   */\n  public $DKIM_private    = '';\n\n  /**\n   * Callback Action function name.\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:\n   * - 'function_name' for function names\n   * - 'Class::Method' for static method calls\n   * - array($object, 'Method') for calling methods on $object\n   * See http://php.net/is_callable manual page for more details.\n   *\n   * Parameters:\n   *   bool    $result        result of the send action\n   *   string  $to            email address of the recipient\n   *   string  $cc            cc email addresses\n   *   string  $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 = ''; //'callbackAction';\n\n  /**\n   * Sets the PHPMailer Version number\n   * @var string\n   */\n  public $Version         = '5.2.4';\n\n  /**\n   * What to use in the X-Mailer header\n   * @var string NULL for default, whitespace for None, or actual string to use\n   */\n  public $XMailer         = '';\n\n  /////////////////////////////////////////////////\n  // PROPERTIES, PRIVATE AND PROTECTED\n  /////////////////////////////////////////////////\n\n  /**\n   * @var SMTP An instance of the SMTP sender class\n   * @access protected\n   */\n  protected $smtp           = null;\n  /**\n   * @var array An array of 'to' addresses\n   * @access protected\n   */\n  protected $to             = array();\n  /**\n   * @var array An array of 'cc' addresses\n   * @access protected\n   */\n  protected $cc             = array();\n  /**\n   * @var array An array of 'bcc' addresses\n   * @access protected\n   */\n  protected $bcc            = array();\n  /**\n   * @var array An array of reply-to name and address\n   * @access protected\n   */\n  protected $ReplyTo        = array();\n  /**\n   * @var array An array of all kinds of addresses: to, cc, bcc, replyto\n   * @access protected\n   */\n  protected $all_recipients = array();\n  /**\n   * @var array An array of attachments\n   * @access protected\n   */\n  protected $attachment     = array();\n  /**\n   * @var array An array of custom headers\n   * @access protected\n   */\n  protected $CustomHeader   = array();\n  /**\n   * @var string The message's MIME type\n   * @access protected\n   */\n  protected $message_type   = '';\n  /**\n   * @var array An array of MIME boundary strings\n   * @access protected\n   */\n  protected $boundary       = array();\n  /**\n   * @var array An array of available languages\n   * @access protected\n   */\n  protected $language       = array();\n  /**\n   * @var integer The number of errors encountered\n   * @access protected\n   */\n  protected $error_count    = 0;\n  /**\n   * @var string The filename of a DKIM certificate file\n   * @access protected\n   */\n  protected $sign_cert_file = '';\n  /**\n   * @var string The filename of a DKIM key file\n   * @access protected\n   */\n  protected $sign_key_file  = '';\n  /**\n   * @var string The password of a DKIM key\n   * @access protected\n   */\n  protected $sign_key_pass  = '';\n  /**\n   * @var boolean Whether to throw exceptions for errors\n   * @access protected\n   */\n  protected $exceptions     = false;\n\n  /////////////////////////////////////////////////\n  // CONSTANTS\n  /////////////////////////////////////////////////\n\n  const STOP_MESSAGE  = 0; // message only, continue processing\n  const STOP_CONTINUE = 1; // message?, likely ok to continue processing\n  const STOP_CRITICAL = 2; // message, plus full stop, critical error reached\n  const CRLF = \"\\r\\n\";     // SMTP RFC specified EOL\n\n  /////////////////////////////////////////////////\n  // METHODS, VARIABLES\n  /////////////////////////////////////////////////\n\n  /**\n   * Calls actual mail() function, but 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 bool\n   */\n  private function mail_passthru($to, $subject, $body, $header, $params)\n  {\n    if ( ini_get('safe_mode') || !($this->UseSendmailOptions) ) {\n        $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($subject)), $body, $header);\n    } else {\n        $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($subject)), $body, $header, $params);\n    }\n\n    return $rt;\n  }\n\n  /**\n   * Outputs debugging info via user-defined method\n   * @param string $str\n   */\n  private function edebug($str)\n  {\n    if ($this->Debugoutput == \"error_log\") {\n        error_log($str);\n    } else {\n        echo $str;\n    }\n  }\n\n  /**\n   * Constructor\n   * @param boolean $exceptions Should we throw external exceptions?\n   */\n  public function __construct($exceptions = false)\n  {\n    $this->exceptions = ($exceptions == true);\n  }\n\n  /**\n   * Sets message type to HTML.\n   * @param bool $ishtml\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   * Sets Mailer to send message using SMTP.\n   * @return void\n   */\n  public function IsSMTP()\n  {\n    $this->Mailer = 'smtp';\n  }\n\n  /**\n   * Sets Mailer to send message using PHP mail() function.\n   * @return void\n   */\n  public function IsMail()\n  {\n    $this->Mailer = 'mail';\n  }\n\n  /**\n   * Sets Mailer to send message using the $Sendmail program.\n   * @return void\n   */\n  public function IsSendmail()\n  {\n    if (!stristr(ini_get('sendmail_path'), 'sendmail')) {\n      $this->Sendmail = '/var/qmail/bin/sendmail';\n    }\n    $this->Mailer = 'sendmail';\n  }\n\n  /**\n   * Sets Mailer to send message using the qmail MTA.\n   * @return void\n   */\n  public function IsQmail()\n  {\n    if (stristr(ini_get('sendmail_path'), 'qmail')) {\n      $this->Sendmail = '/var/qmail/bin/sendmail';\n    }\n    $this->Mailer = 'sendmail';\n  }\n\n  /////////////////////////////////////////////////\n  // METHODS, RECIPIENTS\n  /////////////////////////////////////////////////\n\n  /**\n   * Adds a \"To\" address.\n   * @param string $address\n   * @param string $name\n   * @return boolean true on success, false if address already used\n   */\n  public function AddAddress($address, $name = '')\n  {\n    return $this->AddAnAddress('to', $address, $name);\n  }\n\n  /**\n   * Adds a \"Cc\" address.\n   * Note: this function works with the SMTP mailer on win32, not with the \"mail\" mailer.\n   * @param string $address\n   * @param string $name\n   * @return boolean true on success, false if address already used\n   */\n  public function AddCC($address, $name = '')\n  {\n    return $this->AddAnAddress('cc', $address, $name);\n  }\n\n  /**\n   * Adds a \"Bcc\" address.\n   * Note: this function works with the SMTP mailer on win32, not with the \"mail\" mailer.\n   * @param string $address\n   * @param string $name\n   * @return boolean true on success, false if address already used\n   */\n  public function AddBCC($address, $name = '')\n  {\n    return $this->AddAnAddress('bcc', $address, $name);\n  }\n\n  /**\n   * Adds a \"Reply-to\" address.\n   * @param string $address\n   * @param string $name\n   * @return boolean\n   */\n  public function AddReplyTo($address, $name = '')\n  {\n    return $this->AddAnAddress('Reply-To', $address, $name);\n  }\n\n  /**\n   * Adds an address to one of the recipient arrays\n   * Addresses that have been added already return false, but do not throw exceptions\n   * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo'\n   * @param string $address The email address to send 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 (!preg_match('/^(to|cc|bcc|Reply-To)$/', $kind)) {\n      $this->SetError($this->Lang('Invalid recipient array').': '.$kind);\n      if ($this->exceptions) {\n        throw new phpmailerException('Invalid recipient array: ' . $kind);\n      }\n      if ($this->SMTPDebug) {\n        $this->edebug($this->Lang('Invalid recipient array').': '.$kind);\n      }\n\n      return false;\n    }\n    $address = trim($address);\n    $name = trim(preg_replace('/[\\r\\n]+/', '', $name)); //Strip breaks and trim\n    if (!$this->ValidateAddress($address)) {\n      $this->SetError($this->Lang('invalid_address').': '. $address);\n      if ($this->exceptions) {\n        throw new phpmailerException($this->Lang('invalid_address').': '.$address);\n      }\n      if ($this->SMTPDebug) {\n        $this->edebug($this->Lang('invalid_address').': '.$address);\n      }\n\n      return false;\n    }\n    if ($kind != 'Reply-To') {\n      if (!isset($this->all_recipients[strtolower($address)])) {\n        array_push($this->$kind, array($address, $name));\n        $this->all_recipients[strtolower($address)] = true;\n\n        return true;\n      }\n    } else {\n      if (!array_key_exists(strtolower($address), $this->ReplyTo)) {\n        $this->ReplyTo[strtolower($address)] = array($address, $name);\n\n      return true;\n    }\n  }\n\n  return false;\n}\n\n/**\n * Set the From and FromName properties\n * @param string $address\n * @param string $name\n * @param int $auto Also set Reply-To and Sender\n   * @throws phpmailerException\n * @return boolean\n */\n  public function SetFrom($address, $name = '', $auto = 1)\n  {\n    $address = trim($address);\n    $name = trim(preg_replace('/[\\r\\n]+/', '', $name)); //Strip breaks and trim\n    if (!$this->ValidateAddress($address)) {\n      $this->SetError($this->Lang('invalid_address').': '. $address);\n      if ($this->exceptions) {\n        throw new phpmailerException($this->Lang('invalid_address').': '.$address);\n      }\n      if ($this->SMTPDebug) {\n        $this->edebug($this->Lang('invalid_address').': '.$address);\n      }\n\n      return false;\n    }\n    $this->From = $address;\n    $this->FromName = $name;\n    if ($auto) {\n      if (empty($this->ReplyTo)) {\n        $this->AddAnAddress('Reply-To', $address, $name);\n      }\n      if (empty($this->Sender)) {\n        $this->Sender = $address;\n      }\n    }\n\n    return true;\n  }\n\n  /**\n   * Check that a string looks roughly like an email address should\n   * Static so it can be used without instantiation, public so people can overload\n   * Conforms to RFC5322: Uses *correct* regex on which FILTER_VALIDATE_EMAIL is\n   * based; So why not use FILTER_VALIDATE_EMAIL? Because it was broken to\n   * not allow a@b type valid addresses :(\n   * Some Versions of PHP break on the regex though, likely due to PCRE, so use\n   * the older validation method for those users. (http://php.net/manual/en/pcre.installation.php)\n   * @link http://squiloople.com/2009/12/20/email-address-validation/\n   * @copyright regex Copyright Michael Rushton 2009-10 | http://squiloople.com/ | Feel free to use and redistribute this code. But please keep this copyright notice.\n   * @param string $address The email address to check\n   * @return boolean\n   * @static\n   * @access public\n   */\n  public static function ValidateAddress($address)\n  {\n  if ((defined('PCRE_VERSION')) && (version_compare(PCRE_VERSION, '8.0') >= 0)) {\n    return preg_match('/^(?!(?>(?1)\"?(?>\\\\\\[ -~]|[^\"])\"?(?1)){255,})(?!(?>(?1)\"?(?>\\\\\\[ -~]|[^\"])\"?(?1)){65,}@)((?>(?>(?>((?>(?>(?>\\x0D\\x0A)?[   ])+|(?>[  ]*\\x0D\\x0A)?[   ]+)?)(\\((?>(?2)(?>[\\x01-\\x08\\x0B\\x0C\\x0E-\\'*-\\[\\]-\\x7F]|\\\\\\[\\x00-\\x7F]|(?3)))*(?2)\\)))+(?2))|(?2))?)([!#-\\'*+\\/-9=?^-~-]+|\"(?>(?2)(?>[\\x01-\\x08\\x0B\\x0C\\x0E-!#-\\[\\]-\\x7F]|\\\\\\[\\x00-\\x7F]))*(?2)\")(?>(?1)\\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>(?1)\\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}|(?!(?:.*[a-f0-9][:\\]]){7,})((?6)(?>:(?6)){0,5})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:|(?!(?:.*[a-f0-9]:){5,})(?8)?::(?>((?6)(?>:(?6)){0,3}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?>\\.(?9)){3}))\\])(?1)$/isD', $address);\n  } elseif (function_exists('filter_var')) { //Introduced in PHP 5.2\n        if (filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) {\n          return false;\n        } else {\n          return true;\n        }\n    } else {\n        return preg_match('/^(?:[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+\\.)*[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!\\.)){0,61}[a-zA-Z0-9_-]?\\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\\[(?:(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.){3}(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\]))$/', $address);\n  }\n  }\n\n  /////////////////////////////////////////////////\n  // METHODS, MAIL SENDING\n  /////////////////////////////////////////////////\n\n  /**\n   * Creates message and assigns Mailer. If the message is\n   * not sent successfully then it returns false.  Use the ErrorInfo\n   * variable to view description of the error.\n   * @throws phpmailerException\n   * @return bool\n   */\n  public function Send()\n  {\n    try {\n      if(!$this->PreSend()) return false;\n\n      return $this->PostSend();\n    } catch (phpmailerException $e) {\n      $this->mailHeader = '';\n      $this->SetError($e->getMessage());\n      if ($this->exceptions) {\n        throw $e;\n      }\n\n      return false;\n    }\n  }\n\n  /**\n   * Prep mail by constructing all message entities\n   * @throws phpmailerException\n   * @return bool\n   */\n  public function PreSend()\n  {\n    try {\n      $this->mailHeader = \"\";\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      // Set whether the message is multipart/alternative\n      if (!empty($this->AltBody)) {\n        $this->ContentType = 'multipart/alternative';\n      }\n\n      $this->error_count = 0; // reset errors\n      $this->SetMessageType();\n      //Refuse to send an empty message\n      if (empty($this->Body)) {\n        throw new phpmailerException($this->Lang('empty_message'), self::STOP_CRITICAL);\n      }\n\n      $this->MIMEHeader = $this->CreateHeader();\n      $this->MIMEBody = $this->CreateBody();\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('Subject', $this->EncodeHeader($this->SecureHeader(trim($this->Subject))));\n        // if (count($this->cc) > 0) {\n            // $this->mailHeader .= $this->AddrAppend(\"Cc\", $this->cc);\n        // }\n      }\n\n      // digitally sign with DKIM if enabled\n      if (!empty($this->DKIM_domain) && !empty($this->DKIM_private) && !empty($this->DKIM_selector) && !empty($this->DKIM_domain) && file_exists($this->DKIM_private)) {\n        $header_dkim = $this->DKIM_Add($this->MIMEHeader, $this->EncodeHeader($this->SecureHeader($this->Subject)), $this->MIMEBody);\n        $this->MIMEHeader = str_replace(\"\\r\\n\", \"\\n\", $header_dkim) . $this->MIMEHeader;\n      }\n\n      return true;\n\n    } catch (phpmailerException $e) {\n      $this->SetError($e->getMessage());\n      if ($this->exceptions) {\n        throw $e;\n      }\n\n      return false;\n    }\n  }\n\n  /**\n   * Actual Email transport function\n   * Send the email via the selected mechanism\n   * @throws phpmailerException\n   * @return bool\n   */\n  public function PostSend()\n  {\n    try {\n      // Choose the mailer and send through it\n      switch ($this->Mailer) {\n        case 'sendmail':\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          return $this->MailSend($this->MIMEHeader, $this->MIMEBody);\n      }\n    } catch (phpmailerException $e) {\n      $this->SetError($e->getMessage());\n      if ($this->exceptions) {\n        throw $e;\n      }\n      if ($this->SMTPDebug) {\n        $this->edebug($e->getMessage().\"\\n\");\n      }\n    }\n\n    return false;\n  }\n\n  /**\n   * Sends mail using the $Sendmail program.\n   * @param string $header The message headers\n   * @param string $body The message body\n   * @throws phpmailerException\n   * @access protected\n   * @return bool\n   */\n  protected function SendmailSend($header, $body)\n  {\n    if ($this->Sender != '') {\n      $sendmail = sprintf(\"%s -oi -f%s -t\", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));\n    } else {\n      $sendmail = sprintf(\"%s -oi -t\", escapeshellcmd($this->Sendmail));\n    }\n    if ($this->SingleTo === true) {\n      foreach ($this->SingleToArray as $val) {\n        if (!@$mail = popen($sendmail, 'w')) {\n          throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);\n        }\n        fputs($mail, \"To: \" . $val . \"\\n\");\n        fputs($mail, $header);\n        fputs($mail, $body);\n        $result = pclose($mail);\n        // implement call back function if it exists\n        $isSent = ($result == 0) ? 1 : 0;\n        $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body);\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      // implement call back function if it exists\n      $isSent = ($result == 0) ? 1 : 0;\n      $this->doCallback($isSent, $this->to, $this->cc, $this->bcc, $this->Subject, $body);\n      if ($result != 0) {\n        throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);\n      }\n    }\n\n    return true;\n  }\n\n  /**\n   * Sends mail using the PHP mail() function.\n   * @param string $header The message headers\n   * @param string $body The message body\n     * @throws phpmailerException\n   * @access protected\n   * @return bool\n   */\n  protected function MailSend($header, $body)\n  {\n    $toArr = array();\n    foreach ($this->to as $t) {\n      $toArr[] = $this->AddrFormat($t);\n    }\n    $to = implode(', ', $toArr);\n\n    if (empty($this->Sender)) {\n      $params = \"-oi \";\n    } else {\n      $params = sprintf(\"-oi -f%s\", $this->Sender);\n    }\n    if ($this->Sender != '' and !ini_get('safe_mode')) {\n      $old_from = ini_get('sendmail_from');\n      ini_set('sendmail_from', $this->Sender);\n    }\n      $rt = false;\n    if ($this->SingleTo === true && count($toArr) > 1) {\n      foreach ($toArr as $val) {\n        $rt = $this->mail_passthru($val, $this->Subject, $body, $header, $params);\n        // implement call back function if it exists\n        $isSent = ($rt == 1) ? 1 : 0;\n        $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body);\n      }\n    } else {\n      $rt = $this->mail_passthru($to, $this->Subject, $body, $header, $params);\n      // implement call back function if it exists\n      $isSent = ($rt == 1) ? 1 : 0;\n      $this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body);\n    }\n    if (isset($old_from)) {\n      ini_set('sendmail_from', $old_from);\n    }\n    if (!$rt) {\n      throw new phpmailerException($this->Lang('instantiate'), self::STOP_CRITICAL);\n    }\n\n    return true;\n  }\n\n  /**\n   * Sends mail via SMTP using PhpSMTP\n   * Returns false if there is a bad MAIL FROM, RCPT, or DATA input.\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 bool\n   */\n  protected function SmtpSend($header, $body)\n  {\n    require_once $this->PluginDir . 'class.smtp.php';\n    $bad_rcpt = array();\n\n    if (!$this->SmtpConnect()) {\n      throw new phpmailerException($this->Lang('smtp_connect_failed'), self::STOP_CRITICAL);\n    }\n    $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;\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 attach all recipients\n    foreach ($this->to as $to) {\n      if (!$this->smtp->Recipient($to[0])) {\n        $bad_rcpt[] = $to[0];\n        // implement call back function if it exists\n        $isSent = 0;\n        $this->doCallback($isSent, $to[0], '', '', $this->Subject, $body);\n      } else {\n        // implement call back function if it exists\n        $isSent = 1;\n        $this->doCallback($isSent, $to[0], '', '', $this->Subject, $body);\n      }\n    }\n    foreach ($this->cc as $cc) {\n      if (!$this->smtp->Recipient($cc[0])) {\n        $bad_rcpt[] = $cc[0];\n        // implement call back function if it exists\n        $isSent = 0;\n        $this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body);\n      } else {\n        // implement call back function if it exists\n        $isSent = 1;\n        $this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body);\n      }\n    }\n    foreach ($this->bcc as $bcc) {\n      if (!$this->smtp->Recipient($bcc[0])) {\n        $bad_rcpt[] = $bcc[0];\n        // implement call back function if it exists\n        $isSent = 0;\n        $this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body);\n      } else {\n        // implement call back function if it exists\n        $isSent = 1;\n        $this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body);\n      }\n    }\n\n\n    if (count($bad_rcpt) > 0 ) { //Create error message for any bad addresses\n      $badaddresses = implode(', ', $bad_rcpt);\n      throw new phpmailerException($this->Lang('recipients_failed') . $badaddresses);\n    }\n    if (!$this->smtp->Data($header . $body)) {\n      throw new phpmailerException($this->Lang('data_not_accepted'), self::STOP_CRITICAL);\n    }\n    if ($this->SMTPKeepAlive == true) {\n      $this->smtp->Reset();\n    } else {\n        $this->smtp->Quit();\n        $this->smtp->Close();\n    }\n\n    return true;\n  }\n\n  /**\n   * Initiates a connection to an SMTP server.\n   * Returns false if the operation failed.\n   * @uses SMTP\n   * @access public\n   * @throws phpmailerException\n   * @return bool\n   */\n  public function SmtpConnect()\n  {\n    if (is_null($this->smtp)) {\n      $this->smtp = new SMTP;\n    }\n\n    $this->smtp->Timeout = $this->Timeout;\n    $this->smtp->do_debug = $this->SMTPDebug;\n    $hosts = explode(';', $this->Host);\n    $index = 0;\n    $connection = $this->smtp->Connected();\n\n    // Retry while there is no connection\n    try {\n      while ($index < count($hosts) && !$connection) {\n        $hostinfo = array();\n        if (preg_match('/^(.+):([0-9]+)$/', $hosts[$index], $hostinfo)) {\n          $host = $hostinfo[1];\n          $port = $hostinfo[2];\n        } else {\n          $host = $hosts[$index];\n          $port = $this->Port;\n        }\n\n        $tls = ($this->SMTPSecure == 'tls');\n        $ssl = ($this->SMTPSecure == 'ssl');\n\n        if ($this->smtp->Connect(($ssl ? 'ssl://':'').$host, $port, $this->Timeout)) {\n\n          $hello = ($this->Helo != '' ? $this->Helo : $this->ServerHostname());\n          $this->smtp->Hello($hello);\n\n          if ($tls) {\n            if (!$this->smtp->StartTLS()) {\n              throw new phpmailerException($this->Lang('connect_host'));\n            }\n\n            //We must resend HELO after tls negotiation\n            $this->smtp->Hello($hello);\n          }\n\n          $connection = true;\n          if ($this->SMTPAuth) {\n            if (!$this->smtp->Authenticate($this->Username, $this->Password, $this->AuthType,\n                                           $this->Realm, $this->Workstation)) {\n              throw new phpmailerException($this->Lang('authenticate'));\n            }\n          }\n        }\n        $index++;\n      if (!$connection) {\n        throw new phpmailerException($this->Lang('connect_host'));\n      }\n      }\n    } catch (phpmailerException $e) {\n      $this->smtp->Reset();\n      if ($this->exceptions) {\n        throw $e;\n      }\n    }\n\n    return true;\n  }\n\n  /**\n   * Closes the active SMTP session if one exists.\n   * @return void\n   */\n  public function SmtpClose()\n  {\n    if ($this->smtp !== null) {\n      if ($this->smtp->Connected()) {\n        $this->smtp->Quit();\n        $this->smtp->Close();\n      }\n    }\n  }\n\n  /**\n  * Sets the language for all class error messages.\n  * Returns false if it cannot load the language file.  The default language is English.\n  * @param string $langcode ISO 639-1 2-character language code (e.g. Portuguese: \"br\")\n  * @param string $lang_path Path to the language file directory\n   * @return bool\n  * @access public\n  */\n  public function SetLanguage($langcode = 'en', $lang_path = 'language/')\n  {\n    //Define full set of translatable strings\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    );\n    //Overwrite language-specific strings. This way we'll never have missing translations - no more \"language string failed to load\"!\n    $l = true;\n    if ($langcode != 'en') { //There is no English translation file\n      $l = @include $lang_path.'phpmailer.lang-'.$langcode.'.php';\n    }\n    $this->language = $PHPMAILER_LANG;\n\n    return ($l == true); //Returns false if language not found\n  }\n\n  /**\n  * Return the current array of language strings\n  * @return array\n  */\n  public function GetTranslations()\n  {\n    return $this->language;\n  }\n\n  /////////////////////////////////////////////////\n  // METHODS, MESSAGE CREATION\n  /////////////////////////////////////////////////\n\n  /**\n   * Creates recipient headers.\n   * @access public\n   * @param string $type\n   * @param array $addr\n   * @return string\n   */\n  public function AddrAppend($type, $addr)\n  {\n    $addr_str = $type . ': ';\n    $addresses = array();\n    foreach ($addr as $a) {\n      $addresses[] = $this->AddrFormat($a);\n    }\n    $addr_str .= implode(', ', $addresses);\n    $addr_str .= $this->LE;\n\n    return $addr_str;\n  }\n\n  /**\n   * Formats an address correctly.\n   * @access public\n   * @param string $addr\n   * @return string\n   */\n  public function AddrFormat($addr)\n  {\n    if (empty($addr[1])) {\n      return $this->SecureHeader($addr[0]);\n    } else {\n      return $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . \" <\" . $this->SecureHeader($addr[0]) . \">\";\n    }\n  }\n\n  /**\n   * Wraps message for use with mailers that do not\n   * automatically perform wrapping and for quoted-printable.\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    $soft_break = ($qp_mode) ? sprintf(\" =%s\", $this->LE) : $this->LE;\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    if (substr($message, -$lelen) == $this->LE) {\n      $message = substr($message, 0, -$lelen);\n    }\n\n    $line = explode($this->LE, $message);   // Magic. We know FixEOL uses $LE\n    $message = '';\n    for ($i = 0 ;$i < count($line); $i++) {\n      $line_part = explode(' ', $line[$i]);\n      $buf = '';\n      for ($e = 0; $e<count($line_part); $e++) {\n        $word = $line_part[$e];\n        if ($qp_mode and (strlen($word) > $length)) {\n          $space_left = $length - strlen($buf) - $crlflen;\n          if ($e != 0) {\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            $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          $buf .= ($e == 0) ? $word : (' ' . $word);\n\n          if (strlen($buf) > $length and $buf_o != '') {\n            $message .= $buf_o . $soft_break;\n            $buf = $word;\n          }\n        }\n      }\n      $message .= $buf . self::CRLF;\n    }\n\n    return $message;\n  }\n\n  /**\n   * Finds 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 int    $maxLength   find last character boundary prior to this length\n   * @return int\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 ($encodedCharPos !== false) {\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) { // 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          $maxLength = ($encodedCharPos == 0) ? $maxLength :\n          $maxLength - ($lookBack - $encodedCharPos);\n          $foundSplitPos = true;\n        } elseif ($dec >= 192) { // 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) { // 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\n    return $maxLength;\n  }\n\n\n  /**\n   * Set the body wrapping.\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   * Assembles message header.\n   * @access public\n   * @return string The assembled header\n   */\n  public function CreateHeader()\n  {\n    $result = '';\n\n    // Set the boundaries\n    $uniq_id = md5(uniqid(time()));\n    $this->boundary[1] = 'b1_' . $uniq_id;\n    $this->boundary[2] = 'b2_' . $uniq_id;\n    $this->boundary[3] = 'b3_' . $uniq_id;\n\n    if ($this->MessageDate == '') {\n      $result .= $this->HeaderLine('Date', self::RFCDate());\n    } else {\n      $result .= $this->HeaderLine('Date', $this->MessageDate);\n    }\n\n    if ($this->ReturnPath) {\n      $result .= $this->HeaderLine('Return-Path', trim($this->ReturnPath));\n    } elseif ($this->Sender == '') {\n      $result .= $this->HeaderLine('Return-Path', trim($this->From));\n    } else {\n      $result .= $this->HeaderLine('Return-Path', trim($this->Sender));\n    }\n\n    // To be created automatically by mail()\n    if ($this->Mailer != 'mail') {\n      if ($this->SingleTo === true) {\n        foreach ($this->to as $t) {\n          $this->SingleToArray[] = $this->AddrFormat($t);\n        }\n      } else {\n        if (count($this->to) > 0) {\n          $result .= $this->AddrAppend('To', $this->to);\n        } elseif (count($this->cc) == 0) {\n          $result .= $this->HeaderLine('To', 'undisclosed-recipients:;');\n        }\n      }\n    }\n\n    $from = array();\n    $from[0][0] = trim($this->From);\n    $from[0][1] = $this->FromName;\n    $result .= $this->AddrAppend('From', $from);\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 ((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->bcc) > 0)) {\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    if ($this->MessageID != '') {\n      $result .= $this->HeaderLine('Message-ID', $this->MessageID);\n    } else {\n      $result .= sprintf(\"Message-ID: <%s@%s>%s\", $uniq_id, $this->ServerHostname(), $this->LE);\n    }\n    $result .= $this->HeaderLine('X-Priority', $this->Priority);\n    if ($this->XMailer == '') {\n        $result .= $this->HeaderLine('X-Mailer', 'PHPMailer '.$this->Version.' (http://code.google.com/a/apache-extras.org/p/phpmailer/)');\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', '<' . trim($this->ConfirmReadingTo) . '>');\n    }\n\n    // Add custom headers\n    for ($index = 0; $index < count($this->CustomHeader); $index++) {\n      $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1])));\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   * Returns the message MIME.\n   * @access public\n   * @return string\n   */\n  public function GetMailMIME()\n  {\n    $result = '';\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->HeaderLine('Content-Transfer-Encoding', $this->Encoding);\n        $result .= $this->TextLine('Content-Type: '.$this->ContentType.'; charset='.$this->CharSet);\n        break;\n    }\n\n    if ($this->Mailer != 'mail') {\n      $result .= $this->LE;\n    }\n\n    return $result;\n  }\n\n  /**\n   * Returns the MIME message (headers and body). Only really valid post PreSend().\n   * @access public\n   * @return string\n   */\n  public function GetSentMIMEMessage()\n  {\n    return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody;\n  }\n\n  /**\n   * Assembles the message body.  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\n    if ($this->sign_key_file) {\n      $body .= $this->GetMailMIME().$this->LE;\n    }\n\n    $this->SetWordWrap();\n\n    switch ($this->message_type) {\n      case 'inline':\n        $body .= $this->GetBoundary($this->boundary[1], '', '', '');\n        $body .= $this->EncodeString($this->Body, $this->Encoding);\n        $body .= $this->LE.$this->LE;\n        $body .= $this->AttachAll(\"inline\", $this->boundary[1]);\n        break;\n      case 'attach':\n        $body .= $this->GetBoundary($this->boundary[1], '', '', '');\n        $body .= $this->EncodeString($this->Body, $this->Encoding);\n        $body .= $this->LE.$this->LE;\n        $body .= $this->AttachAll(\"attachment\", $this->boundary[1]);\n        break;\n      case 'inline_attach':\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], '', '', '');\n        $body .= $this->EncodeString($this->Body, $this->Encoding);\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 .= $this->GetBoundary($this->boundary[1], '', 'text/plain', '');\n        $body .= $this->EncodeString($this->AltBody, $this->Encoding);\n        $body .= $this->LE.$this->LE;\n        $body .= $this->GetBoundary($this->boundary[1], '', 'text/html', '');\n        $body .= $this->EncodeString($this->Body, $this->Encoding);\n        $body .= $this->LE.$this->LE;\n        $body .= $this->EndBoundary($this->boundary[1]);\n        break;\n      case 'alt_inline':\n        $body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', '');\n        $body .= $this->EncodeString($this->AltBody, $this->Encoding);\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], '', 'text/html', '');\n        $body .= $this->EncodeString($this->Body, $this->Encoding);\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 .= $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], '', 'text/plain', '');\n        $body .= $this->EncodeString($this->AltBody, $this->Encoding);\n        $body .= $this->LE.$this->LE;\n        $body .= $this->GetBoundary($this->boundary[2], '', 'text/html', '');\n        $body .= $this->EncodeString($this->Body, $this->Encoding);\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 .= $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], '', 'text/plain', '');\n        $body .= $this->EncodeString($this->AltBody, $this->Encoding);\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], '', 'text/html', '');\n        $body .= $this->EncodeString($this->Body, $this->Encoding);\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 ''\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        $file = tempnam('', 'mail');\n        file_put_contents($file, $body); //TODO check this worked\n        $signed = tempnam(\"\", \"signed\");\n        if (@openssl_pkcs7_sign($file, $signed, \"file://\".$this->sign_cert_file, array(\"file://\".$this->sign_key_file, $this->sign_key_pass), NULL)) {\n          @unlink($file);\n          $body = file_get_contents($signed);\n          @unlink($signed);\n        } else {\n          @unlink($file);\n          @unlink($signed);\n          throw new phpmailerException($this->Lang(\"signing\").openssl_error_string());\n        }\n      } catch (phpmailerException $e) {\n        $body = '';\n        if ($this->exceptions) {\n          throw $e;\n        }\n      }\n    }\n\n    return $body;\n  }\n\n  /**\n   * Returns 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    $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding);\n    $result .= $this->LE;\n\n    return $result;\n  }\n\n  /**\n   * Returns 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   * Sets the message type.\n   * @access protected\n   * @return void\n   */\n  protected function SetMessageType()\n  {\n    $this->message_type = array();\n    if($this->AlternativeExists()) $this->message_type[] = \"alt\";\n    if($this->InlineImageExists()) $this->message_type[] = \"inline\";\n    if($this->AttachmentExists()) $this->message_type[] = \"attach\";\n    $this->message_type = implode(\"_\", $this->message_type);\n    if($this->message_type == \"\") $this->message_type = \"plain\";\n  }\n\n  /**\n   *  Returns a formatted 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   * Returns 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  // CLASS METHODS, ATTACHMENTS\n  /////////////////////////////////////////////////\n\n  /**\n   * Adds an attachment from a path on the filesystem.\n   * Returns false if the file could not be found\n   * or accessed.\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   * @throws phpmailerException\n   * @return bool\n   */\n  public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream')\n  {\n    try {\n      if ( !@is_file($path) ) {\n        throw new phpmailerException($this->Lang('file_access') . $path, self::STOP_CONTINUE);\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 => 'attachment',\n        7 => 0\n      );\n\n    } catch (phpmailerException $e) {\n      $this->SetError($e->getMessage());\n      if ($this->exceptions) {\n        throw $e;\n      }\n      if ($this->SMTPDebug) {\n        $this->edebug($e->getMessage().\"\\n\");\n      }\n      if ( $e->getCode() == self::STOP_CRITICAL ) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  /**\n  * Return the current array of attachments\n  * @return array\n  */\n  public function GetAttachments()\n  {\n    return $this->attachment;\n  }\n\n  /**\n   * Attaches all fs, 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)) { continue; }\n        $incl[]      = $inclhash;\n        $filename    = $attachment[1];\n        $name        = $attachment[2];\n        $encoding    = $attachment[3];\n        $type        = $attachment[4];\n        $disposition = $attachment[6];\n        $cid         = $attachment[7];\n        if ( $disposition == 'inline' && isset($cidUniq[$cid]) ) { continue; }\n        $cidUniq[$cid] = true;\n\n        $mime[] = sprintf(\"--%s%s\", $boundary, $this->LE);\n        $mime[] = sprintf(\"Content-Type: %s; name=\\\"%s\\\"%s\", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE);\n        $mime[] = sprintf(\"Content-Transfer-Encoding: %s%s\", $encoding, $this->LE);\n\n        if ($disposition == 'inline') {\n          $mime[] = sprintf(\"Content-ID: <%s>%s\", $cid, $this->LE);\n        }\n\n        $mime[] = sprintf(\"Content-Disposition: %s; filename=\\\"%s\\\"%s\", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE);\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   * Encodes 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   * @see EncodeFile()\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      //  if (!function_exists('get_magic_quotes')) {\n      //    function get_magic_quotes() {\n      //      return false;\n      //    }\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(0);\n        } else {\n          ini_set('magic_quotes_runtime', 0);\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\n      return $file_buffer;\n    } catch (Exception $e) {\n      $this->SetError($e->getMessage());\n\n      return '';\n    }\n  }\n\n  /**\n   * Encodes string to 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        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\n    return $encoded;\n  }\n\n  /**\n   * Encode a header string to best (shortest) of Q, B, quoted 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    $x = 0;\n\n    switch (strtolower($position)) {\n      case 'phrase':\n        if (!preg_match('/[\\200-\\377]/', $str)) {\n          // Can't use addslashes as we don't know what value has 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        $x = preg_match_all('/[^\\040\\041\\043-\\133\\135-\\176]/', $str, $matches);\n        break;\n      case 'comment':\n        $x = preg_match_all('/[()\"]/', $str, $matches);\n        // Fall-through\n      case 'text':\n      default:\n        $x += preg_match_all('/[\\000-\\010\\013\\014\\016-\\037\\177-\\377]/', $str, $matches);\n        break;\n    }\n\n    if ($x == 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 (strlen($str)/3 < $x) {\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   * Checks if a string contains multibyte characters.\n   * @access public\n   * @param string $str multi-byte text to wrap encode\n   * @return bool\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\n      return false;\n    }\n  }\n\n  /**\n   * Correctly encodes and wraps long multibyte strings for mail headers\n   * without breaking lines within a character.\n   * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php\n   * @access public\n   * @param string $str multi-byte text to wrap encode\n   * @param string $lf string to use as linefeed/end-of-line\n   * @return string\n   */\n  public function Base64EncodeWrapMB($str, $lf=null)\n  {\n    $start = \"=?\".$this->CharSet.\"?B?\";\n    $end = \"?=\";\n    $encoded = \"\";\n    if ($lf === null) {\n      $lf = $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    $offset = $avgLength = floor($length * $ratio * .75);\n\n    for ($i = 0; $i < $mb_length; $i += $offset) {\n      $lookBack = 0;\n\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\n      $encoded .= $chunk . $lf;\n    }\n\n    // Chomp the last linefeed\n    $encoded = substr($encoded, 0, -strlen($lf));\n\n    return $encoded;\n  }\n\n  /**\n  * Encode string to quoted-printable.\n  * Only uses standard PHP, slow, but will always work\n  * @access public\n   * @param string $input\n  * @param integer $line_max Number of chars allowed on a line before wrapping\n   * @param bool $space_conv\n   * @internal param string $string the text to encode\n  * @return string\n  */\n  public function EncodeQPphp( $input = '', $line_max = 76, $space_conv = false)\n  {\n    $hex = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');\n    $lines = preg_split('/(?:\\r\\n|\\r|\\n)/', $input);\n    $eol = \"\\r\\n\";\n    $escape = '=';\n    $output = '';\n    while ( list(, $line) = each($lines) ) {\n      $linlen = strlen($line);\n      $newline = '';\n      for ($i = 0; $i < $linlen; $i++) {\n        $c = substr( $line, $i, 1 );\n        $dec = ord( $c );\n        if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E\n          $c = '=2E';\n        }\n        if ($dec == 32) {\n          if ( $i == ( $linlen - 1 ) ) { // convert space at eol only\n            $c = '=20';\n          } elseif ($space_conv) {\n            $c = '=20';\n          }\n        } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode \"\\t\", which is *not* required\n          $h2 = (integer) floor($dec/16);\n          $h1 = (integer) floor($dec%16);\n          $c = $escape.$hex[$h2].$hex[$h1];\n        }\n        if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted\n          $output .= $newline.$escape.$eol; //  soft line break; \" =\\r\\n\" is okay\n          $newline = '';\n          // check if newline first character will be point or not\n          if ($dec == 46) {\n            $c = '=2E';\n          }\n        }\n        $newline .= $c;\n      } // end of for\n      $output .= $newline.$eol;\n    } // end of while\n\n    return $output;\n  }\n\n  /**\n  * Encode string to RFC2045 (6.7) quoted-printable format\n  * Uses a PHP5 stream filter to do the encoding about 64x faster than the old version\n  * Also results in same content as you started with after decoding\n  * @see EncodeQPphp()\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  * @param boolean $space_conv Dummy param for compatibility with existing EncodeQP function\n  * @return string\n  * @author Marcus Bointon\n  */\n  public function EncodeQP($string, $line_max = 76, $space_conv = false)\n  {\n    if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3)\n\n      return quoted_printable_encode($string);\n    }\n    $filters = stream_get_filters();\n    if (!in_array('convert.*', $filters)) { //Got convert stream filter?\n\n      return $this->EncodeQPphp($string, $line_max, $space_conv); //Fall back to old implementation\n    }\n    $fp = fopen('php://temp/', 'r+');\n    $string = preg_replace('/\\r\\n?/', $this->LE, $string); //Normalise line breaks\n    $params = array('line-length' => $line_max, 'line-break-chars' => $this->LE);\n    $s = stream_filter_append($fp, 'convert.quoted-printable-encode', STREAM_FILTER_READ, $params);\n    fputs($fp, $string);\n    rewind($fp);\n    $out = stream_get_contents($fp);\n    stream_filter_remove($s);\n    $out = preg_replace('/^\\./m', '=2E', $out); //Encode . if it is first char on a line, workaround for bug in Exchange\n    fclose($fp);\n\n    return $out;\n  }\n\n  /**\n   * Encode string to 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        $pattern = '^A-Za-z0-9!*+\\/ -';\n        break;\n\n      case 'comment':\n        $pattern = '\\(\\)\"';\n        //note that we dont break here!\n        //for this reason we build the $pattern withoud including delimiters and []\n\n      case 'text':\n      default:\n        //Replace every high ascii, control =, ? and _ characters\n        //We put \\075 (=) as first value to make sure it's the first one in being converted, preventing double encode\n        $pattern = '\\075\\000-\\011\\013\\014\\016-\\037\\077\\137\\177-\\377' . $pattern;\n        break;\n    }\n\n    if (preg_match_all(\"/[{$pattern}]/\", $encoded, $matches)) {\n      foreach (array_unique($matches[0]) as $char) {\n        $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded);\n      }\n    }\n\n    //Replace every spaces to _ (more readable than =20)\n    return str_replace(' ', '_', $encoded);\n}\n\n\n  /**\n   * Adds a string or binary attachment (non-filesystem) to the list.\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   * @return void\n   */\n  public function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream')\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 => 'attachment',\n      7 => 0\n    );\n  }\n\n  /**\n   * Adds an embedded attachment.  This can include images, sounds, and\n   * just about any other document.  Make sure to set the $type to an\n   * image type.  For JPEG images use \"image/jpeg\" and for GIF images\n   * use \"image/gif\".\n   * @param string $path Path to the attachment.\n   * @param string $cid Content ID of the attachment.  Use this to identify\n   *        the Id for accessing the image in an HTML form.\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   * @return bool\n   */\n  public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream')\n  {\n    if ( !@is_file($path) ) {\n      $this->SetError($this->Lang('file_access') . $path);\n\n      return false;\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 => 'inline',\n      7 => $cid\n    );\n\n    return true;\n  }\n\n  /**\n   * Adds an embedded stringified attachment.  This can include images, sounds, and\n   * just about any other document.  Make sure to set the $type to an\n   * image type.  For JPEG images use \"image/jpeg\" and for GIF images\n   * use \"image/gif\".\n   * @param string $string The attachment.\n   * @param string $cid Content ID of the attachment.  Use this to identify\n   *        the Id for accessing the image in an HTML form.\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   * @return bool\n   */\n  public function AddStringEmbeddedImage($string, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream')\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 => 'inline',\n      7 => $cid\n    );\n  }\n\n  /**\n   * Returns true if an inline attachment is present.\n   * @access public\n   * @return bool\n   */\n  public function InlineImageExists()\n  {\n    foreach ($this->attachment as $attachment) {\n      if ($attachment[6] == 'inline') {\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  /**\n   * Returns true if an attachment (non-inline) is present.\n   * @return bool\n   */\n  public function AttachmentExists()\n  {\n    foreach ($this->attachment as $attachment) {\n      if ($attachment[6] == 'attachment') {\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  /**\n   * Does this message have an alternative body set?\n   * @return bool\n   */\n  public function AlternativeExists()\n  {\n    return !empty($this->AltBody);\n  }\n\n  /////////////////////////////////////////////////\n  // CLASS METHODS, MESSAGE RESET\n  /////////////////////////////////////////////////\n\n  /**\n   * Clears all recipients assigned in the TO array.  Returns void.\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  }\n\n  /**\n   * Clears all recipients assigned in the CC array.  Returns void.\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  }\n\n  /**\n   * Clears all recipients assigned in the BCC array.  Returns void.\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  }\n\n  /**\n   * Clears all recipients assigned in the ReplyTo array.  Returns void.\n   * @return void\n   */\n  public function ClearReplyTos()\n  {\n    $this->ReplyTo = array();\n  }\n\n  /**\n   * Clears all recipients assigned in the TO, CC and BCC\n   * array.  Returns void.\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  }\n\n  /**\n   * Clears all previously set filesystem, string, and binary\n   * attachments.  Returns void.\n   * @return void\n   */\n  public function ClearAttachments()\n  {\n    $this->attachment = array();\n  }\n\n  /**\n   * Clears all custom headers.  Returns void.\n   * @return void\n   */\n  public function ClearCustomHeaders()\n  {\n    $this->CustomHeader = array();\n  }\n\n  /////////////////////////////////////////////////\n  // CLASS METHODS, MISCELLANEOUS\n  /////////////////////////////////////////////////\n\n  /**\n   * Adds the 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) and array_key_exists('smtp_msg', $lasterror)) {\n        $msg .= '<p>' . $this->Lang('smtp_error') . $lasterror['smtp_msg'] . \"</p>\\n\";\n      }\n    }\n    $this->ErrorInfo = $msg;\n  }\n\n  /**\n   * Returns the proper RFC 822 formatted date.\n   * @access public\n   * @return string\n   * @static\n   */\n  public static function RFCDate()\n  {\n    $tz = date('Z');\n    $tzs = ($tz < 0) ? '-' : '+';\n    $tz = abs($tz);\n    $tz = (int) ($tz/3600)*100 + ($tz%3600)/60;\n    $result = sprintf(\"%s %s%04d\", date('D, j M Y H:i:s'), $tzs, $tz);\n\n    return $result;\n  }\n\n  /**\n   * Returns the server hostname or 'localhost.localdomain' if unknown.\n   * @access protected\n   * @return string\n   */\n  protected function ServerHostname()\n  {\n    if (!empty($this->Hostname)) {\n      $result = $this->Hostname;\n    } elseif (isset($_SERVER['SERVER_NAME'])) {\n      $result = $_SERVER['SERVER_NAME'];\n    } else {\n      $result = 'localhost.localdomain';\n    }\n\n    return $result;\n  }\n\n  /**\n   * Returns a message in the appropriate 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 (isset($this->language[$key])) {\n      return $this->language[$key];\n    } else {\n      return 'Language string failed to load: ' . $key;\n    }\n  }\n\n  /**\n   * Returns true if an error occurred.\n   * @access public\n   * @return bool\n   */\n  public function IsError()\n  {\n    return ($this->error_count > 0);\n  }\n\n  /**\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  // condense down 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\n    return  $nstr;\n  }\n\n  /**\n   * Adds a custom header. $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   * Evaluates the message and returns modifications for inline images and backgrounds\n   * @access public\n   * @param string $message Text to be HTML modified\n   * @param string $basedir baseline directory for path\n   * @return string $message\n   */\n  public function MsgHTML($message, $basedir = '')\n  {\n    preg_match_all(\"/(src|background)=[\\\"'](.*)[\\\"']/Ui\", $message, $images);\n    if (isset($images[2])) {\n      foreach ($images[2] as $i => $url) {\n        // do not change urls for absolute images (thanks to corvuscorax)\n        if (!preg_match('#^[A-z]+://#', $url)) {\n          $filename = basename($url);\n          $directory = dirname($url);\n          if ($directory == '.') {\n            $directory = '';\n          }\n          $cid = 'cid:' . md5($url);\n          $ext = pathinfo($filename, PATHINFO_EXTENSION);\n          $mimeType  = self::_mime_types($ext);\n          if ( strlen($basedir) > 1 && substr($basedir, -1) != '/') { $basedir .= '/'; }\n          if ( strlen($directory) > 1 && substr($directory, -1) != '/') { $directory .= '/'; }\n          if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($url), $filename, 'base64', $mimeType) ) {\n            $message = preg_replace(\"/\".$images[1][$i].\"=[\\\"']\".preg_quote($url, '/').\"[\\\"']/Ui\", $images[1][$i].\"=\\\"\".$cid.\"\\\"\", $message);\n          }\n        }\n      }\n    }\n    $this->IsHTML(true);\n    $this->Body = $message;\n    if (empty($this->AltBody)) {\n        $textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\\/\\\\1>/s', '', $message)));\n        if (!empty($textMsg)) {\n            $this->AltBody = html_entity_decode($textMsg, ENT_QUOTES, $this->CharSet);\n        }\n    }\n    if (empty($this->AltBody)) {\n      $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . \"\\n\\n\";\n    }\n\n    return $message;\n  }\n\n  /**\n   * Gets the MIME type of the embedded or inline image\n   * @param string $ext File extension\n   * @access public\n   * @return string MIME type of ext\n   * @static\n   */\n  public static function _mime_types($ext = '')\n  {\n    $mimes = array(\n      'xl'    =>  'application/excel',\n      'hqx'   =>  'application/mac-binhex40',\n      'cpt'   =>  'application/mac-compactpro',\n      'bin'   =>  'application/macbinary',\n      'doc'   =>  'application/msword',\n      'word'  =>  'application/msword',\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      'js'    =>  'application/x-javascript',\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      '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\n    return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];\n  }\n\n  /**\n  * Set (or reset) Class Objects (variables)\n  *\n  * Usage Example:\n  * $page->set('X-Priority', '3');\n  *\n  * @access public\n  * @param string $name Parameter Name\n  * @param mixed $value Parameter Value\n  * NOTE: will not work with arrays, there are no arrays to set/reset\n   * @throws phpmailerException\n   * @return bool\n  * @todo Should this not be using __set() magic function?\n  */\n  public function set($name, $value = '')\n  {\n    try {\n      if (isset($this->$name) ) {\n        $this->$name = $value;\n      } else {\n        throw new phpmailerException($this->Lang('variable_set') . $name, self::STOP_CRITICAL);\n      }\n    } catch (Exception $e) {\n      $this->SetError($e->getMessage());\n      if ($e->getCode() == self::STOP_CRITICAL) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  /**\n   * Strips newlines to prevent header injection.\n   * @access public\n   * @param string $str String\n   * @return string\n   */\n  public function SecureHeader($str)\n  {\n    return trim(str_replace(array(\"\\r\", \"\\n\"), '', $str));\n  }\n\n  /**\n   * Set the private key file and password to sign the message.\n   *\n   * @access public\n   * @param $cert_filename\n   * @param string $key_filename Parameter File Name\n   * @param string $key_pass Password for private key\n   */\n  public function Sign($cert_filename, $key_filename, $key_pass)\n  {\n    $this->sign_cert_file = $cert_filename;\n    $this->sign_key_file = $key_filename;\n    $this->sign_key_pass = $key_pass;\n  }\n\n  /**\n   * Set the private key file and password to sign the message.\n   *\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\n    return $line;\n  }\n\n  /**\n   * Generate DKIM signature\n   *\n   * @access public\n   * @param string $s Header\n   * @return string\n   */\n  public function DKIM_Sign($s)\n  {\n    $privKeyStr = 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 = $privKeyStr;\n    }\n    if (openssl_sign($s, $signature, $privKey)) {\n      return base64_encode($signature);\n    }\n\n    return '';\n  }\n\n  /**\n   * Generate DKIM Canonicalization Header\n   *\n   * @access public\n   * @param string $s Header\n   * @return string\n   */\n  public function DKIM_HeaderC($s)\n  {\n    $s = preg_replace(\"/\\r\\n\\s+/\", \" \", $s);\n    $lines = explode(\"\\r\\n\", $s);\n    foreach ($lines as $key => $line) {\n      list($heading, $value) = explode(\":\", $line, 2);\n      $heading = strtolower($heading);\n      $value = preg_replace(\"/\\s+/\", \" \", $value) ; // Compress useless spaces\n      $lines[$key] = $heading.\":\".trim($value) ; // Don't forget to remove WSP around the value\n    }\n    $s = implode(\"\\r\\n\", $lines);\n\n    return $s;\n  }\n\n  /**\n   * Generate DKIM Canonicalization Body\n   *\n   * @access public\n   * @param string $body Message Body\n   * @return string\n   */\n  public function DKIM_BodyC($body)\n  {\n    if ($body == '') return \"\\r\\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\n    return $body;\n  }\n\n  /**\n   * Create the DKIM header, body, as new header\n   *\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-sha1'; // 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    foreach ($headers as $header) {\n      if (strpos($header, 'From:') === 0) {\n        $from_header = $header;\n      } elseif (strpos($header, 'To:') === 0) {\n        $to_header = $header;\n      }\n    }\n    $from     = str_replace('|', '=7C', $this->DKIM_QP($from_header));\n    $to       = str_replace('|', '=7C', $this->DKIM_QP($to_header));\n    $subject  = str_replace('|', '=7C', $this->DKIM_QP($subject_header)) ; // 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*\", sha1($body))) ; // Base64 of packed binary SHA-1 hash of body\n    $ident    = ($this->DKIM_identity == '')? '' : \" i=\" . $this->DKIM_identity . \";\";\n    $dkimhdrs = \"DKIM-Signature: v=1; a=\" . $DKIMsignatureType . \"; q=\" . $DKIMquery . \"; l=\" . $DKIMlen . \"; s=\" . $this->DKIM_selector . \";\\r\\n\".\n                \"\\tt=\" . $DKIMtime . \"; c=\" . $DKIMcanonicalization . \";\\r\\n\".\n                \"\\th=From:To:Subject;\\r\\n\".\n                \"\\td=\" . $this->DKIM_domain . \";\" . $ident . \"\\r\\n\".\n                \"\\tz=$from\\r\\n\".\n                \"\\t|$to\\r\\n\".\n                \"\\t|$subject;\\r\\n\".\n                \"\\tbh=\" . $DKIMb64 . \";\\r\\n\".\n                \"\\tb=\";\n    $toSign   = $this->DKIM_HeaderC($from_header . \"\\r\\n\" . $to_header . \"\\r\\n\" . $subject_header . \"\\r\\n\" . $dkimhdrs);\n    $signed   = $this->DKIM_Sign($toSign);\n\n    return \"X-PHPMAILER-DKIM: code.google.com/a/apache-extras.org/p/phpmailer/\\r\\n\".$dkimhdrs.$signed.\"\\r\\n\";\n  }\n\n  /**\n   * Perform callback\n   * @param boolean $isSent\n   * @param string $to\n   * @param string $cc\n   * @param string $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=null)\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 * Exception handler for PHPMailer\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>' . $this->getMessage() . \"</strong><br />\\n\";\n\n    return $errorMsg;\n  }\n}\n"
  },
  {
    "path": "plugins/box/backup/backup.admin.php",
    "content": "<?php\n\n// Add plugin navigation link\nNavigation::add(__('Backups', 'backup'), 'system', 'backup', 3);\n\n/**\n * Backup Admin Class\n */\nclass BackupAdmin extends Backend\n{\n    /**\n     * Backup admin\n     */\n    public static function main()\n    {\n        $backups_path = ROOT . DS . 'backups';\n\n        // Create backup\n        // -------------------------------------\n        if (Request::post('create_backup')) {\n\n            if (Security::check(Request::post('csrf'))) {\n\n                @set_time_limit(0);\n                @ini_set(\"memory_limit\", \"512M\");\n\n                $zip = Zip::factory();\n\n                // Add storage folder\n                $zip->readDir(STORAGE . DS, false);\n\n                // Add public folder\n                $zip->readDir(ROOT . DS . 'public' . DS, false);\n\n                // Add plugins folder\n                $zip->readDir(PLUGINS . DS, false, null, array(PLUGINS . DS . 'box'));\n\n                if ($zip->archive($backups_path . DS . Date::format(time(), \"Y-m-d-H-i-s\").'.zip')) {\n                    Notification::set('success', __('Backup was created', 'backup'));\n                } else {\n                    Notification::set('error', __('Backup was not created', 'backup'));\n                }\n\n                Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup');\n\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Delete backup\n        // -------------------------------------\n        if (Request::get('id') == 'backup' && Request::get('delete_file')) {\n\n            if (Security::check(Request::get('token'))) {\n\n                if (File::delete($backups_path . DS . Request::get('delete_file'))) {\n                    Notification::set('success', __('Backup was deleted', 'backup'));\n                } else {\n                    Notification::set('error', __('Backup was not deleted', 'backup'));\n                }\n                \n                Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup');\n\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Download backup\n        // -------------------------------------\n        if (Request::get('download')) {\n            if (Security::check(Request::get('token'))) {\n                File::download($backups_path . DS . Request::get('download'));\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Restore backup\n        // -------------------------------------\n        if (Request::get('restore')) {\n\n            if (Security::check(Request::get('token'))) {\n\n                $tmp_dir = ROOT . DS . 'tmp' . DS . uniqid('backup_');\n\n                if (Dir::create($tmp_dir)) {\n                    $file_locations = Zip::factory()->extract($backups_path . DS . Request::get('restore'), $tmp_dir);\n                     if (!empty($file_locations)) {\n                         Dir::copy($tmp_dir, ROOT . DS);\n                         Notification::set('success', __('Backup was restored', 'backup'));\n                     } else {\n                         Notification::set('error', __('Unzip error', 'backup'));\n                     }\n                } else {\n                    Notification::set('error', __('Backup was not restored', 'backup'));\n                }\n\n                Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup');\n\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Display view\n        View::factory('box/backup/views/backend/index')\n                ->assign('backups_list', File::scan($backups_path, '.zip'))\n                ->display();\n    }\n}\n"
  },
  {
    "path": "plugins/box/backup/backup.plugin.php",
    "content": "<?php\n\n/**\n *\tBackup plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Backup', 'backup'),\n                __('Backup manager', 'backup'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {\n\n    // Include Backup Admin\n    Plugin::admin('backup', 'box');\n\n}\n"
  },
  {
    "path": "plugins/box/backup/install/backup.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/backup/backup.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>8</plugin_priority>\n    <plugin_name>Backup</plugin_name>\n    <plugin_description>Backup plugin</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/backup/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n            'Backups' => 'Zálohy',\n            'Backup' => 'Zálohy',\n            'Create Backup' => 'Vytvořit zálohu',\n            'Delete' => 'Vymazat',\n            'storage' => 'Storage/Obsah diskového místa',\n            'public' => 'Veřejné',\n            'plugins' => 'Pluginy',\n            'Size' => 'Velikost',\n            'Actions' => 'Akce',\n            'Delete backup: :backup' => 'Vymazat zálohu: :backup',\n            'Creating...' => 'Vytvářím...',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/backup/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n            'Backups' => 'Backups',\n            'Backup' => 'Backup',\n            'Create Backup' => 'Erstelle Backup',\n            'Delete' => 'Löschen',\n            'storage' => 'Speicher',\n            'public' => 'Öffentliche',\n            'plugins' => 'Plugins',\n            'Size' => 'Größe',\n            'Actions' => 'Aktionen',\n            'Delete backup: :backup' => 'Lösche Backup: :backup',\n            'Creating...' => 'Erstellen...',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/backup/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n    \t\t'Backups' => 'Backups',\n    \t\t'Backup' => 'Backup',\n            'Backup Date' => 'Backup Date',\n    \t\t'Create Backup' => 'Create Backup',\n    \t\t'Restore' => 'Restore',\n    \t\t'Delete' => 'Delete',\n            'storage' => 'storage',\n            'public' => 'public',\n            'plugins' => 'plugins',\n            'Size' => 'Size',\n            'Actions' => 'Actions',\n            'Delete backup: :backup' => 'Delete backup: :backup',\n            'Creating...' => 'Creating...',\n            'Backup was created' => 'Backup was created',\n            'Backup was not created' => 'Backup was not created',\n            'Backup was deleted' => 'Backup was deleted',\n            'Backup was not deleted' => 'Backup was not deleted',\n            'Backup was restored' => 'Backup was restored',\n            'Unzip error' => 'Unzip error',\n            'Backup was not restored' => 'Backup was not restored',\n        )\n\t);\n"
  },
  {
    "path": "plugins/box/backup/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n            'backup' => array(\n    \t       'Backups' => 'Backups',\n\t       'Backup' => 'Backup',\n            'Backup Date' => 'Fecha del backup',\n    \t       'Create Backup' => 'Crear backup',\n\t       'Restore' => 'Restaurar', \n\t       'Delete' => 'Eliminar',\n            'storage' => 'Almacenamiento',\n            'public' => 'público',\n            'plugins' => 'plugins',\n            'Size' => 'Tamaño',\n            'Actions' => 'Acciones',\n            'Delete backup: :backup' => 'Eliminar backup: :backup',\n            'Creating...' => 'Creando...', \n            'Backup was created' => 'El backup fue creado',\n            'Backup was not created' => 'El backup no fue creado',\n            'Backup was deleted' => 'El backup fue eliminado',\n            'Backup was not deleted' => 'El backup no fue eliminado',\n            'Backup was restored' => 'El backup fue restaurado',\n            'Unzip error' => 'Error de descompresión',\n            'Backup was not restored' => 'El backup no fue restaurado',\n        )\n\t);\n"
  },
  {
    "path": "plugins/box/backup/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n    \t\t'Backups' => 'پشتیبان گیری',\n            'Backup Date' => 'تاریخ پشتیبان گیری',\n    \t\t'Create Backup' => 'ایجاد نسخه پشتیبان',\n    \t\t'Delete' => 'حذف',\n            'storage' => 'ذخیره سازی',\n            'public' => 'عمومی',\n            'plugins' => 'پلاگین',\n            'Size' => 'اندازه',\n            'Actions' => 'عملیات',\n            'Delete backup: :backup' => 'حذف نسخه پشتیبان: :backup',\n            'Creating...' => 'ایجاد...',\n        )\n\t);"
  },
  {
    "path": "plugins/box/backup/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n            'Backups' => 'Sauvegardes',\n            'Backup date' => 'Date de la sauvegarde',\n            'Create backup' => 'Créer une sauvegarde',\n            'Delete' => 'Supprimer',\n            'storage' => 'stockage',\n            'public' => 'public',\n            'plugins' => 'plugins',\n            'Size' => 'Taille',\n            'Actions' => 'Actions',\n            'Delete backup: :backup' => 'Supprimer la sauvegarde: :backup',\n            'Creating...' => 'Création...',\n        )\n    );"
  },
  {
    "path": "plugins/box/backup/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n    \t\t'Backups' => 'Biztonsági mentések',\n            'Backup date' => 'Biztonsági mentés dátuma',\n    \t\t'Create Backup' => 'Biztonsági mentés készítése',\n    \t\t'Delete' => 'Töröl',\n            'storage' => 'tárol',\n            'public' => 'nyilvános',\n            'plugins' => 'pluginok',\n            'Size' => 'Méret',\n            'Actions' => 'Műveletek',\n            'Delete backup: :backup' => 'Biztonsági mentés törlése: :backup',\n            'Creating...' => 'Készítés...',\n        )\n\t);"
  },
  {
    "path": "plugins/box/backup/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n                    'Backups' => 'Cadangan',\n            'Backup date' => 'Tanggal Cadangan',\n                    'Create Backup' => 'Buat Cadangan',\n                    'Delete' => 'Hapus',\n            'storage' => 'Penyimpanan',\n            'public' => 'Umum',\n            'plugins' => 'Plugins',\n            'Size' => 'Ukuran',\n            'Actions' => 'Tindakan',\n            'Delete backup: :backup' => 'Hapus Cadangan: :backup',\n            'Creating...' => 'Dibuat...',\n        )\n        );\n"
  },
  {
    "path": "plugins/box/backup/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n            'Backups' => 'Backup',\n            'Backup' => 'Backup',\n            'Create Backup' => 'Crea Backup',\n            'Delete' => 'Elimina',\n            'storage' => 'dati',\n            'public' => 'pubblica',\n            'plugins' => 'plugin',\n            'Size' => 'Dimensione',\n            'Actions' => 'Azioni',\n            'Delete backup: :backup' => 'Elimina backup: :backup',\n            'Creating...' => 'Creazione...',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/backup/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n    \t\t'Backups' => 'バックアップ',\n            'Backup Date' => 'バックアップ日',\n    \t\t'Create Backup' => 'バックアップの作成',\n    \t\t'Delete' => '削除',\n            'storage' => 'ストレージ',\n            'public' => '公開',\n            'plugins' => 'プラグイン',\n            'Size' => 'サイズ',\n            'Actions' => 'アクション',\n            'Delete backup: :backup' => 'バックアップの削除: :backup',\n            'Creating...' => '作成中...',\n        )\n\t);\n"
  },
  {
    "path": "plugins/box/backup/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n            'Backups' => 'Atsarginės kopijos',\n            'Backup' => 'Atsarginės kopijos data',\n            'Create Backup' => 'Sukurti atsarginę kopiją',\n            'Delete' => 'Ištrinti',\n            'storage' => 'storage',\n            'public' => 'public',\n            'plugins' => 'plugins',\n            'Size' => 'Dydis',\n            'Actions' => 'Veiksmai',\n            'Delete backup: :backup' => 'Ištrinti: :backup',\n            'Creating...' => 'Kuriama...',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/backup/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n            'Backups' => 'Backups',\n            'Backup' => 'Backup',\n            'Create Backup' => 'Maak backup',\n            'Delete' => 'Verwijderen',\n            'storage' => 'Opslag',\n            'public' => 'Publiek',\n            'plugins' => 'Plugins',\n            'Size' => 'Grootte',\n            'Actions' => 'Acties',\n            'Delete backup: :backup' => 'Verwijder backup: :backup',\n            'Creating...' => 'Backup wordt gemaakt...',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/backup/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n        \t'Backups' => 'Kopie zapasowe',\n            'Backup Date' => 'Data kopii zapasowej',\n    \t\t'Create Backup' => 'Utwórz kopię zapasową',\n    \t\t'Delete' => 'Usuń',\n            'storage' => 'magazyn',\n            'public' => 'publiczny',\n            'plugins' => 'wtyczki',\n            'Size' => 'Rozmiar',\n            'Actions' => 'Akcje',\n            'Delete backup: :backup' => 'Czy napewno usunąć kopię zapasową: :backup',\n            'Creating...' => 'Tworzenie kopii zapasowej...',\n        )\n\t);\n"
  },
  {
    "path": "plugins/box/backup/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n            'Backups' => 'Backups',\n            'Backup' => 'Backup',\n            'Create Backup' => 'Criar Backup',\n            'Delete' => 'Deletar',\n            'storage' => 'storage',\n            'public' => 'public',\n            'plugins' => 'plugins',\n            'Size' => 'Tamanho',\n            'Actions' => 'Ações',\n            'Delete backup: :backup' => 'Deletar o backup: :backup',\n            'Creating...' => 'Criando backup...',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/backup/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n            'Backups' => 'Бекапы',\n            'Backup' => 'Бекап',\n            'Create Backup' => 'Сделать бекап',\n            'Delete' => 'Удалить',\n            'storage' => 'данные',\n            'public' => 'публичная',\n            'plugins' => 'плагины',\n            'Size' => 'Размер',\n            'Actions' => 'Действия',\n            'Delete backup: :backup' => 'Удалить бекап: :backup',\n            'Creating...' => 'Создание...',\n            'Backup was deleted' => 'Бекап не был создан',\n            'Backup was created' => 'Бекап был создан',\n            'Backup was not restored' => 'Бекап не был восстановлен',\n            'Backup was restored' => 'Бекап был восстановлен',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/backup/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n            'Backups' => 'Zálohy',\n            'Backup' => 'Zálohy',\n            'Create Backup' => 'Vytvoriť Zálohu',\n            'Delete' => 'Vymazať',\n            'storage' => 'Storage/Obsah diskového miesta',\n            'public' => 'Verejné',\n            'plugins' => 'Pluginy',\n            'Size' => 'Veľkosť',\n            'Actions' => 'Akcie',\n            'Delete backup: :backup' => 'Vymazať zálohu: :backup',\n            'Creating...' => 'Vytváram...',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/backup/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n            'Backups' => 'Bekapovi',\n            'Backup' => 'Backap',\n            'Create Backup' => 'Kreiraj Bekap',\n            'Delete' => 'Obriši',\n            'storage' => 'lokacija arhive',\n            'public' => 'Javno',\n            'plugins' => 'Dodaci',\n            'Size' => 'Veličina',\n            'Actions' => 'Akcija',\n            'Delete backup: :backup' => 'Obriši bekap: :backup',\n            'Creating...' => 'Kreiranje...',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/backup/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n    \t\t'Backups' => 'Yedekler',\n    \t\t'Backup' => 'Yedek',\n            'Backup Date' => 'Yedekleme Tarihi',\n    \t\t'Create Backup' => 'Yedek Al',\n    \t\t'Delete' => 'Sil',\n    \t\t'Restore' => 'Geri Yükle',\n            'storage' => 'depo',\n            'public' => 'genel',\n            'plugins' => 'eklentiler',\n            'Size' => 'Boyut',\n            'Actions' => 'Eylemler',\n            'Delete backup: :backup' => ':backup adlı yedek silinsin mi',\n            'Creating...' => 'Oluşturuluyor...',\n            'Backup was created' => 'Yedek oluşturuldu',\n            'Backup was not created' => 'Yedek oluşturulmadı',\n            'Backup was deleted' => 'Yedek silindi',\n            'Backup was not deleted' => 'Yedek silinmedi',\n            'Backup was restored' => 'Yedek geri yüklendi',\n            'Unzip error' => 'Sıkıştırılmış yedeği açma (unzip) hatası',\n            'Backup was not restored' => 'Yedek geri yüklenmedi',\n        )\n\t);\n"
  },
  {
    "path": "plugins/box/backup/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n            'Backups' => 'Бекапи',\n            'Backup' => 'Бекап',\n            'Create Backup' => 'Створити бекап',\n            'Delete' => 'Видалити',\n            'storage' => 'дані',\n            'public' => 'публічна',\n            'plugins' => 'плагіни',\n            'Size' => 'Розмір',\n            'Actions' => 'Дії',\n            'Delete backup: :backup' => 'Видалити бекап: :backup',\n            'Creating...' => 'Створення...',\n            'Backup was deleted' => 'Бекап не був створений',\n            'Backup was created' => 'Бекап був створений',\n            'Backup was not restored' => 'Бекап не був відновлений',\n            'Backup was restored' => 'Бекап був відновлений',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/backup/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'backup' => array(\n    \t\t'Backups' => '备份',\n            'Backup Date' => '备份日期',\n    \t\t'Create Backup' => '创建备份',\n    \t\t'Delete' => '删除',\n            'storage' => '存储',\n            'public' => '公开',\n            'plugins' => '插件',\n            'Size' => '大小',\n            'Actions' => '操作',\n            'Delete backup: :backup' => '删除备份: :backup',\n            'Creating...' => '正在创建...',\n        )\n\t);"
  },
  {
    "path": "plugins/box/backup/views/backend/index.view.php",
    "content": "<script>$().ready(function(){$('[name=create_backup]').click(function(){$(this).button('loading');});});</script>\n\n<div class=\"vertical-align margin-bottom-1\">\n    <div class=\"text-left row-phone\">\n        <h2><?php echo __('Backups', 'backup'); ?></h2>\n    </div>\n    <div class=\"text-right row-phone\">\n        <?php\n            echo (\n                Form::open(null, array('class' => 'form-inline')) .\n                Form::hidden('csrf', Security::token()).\n                Form::submit('create_backup', __('Create Backup', 'backup'), array('class' => 'btn btn-phone btn-primary', 'data-loading-text' => __('Creating...', 'backup'))).\n                Form::close()\n            );\n        ?>\n    </div>\n</div>\n\n<!-- Backup_list -->\n<div class=\"table-responsive\">\n<table class=\"table table-bordered\">\n    <thead>\n        <tr>\n            <th><?php echo __('Backup', 'backup'); ?></th>\n            <th class=\"visible-lg hidden-xs\"><?php echo __('Size', 'backup'); ?></th>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n    <?php if (count($backups_list) > 0) rsort($backups_list); foreach ($backups_list as $backup) { ?>\n    <tr>\n        <td>\n            <?php $name = strtotime(str_replace('-', '', basename($backup, '.zip'))); ?>\n            <?php echo Html::anchor(Date::format($name, 'F jS, Y - g:i A'), Option::get('siteurl').'/admin/index.php?id=backup&download='.$backup.'&token='.Security::token()); ?>\n        </td>\n        <td class=\"visible-lg hidden-xs\"><?php echo Number::byteFormat(filesize(ROOT . DS . 'backups' . DS . $backup)); ?></td>\n        <td>\n            <div class=\"pull-right\">\n            <?php\n\t\t\t\tif (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {\n\t\t\t\t\techo Html::anchor(__('Restore', 'backup'),\n\t\t\t\t\t\t'index.php?id=backup&restore='.$backup.'&token='.Security::token(),\n\t\t\t\t\t\t\t  array('class' => 'btn btn-primary'));\n\t\t\t\t}\n            ?>\n            <?php echo Html::anchor(__('Delete', 'backup'),\n                      'index.php?id=backup&delete_file='.$backup.'&token='.Security::token(),\n                       array('class' => 'btn btn-danger', 'onclick' => \"return confirmDelete('\".__('Delete backup: :backup', 'backup', array(':backup' => Date::format($name, 'F jS, Y - g:i A'))).\"')\"));\n            ?>\n            </div>\n        </td>\n    </tr>\n    <?php } ?>\n    </tbody>\n</table>\n</div>\n<!-- /Backup_list -->\n"
  },
  {
    "path": "plugins/box/blocks/blocks.admin.php",
    "content": "<?php\n\n// Add plugin navigation link\nNavigation::add(__('Blocks', 'blocks'), 'content', 'blocks', 2);\nDashboard::addNewItem('blocks', __('Blocks', 'blocks'), 'index.php?id=blocks&action=add_block', 2);\n\n/**\n * Blocks Admin Class\n */\nclass BlocksAdmin extends Backend\n{\n    /**\n     * Blocks admin function\n     */\n    public static function main()\n    {\n        // Init vars\n        $blocks_path = STORAGE . DS  . 'blocks' . DS;\n        $blocks_list = array();\n        $errors      = array();\n\n        // Check for get actions\n         // -------------------------------------\n        if (Request::get('action')) {\n\n            // Switch actions\n             // -------------------------------------\n            switch (Request::get('action')) {\n\n                // Add block\n                // -------------------------------------\n                case \"add_block\":\n\n                    if (Request::post('add_blocks') || Request::post('add_blocks_and_exit')) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['blocks_empty_name'] = __('Required field', 'blocks');\n                            if (file_exists($blocks_path.Security::safeName(Request::post('name')).'.block.html')) $errors['blocks_exists'] = __('This block already exists', 'blocks');\n\n                            if (count($errors) == 0) {\n\n                                // Save block\n                                File::setContent($blocks_path.Security::safeName(Request::post('name')).'.block.html', XML::safe(Request::post('editor')));\n\n                                Notification::set('success', __('Your changes to the block <i>:name</i> have been saved.', 'blocks', array(':name' => Security::safeName(Request::post('name')))));\n\n                                if (Request::post('add_blocks_and_exit')) {\n                                    Request::redirect('index.php?id=blocks');\n                                } else {\n                                    Request::redirect('index.php?id=blocks&action=edit_block&filename='.Security::safeName(Request::post('name')));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n\n                    // Save fields\n                    if (Request::post('name')) $name = Request::post('name'); else $name = '';\n                    if (Request::post('editor')) $content = Request::post('editor'); else $content = '';\n\n                    // Display view\n                    View::factory('box/blocks/views/backend/add')\n                            ->assign('content', $content)\n                            ->assign('name', $name)\n                            ->assign('errors', $errors)\n                            ->display();\n                break;\n\n                // Edit Block\n                // -------------------------------------\n                case \"edit_block\":\n                    // Save current block action\n                    if (Request::post('edit_blocks') || Request::post('edit_blocks_and_exit') ) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['blocks_empty_name'] = __('Required field', 'blocks');\n                            if ((file_exists($blocks_path.Security::safeName(Request::post('name')).'.block.html')) and (Security::safeName(Request::post('blocks_old_name')) !== Security::safeName(Request::post('name')))) $errors['blocks_exists'] = __('This block already exists', 'blocks');\n\n                            // Save fields\n                            if (Request::post('editor')) $content = Request::post('editor'); else $content = '';\n                            if (count($errors) == 0) {\n\n                                $block_old_filename = $blocks_path.Request::post('blocks_old_name').'.block.html';\n                                $block_new_filename = $blocks_path.Security::safeName(Request::post('name')).'.block.html';\n                                if ( ! empty($block_old_filename)) {\n                                    if ($block_old_filename !== $block_new_filename) {\n                                        rename($block_old_filename, $block_new_filename);\n                                        $save_filename = $block_new_filename;\n                                    } else {\n                                        $save_filename = $block_new_filename;\n                                    }\n                                } else {\n                                    $save_filename = $block_new_filename;\n                                }\n\n                                // Save block\n                                File::setContent($save_filename, XML::safe(Request::post('editor')));\n\n                                Notification::set('success', __('Your changes to the block <i>:name</i> have been saved.', 'blocks', array(':name' => basename($save_filename, '.block.html'))));\n\n                                if (Request::post('edit_blocks_and_exit')) {\n                                    Request::redirect('index.php?id=blocks');\n                                } else {\n                                    Request::redirect('index.php?id=blocks&action=edit_block&filename='.Security::safeName(Request::post('name')));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n                    if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));\n                    if (Request::post('editor')) $content = Request::post('editor'); else $content = File::getContent($blocks_path.Request::get('filename').'.block.html');\n\n                    // Display view\n                    View::factory('box/blocks/views/backend/edit')\n                            ->assign('content', Text::toHtml($content))\n                            ->assign('name', $name)\n                            ->assign('errors', $errors)\n                            ->display();\n                break;\n                case \"delete_block\":\n\n                    if (Security::check(Request::get('token'))) {\n\n                        File::delete($blocks_path.Request::get('filename').'.block.html');\n                        Notification::set('success', __('Block <i>:name</i> deleted', 'blocks', array(':name' => File::name(Request::get('filename')))));\n                        Request::redirect('index.php?id=blocks');\n\n                    } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n                break;\n            }\n        } else {\n\n            // Get blocks\n            $blocks_list = File::scan($blocks_path, '.block.html');\n\n            // Display view\n            View::factory('box/blocks/views/backend/index')\n                    ->assign('blocks_list', $blocks_list)\n                    ->display();\n\n        }\n    }\n\n}\n"
  },
  {
    "path": "plugins/box/blocks/blocks.plugin.php",
    "content": "<?php\n\n/**\n *\tBlocks plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Blocks', 'blocks'),\n                __('Blocks manager plugin', 'blocks'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {\n\n    // Include Admin\n    Plugin::admin('blocks', 'box');\n\n}\n\n// Add Plugin Javascript\nJavascript::add('plugins/box/blocks/js/blocks.js', 'backend');\n\n// Add shortcode {block get=\"blockname\"}\nShortcode::add('block', 'Block::_content');\n\n// Add shortcode {block_inline name=\"blockname\"}\nShortcode::add('block_inline', 'Block::_inlineBlock');\n\n// Add shortcode {block_inline_create name=\"blockname\"} Block content here {/block_inline_create}\nShortcode::add('block_inline_create', 'Block::_createInlineBlock');\n\n/**\n * Block Class\n */\nclass Block\n{\n    /**\n     * Inline Blocks\n     *\n     * @var array\n     */\n    public static $inline_blocks = array();\n\n    /**\n     * Create Inline Block\n     */\n    public static function _createInlineBlock($attributes, $content)\n    {\n        if (isset($attributes['name'])) {\n            Block::$inline_blocks[Security::safeName($attributes['name'], '_', true)] = array(\n                'content'  => (string) $content,\n            );\n        }\n    }\n\n    /**\n     * Draw Inline Block\n     */\n    public static function _inlineBlock($attributes)\n    {\n        if (isset($attributes['name']) && isset(Block::$inline_blocks[$attributes['name']])) {\n            $content = Filter::apply('content', Text::toHtml(Block::$inline_blocks[$attributes['name']]['content']));\n\n            return $content;\n        } else {\n            return '';\n        }\n    }\n\n    /**\n     * Get block\n     *\n     * @param string $name Block file name\n     */\n    public static function get($name)\n    {\n        return Block::_content(array('get' => $name));\n    }\n\n    /**\n     * Returns block content for shortcode {block get=\"blockname\"}\n     *\n     * @param array $attributes block filename\n     */\n    public static function _content($attributes)\n    {\n        if (isset($attributes['get'])) $name = (string) $attributes['get']; else $name = '';\n\n        $block_path = STORAGE . DS . 'blocks' . DS . $name . '.block.html';\n\n        if (File::exists($block_path)) {\n            ob_start();\n            include $block_path;\n            $block_contents = ob_get_contents();\n            ob_end_clean();\n\n            return Filter::apply('content', Text::toHtml($block_contents));\n        } else {\n            if (Session::exists('admin') && Session::get('admin') == true) {\n                return __('<b>Block <u>:name</u> is not found!</b>', 'blocks', array(':name' => $name));\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "plugins/box/blocks/install/blocks.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/blocks/blocks.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>6</plugin_priority>\n    <plugin_name>Blocks</plugin_name>\n    <plugin_description>Blocks manager plugin</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/blocks/js/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/box/blocks/js/blocks.js",
    "content": "if (typeof $.monstra == 'undefined') $.monstra = {};\n\n$.monstra.blocks = {\n\n    init: function() { },\n\n    showEmbedCodes: function(name) {\n        $('#shortcode').html('{block get=\"'+name+'\"}');\n        $('#phpcode').html('&lt;?php echo Block::get(\"'+name+'\"); ?&gt;');\n        $('#embedCodes').modal();\n    }\n\n};\n\n\n$(document).ready(function(){\n    $.monstra.blocks.init();\n});"
  },
  {
    "path": "plugins/box/blocks/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Bloky',\n            'Blocks manager' => 'Správce bloků',\n            'Delete' => 'Vymazat',\n            'Edit' => 'Editovat',\n            'Name' => 'Názov',\n            'Create New Block' => 'Vytvořit nový blok',\n            'New Block' => 'Nový blok',\n            'Edit Block' => 'Editovat blok',\n            'Save' => 'Uložit',\n            'Save and Exit' => 'Uložit a ukončit',\n            'Actions' => 'Akce',\n            'Required field' => 'Povinné políčko',\n            'This block already exists' => 'Tento blok již existuje',\n            'This block does not exist' => 'Tento blok neexistuje',\n            'Delete block: :block' => 'Vymazat blok: :block',\n            'Block content' => 'Obsah bloku',\n            'Block <i>:name</i> deleted' => 'Blok <i>:name</i> byl vymazaný',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Vaše změny v bloku <i>:name</i> byly uloženy.',\n            'Delete block: :block' => 'Vymazat blok: :block',\n            'View Embed Code' => 'Zobrazit vložený kód',\n            'Embed Code' => 'Vložený kód',\n            'Shortcode' => 'Zkrácený kód',\n            'PHP Code' => 'PHP kód',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Blöcke',\n            'Blocks manager' => 'Block-Manager',\n            'Delete' => 'Löschen',\n            'Edit' => 'Bearbeiten',\n            'Name' => 'Name',\n            'Create New Block' => 'Erstelle einen neuen Block',\n            'New Block' => 'Neuer Block',\n            'Edit Block' => 'Bearbeite Block',\n            'Save' => 'Speichern',\n            'Save and Exit' => 'Speichern und Schließen',\n            'Actions' => 'Aktionen',\n            'Required field' => 'Erforderliches Feld',\n            'This block already exists' => 'Dieser Block existiert bereits',\n            'This block does not exist' => 'Dieser Block existiert nicht',\n            'Delete block: :block' => 'Lösche Block: :block',\n            'Block content' => 'Block-Inhalt',\n            'Block <i>:name</i> deleted' => 'Block <i>:name</i> gelöscht',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Deine Änderungen für den Block <i>:name</i> wurden gespeichert.',\n            'Delete block: :block' => 'Lösche Block: :block',\n            'View Embed Code' => 'Zeige Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Abbrechen',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Blocks',\n            'Blocks manager' => 'Blocks manager',\n            'Delete' => 'Delete',\n            'Edit' => 'Edit',\n            'Name' => 'Name',\n            'Create New Block' => 'Create New Block',\n            'New Block' => 'New Block',\n            'Edit Block' => 'Edit Block',\n            'Save' => 'Save',\n            'Save and Exit' => 'Save and Exit',\n            'Actions' => 'Actions',\n            'Required field' => 'Required field',\n            'This block already exists' => 'This block already exists',\n            'This block does not exist' => 'This block does not exist',\n            'Delete block: :block' => 'Delete block: :block',\n            'Block content' => 'Block content',\n            'Block <i>:name</i> deleted' => 'Block <i>:name</i> deleted',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Your changes to the block <i>:name</i> have been saved.',\n            'Delete block: :block' => 'Delete block: :block',\n            'View Embed Code' => 'View Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Bloques',\n            'Blocks manager' => 'Administrador de bloques',\n            'Delete' => 'Eliminar',\n            'Edit' => 'Editar',\n            'Name' => 'Nombre',\n            'Create New Block' => 'Crear nuevo bloque',\n            'New Block' => 'Nuevo bloque',\n            'Edit Block' => 'Editar bloque',\n            'Save' => 'Guardar',\n            'Save and Exit' => 'Guardar y salir',\n            'Actions' => 'Acciones',\n            'Required field' => 'Dato requerido',\n            'This block already exists' => 'Este bloque ya existe',\n            'This block does not exist' => 'Este bloque no existe',\n            'Delete block: :block' => 'Eliminar bloque: :block',\n            'Block content' => 'Contenido del bloque',\n            'Block <i>:name</i> deleted' => 'Bloque <i>:name</i> eliminado',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Tus cambios en el bloque <i>:name</i> han sido guardados.',\n            'Delete block: :block' => 'Eliminar bloque: :block',\n            'View Embed Code' => 'Ver código incrustado',\n            'Embed Code' => 'Incrustar código',\n            'Shortcode' => 'Código corto',\n            'PHP Code' => 'Código PHP',\n            'Cancel' => 'Cancelar',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'بلوک',\n            'Blocks manager' => 'مدیریت بلوک',\n            'Delete' => 'حذف',\n            'Edit' => 'ویرایش',\n            'Name' => 'نام',\n            'Create New Block' => 'ایجاد بلوک جدید',\n            'New Block' => 'بلوک جدید',\n            'Edit Block' => 'ویرایش بلوک',\n            'Save' => 'ذخیره',\n            'Save and Exit' => 'ذخیره و خروج',\n            'Actions' => 'عملیات',\n            'Required field' => 'کادر الزامی',\n            'This block already exists' => 'این بلوک در حال حاضر وجود دارد',\n            'This block does not exist' => 'این بلوک وجود ندارد',\n            'Delete block: :block' => 'Delete block: :block',\n            'Block content' => 'حذف بلوک: :block',\n            'Block <i>:name</i> deleted' => 'بلوک <i>:name</i> حذف شد',\n            'Your changes to the block <i>:name</i> have been saved.' => 'تغییرات شما بر روی بلوک <i>:name</i> ذخیره شد.',\n            'Delete block: :block' => 'حذف بلوک: :block',\n            'View Embed Code' => 'نمایش کد درج شده',\n            'Embed Code' => 'کد درج شده', \n            'Shortcode' => 'کدکوتاه',\n            'PHP Code' => 'کد PHP',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Blocs',\n            'Blocks manager' => 'Gestionnaire des blocs',  \n            'Delete' => 'Supprimer',\n            'Edit' => 'Editer',\n            'Name' => 'Nom',\n            'Create new block' => 'Créer un nouveau bloc',\n            'New block' => 'Nouveau bloc',\n            'Edit block' => 'Editer le bloc',        \n            'Save' => 'Enregistrer',        \n            'Save and exit' => 'Enregistrer et sortir',       \n            'Actions' => 'Actions', \n            'Required field' => 'Champ requis',\n            'This block already exists' => 'Ce bloc existe déjà',\n            'This block does not exist' => 'Ce bloc n\\'existe pas',\n            'Delete block: :block' => 'Supprimer le bloc: :block',\n            'Block content' => 'Contenu du bloc',\n            'Block <i>:name</i> deleted' => 'Bloc <i>:name</i> supprimé',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Vos changements pour le bloc <i>:name</i> ont été sauvegardés.',\n            'Delete block: :block' => 'Supprimer le bloc: :block',\n            'View Embed Code' => 'Voir le code intégré',\n            'Embed Code' => 'Code intégré', \n            'Shortcode' => 'Code court',\n            'PHP Code' => 'Code PHP',\n            'Cancel' => 'Cancel',\n        )\n    );"
  },
  {
    "path": "plugins/box/blocks/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Blokkok',\n            'Blocks manager' => 'Blokk-kezelő',\n            'Delete' => 'Törlés',\n            'Edit' => 'Szerkesztés',\n            'Name' => 'Név',\n            'Create New Block' => 'Új blokk készítése',\n            'New Block' => 'Új blokk',\n            'Edit Block' => 'Blokk szerkesztése',\n            'Save' => 'Mentés',\n            'Save and Exit' => 'Mentés és Kilépés',\n            'Actions' => 'Műveletek',\n            'Required field' => 'Kötelező mező',\n            'This block already exists' => 'Ez a blokk már létezik',\n            'This block does not exist' => 'Ez a blokk nem létezik',\n            'Delete block: :block' => 'Blokk törlése: :block',\n            'Block content' => 'Blokk tartalma',\n            'Block <i>:name</i> deleted' => 'A <i>:name</i> blokk törölve',\n            'Your changes to the block <i>:name</i> have been saved.' => 'A <i>:name</i> blokk változtatásai elmentve.',\n            'Delete block: :block' => 'Blokk törlése: :block',\n            'View Embed Code' => 'Beágyazott kód mutatása',\n            'Embed Code' => 'Beágyazott kód',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Block',\n            'Blocks manager' => 'Pengelolaan Block',\n            'Delete' => 'Hapus',\n            'Edit' => 'Perbaiki',\n            'Name' => 'Nama',\n            'Create New Block' => 'Buat Block Baru',\n            'New Block' => 'Block Baru',\n            'Edit Block' => 'Edit Block',\n            'Save' => 'Simpan',\n            'Save and Exit' => 'Simpan dan Keluar',\n            'Actions' => 'Tindakan',\n            'Required field' => 'Isian yang Dibutuhkan',\n            'This block already exists' => 'Block ini sudah ada',\n            'This block does not exist' => 'Block ini belum ada',\n            'Delete block: :block' => 'Hapus Block: :block',\n            'Block content' => 'Isi Block',\n            'Block <i>:name</i> deleted' => 'Block <i>:nama</i> dihapus',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Perubahan pada block <i>:nama</i> telah disimpan.',\n            'Delete block: :block' => 'Hapus Block: :block',\n            'View Embed Code' => 'Lihat Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Blocchi',\n            'Blocks manager' => 'Gestione blocchi',\n            'Delete' => 'Elimina',\n            'Edit' => 'Modifica',\n            'New Block' => 'Nuovo blocco',\n            'Create New Block' => 'Crea nuovo blocco',\n            'Name' => 'Nome',\n            'Edit Block' => 'Modifica blocco',\n            'Save' => 'Salva',\n            'Actions' => 'Azioni',\n            'Save and Exit' => 'Salva ed esci',\n            'Required field' => 'Campo obbligatorio',\n            'This block already exists' => 'Tale blocco già esistente',\n            'This block does not exist' => 'Tale blocco non esiste',\n            'Delete block: :block' => 'Elimina blocco: :block',\n            'Block content' => 'Contenuto del blocco',\n            'Block <i>:name</i> deleted' => 'Snippet <i>:name</i> è stato eliminato',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Le modifiche al blocco: <i>nome</ i> sono state salvate.',\n            'Delete block: :block' => 'Elimina blocco: :block',\n            'View Embed Code' => 'View Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'ブロック',\n            'Blocks manager' => 'ブロックの管理',\n            'Delete' => '削除',\n            'Edit' => '編集',\n            'Name' => '名前',\n            'Create New Block' => '新しいブロックを作成',\n            'New Block' => '新しいブロック',\n            'Edit Block' => 'ブロックを編集',\n            'Save' => '保存',\n            'Save and Exit' => '保存して終了',\n            'Actions' => 'アクション',\n            'Required field' => '必須項目',\n            'This block already exists' => 'このブロックはすでに存在しています',\n            'This block does not exist' => 'このブロックは存在していません',\n            'Delete block: :block' => 'ブロックの削除: :block',\n            'Block content' => 'ブロックの内容',\n            'Block <i>:name</i> deleted' => '<i>:name</i> ブロックが削除されました',\n            'Your changes to the block <i>:name</i> have been saved.' => '<i>:name</i> への変更は保存されました。',\n            'Delete block: :block' => 'ブロックの削除: :block',\n            'View Embed Code' => '埋め込みコードを表示',\n            'Embed Code' => '埋め込みコード',\n            'Shortcode' => 'ショートコード',\n            'PHP Code' => 'PHPコード',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'ბლოკები',\n            'Blocks manager' => 'ბლოკების მენეჯერი',\n            'Delete' => 'წაშლა',\n            'Edit' => 'რედაქტირება',\n            'New Block' => 'ახალი ბლოკი',\n            'Create New Block' => 'ახალი ბლოკის შექმნა',\n            'Name' => 'სახელი',\n            'Edit Block' => 'ბლოკის რედაქტირება',\n            'Save' => 'შენახვა',\n            'Actions' => 'მოქმედება',\n            'Save and Exit' => 'შენახვა და შემდეგ გამოსვლა',\n            'Required field' => 'აუცილებელი ველი',\n            'This block already exists' => 'ასეთი ბლოკი უკვე არსებობს',\n            'This block does not exist' => 'ასეთი ბლოკი არ არსებობს',\n            'Delete block: :block' => 'ბლოკის წაშლა: :block',\n            'Block content' => 'ბლოკის შემადგენლობა',\n            'Block <i>:name</i> deleted' => 'ბლოკი <i>:name</i> წაშლილია',\n            'Your changes to the block <i>:name</i> have been saved.' => 'თქვენი ცვლილებები ბლოკში <i>:name</i> დამახსოვრებულია.',\n            'Delete block: :block' => 'ბლოკის წაშლა: :block',\n            'View Embed Code' => 'ჩასაწერი კოდი',\n            'Embed Code' => 'ჩასაწერი კოდი',\n            'Shortcode' => 'Shortcode-ი',\n            'PHP Code' => 'PHP კოდი',\n            'Cancel' => 'გაუქმება',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Blokai',\n            'Blocks manager' => 'Blokų tvarkyklė',\n            'Delete' => 'Ištrinti',\n            'Edit' => 'Redaguoti',\n            'Name' => 'Pavadinimas',\n            'Create New Block' => 'Sukurti naują bloką',\n            'New Block' => 'Naujas blokas',\n            'Edit Block' => 'Redaguoti bloką',\n            'Save' => 'Išsaugoti',\n            'Save and Exit' => 'Išsaugoti ir išeiti',\n            'Actions' => 'Veiksmai',\n            'Required field' => 'Privalomas laukas',\n            'This block already exists' => 'Toks blokas jau yra',\n            'This block does not exist' => 'Tokio bloko nėra',\n            'Delete block: :block' => 'Ištrinti: :block',\n            'Block content' => 'Bloko turinys',\n            'Block <i>:name</i> deleted' => 'Blokas <i>:name</i> ištrintas',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Bloko <i>:name</i> pakeitimai išsaugoti.',\n            'Delete block: :block' => 'Delete block: :block',\n            'View Embed Code' => 'View Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Blokken',\n            'Blocks manager' => 'Blokken beheer',\n            'Delete' => 'Verwijderen',\n            'Edit' => 'Bewerken',\n            'Name' => 'Naam',\n            'Create New Block' => 'Nieuw blok',\n            'New Block' => 'Nieuw blok',\n            'Edit Block' => 'Bewerk blok',\n            'Save' => 'Opslaan',\n            'Save and Exit' => 'Opslaan en Terug',\n            'Actions' => 'Acties',\n            'Required field' => 'Vereist veld',\n            'This block already exists' => 'Dit blok bestaat al',\n            'This block does not exist' => 'Dit blok bestaat niet',\n            'Delete block: :block' => 'Verwijder blok: :block',\n            'Block content' => 'Inhoud blok',\n            'Block <i>:name</i> deleted' => 'Blok <i>:name</i> verwijderd',\n            'Your changes to the block <i>:name</i> have been saved.' => 'De aanpassingen aan blok <i>:name</i> zijn opgeslagen.',\n            'Delete block: :block' => 'Verwijder blok: :block',\n            'View Embed Code' => 'Bekijk insluitcode',\n            'Embed Code' => 'Insluitcode',\n            'Shortcode' => 'Verkorte code',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Bloki',\n            'Blocks manager' => 'Zarządzaj blokami',\n            'Delete' => 'Usuń',\n            'Edit' => 'Edytuj',\n            'Name' => 'Nazwa',\n            'Create New Block' => 'Utwórz nowy blok',\n            'New Block' => 'Nowy blok',\n            'Edit Block' => 'Edytuj blok',\n            'Save' => 'Zapisz',\n            'Save and Exit' => 'Zapisz i wyjdź',\n            'Actions' => 'Akcje',\n            'Required field' => 'Pole wymagane',\n            'This block already exists' => 'Ten blok już istnieje',\n            'This block does not exist' => 'Ten blok nie istnieje',\n            'Delete block: :block' => 'Czy napewno usunąć blok: :block',\n            'Block content' => 'Zawartość bloku',\n            'Block <i>:name</i> deleted' => 'Blok <i>:name</i> został usunięty',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Twoje zmiany dla bloku <i>:name</i> zostały zapisane.',\n            'Delete block: :block' => 'Czy napewno usunąć blok: :block',\n            'View Embed Code' => 'Pokaż osadzony kod',\n            'Embed Code' => 'Osadzony kod',\n            'Shortcode' => 'Krótki kod (shortcode)',\n            'PHP Code' => 'Kod PHP',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Blocos',\n            'Blocks manager' => 'Gerenciador de blocos',\n            'Delete' => 'Deletar',\n            'Edit' => 'Editar',\n            'Name' => 'Nome',\n            'Create New Block' => 'Criar novo bloco',\n            'New Block' => 'Novo bloco',\n            'Edit Block' => 'Editar bloco',\n            'Save' => 'Salvar',\n            'Save and Exit' => 'Salvar e sair',\n            'Actions' => 'Ações',\n            'Required field' => 'Campo requerido',\n            'This block already exists' => 'Este bloco já existe',\n            'This block does not exist' => 'Este bloco não existe',\n            'Delete block: :block' => 'Deletar o bloco: :block',\n            'Block content' => 'Conteúdo do bloco',\n            'Block <i>:name</i> deleted' => 'Bloco <i>:name</i> deletado',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Suas mudanças no bloco <i>:name</i> foram salvas',\n            'Delete block: :block' => 'Delete block: :block',\n            'View Embed Code' => 'View Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Блоки',\n            'Blocks manager' => 'Менеджер блоков',\n            'Delete' => 'Удалить',\n            'Edit' => 'Редактировать',\n            'New Block' => 'Новый блок',\n            'Create New Block' => 'Создать новый блок',\n            'Name' => 'Название',\n            'Edit Block' => 'Редактирование блока',\n            'Save' => 'Сохранить',\n            'Actions' => 'Действия',\n            'Save and Exit' => 'Сохранить и выйти',\n            'Required field' => 'Обязательное поле',\n            'This block already exists' => 'Такой блок уже существует',\n            'This block does not exist' => 'Такого блока не существует',\n            'Delete block: :block' => 'Удалить блок: :block',\n            'Block content' => 'Содержимое блока',\n            'Block <i>:name</i> deleted' => 'Блок <i>:name</i> удален',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Ваши изменения к блоку <i>:name</i> были сохранены.',\n            'Delete block: :block' => 'Удалить блок: :block',\n            'View Embed Code' => 'Код для вставки',\n            'Embed Code' => 'Код для вставки',\n            'Shortcode' => 'Шорткод',\n            'PHP Code' => 'PHP код',\n            'Cancel' => 'Отмена',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Bloky',\n            'Blocks manager' => 'Manažér blokov',\n            'Delete' => 'Vymazať',\n            'Edit' => 'Editovať',\n            'Name' => 'Názov',\n            'Create New Block' => 'Vytvoriť nový blok',\n            'New Block' => 'Nový blok',\n            'Edit Block' => 'Editovať blok',\n            'Save' => 'Uložiť',\n            'Save and Exit' => 'Uložiť a ukončiť',\n            'Actions' => 'Akcie',\n            'Required field' => 'Povinné políčko',\n            'This block already exists' => 'Tento blok už existuje',\n            'This block does not exist' => 'Tento blok neexistuje',\n            'Delete block: :block' => 'Vymazať blok: :block',\n            'Block content' => 'Obsah bloku',\n            'Block <i>:name</i> deleted' => 'Blok <i>:name</i> bol vymazaný',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Vaše zmeny v bloku <i>:name</i> boli uložené.',\n            'Delete block: :block' => 'Vymazať blok: :block',\n            'View Embed Code' => 'Pozrieť vložený kód',\n            'Embed Code' => 'Vložený kód',\n            'Shortcode' => 'Skrátený kód',\n            'PHP Code' => 'PHP kód',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Blokovi',\n            'Blocks manager' => 'Menadžer blokova',  \n            'Delete' => 'Obriši',\n            'Edit' => 'Izmeni',\n            'Name' => 'Ime',\n            'Create new block' => 'Kreiraj novi blok',\n            'New block' => 'Novi blok',\n            'Edit block' => 'Izmeni blok',        \n            'Save' => 'Sačuvaj',        \n            'Save and exit' => 'Sačuvaj i izađi',       \n            'Actions' => 'Akcije', \n            'Required field' => 'Potrebno polje',\n            'This block already exists' => 'Ovaj Blok već postoji',\n            'This block does not exist' => 'Ovaj blok ne postoji',\n            'Delete block: :block' => 'Obriši blok: :block',\n            'Block content' => 'Sadržaj bloka',\n            'Block <i>:name</i> deleted' => 'Blok <i>:name</i> je obrisan',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Tvoje promene na bloku <i>:name</i> su sačuvane.',\n            'Delete block: :block' => 'Obriši blok: :block',\n            'View Embed Code' => 'Vidi embed kod',\n            'Embed Code' => 'Embed Kod', \n            'Shortcode' => 'Kratak kod',\n            'PHP Code' => 'PHP kod',\n            'Cancel' => 'Otkaži',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Bloklar',\n            'Blocks manager' => 'Blok yöneticisi',\n            'Delete' => 'Sil',\n            'Edit' => 'Düzenle',\n            'Name' => 'Ad',\n            'Create New Block' => 'Yeni Blok Oluştur',\n            'New Block' => 'Yeni Blok',\n            'Edit Block' => 'Bloğu Düzenle',\n            'Save' => 'Kaydet',\n            'Save and Exit' => 'Kaydet ve Çık',\n            'Actions' => 'İşlemler',\n            'Required field' => 'Zorunlu alan',\n            'This block already exists' => 'Bu blok zaten var.',\n            'This block does not exist' => 'Blok bulunamadı.',\n            'Delete block: :block' => ':block adlı blok silinsin mi',\n            'Block content' => 'Blok içeriği',\n            'Block <i>:name</i> deleted' => '<i>:name</i> adlı blok silindi.',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Değişiklikler <i>:name</i> bloğuna kaydedildi.',\n            'Delete block: :block' => ':block adlı blok silinsin mi',\n            'View Embed Code' => 'Gömülür Kodu Görüntüle',\n            'Embed Code' => 'Gömülür Kodu',\n            'Shortcode' => 'Kısa Kod',\n            'PHP Code' => 'PHP Kodu',\n            'Cancel' => 'Vazgeç',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => 'Блоки',\n            'Blocks manager' => 'Менеджер блоків',\n            'Delete' => 'Видалити',\n            'Edit' => 'Редагувати',\n            'New Block' => 'Новий блок',\n            'Create New Block' => 'Створити новий блок',\n            'Name' => 'Назва',\n            'Edit Block' => 'Редагувати блок',\n            'Save' => 'Зберегти',\n            'Actions' => 'Дії',\n            'Save and Exit' => 'Зберегти та вийти',\n            'Required field' => 'Обов&prime;язкове поле',\n            'This block already exists' => 'Такий блок вже існує',\n            'This block does not exist' => 'Такий блок не існує',\n            'Delete block: :block' => 'Видалити блок: :block',\n            'Block content' => 'Вміст блоку',\n            'Block <i>:name</i> deleted' => 'Сніпет <i>:name</i> вилучено',\n            'Your changes to the block <i>:name</i> have been saved.' => 'Ваші зміни до блоку <i>:name</i> були збережені.',\n            'Delete block: :block' => 'Видалити блок: :block',\n            'View Embed Code' => 'Код для вставки',\n            'Embed Code' => 'Код для вставки',\n            'Shortcode' => 'Шорткод',\n            'PHP Code' => 'PHP код',\n            'Cancel' => 'Відмінити',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'blocks' => array(\n            'Blocks' => '版块',\n            'Blocks manager' => '版块管理',\n            'Delete' => '删除',\n            'Edit' => '编辑',\n            'Name' => '名称',\n            'Create New Block' => '创建新版块',\n            'New Block' => '新版块',\n            'Edit Block' => '编辑版块',\n            'Save' => '保存',\n            'Save and Exit' => '保存并退出',\n            'Actions' => '操作',\n            'Required field' => '必填字段',\n            'This block already exists' => '此版块已存在',\n            'This block does not exist' => '此版块不存在',\n            'Delete block: :block' => '删除版块: :block',\n            'Block content' => '版块内容',\n            'Block <i>:name</i> deleted' => '版块 <i>:name</i> 已删除',\n            'Your changes to the block <i>:name</i> have been saved.' => '您修改的版块 <i>:name</i> 已保存。',\n            'Delete block: :block' => '删除版块: :block',\n            'View Embed Code' => '查看嵌入代码',\n            'Embed Code' => '嵌入代码',\n            'Shortcode' => '短代码',\n            'PHP Code' => 'PHP 代码',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/blocks/views/backend/add.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('New Block', 'blocks'); ?></h2>\n\n<?php if (isset($errors['blocks_empty_name']) or isset($errors['blocks_exists'])) $error_class = 'error'; else $error_class = ''; ?>\n\n<?php echo (Form::open()); ?>\n\n<?php echo (Form::hidden('csrf', Security::token())); ?>\n\n<div class=\"form-group margin-bottom-1\">\n  <?php echo (Form::label('name', __('Name', 'blocks'))); ?>\n  <?php echo (Form::input('name', $name, array('class' => (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'form-control error-field' : 'form-control'))); ?>\n  <?php\n      if (isset($errors['blocks_empty_name'])) echo '<span class=\"error-message\">'.$errors['blocks_empty_name'].'</span>';\n      if (isset($errors['blocks_exists'])) echo '<span class=\"error-message\">'.$errors['blocks_exists'].'</span>';\n  ?>\n</div>\n\n<div class=\"row margin-bottom-1\">\n    <div class=\"col-xs-12\">\n        <?php Action::run('admin_editor', array(Html::toText($content))); ?>\n    </div>\n</div>\n\n<?php\n    echo (\n       Form::submit('add_blocks_and_exit', __('Save and Exit', 'blocks'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n       Form::submit('add_blocks', __('Save', 'blocks'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n       Html::anchor(__('Cancel', 'blocks'), 'index.php?id=blocks', array('title' => __('Cancel', 'blocks'), 'class' => 'btn btn-phone btn-default')).\n       Form::close()\n    );\n?>\n"
  },
  {
    "path": "plugins/box/blocks/views/backend/edit.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('Edit Block', 'blocks'); ?></h2>\n\n<?php\n    if ($content !== null) {\n\n        if (isset($errors['blocks_empty_name']) or isset($errors['blocks_exists'])) $error_class = 'error'; else $error_class = '';\n\n        echo (Form::open());\n        echo (Form::hidden('csrf', Security::token()));\n        echo (Form::hidden('blocks_old_name', Request::get('filename')));\n\n?>\n\n        <div class=\"form-group margin-bottom-1\">\n        <?php echo (Form::label('name', __('Name', 'blocks'))); ?>\n        <?php echo (Form::input('name', $name, array('class' => (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'form-control error-field' : 'form-control'))); ?>\n        <?php\n            if (isset($errors['blocks_empty_name'])) echo '<span class=\"error-message\">'.$errors['blocks_empty_name'].'</span>';\n            if (isset($errors['blocks_exists'])) echo '<span class=\"error-message\">'.$errors['blocks_exists'].'</span>';\n        ?>\n        </div>\n\n\n<div class=\"row margin-bottom-1\">\n    <div class=\"col-xs-12\">\n        <?php Action::run('admin_editor', array(Html::toText($content))); ?>\n    </div>\n</div>\n\n<?php      \n        echo (\n           Form::submit('edit_blocks_and_exit', __('Save and Exit', 'blocks'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n           Form::submit('edit_blocks', __('Save', 'blocks'), array('class' => 'btn btn-phone btn-primary')). Html::nbsp(2).\n           Html::anchor(__('Cancel', 'blocks'), 'index.php?id=blocks', array('title' => __('Cancel', 'blocks'), 'class' => 'btn btn-phone btn-default')).\n           Form::close()\n        );\n\n    } else {\n        echo '<div class=\"message-error\">'.__('This block does not exist', 'blocks').'</div>';\n    }\n?>\n"
  },
  {
    "path": "plugins/box/blocks/views/backend/index.view.php",
    "content": "<div class=\"vertical-align margin-bottom-1\">\n    <div class=\"text-left row-phone\">\n        <h2><?php echo __('Blocks', 'blocks'); ?></h2>\n    </div>\n    <div class=\"text-right row-phone\">\n        <?php\n            echo (\n                Html::anchor(__('Create New Block', 'blocks'), 'index.php?id=blocks&action=add_block', array('title' => __('Create New Block', 'blocks'), 'class' => 'btn btn-phone btn-primary'))\n            );\n        ?>\n    </div>\n</div>\n\n<!-- Blocks_list -->\n<table class=\"table table-bordered\">\n    <thead>\n        <tr>\n            <th><?php echo __('Blocks', 'blocks'); ?></th>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n    <?php if (count($blocks_list) != 0) foreach ($blocks_list as $block) { ?>\n    <tr>\n        <td><?php echo basename($block, '.block.html'); ?></td>\n        <td>\n            <div class=\"pull-right\">            \n                <div class=\"btn-group\">\n                    <?php echo Html::anchor(__('Edit', 'blocks'), 'index.php?id=blocks&action=edit_block&filename='.basename($block, '.block.html'), array('class' => 'btn btn-primary')); ?>\n                    <button type=\"button\" class=\"btn dropdown-toggle btn-primary\" data-toggle=\"dropdown\">\n                        <span class=\"caret\"></span>\n                        <span class=\"sr-only\">Toggle Dropdown</span>\n                    </button>\n                    <ul class=\"dropdown-menu\" role=\"menu\">\n                        <li><?php echo Html::anchor(__('View Embed Code', 'blocks'), 'javascript:;', array('title' => __('View Embed Code', 'blocks'), 'onclick' => '$.monstra.blocks.showEmbedCodes(\"'.basename($block, '.block.html').'\");')); ?></li>\n                    </ul>\n                </div>\n                <?php echo Html::anchor(__('Delete', 'blocks'),\n                          'index.php?id=blocks&action=delete_block&filename='.basename($block, '.block.html').'&token='.Security::token(),\n                           array('class' => 'btn btn-danger', 'onclick' => \"return confirmDelete('\".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html'))).\"')\"));\n                ?>            \n            </div>\n        </td>\n    </tr>\n    <?php } ?>\n    </tbody>\n</table>\n<!-- /Blocks_list -->\n\n<div class=\"modal fade\" id=\"embedCodes\"> \n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <div class=\"close\" data-dismiss=\"modal\">&times;</div>\n                <h4 class=\"modal-title\"><?php echo __('Embed Code', 'snippets'); ?></h4>\n            </div>\n            <div class=\"modal-body\">\n                <b><?php echo __('Shortcode', 'snippets'); ?></b><br>\n                <pre><code id=\"shortcode\"></code></pre>\n                <br>\n                <b><?php echo __('PHP Code', 'snippets'); ?></b><br>\n                <pre><code id=\"phpcode\"></code></pre>\n            </div>\n        </div>\n    </div>\n</div>"
  },
  {
    "path": "plugins/box/dashboard/dashboard.admin.php",
    "content": "<?php\n\n// Add Plugin Javascript\nStylesheet::add('public/assets/css/daterangepicker-bs3.css', 'backend', 11);\nJavascript::add('public/assets/js/moment.min.js', 'backend', 11);\nJavascript::add('public/assets/js/daterangepicker.js', 'backend', 12);\nJavascript::add('plugins/box/dashboard/js/ganalytics.js', 'backend', 13);\n\n/**\n * Dashboard admin class\n */\nclass DashboardAdmin extends Backend\n{\n    /**\n     * Main Dashboard admin function\n     */\n    public static function main()\n    {\n\n        // set/update google analytics settings\n\t\tif (Request::post('ga_settings_update')) {\n\t\t\n\t\t    if (Security::check(Request::post('csrf'))) {\n\t\t        \n\t\t        // client id\n\t\t        $ga_client_id = trim(Request::post('ga_client_id'));\n\t\t        if (!empty($ga_client_id)) {\n\t\t            $opt_client_id = Option::get('ga_client_id');\n\t\t            if (empty($opt_client_id)) {\n\t\t                Option::add('ga_client_id', $ga_client_id);\n\t\t            } else {\n\t\t                Option::update('ga_client_id', $ga_client_id);\n\t\t            }\n\t\t        }\n\t\t        \n\t\t        // API key\n\t\t        $ga_api_key = trim(Request::post('ga_api_key'));\n\t\t        if (!empty($ga_api_key)) {\n\t\t            $opt_api_key = Option::get('ga_api_key');\n\t\t            if (empty($opt_api_key)) {\n\t\t                Option::add('ga_api_key', $ga_api_key);\n\t\t            } else {\n\t\t                Option::update('ga_api_key', $ga_api_key);\n\t\t            }\n\t\t        }\n\t\t        \n\t\t        // view id\n\t\t        $ga_view_id = trim(Request::post('ga_view_id'));\n\t\t        if (!empty($ga_view_id)) {\n\t\t            $opt_view_id = Option::get('ga_view_id');\n\t\t            if (empty($opt_view_id)) {\n\t\t                Option::add('ga_view_id', $ga_view_id);\n\t\t            } else {\n\t\t                Option::update('ga_view_id', $ga_view_id);\n\t\t            }\n\t\t        }\n\t\t        \n\t\t        // tracking id\n\t\t        $ga_tracking_id = trim(Request::post('ga_tracking_id'));\n\t\t        if (!empty($ga_tracking_id)) {\n\t\t            $opt_view_id = Option::get('ga_tracking_id');\n\t\t            if (empty($opt_view_id)) {\n\t\t                Option::add('ga_tracking_id', $ga_tracking_id);\n\t\t            } else {\n\t\t                Option::update('ga_tracking_id', $ga_tracking_id);\n\t\t            }\n\t\t        }\n\t\t    }\n\t\t        \n\t\t}\n\t\t\n        // Display view\n        View::factory('box/dashboard/views/backend/index')->display();\n    }\n\n}\n\n\n/**\n * Dashboard\n */\nclass Dashboard \n{\n\n    /**\n     * Items\n     *\n     * @var array\n     */\n    public static $items = array();\n\n\n    /**\n     * \n     */\n\tpublic static function addNewItem($id, $title, $url, $priority = 1)\n\t{\n        Dashboard::$items[] = array(\n            'id'       => (string) $id,\n            'title'    => (string) $title,\n            'url'      => (string) $url,\n            'priority' => (int) $priority,\n        );\n\t}\n\n\n\t/**\n\t * \n\t */\n\tpublic static function drawItems() \n\t{\n\t\t// Sort items by priority\n        $items = Arr::subvalSort(Dashboard::$items, 'priority');\n\n\t\tforeach ($items as $item) {\n\t\t\techo '<li>';\n\t\t\techo Html::anchor($item['title'], $item['url'], array('title' => $item['title']));\n\t\t\techo '</li>';\n\t\t}\n\t}\n\n}"
  },
  {
    "path": "plugins/box/dashboard/dashboard.plugin.php",
    "content": "<?php\n\n/**\n *  Dashboard plugin\n *\n *  @package Monstra\n *  @subpackage Plugins\n *  @author Romanenko Sergey / Awilum\n *  @copyright 2012-2014 Romanenko Sergey / Awilum\n *  @version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Dashboard', 'dashboard'),\n                __('Dashboard plugin for Monstra', 'dashboard'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\n\n// Load Sandbox Admin for Editor and Admin\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {\n\n    Plugin::admin('dashboard', 'box');\n\n}"
  },
  {
    "path": "plugins/box/dashboard/install/dashboard.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/dashboard/dashboard.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>15</plugin_priority>\n    <plugin_name>Dashboard</plugin_name>\n    <plugin_description>Dashboard plugin for Monstra</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>"
  },
  {
    "path": "plugins/box/dashboard/js/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/box/dashboard/js/ganalytics.js",
    "content": "if (typeof $.monstra == 'undefined') $.monstra = {};\n\nfunction glibOnloadHandle(){$.monstra.ganalytics.libOnloadHandle();}\n\n$.monstra.ganalytics = {\n\n    conf: {\n        clientId: '',\n        apiKey: '',\n        viewId: '',\n        authScopes: 'https://www.googleapis.com/auth/analytics.readonly'\n    },\n\n    _gaAreas: '#authOk,#authFail,#gaSettings,#gaLoading,#reauthError,#gaHelpLink',\n    _startDate: moment().subtract('days', 29),\n    _endDate: moment(),\n    \n    init: function(data){\n        $.extend(this.conf, data);\n        $('.gaSettingsLink').click(function(){\n            $.monstra.ganalytics.show('#gaSettings,#gaHelpLink');\n\t\t\t$('.gaSettingsLink').hide();\n        });\n    },\n    \n    initDateRangePicker: function(){\n        $('#reportRange').daterangepicker({\n              ranges: {\n                 'Today': [moment(), moment()],\n                 'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],\n                 'Last 7 Days': [moment().subtract('days', 6), moment()],\n                 'Last 30 Days': [moment().subtract('days', 29), moment()],\n                 'This Month': [moment().startOf('month'), moment().endOf('month')],\n                 'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]\n              },\n              startDate: $.monstra.ganalytics._startDate,\n              endDate: $.monstra.ganalytics._endDate\n            },function(start, end) {\n                $.monstra.ganalytics.getAnalyticsInfo(start._d, end._d);\n            }\n        );\n        $.monstra.ganalytics.getAnalyticsInfo($.monstra.ganalytics._startDate._d, $.monstra.ganalytics._endDate._d);\n    },\n    \n    libOnloadHandle: function(){\n        if ($.monstra.ganalytics.conf.clientId == '' \n            || $.monstra.ganalytics.conf.apiKey == '' \n            || $.monstra.ganalytics.conf.viewId == ''\n        ) {\n            $.monstra.ganalytics.show('#gaSettings,#gaHelpLink');\n\t\t\t$('.gaSettingsLink').hide();\n            return false;\n        }\n        gapi.client.setApiKey(this.conf.apiKey);\n        window.setTimeout(function(){\n            $.monstra.ganalytics.checkAuth(true);\n        },1);\n    },\n\n    checkAuth: function(immediate){\n        gapi.auth.authorize({\n            client_id: $.monstra.ganalytics.conf.clientId,\n            scope: $.monstra.ganalytics.conf.authScopes,\n            immediate: immediate\n        }, $.monstra.ganalytics.handleAuthResult);\n        return immediate;\n    },\n\n    handleAuthResult: function(authResult){\n        if (authResult && !authResult.error) {\n            $.monstra.ganalytics.show('#authOk');\n            $.monstra.ganalytics.initDateRangePicker();\n        } else {\n            $.monstra.ganalytics.show('#authFail');\n            if (authResult && typeof authResult.error != 'undefined') {\n                $.monstra.ganalytics.showError(authResult.error.message);\n            }\n            \n            $('#authorizeButton').on('click', function(e){\n                $.monstra.ganalytics.checkAuth(false);\n            });\n        }\n    },\n\n    getAnalyticsInfo: function(startDate, endDate) {\n        gapi.client.load('analytics', 'v3', function(){\n            gapi.client.analytics.data.ga.get({\n                'ids': 'ga:'+ $.monstra.ganalytics.conf.viewId,\n                'start-date': $.monstra.ganalytics.formatDate(startDate),\n                'end-date': $.monstra.ganalytics.formatDate(endDate),\n                'metrics': 'ga:visits,ga:pageviews,ga:visitors',\n                'dimensions': 'ga:date'\n            }).execute($.monstra.ganalytics.gaReportingResults);\n        });\n    },\n\n    gaReportingResults: function(res){\n        if (typeof res.error != 'undefined' && typeof res.error.message != 'undefined') {\n            $.monstra.ganalytics.showError(res.error.message, res.error.code);\n            return;\n        }\n        \n        // build chart data\n        var dataArr = [['Date', 'Visits']];\n        for (r in res.rows) {\n            var tmpr = [];\n            for (h in res.columnHeaders) {\n                if (res.columnHeaders[h].name == 'ga:visits') {\n                    tmpr[1] = parseInt(res.rows[r][h]);\n                } else if (res.columnHeaders[h].name == 'ga:date') {\n                    var parsed = res.rows[r][h].match(/([0-9]{4})([0-9]{2})([0-9]{2})/)\n                    tmpr[0] = parsed[1] +'-'+ parsed[2] +'-'+ parsed[3];\n                }\n                \n                if (res.rows.length == (parseInt(r)+1)) {\n                    switch(res.columnHeaders[h].name) {\n                        case 'ga:visits': $.monstra.ganalytics.setVisits(res.rows[r][h]); break;\n                        case 'ga:pageviews': $.monstra.ganalytics.setPageviews(res.rows[r][h]); break;\n                        case 'ga:visitors': $.monstra.ganalytics.setVisitors(res.rows[r][h]); break;\n                    }\n                }\n            }\n            dataArr.push(tmpr);\n        }\n        \n        var data = google.visualization.arrayToDataTable(dataArr);\n\n        var options = {\n          title: 'Visits',\n          hAxis: {title: 'Date',  titleTextStyle: {color: '#333'}},\n          vAxis: {minValue: 0}\n        };\n\n        var chart = new google.visualization.AreaChart(document.getElementById('gaChart'));\n        chart.draw(data, options);\n        \n    },\n\n    formatDate: function(dateObj){\n        var m = dateObj.getMonth()+1;\n        var d = dateObj.getDate();\n        m = m > 9 ? m : '0'+m;\n        d = d > 9 ? d : '0'+d;\n        return dateObj.getFullYear() +'-'+ m +'-'+ d;\n    },\n\n    show: function(selector){\n\t\t$('.gaSettingsLink').show();\n        $('#gaAlerts').html('');\n        $($.monstra.ganalytics._gaAreas).addClass('hide');\n        $(selector).removeClass('hide').show();\n    },\n\n    showError: function(msg, errCode){\n\t\tif (typeof errCode !== 'undefined' && errCode == 403) {\n\t\t\t$.monstra.ganalytics.show('#reauthError,#gaHelpLink');\n\t\t} else {\n\t\t\t$.monstra.ganalytics.show('#gaHelpLink');\n\t\t}\n        $('#gaAlerts').html(msg);\n\t\t$('#authOk').addClass('hide');\n    },\n    \n    setVisits: function(val){\n        $('#gaVisits').html(val);\n    },\n    \n    setVisitors: function(val){\n        $('#gaVisitors').html(val);\n    },\n    \n    setPageviews: function(val){\n        $('#gaPageviews').html(val);\n    }\n};\n\n$(document).ready(function(){\n    $val_gaInitData = $('#gaInitData').val();\n    if ($val_gaInitData !== undefined) {\n        $.monstra.ganalytics.init($.parseJSON($val_gaInitData));\n    }\n});\n\n"
  },
  {
    "path": "plugins/box/dashboard/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'dashboard' => array(\n            'Dashboard' => 'Dashboard',\n            'Dashboard plugin for Monstra' => 'Dashboard plugin pro Monstra',\n            'Welcome back' => 'Vítejte zpět',\n            'Create New' => 'Vytvořit nový',\n            'Upload File' => 'Nahrát soubor',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/dashboard/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'dashboard' => array(\n            'Dashboard' => 'Dashboard',\n            'Dashboard plugin for Monstra' => 'Dashboard plugin für Monstra',\n            'Welcome back' => 'Willkommen zurück',\n            'Create New' => 'Erstelle neue',\n            'Upload File' => 'Datei hochladen',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/dashboard/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'dashboard' => array(\n            'Dashboard' => 'Dashboard',\n            'Dashboard plugin for Monstra' => 'Dashboard plugin for Monstra',\n            'Welcome back' => 'Welcome back',\n            'Create New' => 'Create New',\n            'Upload File' => 'Upload File',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/dashboard/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'dashboard' => array(\n            'Dashboard' => 'Escritorio',\n            'Dashboard plugin for Monstra' => 'Dashboard plugin for Monstra',\n            'Welcome back' => 'Bienvenido nuevamente',\n            'Create New' => 'Crear nuevo',\n            'Upload File' => 'Subir archivo',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/dashboard/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'dashboard' => array(\n            'Dashboard' => 'პანელი',\n            'Dashboard plugin for Monstra' => 'პანელი Monstra-თვის',\n            'Welcome back' => 'მოგესალმებით',\n            'Create New' => 'დამატება',\n            'Upload File' => 'ფაილის ატვირთვა',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/dashboard/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'dashboard' => array(\n            'Dashboard' => 'Kokpit',\n            'Dashboard plugin for Monstra' => 'Wtyczka kokpitu dla systemu Monstra',\n            'Welcome back' => 'Witam ponownie',\n            'Create New' => 'Utwórz nowy',\n            'Upload File' => 'Prześlij plik',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/dashboard/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'dashboard' => array(\n            'Dashboard' => 'Панель',\n            'Dashboard plugin for Monstra' => 'Панель для Monstra',\n            'Welcome back' => 'Добро пожаловать',\n            'Create New' => 'Добавить',\n            'Upload File' => 'Загрузить Файл',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/dashboard/languages/sr.lang.php",
    "content": "<?php\n    return array(\n        'dashboard' => array(\n            'Dashboard' => 'Komandna tabla',\n            'Dashboard plugin for Monstra' => 'Komandna tabla dodatak za Monstra',\n            'Welcome back' => 'Dobrodošli natrag',\n            'Create New' => 'Kreiraj novo',\n            'Upload File' => 'Otpremi fajl',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/dashboard/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'dashboard' => array(\n            'Dashboard' => 'Pano',\n            'Dashboard plugin for Monstra' => 'Monstra için pano eklentisi',\n            'Welcome back' => 'Merhaba',\n            'Create New' => 'Yeni Oluştur',\n            'Upload File' => 'Dosya Yükle',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/dashboard/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'dashboard' => array(\n            'Dashboard' => 'Панель',\n            'Dashboard plugin for Monstra' => 'Панель для Monstra',\n            'Welcome back' => 'Ласкаво просимо',\n            'Create New' => 'Додати',\n            'Upload File' => 'Завантажити файл',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/dashboard/views/backend/ga.view.php",
    "content": "\n<script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"></script>\n<script type=\"text/javascript\">\n    google.load(\"visualization\", \"1\", {packages:[\"corechart\"]});\n</script>\n<input type=\"hidden\" id=\"gaInitData\" value='<?php echo json_encode(array(\n    'clientId'  => Option::get('ga_client_id'),\n    'apiKey'    => Option::get('ga_api_key'),\n    'viewId'    => Option::get('ga_view_id')\n)); ?>' />\n<script src=\"https://apis.google.com/js/client.js?onload=glibOnloadHandle\"></script>\n\n<div class=\"well dashboard-well\">\n\t<div class=\"row\">\n        <div class=\"col-md-10\"><h4><?php echo __('Goggle Analytics', 'system'); ?></h4></div>\n        <div class=\"col-md-2\"><a href=\"#\" class=\"gaSettingsLink\"><?php echo __('Settings', 'system'); ?></a></div>\n    </div>\n\t<div class=\"row\">\n\t\t<div class=\"col-md-12\">\n\n\t\t\t<div class=\"row alert-warning\"><div class=\"col-md-12\" id=\"gaAlerts\"></div></div>\n\n\t\t\t<div class=\"row\" id=\"gaLoading\">\n\t\t\t\t<div class=\"col-md-12\">Loading...</div>\n\t\t\t</div>\n\n\t\t\t<div id=\"authOk\" class=\"row hide\">\n\t\t\t    <div class=\"col-md-9\">\n\t\t\t        \n\t\t\t        <div class=\"row\">\n\t\t\t            <div class=\"col-md-12\">\n\t\t\t                <div id=\"reportRange\" class=\"pull-right\">\n                                <span class=\"glyphicon glyphicon-calendar\"><?php echo date(\"F j, Y\", strtotime('-30 day')); ?> - <?php echo date(\"F j, Y\"); ?></span> <b class=\"caret\"></b>\n                            </div>\n                        </div>\n\t\t\t        </div>\n\t\t\t        \n\t\t\t        <div class=\"row\">\n\t\t\t            <div class=\"col-md-12\">\n\t\t\t                <div id=\"gaChart\" style=\"height:350px;\"></div>\n\t\t                </div>\n\t                </div>\n\t\t\t    </div>\n\t\t\t    <div class=\"col-md-3\">\n\t\t\t        <div><h3>Today</h3></div>\n\t\t\t            <div>Visits:<span id=\"gaVisits\"></span></div>\n\t\t\t            <div>Visitors:<span id=\"gaVisitors\"></span></div>\n\t\t\t            <div>Pageviews:<span id=\"gaPageviews\"></span></div>\n\t\t\t    </div>\n\t\t\t</div>\n\n\t\t\t<div id=\"authFail\" class=\"row hide\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<button class=\"btn btn-default\" id=\"authorizeButton\"><?php echo __('Authorize', 'system'); ?></button>\n\t\t\t\t</div>\n\t\t\t</div>\n\n            <div id=\"reauthError\" class=\"row hide\">\n                <div class=\"col-md-12\">\n                    <?php echo __('Please check your analytics settings then exit from google account and authorize with right google analytics account.', 'system'); ?>\n                </div>\n            </div>\n\n\t\t\t<div id=\"gaSettings\" class=\"row hide\">\n\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t<form method=\"POST\">\n\t\t\t\t\t\t<?php echo Form::hidden('csrf', Security::token()); ?>\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t<label><?php echo __('Client ID', 'system'); ?></label><input name=\"ga_client_id\" class=\"form-control\" value=\"<?php echo Option::get('ga_client_id'); ?>\">\n\t\t\t\t\t\t</div>\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"form-group\">\t\n\t\t\t\t\t\t\t<label><?php echo __('API key', 'system'); ?></label><input name=\"ga_api_key\" class=\"form-control\" value=\"<?php echo Option::get('ga_api_key'); ?>\">\n\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"form-group\">\t\n\t\t\t\t\t\t\t<label><?php echo __('View ID', 'system'); ?></label><input name=\"ga_view_id\" class=\"form-control\" value=\"<?php echo Option::get('ga_view_id'); ?>\">\n\t\t\t\t\t\t</div>\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"form-group\">\t\n\t\t\t\t\t\t\t<label><?php echo __('Tracking ID', 'system'); ?></label><input name=\"ga_tracking_id\" class=\"form-control\" value=\"<?php echo Option::get('ga_tracking_id'); ?>\">\n\t\t\t\t\t\t</div>\t\t\t\t\t\t\n\t\t\t\t\t\t<input type=\"hidden\" name=\"ga_settings_update\" value=\"1\" />\n\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\"><?php echo __('Save', 'system'); ?></button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\n            <div id=\"gaHelpLink\" class=\"row hide\">\n                <div class=\"col-md-12\">\n                    Google Analytics help page: <a href=\"https://support.google.com/analytics/?hl=en\" target=\"_blank\">https://support.google.com/analytics/?hl=en</a>\n                </div>\n            </div>\n\n\t\t</div>\n\t</div>\n</div>\n"
  },
  {
    "path": "plugins/box/dashboard/views/backend/index.view.php",
    "content": "<div class=\"well dashboard-well\">\n\t<div class=\"row\">\n\t\t<div class=\"col-xs-6\">\n\t\t\t<a class=\"btn btn-link welcome-back\"><?php echo __('Welcome back', 'dashboard'); ?>, <strong><?php echo Session::get('user_login'); ?></strong></a>\n\t\t</div>\n\t\t<div class=\"col-xs-6\">\n\t\t\t<div class=\"pull-right\">\n\t\t\t\t<div class=\"btn-group\">\n\t\t\t\t  <button type=\"button\" class=\"btn btn-primary dropdown-toggle\" data-toggle=\"dropdown\">\n\t\t\t\t    <?php echo __('Create New', 'dashboard'); ?> <span class=\"caret\"></span>\n\t\t\t\t  </button>\n\t\t\t\t  <ul class=\"dropdown-menu\" role=\"menu\">\n\t\t\t\t  \t<?php Dashboard::drawItems(); ?>\n\t\t\t\t  </ul>\n\t\t\t\t</div>\t\t\t\n\t\t\t\t<?php echo ( Html::anchor(__('Upload File', 'dashboard'), 'index.php?id=filesmanager', array('title' => __('Upload File', 'filesmanager'), 'class' => 'btn btn-primary'))); ?>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n<?php /*include 'ga.view.php';*/ ?>\n\n<div class=\"well dashboard-well\">\n\t<div class=\"row\">\n\t\t<div class=\"col-md-3\">\n\t\t\t<h3><?php echo __('Content', 'pages'); ?></h3>\n\t\t\t<ul class=\"list-unstyled\">\n\t\t\t\t<?php Navigation::draw('content'); ?>\n\t\t\t</ul>\n\t\t</div>\n\t\t<div class=\"col-md-3\">\t\t\t\n\t\t\t<h3><?php echo __('Extends', 'system'); ?></h3>\n\t\t\t<ul class=\"list-unstyled\">\n\t\t\t\t<?php Navigation::draw('extends'); ?>\n\t\t\t</ul>\n\t\t</div>\t\t\t\n\t\t<div class=\"col-md-3\">\t\t\t\n\t\t\t<h3><?php echo __('System', 'system'); ?></h3>\n\t\t\t<ul class=\"list-unstyled\">\n\t\t\t\t<?php Navigation::draw('system'); ?>\n\t\t\t</ul>\n\t\t</div>\n\t\t<div class=\"col-md-3\">\t\t\t\n\t\t\t<h3><?php echo __('Help', 'system'); ?></h3>\n\t\t\t<ul class=\"list-unstyled\">\n\t\t\t\t<li><a href=\"http://monstra.org/documentation\" target=\"_blank\"><?php echo __('Documentation', 'system'); ?></a></li>              \n\t\t\t\t<li>\n\t\t\t\t<?php if (Option::get('language') == 'ru') { ?>\n\t\t\t\t<a href=\"http://ru.forum.monstra.org\" target=\"_blank\"><?php echo __('Official Support Forum', 'system'); ?></a>\n\t\t\t\t<?php } else { ?>\n\t\t\t\t<a href=\"http://forum.monstra.org\" target=\"_blank\"><?php echo __('Official Support Forum', 'system'); ?></a>\n\t\t\t\t<?php } ?>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>\n"
  },
  {
    "path": "plugins/box/editor/editor.plugin.php",
    "content": "<?php\n\n/**\n *  Editor plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Editor', 'editor'),\n                __('Editor plugin', 'editor'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\n// Add action\nAction::add('admin_editor', 'Editor::render', 10, array());\n\n/**\n * Editor class\n */\nclass Editor\n{\n    /**\n     * Render editor\n     *\n     * @param string $val editor data\n     */\n    public static function render($val = null)\n    {\n        echo ('<div id=\"editor_panel\"></div><div><textarea id=\"editor_area\" name=\"editor\" style=\"width:100%; height:320px;\">'.$val.'</textarea></div>');\n    }\n\n}\n"
  },
  {
    "path": "plugins/box/editor/install/editor.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/editor/editor.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>1</plugin_priority>\n    <plugin_name>Editor</plugin_name>\n    <plugin_description>Editor plugin</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/editor/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Editor',\n            'Editor plugin' => 'Editor plugin',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Editor',\n            'Editor plugin' => 'Editor Plugin',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Editor',\n            'Editor plugin' => 'Editor plugin',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Editor',\n            'Editor plugin' => 'Editor plugin',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'ویرایشگر',\n            'Editor plugin' => 'پلاگین ویرایشگر',  \n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Editeur',\n            'Editor plugin' => 'Plugin éditeur',  \n        )\n    );"
  },
  {
    "path": "plugins/box/editor/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Szerkesztő',\n            'Editor plugin' => 'Szerkesztő bővítmény',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Editor',\n            'Editor plugin' => 'Editor plugin',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'GfB^',\n            'Editor plugin' => 'GfB^vOC',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/ka-ge.lang.php",
    "content": "<?php\n    return array(\n        'Editor' => array(\n            'Editor' => 'რედაქტორი',\n            'Editor plugin' => 'პლაგინი რედაქტორი',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Redaktorius',\n            'Editor plugin' => 'Redaktoriaus papildinys',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Editor',\n            'Editor plugin' => 'Editor Plugin',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Edytor',\n            'Editor plugin' => 'Wtyczka edytora',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Editor',\n            'Editor plugin' => 'Plugin do editor',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Редактор',\n            'Editor plugin' => 'Редактор плагин',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Editor',\n            'Editor plugin' => 'Editor plugin',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/sr.lang.php",
    "content": "\n<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Editor',\n            'Editor plugin' => 'Editor dodatak',  \n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Düzenleyici',\n            'Editor plugin' => 'Düzenleyici eklentisi',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => 'Редактор',\n            'Editor plugin' => 'Редактор плагіну',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/editor/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'Editor' => array(\n            'Editor' => '编辑器',\n            'Editor plugin' => '编辑器插件',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/emails/css/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/box/emails/css/inc.css",
    "content": "/**********************************************\n* Ink v1.0.5 - Copyright 2013 ZURB Inc        *\n**********************************************/\n\n/* Client-specific Styles & Reset */\n\n#outlook a { \n  padding:0; \n} \n\nbody{ \n  width:100% !important; \n  min-width: 100%;\n  -webkit-text-size-adjust:100%; \n  -ms-text-size-adjust:100%; \n  margin:0; \n  padding:0;\n}\n\n.ExternalClass { \n  width:100%;\n} \n\n.ExternalClass, \n.ExternalClass p, \n.ExternalClass span, \n.ExternalClass font, \n.ExternalClass td, \n.ExternalClass div { \n  line-height: 100%; \n} \n\n#backgroundTable { \n  margin:0; \n  padding:0; \n  width:100% !important; \n  line-height: 100% !important; \n}\n\nimg { \n  outline:none; \n  text-decoration:none; \n  -ms-interpolation-mode: bicubic;\n  width: auto;\n  max-width: 100%; \n  float: left; \n  clear: both; \n  display: block;\n}\n\ncenter {\n  width: 100%;\n  min-width: 580px;\n}\n\na img { \n  border: none;\n}\n\np {\n  margin: 0 0 0 10px;\n}\n\ntable {\n  border-spacing: 0;\n  border-collapse: collapse;\n}\n\ntd { \n  word-break: break-word;\n  -webkit-hyphens: auto;\n  -moz-hyphens: auto;\n  hyphens: auto;\n  border-collapse: collapse !important; \n}\n\ntable, tr, td {\n  padding: 0;\n  vertical-align: top;\n  text-align: left;\n}\n\nhr {\n  color: #d9d9d9; \n  background-color: #d9d9d9; \n  height: 1px; \n  border: none;\n}\n\n/* Responsive Grid */\n\ntable.body {\n  height: 100%;\n  width: 100%;\n}\n\ntable.container {\n  width: 580px;\n  margin: 0 auto;\n  text-align: inherit;\n}\n\ntable.row { \n  padding: 0px; \n  width: 100%;\n  position: relative;\n}\n\ntable.container table.row {\n  display: block;\n}\n\ntd.wrapper {\n  padding: 10px 20px 0px 0px;\n  position: relative;\n}\n\ntable.columns,\ntable.column {\n  margin: 0 auto;\n}\n\ntable.columns td,\ntable.column td {\n  padding: 0px 0px 10px; \n}\n\ntable.columns td.sub-columns,\ntable.column td.sub-columns,\ntable.columns td.sub-column,\ntable.column td.sub-column {\n  padding-right: 10px;\n}\n\ntd.sub-column, td.sub-columns {\n  min-width: 0px;\n}\n\ntable.row td.last,\ntable.container td.last {\n  padding-right: 0px;\n}\n\ntable.one { width: 30px; }\ntable.two { width: 80px; }\ntable.three { width: 130px; }\ntable.four { width: 180px; }\ntable.five { width: 230px; }\ntable.six { width: 280px; }\ntable.seven { width: 330px; }\ntable.eight { width: 380px; }\ntable.nine { width: 430px; }\ntable.ten { width: 480px; }\ntable.eleven { width: 530px; }\ntable.twelve { width: 580px; }\n\ntable.one center { min-width: 30px; }\ntable.two center { min-width: 80px; }\ntable.three center { min-width: 130px; }\ntable.four center { min-width: 180px; }\ntable.five center { min-width: 230px; }\ntable.six center { min-width: 280px; }\ntable.seven center { min-width: 330px; }\ntable.eight center { min-width: 380px; }\ntable.nine center { min-width: 430px; }\ntable.ten center { min-width: 480px; }\ntable.eleven center { min-width: 530px; }\ntable.twelve center { min-width: 580px; }\n\ntable.one .panel center { min-width: 10px; }\ntable.two .panel center { min-width: 60px; }\ntable.three .panel center { min-width: 110px; }\ntable.four .panel center { min-width: 160px; }\ntable.five .panel center { min-width: 210px; }\ntable.six .panel center { min-width: 260px; }\ntable.seven .panel center { min-width: 310px; }\ntable.eight .panel center { min-width: 360px; }\ntable.nine .panel center { min-width: 410px; }\ntable.ten .panel center { min-width: 460px; }\ntable.eleven .panel center { min-width: 510px; }\ntable.twelve .panel center { min-width: 560px; }\n\n.body .columns td.one,\n.body .column td.one { width: 8.333333%; }\n.body .columns td.two,\n.body .column td.two { width: 16.666666%; }\n.body .columns td.three,\n.body .column td.three { width: 25%; }\n.body .columns td.four,\n.body .column td.four { width: 33.333333%; }\n.body .columns td.five,\n.body .column td.five { width: 41.666666%; }\n.body .columns td.six,\n.body .column td.six { width: 50%; }\n.body .columns td.seven,\n.body .column td.seven { width: 58.333333%; }\n.body .columns td.eight,\n.body .column td.eight { width: 66.666666%; }\n.body .columns td.nine,\n.body .column td.nine { width: 75%; }\n.body .columns td.ten,\n.body .column td.ten { width: 83.333333%; }\n.body .columns td.eleven,\n.body .column td.eleven { width: 91.666666%; }\n.body .columns td.twelve,\n.body .column td.twelve { width: 100%; }\n\ntd.offset-by-one { padding-left: 50px; }\ntd.offset-by-two { padding-left: 100px; }\ntd.offset-by-three { padding-left: 150px; }\ntd.offset-by-four { padding-left: 200px; }\ntd.offset-by-five { padding-left: 250px; }\ntd.offset-by-six { padding-left: 300px; }\ntd.offset-by-seven { padding-left: 350px; }\ntd.offset-by-eight { padding-left: 400px; }\ntd.offset-by-nine { padding-left: 450px; }\ntd.offset-by-ten { padding-left: 500px; }\ntd.offset-by-eleven { padding-left: 550px; }\n\ntd.expander {\n  visibility: hidden;\n  width: 0px;\n  padding: 0 !important;\n}\n\ntable.columns .text-pad,\ntable.column .text-pad {\n  padding-left: 10px;\n  padding-right: 10px;\n}\n\ntable.columns .left-text-pad,\ntable.columns .text-pad-left,\ntable.column .left-text-pad,\ntable.column .text-pad-left {\n  padding-left: 10px;\n}\n\ntable.columns .right-text-pad,\ntable.columns .text-pad-right,\ntable.column .right-text-pad,\ntable.column .text-pad-right {\n  padding-right: 10px;\n}\n\n/* Block Grid */\n\n.block-grid {\n  width: 100%;\n  max-width: 580px;\n}\n\n.block-grid td {\n  display: inline-block;\n  padding:10px;\n}\n\n.two-up td {\n  width:270px;\n}\n\n.three-up td {\n  width:173px;\n}\n\n.four-up td {\n  width:125px;\n}\n\n.five-up td {\n  width:96px;\n}\n\n.six-up td {\n  width:76px;\n}\n\n.seven-up td {\n  width:62px;\n}\n\n.eight-up td {\n  width:52px;\n}\n\n/* Alignment & Visibility Classes */\n\ntable.center, td.center {\n  text-align: center;\n}\n\nh1.center,\nh2.center,\nh3.center,\nh4.center,\nh5.center,\nh6.center {\n  text-align: center;\n}\n\nspan.center {\n  display: block;\n  width: 100%;\n  text-align: center;\n}\n\nimg.center {\n  margin: 0 auto;\n  float: none;\n}\n\n.show-for-small,\n.hide-for-desktop {\n  display: none;\n}\n\n/* Typography */\n\nbody, table.body, h1, h2, h3, h4, h5, h6, p, td { \n  color: #222222;\n  font-family: \"Helvetica\", \"Arial\", sans-serif; \n  font-weight: normal; \n  padding:0; \n  margin: 0;\n  text-align: left; \n  line-height: 1.3;\n}\n\nh1, h2, h3, h4, h5, h6 {\n  word-break: normal;\n}\n\nh1 {font-size: 40px;}\nh2 {font-size: 36px;}\nh3 {font-size: 32px;}\nh4 {font-size: 28px;}\nh5 {font-size: 24px;}\nh6 {font-size: 20px;}\nbody, table.body, p, td {font-size: 14px;line-height:19px;}\n\np.lead, p.lede, p.leed {\n  font-size: 18px;\n  line-height:21px;\n}\n\np { \n  margin-bottom: 10px;\n}\n\nsmall {\n  font-size: 10px;\n}\n\na {\n  color: #2ba6cb; \n  text-decoration: none;\n}\n\na:hover { \n  color: #2795b6 !important;\n}\n\na:active { \n  color: #2795b6 !important;\n}\n\na:visited { \n  color: #2ba6cb !important;\n}\n\nh1 a, \nh2 a, \nh3 a, \nh4 a, \nh5 a, \nh6 a {\n  color: #2ba6cb;\n}\n\nh1 a:active, \nh2 a:active,  \nh3 a:active, \nh4 a:active, \nh5 a:active, \nh6 a:active { \n  color: #2ba6cb !important; \n} \n\nh1 a:visited, \nh2 a:visited,  \nh3 a:visited, \nh4 a:visited, \nh5 a:visited, \nh6 a:visited { \n  color: #2ba6cb !important; \n} \n\n/* Panels */\n\n.panel {\n  background: #f2f2f2;\n  border: 1px solid #d9d9d9;\n  padding: 10px !important;\n}\n\n.sub-grid table {\n  width: 100%;\n}\n\n.sub-grid td.sub-columns {\n  padding-bottom: 0;\n}\n\n/* Buttons */\n\ntable.button,\ntable.tiny-button,\ntable.small-button,\ntable.medium-button,\ntable.large-button {\n  width: 100%;\n  overflow: hidden;\n}\n\ntable.button td,\ntable.tiny-button td,\ntable.small-button td,\ntable.medium-button td,\ntable.large-button td {\n  display: block;\n  width: auto !important;\n  text-align: center;\n  background: #2ba6cb;\n  border: 1px solid #2284a1;\n  color: #ffffff;\n  padding: 8px 0;\n}\n\ntable.tiny-button td {\n  padding: 5px 0 4px;\n}\n\ntable.small-button td {\n  padding: 8px 0 7px;\n}\n\ntable.medium-button td {\n  padding: 12px 0 10px;\n}\n\ntable.large-button td {\n  padding: 21px 0 18px;\n}\n\ntable.button td a,\ntable.tiny-button td a,\ntable.small-button td a,\ntable.medium-button td a,\ntable.large-button td a {\n  font-weight: bold;\n  text-decoration: none;\n  font-family: Helvetica, Arial, sans-serif;\n  color: #ffffff;\n  font-size: 16px;\n}\n\ntable.tiny-button td a {\n  font-size: 12px;\n  font-weight: normal;\n}\n\ntable.small-button td a {\n  font-size: 16px;\n}\n\ntable.medium-button td a {\n  font-size: 20px;\n}\n\ntable.large-button td a {\n  font-size: 24px;\n}\n\ntable.button:hover td,\ntable.button:visited td,\ntable.button:active td {\n  background: #2795b6 !important;\n}\n\ntable.button:hover td a,\ntable.button:visited td a,\ntable.button:active td a {\n  color: #fff !important;\n}\n\ntable.button:hover td,\ntable.tiny-button:hover td,\ntable.small-button:hover td,\ntable.medium-button:hover td,\ntable.large-button:hover td {\n  background: #2795b6 !important;\n}\n\ntable.button:hover td a,\ntable.button:active td a,\ntable.button td a:visited,\ntable.tiny-button:hover td a,\ntable.tiny-button:active td a,\ntable.tiny-button td a:visited,\ntable.small-button:hover td a,\ntable.small-button:active td a,\ntable.small-button td a:visited,\ntable.medium-button:hover td a,\ntable.medium-button:active td a,\ntable.medium-button td a:visited,\ntable.large-button:hover td a,\ntable.large-button:active td a,\ntable.large-button td a:visited {\n  color: #ffffff !important; \n}\n\ntable.secondary td {\n  background: #e9e9e9;\n  border-color: #d0d0d0;\n  color: #555;\n}\n\ntable.secondary td a {\n  color: #555;\n}\n\ntable.secondary:hover td {\n  background: #d0d0d0 !important;\n  color: #555;\n}\n\ntable.secondary:hover td a,\ntable.secondary td a:visited,\ntable.secondary:active td a {\n  color: #555 !important;\n}\n\ntable.success td {\n  background: #5da423;\n  border-color: #457a1a;\n}\n\ntable.success:hover td {\n  background: #457a1a !important;\n}\n\ntable.alert td {\n  background: #c60f13;\n  border-color: #970b0e;\n}\n\ntable.alert:hover td {\n  background: #970b0e !important;\n}\n\ntable.radius td {\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  border-radius: 3px;\n}\n\ntable.round td {\n  -webkit-border-radius: 500px;\n  -moz-border-radius: 500px;\n  border-radius: 500px;\n}\n\n/* Outlook First */\n\nbody.outlook p {\n  display: inline !important;\n}\n\n/*  Media Queries */\n\n@media only screen and (max-width: 600px) {\n\n  table[class=\"body\"] img {\n    width: auto !important;\n    height: auto !important;\n  }\n\n  table[class=\"body\"] center {\n    min-width: 0 !important;\n  }\n\n  table[class=\"body\"] .container {\n    width: 95% !important;\n  }\n\n  table[class=\"body\"] .row {\n    width: 100% !important;\n    display: block !important;\n  }\n\n  table[class=\"body\"] .wrapper {\n    display: block !important;\n    padding-right: 0 !important;\n  }\n\n  table[class=\"body\"] .columns,\n  table[class=\"body\"] .column {\n    table-layout: fixed !important;\n    float: none !important;\n    width: 100% !important;\n    padding-right: 0px !important;\n    padding-left: 0px !important;\n    display: block !important;\n  }\n\n  table[class=\"body\"] .wrapper.first .columns,\n  table[class=\"body\"] .wrapper.first .column {\n    display: table !important;\n  }\n\n  table[class=\"body\"] table.columns td,\n  table[class=\"body\"] table.column td {\n    width: 100% !important;\n  }\n\n  table[class=\"body\"] .columns td.one,\n  table[class=\"body\"] .column td.one { width: 8.333333% !important; }\n  table[class=\"body\"] .columns td.two,\n  table[class=\"body\"] .column td.two { width: 16.666666% !important; }\n  table[class=\"body\"] .columns td.three,\n  table[class=\"body\"] .column td.three { width: 25% !important; }\n  table[class=\"body\"] .columns td.four,\n  table[class=\"body\"] .column td.four { width: 33.333333% !important; }\n  table[class=\"body\"] .columns td.five,\n  table[class=\"body\"] .column td.five { width: 41.666666% !important; }\n  table[class=\"body\"] .columns td.six,\n  table[class=\"body\"] .column td.six { width: 50% !important; }\n  table[class=\"body\"] .columns td.seven,\n  table[class=\"body\"] .column td.seven { width: 58.333333% !important; }\n  table[class=\"body\"] .columns td.eight,\n  table[class=\"body\"] .column td.eight { width: 66.666666% !important; }\n  table[class=\"body\"] .columns td.nine,\n  table[class=\"body\"] .column td.nine { width: 75% !important; }\n  table[class=\"body\"] .columns td.ten,\n  table[class=\"body\"] .column td.ten { width: 83.333333% !important; }\n  table[class=\"body\"] .columns td.eleven,\n  table[class=\"body\"] .column td.eleven { width: 91.666666% !important; }\n  table[class=\"body\"] .columns td.twelve,\n  table[class=\"body\"] .column td.twelve { width: 100% !important; }\n\n  table[class=\"body\"] td.offset-by-one,\n  table[class=\"body\"] td.offset-by-two,\n  table[class=\"body\"] td.offset-by-three,\n  table[class=\"body\"] td.offset-by-four,\n  table[class=\"body\"] td.offset-by-five,\n  table[class=\"body\"] td.offset-by-six,\n  table[class=\"body\"] td.offset-by-seven,\n  table[class=\"body\"] td.offset-by-eight,\n  table[class=\"body\"] td.offset-by-nine,\n  table[class=\"body\"] td.offset-by-ten,\n  table[class=\"body\"] td.offset-by-eleven {\n    padding-left: 0 !important;\n  }\n\n  table[class=\"body\"] table.columns td.expander {\n    width: 1px !important;\n  }\n\n  table[class=\"body\"] .right-text-pad,\n  table[class=\"body\"] .text-pad-right {\n    padding-left: 10px !important;\n  }\n\n  table[class=\"body\"] .left-text-pad,\n  table[class=\"body\"] .text-pad-left {\n    padding-right: 10px !important;\n  }\n\n  table[class=\"body\"] .hide-for-small,\n  table[class=\"body\"] .show-for-desktop {\n    display: none !important;\n  }\n\n  table[class=\"body\"] .show-for-small,\n  table[class=\"body\"] .hide-for-desktop {\n    display: inherit !important;\n  }\n}"
  },
  {
    "path": "plugins/box/emails/emails.admin.php",
    "content": "<?php\n\n// Admin Navigation: add new item\nNavigation::add(__('Emails', 'emails'), 'system', 'emails', 5);\n\n/**\n * Emails admin class\n */\nclass EmailsAdmin extends Backend\n{\n    /**\n     * Main Emails admin function\n     */\n    public static function main()\n    {\n        // Init vars\n        $email_templates_path = STORAGE . DS  . 'emails' . DS;\n        $email_templates_list = array();\n\n        // Check for get actions\n        // -------------------------------------\n        if (Request::get('action')) {\n\n            // Switch actions\n            // -------------------------------------\n            switch (Request::get('action')) {\n\n                // Plugin action\n                // -------------------------------------\n                case \"edit_email_template\":\n\n                    if (Request::post('edit_email_template') || Request::post('edit_email_template_and_exit') ) {\n                        \n                        if (Security::check(Request::post('csrf'))) {\n\n                            // Save Email Template\n                            File::setContent(STORAGE . DS  . 'emails' . DS . Request::post('email_template_name') .'.email.php', Request::post('content'));\n\n                            Notification::set('success', __('Your changes to the email template <i>:name</i> have been saved.', 'emails', array(':name' => Request::post('email_template_name'))));\n\n                            if (Request::post('edit_email_template_and_exit')) {\n                                Request::redirect('index.php?id=emails');\n                            } else {\n                                Request::redirect('index.php?id=emails&action=edit_email_template&filename='.Request::post('email_template_name'));\n                            }\n\n                        }\n\n                    }\n\n                    $content = File::getContent($email_templates_path.Request::get('filename').'.email.php');\n\n                    // Display view\n                    View::factory('box/emails/views/backend/edit')\n                            ->assign('content', $content)\n                            ->display();\n                break;\n\n            }\n\n        } else {\n\n            // Get email templates\n            $email_templates_list = File::scan($email_templates_path, '.email.php');\n\n            // Display view\n            View::factory('box/emails/views/backend/index')\n                    ->assign('email_templates_list', $email_templates_list)\n                    ->display();\n        }\n    }\n}\n"
  },
  {
    "path": "plugins/box/emails/emails.plugin.php",
    "content": "<?php\n\n/**\n *  Emails plugin\n *\n *  @package Monstra\n *  @subpackage Plugins\n *  @author Romanenko Sergey / Awilum\n *  @copyright 2012-2014 Romanenko Sergey / Awilum\n *  @version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Emails', 'emails'),\n                __('Emails plugin for Monstra', 'emails'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\n// Load Emails Admin for Editor and Admin\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {\n\n    Plugin::admin('emails', 'box');\n\n}"
  },
  {
    "path": "plugins/box/emails/install/emails.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/emails/emails.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>15</plugin_priority>\n    <plugin_name>Emails</plugin_name>\n    <plugin_description>Emails plugin for Monstra</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>"
  },
  {
    "path": "plugins/box/emails/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'emails' => array(\n            'Emails' => 'Emaily',\n            'Emails plugin for Monstra' => 'Email plugin pro Monstra',\n            'Edit Layout' => 'Upravit layout',\n            'Email templates' => 'Vzory emailů',\n            'Edit' => 'Upravit',\n            'Edit Email Template' => 'Upravit vzory emailů',\n            'Name' => 'Název',\n            'Email template content' => 'Obsah vzoru emailu',\n            'Save and Exit' => 'Uložit a ukončit',\n            'Save' => 'Uložit',\n            'Cancel' => 'Zrušit',\n            'This email template does not exist' => 'Tento vzor emailu neexistuje',\n            'Your changes to the email template <i>:name</i> have been saved.' => 'Vaše změny vzoru emailu <i>:name</i> byly uloženy.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/emails/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'emails' => array(\n            'Emails' => 'Emails',\n            'Emails plugin for Monstra' => 'Email Plugin für Monstra',\n            'Edit Layout' => 'Bearbeite Layout',\n            'Email templates' => 'Email Templates',\n            'Edit' => 'Bearbeiten',\n            'Edit Email Template' => 'Bearbeite Email Template',\n            'Name' => 'Name',\n            'Email template content' => 'Email Template Inhalt',\n            'Save and Exit' => 'Speichern und Beenden',\n            'Save' => 'Speichern',\n            'Cancel' => 'Abbrechen',\n            'This email template does not exist' => 'Dieses Email Template existiert nicht',\n            'Your changes to the email template <i>:name</i> have been saved.' => 'Deine Änderung am Email Template <i>:name</i> wurden gespeichert.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/emails/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'emails' => array(\n            'Emails' => 'Emails',\n            'Emails plugin for Monstra' => 'Emails plugin for Monstra',\n            'Edit Layout' => 'Edit Layout',\n            'Email templates' => 'Email templates',\n            'Edit' => 'Edit',\n            'Edit Email Template' => 'Edit Email Template',\n            'Name' => 'Name',\n            'Email template content' => 'Email template content',\n            'Save and Exit' => 'Save and Exit',\n            'Save' => 'Save',\n            'Cancel' => 'Cancel',\n            'This email template does not exist' => 'This email template does not exist',\n            'Your changes to the email template <i>:name</i> have been saved.' => 'Your changes to the email template <i>:name</i> have been saved.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/emails/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'emails' => array(\n            'Emails' => 'Emails',\n            'Emails plugin for Monstra' => 'Emails plugin for Monstra',\n            'Edit Layout' => 'Editar diseño',\n            'Email templates' => 'Plantillas de email',\n            'Edit' => 'Editar',\n            'Edit Email Template' => 'Editar plantilla de email',\n            'Name' => 'Nombre',\n            'Email template content' => 'Contenido de la plantilla de email',\n            'Save and Exit' => 'Guardar y salir',\n            'Save' => 'Guardar',\n            'Cancel' => 'Cancelar',\n            'This email template does not exist' => 'Esta plantilla de email no existe',\n            'Your changes to the email template <i>:name</i> have been saved.' => 'Tus cambios en la plantilla de email <i>:name</i> han sido guardados.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/emails/languages/ka-ge.lang.php",
    "content": "<?php\n    return array(\n        'emails' => array(\n            'Emails' => 'ელ-ფოსტები',\n            'Emails plugin for Monstra' => 'პლაგინი ელ-ფოსტები Monstra-თვის',\n            'Edit Layout' => 'ნიმუშის რედაქტირება',\n            'Email templates' => 'წერილების ნიმუში',\n            'Edit' => 'რედაქტირება',\n            'Edit Email Template' => 'ელ-ფოსტების ნიმუშის რედაქტირება',\n            'Name' => 'სახელი',\n            'Email template content' => 'ელ-ფოსტის კონტენტის ნიმუში',\n            'Save and Exit' => 'შენახვა და შემდეგ გამოსვლა',\n            'Save' => 'შენახვა',\n            'Cancel' => 'გაუქმება',\n            'This email template does not exist' => 'ასეთი ელ-ფოსტის ნიმუში არ არსებობს',\n            'Your changes to the email template <i>:name</i> have been saved.' => 'ელ-ფოსტის ნიმუშის ცვლილებები <i>:name</i> დამახსოვრებულია.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/emails/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'emails' => array(\n            'Emails' => 'Wiadomości e-mail',\n            'Emails plugin for Monstra' => 'Wtyczka wiadomości e-mail dla systemu Monstra',\n            'Edit Layout' => 'Edit Layout',\n            'Email templates' => 'Email templates',\n            'Edit' => 'Edit',\n            'Edit Email Template' => 'Edit Email Template',\n            'Name' => 'Name',\n            'Email template content' => 'Email template content',\n            'Save and Exit' => 'Save and Exit',\n            'Save' => 'Save',\n            'Cancel' => 'Cancel',\n            'This email template does not exist' => 'This email template does not exist',\n            'Your changes to the email template <i>:name</i> have been saved.' => 'Your changes to the email template <i>:name</i> have been saved.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/emails/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'emails' => array(\n            'Emails' => 'Письма',\n            'Emails plugin for Monstra' => 'Плагин emails для Monstra',\n            'Edit Layout' => 'Редактировать Шаблон',\n            'Email templates' => 'Шаблоны Писем',\n            'Edit' => 'Редактировать',\n            'Edit Email Template' => 'Редактировать Шаблоны Письма',\n            'Name' => 'Название',\n            'Email template content' => 'Конент Шаблона Письма',\n            'Save and Exit' => 'Сохранить и выйты',\n            'Save' => 'Сохранить',\n            'Cancel' => 'Отменить',\n            'This email template does not exist' => 'Этот емейл шаблон отсутствует',\n            'Your changes to the email template <i>:name</i> have been saved.' => 'Ваши изменения к емейл шаблону <i>:name</i> были сохранены.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/emails/languages/sr.lang.php",
    "content": "<?php\n    return array(\n        'emails' => array(\n            'Emails' => 'Email',\n            'Emails plugin for Monstra' => 'Email dodatak za Monstra',\n            'Edit Layout' => 'Izmeni izgled',\n            'Email templates' => 'Email šabloni',\n            'Edit' => 'Izmeni',\n            'Edit Email Template' => 'Izmeni izgled šablonu',\n            'Name' => 'Ime',\n            'Email template content' => 'Email sadržaj šablona',\n            'Save and Exit' => 'Sačuvaj i izađi',\n            'Save' => 'Sačuvaj',\n            'Cancel' => 'Otkaži',\n            'This email template does not exist' => 'Ovaj šablon ne postoji',\n            'Your changes to the email template <i>:name</i> have been saved.' => 'Tvoje promene na šablonu <i>:name</i> su uspešno sačuvane.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/emails/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'emails' => array(\n            'Emails' => 'E-postalar',\n            'Emails plugin for Monstra' => 'Monstra için e-posta eklentisi',\n            'Edit Layout' => 'Mizanpajı Düzenle',\n            'Email templates' => 'E-posta şablonları',\n            'Edit' => 'Düzenle',\n            'Edit Email Template' => 'E-posta Şablonunu Düzenle',\n            'Name' => 'Ad',\n            'Email template content' => 'E-posta şablonu içeriği',\n            'Save and Exit' => 'Kaydet ve Çık',\n            'Save' => 'Kaydet',\n            'Cancel' => 'Vazgeç',\n            'This email template does not exist' => 'Bu e-posta şablonu bulunamadı',\n            'Your changes to the email template <i>:name</i> have been saved.' => 'Değişiklikleriniz <i>:name</i> adlı e-posta şablonuna kaydedildi.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/emails/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'emails' => array(\n            'Emails' => 'Листи',\n            'Emails plugin for Monstra' => 'Плагін emails для Monstra',\n            'Edit Layout' => 'Редагувати Шаблон',\n            'Email templates' => 'Шаблони Листів',\n            'Edit' => 'Редагувати',\n            'Edit Email Template' => 'Редагувати Шаблони Листа',\n            'Name' => 'Назва',\n            'Email template content' => 'Вміст Шаблону Листа',\n            'Save and Exit' => 'Зберегти і вийти',\n            'Save' => 'Зберегти',\n            'Cancel' => 'Відмінити',\n            'This email template does not exist' => 'Цей email шаблон відсутній',\n            'Your changes to the email template <i>:name</i> have been saved.' => 'Ваші зміни до email шаблону <i>:name</i> були збережені.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/emails/views/backend/edit.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('Edit Email Template', 'emails'); ?></h2>\n\n<?php   \nif ($content !== null) {\n    echo (Form::open());\n    echo (Form::hidden('csrf', Security::token()));\n    echo (Form::hidden('email_template_name', Request::get('filename')));\n?>\n<?php echo (Form::label('name', __('Name', 'emails'))); ?>\n<div class=\"input-group\">\n    <?php echo (Form::input('name', Request::get('filename'), array('disabled', 'class' => 'form-control'))); ?><span class=\"input-group-addon\">.email.php</span>\n</div>\n\n<div class=\"margin-top-2 margin-bottom-2\">\n<?php\n    echo (        \n       Form::label('content', __('Email template content', 'emails')).\n       Form::textarea('content', Html::toText($content), array('style' => 'width:100%;height:400px;', 'class' => 'source-editor form-control'))\n    );\n?>\n</div>\n\n<?php\n    echo (\n\n       Form::submit('edit_email_template_and_exit', __('Save and Exit', 'emails'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n       Form::submit('edit_email_template', __('Save', 'emails'), array('class' => 'btn btn-phone btn-primary')). Html::nbsp(2).\n       Html::anchor(__('Cancel', 'emails'), 'index.php?id=emails', array('title' => __('Cancel', 'emails'), 'class' => 'btn btn-phone btn-default')).\n       Form::close()\n    );\n\n} else {\n    echo '<div class=\"message-error\">'.__('This email template does not exist', 'emails').'</div>';\n}\n?>\n"
  },
  {
    "path": "plugins/box/emails/views/backend/index.view.php",
    "content": "<div class=\"vertical-align margin-bottom-1\">\n    <div class=\"text-left row-phone\">\n        <h2><?php echo __('Emails', 'emails'); ?></h2>\n    </div>    \n    <div class=\"text-right row-phone\">\n        <?php\n            echo (\n                Html::anchor(__('Edit Layout', 'emails'), 'index.php?id=emails&action=edit_email_template&filename=layout', array('title' => __('Edit Layout', 'emails'), 'class' => 'btn btn-phone btn-primary'))\n            );\n        ?>\n    </div>\n</div>\n\n<table class=\"table table-bordered\">\n    <thead>\n        <tr>\n            <th><?php echo __('Email templates', 'emails'); ?></th>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n    <?php if (count($email_templates_list) != 0) foreach ($email_templates_list as $email_template) { ?>\n        <?php if ($email_template != 'layout.email.php') { ?>\n        <tr>\n            <td><?php echo basename($email_template, '.email.php'); ?></td>\n            <td>\n                <div class=\"pull-right\">            \n                    <div class=\"btn-group\">\n                        <?php echo Html::anchor(__('Edit', 'emails'), 'index.php?id=emails&action=edit_email_template&filename='.basename($email_template, '.email.php'), array('class' => 'btn btn-primary')); ?>\n                    </div>         \n                </div>\n            </td>\n        </tr>\n        <?php } ?>\n    <?php } ?>\n    </tbody>\n</table>\n"
  },
  {
    "path": "plugins/box/emails/views/emails/email_layout.view.php",
    "content": "<?php include STORAGE . DS . 'emails' . DS . 'layout.email.php'; ?>"
  },
  {
    "path": "plugins/box/filesmanager/css/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/box/filesmanager/css/style.css",
    "content": ".upload-area {\n    border:2px dashed #DEDEDE;\n    width:200px;\n    color:#DEDEDE;\n    text-align: center;\n    height: 34px;\n    display: inline-block;\n    float:left;\n    margin-left: 10px;\n}\n\n.upload-area-dragenter {\n    border: 2px dashed #428bca !important;\n}\n\n.upload-area-drop {\n    border: 2px dashed #428bca;\n}\n\n.upload-progress {\n    height: 100%;\n    width: 0;\n    background-color: #428bca;\n    position: relative;\n    float: left;\n    max-width: 100%;\n    color: #ffffff;\n}\n\n.upload-file-info {\n    display: inline-block;\n    float: left;\n}\n\n.fileupload-controls {\n    float: left;\n}\n\n.upload-file-pholder {\n    padding-top: 5px;\n}\n\n.file-size-max-upload {\n    color: #ccc;\n    text-decoration: none;\n}\n\n.file-size-max-upload:hover {\n    color: #ccc;\n    cursor: default;\n    text-decoration: none;\n}\n\n@media (max-width: 320px) {\n    .create-new-dir {\n        float:left!important;\n    }\n}"
  },
  {
    "path": "plugins/box/filesmanager/filesmanager.admin.php",
    "content": "<?php\n\n// Add Plugin Javascript\nStylesheet::add('plugins/box/filesmanager/css/style.css', 'backend', 11);\nJavascript::add('plugins/box/filesmanager/js/fileuploader.js', 'backend', 11);\nJavascript::add('plugins/box/filesmanager/js/filesmanager.js', 'backend', 11);\n\n// Add plugin navigation link\nNavigation::add(__('Files', 'filesmanager'), 'content', 'filesmanager', 3);\n\n/**\n * Filesmanager Admin Class\n */\nclass FilesmanagerAdmin extends Backend\n{\n    /**\n     * Main function\n     */\n    public static function main()\n    {\n        // Array of forbidden types\n        $forbidden_types = array('html', 'htm', 'js', 'jsb', 'mhtml', 'mht',\n                                 'php', 'phtml', 'php3', 'php4', 'php5', 'phps',\n                                 'shtml', 'jhtml', 'pl', 'py', 'cgi', 'sh', 'ksh', 'bsh', 'c', 'htaccess', 'htpasswd',\n                                 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl', 'empty');\n\n        // Array of image types\n        $image_types = array('jpg', 'png', 'bmp', 'gif', 'tif');\n\n        // Get Site url\n        $site_url = Option::get('siteurl');\n\n        // Init vars\n        if (Request::get('path')) $path = Request::get('path'); else $path = 'uploads/';\n\n        // Add slash if not exists\n        if (substr($path, -1, 1) != '/') {\n            $path .= '/';\n            Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);\n        }\n\n        // Upload corectly!\n        if ($path == 'uploads' || $path == 'uploads//') {\n            $path = 'uploads/';\n            Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);\n        }\n\n        // Only 'uploads' folder!\n        if (strpos($path, 'uploads') === false) {\n            $path = 'uploads/';\n            Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);\n        }\n\n        // Set default path value if path is empty\n        if ($path == '') {\n            $path = 'uploads/';\n            Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);\n        }\n\n        $files_path = ROOT . DS . 'public' . DS . $path;\n        \n        $current = explode('/', $path);\n\n        // Delete file\n        // -------------------------------------\n        if (Request::get('id') == 'filesmanager' && Request::get('delete_file')) {\n\n            if (Security::check(Request::get('token'))) {\n\n                File::delete($files_path.Request::get('delete_file'));\n                if (!is_file($files_path.Request::get('delete_file'))) {\n                    Notification::set('success', __('File was deleted', 'filesmanager'));\n                } else {\n                    Notification::set('error', __('File was not deleted', 'filesmanager'));\n                }\n                Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);\n\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Delete dir\n        // -------------------------------------\n        if (Request::get('id') == 'filesmanager' && Request::get('delete_dir')) {\n\n            if (Security::check(Request::get('token'))) {\n\n                Dir::delete($files_path.Request::get('delete_dir'));\n\n                if (!is_dir($files_path.Request::get('delete_dir'))) {\n                    Notification::set('success', __('Directory was deleted', 'filesmanager'));\n                } else {\n                    Notification::set('error', __('Directory was not deleted', 'filesmanager'));\n                }\n                \n                Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);\n                \n                    \n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n\n        // Rename file/dir\n        // -------------------------------------\n        if (Request::post('rename_type')) {\n\n            if (Security::check(Request::post('csrf'))) {\n\n                $rename_type = Request::post('rename_type');\n                $rename_from = Request::post('rename_from');\n                $rename_to = Request::post('rename_to');\n\n                if (empty($rename_to)) {\n                    Notification::set('error', __('Can not be empty', 'filesmanager'));\n                    Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);\n                }\n\n                $ext = ($rename_type === 'file') ? '.'. File::ext($rename_from) : '';\n                $rename_to = $files_path . Security::safeName($rename_to, null, false).$ext;\n\n                if (is_dir($rename_to)) {\n                    Notification::set('error', __('Directory exists', 'filesmanager'));\n                    Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);\n                }\n\n                if (is_file($rename_to)) {\n                    Notification::set('error', __('File exists', 'filesmanager'));\n                    Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);\n                }\n\n                $success = rename($files_path.$rename_from, $rename_to);\n\n                if ($success) {\n                    Notification::set('success', __('Renamed successfully', 'filesmanager'));\n                } else {\n                    Notification::set('error', __('Failure', 'filesmanager'));\n                }\n                Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);\n\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Upload file\n        // -------------------------------------\n        if (Request::post('upload_file')) {\n\n            if (Security::check(Request::post('csrf'))) {\n\n                $error = false;\n                if ($_FILES['file']) {\n                    if ( ! in_array(File::ext($_FILES['file']['name']), $forbidden_types)) {\n                        $filepath = $files_path.Security::safeName(basename($_FILES['file']['name'], File::ext($_FILES['file']['name'])), null, false).'.'.File::ext($_FILES['file']['name']);\n                        $uploaded = move_uploaded_file($_FILES['file']['tmp_name'], $filepath);\n                        if ($uploaded !== false && is_file($filepath)) {\n                            Notification::set('success', __('File was uploaded', 'filesmanager'));\n                        } else {\n                            $error = 'File was not uploaded';\n                        }\n                    } else {\n                        $error = 'Forbidden file type';\n                    }\n                } else {\n                    $error = 'File was not uploaded';\n                }\n\n                if ($error) {\n                    Notification::set('error', __($error, 'filesmanager'));\n                }\n\n                if (Request::post('dragndrop')) {\n                    Request::shutdown();\n                } else {\n                    Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);\n                }\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Create Directory\n        // -------------------------------------\n        if (Request::post('directory_name')) {\n            \n            if (Security::check(Request::post('csrf'))) {\n                \n                $abs_path = $files_path . Security::safeName(Request::post('directory_name'), null, false);\n                \n                $error = false;\n                \n                if ( !is_dir($abs_path) ) {\n                    try {\n                        mkdir($abs_path);\n                    } catch(Exception $e) {\n                        $error = true;\n                    }\n                } else {\n                    $error = true;\n                }\n                \n                if ($error) {\n                    Alert::error(__('Directory was not created', 'filesmanager'));\n                } else {\n                    Alert::success(__('Directory was created', 'filesmanager'));\n                }\n                \n            }\n            \n        }\n\n        // Get information about current path\n        $_list = FilesmanagerAdmin::fdir($files_path);\n\n        $files_list = array();\n\n        // Get files\n        if (isset($_list['files'])) {\n            foreach ($_list['files'] as $files) {\n                $files_list[] = $files;\n            }\n            // sort file list alphabetically\n            sort($files_list);\n        }\n        \n        $dir_list = array();\n        \n        // Get dirs\n        if (isset($_list['dirs'])) {\n            foreach ($_list['dirs'] as $dirs) {\n                if (strpos($dirs, '.') === false && strpos($dirs, '..') === false){ \n                    $dir_list[] = $dirs;\n                }\n            }\n            // sort directory list alphabetically\n            sort($dir_list);\n        }\n\n        // Display view\n        View::factory('box/filesmanager/views/backend/index')\n                ->assign('path', $path)\n                ->assign('current', $current)\n                ->assign('files_list', $files_list)\n                ->assign('dir_list', $dir_list)\n                ->assign('forbidden_types', $forbidden_types)\n                ->assign('image_types', $image_types)\n                ->assign('site_url', $site_url)\n                ->assign('upload_max_filesize', FilesmanagerAdmin::uploadSize())\n                ->assign('files_path', $files_path)\n                ->assign('fileuploader', array(\n                    'uploadUrl' => $site_url.'/admin/index.php?id=filesmanager&path='.$path,\n                    'csrf'      => Security::token(),\n                    'errorMsg'  => __('Upload server error', 'filesmanager')\n                ))->display();\n\n    }\n\n    /**\n     * Get directories and files in current path\n     */\n    protected static function fdir($dir, $type = null)\n    {\n        $files = array();\n        $c = 0;\n        $_dir = $dir;\n        if (is_dir($dir)) {\n        $dir = opendir ($dir);\n            while (false !== ($file = readdir($dir))) {\n                if (($file !=\".\") && ($file !=\"..\")) {\n                    $c++;\n                    if (is_dir($_dir.$file)) {\n                        $files['dirs'][$c] = $file;\n                    } else {\n                        $files['files'][$c] = $file;\n                    }\n                }\n            }\n            closedir($dir);\n\n            return $files;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * Get Upload Size\n     */\n    public static function uploadSize() \n    {\n        return Number::byteFormat(min(Number::convertToBytes(ini_get('upload_max_filesize')),\n                                      Number::convertToBytes(ini_get('post_max_size'))));\n    }\n\n}\n"
  },
  {
    "path": "plugins/box/filesmanager/filesmanager.plugin.php",
    "content": "<?php\n\n/**\n *\tFiles manager plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Files manager', 'filesmanager'),\n                __('Files manager', 'filesmanager'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {\n\n    // Include Admin\n    Plugin::admin('filesmanager', 'box');\n\n}"
  },
  {
    "path": "plugins/box/filesmanager/install/filesmanager.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/filesmanager/filesmanager.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>2</plugin_priority>\n    <plugin_name>FilesManager</plugin_name>\n    <plugin_description>Simple file manger for Monstra</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/filesmanager/js/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/box/filesmanager/js/filesmanager.js",
    "content": "if (typeof $.monstra == 'undefined') $.monstra = {};\n\n$.monstra.filesmanager = {\n\n\tinit: function(){\n\t\t$('#filesDirsList').on('click', '.js-rename-dir', function(e){\n\t\t\t$.monstra.filesmanager.showRenameDialog(\n\t\t\t\t'dir',\n\t\t\t\t$(e.currentTarget).attr('data-dirname'),\n\t\t\t\t$(e.currentTarget).attr('data-path')\n\t\t\t);\n\t\t});\n\t\t$('#filesDirsList').on('click', '.js-rename-file', function(e){\n\t\t\t$.monstra.filesmanager.showRenameDialog(\n\t\t\t\t'file',\n\t\t\t\t$(e.currentTarget).attr('data-filename'),\n\t\t\t\t$(e.currentTarget).attr('data-path')\n\t\t\t);\n\t\t});\n        $('#filesDirsList').on('click', '.js-file-info', function(e, el){\n            $.monstra.filesmanager.showInfoDialog(e.currentTarget);\n        });\n\t},\n\n\tshowRenameDialog: function(type, renameFrom, path){\n\t\tvar dialog = $('#renameDialog');\n\t\tdialog.find('input[name=\"rename_type\"]').val(type);\n\t\tdialog.find('input[name=\"rename_from\"]').val(renameFrom);\n\t\tdialog.find('input[name=\"path\"]').val(path);\n\t\tdialog.find('#renameToHolder').text(renameFrom);\n\t\tdialog.find('[id$=\"RenameType\"]').hide();\n\t\tdialog.find('#'+ type +'RenameType').show();\n\t\tdialog.modal('show');\n\t},\n\n    showInfoDialog: function(btnEl){\n        var dialog = $('#fileInfoDialog');\n        dialog.find('.js-dimension-blck').hide();\n        dialog.find('.js-filename').html($(btnEl).attr('data-filename'));\n        dialog.find('.js-filetype').html($(btnEl).attr('data-filetype'));\n        dialog.find('.js-filesize').html($(btnEl).attr('data-filesize'));\n        dialog.find('.js-link').html($(btnEl).attr('data-link'));\n        var dimension = $(btnEl).attr('data-dimension').trim();\n        if (dimension) {\n            dialog.find('.js-dimension').html(dimension);\n            dialog.find('.js-dimension-blck').show();\n        }\n        dialog.modal('show');\n    }\n};\n\n$(document).ready(function(){\n\t$.monstra.filesmanager.init();\n});"
  },
  {
    "path": "plugins/box/filesmanager/js/fileuploader.js",
    "content": "if (typeof $.monstra == 'undefined') $.monstra = {};\n\n$.monstra.fileuploader = {\n    \n    conf: {\n        uploadUrl: '',\n        csrf: '',\n\t\terrorMsg: '',\n        uploaderId: ''\n    },\n\n    _uploaderObj: null,\n\n    init: function(conf){\n        if (!conf.uploaderId) {\n            throw 'uploaderId not specified';\n        }\n        $.extend(this.conf, conf);\n        this._uploaderObj = $('#'+ this.conf.uploaderId);\n        var area = this._uploaderObj.find('.upload-area');\n        area.off('dragenter.fuploader').on('dragenter.fuploader', function(e){\n            e.stopPropagation();\n            e.preventDefault();\n            $(this).addClass('upload-area-dragenter');\n        });\n        area.off('dragover.fuploader').on('dragover.fuploader', function(e){\n            e.stopPropagation();\n            e.preventDefault();\n        });\n        area.off('drop.fuploader').on('drop.fuploader', function(e){\n            $(this).removeClass('upload-area-dragenter').removeClass('upload-area-dragover').addClass('upload-area-drop');\n            e.preventDefault();\n            var files = e.originalEvent.dataTransfer.files;\n            $.monstra.fileuploader.uploadFileHandle(files, area);\n        });\n        $(document).off('dragover.fuploader').on('dragover.fuploader', function(e){\n            e.stopPropagation();\n            e.preventDefault();\n            area.removeClass('upload-area-dragenter').removeClass('upload-area-drop').addClass('upload-area-dragover');\n        });\n        $(document).off('dragenter.fuploader').on('dragenter.fuploader', function(e){\n            e.stopPropagation();\n            e.preventDefault();\n        });\n        $(document).off('drop.fuploader').on('drop.fuploader', function(e){\n            e.stopPropagation();\n            e.preventDefault();\n        });\n    },\n    \n    uploadFileHandle: function(files, area){\n        for (var i = 0; i < files.length; i++){\n            var fd = new FormData();\n            fd.append('file', files[i]);\n            fd.append('upload_file', 'upload_file');\n\t\t\tfd.append('dragndrop', '1');\n            fd.append('csrf', $.monstra.fileuploader.conf.csrf);\n            //this.setFileNameSize(files[i].name, files[i].size);\n            \n            this.uploadFile(fd, status);\n        }\n    },\n    \n    uploadFile: function(formData, status){\n        var jqXHR = $.ajax({\n            url: $.monstra.fileuploader.conf.uploadUrl,\n            type: 'POST',\n            contentType: false,\n            processData: false,\n            cache: false,\n            data: formData,\n            xhr: function() {\n                var xhrobj = $.ajaxSettings.xhr();\n                if (xhrobj.upload) {\n                    xhrobj.upload.addEventListener('progress', function(event) {\n                        var percent = 0;\n                        var position = event.loaded || event.position;\n                        var total = event.total;\n                        if (event.lengthComputable) {\n                            percent = Math.ceil(position / total * 100);\n                        }\n                        $.monstra.fileuploader.setProgress(percent);\n                    }, false);\n                }\n                return xhrobj;\n            },\n            success: function(data){\n                $.monstra.fileuploader.setProgress(100);\n                $.event.trigger('uploaded.fuploader');\n            },\n\t\t\terror: function(){\n\t\t\t\tMessenger().post({\n\t\t\t\t\ttype: 'error',\n\t\t\t\t\tmessage : $.monstra.fileuploader.conf.errorMsg,\n\t\t\t\t\thideAfter: 3\n\t\t\t\t});\n                this._uploaderObj.find('.upload-progress').animate({ width: 0 }, 1);\n                this._uploaderObj.find('.upload-file-pholder').show();\n\t\t\t}\n        });\n    },\n    \n    setProgress: function(progress){\n        if (parseInt(progress) > 0) {\n            this._uploaderObj.find('.upload-file-pholder').hide();\n        }\n        var progressBarWidth = progress * this._uploaderObj.find('.upload-area').width() / 100;\n        this._uploaderObj.find('.upload-progress').animate({ width: progressBarWidth }, 10);\n    },\n    \n    setFileNameSize: function(fname, fsize){\n        var sizeStr = '';\n        var sizeKB = fsize / 1024;\n        if(parseInt(sizeKB) > 1024){\n            var sizeMB = sizeKB/1024;\n            sizeStr = sizeMB.toFixed(2)+' MB';\n        } else {\n            sizeStr = sizeKB.toFixed(2)+' KB';\n        }\n        \n        this._uploaderObj.find('.upload-file-info').html(fname +' '+ sizeStr);\n    }\n};\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Soubory',\n            'Files manager' => 'Správce souborů',\n            'Name' => 'Název',\n            'Actions' => 'Akce',\n            'Delete' => 'Vymazat',\n            'Upload' => 'Nahrat',\n            'Drop File Here' => 'Sem vložte soubory',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximální velikost souboru: :upload_max_filesize',\n            'Rename' => 'Přejmenovat',\n            'Renamed successfully' => 'Přejmenováno',\n            'Failure' => 'Chyba',\n            'Forbidden file type' => 'Nepovolený typ souboru',\n            'Upload server error' => 'Chyba při nahrávání',\n            'Can not be empty' => 'Nesmí být prázdné',\n            'Create New Directory' => 'Vytvořit nový adresář',\n            'Directory Name' => 'Název adresáře',\n            'Directory:' => 'Adresář:',\n            'Directory was not created' => 'Adresář nebyl vytvořen',\n            'Directory was created' => 'Adresář byl vytvořen',\n            'Directory was deleted' => 'Adresář byl odstraněn',\n            'Directory was not deleted' => 'Adresář nebyl odstraněn',\n            'Directory exists' => 'Adresář existuje',\n            'File:' => 'Soubor:',\n            'File was uploaded' => 'Soubor nebyl vytvořen',\n            'File was not uploaded' => 'Soubor byl vytvořen',\n            'File was deleted' => 'Soubor byl odstraněn',\n            'File was not deleted' => 'Soubor nebyl odstraněn',\n            'File exists' => 'Soubor existuje',\n            'Cancel' => 'Zrušit',\n            'Create' => 'Vytvořit',\n            'directory' => 'adresář',\n            'Delete directory: :dir' => 'Vymazat adresář: :dir',\n            'Delete file: :file' => 'Vymazat soubor :file',\n            'Extension' => 'Přípona',\n            'Size' => 'Velikost',\n            'Select file' => 'Vybrat soubor',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Dateien',\n            'Files manager' => 'Datei-Manager',\n            'Name' => 'Name',\n            'Actions' => 'Aktionen',\n            'Delete' => 'Löschen',\n            'Upload' => 'Hochladen',\n            'directory' => 'Ordner',\n            'Delete directory: :dir' => 'Lösche Ordner: :dir',\n            'Delete file: :file' => 'Lösche Datei: file',\n            'Extension' => 'Dateiendung',\n            'Size' => 'Größe',\n            'Select file' => 'Datei wählen',\n            'Change' => 'Ändern',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Files',\n            'Files manager' => 'Files manager',\n            'Name' => 'Name',\n            'Actions' => 'Actions',\n            'Delete' => 'Delete',\n            'Upload' => 'Upload',\n            'Create New Directory' => 'Create New Directory',\n            'directory' => 'directory',\n            'Delete directory: :dir' => 'Delete directory: :dir',\n            'Delete file: :file' => 'Delete file :file',\n            'Extension' => 'Extension',\n            'Size' => 'Size',\n            'Select file' => 'Select file',\n            'Change' => 'Change',\n            'Rename' => 'Rename',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Can not be empty' => 'Can not be empty',\n            'Directory exists' => 'Directory exists',\n            'File exists' => 'File exists',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'File was uploaded' => 'File was uploaded',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Upload server error' => 'Upload server error',\n            'Directory:' => 'Directory:',\n            'File:' => 'File:',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Archivos',\n            'Files manager' => 'Administrador de archivos',\n            'Name' => 'Nombre',\n            'Actions' => 'Acciones',\n            'Delete' => 'Eliminar',\n            'Upload' => 'Subir',\n            'Drop File Here' => 'Arrastrar archivo aquí',\n            'Maximum upload file size: :upload_max_filesize' => 'Tamaño máximo de subida: :upload_max_filesize',\n            'Rename' => 'Renombrar',\n            'Renamed successfully' => 'Renombrado exitoso',\n            'Failure' => 'Fracaso',\n            'Forbidden file type' => 'Tipo de archivo prohibido',\n            'Upload server error' => 'Error de subida del servidor',\n            'Can not be empty' => 'No puede estar vacío',\n            'Create New Directory' => 'Crear nuevo directorio',\n            'Directory Name' => 'Nombre del directorio',\n            'Directory:' => 'Directorio:',\n            'Directory was not created' => 'El directorio no fue creado',\n            'Directory was created' => 'El directorio fue creado',\n            'Directory was deleted' => 'El directorio fue eliminado',\n            'Directory was not deleted' => 'El directorio no fue eliminado',\n            'Directory exists' => 'El directorio ya existe',\n            'File:' => 'Archivo:',\n            'File was uploaded' => 'El archivo fue subido',\n            'File was not uploaded' => 'El archivo no fue subido',\n            'File was deleted' => 'El archivo fue eliminado',\n            'File was not deleted' => 'El archivo no fue eliminado',\n            'File exists' => 'El archivo ya existe',\n            'Cancel' => 'Cancelar',\n            'Create' => 'Crear',\n            'directory' => 'directorio',\n            'Delete directory: :dir' => 'Eliminar directorio: :dir',\n            'Delete file: :file' => 'Eliminar archivo: :file',\n            'Extension' => 'Extensión',\n            'Size' => 'Tamaño',\n            'Select file' => 'Seleccionar archivo',\n            'Change' => 'Cambiar',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'فایلها',\n            'Files manager' => 'مدیریت فایلها',\n            'Name' => 'نام',  \n            'Actions' => 'عملیات',\n            'Delete' => 'حذف',\n            'Upload' => 'آپلود',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n            'Rename' => 'Rename',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'Forbidden file type' => 'Forbidden file type',\n            'Upload server error' => 'Upload server error',\n            'Can not be empty' => 'Can not be empty',\n            'Create New Directory' => 'Create New Directory',\n            'Directory Name' => 'Directory Name',\n            'Directory:' => 'Directory:',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Directory exists' => 'Directory exists',\n            'File:' => 'File:',\n            'File was uploaded' => 'File was uploaded',\n            'File was not uploaded' => 'File was not uploaded',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'File exists' => 'File exists',\n            'Cancel' => 'Cancel',\n            'Create' => 'Create',\n            'directory' => 'شاخه',\n            'Delete directory: :dir' => 'حذف شاخه: :dir',        \n            'Delete file: :file' => 'حذف فایل :file',\n            'Extension' => 'پسوند',\n            'Size' => 'اندازه',\n            'Select file' => 'Select file',\n            'Change' => 'Change',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Fichiers',\n            'Files manager' => 'Gestionnaire de fichiers',\n            'Name' => 'Nom',  \n            'Actions' => 'Actions',\n            'Delete' => 'Supprimer',\n            'Upload' => 'Upload',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n            'Rename' => 'Rename',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'Forbidden file type' => 'Forbidden file type',\n            'Upload server error' => 'Upload server error',\n            'Can not be empty' => 'Can not be empty',\n            'Create New Directory' => 'Create New Directory',\n            'Directory Name' => 'Directory Name',\n            'Directory:' => 'Directory:',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Directory exists' => 'Directory exists',\n            'File:' => 'File:',\n            'File was uploaded' => 'File was uploaded',\n            'File was not uploaded' => 'File was not uploaded',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'File exists' => 'File exists',\n            'Cancel' => 'Cancel',\n            'Create' => 'Create',\n            'directory' => 'Répertoire',\n            'Delete directory: :dir' => 'Supprimer le répertoire: :dir',        \n            'Delete file: :file' => 'Supprimer le fichier :file',\n            'Extension' => 'Extension',\n            'Size' => 'Taille',\n            'Select file' => 'Select file',\n            'Change' => 'Change',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Fájlok',\n            'Files manager' => 'Fájlkezelő',\n            'Name' => 'Név',\n            'Actions' => 'Műveletek',\n            'Delete' => 'Törlés',\n            'Upload' => 'Feltöltés',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n            'Rename' => 'Rename',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'Forbidden file type' => 'Forbidden file type',\n            'Upload server error' => 'Upload server error',\n            'Can not be empty' => 'Can not be empty',\n            'Create New Directory' => 'Create New Directory',\n            'Directory Name' => 'Directory Name',\n            'Directory:' => 'Directory:',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Directory exists' => 'Directory exists',\n            'File:' => 'File:',\n            'File was uploaded' => 'File was uploaded',\n            'File was not uploaded' => 'File was not uploaded',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'File exists' => 'File exists',\n            'Cancel' => 'Cancel',\n            'Create' => 'Create',\n            'directory' => 'directory',\n            'Delete directory: :dir' => 'Directory törlése: :dir',\n            'Delete file: :file' => 'Fájl törlése :file',\n            'Extension' => 'Bővítmény',\n            'Size' => 'Méret',\n            'Select file' => 'Select file',\n            'Change' => 'Change',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'File',\n            'Files manager' => 'Pengaturan File',\n            'Name' => 'Nama',\n            'Actions' => 'Tindakan',\n            'Delete' => 'Hapus',\n            'Upload' => 'Unduh',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n            'Rename' => 'Rename',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'Forbidden file type' => 'Forbidden file type',\n            'Upload server error' => 'Upload server error',\n            'Can not be empty' => 'Can not be empty',\n            'Create New Directory' => 'Create New Directory',\n            'Directory Name' => 'Directory Name',\n            'Directory:' => 'Directory:',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Directory exists' => 'Directory exists',\n            'File:' => 'File:',\n            'File was uploaded' => 'File was uploaded',\n            'File was not uploaded' => 'File was not uploaded',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'File exists' => 'File exists',\n            'Cancel' => 'Cancel',\n            'Create' => 'Create',\n            'directory' => 'Direktori',\n            'Delete directory: :dir' => 'Hapus Direktori: :dir',\n            'Delete file: :file' => 'Hapus File: :file',\n            'Extension' => 'Tambahan',\n            'Size' => 'Ukuran',\n            'Select file' => 'Pilih File',\n            'Change' => 'Ubah',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'File',\n            'Files manager' => 'Gestione file',\n            'Name' => 'Nome',\n            'Actions' => 'Azioni',\n            'Delete' => 'Elimina',\n            'Upload' => 'Carica',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n            'Rename' => 'Rename',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'Forbidden file type' => 'Forbidden file type',\n            'Upload server error' => 'Upload server error',\n            'Can not be empty' => 'Can not be empty',\n            'Create New Directory' => 'Create New Directory',\n            'Directory Name' => 'Directory Name',\n            'Directory:' => 'Directory:',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Directory exists' => 'Directory exists',\n            'File:' => 'File:',\n            'File was uploaded' => 'File was uploaded',\n            'File was not uploaded' => 'File was not uploaded',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'File exists' => 'File exists',\n            'Cancel' => 'Cancel',\n            'Create' => 'Create',\n            'directory' => 'cartella',\n            'Delete directory: :dir' => 'Elimina cartella: :dir',\n            'Delete file: :file' => 'Elimina file :file',\n            'Extension' => 'Estensione',\n            'Size' => 'Dimensione',\n            'Select file' => 'Select file',\n            'Change' => 'Change',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'ファイル',\n            'Files manager' => 'ファイルの管理',\n            'Name' => '名前',\n            'Actions' => '操作',\n            'Delete' => '削除',\n            'Upload' => 'アップロード',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n            'Rename' => 'Rename',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'Forbidden file type' => 'Forbidden file type',\n            'Upload server error' => 'Upload server error',\n            'Can not be empty' => 'Can not be empty',\n            'Create New Directory' => 'Create New Directory',\n            'Directory Name' => 'Directory Name',\n            'Directory:' => 'Directory:',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Directory exists' => 'Directory exists',\n            'File:' => 'File:',\n            'File was uploaded' => 'File was uploaded',\n            'File was not uploaded' => 'File was not uploaded',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'File exists' => 'File exists',\n            'Cancel' => 'Cancel',\n            'Create' => 'Create',\n            'directory' => 'ディレクトリ',\n            'Delete directory: :dir' => 'ディレクトリの削除: :dir',\n            'Delete file: :file' => 'ファイルの削除 :file',\n            'Extension' => '拡張子',\n            'Size' => 'サイズ',\n            'Select file' => 'ファイルの選択',\n            'Change' => '変更',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'ფაილები',\n            'Files manager' => 'ფაილების მენეჯერი',\n            'Name' => 'სახელი',\n            'Actions' => 'მოქმედება',\n            'Delete' => 'წაშლა',\n            'Upload' => 'ატვირთვა',\n            'Drop File Here' => 'გადაიტანეთ ფაილი აქ',\n            'Maximum upload file size: :upload_max_filesize' => 'ფაილის მაქსიმალური ზომა: :upload_max_filesize',\n            'Rename' => 'გადარქმევა',\n            'Renamed successfully' => 'წარმატებით გადაირქვა',\n            'Failure' => 'ვერ მოხერხდა',\n            'Forbidden file type' => 'ფაილის აკრძალული ტიპი',\n            'Upload server error' => 'სერვერის შეცდომა ატვირთვის დროს',\n            'Can not be empty' => 'არ შეიძლება ცარიელი იყოს',\n            'Create New Directory' => 'ახალი დირექტორიის შექმნა',\n            'Directory Name' => 'დირექტორიის სახელი',\n            'Directory:' => 'დირექტორია:',\n            'Directory was not created' => 'დირექტორია ვერ შეიქმნა',\n            'Directory was created' => 'დირექტორია შეიქმნა',\n            'Directory was deleted' => 'დირექტორია წაშლილია',\n            'Directory was not deleted' => 'დირექტორია ვერ წაიშალა',\n            'Directory exists' => 'დირექტორია უკვე არსებობს',\n            'File:' => 'ფაილი:',\n            'File was uploaded' => 'ფაილი აიტვირთა',\n            'File was not uploaded' => 'ფაილი ვერ აიტვირთა',\n            'File was deleted' => 'ფაილი წაშლილია',\n            'File was not deleted' => 'ფაილი ვერ წაიშალა',\n            'File exists' => 'ფაილი უკვე არსებობს',\n            'Cancel' => 'გაუქმება',\n            'Create' => 'შექმნა',\n            'directory' => 'დირექტორია',\n            'Delete directory: :dir' => 'დირექტორიის წაშლა: :dir',\n            'Delete file: :file' => 'ფაილის წაშლა:file',\n            'Extension' => 'გაფართოება',\n            'Size' => 'ფაილი',\n            'Select file' => 'ფაილის ამორჩევა',            \n            'Change' => 'შეცვლა',\n            'Info' => 'ინფო',\n            'File Information' => 'ინფორმაცია ფაილზე',\n            'Filename' => 'ფაილის სახელწოდება',\n            'Filetype' => 'ფაილის ტიპი',\n            'Filesize' => 'ფაილის ზომა',\n            'Dimension' => 'სიდიდე',\n            'Link' => 'ბმული',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Bylos',\n            'Files manager' => 'Bylų tvarkyklė',\n            'Name' => 'Pavadinimas',\n            'Actions' => 'Veiksmai',\n            'Delete' => 'Ištrinti',\n            'Upload' => 'Įkelti',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n            'Rename' => 'Rename',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'Forbidden file type' => 'Forbidden file type',\n            'Upload server error' => 'Upload server error',\n            'Can not be empty' => 'Can not be empty',\n            'Create New Directory' => 'Create New Directory',\n            'Directory Name' => 'Directory Name',\n            'Directory:' => 'Directory:',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Directory exists' => 'Directory exists',\n            'File:' => 'File:',\n            'File was uploaded' => 'File was uploaded',\n            'File was not uploaded' => 'File was not uploaded',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'File exists' => 'File exists',\n            'Cancel' => 'Cancel',\n            'Create' => 'Create',\n            'directory' => 'aplankas',\n            'Delete directory: :dir' => 'Ištrinti aplanką: :dir',\n            'Delete file: :file' => 'Ištrinti bylą :file',\n            'Extension' => 'Plėtinys',\n            'Size' => 'Dydis',\n            'Select file' => 'Select file',\n            'Change' => 'Change',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Bestanden',\n            'Files manager' => 'Bestandsbeheer',\n            'Name' => 'Naam',\n            'Actions' => 'Acties',\n            'Delete' => 'Verwijderen',\n            'Upload' => 'Uploaden',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n            'Rename' => 'Rename',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'Forbidden file type' => 'Forbidden file type',\n            'Upload server error' => 'Upload server error',\n            'Can not be empty' => 'Can not be empty',\n            'Create New Directory' => 'Create New Directory',\n            'Directory Name' => 'Directory Name',\n            'Directory:' => 'Directory:',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Directory exists' => 'Directory exists',\n            'File:' => 'File:',\n            'File was uploaded' => 'File was uploaded',\n            'File was not uploaded' => 'File was not uploaded',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'File exists' => 'File exists',\n            'Cancel' => 'Cancel',\n            'Create' => 'Create',\n            'directory' => 'Map',\n            'Delete directory: :dir' => 'Verwijder map: :dir',\n            'Delete file: :file' => 'Verwijder bestand: :file',\n            'Extension' => 'Type',\n            'Size' => 'Grootte',\n            'Select file' => 'Select file',\n            'Change' => 'Change',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Pliki',\n            'Files manager' => 'Zarządzaj plikami',\n            'Name' => 'Nazwa',\n            'Actions' => 'Akcje',\n            'Delete' => 'Usuń',\n            'Upload' => 'Prześlij',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n            'Rename' => 'Rename',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'Forbidden file type' => 'Forbidden file type',\n            'Upload server error' => 'Upload server error',\n            'Can not be empty' => 'Can not be empty',\n            'Create New Directory' => 'Create New Directory',\n            'Directory Name' => 'Directory Name',\n            'Directory:' => 'Directory:',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Directory exists' => 'Directory exists',\n            'File:' => 'File:',\n            'File was uploaded' => 'File was uploaded',\n            'File was not uploaded' => 'File was not uploaded',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'File exists' => 'File exists',\n            'Cancel' => 'Cancel',\n            'Create' => 'Create',\n            'directory' => 'katalog',\n            'Delete directory: :dir' => 'Czy napewno usunąć katalog: :dir',\n            'Delete file: :file' => 'Czy napewno usunąć plik :file',\n            'Extension' => 'Rozszerzenie',\n            'Size' => 'Rozmiar',\n            'Select file' => 'Select file',\n            'Change' => 'Change',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Arquivos',\n            'Files manager' => 'Gerenciador de arquivos',\n            'Name' => 'Nome',\n            'Actions' => 'Ações',\n            'Delete' => 'Deletar',\n            'Upload' => 'Upload',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n            'Rename' => 'Rename',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'Forbidden file type' => 'Forbidden file type',\n            'Upload server error' => 'Upload server error',\n            'Can not be empty' => 'Can not be empty',\n            'Create New Directory' => 'Create New Directory',\n            'Directory Name' => 'Directory Name',\n            'Directory:' => 'Directory:',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Directory exists' => 'Directory exists',\n            'File:' => 'File:',\n            'File was uploaded' => 'File was uploaded',\n            'File was not uploaded' => 'File was not uploaded',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'File exists' => 'File exists',\n            'Cancel' => 'Cancel',\n            'Create' => 'Create',\n            'directory' => 'directory',\n            'Delete directory: :dir' => 'Deletar o diretório: :dir',\n            'Delete file: :file' => 'Deletar o arquivo :file',\n            'Extension' => 'Extensão',\n            'Size' => 'Tamanho',\n            'Select file' => 'Select file',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Файлы',\n            'Files manager' => 'Менеджер файлов',\n            'Name' => 'Название',\n            'Actions' => 'Действия',\n            'Delete' => 'Удалить',\n            'Upload' => 'Загрузить',\n            'Drop File Here' => 'Перетащите файл сюда',\n            'Maximum upload file size: :upload_max_filesize' => 'Максимальный размер файла: :upload_max_filesize',\n            'Rename' => 'Переименовать',\n            'Renamed successfully' => 'Успешно переименован',\n            'Failure' => 'Провал',\n            'Forbidden file type' => 'Запрещенный тип файла',\n            'Upload server error' => 'Ошибка сервера при загрузке',\n            'Can not be empty' => 'Не может быть пустым',\n            'Create New Directory' => 'Создать новую директорию',\n            'Directory Name' => 'Название директории',\n            'Directory:' => 'Директория:',\n            'Directory was not created' => 'Директория не была создана',\n            'Directory was created' => 'Директория была создана',\n            'Directory was deleted' => 'Директория была удалена',\n            'Directory was not deleted' => 'Директория не была удалена',\n            'Directory exists' => 'Директория уже существует',\n            'File:' => 'Файл:',\n            'File was uploaded' => 'Файл был загружен',\n            'File was not uploaded' => 'Файл не был загружен',\n            'File was deleted' => 'Файл был удален',\n            'File was not deleted' => 'Файл не был удален',\n            'File exists' => 'Файл существует',\n            'Cancel' => 'Отменить',\n            'Create' => 'Создать',\n            'directory' => 'директория',\n            'Delete directory: :dir' => 'Удалить директорию: :dir',\n            'Delete file: :file' => 'Удалить файл :file',\n            'Extension' => 'Расширение',\n            'Size' => 'Размер',\n            'Select file' => 'Выбрать файл',            \n            'Change' => 'Изменить',\n            'Info' => 'Инфо',\n            'File Information' => 'Информация о файле',\n            'Filename' => 'Название файла',\n            'Filetype' => 'Тип файла',\n            'Filesize' => 'Размер файла',\n            'Dimension' => 'Разрешение',\n            'Link' => 'Ссылка',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Súbory',\n            'Files manager' => 'Manažér súborov',\n            'Name' => 'Názov',\n            'Actions' => 'Akcie',\n            'Delete' => 'Vymazať',\n            'Upload' => 'Nahrať',\n            'Drop File Here' => 'Drop File Here',\n            'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',\n            'Rename' => 'Rename',\n            'Renamed successfully' => 'Renamed successfully',\n            'Failure' => 'Failure',\n            'Forbidden file type' => 'Forbidden file type',\n            'Upload server error' => 'Upload server error',\n            'Can not be empty' => 'Can not be empty',\n            'Create New Directory' => 'Create New Directory',\n            'Directory Name' => 'Directory Name',\n            'Directory:' => 'Directory:',\n            'Directory was not created' => 'Directory was not created',\n            'Directory was created' => 'Directory was created',\n            'Directory was deleted' => 'Directory was deleted',\n            'Directory was not deleted' => 'Directory was not deleted',\n            'Directory exists' => 'Directory exists',\n            'File:' => 'File:',\n            'File was uploaded' => 'File was uploaded',\n            'File was not uploaded' => 'File was not uploaded',\n            'File was deleted' => 'File was deleted',\n            'File was not deleted' => 'File was not deleted',\n            'File exists' => 'File exists',\n            'Cancel' => 'Cancel',\n            'Create' => 'Create',\n            'directory' => 'priečinok',\n            'Delete directory: :dir' => 'Vymazať priečinok: :dir',\n            'Delete file: :file' => 'Vymazať súbor :file',\n            'Extension' => 'Rozšírenie',\n            'Size' => 'Veľkosť',\n            'Select file' => 'Select file',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Fajlovi',\n            'Files manager' => 'Menadžer fajlova',\n            'Name' => 'Ime',  \n            'Actions' => 'Akcije',\n            'Delete' => 'Obriši',\n            'Upload' => 'Dodaj',\n            'Drop File Here' => 'Ostavi fajl ovde',\n            'Maximum upload file size: :upload_max_filesize' => 'Maksimum veličina fajla za dodavanje: :upload_max_filesize',\n            'Rename' => 'Promeni ime',\n            'Renamed successfully' => 'Ime uspešno promenjeno',\n            'Failure' => 'Dogodila se greška',\n            'Forbidden file type' => 'Zabranjena ekstenzija fajla',\n            'Upload server error' => 'Greška prilikom dodavanja servera',\n            'Can not be empty' => 'Ne može biti prazno',\n            'Create New Directory' => 'Napravi novi direktorijum',\n            'Directory Name' => 'Ime direktorijuma',\n            'Directory:' => 'Direktorijum:',\n            'Directory was not created' => 'Direktorijum nije kreiran',\n            'Directory was created' => 'Diektorijum je kreiran',\n            'Directory was deleted' => 'Direktorijum je obrisan',\n            'Directory was not deleted' => 'Direktorijum nije obrisan',\n            'Directory exists' => 'Direktorijum već postoji',\n            'File:' => 'Fajl:',\n            'File was uploaded' => 'Fajl je dodat',\n            'File was not uploaded' => 'Fajl nije dodat',\n            'File was deleted' => 'Fajl je obrisan',\n            'File was not deleted' => 'Fajl nije obrisan',\n            'File exists' => 'Fajl već postoji',\n            'Cancel' => 'Otkaži',\n            'Create' => 'Kreiraj',\n            'directory' => 'Direktorijum',\n            'Delete directory: :dir' => 'Obriši direktorijum: :dir',        \n            'Delete file: :file' => 'Obriši fajl :file',\n            'Extension' => 'Extenzija',\n            'Size' => 'Veličina',\n            'Select file' => 'Odaberi fajl',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Dosyalar',\n            'Files manager' => 'Dosya yöneticisi',\n            'Name' => 'Ad',\n            'Actions' => 'İşlemler',\n            'Delete' => 'Sil',\n            'Upload' => 'Yükle',\n            'Create New Directory' => 'Yeni Dizin Oluştur',\n            'directory' => 'dizin',\n            'Delete directory: :dir' => ':dir dizini silinsin mi',\n            'Delete file: :file' => ':file dosyası silinsin mi',\n            'Extension' => 'Uzantı',\n            'Size' => 'Boyut',\n            'Directory Name' => 'Dizin Adı',\n            'Select file' => 'Dosya seç',\n            'Cancel' => 'Vazgeç',\n            'Create' => 'Oluştur',\n            'Rename' => 'Yeniden Adlandır',\n            'File was deleted' => 'Dosya silindi',\n            'File was not deleted' => 'Dosya silinmedi',\n            'Directory was deleted' => 'Dizin silindi',\n            'Directory was not deleted' => 'Dizin silinmedi',\n            'Can not be empty' => 'Boş olamaz',\n            'Directory exists' => 'Dizin zaten var',\n            'File exists' => 'Dosya zaten var',\n            'Renamed successfully' => 'Başarıyla yeniden adlandırıldı',\n            'Failure' => 'Başarısız',\n            'File was uploaded' => 'Dosya yüklendi',\n            'Directory was not created' => 'Dizin oluşturulmadı',\n            'Directory was created' => 'Dizin oluşturuldu',\n            'Upload server error' => 'Yükleme sunucusunda hata',\n            'Directory:' => 'Dizin:',\n            'File:' => 'Dosya:',\n            'Drop File Here' => 'Dosyayı Buraya Bırakınız',\n            'Maximum upload file size: :upload_max_filesize' => 'Dosya büyüklüğü üst sınırı: :upload_max_filesize',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => 'Файли',\n            'Files manager' => 'Менеджер файлів',\n            'Name' => 'Назва',\n            'Actions' => 'Дії',\n            'Delete' => 'Видалити',\n            'Upload' => 'Завантажити',\n            'Drop File Here' => 'Вкиньте файл сюди',\n            'Maximum upload file size: :upload_max_filesize' => 'Максимальний розмір файлу: :upload_max_filesize',\n            'Rename' => 'Перейменувати',\n            'Renamed successfully' => 'Успішно перейменований',\n            'Failure' => 'Помилка',\n            'Forbidden file type' => 'Заборонений тип файлу',\n            'Upload server error' => 'Помилка сервера при завантаженні',\n            'Can not be empty' => 'Не може бути порожнім',\n            'Create New Directory' => 'Створити нову теку',\n            'Directory Name' => 'Назва теки',\n            'Directory:' => 'Тека:',\n            'Directory was not created' => 'Тека не була створена',\n            'Directory was created' => 'Тека була створена',\n            'Directory was deleted' => 'Тека була видалена',\n            'Directory was not deleted' => 'Тека не була видалена',\n            'Directory exists' => 'Тека існує',\n            'File:' => 'Файл:',\n            'File was uploaded' => 'Файл був завантажений',\n            'File was not uploaded' => 'Файл не був завантажений',\n            'File was deleted' => 'Файл був видалений',\n            'File was not deleted' => 'Файл не був видалений',\n            'File exists' => 'Файл існує',\n            'Cancel' => 'Відмінити',\n            'Create' => 'Створити',\n            'directory' => 'тека',\n            'Delete directory: :dir' => 'Видалити теку: :dir',\n            'Delete file: :file' => 'Видалити файл: :file',\n            'Extension' => 'Розширення',\n            'Size' => 'Розмір',\n            'Select file' => 'Вибрати файл',\n            'Change' => 'Змінити',\n            'Info' => 'Інфо',\n            'File Information' => 'Інформація про файл',\n            'Filename' => 'Назва файлу',\n            'Filetype' => 'Тип файлу',\n            'Filesize' => 'Размір файлу',\n            'Dimension' => 'Вирішення',\n            'Link' => 'Лінк',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'filesmanager' => array(\n            'Files' => '文件',\n            'Files manager' => '文件管理',\n            'Name' => '名称',\n            'Actions' => '操作',\n            'Delete' => '删除',\n            'Upload' => '上传',\n            'directory' => '目录',\n            'Delete directory: :dir' => '删除目录: :dir',\n            'Delete file: :file' => '删除文件 :file',\n            'Extension' => '扩展名',\n            'Size' => '尺寸',\n\t\t\t'Select file' => '选择文件',\n            'Change' => '更改',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/filesmanager/views/backend/index.view.php",
    "content": "<script type=\"text/javascript\">\n\t$(document).ready(function(){\n\t\t$.monstra.fileuploader.init($.extend({}, {uploaderId:'DgDfileUploader'}, <?php echo json_encode($fileuploader); ?>));\n\t\t$(document).on('uploaded.fuploader', function(){\n\t\t\tlocation.href = $.monstra.fileuploader.conf.uploadUrl;\n\t\t});\n\t});\n</script>\n\n<h2 class=\"margin-bottom-1\"><?php echo __('Files', 'filesmanager'); ?></h2>\n\n<!-- Filesmanager_upload_files -->\n    <div class=\"row\">\n    <?php\n        echo (\n            Form::open(null, array('enctype' => 'multipart/form-data', 'class' => 'form-inline')).\n            Form::hidden('csrf', Security::token())\n        );\n    ?>    \n    <div class=\"col-md-10\">\n\n    <div class=\"fileinput fileinput-new pull-left\" data-provides=\"fileinput\">\n      <span class=\"btn btn-default btn-file\"><span class=\"fileinput-new\"><?php echo __('Select file', 'filesmanager'); ?></span><span class=\"fileinput-exists\"><?php echo __('Change', 'filesmanager'); ?></span><input type=\"file\" name=\"file\"></span>\n      <?php\n          echo (\n              Form::submit('upload_file', __('Upload', 'filesmanager'), array('class' => 'btn btn-primary')).\n              Form::close()\n          )\n      ?>            \n      <span class=\"fileinput-filename\"></span>   \n      <a href=\"#\" class=\"close fileinput-exists\" data-dismiss=\"fileinput\" style=\"float: none\">&times;</a>\n    </div>\n\n\t<div id=\"DgDfileUploader\" class=\"hidden-xs\">\n\t\t<div class=\"upload-area\">\n\t\t\t<div class=\"upload-progress\"></div>\n\t\t\t<div class=\"upload-file-pholder\"><?php echo __('Drop File Here', 'filesmanager'); ?></div>\n\t\t</div>\n\t\t<div class=\"upload-file-info\"></div>\n\t\t<div class=\"btn btn-link file-size-max-upload hidden-sm hidden-md\">\n\t\t\t<?php echo __('Maximum upload file size: :upload_max_filesize', 'filesmanager', array(':upload_max_filesize' => $upload_max_filesize)); ?>\n\t\t</div>\n\t</div>\n    </div>\n    <div class=\"col-md-2\">\n        <div class=\"pull-right create-new-dir\">\n        <button class=\"btn btn-primary\" data-toggle=\"modal\" data-target=\"#createNewDirectory\">\n          <?php echo __('Create New Directory', 'filesmanager'); ?>\n        </button>\n        </div>\n    </div>\n    </div>\n<!-- /Filesmanager_upload_files -->\n\n<!-- Filesmanger_path -->\n<ol class=\"breadcrumb margin-top-1\">\n\n      <?php\n        $path_parts = explode ('/',$path);\n\n        foreach ($path_parts as $key => $value) {\n            if ($path_parts[$key] == '') {\n                unset($path_parts[$key]);\n            }\n        }\n\n        $s = '';\n\n        foreach ($path_parts as $p) {\n            $s .= $p.'/';\n            if($p == $current[count($current)-2]) $active = ' class=\"active\"'; else $active = '';\n            echo '<li'.$active.'><a href=\"index.php?id=filesmanager&path='.$s.'\">'.$p.'</a></li>';\n        }\n    ?>\n</ol>\n<!-- /Filesmanger_path -->\n\n<div class=\"table-responsive\">\n<table class=\"table table-bordered\" id=\"filesDirsList\">\n    <thead>\n        <tr>\n            <th><?php echo __('Name', 'filesmanager'); ?></th>\n            <th><?php echo __('Extension', 'filesmanager'); ?></th>\n            <th><?php echo __('Size', 'filesmanager'); ?></th>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n        <?php if (isset($dir_list)) foreach ($dir_list as $dir) { ?>\n        <tr>\n            <td>\n                <b><?php echo Html::anchor($dir, 'index.php?id=filesmanager&path='.$path.$dir.'/'); ?></b>\n            </td>\n            <td>\n\n            </td>\n            <td>\n                <!-- Dir Size -->\n            </td>\n            <td>\n            <div class=\"pull-right\">\n                <button class=\"btn btn-primary js-rename-dir\" data-dirname=\"<?php echo $dir; ?>\" data-path=\"<?php echo $path; ?>\">\n                    <?php echo __('Rename', 'filesmanager'); ?>\n                </button>\n                <?php echo Html::anchor(__('Delete', 'filesmanager'),\n                           'index.php?id=filesmanager&delete_dir='.$dir.'&path='.$path.'&token='.Security::token(),\n                           array('class' => 'btn btn-danger', 'onclick' => \"return confirmDelete('\".__('Delete directory: :dir', 'filesmanager', array(':dir' => $dir)).\"')\"));\n                ?>\n            </div>\n            </td>\n        </tr>\n        <?php } ?>\n        <?php if (isset($files_list)) foreach ($files_list as $file) { $ext = File::ext($file); ?>\n        <?php if ( ! in_array($ext, $forbidden_types)) {\n\t\t\t$dimension = '';\n\t\t\tif (in_array(strtolower($ext), $image_types)) {\n\t\t\t\t$dim = getimagesize($files_path. DS .$file);\n\t\t\t\tif (isset($dim[0]) && isset($dim[1])) { $dimension = $dim[1] .'x'. $dim[0] .' px'; }\n\t\t\t}\n\t\t?>\n        <tr>\n            <td<?php if (isset(File::$mime_types[$ext]) && preg_match('/image/', File::$mime_types[$ext])) echo ' class=\"image\"'?>>\n                <?php if (isset(File::$mime_types[$ext]) && preg_match('/image/', File::$mime_types[$ext])) { ?>\n                    <?php echo Html::anchor(File::name($file), $site_url.'/public/' . $path.$file, array('rel' => $site_url.'/public/' . $path.$file, 'class' => 'chocolat', 'data-toggle' => 'lightbox'));?>\n                <?php } else { ?>\n                    <?php echo Html::anchor(File::name($file), $site_url.'/public/' . $path.$file, array('target'=>'_blank'));?>\n                <?php } ?>\n            </td>\n            <td>\n                <?php echo $ext; ?>\n            </td>\n            <td>\n                <?php echo Number::byteFormat(filesize($files_path. DS .$file)); ?>\n            </td>\n            <td>\n            <div class=\"pull-right\">\n\t\t\t\t<button class=\"btn btn-info js-file-info\"\n\t\t\t\t\tdata-filename=\"<?php echo str_replace('\"', '\\'', htmlentities($file)); ?>\"\n\t\t\t\t\tdata-filetype=\"<?php echo $ext; ?>\"\n\t\t\t\t\tdata-filesize=\"<?php echo Number::byteFormat(filesize($files_path. DS .$file)); ?>\"\n\t\t\t\t\tdata-dimension=\"<?php echo htmlentities($dimension); ?>\"\n\t\t\t\t\tdata-link=\"<?php echo $site_url.'/public/' . $path.$file; ?>\"\n\t\t\t\t>\n\t\t\t\t\t<?php echo __('Info', 'filesmanager'); ?>\n\t\t\t\t</button>\n                <button class=\"btn btn-primary js-rename-file\" data-filename=\"<?php echo $file; ?>\" data-path=\"<?php echo $path; ?>\">\n                    <?php echo __('Rename', 'filesmanager'); ?>\n                </button>\n            <?php echo Html::anchor(__('Delete', 'filesmanager'),\n                       'index.php?id=filesmanager&delete_file='.$file.'&path='.$path.'&token='.Security::token(),\n                       array('class' => 'btn btn-danger', 'onclick' => \"return confirmDelete('\".__('Delete file: :file', 'filesmanager', array(':file' => $file)).\"')\"));\n            ?>\n            </div>\n            </td>\n        </tr>\n        <?php } } ?>\n    </tbody>\n</table>\n</div>\n\n<div id=\"createNewDirectory\" class=\"modal fade\" tabindex=\"-1\">\n  <div class=\"modal-dialog\">\n    <div class=\"modal-content\">\n      <div class=\"modal-header\">\n        <div class=\"close\" data-dismiss=\"modal\">&times;</div>\n        <h4 class=\"modal-title\" id=\"myModalLabel\"><?php echo __('Create New Directory', 'filesmanager'); ?></h4>\n      </div>\n      <form role=\"form\" method=\"POST\">\n        <?php echo Form::hidden('csrf', Security::token()); ?>\n          <div class=\"modal-body\">\n            <label for=\"directoryName\"><?php echo __('Directory Name', 'filesmanager'); ?></label>\n            <input type=\"hidden\" name=\"path\" value=\"<?php echo $path; ?>\" />\n            <input type=\"text\" class=\"form-control\" id=\"directoryName\" name=\"directory_name\" />        \n          </div>\n          <div class=\"modal-footer\">\n            <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\"><?php echo __('Cancel', 'filesmanager'); ?></button>\n            <button type=\"submit\" class=\"btn btn-primary\"><?php echo __('Create', 'filesmanager'); ?></button>        \n          </div>\n      </form>\n    </div>\n  </div>\n</div>\n\n<div id=\"renameDialog\" class=\"modal fade\" tabindex=\"-1\">\n  <div class=\"modal-dialog\">\n    <div class=\"modal-content\">\n      <div class=\"modal-header\">\n        <div class=\"close\" data-dismiss=\"modal\">&times;</div>\n        <h4 class=\"modal-title\"><?php echo __('Rename', 'filesmanager'); ?></h4>\n      </div>\n      <form role=\"form\" method=\"POST\">\n        <?php echo Form::hidden('csrf', Security::token()); ?>\n        <div class=\"modal-body\">\n            <label for=\"renameTo\">\n                <span id=\"dirRenameType\"><?php echo __('Directory:', 'filesmanager'); ?></span>\n                <span id=\"fileRenameType\"><?php echo __('File:', 'filesmanager'); ?></span>\n                <strong id=\"renameToHolder\"></strong>\n            </label>\n            <input type=\"hidden\" name=\"path\" value=\"\" />\n            <input type=\"hidden\" name=\"rename_type\" value=\"\" />\n            <input type=\"hidden\" name=\"rename_from\" value=\"\" />\n            <input type=\"text\" class=\"form-control\" id=\"renameTo\" name=\"rename_to\" />\n        </div>\n        <div class=\"modal-footer\">\n          <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\"><?php echo __('Cancel', 'filesmanager'); ?></button>\n          <button type=\"submit\" class=\"btn btn-primary\"><?php echo __('Rename', 'filesmanager'); ?></button>\n        </div>\n      </form>\n    </div>\n  </div>\n</div>\n\n<div id=\"fileInfoDialog\" class=\"modal fade\" tabindex=\"-1\">\n\t<div class=\"modal-dialog\">\n\t\t<div class=\"modal-content\">\n\t\t\t<div class=\"modal-header\">\n\t\t\t\t<div class=\"close\" data-dismiss=\"modal\">&times;</div>\n\t\t\t\t<h4 class=\"modal-title\"><?php echo __('File Information', 'filesmanager'); ?></h4>\n\t\t\t</div>\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-md-3\"><?php echo __('Filename', 'filesmanager'); ?>:</div>\n\t\t\t\t\t<div class=\"col-md-9 js-filename\"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-md-3\"><?php echo __('Filetype', 'filesmanager'); ?>:</div>\n\t\t\t\t\t<div class=\"col-md-9 js-filetype\"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-md-3\"><?php echo __('Filesize', 'filesmanager'); ?>:</div>\n\t\t\t\t\t<div class=\"col-md-9 js-filesize\"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"row js-dimension-blck\">\n\t\t\t\t\t<div class=\"col-md-3\"><?php echo __('Dimension', 'filesmanager'); ?>:</div>\n\t\t\t\t\t<div class=\"col-md-9 js-dimension\"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-md-3\"><?php echo __('Link', 'filesmanager'); ?>:</div>\n\t\t\t\t\t<div class=\"col-md-9 js-link\"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>"
  },
  {
    "path": "plugins/box/information/information.admin.php",
    "content": "<?php\n\n// Add plugin navigation link\nNavigation::add(__('Information', 'information'), 'system', 'information', 6);\n\n/**\n * Information Admin Class\n */\nclass InformationAdmin extends Backend\n{\n    /**\n     * Information main function\n     */\n    public static function main()\n    {\n        // Init vars\n        $php_modules = array();\n\n        // Get array with the names of all modules compiled and loaded\n        $php_modules = get_loaded_extensions();\n\n        // Display view\n        View::factory('box/information/views/backend/index')\n            ->assign('php_modules', $php_modules)\n            ->display();\n    }\n\n}\n"
  },
  {
    "path": "plugins/box/information/information.plugin.php",
    "content": "<?php\n\n/**\n *\tInformation plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Information', 'information'),\n                __('Information plugin', 'information'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {\n\n    // Include Information Admin\n    Plugin::Admin('information', 'box');\n\n}\n"
  },
  {
    "path": "plugins/box/information/install/information.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/information/information.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>7</plugin_priority>\n    <plugin_name>Information</plugin_name>\n    <plugin_description>Information plugin</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/information/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Informace',\n            'Debugging' => 'Ladění',\n            'Name' => 'Název',\n            'Value' => 'Hodnota',\n            'Security' => 'Bezpečnost',\n            'System' => 'System',\n            'on' => 'zapnuto',\n            'off'=> 'vypnuto',\n            'Server' => 'Server',\n            'PHP version' => 'Verze PHP',\n            'SimpleXML module' => 'Modul SimpleXML',\n            'DOM module' => 'Modul DOM',\n            'Installed' => 'Nainstalované',\n            'Not Installed' => 'Nenainstalované',\n            'Security check results' => 'Výsledky bezpečnostní kontroly',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'Konfigurační soubor je zapisovatelný. Doporučujeme Vám odstranit oprávnění jakéhokoliv zápisu pro defines.php na produkčních systémech',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'Základní adresář Monstra (\":path\") a/anebo soubory jsou zapisovatelné. Doporučujeme Vám odstranit oprávnění jakéhokoliv zápisu. <br>Na Unix systémech provedete opravu příkazem: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Monstra .htaccess jsoubor je zapisovatelný. Doporučujeme Vám odstranit oprávnění jakéhokoliv zápisu. <br>Na Unix systémech provedete opravu příkazem: <code>chmod a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Monstra index.php jsoubor je zapisovatelný. Doporučujeme Vám odstranit oprávnění jakéhokoliv zápisu. <br>Na Unix systémech provedete opravu příkazem: <code>chmod a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>\n            'Vzhledem k povaze a množství informácí, které mohou obsahovat chybová hlášení při nastavení Core::$environment = Core::DEVELOPMENT, na produkčních systémech důrazně doporučujeme nastavit Core::PRODUCTION.',\n            'Monstra version' => 'Verze Monstra',\n            'Directory Permissions' => 'Práva adresáře',\n            'Directory' => 'Adresář',\n            'Writable' => 'Zapisovatelný',\n            'Unwritable' => 'Nezapisovatelný',\n            'Status' => 'Status',\n            'PHP Built On' => 'PHP Built On',\n            'Web Server' => 'Web Server',\n            'WebServer to PHP Interface' => 'WebServer to PHP Interface',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Informationen',\n            'Debuging' => 'Debugging',\n            'Name' => 'Name',\n            'Value' => 'Wert',\n            'Security' => 'Sicherheit',\n            'System' => 'System',\n            'on' => 'An',\n            'off'=> 'Aus',\n            'Server' => 'Server',\n            'PHP version' => 'PHP Version',\n            'SimpleXML module' => 'SimpleXML Modul',\n            'DOM module' => 'DOM Modul',\n            'Installed' => 'Installiert',\n            'Not Installed' => 'Nicht Installiert',\n            'Security check results' => 'Sicherheits-Check Ergebnisse',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'Die Konfigurationsdatei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte für defines.php auf Produktionssystemen zu entfernen.',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Die Monstra .htaccess Datei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte zu entfernen. <br>Du kannst dies auf Unix-Systemen ganz einfach mit: <code>chmod a-w :path</code> erledigen.',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Die Monstra index.php Datei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte zu entfernen. <br>Du kannst dies auf Unix-Systemen ganz einfach mit: <code>chmod a-w :path</code> erledigen.',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Aufgrund der Art und Menge der Informationen kann ein Fehler Eindringlinge ergeben wenn Monstra::$environment = Monstra::DEVELOPMENT, wir raten dringend dazu folgendermaßen Monstra::PRODUCTION in Produktionssystemen einzustellen.',\n            'Monstra version' => 'Monstra version',\n            'Directory Permissions' => 'Directory Berechtigungen',\n            'Directory' => 'Verzeichnis',\n            'Writable' => 'Beschreibbar',\n            'Unwritable' => 'Nicht beschreibbar',\n            'Status' => 'Status',\n            'PHP Built On' => 'PHP Built On',\n            'Web Server' => 'Web Server',\n            'WebServer to PHP Interface' => 'WebServer to PHP Interface',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Information',\n            'Debugging' => 'Debugging',\n            'Name' => 'Name',\n            'Value' => 'Value',\n            'Security' => 'Security',\n            'System' => 'System',\n            'on' => 'on',\n            'off'=> 'off',\n            'Server' => 'Server',\n            'PHP version' => 'PHP version',\n            'SimpleXML module' => 'SimpleXML module',\n            'DOM module' => 'DOM module',\n            'Installed' => 'Installed',\n            'Not Installed' => 'Not Installed',\n            'Security check results' => 'Security check results',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.',\n            'Monstra version' => 'Monstra version',\n            'Directory Permissions' => 'Directory Permissions',\n            'Directory' => 'Directory',\n            'Writable' => 'Writable',\n            'Unwritable' => 'Unwritable',\n            'Status' => 'Status',\n            'PHP Built On' => 'PHP Built On',\n            'Web Server' => 'Web Server',\n            'WebServer to PHP Interface' => 'WebServer to PHP Interface',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Información',\n            'Debugging' => 'Depuración',\n            'Name' => 'Nombre',\n            'Value' => 'Valor',\n            'Security' => 'Seguridad',\n            'System' => 'Sistema',\n            'on' => 'Activado',\n            'off'=> 'Desactivado',\n            'Server' => 'Servidor',\n            'PHP version' => 'Versión PHP',\n            'SimpleXML module' => 'Módulo SimpleXML',\n            'DOM module' => 'Módulo DOM',\n            'Installed' => 'Instalado',\n            'Not Installed' => 'No instalado',\n            'Security check results' => 'Resultados del control de seguridad',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'El archivo de configuración se ha encontrado ser accesible. Te recomendamos quitar todos los permisos de escritura en defines.php en los sistemas de producción.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'El directorio núcleo de Monstra (\":path\") y/o los archivos por debajo del mismo se han encontrado ser accesibles. Te recomendamos quitar todos los permisos de escritura. <br>Puedes hacer esto en sistemas Unix con: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'El archivo .htaccess de Monstra se ha encontrado ser accesible. Te recomendamos quitar todos los permisos de escritura. <br>Puedes hacer esto en sistemas Unix con: <code>chmod a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'El archivo index.php de Monstra se ha encontrado ser accesible. Te recomendamos quitar todos los permisos de escritura. <br>Puedes hacer esto en sistemas Unix con: <code>chmod a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>\n            'Debido al tipo y cantidad de información que un error podría dar a los intrusos cuando Core::$environment = Core::DEVELOPMENT, te recomendamos ajustar Core::PRODUCTION en sistemas de producción.',\n            'Monstra version' => 'Versión Monstra',\n            'Directory Permissions' => 'Permisos de directorio',\n            'Directory' => 'Directorio',\n            'Writable' => 'Accesible',\n            'Unwritable' => 'No accesible',\n            'Status' => 'Estado',\n            'PHP Built On' => 'PHP construido en',\n            'Web Server' => 'Servidor web',\n            'WebServer to PHP Interface' => 'Servidor web para interfaz PHP',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'اطلاعات',\n            'Debugging' => 'اشکال زدایی',\n            'Name' => 'نام',\n            'Value' => 'مقدار',\n            'Security' => 'امنیت',\n            'System' => 'سیستم',\n            'on' => 'روشن',\n            'off'=> 'خاموش',   \n            'Server' => 'سرور',\n            'PHP version' => 'نسخه PHP',\n            'SimpleXML module' => 'ماژول SimpleXML',\n            'DOM module' => 'ماژول DOM',\n            'Installed' => 'نصب شده',\n            'Not Installed' => 'نصب نشده',\n            'Security check results' => 'نتایج بررسیهای امنیتی',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => \n            'فایل پیکربندی قابل نوشتن میباشد . توصیه میکنیم همه مجوزهای نوشتن را در define.php سیستمهای تولیدی حذف کنید.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' => \n            'شاخه هسته مونسترا  (\":path\") و/ یا فایلهایی درون آن قابل نوشتن میباشند .  توصیه میکنیم همه مجوزهای نوشتن را حذف کنید. <br>در سیستمهای یونیکس میتوانید با دستور : <code>chmod -R a-w :path</code> انجام دهید',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'فایل .htaccess مونسترا قابل نوشتن میباشند .  توصیه میکنیم همه مجوزهای نوشتن را حذف کنید. <br>در سیستمهای یونیکس میتوانید با دستور : <code>chmod -R a-w :path</code> انجام دهید',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'فایل index.php  مونسترا قابل نوشتن میباشند .  توصیه میکنیم همه مجوزهای نوشتن را حذف کنید. <br>در سیستمهای یونیکس میتوانید با دستور : <code>chmod -R a-w :path</code> انجام دهید',\n            'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>\n            'با توجه به نوع و مقدار اطلاعات ممکن است هنگام Core::$environment = Core::DEVELOPMENT خطایی رخ بدهد ، ما شدیداً Core::PRODUCTION  را د رسیستم تولید توصیه میکنیم ',\n            'Monstra version' => 'نسخه مونسترا',\n            'Directory Permissions' => 'مجوزهای شاخه',\n            'Directory' => 'شاخه',\n            'Writable' => 'قابل نوشتن',\n            'Unwritable' => 'غیرقابل نوشتن',\n            'Status' => 'وضعیت',\n            'PHP Built On' => 'ساخته شده باPHP',\n            'Web Server' => 'وب سرور',\n            'WebServer to PHP Interface' => 'وب سرور به رابط PHP',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Information',\n            'Debugging' => 'Débogage',\n            'Name' => 'Nom',\n            'Value' => 'Valeur',\n            'Security' => 'Sécurité',\n            'System' => 'Système',\n            'on' => 'on',\n            'off'=> 'off',   \n            'Server' => 'Serveur',\n            'PHP version' => 'Version PHP',\n            'SimpleXML module' => 'Module SimpleXML',\n            'DOM module' => 'Module DOM',\n            'Installed' => 'Installé',\n            'Not Installed' => 'Non installé',\n            'Security check results' => 'Résultats du contrôle de sécurité',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => \n            'Le fichier de configuration a été trouvé pour être accessible en écriture. Nous vous conseillons de supprimer toutes les autorisations d\\'écriture sur defines.php lors de la mise en production.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' => \n            'Le répertoire de base Monstra (\":path\") et/ou les fichiers inclus, ont été trouvés accessible en écriture. Nous vous conseillons de supprimer toutes les permissions d\\'écriture. <br> Vous pouvez le faire sur les systèmes Unix avec: <code> chmod-R a-w :chemin </code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Le fichier \". Htaccess\" a été trouvé accessible en écriture. Nous vous conseillons de supprimer toutes les permissions d\\'écriture. <br> Vous pouvez le faire sur les systèmes Unix avec: <code>chmod a-w :chemin</ code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Le fichier index.php de Monstra a été trouvé pour être accessible en écriture. Nous vous conseillons de supprimer toutes les permissions d\\'écriture. <br> Vous pouvez le faire sur les systèmes Unix avec: <code>chmod a-w :chemin </code>',\n            'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>\n            'En raison du type et de la quantité d\\'informations se peut qu\\'une erreur peut être des intrusions lorsque Core::$environment = Core::DEVELOPMENT, nous vous conseillons vivement la mise de Core::PRODUCTION dans les systèmes de production.',\n            'Monstra version' => 'Monstra version',\n            'Directory Permissions' => 'Directory Permissions',\n            'Directory' => 'Répertoire',\n            'Writable' => 'Accessible en écriture',\n            'Unwritable' => 'Pas accessible en écriture',\n            'Status' => 'Statut',\n            'PHP Built On' => 'PHP construit sur',\n            'Web Server' => 'Serveur Web',\n            'WebServer to PHP Interface' => 'Interface PHP du serveur web',\n        )\n    );"
  },
  {
    "path": "plugins/box/information/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Információk',\n            'Debugging' => 'Hibakeresés',\n            'Name' => 'Név',\n            'Value' => 'Érték',\n            'Security' => 'Biztonság',\n            'System' => 'Rendszer',\n            'on' => 'be',\n            'off'=> 'ki',   \n            'Server' => 'Szerver',\n            'PHP version' => 'PHP verzió',\n            'SimpleXML module' => 'SimpleXML modul',\n            'DOM module' => 'DOM modul',\n            'Installed' => 'Telepítve',\n            'Not Installed' => 'Nincs Telepítve',\n            'Security check results' => 'Biztonsági ellenőrzés eredményei',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => \n            'A konfigurációs fájl írható. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot itt: defines.php.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' => \n            'A Monstra core directory (\":path\") és/vagy fájlok írhatók. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot. <br>Unix rendszeren: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'A Monstra .htaccess fájl írható. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot. <br>Unix rendszeren: <code>chmod a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'A Monstra index.php fájl írható. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot. <br>Unix rendszeren: <code>chmod a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>\n            'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.',\n            'Monstra version' => 'Monstra verzió',\n            'Directory Permissions' => 'Kategória Jogosultságok',\n            'Directory' => 'Kategória',\n            'Writable' => 'Írható',\n            'Unwritable' => 'Nem Írható',\n            'Status' => 'Státusz',\n            'PHP Built On' => 'PHP Built On',\n            'Web Server' => 'Web Szerver',\n            'WebServer to PHP Interface' => 'WebServer to PHP Interface',\n        )\n    );"
  },
  {
    "path": "plugins/box/information/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Informasi',\n            'Debuging' => 'Debugging',\n            'Name' => 'Nama',\n            'Value' => 'Value',\n            'Security' => 'Keamanan',\n            'System' => 'Sistem',\n            'on' => 'Nyala',\n            'off'=> 'Mati',\n            'Server' => 'Server',\n            'PHP version' => 'Versi PHP',\n            'SimpleXML module' => 'Modul SimpleXML',\n            'DOM module' => 'Modul DOM',\n            'Installed' => 'Sudah terpasang',\n            'Not Installed' => 'Belum terpasang',\n            'Security check results' => 'Hasil Cek Keamanan',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'File Konfigurasi ditemukan writable . Disarankan untuk menghilangkan semua izin write pada defines.php di sistem produksi.',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'File .htaccess Monstra ditemukan writable. Disarankan untuk menghilangkan semua izin write. <br/>Anda bisa melakukannya pada sistem unix dengan: <code>chmod a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'File index.php Monstra ditemukan writable. Disarankan untuk menghilangkan semua izin write. <br/>Anda bisa melakukannya pada sistem unix dengan: <code>chmod a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Dikarenakan jenis dan jumlah informasi ada potensial kerusakan saat Monstra::$environment = Monstra::DEVELOPMENT, disarankan untuk melakukan pengaturan Monstra::PRODUCTION pada sistem produksi.',\n            'Monstra version' => 'Versi Monstra',\n            'Directory Permissions' => 'Direktori Perizinan',\n            'Directory' => 'Direktori',\n            'Writable' => 'Beschreibbar',\n            'Unwritable' => 'Nicht beschreibbar',\n            'Status' => 'Status',\n            'PHP Built On' => 'PHP Built On',\n            'Web Server' => 'Web Server',\n            'WebServer to PHP Interface' => 'WebServer ke PHP Interface',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Informazioni',\n            'Debugging' => 'Debugging',\n            'Name' => 'Nome',\n            'Value' => 'Valore',\n            'Security' => 'Sicurezza',\n            'System' => 'Sistema',\n            'on' => 'on',\n            'off'=> 'off',\n            'Server' => 'Server',\n            'PHP version' => 'Versione PHP',\n            'SimpleXML module' => 'Modulo SimpleXML',\n            'DOM module' => 'Modulo DOM',\n            'Installed' => 'Installato',\n            'Not Installed' => 'Non installato',\n            'Security check results' => 'Risultato del controllo di sicurezza',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'Il file di configurazione è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per defines.php file sul sito funzionante.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'Directory Monstra (\":path\") è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per la directory (\":path\") sul sito funzionante. <br>  È possibile eseguire questa operazione su sistemi UNIX così: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Principale file .htaccess è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per il file principale .htaccess. <br> È possibile eseguire questa operazione su sistemi UNIX così: <code>chmod -R a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Principale file index.php è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per il file principale index.php. <br> È possibile eseguire questa operazione su sistemi UNIX così: <code>chmod -R a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Il sistema opera con lo stato Monstra::DEVELOPMENT Si consiglia di impostare lo stato Monstra::PRODUCTION sul sito funzionante.',\n            'Monstra version' => 'Monstra versione',\n            'Directory Permissions' => 'Directory Autorizzazioni',\n            'Directory' => 'Directory',\n            'Writable' => 'Scrivibile',\n            'Unwritable' => 'Non scrivibile',\n            'Status' => 'Stato',\n            'PHP Built On' => 'PHP Built On',\n            'Web Server' => 'Web Server',\n            'WebServer to PHP Interface' => 'WebServer to PHP Interface',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => '情報',\n            'Debugging' => 'デバッグモード',\n            'Name' => '名前',\n            'Value' => '値',\n            'Security' => 'セキュリティ',\n            'System' => 'システム',\n            'on' => 'オン',\n            'off'=> 'オフ',\n            'Server' => 'サーバー',\n            'PHP version' => 'PHPバージョン',\n            'SimpleXML module' => 'SimpleXMLモジュール',\n            'DOM module' => 'DOMモジュール',\n            'Installed' => 'インストール済み',\n            'Not Installed' => '未インストール',\n            'Security check results' => 'セキュリティチェックの結果',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            '設定ファイルが書き込み可能になっています。システムを公開する場合はすべての defines.php から書き込み権限を除去することをおすすめします。',\n\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod -R a-w :path</code>',\n\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' => \n\t\t\t'Monstraの .htaccess ファイルが書き込み可能になっています。書き込み権限を除去することをおすすめします。<br/>Linuxシステムでは次のように除去できます: <code>chmod a-w :path</code>',\n\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Monstraの index.php ファイルが書き込み可能になっています。書き込み権限を除去することをおすすめします。<br/>Linuxシステムでは次のように除去できます: <code>chmod a-w :path</code>',\n\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.',\n\n            'Monstra version' => 'Monstraのバージョン',\n            'Directory Permissions' => 'ディレクトリの権限',\n            'Directory' => 'ディレクトリ',\n            'Writable' => '書き込み可能',\n            'Unwritable' => '書き込み不可能',\n            'Status' => 'ステータス',\n            'PHP Built On' => 'PHP構成システム',\n            'Web Server' => 'Webサーバ',\n            'WebServer to PHP Interface' => 'Webサーバの提供するPHPインターフェイス',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'ინფორმაცია',\n            'Debugging' => 'Debugging-ი',\n            'Name' => 'სახელი',\n            'Value' => 'მნიშვნელობა',\n            'Security' => 'უსაფრთხოება',\n            'System' => 'სისტემა',\n            'on' => 'ჩართულია',\n            'off'=> 'გამორთულია',\n            'Server' => 'სერვერი',\n            'PHP version' => 'PHP-ის ვერსია',\n            'SimpleXML module' => 'SimpleXML მოდული',\n            'DOM module' => 'DOM მოდული',\n            'Installed' => 'დაყენებულია',\n            'Not Installed' => 'არ არის დაყენებული',\n            'Security check results' => 'უსაფრთხოების შემოწმების შედეგები',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'კონფიგურაციის ფაილის ჩაწერა შესაძლებელია. გირჩევთ წაშალოთ ფაილის (defines.php) ჩაწერის უფლებები.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'Monstra-ს დირექტორია (\":path\") ჩასაწერად ხელმისაწვდომია. გირჩევთ წაშალოთ ჩაწერის უფლებები დირექტორიაზე (\":path\") . <br>  ამის გაკეთება UNIX სისტემებზე ასე შეგიძლიათ: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'მთავარი .htaccess ფაილი ჩასაწერად ხელმისაწვდომია. გირჩევთ წაშალოთ ჩაწერის უფლებები მთავარ .htaccess ფაილზე. <br> ამის გაკეთება UNIX სისტემებზე ასე შეგიძლიათ: <code>chmod -R a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'მთავარი index.php ფაილი ჩასაწერად ხელმისაწვდომია. გირჩევთ წაშალოთ ჩაწერის უფლებები მთავარ index.php ფაილზე. <br> ამის გაკეთება UNIX სისტემებზე ასე შეგიძლიათ: <code>chmod -R a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'სისტემა მუშაობს Monstra::DEVELOPMENT რეჟიმზა, გირჩევთ Monstra::PRODUCTION რეჟიმის დაყენებას.',\n            'Monstra version' => 'Monstra-ს ვერსია',\n            'Directory Permissions' => 'დაშვების უფლებები',\n            'Directory' => 'კატალოგი',\n            'Writable' => 'ჩასაწერად ხელმისაწვდომია',\n            'Unwritable' => 'ჩასაწერად არ არის ხელმისაწვდომია',\n            'Status' => 'სტატუსი',\n            'PHP Built On' => 'PHP აგებულია',\n            'Web Server' => 'Web სერვერი',\n            'WebServer to PHP Interface' => 'Web სერვერი PHP ინტერფეისისთვის',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Informacija',\n            'Debuging' => 'Derinimas',\n            'Name' => 'Pavadinimas',\n            'Value' => 'Reikšmė',\n            'Security' => 'Saugumas',\n            'System' => 'Systema',\n            'on' => 'Įjungta',\n            'off'=> 'Išjungta',\n            'Server' => 'Serveris',\n            'PHP version' => 'PHP versija',\n            'SimpleXML module' => 'SimpleXML modulis',\n            'DOM module' => 'DOM modulis',\n            'Installed' => 'Įdiegta',\n            'Not Installed' => 'Neįdiegta',\n            'Security check results' => 'Saugumo patikrinimo rezultatai',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'Leidžiama perrašyti nustatymų bylą. Siūlome pašalinti visus rašymo leidimus sistemos bylai defines.php.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'Monstra pagrindinį aplanką (\":path\") ir/arba jo bylas leidžiama perrašyti. Siūlome pašalinti visus rašymo leidimus. <br>Tai galite padaryti Unix sistemoje su: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Monstra .htaccess bylą galima perrašyti. Siūlome pašalinti visus rašymo leidimus. <br>Tai galite padaryti Unix sistemoje su: <code>chmod a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Monstra index.php bylą galima perrašyti. Siūlome pašalinti visus rašymo leidimus. <br>Tai galite padaryti Unix sistemoje su: <code>chmod a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Dėl įsilaužimų grėsmės atvaiduojant klaidų pranešimus Monstra::$environment = Monstra::DEVELOPMENT veiksenoje, rekomenduojame naudoti Monstra::PRODUCTION nustatymą nuolatinėje tinklapio veiksenoje.',\n            'Monstra version' => 'Monstra versija',\n            'Directory Permissions' => 'Katalogo teisės',\n            'Directory' => 'Katalogas',\n            'Writable' => 'Rašomas',\n            'Unwritable' => 'Nerašomas',\n            'Status' => 'Būsena',\n            'PHP Built On' => 'PHP veikia su',\n            'Web Server' => 'Serverio prog. įranga',\n            'WebServer to PHP Interface' => 'PHP naudoja šį SAPI',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Informatie',\n            'Debuging' => 'Debuggen',\n            'Name' => 'Naam',\n            'Value' => 'Waarde',\n            'Security' => 'Beveiliging',\n            'System' => 'Systeem',\n            'on' => 'Aan',\n            'off'=> 'Uit',\n            'Server' => 'Server',\n            'PHP version' => 'PHP Versie',\n            'SimpleXML module' => 'SimpleXML Module',\n            'DOM module' => 'DOM Module',\n            'Installed' => 'Geinstalleerd',\n            'Not Installed' => 'Niet geinstalleerd',\n            'Security check results' => 'Resultaten beveiligings-check',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'Het configuratiebestand is schrijfbaar. We adviseren u om alle schrijfrechten op defines.php te verwijderen op productiewebsites.',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Het Monstra .htaccess bestand is schrijfbaar. We adviseren u om alle schrijfrechten voor dit bestand te verwijderen. <br>Op unix-systemen doet u dit als volgt: <code>chmod a-w :path</code>.',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Het Monstra index.php bestand is schrijfbaar. We adviseren u alle schrijfrechten voor dit bestand te verwijderen. <br>Op Unix-systemen doet u dit als volgt: <code>chmod a-w :path</code>.',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Door het type en de hoeveelheid informatie die foutmeldingen kunnen geven aan indringers wanneer Monstra::$environment = Monstra::DEVELOPMENT, raden we u ten zeerste aan om de instelling op Monstra::PRODUCTION te zetten, wanneer u met een productiewebsite werkt.',\n            'Monstra version' => 'Monstra versie',\n            'Directory Permissions' => 'Map-rechten',\n            'Directory' => 'Map',\n            'Writable' => 'Schrijfbaar',\n            'Unwritable' => 'Niet schrijfbaar',\n            'Status' => 'Status',\n            'PHP Built On' => 'Systeem',\n            'Web Server' => 'Web Server',\n            'WebServer to PHP Interface' => 'WebServer PHP Interface',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Informacja',\n            'Debugging' => 'Odpluskwianie',\n            'Name' => 'Nazwa',\n            'Value' => 'Wartość',\n            'Security' => 'Bezpieczeństwo',\n            'System' => 'System',\n            'on' => 'włączone',\n            'off'=> 'wyłączone',\n            'Server' => 'Serwer',\n            'PHP version' => 'Wersja PHP',\n            'SimpleXML module' => 'Moduł SimpleXML',\n            'DOM module' => 'Moduł DOM',\n            'Installed' => 'Zainstalowane',\n            'Not Installed' => 'Nie zainstalowane',\n            'Security check results' => 'Wyniki sprawdzenia bezpieczeństwa',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'Plik konfiguracyjny ma możliwość zapisu. Radzimy, aby w systemach produkcyjnych usunąć wszystkie uprawnienia zapisu dla pliku defines.php.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'Katalog główny systemu Monstra (\":path\") i/lub pliki w nim zawarte mają możliwość zapisu. Radzimy, aby usunąć wszystkie uprawnienia zapisu. <br>Na systemach UNIX możesz to zrobić za pomocą: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Plik .htaccess systemu Monstra ma możliwość zapisu. Radzimy, aby usunąć wszystkie uprawnienia zapisu. <br>Na systemach UNIX możesz to zrobić za pomocą: <code>chmod a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Plik index.php systemu Monstra ma możliwość zapisu. Radzimy, aby usunąć wszystkie uprawnienia zapisu. <br>Na systemach UNIX możesz to zrobić za pomocą: <code>chmod a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Ze względu na rodzaj i ilość informacji o błędach, które mogą dostać się w niepowołane ręce, gdy Monstra::$environment = Monstra::DEVELOPMENT, zdecydowanie zalecamy ustawienie Monstra::PRODUCTION w systemach produkcyjnych.',\n            'Monstra version' => 'Wersja systemu Monstra',\n            'Directory Permissions' => 'Uprawnienia katalogu',\n            'Directory' => 'Katalog',\n            'Writable' => 'Możliwość zapisu',\n            'Unwritable' => 'Brak możliwości zapisu',\n            'Status' => 'Status',\n            'PHP Built On' => 'Oparty na systemie',\n            'Web Server' => 'Serwer WWW',\n            'WebServer to PHP Interface' => 'Serwerowy interfejs PHP',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Informações',\n            'Debugging' => 'Debug',\n            'Name' => 'Nome',\n            'Value' => 'Valor',\n            'Security' => 'Segurança',\n            'System' => 'Sistema',\n            'on' => 'on',\n            'off'=> 'off',\n            'Server' => 'Servidor',\n            'PHP version' => 'Versão do PHP',\n            'SimpleXML module' => 'Módulo SimpleXML',\n            'DOM module' => 'Módulo DOM',\n            'Installed' => 'Instalado',\n            'Not Installed' => 'Não instalado',\n            'Security check results' => 'Resultados da verificação de segurança',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'O arquivo de configuração está com permissões de escrita. Para melhor segurança, você deve remover as permissões de escrita do arquivo defines.php em sistemas de produções.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'O diretório núcleo do Monstra (\":path\") e/ou arquivos dentro do diretório estão com permissões de escrita. Para melhor segurança, você deve remover as permissões de escritas. <br>Você pode fazer isso em sistemas UNIX com: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'O arquivo .htaccess da pasta de instalação do Monstra está com permissões de escrita. Para sua melhor segurança, você deve remover as permissões de escritas. <br>Você pode fazer isso em sistemas UNIX com: <code>chmod a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'O arquivo index.php do diretório de instalação do Monstra está com permissões de escrita. Para sua melhor segurança, você deve remover as permissões de escritas. <br>Vocês pode fazer isso em sistemas UNIX com: <code>chmod a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Devide ao tipo e quantidade de informações, um erro pode trazer possíveis intrusos se a variável Monstra::$environment for igual à Monstra::DEVELOPMENT, para isso nós recomendamos fortemente que você sete a variável para o seguinte valor: Monstra::PRODUCTION em sistemas de produção.',\n            'Monstra version' => 'Monstra versão',\n            'Directory Permissions' => 'Permissões de Diretório',\n            'Directory' => 'Diretório',\n            'Writable' => 'Gravável',\n            'Unwritable' => 'Unwritable',\n            'Status' => 'Estado',\n            'PHP Built On' => 'PHP Built On',\n            'Web Server' => 'Web Server',\n            'WebServer to PHP Interface' => 'WebServer to PHP Interface',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Информация',\n            'Debugging' => 'Дебаггинг',\n            'Name' => 'Название',\n            'Value' => 'Значение',\n            'Security' => 'Безопасность',\n            'System' => 'Система',\n            'on' => 'включен',\n            'off'=> 'выключен',\n            'Server' => 'Сервер',\n            'PHP version' => 'Версия PHP',\n            'SimpleXML module' => 'SimpleXML модуль',\n            'DOM module' => 'DOM модуль',\n            'Installed' => 'Установлен',\n            'Not Installed' => 'Не установлен',\n            'Security check results' => 'Результаты проверки безопасности',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'Конфигурационный файл доступен для записи. Мы рекомендуем вам удалить права записи на файл defines.php на живом сайте.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'Директория Monstra (\":path\") доступна для записи. Мы рекомендуем вам удалить права записи на директорию (\":path\") на живом сайте. <br>  Вы можете сделать это на UNIX системах так: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Главный .htaccess доступен для записи. Мы рекомендуем вам удалить права записи на главный .htaccess файл. <br> Вы можете сделать это на UNIX системах так: <code>chmod -R a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Главный index.php файл доступен для записи. Мы рекомендуем вам удалить права записи на главный index.php файл. <br> Вы можете сделать это на UNIX системах так: <code>chmod -R a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Система работает в режиме Monstra::DEVELOPMENT Мы рекомендуем вам установить режим Monstra::PRODUCTION на живом сайте.',\n            'Monstra version' => 'Monstra Версия',\n            'Directory Permissions' => 'Права доступа',\n            'Directory' => 'Каталог',\n            'Writable' => 'Доступна для записи',\n            'Unwritable' => 'Недоступна для записи',\n            'Status' => 'Статус',\n            'PHP Built On' => 'PHP построен на',\n            'Web Server' => 'Веб сервер',\n            'WebServer to PHP Interface' => 'Веб сервер для PHP интерфейса',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Informácie',\n            'Debugging' => 'Ladenie',\n            'Name' => 'Názov',\n            'Value' => 'Hodnota',\n            'Security' => 'Bezpečnosť',\n            'System' => 'System',\n            'on' => 'zapnuté',\n            'off'=> 'vypnuté',\n            'Server' => 'Server',\n            'PHP version' => 'Verzia PHP',\n            'SimpleXML module' => 'Modul SimpleXML',\n            'DOM module' => 'Modul DOM',\n            'Installed' => 'Nainštalované',\n            'Not Installed' => 'Nenainštalované',\n            'Security check results' => 'Výsledky bezpečnostnej kontroly',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'Konfiguračný súbor je zapisovateľný. Odporúčame Vám odstrániť oprávnenie akéhokoľvek zápisu pre defines.php na produkčných systémoch.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'Základný Monstra priečinok (\":path\") a/alebo súbory sú zapisovateľné. Odporúčame Vám odstrániť oprávnenie akéhokoľvek zápisu. <br>Na Unix systémoch prevediete opravu príkazom: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Monstra .htaccess súbor je zapisovateľný. Odporúčame Vám odstrániť oprávnenie akéhokoľvek zápisu. <br>Na Unix systémoch prevediete opravu príkazom: <code>chmod a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Monstra index.php súbor je zapisovateľný. Odporúčame Vám odstrániť oprávnenie akéhokoľvek zápisu. <br>Na Unix systémoch prevediete opravu príkazom: <code>chmod a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>\n            'Vzhľadom na druh a množstvo informácií, chyby možno odhaliť nastavením: Core::$environment = Core::DEVELOPMENT, na produkčných systémoch dôrazne odporúčame nastaviť Core::PRODUCTION.',\n            'Monstra version' => 'Verzia Monstra',\n            'Directory Permissions' => 'Práva priečinkov',\n            'Directory' => 'Priečinok',\n            'Writable' => 'Zapisovateľný',\n            'Unwritable' => 'Nezapisovateľný',\n            'Status' => 'Status',\n            'PHP Built On' => 'PHP Built On',\n            'Web Server' => 'Web Server',\n            'WebServer to PHP Interface' => 'WebServer to PHP Interface',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Informacije',\n            'Debugging' => 'Debugging',\n            'Name' => 'Ime',\n            'Value' => 'Vrednost',\n            'Security' => 'Sigurnost',\n            'System' => 'Sistem',\n            'on' => 'uključeno',\n            'off'=> 'isključeno',   \n            'Server' => 'Server',\n            'PHP version' => 'PHP Verzija',\n            'SimpleXML module' => 'SimpleXML modul',\n            'DOM module' => 'DOM modul',\n            'Installed' => 'Instalirano',\n            'Not Installed' => 'Nije instalirano',\n            'Security check results' => 'Sigurnosna provera rezultata',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => 'Konfiguracioni fajl je nadjen da može biti upisan. Mi vas savetujemo da uklonite dozvole na fajlu defines.php ukoliko vam je svanični sajt.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' => 'Monstra direktorijum je (\":path\") i/ili fajlovi unutar toga su nadjeni da mogu biti zapisani. Mi vas savetujemo da uklonite te dozvole zapisivanja. <br>Na unix sistemima možete to uraditi sa: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' => 'Monstra je .htaccess fajlu našla mogućnost upisivanja. Mi vas savetujemo da promenite te dozvole. <br>Na unix sistemima možete to uraditi sa: <code>chmod a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' => 'Monstra je pronašla index.php fajl da može da se upisuje. Mi vas savetujemo da promenite dozvole upisivanja. <br>Na unix sistemima možete to uraditi sa: <code>chmod a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => 'Tokom ovolike količine informacija o greškama, moguće je da imate uljeze ili hakerske napade u Core::$environment = Core::DEVELOPMENT, Mi vas savetujemo da se prebacite na Core::PRODUCTION U produkciskim sistemima.',\n            'Monstra version' => 'Monstra verzija',\n            'Directory Permissions' => 'Dozvole direktorijuma',\n            'Directory' => 'Direktorijum',\n            'Writable' => 'Dozvoljen ua pisanje',\n            'Unwritable' => 'Zabranjen za pisanje',\n            'Status' => 'Status',\n            'PHP Built On' => 'PHP građen na',\n            'Web Server' => 'Web Server',\n            'WebServer to PHP Interface' => 'WebServer to PHP Interface',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Bilgi',\n            'Debugging' => 'Hata Ayıklama',\n            'Name' => 'Ad',\n            'Value' => 'Değer',\n            'Security' => 'Güvenlik',\n            'System' => 'Sistem',\n            'on' => 'açık',\n            'off'=> 'kapalı',\n            'Server' => 'Sunucu',\n            'PHP version' => 'PHP sürümü',\n            'SimpleXML module' => 'SimpleXML modülü',\n            'DOM module' => 'DOM modülü',\n            'Installed' => 'Yüklü',\n            'Not Installed' => 'Yüklü Değil',\n            'Security check results' => 'Güvenlik denetlemesi sonuçları',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'Konfigürasyon dosyası yazma iznine sahip. Yayındayken defines.php üzerindeki bütün yazma izinlerini kaldırmanızı öneririz.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'Monstra dizini (\":path\") ve/ya da altındaki dosyalar yazma iznine sahipler. Bütün yazma izinlerini kaldırmanızı öneririz. <br>Unix sistemlerde, bunu, <code>chmod -R a-w :path</code> ile gerçekleştirebilirsiniz.',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Monstra .htaccess dosyası yazma iznine sahip. Bütün yazma izinlerini kaldırmanızı öneririz. <br>Unix sistemlerde, bunu, <code>chmod -R a-w :path</code> ile gerçekleştirebilirsiniz.',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Monstra index.php dosyası yazma iznine sahip. Bütün yazma izinlerini kaldırmanızı öneririz. <br>Unix sistemlerde, bunu, <code>chmod -R a-w :path</code> ile gerçekleştirebilirsiniz.',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Monstra::$environment = Monstra::DEVELOPMENT ayarı yapılmışken, yayın sırasında çıkabilecek bir hata ile, bilginin türü ve miktarına bağlı olarak saldırı açıkları yaratmış olabilirsiniz. Siteniz yayındayken Monstra::PRODUCTION ayarı yapmanızı kesinlikle öneririz.',\n            'Monstra version' => 'Monstra sürümü',\n            'Directory Permissions' => 'Dizin İzinleri',\n            'Directory' => 'Dizin',\n            'Writable' => 'Yazılabilir',\n            'Unwritable' => 'Yazılamaz',\n            'Status' => 'Durum',\n            'PHP Built On' => 'PHP\\'nin Derlendiği Ortam',\n            'Web Server' => 'Web Sunucusu',\n            'WebServer to PHP Interface' => 'PHP Arayüzü',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => 'Інформація',\n            'Debugging' => 'Дебаггінг',\n            'Name' => 'Назва',\n            'Value' => 'Значення',\n            'Security' => 'Безпека',\n            'System' => 'Система',\n            'on' => 'увімкнено',\n            'off'=> 'вимкнено',\n            'Server' => 'Сервер',\n            'PHP version' => 'Версія PHP',\n            'SimpleXML module' => 'SimpleXML модуль',\n            'DOM module' => 'DOM модуль',\n            'Installed' => 'Встановлено',\n            'Not Installed' => 'Не встановлено',\n            'Security check results' => 'Результати перевірки безпеки',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'Конфігураційний файл доступний для запису. Ми рекомендуємо вам видалити права запису на файл defines.php на живому сайті.',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            'Директорія Monstra (\":path\") доступна для запису. Ми рекомендуємо вам видалити права запису на теку (\":path\") на живому сайті. <br> Ви можете зробити це на UNIX системах так: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Головний .htaccess доступний для запису. Ми рекомендуємо вам видалити права запису на головний .htaccess файл. <br>Ви можете зробити це на UNIX системах так: <code>chmod -R a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Головний index.php файл доступний для запису. Ми рекомендуємо вам видалити права запису на головний index.php файл. <br>Ви можете зробити це на UNIX системах так: <code>chmod -R a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Система працює в режимі Monstra::DEVELOPMENT Ми рекомендуємо вам встановити режим Monstra::PRODUCTION на живому сайті.',\n            'Monstra version' => 'Monstra Версія',\n            'Directory Permissions' => 'Права Доступу',\n            'Directory' => 'Тека',\n            'Writable' => 'Доступна для запису',\n            'Unwritable' => 'Недоступна для запису',\n            'Status' => 'Статус',\n            'PHP Built On' => 'PHP побудовано на',\n            'Web Server' => 'Веб сервер',\n            'WebServer to PHP Interface' => 'Веб сервер для PHP інтерфейсу',        )\n    );\n"
  },
  {
    "path": "plugins/box/information/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'information' => array(\n            'Information' => '信息',\n            'Debugging' => '调试',\n            'Name' => '名称',\n            'Value' => '值',\n            'Security' => '安全',\n            'System' => '系统',\n            'on' => '开',\n            'off'=> '关',\n            'Server' => '服务器',\n            'PHP version' => 'PHP 版本',\n            'SimpleXML module' => 'SimpleXML 模块',\n            'DOM module' => 'DOM 模块',\n            'Installed' => '已安装',\n            'Not Installed' => '未安装',\n            'Security check results' => '安全检查结果',\n            'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>\n            'Monstra 系统发现配置文件是可写的。我们建议您删除 defines.php 文件的所有可写权限。',\n            'The Monstra core directory (\":path\") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>\n            '发现 Monstra 核心目录 (\":path\") 和下级文件是可写的。我们建议您删除所有的可写权限。<br/>您可以在 UNIX 系统上设置: <code>chmod -R a-w :path</code>',\n            'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Monstra 系统发现 .htaccess 文件是可写的。我们建议您删除所有的可写权限。<br/>您可以在 UNIX 系统上设置: <code>chmod a-w :path</code>',\n            'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>\n            'Monstra 系统发现 index.php 文件可写。我们建议您删除所有的可写权限。<br/>您可以在 UNIX 系统上设置: <code>chmod a-w :path</code>',\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.' =>\n            'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, 我们强烈建议设置 Monstra::PRODUCTION in production systems.',\n            'Monstra version' => 'Monstra 版本',\n            'Directory Permissions' => '目录权限',\n            'Directory' => '目录',\n            'Writable' => '可写',\n            'Unwritable' => '不可写',\n            'Status' => '状态',\n            'PHP Built On' => 'PHP 建立在',\n            'Web Server' => 'Web 服务器',\n            'WebServer to PHP Interface' => '服务器到 PHP 接口',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/information/views/backend/index.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('Information', 'information'); ?></h2>\n\n<div class=\"tabbable mobile-nav-tabs\">\n    <ul class=\"nav nav-tabs\">\n        <li class=\"active\"><a href=\"#system\" data-toggle=\"tab\"><?php echo __('System', 'information'); ?></a></li>\n        <li><a href=\"#server\" data-toggle=\"tab\"><?php echo __('Server', 'information'); ?></a></li>\n        <li><a href=\"#directory-permissions\" data-toggle=\"tab\"><?php echo __('Directory Permissions', 'information'); ?></a></li>\n        <li><a href=\"#security\" data-toggle=\"tab\"><?php echo __('Security', 'information'); ?></a></li>\n    </ul>\n\n    <div class=\"tab-content\">\n\n        <div class=\"tab-pane active\" id=\"system\">\n\n            <table class=\"table table-bordered\">\n                <thead>\n                    <tr>\n                        <th><?php echo __('Name', 'information'); ?></th>\n                        <th><?php echo __('Value', 'information'); ?></th>\n                    </tr>\n                </thead>\n                <tbody>\n                    <tr>\n                        <td><?php echo __('Monstra version', 'information'); ?></td>\n                        <td><?php echo Monstra::VERSION; ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo __('GZIP', 'information'); ?></td>\n                        <td><?php if (MONSTRA_GZIP) { echo __('on', 'information'); } else { echo __('off', 'information'); } ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo __('Debugging', 'information'); ?></td>\n                        <td><?php if (Monstra::$environment == Monstra::DEVELOPMENT) { echo __('on', 'information'); } else { echo __('off', 'information'); } ?></td>\n                    </tr>\n                </tbody>\n            </table>\n\n        </div>\n\n        <div class=\"tab-pane\" id=\"server\">\n\n            <table class=\"table table-bordered\">\n                <thead>\n                    <tr>\n                        <th><?php echo __('Name', 'information'); ?></th>\n                        <th><?php echo __('Value', 'information'); ?></th>\n                    </tr>\n                </thead>\n                <tbody>\n                    <tr>\n                        <td><?php echo __('PHP version', 'information'); ?></td>\n                        <td><?php echo PHP_VERSION; ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo __('PHP Built On', 'information'); ?></td>\n                        <td><?php echo php_uname(); ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo __('Web Server', 'information'); ?></td>\n                        <td><?php echo (isset($_SERVER['SERVER_SOFTWARE'])) ? $_SERVER['SERVER_SOFTWARE'] : @getenv('SERVER_SOFTWARE'); ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo __('WebServer to PHP Interface', 'information'); ?></td>\n                        <td><?php echo php_sapi_name(); ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo __('SimpleXML module', 'information'); ?></td>\n                        <td><?php if (in_array('SimpleXML', $php_modules)) { echo __('Installed', 'information'); } else { echo __('Not Installed', 'information'); } ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo __('DOM module', 'information'); ?></td>\n                        <td><?php if (in_array('dom', $php_modules)) { echo __('Installed', 'information'); } else { echo __('Not Installed', 'information'); } ?></td>\n                    </tr>\n                    <?php\n\n                        if (function_exists('apache_get_modules')) {\n                            if ( ! in_array('mod_rewrite',apache_get_modules())) {\n                                echo '<tr><td>'.__('Apache Mod Rewrite', 'information').'</td><td>'.__('Not Installed', 'information').'</td></tr>';\n                            } else {\n                                echo '<tr><td>'.__('Apache Mod Rewrite', 'information').'</td><td>'.__('Installed', 'information').'</td></tr>';\n                            }\n                        } else {\n                            echo '<tr><td>'.__('Apache Mod Rewrite', 'information').'</td><td>'.__('Installed', 'information').'</td></tr>';\n                        }\n\n                    ?>\n                </tbody>\n            </table>\n\n        </div>\n\n        <div class=\"tab-pane\" id=\"directory-permissions\">\n\n            <div class=\"table-responsive\">\n            <table class=\"table table-bordered\">\n                <thead>\n                    <tr>\n                        <th><?php echo __('Directory', 'information'); ?></th>\n                        <th><?php echo __('Status', 'information'); ?></th>\n                    </tr>\n                </thead>\n                <tbody>\n                    <tr>\n                        <td><?php echo STORAGE ?></td>\n                        <td><?php if (Dir::writable(STORAGE)) { ?><span class=\"badge badge-success\"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class=\"badge badge-error\"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo ROOT . DS . 'tmp'; ?></td>\n                        <td><?php if (Dir::writable(ROOT . DS . 'tmp')) { ?><span class=\"badge badge-success\"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class=\"badge badge-error\"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo ROOT . DS . 'backups' ?></td>\n                        <td><?php if (Dir::writable(ROOT . DS . 'backups')) { ?><span class=\"badge badge-success\"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class=\"badge badge-error\"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo ROOT . DS . 'public' ?></td>\n                        <td><?php if (Dir::writable(ROOT . DS . 'public')) { ?><span class=\"badge badge-success\"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class=\"badge badge-error\"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo PLUGINS ?></td>\n                        <td><?php if (Dir::writable(PLUGINS)) { ?><span class=\"badge badge-success\"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class=\"badge badge-error\"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>\n                    </tr>\n                    <tr>\n                        <td><?php echo ROOT . DS . 'admin' ?></td>\n                        <td><?php if (Dir::writable(ROOT . DS . 'admin')) { ?><span class=\"badge badge-success\"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class=\"badge badge-error\"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>\n                    </tr>\n                </tbody>\n            </table>\n            </div>\n        </div>\n\n        <div class=\"tab-pane\" id=\"security\">\n\n            <?php clearstatcache(); ?>\n            <div class=\"table-responsive\">\n            <table class=\"table table-bordered\">\n                <thead>\n                    <tr>\n                        <th colspan=\"2\"><?php echo __('Security check results', 'information'); ?></th>\n                    </tr>\n                </thead>\n                <tbody>\n                    <?php if (File::writable(ROOT . DS . '.htaccess')) { ?>\n                        <tr>\n                            <td><span class=\"badge badge-error\" style=\"padding-left:5px; padding-right:5px;\"><b>!</b></span> </td>\n                            <td><?php echo __('The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>', 'information', array(':path' => ROOT . DS . '.htaccess')); ?></td>\n                        </tr>\n                    <?php } ?>\n                    <?php if (File::writable(ROOT . DS . 'index.php')) { ?>\n                        <tr>\n                            <td><span class=\"badge badge-error\" style=\"padding-left:5px; padding-right:5px;\"><b>!</b></span> </td>\n                            <td><?php echo __('The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br>You can do this on unix systems with: <code>chmod a-w :path</code>', 'information', array(':path' => ROOT . DS . 'index.php')); ?></td>\n                        </tr>\n                    <?php } ?>\n                    <?php if (Monstra::$environment == Monstra::DEVELOPMENT) { ?>\n                        <tr>\n                            <td><span class=\"badge badge-warning\" style=\"padding-left:5px; padding-right:5px;\"><b>!</b></span> </td>\n                            <td><?php echo __('Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, we strongly advise setting Monstra::PRODUCTION in production systems.', 'information'); ?></td>\n                        </tr>\n                    <?php } ?>\n                </tbody>\n            </table>\n            </div>\n\n        </div>\n\n     </div>\n</div>\n"
  },
  {
    "path": "plugins/box/menu/install/menu.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/menu/menu.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>4</plugin_priority>\n    <plugin_name>Menu</plugin_name>\n    <plugin_description>Menu managment plugin</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/menu/js/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/box/menu/js/menu.js",
    "content": "if (typeof $.monstra == 'undefined') $.monstra = {};\n\n$.monstra.menu = {\n\n    init: function() { },\n\n    selectPage: function (slug, title) {\n        $('input[name=menu_item_link]').val(slug);\n        $('input[name=menu_item_name]').val(title);\n        $('#selectPageModal').modal('hide');\n    },\n\n    selectCategory: function (name) {\n        $('input[name=menu_item_category]').val(name);\n        $('#selectCategoryModal').modal('hide');\n    }\n\n};\n\n\n$(document).ready(function(){\n    $.monstra.menu.init();\n});"
  },
  {
    "path": "plugins/box/menu/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menu',\n            'Menu manager' => 'Manažer menu',\n            'Edit' => 'Editovat',\n            'Name' => 'Název',\n            'Delete' => 'Vymazat',\n            'Order' => 'Pořadí',\n            'Actions' => 'Akce',\n            'Create New Item' => 'Vytvořit novou položku',\n            'New item' => 'Nová položka',\n            'Item name' => 'Název položky',\n            'Item order' => 'Pořadí položky',\n            'Item target' => 'Cíl položky',\n            'Item link' => 'Odkaz položky',\n            'Item category' => 'Kategorie položky',\n            'Save' => 'Uložit',\n            'Edit item' => 'Editovat položku',\n            'Delete item :name' => 'Vymazat položku :name',\n            'Select page' => 'Vybrat stránku',\n            'Category' => 'Kategorie',\n            'Select category' => 'Vybrat kategorii',\n            'Required field' => 'Povinné políčko',\n            'Cancel' => 'Zrušit',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menü',\n            'Menu manager' => 'Menü Manager',\n            'Edit' => 'Bearbeiten',\n            'Name' => 'Name',\n            'Delete' => 'Löschen',\n            'Order' => 'Reihenfolge',\n            'Actions' => 'Aktionen',\n            'Create New Item' => 'Erstelle neuen Eintrag',\n            'New item' => 'Neuer Eintrag',\n            'Item name' => 'Eintrags Name',\n            'Item order' => 'Eintrags Reihenfolge',\n            'Item target' => 'Eintrags Ziel',\n            'Item link' => 'Eintrags Link',\n            'Item category' => 'Eintrags Kategorie',\n            'Save' => 'Speichern',\n            'Edit item' => 'Bearbeite Eintrag',\n            'Delete item :name' => 'Lösche Eintrag :name',\n            'Select page' => 'Seite auswählen',\n            'Category' => 'Kategorie',\n            'Select category' => 'Kategorie auswählen',\n            'Required field' => 'Pflichtfeld',\n            'Cancel' => 'Abbrechen',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menu',\n            'Menu manager' => 'Menu manager',\n            'Edit' => 'Edit',\n            'Name' => 'Name',\n            'Delete' => 'Delete',\n            'Order' => 'Order',\n            'Actions' => 'Actions',\n            'Create New Item' => 'Create new item',\n            'New item' => 'New item',\n            'Item name' => 'Item name',\n            'Item order' => 'Item order',\n            'Item target' => 'Item target',\n            'Item link' => 'Item link',\n            'Item category' => 'Item category',\n            'Save' => 'Save',\n            'Edit item' => 'Edit item',\n            'Delete item :name' => 'Delete item :name',\n            'Select page' => 'Select page',\n            'Category' => 'Category',\n            'Select category' => 'Select category',\n            'Required field' => 'Required field',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menús',\n            'Menu Manager' => 'Administrador de menús',\n            'Edit' => 'Editar',\n            'Name' => 'Nombre',\n            'Delete' => 'Eliminar',\n            'Order' => 'Orden',\n            'Actions' => 'Acciones',\n            'Create New Item' => 'Crear nuevo item',\n            'New item' => 'Nuevo item',\n            'Item name' => 'Nombre del item',\n            'Item order' => 'Orden del item',\n            'Item target' => 'Target del item',\n            'Item link' => 'Enlace del item',\n            'Item category' => 'Categoría del item',\n            'Save' => 'Guardar',\n            'Edit item' => 'Editar item',\n            'Delete item :name' => 'Eliminar item: :name',\n            'Select page' => 'Seleccionar página',\n            'Category' => 'Categoría',\n            'Select category' => 'Seleccionar categoría',\n            'Required Field' => 'Dato requerido',\n            'Cancel' => 'Cancelar',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'منو',        \n            'Menu manager' => 'مدیریت منو',\n            'Edit' => 'ویرایش',\n            'Name' => 'نام',\n            'Delete' => 'حذف',\n            'Order' => 'ترتیب',\n            'Actions' => 'عملیات',\n            'Create New Item' => 'ایجاد آیتم جدید',\n            'New item' => 'آیتم جدید',\n            'Item name' => 'نام آیتم',\n            'Item order' => 'ترتیب آیتم',\n            'Item target' => 'هدف آیتم',\n            'Item link' => 'لینک آیتم',\n            'Item category' => 'مجموعه آیتم',\n            'Save' => 'ذخیره',\n            'Edit item' => 'ویرایش آیتم',\n            'Delete item :name' => 'حذف آیتم :name',\n            'Select page' => 'انتخاب صفحه',\n            'Category' => 'مجموعه',\n            'Select category' => 'انتخاب مجموعه',\n            'Required field' => 'کادر الزامی',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menu',        \n            'Menu manager' => 'Gestionnaire du menu',\n            'Edit' => 'Editer',\n            'Name' => 'Nom',\n            'Delete' => 'Supprimer',\n            'Order' => 'Ordre',\n            'Actions' => 'Actions',\n            'Create new item' => 'Créer un nouvel item',\n            'New item' => 'Nouveau item',\n            'Item name' => 'Nom de l\\'item',\n            'Item order' => 'Ordre de l\\'item',\n            'Item target' => 'Cible de l\\'item',\n            'Item link' => 'Lien de l\\'item',\n            'Item category' => 'Catégorie de l\\'item',\n            'Save' => 'Enregistrer',\n            'Edit item' => 'Editer l\\'item',\n            'Delete item :name' => 'Supprimer l\\'item :name',\n            'Select page' => 'Sélectionner la page',\n            'Category' => 'Catégorie',\n            'Select category' => 'Sélectionner une catégorie',\n            'Required field' => 'Champ requis',\n            'Cancel' => 'Cancel',\n        )\n    );"
  },
  {
    "path": "plugins/box/menu/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menü',\n            'Menu manager' => 'Menükezelő',\n            'Edit' => 'Szerkeszt',\n            'Name' => 'Név',\n            'Delete' => 'Töröl',\n            'Order' => 'Rendezés',\n            'Actions' => 'Műveletek',\n            'Create New Item' => 'Új menü készítése',\n            'New item' => 'Új menü',\n            'Item name' => 'Menü neve',\n            'Item order' => 'Menü rendezés',\n            'Item target' => 'Menü célpont',\n            'Item link' => 'Menü link',\n            'Item category' => 'Menü kategória',\n            'Save' => 'Mentés',\n            'Edit item' => 'Menü szerkesztése',\n            'Delete item :name' => 'Menü törlése :name',\n            'Select page' => 'Válassza ki az oldalt',\n            'Category' => 'Kategória',\n            'Select category' => 'Válassza ki a kategóriát',\n            'Required field' => 'Kötelező mező',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menu',\n            'Menu manager' => 'Pengelolaan Menu',\n            'Edit' => 'Perbaiki',\n            'Name' => 'Nama',\n            'Delete' => 'Hapus',\n            'Order' => 'Urutan',\n            'Actions' => 'Tindakan',\n            'Create New Item' => 'Buat Perihal Baru',\n            'New item' => 'Perihal Baru',\n            'Item name' => 'Nama Perihal',\n            'Item order' => 'Urutan Perihal',\n            'Item target' => 'Target Perihal',\n            'Item link' => 'Link Perihal',\n            'Item category' => 'Kategori Perihal',\n            'Save' => 'Simpan',\n            'Edit item' => 'Perbaiki Perihal',\n            'Delete item :name' => 'Hapus perihal :nama',\n            'Select page' => 'Pilih Halaman',\n            'Category' => 'Kategori',\n            'Select category' => 'Pilih Kategori',\n            'Required field' => 'Isian yang Dibutuhkan',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menu',\n            'Menu manager' => 'Gestione menu',\n            'Edit' => 'Modifica',\n            'Name' => 'Nome',\n            'Delete' => 'Elimina',\n            'Order' => 'Ordine',\n            'Actions' => 'Azioni',\n            'Create New Item' => 'Crea nuova voce',\n            'New item' => 'Nuova voce',\n            'Item name' => 'Nome',\n            'Item order' => 'Ordine',\n            'Item target' => 'Target',\n            'Item link' => 'Collegamento',\n            'Item category' => 'Categoria',\n            'Save' => 'Salva',\n            'Edit item' => 'Modifica voce menu',\n            'Delete item :name' => 'Elimina voce menu :name',\n            'Select page' => 'Scegli pagina',\n            'Category' => 'Categoria',\n            'Select category' => 'Scegli categoria',\n            'Required field' => 'Campo obbligatorio',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'メニュー',\n            'Menu manager' => 'メニューの管理',\n            'Edit' => '編集',\n            'Name' => '名前',\n            'Delete' => '削除',\n            'Order' => '順序',\n            'Actions' => '操作',\n            'Create New Item' => '新規アイテムを作成',\n            'New item' => '新規アイテム',\n            'Item name' => 'アイテムの名前',\n            'Item order' => 'アイテムの順序',\n            'Item target' => 'アイテムのターゲット',\n            'Item link' => 'アイテムのリンク先',\n            'Item category' => 'アイテムのカテゴリ',\n            'Save' => '保存',\n            'Edit item' => 'アイテムの編集',\n            'Delete item :name' => 'アイテムの削除 :name',\n            'Select page' => 'ページの選択',\n            'Category' => 'カテゴリ',\n            'Select category' => 'カテゴリの選択',\n            'Required field' => '必須項目',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'მენიუ',\n            'Menu manager' => 'მენიუს მენეჯერი',\n            'Edit' => 'რედაქტირება',\n            'Name' => 'სახელწოდება',\n            'Delete' => 'წაშლა',\n            'Order' => 'რიგი',\n            'Actions' => 'მოქმედება',\n            'Create New Item' => 'მენიუს ახალი პუნქტის შექმნა',\n            'New item' => 'მენიუს ახალი პუნქტი',\n            'Item name' => 'სახელი',\n            'Item order' => 'რიგი',\n            'Item target' => 'მიზანი',\n            'Item link' => 'ბმული',\n            'Item category' => 'კატეგორია',\n            'Save' => 'შენახვა',\n            'Edit item' => 'მენიუს პუნქტის რედაქტირება',\n            'Delete item :name' => 'მენიუს პუქტის წაშლა :name',\n            'Select page' => 'გვერდის არჩევა',\n            'Category' => 'კატეგორია',\n            'Select category' => 'კატეგორიის არჩევა',\n            'Required field' => 'აუცილებელი ველი',\n            'Cancel' => 'გაუქმება',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Meniu',\n            'Menu manager' => 'Meniu tvarkyklė',\n            'Edit' => 'Redaguoti',\n            'Name' => 'Pavadinimas',\n            'Delete' => 'Trinti',\n            'Order' => 'Eiliškumas',\n            'Actions' => 'Veiksmai',\n            'Create New Item' => 'Sukurti naują nuorodą',\n            'New item' => 'Nauja nuoroda',\n            'Item name' => 'Pavadinimas',\n            'Item order' => 'Eiliškumas',\n            'Item target' => 'Nuorodos atidarymo būdas',\n            'Item link' => 'Nuoroda',\n            'Item category' => 'Kategorija',\n            'Save' => 'Išsaugoti',\n            'Edit item' => 'Redaguoti nuorodą',\n            'Delete item :name' => 'Ištrinti nuorodą :name',\n            'Add page' => 'Pridėti puslapį',\n            'Select page' => 'Pasirinkti puslapį',\n            'Category' => 'Kategorija',\n            'Select category' => 'Pasirinkti kategoriją',\n            'Required field' => 'Privalomas laukas',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menu',\n            'Menu manager' => 'Menu beheer',\n            'Edit' => 'Bewerken',\n            'Name' => 'Naam',\n            'Delete' => 'Verwijderen',\n            'Order' => 'Volgorde',\n            'Actions' => 'Acties',\n            'Create New Item' => 'Nieuw menu',\n            'New item' => 'Nieuw menu',\n            'Item name' => 'Menu naam',\n            'Item order' => 'Menu volgorde',\n            'Item target' => 'Menu doel',\n            'Item link' => 'Menu link',\n            'Item category' => 'Menu categorie',\n            'Save' => 'Opslaan',\n            'Edit item' => 'Bewerk menu',\n            'Delete item :name' => 'Verwijder menu: :name',\n            'Select page' => 'Selecteer pagina',\n            'Category' => 'Categorie',\n            'Select category' => 'Selecteer categorie',\n            'Required field' => 'Vereist veld',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menu',\n            'Menu manager' => 'Zarządzaj menu',\n            'Edit' => 'Edytuj',\n            'Name' => 'Nazwa',\n            'Delete' => 'Usuń',\n            'Order' => 'Kolejność',\n            'Actions' => 'Akcje',\n            'Create New Item' => 'Utwórz nową pozycję',\n            'New item' => 'Nowa pozycja',\n            'Item name' => 'Nazwa pozycji',\n            'Item order' => 'Kolejność pozycji',\n            'Item target' => 'Cel pozycji',\n            'Item link' => 'Łącze pozycji',\n            'Item category' => 'Kategoria pozycji',\n            'Save' => 'Zapisz',\n            'Edit item' => 'Edytuj pozycję',\n            'Delete item :name' => 'Czy napewno usunąć pozycję :name',\n            'Select page' => 'Wybierz stronę',\n            'Category' => 'Kategoria',\n            'Select category' => 'Wybierz kategorię',\n            'Required field' => 'Pole wymagane',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menu',\n            'Menu manager' => 'Gerenciador do menu',\n            'Edit' => 'Editar',\n            'Name' => 'Nome',\n            'Delete' => 'Deletar',\n            'Order' => 'Ordem',\n            'Actions' => 'Ações',\n            'Create New Item' => 'Criar novo item',\n            'New item' => 'Novo item',\n            'Item name' => 'Nome do item',\n            'Item order' => 'ordem do item',\n            'Item target' => 'Target do item (atributo HTML)',\n            'Item link' => 'Link do item',\n            'Item category' => 'Categoria do item',\n            'Save' => 'Salvar',\n            'Edit item' => 'Editar item',\n            'Delete item :name' => 'Deletar o item :name',\n            'Select page' => 'Selecionar página',\n            'Category' => 'Categoria',\n            'Select category' => 'Selecionar categoria',\n            'Required field' => 'Campo requerido',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Меню',\n            'Menu manager' => 'Менеджер меню',\n            'Edit' => 'Редактировать',\n            'Name' => 'Название',\n            'Delete' => 'Удалить',\n            'Order' => 'Порядок',\n            'Actions' => 'Действия',\n            'Create New Item' => 'Создать новый пункт меню',\n            'New item' => 'Новый пункт меню',\n            'Item name' => 'Название',\n            'Item order' => 'Порядок',\n            'Item target' => 'Цель',\n            'Item link' => 'Ссылка',\n            'Item category' => 'Категория',\n            'Save' => 'Сохранить',\n            'Edit item' => 'Редактирование пункта меню',\n            'Delete item :name' => 'Удалить пункт меню :name',\n            'Select page' => 'Выбрать страницу',\n            'Category' => 'Категория',\n            'Select category' => 'Выбрать категорию',\n            'Required field' => 'Обязательное поле',\n            'Cancel' => 'Отмена',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menu',\n            'Menu manager' => 'Manažér menu',\n            'Edit' => 'Editovať',\n            'Name' => 'Názov',\n            'Delete' => 'Vymazať',\n            'Order' => 'Poradie',\n            'Actions' => 'Akcie',\n            'Create New Item' => 'Vytvoriť novú položku',\n            'New item' => 'Nová položka',\n            'Item name' => 'Názov položky',\n            'Item order' => 'Poradie položky',\n            'Item target' => 'Cieľ položky',\n            'Item link' => 'Odkaz položky',\n            'Item category' => 'Kategória položky',\n            'Save' => 'Uložiť',\n            'Edit item' => 'Editovať položku',\n            'Delete item :name' => 'Vymazať položku :name',\n            'Select page' => 'Vybrať stránku',\n            'Category' => 'Kategória',\n            'Select category' => 'Vybrať kategóriu',\n            'Required field' => 'Povinné políčko',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menu',        \n            'Menu manager' => 'Menu menadžer',\n            'Edit' => 'Izmeni',\n            'Name' => 'Ime',\n            'Delete' => 'Obriši',\n            'Order' => 'Poređenje',\n            'Actions' => 'Akcije',\n            'Create new item' => 'Kreiraj novu stavku',\n            'New item' => 'Nova stavka',\n            'Item name' => 'Ime',\n            'Item order' => 'Poredjenje',\n            'Item target' => 'Otvaranje stranice',\n            'Item link' => 'Link',\n            'Item category' => 'Kategorija',\n            'Save' => 'Sačuvaj',\n            'Edit item' => 'Izmeni',\n            'Delete item :name' => 'Obriši stavku :name',\n            'Select page' => 'Odaberi stranicu',\n            'Category' => 'Kategorija',\n            'Select category' => 'Odaberi kategoriju',\n            'Required field' => 'Polje je potrebno',\n            'Cancel' => 'Otkaži',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Menü',\n            'Menu manager' => 'Menü Yöneticisi',\n            'Edit' => 'Düzenle',\n            'Name' => 'Ad',\n            'Delete' => 'Sil',\n            'Order' => 'Sıra',\n            'Actions' => 'İşlemler',\n            'Create New Item' => 'Yeni Bağlantı Oluştur',\n            'New item' => 'Yeni bağlantı',\n            'Item name' => 'Bağlantı adı',\n            'Item order' => 'Bağlantı sırası',\n            'Item target' => 'Bağlantı hedefi',\n            'Item link' => 'Bağlantı yolu',\n            'Item category' => 'Bağlantı kategorisi',\n            'Save' => 'Kaydet',\n            'Edit item' => 'Bağlantıyı düzenle',\n            'Delete item :name' => ':name adlı bağlantıyı sil',\n            'Select page' => 'Sayfa seç',\n            'Category' => 'Kategori',\n            'Select category' => 'Kategori seç',\n            'Required field' => 'Zorunlu alan',\n            'Cancel' => 'Vazgeç',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => 'Меню',\n            'Menu manager' => 'Менеджер меню',\n            'Edit' => 'Редагувати',\n            'Name' => 'Назва',\n            'Delete' => 'Видалити',\n            'Order' => 'Порядок',\n            'Actions' => 'Дії',\n            'Create New Item' => 'Створити новий пункт меню',\n            'New item' => 'Новий пункт меню',\n            'Item name' => 'Назва',\n            'Item order' => 'Порядок',\n            'Item target' => 'Ціль',\n            'Item link' => 'Лінк',\n            'Item category' => 'Категорія',\n            'Save' => 'Зберегти',\n            'Edit item' => 'Редагувати пункт меню',\n            'Delete item :name' => 'Видалити пункт меню :name',\n            'Select page' => 'Вибрати сторінку',\n            'Category' => 'Категорія',\n            'Select category' => 'Вибрати категорію',\n            'Required field' => 'Обов’язкове поле',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'menu' => array(\n            'Menu' => '菜单',\n            'Menu manager' => '菜单管理',\n            'Edit' => '编辑',\n            'Name' => '名称',\n            'Delete' => '删除',\n            'Order' => '顺序',\n            'Actions' => '操作',\n            'Create New Item' => '创建新项目',\n            'New item' => '新项目',\n            'Item name' => '项目名称',\n            'Item order' => '项目顺序',\n            'Item target' => '项目目标',\n            'Item link' => '项目链接',\n            'Item category' => '项目类别',\n            'Save' => '保存',\n            'Edit item' => '布局项目',\n            'Delete item :name' => '删除项目 :name',\n            'Select page' => '选择页面',\n            'Category' => '类别',\n            'Select category' => '选择类别',\n            'Required field' => '必填字段',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/menu/menu.admin.php",
    "content": "<?php\n\n// Add plugin navigation link\nNavigation::add(__('Menu', 'menu'), 'content', 'menu', 4);\n\n/**\n * Menu Admin Class\n */\nclass MenuAdmin extends Backend\n{\n    /**\n     * Menu table\n     *\n     * @var object\n     */\n    public static $menu = null;\n\n    /**\n     * Main\n     */\n    public static function main()\n    {\n        // Get menu table\n        MenuAdmin::$menu = new Table('menu');\n\n        // Get pages table\n        $pages = new Table('pages');\n\n        // Create target array\n        $menu_item_target_array = array( '' => '',\n                                         '_blank' => '_blank',\n                                         '_parent' => '_parent',\n                                         '_top' => '_top');\n\n        // Create order array\n        $menu_item_order_array = range(0, 40);\n\n        // Check for get actions\n        // ---------------------------------------------\n        if (Request::get('action')) {\n\n            // Switch actions\n            // -----------------------------------------\n            switch (Request::get('action')) {\n\n                // Edit menu item\n                // -----------------------------------------\n                case \"edit\":\n\n                    // Select item\n                    $item = MenuAdmin::$menu->select('[id=\"'.Request::get('item_id').'\"]', null);\n\n                    $menu_item_name       = $item['name'];\n                    $menu_item_link       = $item['link'];\n                    $menu_item_category   = $item['category'];\n                    $menu_item_target     = $item['target'];\n                    $menu_item_order      = $item['order'];\n\n                    $errors = array();\n\n                    // Edit current menu item\n                    if (Request::post('menu_add_item')) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('menu_item_name')) == '') {\n\n                                if (Request::post('menu_item_name')) $menu_item_name = Request::post('menu_item_name'); else $menu_item_name = $item['name'];\n                                if (Request::post('menu_item_link')) $menu_item_link = Request::post('menu_item_link'); else $menu_item_link = $item['link'];\n                                if (Request::post('menu_item_category')) $menu_item_category = Request::post('menu_item_category'); else $menu_item_category = $item['category'];\n                                if (Request::post('menu_item_target')) $menu_item_target = Request::post('menu_item_target'); else $menu_item_target = $item['target'];\n                                if (Request::post('menu_item_order')) $menu_item_order = Request::post('menu_item_order'); else $menu_item_order = $item['order'];\n\n                                $errors['menu_item_name_empty'] = __('Required field', 'menu');\n                            }\n\n                            // Update menu item\n                            if (count($errors) == 0) {\n                                MenuAdmin::$menu->update(Request::get('item_id'),\n                                                         array('name' => Request::post('menu_item_name'),\n                                                              'link'       => Request::post('menu_item_link'),\n                                                              'category'   => Security::safeName(Request::post('menu_item_category'), '-', true),\n                                                              'target'     => Request::post('menu_item_target'),\n                                                              'order'      => Request::post('menu_item_order')));\n\n                                Request::redirect('index.php?id=menu');\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n                    }\n\n                    // Display view\n                    View::factory('box/menu/views/backend/edit')\n                            ->assign('menu_item_name', $menu_item_name)\n                            ->assign('menu_item_link', $menu_item_link)\n                            ->assign('menu_item_category', $menu_item_category)\n                            ->assign('menu_item_target', $menu_item_target)\n                            ->assign('menu_item_order', $menu_item_order)\n                            ->assign('menu_item_target_array', $menu_item_target_array)\n                            ->assign('menu_item_order_array', $menu_item_order_array)\n                            ->assign('errors', $errors)\n                            ->assign('categories', MenuAdmin::getCategories())\n                            ->assign('pages_list', MenuAdmin::getPages())\n                            ->assign('components_list', MenuAdmin::getComponents())\n                            ->display();\n\n                break;\n\n                // Add menu item\n                // -----------------------------------------\n                case \"add\":\n\n                    $menu_item_name = '';\n                    $menu_item_link = '';\n                    $menu_item_category = '';\n                    $menu_item_target = '';\n                    $menu_item_order = '';\n                    $errors = array();\n\n                    // Get current category\n                    $menu_item_category = $current_category = (Request::get('category')) ? Request::get('category') : '' ;\n\n                    // Add new menu item\n                    if (Request::post('menu_add_item')) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('menu_item_name')) == '') {\n\n                                if (Request::post('menu_item_name')) $menu_item_name = Request::post('menu_item_name'); else $menu_item_name = '';\n                                if (Request::post('menu_item_link')) $menu_item_link = Request::post('menu_item_link'); else $menu_item_link = '';\n                                if (Request::post('menu_item_category')) $menu_item_category = Request::post('menu_item_category'); else $menu_item_category = $current_category;\n                                if (Request::post('menu_item_target')) $menu_item_target = Request::post('menu_item_target'); else $menu_item_target = '';\n                                if (Request::post('menu_item_order')) $menu_item_order = Request::post('menu_item_order'); else $menu_item_order = '';\n\n                                $errors['menu_item_name_empty'] = __('Required field', 'menu');\n                            }\n\n                            // Insert new menu item\n                            if (count($errors) == 0) {\n                                MenuAdmin::$menu->insert(array('name' => Request::post('menu_item_name'),\n                                                               'link'       => Request::post('menu_item_link'),\n                                                               'category'   => Security::safeName(Request::post('menu_item_category'), '-', true),\n                                                               'target'     => Request::post('menu_item_target'),\n                                                               'order'      => Request::post('menu_item_order')));\n\n                                Request::redirect('index.php?id=menu');\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n\n                    // Display view\n                    View::factory('box/menu/views/backend/add')\n                            ->assign('menu_item_name', $menu_item_name)\n                            ->assign('menu_item_link', $menu_item_link)\n                            ->assign('menu_item_category', $menu_item_category)\n                            ->assign('menu_item_target', $menu_item_target)\n                            ->assign('menu_item_order', $menu_item_order)\n                            ->assign('menu_item_target_array', $menu_item_target_array)\n                            ->assign('menu_item_order_array', $menu_item_order_array)\n                            ->assign('errors', $errors)\n                            ->assign('categories', MenuAdmin::getCategories())\n                            ->assign('pages_list', MenuAdmin::getPages())\n                            ->assign('components_list', MenuAdmin::getComponents())\n                            ->display();\n\n                break;\n            }\n\n        } else {\n\n            // Delete menu item\n            if (Request::get('delete_item')) {\n                MenuAdmin::$menu->delete((int) Request::get('delete_item'));\n            }\n\n            // Display view\n            View::factory('box/menu/views/backend/index')\n                    ->assign('categories', MenuAdmin::getCategories())\n                    ->assign('menu', MenuAdmin::$menu)\n                    ->display();\n\n        }\n\n    }\n\n    /**\n     * Get categories\n     */\n    public static function getCategories()\n    {\n        $categories = array();\n\n        $_categories = MenuAdmin::$menu->select(null, 'all', null, array('category'));\n\n        foreach ($_categories as $category) {\n            $categories[] = $category['category'];\n        }\n\n        return array_unique($categories);\n    }\n\n    /**\n     * Get pages\n     */\n    protected static function getPages()\n    {\n        // Init vars\n        $pages_array = array();\n        $count = 0;\n\n        // Get pages table\n        $pages = new Table('pages');\n\n        // Get Pages List\n        $pages_list = $pages->select('[slug!=\"error404\" and status=\"published\"]');\n\n        foreach ($pages_list as $page) {\n\n            $pages_array[$count]['title']   = Html::toText($page['title']);\n            $pages_array[$count]['parent']  = $page['parent'];\n            $pages_array[$count]['date']    = $page['date'];\n            $pages_array[$count]['author']  = $page['author'];\n            $pages_array[$count]['slug']    = ($page['slug'] == Option::get('defaultpage')) ? '' : $page['slug'] ;\n\n            if (isset($page['parent'])) {\n                $c_p = $page['parent'];\n            } else {\n                $c_p = '';\n            }\n\n            if ($c_p != '') {\n                $_page = $pages->select('[slug=\"'.$page['parent'].'\"]', null);\n\n                if (isset($_page['title'])) {\n                    $_title = $_page['title'];\n                } else {\n                    $_title = '';\n                }\n                $pages_array[$count]['sort'] = $_title . ' ' . $page['title'];\n            } else {\n                $pages_array[$count]['sort'] = $page['title'];\n            }\n            $_title = '';\n            $count++;\n        }\n\n        // Sort pages\n        $_pages_list = Arr::subvalSort($pages_array, 'sort');\n\n        // return\n        return $_pages_list;\n    }\n\n    /**\n     * Get components\n     */\n    protected static function getComponents()\n    {\n        $components = array();\n\n        if (count(Plugin::$components) > 0) {\n            foreach (Plugin::$components as $component) {\n                if ($component !== 'pages' && $component !== 'sitemap') $components[] = Text::lowercase($component);\n            }\n        }\n\n        return $components;\n    }\n\n}\n"
  },
  {
    "path": "plugins/box/menu/menu.plugin.php",
    "content": "<?php\n\n/**\n *  Menu plugin\n *\n *  @package Monstra\n *  @subpackage Plugins\n *  @author Romanenko Sergey / Awilum\n *  @copyright 2012-2014 Romanenko Sergey / Awilum\n *  @version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Menu', 'menu'),\n                __('Menu manager', 'menu'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {\n\n    // Include Admin\n    Plugin::admin('menu', 'box');\n\n}\n\n// Add Plugin Javascript\nJavascript::add('plugins/box/menu/js/menu.js', 'backend');\n\n/**\n * Menu Class\n */\nclass Menu\n{\n    /**\n     * Get menu\n     *\n     * @param string $category Category name\n     */\n    public static function get($category = '')\n    {\n        // Get menu table\n        $menu = new Table('menu');\n\n        // Display view\n        View::factory('box/menu/views/frontend/index')\n                ->assign('items', $menu->select('[category=\"'.$category.'\"]', 'all', null, array('id', 'name', 'link', 'target', 'order', 'category'), 'order', 'ASC'))\n                ->assign('uri', Uri::segments())\n                ->assign('defpage', Option::get('defaultpage'))\n                ->display();\n\n    }\n}\n"
  },
  {
    "path": "plugins/box/menu/views/backend/add.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('New item', 'menu'); ?></h2>\n\n<?php echo (Form::open()); ?>\n<?php echo (Form::hidden('csrf', Security::token())); ?>\n<?php if (isset($errors['menu_item_name_empty'])) $error_class = ' error'; else $error_class = ''; ?>\n\n<a href=\"#\" class=\"btn btn-phone btn-default\" data-toggle=\"modal\" data-target=\"#selectPageModal\"><?php echo __('Select page', 'menu'); ?></a>\n<?php echo Html::nbsp(2); ?>\n<a href=\"#\" class=\"btn btn-phone btn-default\" data-toggle=\"modal\" data-target=\"#selectCategoryModal\"><?php echo __('Select category', 'menu'); ?></a>\n\n<div class=\"row margin-top-2\">\n    <div class=\"col-md-6\">\n\n        <div class=\"form-group\">\n        <?php    \n            echo Form::label('menu_item_name', __('Item name', 'menu'));\n            echo Form::input('menu_item_name', $menu_item_name, array('class' => (isset($errors['menu_item_name_empty']) || isset($errors['menu_item_name_empty'])) ? 'form-control error-field' : 'form-control'));\n            if (isset($errors['menu_item_name_empty'])) echo '<div class=\"error-message\">'.$errors['menu_item_name_empty'].'</div>';\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('menu_item_link', __('Item link', 'menu')).\n                Form::input('menu_item_link', $menu_item_link, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('menu_item_category', __('Item category', 'menu')).\n                Form::input('menu_item_category', $menu_item_category, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('menu_item_target', __('Item target', 'menu')).\n                Form::select('menu_item_target', $menu_item_target_array, $menu_item_target, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('menu_item_order', __('Item order', 'menu')).\n                Form::select('menu_item_order', $menu_item_order_array, $menu_item_order, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::submit('menu_add_item', __('Save', 'menu'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n                Html::anchor(__('Cancel', 'menu'), 'index.php?id=menu', array('title' => __('Cancel', 'menu'), 'class' => 'btn btn-phone btn-default')).\n                Form::close()\n            );\n        ?>\n        </div>\n    </div>\n</div>\n\n<div class=\"modal fade\" id=\"selectPageModal\"> \n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <div class=\"close\" data-dismiss=\"modal\">&times;</div>\n                <h4 class=\"modal-title\"><?php echo __('Select page', 'menu'); ?></h4>\n            </div>\n            <div class=\"modal-body\">\n                <ul class=\"list-unstyled\">\n                <?php if (count($pages_list) > 0) foreach ($pages_list as $page) { ?>\n                    <li><?php echo (!empty($page['parent'])) ? Html::nbsp().Html::arrow('right').Html::nbsp(2) : '' ; ?><a href=\"javascript:;\" onclick=\"$.monstra.menu.selectPage('<?php echo (empty($page['parent'])) ? $page['slug'] : $page['parent'].'/'.$page['slug'] ; ?>', '<?php echo $page['title']; ?>');\"><?php echo $page['title']; ?></a></li>\n                <?php } ?>\n                <?php if (count($components_list) > 0) foreach ($components_list as $component) { ?>\n                    <li><a href=\"javascript:;\" onclick=\"$.monstra.menu.selectPage('<?php echo $component; ?>', '<?php echo __(ucfirst($component), $component); ?>');\"><?php echo __(ucfirst($component), $component); ?></a></li>\n                <?php } ?>\n                </ul>\n            </div>\n        </div>\n    </div>\n</div>\n\n<div class=\"modal fade\" id=\"selectCategoryModal\"> \n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <a class=\"close\" data-dismiss=\"modal\">&times;</a>\n                <h4 class=\"modal-title\"><?php echo __('Select category', 'menu'); ?></h4>\n            </div>\n            <div class=\"modal-body\">\n                <ul class=\"list-unstyled\">\n                <?php if (count($categories) > 0) foreach ($categories as $category) { ?>\n                    <li><a href=\"javascript:;\" onclick=\"$.monstra.menu.selectCategory('<?php echo $category; ?>');\"><?php echo $category; ?></a></li>\n                <?php } ?>\n                </ul>\n            </div>\n        </div>\n    </div>\n</div>"
  },
  {
    "path": "plugins/box/menu/views/backend/edit.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('Edit item', 'menu'); ?></h2>\n\n<div class=\"row\">\n    <div class=\"col-md-6\">\n\n        <?php echo (Form::open()); ?>\n\n        <?php echo (Form::hidden('csrf', Security::token())); ?>\n\n        <?php if (isset($errors['menu_item_name_empty'])) $error_class = ' error'; else $error_class = ''; ?>\n\n        <a href=\"#\" class=\"btn btn-phone btn-default\" data-toggle=\"modal\" data-toggle=\"modal\" data-target=\"#selectPageModal\"><?php echo __('Select page', 'menu'); ?></a>\n        <?php echo Html::nbsp(2); ?>\n        <a href=\"#\" class=\"btn btn-phone btn-default\" data-toggle=\"modal\" data-toggle=\"modal\" data-target=\"#selectCategoryModal\"><?php echo __('Select category', 'menu'); ?></a>\n    \n        <div class=\"form-group margin-top-2\">\n        <?php\n            echo Form::label('menu_item_name', __('Item name', 'menu'));\n            echo Form::input('menu_item_name', $menu_item_name, array('class' => (isset($errors['menu_item_name_empty']) || isset($errors['menu_item_name_empty'])) ? 'form-control error-field' : 'form-control'));\n        ?>\n        </div>\n\n        <div class=\"form-group\">\n        <?php\n            if (isset($errors['menu_item_name_empty'])) echo Html::nbsp(4).'<span style=\"color:red;\">'.$errors['menu_item_name_empty'].'</span>';\n            echo (\n                Form::label('menu_item_link', __('Item link', 'menu')).\n                Form::input('menu_item_link', $menu_item_link, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('menu_item_category', __('Item category', 'menu')).\n                Form::input('menu_item_category', $menu_item_category, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('menu_item_target', __('Item target', 'menu')).\n                Form::select('menu_item_target', $menu_item_target_array, $menu_item_target, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('menu_item_order', __('Item order', 'menu')).\n                Form::select('menu_item_order', $menu_item_order_array, $menu_item_order, array('class' => 'form-control'))\n            );\n        ?>\n        </div>    \n        <?php\n            echo (\n                Form::submit('menu_add_item', __('Save', 'menu'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n                Html::anchor(__('Cancel', 'menu'), 'index.php?id=menu', array('title' => __('Cancel', 'menu'), 'class' => 'btn btn-phone btn-default')).\n                Form::close()\n            );\n        ?>\n    </div>\n</div>\n\n<div class=\"modal fade\" id=\"selectPageModal\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <div class=\"close\" data-dismiss=\"modal\">&times;</div>\n                <h4 class=\"modal-title\"><?php echo __('Select page', 'menu'); ?></h4>\n            </div>\n            <div class=\"modal-body\">\n                <ul class=\"list-unstyled\">\n                <?php if (count($pages_list) > 0) foreach ($pages_list as $page) { ?>\n                    <li><?php echo (!empty($page['parent'])) ? Html::nbsp().Html::arrow('right').Html::nbsp(2) : '' ; ?><a href=\"javascript:;\" onclick=\"$.monstra.menu.selectPage('<?php echo (empty($page['parent'])) ? $page['slug'] : $page['parent'].'/'.$page['slug'] ; ?>', '<?php echo $page['title']; ?>');\"><?php echo $page['title']; ?></a></li>\n                <?php } ?>\n                <?php if (count($components_list) > 0) foreach ($components_list as $component) { ?>\n                    <li><a href=\"javascript:;\" onclick=\"$.monstra.menu.selectPage('<?php echo $component; ?>', '<?php echo __(ucfirst($component), $component); ?>');\"><?php echo __(ucfirst($component), $component); ?></a></li>\n                <?php } ?>\n                </ul>\n            </div>\n        </div>\n    </div>\n</div>\n\n<div class=\"modal fade\" id=\"selectCategoryModal\"> \n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <div class=\"close\" data-dismiss=\"modal\">&times;</div>\n                <h4 class=\"modal-title\"><?php echo __('Select category', 'menu'); ?></h4>\n            </div>\n            <div class=\"modal-body\">\n                <ul class=\"list-unstyled\">\n                <?php if (count($categories) > 0) foreach ($categories as $category) { ?>\n                    <li><a href=\"javascript:;\" onclick=\"$.monstra.menu.selectCategory('<?php echo $category; ?>');\"><?php echo $category; ?></a></li>\n                <?php } ?>\n                </ul>\n            </div>\n        </div>\n    </div>\n</div>"
  },
  {
    "path": "plugins/box/menu/views/backend/index.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('Menu', 'menu'); ?></h2>\n\n<?php if ($menu->count() == 0) { ?>\n<div class=\"vertical-align margin-bottom-1\">\n    <div class=\"text-left row-phone\">\n        <h3><?php echo __('Category', 'menu'); ?>: <?php echo 'default'; ?></h3>\n    </div>\n    <div class=\"text-right row-phone\">\n        <?php\n            echo (\n                Html::anchor(__('Create New Item', 'menu'), 'index.php?id=menu&action=add', array('title' => __('Create New Item', 'menu'), 'class' => 'btn btn-phone btn-primary'))\n            );\n        ?>\n    </div>\n</div>\n<?php } ?>\n\n<?php\n    foreach ($categories as $category) {\n        $items = $menu->select('[category=\"'.$category.'\"]', 'all', null, array('id', 'name', 'link', 'target', 'order', 'category'), 'order', 'ASC');\n        $category_to_add = ($category == '') ? '' : '&category='.$category;\n?>\n\n<div class=\"vertical-align margin-bottom-1\">\n    <div class=\"text-left row-phone\">\n        <h3><?php echo __('Category', 'menu'); ?>: <?php echo ($category == '') ? 'default' : $category; ?></h3>\n    </div>\n    <div class=\"text-right row-phone\">\n        <br>\n        <?php\n            echo (\n                Html::anchor(__('Create New Item', 'menu'), 'index.php?id=menu&action=add'.$category_to_add , array('title' => __('Create New Item', 'menu'), 'class' => 'btn btn-phone btn-primary'))\n            );\n        ?>\n    </div>\n</div>\n\n<table class=\"table table-bordered\">\n    <thead>\n        <tr>\n            <th><?php echo __('Name', 'menu'); ?></th>\n            <th><?php echo __('Order', 'menu'); ?></th>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n        <?php foreach ($items as $item) { ?>\n        <?php\n\n            $item['link'] = Html::toText($item['link']);\n            $item['name'] = Html::toText($item['name']);\n\n            $pos = strpos($item['link'], 'http://');\n            if ($pos === false) {\n                $link = Option::get('siteurl').'/'.$item['link'];\n            } else {\n                $link = $item['link'];\n            }\n        ?>\n        <tr>\n            <td>\n                <a target=\"_blank\" href=\"<?php echo $link; ?>\"><?php echo $item['name']; ?></a>\n            </td>\n            <td>\n                <?php echo $item['order']; ?>\n            </td>\n            <td>\n                <div class=\"pull-right\">\n                <?php echo Html::anchor(__('Edit', 'menu'), 'index.php?id=menu&action=edit&item_id='.$item['id'], array('class' => 'btn btn-primary')); ?>\n                <?php echo Html::anchor(__('Delete', 'menu'),\n                           'index.php?id=menu&delete_item='.$item['id'],\n                           array('class' => 'btn btn-danger', 'onclick' => \"return confirmDelete('\".__('Delete item :name', 'menu', array(':name' => $item['name'])).\"')\"));\n                 ?>\n             </div>\n            </td>\n        </tr>\n        <?php } ?>\n    </tbody>\n</table>\n<?php } ?>\n"
  },
  {
    "path": "plugins/box/menu/views/frontend/index.view.php",
    "content": "<?php\n\n    $anchor_active = '';\n    $li_active = '';\n    $target = '';\n\n    if (count($items) > 0) {\n        foreach ($items as $item) {\n\n            $item['link'] = Html::toText($item['link']);\n            $item['name'] = Html::toText($item['name']);\n\n            $pos = strpos($item['link'], 'http://');\n            if ($pos === false) {\n                $link = Option::get('siteurl').'/'.$item['link'];\n            } else {\n                $link = $item['link'];\n            }\n\n            if (isset($uri[1])) {\n                $child_link = explode(\"/\",$item['link']);\n                if (isset($child_link[1])) {\n                    if (in_array($child_link[1], $uri)) {\n                        $anchor_active = ' class=\"current\" ';\n                        $li_active = ' class=\"active\"';\n                    }\n                }\n            }\n\n            if (isset($uri[0]) && $uri[0] !== '') {\n                if (in_array($item['link'], $uri)) {\n                    $anchor_active = ' class=\"current\" ';\n                    $li_active = ' class=\"active\"';\n                }\n            } else {\n                if ($defpage == trim($item['link'])) {\n                    $anchor_active = ' class=\"current\" ';\n                    $li_active = ' class=\"active\"';\n                }\n            }\n\n            if (trim($item['target']) !== '') {\n                $target = ' target=\"'.$item['target'].'\" ';\n            }\n\n            echo '<li'.$li_active.'>'.'<a href=\"'.$link.'\"'.$anchor_active.$target.'>'.$item['name'].'</a>'.'</li>';\n\n            $anchor_active = '';\n            $li_active = '';\n            $target = '';\n        }\n    }\n"
  },
  {
    "path": "plugins/box/pages/install/pages.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/pages/pages.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>1</plugin_priority>\n    <plugin_name>Pages</plugin_name>\n    <plugin_description>Pages managment plugin</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/pages/js/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/box/pages/js/pages.js",
    "content": "if (typeof $.monstra == 'undefined') $.monstra = {};\n\n$.monstra.pages = {\n\n    init: function() { \n        this.pagesExpandProcess();\n    },\n\n    pageExpand: function(slug, expand, token) {\n        $.ajax({\n            type:\"post\",        \n            data:\"page_slug=\"+slug+\"&page_expand=\"+expand+\"&token=\"+token,\n            url: $('form input[name=\"url\"]').val()\n        });\n    },\n\n    pagesExpandProcess: function() {\n        $(\".parent\").click(function() {\n            if ($(this).html() == \"-\") {\n                $('[rel=\"children_' + $(this).attr('rel')+'\"]').hide();                                \n                $(this).html(\"+\");\n                $.monstra.pages.pageExpand($(this).attr(\"rel\"), \"1\", $(this).attr(\"token\"));\n            } else {\n                $('[rel=\"children_' + $(this).attr('rel')+'\"]').show();\n                $(this).html(\"-\");\n                $.monstra.pages.pageExpand($(this).attr(\"rel\"), \"0\", $(this).attr(\"token\"));\n            }\n        });\n    }\n\n};\n\n\n$(document).ready(function(){\n    $.monstra.pages.init();\n});"
  },
  {
    "path": "plugins/box/pages/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Stránky',\n            'Pages manager' => 'Manažer stránek',\n            'Content' => 'Obsah',\n            'Create new page' => 'Vytvořit novou stránku',\n            'New page' => 'Nová stránka',\n            'Edit page' => 'Editovat stránku',\n            'Date' => 'Datum',\n            'Clone' => 'Klonovat',\n            'Edit' => 'Editovat',\n            'Delete' => 'Vymazat',\n            'Delete page: :page' => 'Vymazat stránku: :page',\n            'Title' => 'Titulka',\n            'Name' => 'Název',\n            'Author' => 'Autor',\n            'Name (slug)' => 'Název (slug)',\n            'Description' => 'Popis',\n            'Keywords' => 'Klíčová slová',\n            'Parent' => 'Rodič - Nadřazená stránka',\n            'Template' => 'Téma',\n            'Year' => 'Rok',\n            'Day' => 'Den',\n            'Month' => 'Měsíc',\n            'Hour' => 'Hodina',\n            'Minute' => 'Minuta',\n            'Second' => 'Sekunda',\n            'This field should not be empty' => 'Toto políčko nesmí být prázdné',\n            'This page already exists' => 'Tato stránka již existuje',\n            'Extra' => 'Extra',\n            'Save' => 'Uložit',\n            'Save and Exit' => 'Uložit a ukončit',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Vaše změny na stránce <i> :page </i> byly uloženy.',\n            'The page <i>:page</i> cloned.' => 'Stránka <i>:page</i> byla klonována.',\n            'Status' => 'Status',\n            'Actions' => 'Akcie',\n            'Add' => 'Přidat',\n            'Published' => 'Zveřejněné',\n            'Draft' => 'Rozpísané',\n            'Published on' => 'Zveřejněné dne',\n            'Edit 404 Page' => 'Editovat stránku 404',\n            'Page <i>:page</i> deleted' => 'Vymazat stránku: <i>:page</i>',\n            'Search Engines Robots' => 'Vyhledávací roboti',\n            'Page' => 'Stránka',\n            'Metadata' => 'Metadata',\n            'Settings' => 'Nastavení',\n            'Required field' => 'Povinné políčko',\n            'Access' => 'Přístup',\n            'Public' => 'Veřejný',\n            'Registered' => 'Po přihlášení',\n            'Cancel' => 'Zrušit',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Seiten',\n            'Pages manager' => 'Seiten Manager',\n            'Content' => 'Inhalt',\n            'Create New Page' => 'Neue Seite erstellen',\n            'New Page' => 'Neue Seite',\n            'Edit Page' => 'Seite bearbeiten',\n            'Date' => 'Datum',\n            'Clone' => 'Klonen',\n            'Edit' => 'Bearbeiten',\n            'Delete' => 'Löschen',\n            'Delete page: :page' => 'Lösche Seite: :page',\n            'Title' => 'Titel',\n            'Name' => 'Name',\n            'Author' => 'Author',\n            'Name (slug)' => 'Name (slug)',\n            'Description' => 'Beschreibung',\n            'Keywords' => 'Schlagwörter',\n            'Parent' => 'Übergeordnete',\n            'Template' => 'Vorlage',\n            'Year' => 'Jahr',\n            'Day' => 'Tag',\n            'Month' => 'Monat',\n            'Hour' => 'Stunde',\n            'Minute' => 'Minute',\n            'Second' => 'Sekunde',\n            'This field should not be empty' => 'Dieses Feld darf nicht leer sein',\n            'This page already exists' => 'Diese Seite existiert bereits',\n            'Extra' => 'Extra',\n            'Save' => 'Speichern',\n            'Save and Exit' => 'Speichern und Beenden',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Deine Änderungen an der Seite <i> :page </i> wurden gespeichert.',\n            'The page <i>:page</i> cloned.' => 'Die Seite <i>:page</i> wurde gekloned.',\n            'Status' => 'Status',\n            'Actions' => 'Aktionen',\n            'Add' => 'Hinzufügen',\n            'Published' => 'Veröffentlicht',\n            'Draft' => 'Entwurf',\n            'Published on' => 'Veröffentlicht am',\n            'Edit 404 Page' => 'Bearbeite 404-Fehler Seite',\n            'Page <i>:page</i> deleted' => 'Seite <i>:page</i> wurde gelöscht',\n            'Search Engines Robots' => 'Suchmaschinen-Roboter',\n            'Page' => 'Seite',\n            'Metadata' => 'Metadata',\n            'Settings' => 'Einstellungen',\n            'Required field' => 'Pflichtfeld',\n            'Access' => 'Zugriff',\n            'Public' => 'Öffentlich',\n            'Registered' => 'Angemeldet',\n            'Cancel' => 'Abbrechen',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Pages',\n            'Pages manager' => 'Pages manager',\n            'Content' => 'Content',\n            'Create New Page' => 'Create New Page',\n            'New Page' => 'New Page',\n            'Edit Page' => 'Edit Page',\n            'Date' => 'Date',\n            'Clone' => 'Clone',\n            'Edit' => 'Edit',\n            'Delete' => 'Delete',\n            'Delete page: :page' => 'Delete page: :page',\n            'Title' => 'Title',\n            'Name' => 'Name',\n            'Author' => 'Author',\n            'Name (slug)' => 'Name (slug)', // check whether in use or not\n            'Slug (url)' => 'Slug (url)',\n            'Description' => 'Description',\n            'Keywords' => 'Keywords',\n            'Parent' => 'Parent',\n            'Template' => 'Template',\n            'Year' => 'Year',\n            'Day' => 'day',\n            'Month' => 'Month',\n            'Hour' => 'Hour',\n            'Minute' => 'Minute',\n            'Second' => 'Second',\n            'This field should not be empty' => 'This field should not be empty',\n            'This page already exists' => 'This page already exists',\n            'Extra' => 'Extra',\n            'Save' => 'Save',\n            'Save and Exit' => 'Save and Exit',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Your changes to the page <i> :page </i> have been saved.',\n            'The page <i>:page</i> cloned.' => 'The page <i>:page</i> cloned.',\n            'Status' => 'Status',\n            'Actions' => 'Actions',\n            'Add' => 'Add',\n            'Published' => 'Published',\n            'Draft' => 'Draft',\n            'Published on' => 'Published on',\n            'Edit 404 Page' => 'Edit 404 Page',\n            'Page <i>:page</i> deleted' => 'Page <i>:page</i> deleted',\n            'Search Engines Robots' => 'Search Engines Robots',\n            'Page' => 'Page',\n            'Metadata' => 'Metadata',\n            'Settings' => 'Settings',\n            'Required field' => 'Required field',\n            'Access' => 'Access',\n            'Public' => 'Public',\n            'Registered' => 'Registered',\n            'Cancel' => 'Cancel',\n            'Tags' => 'Tags',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Páginas',\n            'Pages manager' => 'Administrador de páginas',\n            'Content' => 'Contenido',\n            'Create New Page' => 'Crear nueva página',\n            'New Page' => 'Nueva página',\n            'Edit Page' => 'Editar página',\n            'Date' => 'Fecha',\n            'Clone' => 'Clonar',\n            'Edit' => 'Editar',\n            'Delete' => 'Eliminar',\n            'Delete page: :page' => 'Eliminar página: :page',\n            'Title' => 'Título',\n            'Name' => 'Nombre',\n            'Author' => 'Autor',\n            'Name (slug)' => 'Nombre (slug)',\n            'Description' => 'Descripción',\n            'Keywords' => 'Palabras claves',\n            'Parent' => 'Página padre',\n            'Template' => 'Plantilla',\n            'Year' => 'Año',\n            'Day' => 'Día',\n            'Month' => 'Mes',\n            'Hour' => 'Hora',\n            'Minute' => 'Minuto',\n            'Second' => 'Segundo',\n            'This field should not be empty' => 'Este campo no puede quedar vacío',\n            'This page already exists' => 'Esta página ya existe',\n            'Extra' => 'Extra',\n            'Save' => 'Guardar',\n            'Save and Exit' => 'Guardar y salir',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Tus cambios realizados en la página <i>:page</i> han sido guardados.',\n            'The page <i>:page</i> cloned.' => 'La página <i>:page</i> ha sido clonada.',\n            'Status' => 'Estado',\n            'Actions' => 'Acciones',\n            'Add' => 'Añadir',\n            'Published' => 'Publicada',\n            'Draft' => 'Borrador',\n            'Published on' => 'Publicada',\n            'Edit 404 Page' => 'Editar página 404',\n            'Page <i>:page</i> deleted' => 'Página <i>:page</i> eliminada',\n            'Search Engines Robots' => 'Motores de búsqueda robots',\n            'Page' => 'Página',\n            'Metadata' => 'Metadatos',\n            'Settings' => 'Ajustes',\n            'Required field' => 'Dato requerido',\n            'Access' => 'Acceso',\n            'Public' => 'Público',\n            'Registered' => 'Registrado',\n            'Cancel' => 'Cancelar',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'صفحه',        \n            'Pages manager' => 'مدیریت صفحه',        \n            'Content' => 'محتوی',\n            'Create New Page' => 'ایجاد صفحه جدید',\n            'New Page' => 'صفحه جدید',\n            'Edit Page' => 'ویرایش صفحه',\n            'Date' => 'تاریخ',\n            'Clone' => 'کپی برداری',\n            'Edit' => 'ویرایش',        \n            'Delete' => 'حذف',\n            'Delete page: :page' => 'حذف صفحه: :page',\n            'Title' => 'عنوان',\n            'Name' => 'نام',\n            'Author' => 'نویسنده',\n            'Name (slug)' => 'نام (برچسب)',\n            'Description' => 'توضیحات',\n            'Keywords' => 'کلمات کلیدی',\n            'Parent' => 'والد',\n            'Template' => 'قالب',\n            'Year' => 'سال',\n            'Day' => 'روز',\n            'Month' => 'ماه',\n            'Hour' => 'ساعت',\n            'Minute' => 'دقیقه',\n            'Second' => 'ثانیه',\n            'This field should not be empty' => 'این کادر نباید خالی باشد',\n            'This page already exists' => 'این صفحه در حال حاضر وجود دارد',\n            'Extra' => 'اضافی',\n            'Save' => 'ذخیره',\n            'Save and Exit' => 'ذخیره و خروج',\n            'Your changes to the page <i>:page</i> have been saved.' => 'تغییرات شما بر روی صفحه <i> :page </i> ذخیره شد.',\n            'The page <i>:page</i> cloned.' => 'صفحه <i>:page</i> کپی برداری شد.',\n            'Status' => 'وضعیت',\n            'Actions' => 'عملیات',\n            'Add' => 'افزودن',\n            'Published' => 'منتشر شده',\n            'Draft' => 'پیش نویس',\n            'Published on' => 'منتشر شده در',\n            'Edit 404 Page' => 'ویرایش صفحه 404',\n            'Page <i>:page</i> deleted' => 'صفحه <i>:page</i> حذف شد',\n            'Search Engines Robots' => 'روباتهای موتور جستجوگر',\n            'Page' => 'صفحه',\n            'Metadata' => 'فراداده',\n            'Settings' => 'تنظیمات',\n            'Required field' => 'کادر الزامی',\n            'Access' => 'دسترسی',\n            'Public' => 'عمومی',\n            'Registered' => 'اعضاء',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Pages',        \n            'Pages manager' => 'Gestionnaire des pages',        \n            'Content' => 'Contenu',\n            'Create new page' => 'Créer une nouvelle page',\n            'New page' => 'Nouvelle page',\n            'Edit page' => 'Editer la page',        \n            'Date' => 'Date',\n            'Clone' => 'Cloner',\n            'Edit' => 'Editer',        \n            'Delete' => 'Supprimer',\n            'Delete page: :page' => 'Supprimer la page: :page',\n            'Title' => 'Titre',\n            'Name' => 'Nom',\n            'Author' => 'Auteur',\n            'Name (slug)' => 'Nom (Permalien)',\n            'Description' => 'Description',\n            'Keywords' => 'Mots clés',\n            'Parent' => 'Parent',\n            'Template' => 'Modèle',\n            'Year' => 'Année',\n            'Day' => 'Jour',\n            'Month' => 'Mois',\n            'Hour' => 'Heure',\n            'Minute' => 'Minute',\n            'Second' => 'Seconde',\n            'This field should not be empty' => 'Ce champ ne doit pas être vide',\n            'This page already exists' => 'Cette page existe déjà',\n            'Extra' => 'Extra',\n            'Save' => 'Enregistrer',\n            'Save and exit' => 'Enregistrer et sortir',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Vos changements sur la page <i> :page </i> ont été sauvegardés.',\n            'The page <i>:page</i> cloned.' => 'La page <i>:page</i> est cloné.',\n            'Status' => 'Statut',\n            'Actions' => 'Actions',\n            'Add' => 'Ajouter',\n            'Published' => 'Publiée',\n            'Draft' => 'Brouillon',\n            'Published on' => 'Publiée le',\n            'Edit 404 Page' => 'Editer la page 404',\n            'Page <i>:page</i> deleted' => 'Page <i>:page</i> supprimé',\n            'Search Engines Robots' => 'Robots des moteurs de recherche',\n            'Page' => 'Page',\n            'Metadata' => 'Métadonnées',\n            'Settings' => 'Paramètres',\n            'Required field' => 'Champ requis',\n            'Access' => 'Accès',\n            'Public' => 'Public',\n            'Registered' => 'Inscrit',\n            'Cancel' => 'Cancel',\n        )\n    );"
  },
  {
    "path": "plugins/box/pages/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Oldalak',        \n            'Pages manager' => 'Oldalkezelő',        \n            'Content' => 'Tartalom',\n            'Create New Page' => 'Új oldal létrehozása',\n            'New Page' => 'Új oldal',\n            'Edit page' => 'Oldal szerkesztése',        \n            'Date' => 'Dátum',\n            'Clone' => 'Klón',\n            'Edit' => 'Szerkeszt',        \n            'Delete' => 'Töröl',\n            'Delete page: :page' => 'Oldal törlése: :page',\n            'Title' => 'Cím',\n            'Name' => 'Név',\n            'Author' => 'Szerző',\n            'Name (slug)' => 'Név (slug)',\n            'Description' => 'Leírás',\n            'Keywords' => 'Kulcsszavak',\n            'Parent' => 'Szülő',\n            'Template' => 'Sablon',\n            'Year' => 'Év',\n            'Day' => 'Nap',\n            'Month' => 'Hónap',\n            'Hour' => 'Óra',\n            'Minute' => 'Perc',\n            'Second' => 'Másodperc',\n            'This field should not be empty' => 'Ez a mező nem lehet üres',\n            'This page already exists' => 'Ez az oldal már létezik',\n            'Extra' => 'Extra',\n            'Save' => 'Mentés',\n            'Save and Exit' => 'Mentés és Kilépés',\n            'Your changes to the page <i>:page</i> have been saved.' => 'A módosításoksok az oldalra <i> :page </i> mentve.',\n            'The page <i>:page</i> cloned.' => 'A(z) <i>:page</i> oldal kónozva.',\n            'Status' => 'Állapot',\n            'Actions' => 'Műveletek',\n            'Add' => 'Hozzáad',\n            'Published' => 'Közzétett',\n            'Draft' => 'Vázlat',\n            'Published on' => 'Publikálva',\n            'Edit 404 Page' => 'A 404-es oldal szerkesztése',\n            'Page <i>:page</i> deleted' => 'A(z) <i>:page</i> oldal törölve',\n            'Search Engines Robots' => 'Keresőrobotok',\n            'Page' => 'Oldal',\n            'Metadata' => 'Metaadat',\n            'Settings' => 'Beállítások',\n            'Required field' => 'Kötelező mező',\n            'Access' => 'Hozzáférés',\n            'Public' => 'Nyilvános',\n            'Registered' => 'Regisztrált',\n            'Cancel' => 'Cancel',\n        )\n    );"
  },
  {
    "path": "plugins/box/pages/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Halaman',\n            'Pages manager' => 'Pengelolaan Halaman',\n            'Content' => 'Isi',\n            'Create New Page' => 'Buat Halaman Baru',\n            'New Page' => 'Halaman Baru',\n            'Edit Page' => 'Perbaiki Halaman',\n            'Date' => 'Tanggal',\n            'Clone' => 'Duplikasi',\n            'Edit' => 'Perbaiki',\n            'Delete' => 'Hapus',\n            'Delete page: :page' => 'Hapus Halaman: :page',\n            'Title' => 'Judul',\n            'Name' => 'Nama',\n            'Author' => 'Penulis',\n            'Name (slug)' => 'Nama (slug)',\n            'Description' => 'Deskripsi',\n            'Keywords' => 'Kata Kunci',\n            'Parent' => 'Induk',\n            'Template' => 'Contoh',\n            'Year' => 'Tahun',\n            'Day' => 'Hari',\n            'Month' => 'Bulan',\n            'Hour' => 'Jam',\n            'Minute' => 'Menit',\n            'Second' => 'Detik',\n            'This field should not be empty' => 'Isian ini tidak boleh kosong',\n            'This page already exists' => 'Halaman ini sudah ada',\n            'Extra' => 'Extra',\n            'Save' => 'Simpan',\n            'Save and Exit' => 'Simpan dan Keluar',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Perubahan pada halaman <i> :page </i> telah disimpan.',\n            'The page <i>:page</i> cloned.' => 'Halaman ini <i>:page</i> telah diduplikasi.',\n            'Status' => 'Status',\n            'Actions' => 'Tindakan',\n            'Add' => 'Tambah',\n            'Published' => 'Dimuat',\n            'Draft' => 'Konsep',\n            'Published on' => 'Dimuat pada',\n            'Edit 404 Page' => 'Perbaiki Halaman 404',\n            'Page <i>:page</i> deleted' => 'Halaman <i>:page</i> dihapus',\n            'Search Engines Robots' => 'Mesin Pencari Otomatis',\n            'Page' => 'Halaman',\n            'Metadata' => 'Metadata',\n            'Settings' => 'Pengaturan',\n            'Required field' => 'Isian yang Diperlukan',\n            'Access' => 'Akses',\n            'Public' => 'Umum',\n            'Registered' => 'Terdaftar',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Pagine',\n            'Pages manager' => 'Gestione pagine',\n            'Content' => 'Contenuto',\n            'Create New Page' => 'Crea Nuova Pagina',\n            'New Page' => 'Nuova Pagina',\n            'Edit Page' => 'Modifica Pagina',\n            'Date' => 'Data',\n            'Clone' => 'Clona',\n            'Edit' => 'Modifica',\n            'Delete' => 'Elimina',\n            'Delete page: :page' => 'Elimina pagina: :page',\n            'Title' => 'Titolo',\n            'Name' => 'Nome',\n            'Author' => 'Autore',\n            'Name (slug)' => 'Nome (slug)',\n            'Description' => 'Descrizione',\n            'Keywords' => 'Parole chiavi',\n            'Parent' => 'Parente',\n            'Template' => 'Modello',\n            'Year' => 'Anno',\n            'Day' => 'Giorno',\n            'Month' => 'Mese',\n            'Hours' => 'Ora',\n            'Minute' => 'Minuto',\n            'Second' => 'Secondo',\n            'This field should not be empty' => 'Campo obbligatorio',\n            'This page already exists' => 'Tale pagina già esistente',\n            'Extra' => 'Extra',\n            'Save' => 'Salva',\n            'Save and Exit' => 'Salva ed Esci',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Le modifiche alla pagina <i>:page</i> sono state salvate.',\n            'The page <i>:page</i> cloned.' => 'Pagina <i>:page</i> è stata clonata.',\n            'Status' => 'Stato',\n            'Actions' => 'Azioni',\n            'Add' => 'Aggiungi',\n            'Published' => 'Pubblicato',\n            'Draft' => 'Bozza',\n            'Published on' => 'Pubblicato il',\n            'Edit 404 Page' => 'Modifica Pagina 404',\n            'Page <i>:page</i> deleted' => 'Pagina <i>:page</i> è stata cancellata',\n            'Search Engines Robots' => 'Robot dei motori di ricerca',\n            'Page' => 'Pagina',\n            'Metadata' => 'Metadata',\n            'Settings' => 'Impostazioni',\n            'Required field' => 'Campo obbligatorio',\n            'Access' => 'Accesso',\n            'Public' => 'Pubblico',\n            'Registered' => 'Registrato',\n            'Cancel' => 'Cancel',\n        ),\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'ページ',\n            'Pages manager' => 'ページの管理',\n            'Content' => '内容',\n            'Create New Page' => '新規ページの作成',\n            'New Page' => '新規ページ',\n            'Edit Page' => 'ページの編集',\n            'Date' => '日付',\n            'Clone' => '複製',\n            'Edit' => '編集',\n            'Delete' => '削除',\n            'Delete page: :page' => 'ページの削除: :page',\n            'Title' => 'タイトル',\n            'Name' => '名前',\n            'Author' => '作成者',\n            'Name (slug)' => '名前 (スラッグ)',\n            'Description' => '説明',\n            'Keywords' => 'キーワード',\n            'Parent' => '親',\n            'Template' => 'テンプレート',\n            'Year' => '年',\n            'Day' => '日',\n            'Month' => '月',\n            'Hour' => '時',\n            'Minute' => '分',\n            'Second' => '秒',\n            'This field should not be empty' => 'この項目は空白にできません',\n            'This page already exists' => 'このページはすでに存在しています',\n            'Extra' => '拡張',\n            'Save' => '保存',\n            'Save and Exit' => '保存して終了',\n            'Your changes to the page <i>:page</i> have been saved.' => '<i> :page </i> への変更は保存されました。',\n            'The page <i>:page</i> cloned.' => '<i>:page</i> が複製されました。',\n            'Status' => 'ステータス',\n            'Actions' => '操作',\n            'Add' => '追加',\n            'Published' => '公開済み',\n            'Draft' => '下書き',\n            'Published on' => '公開日',\n            'Edit 404 Page' => '404 ページの編集',\n            'Page <i>:page</i> deleted' => '<i>:page</i> は削除されました。',\n            'Search Engines Robots' => 'サーチエンジンロボットへの通知',\n            'Page' => 'ページ',\n            'Metadata' => 'メタデータ',\n            'Settings' => '設定',\n            'Required field' => '必須項目',\n            'Access' => 'アクセス許可',\n            'Public' => '一般公開',\n            'Registered' => '登録者のみ',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'გვერდები',\n            'Pages manager' => 'გვერდების მენეჯერი',\n            'Content' => 'კონტენტი',\n            'Create New Page' => 'ახალი გვერდის შექმნა',\n            'New Page' => 'ახალი გვერდი',\n            'Edit Page' => 'გვერდის რედაქტირება',\n            'Date' => 'თარიღი',\n            'Clone' => 'კლონირება',\n            'Edit' => 'რედაქტირება',\n            'Delete' => 'წაშლა',\n            'Delete page: :page' => 'გვერდის წაშლა: :page',\n            'Title' => 'სათაური',\n            'Name' => 'სახელწოდება',\n            'Author' => 'ავტორი',\n            'Slug (url)' => 'ბმული (url)',\n            'Tags' => 'Tag-ევი',\n            'Description' => 'აღწერა',\n            'Keywords' => 'საკვანძო სიტყვები',\n            'Parent' => 'მშობელი',\n            'Template' => 'Template-ი',\n            'Year' => 'წელი',\n            'Day' => 'დღე',\n            'Month' => 'თვე',\n            'Hours' => 'საათი',\n            'Minute' => 'წუთი',\n            'Second' => 'წამი',\n            'This field should not be empty' => 'ეს ველი არ უნდა იყოს ცარიელი',\n            'This page already exists' => 'ასეთი გვერდი უკვე არსებობს',\n            'Extra' => 'დამატებით',\n            'Save' => 'შენახვა',\n            'Save and Exit' => 'დამახსოვრება და შემდეგ გაოსვლა',\n            'Your changes to the page <i>:page</i> have been saved.' => 'თქვენი ცვლილებები გვერდი <i>:page</i> მიმართ შენახულია.',\n            'The page <i>:page</i> cloned.' => 'გვერდი <i>:page</i> კლონირებულია.',\n            'Status' => 'სტატუსი',\n            'Actions' => 'მოქმედება',\n            'Add' => 'დამატება',\n            'Published' => 'გამოქვეყნებულია',\n            'Draft' => 'ესკიზი',\n            'Published on' => 'გამოქვეყნებულია',\n            'Edit 404 Page' => '404 გვერდის რედაქტირება',\n            'Page <i>:page</i> deleted' => 'გვერდი <i>:page</i> წაშლილია',\n            'Search Engines Robots' => 'საძიებო რობოტები',\n            'Page' => 'გვერდები',\n            'Metadata' => 'Metadata',\n            'Settings' => 'პარამეტრები',\n            'Required field' => 'აუცილებელი ველი',\n            'Access' => 'მისაწვდომობა',\n            'Public' => 'საჯარო',\n            'Registered' => 'დარეგისტრირებულთათვის',\n            'Cancel' => 'გაუქმება',\n        ),\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Puslapiai',\n            'Pages manager' => 'Puslapių tvarkyklė',\n            'Content' => 'Turinys',\n            'Create New Page' => 'Sukurti Naują Puslapį',\n            'New Page' => 'Naujas Puslapis',\n            'Edit Page' => 'Redaguoti Puslapį',\n            'Date' => 'Data',\n            'Clone' => 'Klonuoti',\n            'Edit' => 'Redaguoti',\n            'Delete' => 'Ištrinti',\n            'Delete page: :page' => 'Ištrinti puslapį :page',\n            'Title' => 'Antraštė',\n            'Name' => 'Pavadinimas',\n            'Author' => 'Autorius',\n            'Name (slug)' => 'Nuoroda (slug)',\n            'Description' => 'Aprašymas',\n            'Keywords' => 'Raktažodžiai',\n            'Parent' => 'Pirminis puslapis',\n            'Template' => 'Šablonas',\n            'Year' => 'Metai',\n            'Day' => 'Diena',\n            'Month' => 'Mėnesis',\n            'Hour' => 'Valanda',\n            'Minute' => 'Minutė',\n            'Second' => 'Sekundė',\n            'This field should not be empty' => 'Šis laukas negali būti tuščias',\n            'This page already exists' => 'Toks puslapis jau yra',\n            'Extra' => 'Papildoma',\n            'Save' => 'Išsaugoti',\n            'Save and Exit' => 'Išsaugoti ir Išeiti',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Puslapio <i>:page</i> pakeitimai išsaugoti.',\n            'The page <i>:page</i> cloned.' => 'Puslapis <i>:page</i> klonuotas.',\n            'Status' => 'Būklė',\n            'Actions' => 'Veiksmai',\n            'Add' => 'Pridėti',\n            'Published' => 'Publikuotas',\n            'Draft' => 'Juodraštis',\n            'Published on' => 'Publikuota',\n            'Edit 404 Page' => 'Redaguoti 404 puslapį',\n            'Page <i>:page</i> deleted' => 'Puslapis <i>:page</i> ištrintas',\n            'Search Engines Robots' => 'Paieškos variklių robotai',\n            'Page' => 'Puslapis',\n            'Metadata' => 'Metadata',\n            'Settings' => 'Nustatymai',\n            'Required field' => 'Privalomas laukas',\n            'Access' => 'Prieiga',\n            'Public' => 'Viešas',\n            'Registered' => 'Registruotas',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Pagina\\'s',\n            'Pages manager' => 'Pagina beheer',\n            'Content' => 'Inhoud',\n            'Create New Page' => 'Nieuwe pagina',\n            'New Page' => 'Nieuwe pagina',\n            'Edit Page' => 'Bewerk pagina',\n            'Date' => 'Datum',\n            'Clone' => 'Kopieren',\n            'Edit' => 'Bewerken',\n            'Delete' => 'Verwijderen',\n            'Delete page: :page' => 'Verwijder pagina: :page',\n            'Title' => 'Titel',\n            'Name' => 'Naam',\n            'Author' => 'Auteur',\n            'Name (slug)' => 'Naam (alias)',\n            'Description' => 'Beschrijving',\n            'Keywords' => 'Trefwoorden',\n            'Parent' => 'Root',\n            'Template' => 'Template',\n            'Year' => 'Jaar',\n            'Day' => 'Dag',\n            'Month' => 'Maand',\n            'Hour' => 'Uur',\n            'Minute' => 'Minuut',\n            'Second' => 'Seconde',\n            'This field should not be empty' => 'Dit veld mag niet leeg zijn',\n            'This page already exists' => 'Deze pagina bestaat al',\n            'Extra' => 'Extra',\n            'Save' => 'Opslaan',\n            'Save and Exit' => 'Opslaan en Terug',\n            'Your changes to the page <i>:page</i> have been saved.' => 'De wijzigingen aan <i> :page </i> zijn opgeslagen.',\n            'The page <i>:page</i> cloned.' => 'De pagina <i>:page</i> is gekopieerd.',\n            'Status' => 'Status',\n            'Actions' => 'Acties',\n            'Add' => 'Toevoegen',\n            'Published' => 'Gepubliceerd',\n            'Draft' => 'Concept',\n            'Published on' => 'Gepubliceerd op',\n            'Edit 404 Page' => 'Bewerk 404 pagina',\n            'Page <i>:page</i> deleted' => 'Pagina <i>:page</i> is verwijderd',\n            'Search Engines Robots' => 'Zoekmachine Robots ',\n            'Page' => 'Pagina',\n            'Metadata' => 'Metadata',\n            'Settings' => 'Instellingen',\n            'Required field' => 'Vereist veld',\n            'Access' => 'Toegang',\n            'Public' => 'Publiek',\n            'Registered' => 'Geregistreerd',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Strony',\n            'Pages manager' => 'Zarządzaj stronami',\n            'Content' => 'Zawartość',\n            'Create New Page' => 'Utwórz nową stronę',\n            'New Page' => 'Nowa strona',\n            'Edit Page' => 'Edytuj stronę',\n            'Date' => 'Data',\n            'Clone' => 'Skopiuj',\n            'Edit' => 'Edytuj',\n            'Delete' => 'Usuń',\n            'Delete page: :page' => 'Czy napewno usunąć stronę: :page',\n            'Title' => 'Tytuł',\n            'Name' => 'Nazwa',\n            'Author' => 'Autor',\n            'Name (slug)' => 'Krótka nazwa (slug)',\n            'Description' => 'Opis',\n            'Keywords' => 'Słowa kluczowe',\n            'Parent' => 'Rodzic',\n            'Template' => 'Szablon',\n            'Year' => 'rok',\n            'Day' => 'dzień',\n            'Month' => 'miesiąc',\n            'Hour' => 'godzina',\n            'Minute' => 'minuta',\n            'Second' => 'sekunda',\n            'This field should not be empty' => 'To pole nie może być puste',\n            'This page already exists' => 'Ta strona już istnieje',\n            'Extra' => 'Ekstra',\n            'Save' => 'Zapisz',\n            'Save and Exit' => 'Zapisz i wyjdź',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Twoje zmiany na stronie <i> :page </i> zostały zapisane.',\n            'The page <i>:page</i> cloned.' => 'Strona <i>:page</i> została skopiowana.',\n            'Status' => 'Status',\n            'Actions' => 'Akcje',\n            'Add' => 'Dodaj podstronę',\n            'Published' => 'Opublikowana',\n            'Draft' => 'Projekt',\n            'Published on' => 'Opublikowane',\n            'Edit 404 Page' => 'Edytuj stronę błędu 404',\n            'Page <i>:page</i> deleted' => 'Strona <i>:page</i> została usunięta',\n            'Search Engines Robots' => 'Roboty wyszukiwarek',\n            'Page' => 'Strona',\n            'Metadata' => 'Metadane',\n            'Settings' => 'Ustawienia',\n            'Required field' => 'Pole wymagane',\n            'Access' => 'Dostęp',\n            'Public' => 'Dla wszystkich',\n            'Registered' => 'Dla zarejestrowanych',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Páginas',\n            'Pages manager' => 'Gerenciador de páginas',\n            'Content' => 'Conteúdo',\n            'Create new page' => 'Criar nova página',\n            'New page' => 'Nova página',\n            'Edit page' => 'Editar página',\n            'Date' => 'Data',\n            'Clone' => 'Clonar',\n            'Edit' => 'Editar',\n            'Delete' => 'Deletar',\n            'Delete page: :page' => 'Deletar a página: :page',\n            'Title' => 'Título',\n            'Name' => 'Nome',\n            'Author' => 'Autor',\n            'Name (slug)' => 'Nome (slug)',\n            'Description' => 'Descrição',\n            'Keywords' => 'Keywords',\n            'Parent' => 'Parente',\n            'Template' => 'Template',\n            'Year' => 'Ano',\n            'Day' => 'Dia',\n            'Month' => 'Mês',\n            'Hour' => 'Hora',\n            'Minute' => 'Minuto',\n            'Second' => 'Segundo',\n            'This field should not be empty' => 'Este arquivo não deve ser vazio',\n            'This page already exists' => 'Esta página já existe',\n            'Extra' => 'Extra',\n            'Save' => 'Salvar',\n            'Save and Exit' => 'Salvar e sair',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Suas alterações na página <i>:page</i> foram salvas.',\n            'The page <i>:page</i> cloned.' => 'Página <i>:page</i> clonada.',\n            'Status' => 'Status',\n            'Actions' => 'Ações',\n            'Add' => 'Adicionar',\n            'Published' => 'Publicado',\n            'Draft' => 'Rascunho',\n            'Published on' => 'Publicada em',\n            'Edit 404 Page' => 'Editar página de erro 404',\n            'Page <i>:page</i> deleted' => 'Página <i>:page</i> deletada',\n            'Search Engines Robots' => 'Crawlers de sistemas de buscas.',\n            'Page' => 'Página',\n            'Metadata' => 'Metadata',\n            'Settings' => 'Configurações',\n            'Required field' => 'Campo requerido',\n            'Access' => 'Acesso',\n            'Public' => 'Público',\n            'Registered' => 'Registrado',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Страницы',\n            'Pages manager' => 'Менеджер страниц',\n            'Content' => 'Контент',\n            'Create New Page' => 'Создать новую страницу',\n            'New Page' => 'Новая страница',\n            'Edit Page' => 'Редактирование страницы',\n            'Date' => 'Дата',\n            'Clone' => 'Клонировать',\n            'Edit' => 'Редактировать',\n            'Delete' => 'Удалить',\n            'Delete page: :page' => 'Удалить страницу: :page',\n            'Title' => 'Заголовок',\n            'Name' => 'Название',\n            'Author' => 'Автор',\n            'Slug (url)' => 'Ссылка (url)',\n            'Tags' => 'Теги',\n            'Description' => 'Описание',\n            'Keywords' => 'Ключевые слова',\n            'Parent' => 'Родитель',\n            'Template' => 'Шаблон',\n            'Year' => 'Год',\n            'Day' => 'День',\n            'Month' => 'Месяц',\n            'Hours' => 'Час',\n            'Minute' => 'Минута',\n            'Second' => 'Секунда',\n            'This field should not be empty' => 'Это поле не должно быть пустым',\n            'This page already exists' => 'Такая страница уже существует',\n            'Extra' => 'Дополнительно',\n            'Save' => 'Сохранить',\n            'Save and Exit' => 'Сохранить и выйти',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Ваши изменения к странице <i>:page</i> были сохранены.',\n            'The page <i>:page</i> cloned.' => 'Страница <i>:page</i> клонирована.',\n            'Status' => 'Статус',\n            'Actions' => 'Действия',\n            'Add' => 'Добавить',\n            'Published' => 'Опубликовано',\n            'Draft' => 'Черновик',\n            'Published on' => 'Опубликовано',\n            'Edit 404 Page' => 'Редактировать страницу 404',\n            'Page <i>:page</i> deleted' => 'Страница <i>:page</i> удалена',\n            'Search Engines Robots' => 'Поисковые роботы',\n            'Page' => 'Страница',\n            'Metadata' => 'Метаданные',\n            'Settings' => 'Настройки',\n            'Required field' => 'Обязательное поле',\n            'Access' => 'Доступ',\n            'Public' => 'Публичный',\n            'Registered' => 'Зарегистрированным',\n            'Cancel' => 'Отмена',\n        ),\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Stránky',\n            'Pages manager' => 'Manažér stránok',\n            'Content' => 'Obsah',\n            'Create new page' => 'Vytvoriť novú stránku',\n            'New page' => 'Nová stránka',\n            'Edit page' => 'Editovať stránku',\n            'Date' => 'Dátum',\n            'Clone' => 'Klonovať',\n            'Edit' => 'Editovať',\n            'Delete' => 'Vymazať',\n            'Delete page: :page' => 'Vymazať stránku: :page',\n            'Title' => 'Titulka',\n            'Name' => 'Názov',\n            'Author' => 'Autor',\n            'Name (slug)' => 'Názov (slug)',\n            'Description' => 'Popis',\n            'Keywords' => 'Kľúčové slová',\n            'Parent' => 'Rodič - Nadradená stránka',\n            'Template' => 'Téma',\n            'Year' => 'Rok',\n            'Day' => 'Deň',\n            'Month' => 'Mesiac',\n            'Hour' => 'Hodina',\n            'Minute' => 'Minúta',\n            'Second' => 'Sekunda',\n            'This field should not be empty' => 'Toto políčko nesmie byť prázdne',\n            'This page already exists' => 'Táto stránka už existuje',\n            'Extra' => 'Extra',\n            'Save' => 'Uložiť',\n            'Save and Exit' => 'Uložiť a ukončiť',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Vaše zmeny na stránke <i> :page </i> boli uložené.',\n            'The page <i>:page</i> cloned.' => 'The page <i>:page</i> cloned.',\n            'Status' => 'Status',\n            'Actions' => 'Akcie',\n            'Add' => 'Pridať',\n            'Published' => 'Zverejnené',\n            'Draft' => 'Rozpísané',\n            'Published on' => 'Zverejnené dňa',\n            'Edit 404 Page' => 'Editovať stránku 404',\n            'Page <i>:page</i> deleted' => 'Vymazať stránku: <i>:page</i>',\n            'Search Engines Robots' => 'Vyhľadávacie roboty',\n            'Page' => 'Stránka',\n            'Metadata' => 'Metadata',\n            'Settings' => 'Nastavenia',\n            'Required field' => 'Povinné políčko',\n            'Access' => 'Prístup',\n            'Public' => 'Verejný',\n            'Registered' => 'Po prihlásení',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Strane',        \n            'Pages manager' => 'Menadžer strana',        \n            'Content' => 'Sadržaj',\n            'Create new page' => 'Kreiraj novu stranu',\n            'New page' => 'Nova strana',\n            'Edit page' => 'Izemni stranu',        \n            'Date' => 'Datum',\n            'Clone' => 'Kloniraj',\n            'Edit' => 'Izmeni',        \n            'Delete' => 'Obriši',\n            'Delete page: :page' => 'Obriši stranu: :page',\n            'Title' => 'Naslov',\n            'Name' => 'Ime',\n            'Author' => 'Autor',\n            'Name (slug)' => 'Ime (SEO)',\n            'Description' => 'Opis',\n            'Keywords' => 'Ključne reči',\n            'Parent' => 'Roditelj',\n            'Template' => 'Šablon',\n            'Year' => 'Godina',\n            'Day' => 'dan',\n            'Month' => 'mesec',\n            'Hour' => 'Sat',\n            'Minute' => 'Minut',\n            'Second' => 'Sekunda',\n            'This field should not be empty' => 'Ovo polje ne sme biti prazno',\n            'This page already exists' => 'Ova strana već postoji',\n            'Extra' => 'Dodatno polje',\n            'Save' => 'Sačuvaj',\n            'Save and exit' => 'Sačuvaj i izadji',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Vaše promene na stranici <i> :page </i> su sačuvane.',\n            'The page <i>:page</i> cloned.' => 'Strana <i>:page</i> je klonirana.',\n            'Status' => 'Status',\n            'Actions' => 'Akcija',\n            'Add' => 'Dodaj',\n            'Published' => 'Objavljeno',\n            'Draft' => 'Nacrt',\n            'Published on' => 'Objavljeno od',\n            'Edit 404 Page' => 'Izmeni 404 stranu',\n            'Page <i>:page</i> deleted' => 'Strana <i>:page</i> je obrisana',\n            'Search Engines Robots' => 'Roboti pretrage',\n            'Page' => 'Strana',\n            'Metadata' => 'Metadata',\n            'Settings' => 'Podešavanja',\n            'Required field' => 'Potrebno',\n            'Access' => 'Pristup',\n            'Public' => 'Javno',\n            'Registered' => 'Registrovani',\n            'Cancel' => 'Otkaži',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Sayfalar',\n            'Pages manager' => 'Sayfa Yöneticisi',\n            'Content' => 'İçerik',\n            'Create New Page' => 'Yeni Sayfa Oluştur',\n            'New Page' => 'Yeni Sayfa',\n            'Edit Page' => 'Sayfayı Düzenle',\n            'Date' => 'Tarih',\n            'Clone' => 'Klonla',\n            'Edit' => 'Düzenle',\n            'Delete' => 'Sil',\n            'Delete page: :page' => ':page adlı sayfa silinsin mi',\n            'Title' => 'Başlık',\n            'Name' => 'Ad',\n            'Author' => 'Yazar',\n            'Name (slug)' => 'Ad (makine adı)', // check whether in use or not\n            'Slug (url)' => 'Url Adı (Makine Adı)',\n            'Description' => 'Açıklama',\n            'Keywords' => 'Anahtar Sözcükler',\n            'Parent' => 'Üst Sayfa',\n            'Template' => 'Şablon',\n            'Year' => 'Yıl',\n            'Day' => 'Gün',\n            'Month' => 'Ay',\n            'Hour' => 'Saat',\n            'Minute' => 'Dakika',\n            'Second' => 'Saniye',\n            'This field should not be empty' => 'Bu alan boş olmamalı!',\n            'This page already exists' => 'Sayfa zaten var',\n            'Extra' => 'Ek',\n            'Save' => 'Kaydet',\n            'Save and Exit' => 'Kaydet ve Çık',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Değişiklikleriniz <i>:page</i> sayfasına kaydedildi.',\n            'The page <i>:page</i> cloned.' => '<i>:page</i> adlı sayfa klonlandı.',\n            'Status' => 'Durum',\n            'Actions' => 'İşlemler',\n            'Add' => 'Ekle',\n            'Published' => 'Yayında',\n            'Draft' => 'Taslak',\n            'Published on' => 'Yayınlanma Tarihi:',\n            'Edit 404 Page' => '404 Sayfasını Düzenle',\n            'Page <i>:page</i> deleted' => '<i>:page</i> adlı sayfa silindi',\n            'Search Engines Robots' => 'Arama Motoru Robotları',\n            'Page' => 'Sayfa',\n            'Metadata' => 'Metadata',\n            'Settings' => 'Ayarlar',\n            'Required field' => 'Zorunlu alan',\n            'Access' => 'Erişim',\n            'Public' => 'Herkese Açık',\n            'Registered' => 'Yalnızca Üyelere Açık',\n            'Cancel' => 'Vazgeç',\n            'Tags' => 'Etiketler',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => 'Сторінки',\n            'Pages manager' => 'Менеджер сторінок',\n            'Content' => 'Контент',\n            'Create New Page' => 'Створити нову сторінку',\n            'New Page' => 'Нова сторінка',\n            'Edit Page' => 'Редагування сторінки',\n            'Date' => 'Дата',\n            'Clone' => 'Клонувати',\n            'Edit' => 'Редагувати',\n            'Delete' => 'Видалити',\n            'Delete page: :page' => 'Видалити сторінку: :page',\n            'Title' => 'Заголовок',\n            'Name' => 'Назва',\n            'Author' => 'Автор',\n            'Slug (url)' => 'Лінк (url)',\n            'Tags' => 'Теги',\n            'Description' => 'Опис',\n            'Keywords' => 'Ключові слова',\n            'Parent' => 'Батько',\n            'Template' => 'Шаблон',\n            'Year' => 'Рік',\n            'Day' => 'День',\n            'Month' => 'Місяц',\n            'Hours' => 'Час',\n            'Minute' => 'Хвилина',\n            'Second' => 'Секунда',\n            'This field should not be empty' => 'Це поле не може бути порожнім',\n            'This page already exists' => 'Така сторінка вже існує',\n            'Extra' => 'Додатково',\n            'Save' => 'Зберегти',\n            'Save and Exit' => 'Зберегти і вийти',\n            'Your changes to the page <i>:page</i> have been saved.' => 'Ваші зміни до сторінки <i>:page</i> були збережені.',\n            'The page <i>:page</i> cloned.' => 'Сторінка <i>:page</i> клонована.',\n            'Status' => 'Статус',\n            'Actions' => 'Дії',\n            'Add' => 'Додати',\n            'Published' => 'Опубліковано',\n            'Draft' => 'Чернетка',\n            'Published on' => 'Опубліковано',\n            'Edit 404 Page' => 'Редагувати сторінку 404',\n            'Page <i>:page</i> deleted' => 'Сторінка <i>:page</i> видалена',\n            'Search Engines Robots' => 'Пошукові роботи',\n            'Page' => 'Сторінка',\n            'Metadata' => 'Метадані',\n            'Settings' => 'Налаштування',\n            'Required field' => 'Обов’язкове поле',\n            'Access' => 'Доступ',\n            'Public' => 'Публічний',\n            'Registered' => 'Зареєстрованим',\n            'Cancel' => 'Відмінити',\n        ),\n    );\n"
  },
  {
    "path": "plugins/box/pages/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'pages' => array(\n            'Pages' => '页面',\n            'Pages manager' => '页面管理',\n            'Content' => '内容管理',\n            'Create New Page' => '创建新页面',\n            'New Page' => '新建页面',\n            'Edit Page' => '布局页面',\n            'Date' => '日期',\n            'Clone' => '克隆',\n            'Edit' => '编辑',\n            'Delete' => '删除',\n            'Delete page: :page' => '删除页面: :page',\n            'Title' => '标题',\n            'Name' => '名称',\n            'Author' => '作者',\n            'Name (slug)' => '名称 (slug)',\n            'Description' => '描述',\n            'Keywords' => '关键词',\n            'Parent' => '父级',\n            'Template' => '模板',\n            'Year' => '年',\n            'Day' => '日',\n            'Month' => '月',\n            'Hour' => '时',\n            'Minute' => '分',\n            'Second' => '秒',\n            'This field should not be empty' => '此字段不能为空',\n            'This page already exists' => '此页面已存在',\n            'Extra' => '附加',\n            'Save' => '保存',\n            'Save and Exit' => '保存并退出',\n            'Your changes to the page <i>:page</i> have been saved.' => '您修改的页面 <i> :page </i> 已保存。',\n            'The page <i>:page</i> cloned.' => '此页面 <i>:page</i> 已克隆。',\n            'Status' => '状态',\n            'Actions' => '操作',\n            'Add' => '添加',\n            'Published' => '发布',\n            'Draft' => '草案',\n            'Published on' => '发布于',\n            'Edit 404 Page' => '编辑 404 页面',\n            'Page <i>:page</i> deleted' => '页面 <i>:page</i> 已删除。',\n            'Search Engines Robots' => '搜索引擎机器人',\n            'Page' => '页面',\n            'Metadata' => 'Meta 数据',\n            'Settings' => '设置',\n            'Required field' => '必填字段',\n            'Access' => '访问',\n            'Public' => '公开',\n            'Registered' => '注册用户',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/pages/pages.admin.php",
    "content": "<?php\n\n// Add plugin navigation link\nNavigation::add(__('Pages', 'pages'), 'content', 'pages', 1);\nDashboard::addNewItem('pages', __('Page', 'pages'), 'index.php?id=pages&action=add_page', 1);\n\n// Add action on admin_pre_render hook\nAction::add('admin_pre_render','PagesAdmin::_pageExpandAjax');\n\n/**\n * Pages Admin Class\n */\nclass PagesAdmin extends Backend\n{\n    /**\n     * Pages tables\n     *\n     * @var object\n     */\n    public static $pages = null;\n\n    /**\n     * _pageExpandAjax\n     */\n    public static function _pageExpandAjax()\n    {\n        if (Request::post('page_slug')) {\n            if (Security::check(Request::post('token'))) {\n                $pages = new Table('pages');\n                $pages->updateWhere('[slug=\"'.Request::post('page_slug').'\"]', array('expand' => Request::post('page_expand')));\n                Request::shutdown();\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n    }\n\n    /**\n     * Pages admin function\n     */\n    public static function main()\n    {\n        $current_theme = Option::get('theme_site_name');\n        $site_url = Option::get('siteurl');\n\n        $templates_path = THEMES_SITE;\n\n        $errors = array();\n\n        $pages = new Table('pages');\n        PagesAdmin::$pages = $pages;\n\n        $users = new Table('users');\n        $user = $users->select('[id='.Session::get('user_id').']', null);\n\n        // Page author\n        if ( ! empty($user['firstname'])) {\n            $author = (empty($user['lastname'])) ? $user['firstname'] : $user['firstname'].' '.$user['lastname'];\n        } else {\n            $author = Session::get('user_login');\n        }\n\n        $author = Html::toText($author);\n\n        // Status array\n        $status_array = array('published' => __('Published', 'pages'),\n                              'draft'     => __('Draft', 'pages'));\n\n        // Access array\n        $access_array = array('public'      => __('Public', 'pages'),\n                              'registered'  => __('Registered', 'pages'));\n\n        // Check for get actions\n        // ---------------------------------------------\n        if (Request::get('action')) {\n\n            // Switch actions\n            // -----------------------------------------\n            switch (Request::get('action')) {\n\n                // Clone page\n                // -------------------------------------\n                case \"clone_page\":\n\n                    if (Security::check(Request::get('token'))) {\n\n                        // Generate rand page name\n                        $rand_page_name = Request::get('name').'_clone_'.date(\"Ymd_His\");\n\n                        // Get original page\n                        $orig_page = $pages->select('[slug=\"'.Request::get('name').'\"]', null);\n\n                        // Generate rand page title\n                        $rand_page_title = $orig_page['title'].' [copy]';\n\n                        // Clone page\n                        if ($pages->insert(array('slug'         => $rand_page_name,\n                                                 'template'     => $orig_page['template'],\n                                                 'parent'       => $orig_page['parent'],\n                                                 'robots_index' => $orig_page['robots_index'],\n                                                 'robots_follow'=> $orig_page['robots_follow'],\n                                                 'status'       => $orig_page['status'],\n                                                 'access'       => (isset($orig_page['access'])) ? $orig_page['access'] : 'public',\n                                                 'expand'       => (isset($orig_page['expand'])) ? $orig_page['expand'] : '0',\n                                                 'title'        => $rand_page_title,\n                                                 'meta_title'   => $orig_page['meta_title'],\n                                                 'description'  => $orig_page['description'],\n                                                 'keywords'     => $orig_page['keywords'],\n                                                 'tags'         => $orig_page['tags'],\n                                                 'date'         => $orig_page['date'],\n                                                 'author'       => $orig_page['author']))) {\n\n                            // Get cloned page ID\n                            $last_id = $pages->lastId();\n\n                            // Save cloned page content\n                            File::setContent(STORAGE . DS . 'pages' . DS . $last_id . '.page.txt',\n                                             File::getContent(STORAGE . DS . 'pages' . DS . $orig_page['id'] . '.page.txt'));\n\n                            // Send notification\n                            Notification::set('success', __('The page <i>:page</i> cloned.', 'pages', array(':page' => Security::safeName(Request::get('name'), '-', true))));\n                        }\n\n                        // Run add extra actions\n                        Action::run('admin_pages_action_clone');\n\n                        // Redirect\n                        Request::redirect('index.php?id=pages');\n\n                    } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n                break;\n\n                // Add page\n                // -------------------------------------\n                case \"add_page\":\n\n                    // Add page\n                    if (Request::post('add_page') || Request::post('add_page_and_exit')) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            // Get parent page\n                            if (Request::post('pages') == '0') {\n                                $parent_page = '';\n                            } else {\n                                $parent_page = Request::post('pages');\n                            }\n\n                            // Validate\n                            //--------------\n                            if (trim(Request::post('page_name')) == '') $errors['pages_empty_name'] = __('Required field', 'pages');\n                            if (trim(Request::post('page_title')) == '') $errors['pages_empty_title'] = __('Required field', 'pages');\n                            if (count($pages->select('[slug=\"'.Security::safeName(Request::post('page_name'), '-', true).'\"]')) != 0) $errors['pages_exists'] = __('This page already exists', 'pages');\n\n                            // Prepare date\n                            if (Valid::date(Request::post('page_date'))) {\n                                $date = strtotime(Request::post('page_date'));\n                            } else {\n                                $date = time();\n                            }\n\n                            if (Request::post('robots_index'))  $robots_index = 'noindex';   else $robots_index = 'index';\n                            if (Request::post('robots_follow')) $robots_follow = 'nofollow'; else $robots_follow = 'follow';\n\n                            // If no errors then try to save\n                            if (count($errors) == 0) {\n\n                                // Insert new page\n                                if ($pages->insert(array('slug'        => Security::safeName(Request::post('page_name'), '-', true),\n                                                        'template'     => Request::post('templates'),\n                                                        'parent'       => $parent_page,\n                                                        'status'       => Request::post('status'),\n                                                        'access'       => Request::post('access'),\n                                                        'expand'       => '0',\n                                                        'robots_index' => $robots_index,\n                                                        'robots_follow'=> $robots_follow,\n                                                        'title'        => Request::post('page_title'),\n                                                        'meta_title'   => Request::post('page_meta_title'),\n                                                        'description'  => Request::post('page_description'),\n                                                        'keywords'     => Request::post('page_keywords'),\n                                                        'tags'         => Request::post('page_tags'),\n                                                        'date'         => $date,\n                                                        'author'       => $author))) {\n\n                                    // Get inserted page ID\n                                    $last_id = $pages->lastId();\n\n                                    // Save content\n                                    File::setContent(STORAGE . DS . 'pages' . DS . $last_id . '.page.txt', XML::safe(Request::post('editor')));\n\n                                    // Send notification\n                                    Notification::set('success', __('Your changes to the page <i>:page</i> have been saved.', 'pages', array(':page' => Security::safeName(Request::post('page_title'), '-', true))));\n                                }\n\n                                // Run add extra actions\n                                Action::run('admin_pages_action_add');\n\n                                // Redirect\n                                if (Request::post('add_page_and_exit')) {\n                                    Request::redirect('index.php?id=pages');\n                                } else {\n                                    Request::redirect('index.php?id=pages&action=edit_page&name='.Security::safeName(Request::post('page_name'), '-', true));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n                    }\n\n                    // Get all pages\n                    $pages_list = $pages->select('[slug!=\"error404\" and parent=\"\"]');\n                    $pages_array[] = '-none-';\n                    foreach ($pages_list as $page) {\n                        $pages_array[$page['slug']] = $page['title'];\n                    }\n\n                    // Get all templates\n                    $templates_list = File::scan($templates_path, '.template.php');\n                    foreach ($templates_list as $file) {\n                        $templates_array[basename($file, '.template.php')] = basename($file, '.template.php');\n                    }\n\n                    // Save fields\n                    if (Request::post('page_name'))        $post_name        = Request::post('page_name'); else $post_name = '';\n                    if (Request::post('page_title'))       $post_title       = Request::post('page_title'); else $post_title = '';\n                    if (Request::post('page_meta_title'))  $post_meta_title  = Request::post('page_meta_title'); else $post_meta_title = '';                    \n                    if (Request::post('page_keywords'))    $post_keywords    = Request::post('page_keywords'); else $post_keywords = '';\n                    if (Request::post('page_description')) $post_description = Request::post('page_description'); else $post_description = '';\n                    if (Request::post('page_tags'))        $post_tags        = Request::post('page_tags'); else $post_tags = '';\n                    if (Request::post('editor'))           $post_content     = Request::post('editor'); else $post_content = '';\n                    if (Request::post('templates'))        $post_template    = Request::post('templates'); else $post_template = 'index';\n                    if (Request::post('status'))           $post_status      = Request::post('status'); else $post_status = 'published';\n                    if (Request::post('access'))           $post_access      = Request::post('access'); else $post_access = 'public';\n                    if (Request::post('pages'))            $parent_page      = Request::post('pages'); else if(Request::get('parent_page')) $parent_page = Request::get('parent_page'); else $parent_page = '';\n                    if (Request::post('robots_index'))     $post_robots_index = true; else $post_robots_index = false;\n                    if (Request::post('robots_follow'))    $post_robots_follow = true; else $post_robots_follow = false;\n                    //--------------\n\n                    // Generate date\n                    $date = Date::format(time(), 'Y-m-d H:i:s');\n\n                    // Set Tabs State - page\n                    Notification::setNow('page', 'page');\n\n                    // Display view\n                    View::factory('box/pages/views/backend/add')\n                            ->assign('post_name', $post_name)\n                            ->assign('post_title', $post_title)\n                            ->assign('post_meta_title', $post_meta_title)                            \n                            ->assign('post_description', $post_description)\n                            ->assign('post_keywords', $post_keywords)\n                            ->assign('post_tags', $post_tags)\n                            ->assign('post_content', $post_content)\n                            ->assign('pages_array', $pages_array)\n                            ->assign('parent_page', $parent_page)\n                            ->assign('templates_array', $templates_array)\n                            ->assign('post_template', $post_template)\n                            ->assign('post_status', $post_status)\n                            ->assign('post_access', $post_access)\n                            ->assign('status_array', $status_array)\n                            ->assign('access_array', $access_array)\n                            ->assign('date', $date)\n                            ->assign('post_robots_index', $post_robots_index)\n                            ->assign('post_robots_follow', $post_robots_follow)\n                            ->assign('errors', $errors)\n                            ->display();\n\n                break;\n\n                // Edit page\n                // -------------------------------------\n                case \"edit_page\":\n\n                    if (Request::post('edit_page') || Request::post('edit_page_and_exit')) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            // Get pages parent\n                            if (Request::post('pages') == '0') {\n                                $parent_page = '';\n                            } else {\n                                $parent_page = Request::post('pages');\n                            }\n\n                            // Save field\n                            $post_parent = Request::post('pages');\n\n                            // Validate\n                            //--------------\n                            if (trim(Request::post('page_name')) == '') $errors['pages_empty_name'] = __('Required field', 'pages');\n                            if ((count($pages->select('[slug=\"'.Security::safeName(Request::post('page_name'), '-', true).'\"]')) != 0) and (Security::safeName(Request::post('page_old_name'), '-', true) !== Security::safeName(Request::post('page_name'), '-', true))) $errors['pages_exists'] = __('This page already exists', 'pages');\n                            if (trim(Request::post('page_title')) == '') $errors['pages_empty_title'] = __('Required field', 'pages');\n\n                            // Save fields\n                            if (Request::post('page_name'))        $post_name        = Request::post('page_name'); else $post_name = '';\n                            if (Request::post('page_title'))       $post_title       = Request::post('page_title'); else $post_title = '';\n                            if (Request::post('page_meta_title'))  $post_meta_title  = Request::post('page_meta_title'); else $post_meta_title = '';                            \n                            if (Request::post('page_keywords'))    $post_keywords    = Request::post('page_keywords'); else $post_keywords = '';\n                            if (Request::post('page_description')) $post_description = Request::post('page_description'); else $post_description = '';\n                            if (Request::post('page_tags'))        $post_tags        = Request::post('page_tags'); else $post_tags = '';\n                            if (Request::post('editor'))           $post_content     = Request::post('editor'); else $post_content = '';\n                            if (Request::post('templates'))        $post_template    = Request::post('templates'); else $post_template = 'index';\n                            if (Request::post('status'))           $post_status      = Request::post('status'); else $post_status = 'published';\n                            if (Request::post('access'))           $post_access      = Request::post('access'); else $post_access = 'public';\n                            if (Request::post('robots_index'))     $post_robots_index = true; else $post_robots_index = false;\n                            if (Request::post('robots_follow'))    $post_robots_follow = true; else $post_robots_follow = false;\n                            //--------------\n\n                            // Prepare date\n                            if (Valid::date(Request::post('page_date'))) {\n                                $date = strtotime(Request::post('page_date'));\n                            } else {\n                                $date = time();\n                            }\n\n                            if (Request::post('robots_index'))  $robots_index = 'noindex';   else $robots_index = 'index';\n                            if (Request::post('robots_follow')) $robots_follow = 'nofollow'; else $robots_follow = 'follow';\n\n                            if (count($errors) == 0) {\n\n                                // Update parents in all childrens\n                                if ((Security::safeName(Request::post('page_name'), '-', true)) !== (Security::safeName(Request::post('page_old_name'), '-', true)) and (Request::post('old_parent') == '')) {\n\n                                    $_pages = $pages->select('[parent=\"'.Text::translitIt(trim(Request::post('page_old_name'))).'\"]');\n\n                                    if ( ! empty($_pages)) {\n                                        foreach ($_pages as $_page) {                                            \n                                            $pages->updateWhere('[parent=\"'.$_page['parent'].'\"]', array('parent' => Security::safeName(Request::post('page_name'), '-', true)));\n                                        }\n                                    }\n\n                                    if ($pages->updateWhere('[slug=\"'.Request::get('name').'\"]',\n                                                        array('slug'        => Security::safeName(Request::post('page_name'), '-', true),\n                                                              'template'    => Request::post('templates'),\n                                                              'parent'      => $parent_page,\n                                                              'title'       => Request::post('page_title'),\n                                                              'meta_title'  => Request::post('page_meta_title'),                                                              \n                                                              'description' => Request::post('page_description'),\n                                                              'keywords'    => Request::post('page_keywords'),\n                                                              'tags'        => Request::post('page_tags'),\n                                                              'robots_index' => $robots_index,\n                                                              'robots_follow'=> $robots_follow,\n                                                              'status'      => Request::post('status'),\n                                                              'access'      => Request::post('access'),\n                                                              'date'        => $date,\n                                                              'author'      => $author))) {\n\n                                        File::setContent(STORAGE . DS . 'pages' . DS . Request::post('page_id') . '.page.txt', XML::safe(Request::post('editor')));\n                                        Notification::set('success', __('Your changes to the page <i>:page</i> have been saved.', 'pages', array(':page' => Security::safeName(Request::post('page_title'), '-', true))));\n                                    }\n\n                                    // Run edit extra actions\n                                    Action::run('admin_pages_action_edit');\n\n                                } else {\n\n                                    if ($pages->updateWhere('[slug=\"'.Request::get('name').'\"]',\n                                                        array('slug'        => Security::safeName(Request::post('page_name'), '-', true),\n                                                              'template'    => Request::post('templates'),\n                                                              'parent'      => $parent_page,\n                                                              'title'       => Request::post('page_title'),\n                                                              'meta_title'       => Request::post('page_meta_title'),                                                              \n                                                              'description' => Request::post('page_description'),\n                                                              'keywords'    => Request::post('page_keywords'),\n                                                              'tags'        => Request::post('page_tags'),\n                                                              'robots_index' => $robots_index,\n                                                              'robots_follow'=> $robots_follow,\n                                                              'status'      => Request::post('status'),\n                                                              'access'      => Request::post('access'),\n                                                              'date'        => $date,\n                                                              'author'      => $author))) {\n\n                                        File::setContent(STORAGE . DS . 'pages' . DS . Request::post('page_id') . '.page.txt', XML::safe(Request::post('editor')));\n                                        Notification::set('success', __('Your changes to the page <i>:page</i> have been saved.', 'pages', array(':page' => Security::safeName(Request::post('page_title'), '-', true))));\n                                    }\n\n                                    // Run edit extra actions\n                                    Action::run('admin_pages_action_edit');\n                                }\n\n                                // Redirect\n                                if (Request::post('edit_page_and_exit')) {\n                                    Request::redirect('index.php?id=pages');\n                                } else {\n                                    Request::redirect('index.php?id=pages&action=edit_page&name='.Security::safeName(Request::post('page_name'), '-', true));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n\n                    // Get all pages\n                    $pages_list = $pages->select();\n                    $pages_array[] = '-none-';\n                    // Foreach pages find page whithout parent\n                    foreach ($pages_list as $page) {\n                        if (isset($page['parent'])) {\n                            $c_p = $page['parent'];\n                        } else {\n                            $c_p = '';\n                        }\n                        if ($c_p == '') {\n                            // error404 is system \"constant\" and no child for it\n                            if ($page['slug'] !== 'error404' && $page['slug'] !== Request::get('name')) {\n                                $pages_array[$page['slug']] = $page['title'];\n                            }\n                        }\n                    }\n\n                    // Get all templates\n                    $templates_list = File::scan($templates_path,'.template.php');\n                    foreach ($templates_list as $file) {\n                        $templates_array[basename($file,'.template.php')] = basename($file, '.template.php');\n                    }\n\n                    $page = $pages->select('[slug=\"'.Request::get('name').'\"]', null);\n\n                    if ($page) {\n\n                        $page_content = File::getContent(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt');\n\n                        // Safe fields or load fields\n                        if (Request::post('page_name'))         $slug_to_edit        = Request::post('page_name'); else $slug_to_edit = $page['slug'];\n                        if (Request::post('page_title'))        $title_to_edit       = Request::post('page_title'); else $title_to_edit = $page['title'];\n                        if (Request::post('page_meta_title'))   $meta_title_to_edit  = Request::post('page_meta_title'); else $meta_title_to_edit = isset($page['meta_title']) ? $page['meta_title'] : '';\n                        if (Request::post('page_description'))  $description_to_edit = Request::post('page_description'); else $description_to_edit = $page['description'];\n                        if (Request::post('page_keywords'))     $keywords_to_edit    = Request::post('page_keywords'); else $keywords_to_edit = $page['keywords'];\n                        if (Request::post('page_tags'))         $tags_to_edit        = Request::post('page_tags'); else $tags_to_edit = isset($page['tags']) ? $page['tags'] : '';;\n                        if (Request::post('editor'))            $to_edit             = Request::post('editor'); else $to_edit = Text::toHtml($page_content);\n\n                        if (Request::post('robots_index'))      $post_robots_index  = true; else if ($page['robots_index'] == 'noindex') $post_robots_index = true; else  $post_robots_index = false;\n                        if (Request::post('robots_follow'))     $post_robots_follow = true; else if ($page['robots_follow'] == 'nofollow') $post_robots_follow = true; else  $post_robots_follow = false;\n\n                        if (Request::post('pages')) {\n                            // Get pages parent\n                            if (Request::post('pages') == '-none-') {\n                                $parent_page = '';\n                            } else {\n                                $parent_page = Request::post('pages');\n                            }\n                            // Save field\n                            $parent_page = Request::post('pages');\n                        } else {\n                            $parent_page = $page['parent'];\n                        }\n                        if (Request::post('templates')) $template = Request::post('templates'); else $template = $page['template'];\n                        if (Request::post('status'))    $status   = Request::post('status');    else $status   = $page['status'];\n                        if (Request::post('access'))    $access   = Request::post('access');    else $access   = (isset($page['access'])) ? $page['access'] : 'public';\n\n                        // Generate date\n                        $date = Request::post('date') ? Request::post('date') : Date::format($page['date'], 'Y-m-d H:i:s');\n\n                        Notification::setNow('page', 'page');\n\n                        // Display view\n                        View::factory('box/pages/views/backend/edit')\n                                ->assign('slug_to_edit', $slug_to_edit)\n                                ->assign('title_to_edit', $title_to_edit)\n                                ->assign('meta_title_to_edit', $meta_title_to_edit)                                \n                                ->assign('description_to_edit', $description_to_edit)\n                                ->assign('keywords_to_edit', $keywords_to_edit)\n                                ->assign('tags_to_edit', $tags_to_edit)\n                                ->assign('page', $page)\n                                ->assign('to_edit', $to_edit)\n                                ->assign('pages_array', $pages_array)\n                                ->assign('parent_page', $parent_page)\n                                ->assign('templates_array', $templates_array)\n                                ->assign('template', $template)\n                                ->assign('status_array', $status_array)\n                                ->assign('access_array', $access_array)\n                                ->assign('status', $status)\n                                ->assign('access', $access)\n                                ->assign('date', $date)\n                                ->assign('post_robots_index', $post_robots_index)\n                                ->assign('post_robots_follow', $post_robots_follow)\n                                ->assign('errors', $errors)\n                                ->display();\n                    }\n\n                break;\n\n                // Delete page\n                // -------------------------------------\n                case \"delete_page\":\n\n                    // Error 404 page can not be removed\n                    if (Request::get('slug') !== 'error404') {\n\n                        if (Security::check(Request::get('token'))) {\n\n                            // Get specific page\n                            $page = $pages->select('[slug=\"'.Request::get('name').'\"]', null);\n\n                            //  Delete page and update <parent> fields\n                            if ($pages->deleteWhere('[slug=\"'.$page['slug'].'\" ]')) {\n\n                                $_pages = $pages->select('[parent=\"'.$page['slug'].'\"]');\n\n                                if ( ! empty($_pages)) {\n                                    foreach ($_pages as $_page) {\n                                        $pages->updateWhere('[slug=\"'.$_page['slug'].'\"]', array('parent' => ''));\n                                    }\n                                }\n\n                                File::delete(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt');\n                                Notification::set('success', __('Page <i>:page</i> deleted', 'pages', array(':page' => Html::toText($page['title']))));\n                            }\n\n                            // Run delete extra actions\n                            Action::run('admin_pages_action_delete');\n\n                            // Redirect\n                            Request::redirect('index.php?id=pages');\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n\n                break;\n\n                // Update page access\n                // -------------------------------------\n                case \"update_access\":\n\n                    if (Request::get('slug') !== 'error404') {\n\n                        if (Security::check(Request::get('token'))) {\n\n                            $pages->updateWhere('[slug=\"'.Request::get('slug').'\"]', array('access' => Request::get('access')));\n\n                            // Run delete extra actions\n                            Action::run('admin_pages_action_update_access');\n\n                            // Send notification\n                            Notification::set('success', __('Your changes to the page <i>:page</i> have been saved.', 'pages', array(':page' => Request::get('slug'))));\n\n                            // Redirect\n                            Request::redirect('index.php?id=pages');\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n                    \n                break;\n\n                // Update page status\n                // -------------------------------------\n                case \"update_status\":\n\n                    if (Request::get('name') !== 'error404') {\n\n                        if (Security::check(Request::get('token'))) {\n\n                            $pages->updateWhere('[slug=\"'.Request::get('slug').'\"]', array('status' => Request::get('status')));\n\n                            // Run delete extra actions\n                            Action::run('admin_pages_action_update_status');\n\n                            // Send notification\n                            Notification::set('success', __('Your changes to the page <i>:page</i> have been saved.', 'pages', array(':page' => Request::get('slug'))));\n\n                            // Redirect\n                            Request::redirect('index.php?id=pages');\n                            \n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n\n                break;\n            }\n\n            // Its mean that you can add your own actions for this plugin\n            Action::run('admin_pages_extra_actions');\n\n        } else {\n\n            // Index action\n            // -------------------------------------\n\n            // Init vars\n            $pages_array = array();\n            $count = 0;\n\n            // Get pages\n            $pages_list = $pages->select(null, 'all', null, array('slug', 'title', 'status', 'date', 'author', 'expand', 'access', 'parent', 'template', 'tags'));\n\n            // Loop\n            foreach ($pages_list as $page) {\n\n                $pages_array[$count]['title']   = $page['title'];\n                $pages_array[$count]['meta_title'] = isset($page['meta_title']) ? $page['meta_title'] : '';\n                $pages_array[$count]['parent']  = $page['parent'];\n                $pages_array[$count]['_status'] = $page['status'];\n                $pages_array[$count]['_access'] = $page['access'];\n                $pages_array[$count]['status']  = $status_array[$page['status']];\n                $pages_array[$count]['access']  = isset($access_array[$page['access']]) ? $access_array[$page['access']] : $access_array['public']; // hack for old Monstra Versions\n                $pages_array[$count]['date']    = $page['date'];\n                $pages_array[$count]['author']  = $page['author'];\n                $pages_array[$count]['expand']  = $page['expand'];\n                $pages_array[$count]['slug']    = $page['slug'];\n                $pages_array[$count]['tags']    = $page['tags'];\n                $pages_array[$count]['template']= $page['template'];\n\n                if (isset($page['parent'])) {\n                    $c_p = $page['parent'];\n                } else {\n                    $c_p = '';\n                }\n\n                if ($c_p != '') {\n\n                    $_page = $pages->select('[slug=\"'.$page['parent'].'\"]', null);\n\n                    if (isset($_page['title'])) {\n                        $_title = $_page['title'];\n                    } else {\n                        $_title = '';\n                    }\n\n                    $pages_array[$count]['sort'] = $_title . ' ' . $page['title'];\n\n                } else {\n\n                    $pages_array[$count]['sort'] = $page['title'];\n\n                }\n\n                $_title = '';\n                $count++;\n            }\n\n            // Sort pages\n            $pages = Arr::subvalSort($pages_array, 'sort');\n\n            // Display view\n            View::factory('box/pages/views/backend/index')\n                    ->assign('pages', $pages)\n                    ->assign('site_url', $site_url)\n                    ->display();\n        }\n\n    }\n}\n"
  },
  {
    "path": "plugins/box/pages/pages.plugin.php",
    "content": "<?php\n\n/**\n *\tPages plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Pages' , 'pages'),\n                __('Pages manager', 'pages'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                'pages',\n                'box');\n\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {\n\n    // Include Admin\n    Plugin::Admin('pages', 'box');\n\n}\n\n// Add Plugin Javascript\nJavascript::add('plugins/box/pages/js/pages.js', 'backend');\n\n/**\n * Pages Class\n */\nclass Pages extends Frontend\n{\n    /**\n     * Current page data\n     *\n     * @var object\n     */\n    public static $page = null;\n\n    /**\n     * Pages tables\n     *\n     * @var object\n     */\n    public static $pages = null;\n\n    /**\n     * Requested page\n     *\n     * @var string\n     */\n    public static $requested_page = null;\n\n    /**\n     *  Main function\n     */\n    public static function main()\n    {\n        Pages::$pages = new Table('pages');\n        Pages::$page  = Pages::pageLoader();\n    }\n\n    /**\n     * Page loader\n     *\n     * @param  boolean $return_data data\n     * @return array\n     */\n    public static function pageLoader($return_data = true)\n    {\n        $requested_page = Pages::lowLoader(Uri::segments());\n        Pages::$requested_page = $requested_page;\n\n        return Pages::$pages->select('[slug=\"'.$requested_page.'\"]', null);\n    }\n\n    /**\n     * Load current page\n     *\n     * @global string $defpage default page\n     * @param  array  $data uri\n     * @return string\n     */\n    public static function lowLoader($data)\n    {\n        $defpage = Option::get('defaultpage');\n\n        // If data count 2 then it has Parent/Child\n        if (count($data) >= 2) {\n\n            // If exists parent file\n            if (count(Pages::$pages->select('[slug=\"'.$data[0].'\"]')) !== 0) {\n\n                // Get child file and get parent page name\n                $child_page = Pages::$pages->select('[slug=\"'.$data[1].'\"]', null);\n\n                // If child page parent is not empty then get his parent\n                if (count($child_page) == 0) {\n                    $c_p = '';\n                } else {\n                    if ($child_page['parent'] != '') {\n                        $c_p = $child_page['parent'];\n                    } else {\n                        $c_p = '';\n                    }\n                }\n\n                // Hack For old Monstra\n                $child_page['access'] = (isset($child_page['access'])) ? $child_page['access'] : 'public' ;\n\n                // Check is child_parent -> request parent\n                if ($c_p == $data[0]) {\n\n                    if (count($data) < 3) { // Checking only for the parent and one child, the remaining issue 404\n\n                        if ((($child_page['status'] == 'published') or\n                            (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and\n                            ($child_page['access'] == 'public')) {\n\n                            $id = $data[1];\n\n                        } elseif (($child_page['access'] == 'registered') and\n                                 (Session::exists('user_id')) and\n                                 ($child_page['status'] == 'published')) {\n\n                            $id = $data[1];\n\n                        } else {\n                            $id = 'error404';\n                            Response::status(404);\n                        }\n                    } else {\n                        $id = 'error404';\n                        Response::status(404);\n                    }\n\n                } else {\n                    $id = 'error404';\n                    Response::status(404);\n                }\n            } else {\n                $id = 'error404';\n                Response::status(404);\n            }\n\n        } else { // Only parent page come\n            if (empty($data[0])) {\n\n                $id = $defpage;\n\n            } else {\n\n                // Get current page\n                $current_page = Pages::$pages->select('[slug=\"'.$data[0].'\"]', null);\n\n                // Hack For old Monstra\n                $current_page['access'] = (isset($current_page['access'])) ? $current_page['access'] : 'public' ;\n\n                if (count($current_page) != 0) {\n                    if ( ! empty($current_page['parent'])) {\n                        $c_p = $current_page['parent'];\n                    } else {\n                        $c_p = '';\n                    }\n                } else {\n                    $c_p = '';\n                }\n\n                // Check if this page has parent\n                if ($c_p !== '') {\n\n                    if ($c_p == $data[0]) {\n                        if (count(Pages::$pages->select('[slug=\"'.$data[0].'\"]', null)) != 0) {\n\n                            if ((($current_page['status'] == 'published') or\n                                (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and\n                                ($current_page['access'] == 'public')) {\n\n                                $id = $data[0];\n\n                            } elseif (($current_page['access'] == 'registered') and\n                                     (Session::exists('user_id')) and\n                                     ($current_page['status'] == 'published')) {\n\n                                $id = $data[0];\n\n                            } else {\n                                $id = 'error404';\n                                Response::status(404);\n                            }\n                        } else {\n                            $id = 'error404';\n                            Response::status(404);\n                        }\n                    } else {\n                        $id = 'error404';\n                        Response::status(404);\n                    }\n                } else {\n\n                    if (count(Pages::$pages->select('[slug=\"'.$data[0].'\"]', null)) != 0) {\n                        if ((($current_page['status'] == 'published') or\n                            (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and\n                            ($current_page['access'] == 'public')) {\n\n                            $id = $data[0];\n\n                        } elseif (($current_page['access'] == 'registered') and\n                                 (Session::exists('user_id')) and\n                                 ($current_page['status'] == 'published')) {\n\n                            $id = $data[0];\n\n                        } else {\n                            $id = 'error404';\n                            Response::status(404);\n                        }\n                    } else {\n                        $id = 'error404';\n                        Response::status(404);\n                    }\n                }\n            }\n        }\n\n        // Return page name/id to load\n        return $id;\n    }\n\n    /**\n     * Get pages template\n     *\n     * @return string\n     */\n    public static function template()\n    {\n        if (Pages::$page['template'] == '') return 'index'; else return Pages::$page['template'];\n    }\n\n    /**\n     * Get pages contents\n     *\n     * @return string\n     */\n    public static function content($slug = '')\n    {\n        if ( ! empty($slug)) {\n\n            $page = Table::factory('pages')->select('[slug=\"'.$slug.'\"]', null);\n\n            if ( ! empty($page)) {\n\n                $content = Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt'));\n\n                $content = Filter::apply('content', $content);\n\n                return $content;\n\n            } else {\n                return '';\n            }\n\n        } else {\n            return Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . Pages::$page['id'] . '.page.txt'));\n        }\n\n    }\n\n    /**\n     * Get pages title\n     *\n     *  <code>\n     *      echo Page::title();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function title()\n    {\n        return !empty(Pages::$page['meta_title']) ? Pages::$page['meta_title'] : Pages::$page['title'];\n    }\n\n    /**\n     * Get pages Description\n     *\n     *  <code>\n     *      echo Page::description();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function description()\n    {\n        return Pages::$page['description'];\n    }\n\n    /**\n     * Get pages Keywords\n     *\n     *  <code>\n     *      echo Page::keywords();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function keywords()\n    {\n        return Pages::$page['keywords'];\n    }\n\n\n    /**\n     * Get pages\n     */\n    public static function getPages()\n    {\n        // Init vars\n        $pages_array = array();\n        $count = 0;\n\n        // Get pages table\n        $pages = new Table('pages');\n\n        // Get Pages List\n        $pages_list = $pages->select('[slug!=\"error404\" and status=\"published\"]');\n\n        foreach ($pages_list as $page) {\n\n            $pages_array[$count]['title']   = Html::toText($page['title']);\n            $pages_array[$count]['meta_title'] = !empty($page['meta_title']) ? Html::toText($page['meta_title']) : $page['title'];\n            $pages_array[$count]['parent']  = $page['parent'];\n            $pages_array[$count]['date']    = $page['date'];\n            $pages_array[$count]['author']  = $page['author'];\n            $pages_array[$count]['slug']    = ($page['slug'] == Option::get('defaultpage')) ? '' : $page['slug'] ;\n\n            if (isset($page['parent'])) {\n                $c_p = $page['parent'];\n            } else {\n                $c_p = '';\n            }\n\n            if ($c_p != '') {\n                $_page = $pages->select('[slug=\"'.$page['parent'].'\"]', null);\n\n                if (isset($_page['title'])) {\n                    $_title = $_page['title'];\n                } else {\n                    $_title = '';\n                }\n                $pages_array[$count]['sort'] = $_title . ' ' . $page['title'];\n            } else {\n                $pages_array[$count]['sort'] = $page['title'];\n            }\n            $_title = '';\n            $count++;\n        }\n\n        // Sort pages\n        $_pages_list = Arr::subvalSort($pages_array, 'sort');\n\n        // return\n        return $_pages_list;\n    }\n\n}\n\n/**\n * Page class\n */\nclass Page extends Pages\n{\n    /**\n     * Get date of current page\n     *\n     *  <code>\n     *      echo Page::date();\n     *  </code>\n     *\n     * @param  string $format Date format\n     * @return string\n     */\n    public static function date($format = 'Y-m-d')\n    {\n        return Date::format(Pages::$page['date'], $format);\n    }\n\n    /**\n     * Get author of current page\n     *\n     *  <code>\n     *      echo Page::author();\n     *  </code>\n     *\n     * @return string\n     */\n    public static function author()\n    {\n        return Pages::$page['author'];\n    }\n\n    /**\n     * Get children pages for a specific parent page\n     *\n     *  <code>\n     *      $pages = Page::children('page');\n     *  </code>\n     *\n     * @param  string $parent Parent page\n     * @return array\n     */\n    public static function children($parent)\n    {\n        return Pages::$pages->select('[parent=\"'.(string) $parent.'\"]', 'all');\n    }\n\n    /**\n     * Get the available children pages for requested page.\n     *\n     *  <code>\n     *      echo Page::available();\n     *  </code>\n     *\n     */\n    public static function available()\n    {\n        $pages = Pages::$pages->select('[parent=\"'.Pages::$requested_page.'\"]', 'all');\n\n        // Display view\n        View::factory('box/pages/views/frontend/available_pages')\n                ->assign('pages', $pages)\n                ->display();\n    }\n\n    /**\n     * Get page breadcrumbs\n     *\n     *  <code>\n     *      echo Page::breadcrumbs();\n     *  </code>\n     *\n     */\n    public static function breadcrumbs()\n    {\n        if (Uri::command() == 'pages') {\n            $current_page = Pages::$requested_page;\n            $parent_page = '';\n            if ($current_page !== 'error404') {\n                $page = Pages::$pages->select('[slug=\"'.$current_page.'\"]', null);\n                if (trim($page['parent']) !== '') {\n                    $parent = true;\n                    $parent_page = Pages::$pages->select('[slug=\"'.$page['parent'].'\"]', null);\n                } else {\n                    $parent = false;\n                }\n\n            // Display view\n            View::factory('box/pages/views/frontend/breadcrumbs')\n                    ->assign('current_page', $current_page)\n                    ->assign('page', $page)\n                    ->assign('parent', $parent)\n                    ->assign('parent_page', $parent_page)\n                    ->display();\n            }\n        }    \n    }\n\n    /**\n     * Get page url\n     *\n     *  <code>\n     *      echo Page::url();\n     *  </code>\n     *\n     */\n    public static function url()\n    {\n        return Option::get('siteurl').'/'.Pages::$page['slug'];\n    }\n\n    /**\n     * Get page slug\n     *\n     *  <code>\n     *      echo Page::slug();\n     *  </code>\n     *\n     */\n    public static function slug()\n    {\n        return Pages::$page['slug'];\n    }\n\n    /**\n     * Get page meta robots\n     *\n     *  <code>\n     *      echo Page::robots();\n     *  </code>\n     *\n     */\n    public static function robots()\n    {\n        if (Pages::$page !== null) {\n            $_index  = (isset(Pages::$page['robots_index'])) ? Pages::$page['robots_index'] : '';\n            $_follow = (isset(Pages::$page['robots_follow'])) ? Pages::$page['robots_follow'] : '';\n            $robots  = ( ! empty($_index) && ! empty($_follow)) ? $_index.', '.$_follow : '';\n        } else {\n            $robots = '';\n        }\n\n        return $robots;\n    }\n\n    public static function _date($attributes)\n    {\n        return Page::date((isset($attributes['format'])) ? $attributes['format'] : 'Y-m-d');\n    }\n\n    public static function _content($attributes)\n    {\n        return Pages::content((isset($attributes['name']) ? $attributes['name'] : ''));\n    }\n\n}\n\n\n/**\n * Add new shortcodes {page_author} {page_slug} {page_url} {page_date} {page_content}\n */\nShortcode::add('page_author', 'Page::author');\nShortcode::add('page_slug', 'Page::slug');\nShortcode::add('page_url', 'Page::url');\nShortcode::add('page_content', 'Page::_content');\nShortcode::add('page_date', 'Page::_date');\n"
  },
  {
    "path": "plugins/box/pages/views/backend/add.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('New Page', 'pages'); ?></h2>\n\n<?php\n    echo (\n        Form::open().\n        Form::hidden('csrf', Security::token())\n    );\n?>\n\n<ul class=\"nav nav-tabs\">\n    <li <?php if (Notification::get('page')) { ?>class=\"active\"<?php } ?>><a href=\"#page\" data-toggle=\"tab\"><?php echo __('Page', 'pages'); ?></a></li>\n    <li <?php if (Notification::get('metadata')) { ?>class=\"active\"<?php } ?>><a href=\"#metadata\" data-toggle=\"tab\"><?php echo __('Metadata', 'pages'); ?></a></li>\n    <li <?php if (Notification::get('settings')) { ?>class=\"active\"<?php } ?>><a href=\"#settings\" data-toggle=\"tab\"><?php echo __('Settings', 'pages'); ?></a></li>\n</ul>\n\n<div class=\"tab-content tab-page margin-bottom-1\">\n    <div class=\"tab-pane <?php if (Notification::get('page')) { ?>active<?php } ?>\" id=\"page\">\n        <div class=\"form-group\">\n        <?php\n            echo (                \n                Form::label('page_title', __('Name', 'pages')).\n                Form::input('page_title', $post_title, array('class' => (isset($errors['pages_empty_title'])) ? 'form-control error-field' : 'form-control'))\n            );\n            if (isset($errors['pages_empty_title'])) echo Html::nbsp(3).'<span class=\"error-message\">'.$errors['pages_empty_title'].'</span>';\n        ?>            \n        </div>\n        <div class=\"form-group\">\n        <?php\n\n            echo (\n                Form::label('page_name', __('Slug (url)', 'pages')).\n                Form::input('page_name', $post_name, array('class' => (isset($errors['pages_empty_name'])) ? 'form-control error-field' : 'form-control'))\n            );\n\n            if (isset($errors['pages_exists'])) echo '<span class=\"error-message\">'.$errors['pages_exists'].'</span>';\n            if (isset($errors['pages_empty_name'])) echo '<span class=\"error-message\">'.$errors['pages_empty_name'].'</span>';\n        ?>\n        </div>\n\n    </div>\n    <div class=\"tab-pane <?php if (Notification::get('metadata')) { ?>active<?php } ?>\" id=\"metadata\">\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('page_meta_title', __('Title', 'pages')).\n                Form::input('page_meta_title', $post_meta_title, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('page_keywords', __('Keywords', 'pages')).\n                Form::input('page_keywords', $post_keywords, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php    \n            echo (            \n                Form::label('page_description', __('Description', 'pages')).\n                Form::textarea('page_description', $post_description, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('robots', __('Search Engines Robots', 'pages')).\n                Html::br(1).\n                'no Index'.Html::nbsp().Form::checkbox('robots_index', 'index', $post_robots_index).Html::nbsp(2).\n                'no Follow'.Html::nbsp().Form::checkbox('robots_follow', 'follow', $post_robots_follow)\n            );\n        ?>\n        </div>\n    </div>\n    <div class=\"tab-pane <?php if (Notification::get('settings')) { ?>active<?php } ?>\" id=\"settings\">\n        <div class=\"form-group\">\n            <?php\n                echo (\n                    Form::label('pages', __('Parent', 'pages')).\n                    Form::select('pages', $pages_array, $parent_page, array('class' => 'form-control'))\n                );\n            ?>\n        </div>\n        <div class=\"form-group\">\n            <?php\n                echo (\n                    Form::label('templates', __('Template', 'pages')).\n                    Form::select('templates', $templates_array, $post_template, array('class' => 'form-control'))\n                );\n            ?>\n        </div>\n        <div class=\"form-group\">\n            <?php\n                echo (\n                    Form::label('status', __('Status', 'pages')).\n                    Form::select('status', $status_array, $post_status, array('class' => 'form-control'))\n                );\n            ?>\n        </div>\n        <div class=\"form-group\">\n            <?php\n                echo (\n                    Form::label('access', __('Access', 'pages')).\n                    Form::select('access', $access_array, $post_access, array('class' => 'form-control'))\n                );\n            ?>\n        </div>            \n    </div>\n</div>\n\n<div class=\"row margin-bottom-1\">\n    <div class=\"col-xs-12\">\n        <?php Action::run('admin_editor', array(Html::toText($post_content))); ?>\n    </div>\n</div>\n\n<div class=\"row margin-top-1\">\n    <div class=\"col-xs-12\">\n        <div class=\"form-group\">\n            <div class=\"input-group\">\n                <?php    \n                    echo (            \n                        Form::input('page_tags', $post_tags, array('class' => 'form-control'))\n                    );\n                ?>\n                <span class=\"input-group-addon add-on\">\n                    <?php echo __('Tags', 'pages'); ?>\n                </span>            \n            </div>\n        </div>\n    </div>\n</div>\n\n<div class=\"row margin-top-1\">\n    <div class=\"col-sm-6\">\n        <?php\n            echo (\n                Form::submit('add_page_and_exit', __('Save and Exit', 'pages'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n                Form::submit('add_page', __('Save', 'pages'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n                Html::anchor(__('Cancel', 'pages'), 'index.php?id=pages', array('title' => __('Cancel', 'pages'), 'class' => 'btn btn-phone btn-default'))\n            );\n        ?>\n    </div>\n    <div class=\"col-sm-6 visible-sm visible-md visible-lg\">\n        <div class=\"pull-right\">               \n            <div class=\"input-group datapicker\">\n                <?php echo Form::input('page_date', $date, array('class' => 'form-control')); ?>\n                <span class=\"input-group-addon add-on\">\n                    <span class=\"glyphicon glyphicon-calendar\"></span>\n                </span>            \n            </div>           \n        </div>\n        <?php echo Form::close(); ?>\n    </div>\n</div>"
  },
  {
    "path": "plugins/box/pages/views/backend/edit.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php if (Request::get('name') == 'error404') { echo __('Edit 404 Page', 'pages'); } else { echo __('Edit Page', 'pages'); } ?></h2>\n\n<?php\n    echo (\n        Form::open().\n        Form::hidden('csrf', Security::token()).\n        Form::hidden('page_old_name', Request::get('name')).\n        Form::hidden('old_parent', $page['parent']).\n        Form::hidden('page_id', $page['id'])\n    );\n?>\n\n<ul class=\"nav nav-tabs\">\n    <li <?php if (Notification::get('page')) { ?>class=\"active\"<?php } ?>><a href=\"#page\" data-toggle=\"tab\"><?php echo __('Page', 'pages'); ?></a></li>\n    <li <?php if (Notification::get('metadata')) { ?>class=\"active\"<?php } ?>><a href=\"#metadata\" data-toggle=\"tab\"><?php echo __('Metadata', 'pages'); ?></a></li>\n    <li <?php if (Notification::get('settings')) { ?>class=\"active\"<?php } ?>><a href=\"#settings\" data-toggle=\"tab\"><?php echo __('Settings', 'pages'); ?></a></li>\n</ul>\n\n<div class=\"tab-content tab-page margin-bottom-1\">\n    <div class=\"tab-pane <?php if (Notification::get('page')) { ?>active<?php } ?>\" id=\"page\">\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('page_title', __('Name', 'pages')).\n                Form::input('page_title', $title_to_edit, array('class' => (isset($errors['pages_empty_title'])) ? 'form-control error-field' : 'form-control'))\n            );\n            if (isset($errors['pages_empty_title'])) echo '<span class=\"error-message\">'.$errors['pages_empty_title'].'</span>';\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php            \n\n            if (Request::get('name') !== 'error404') {\n                echo (\n                    Form::label('page_name', __('Slug (url)', 'pages'))\n                );\n            }\n\n            if (Request::get('name') == 'error404') {\n                echo Form::hidden('page_name', $slug_to_edit);\n            } else {\n                echo (\n                    Form::input('page_name', $slug_to_edit, array('class' => (isset($errors['pages_empty_name'])) ? 'form-control error-field' : 'form-control'))\n                );\n            }\n\n            if (isset($errors['pages_empty_name'])) echo '<span class=\"error-message\">'.$errors['pages_empty_name'].'</span>';\n            if (isset($errors['pages_exists'])) echo '<span class=\"error-message\">'.$errors['pages_exists'].'</span>';\n        ?>\n        </div>\n    </div>\n    <div class=\"tab-pane <?php if (Notification::get('metadata')) { ?>active<?php } ?>\" id=\"metadata\">\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('page_meta_title', __('Title', 'pages')).\n                Form::input('page_meta_title', $meta_title_to_edit, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('page_keywords', __('Keywords', 'pages')).\n                Form::input('page_keywords', $keywords_to_edit, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo(\n                Form::label('page_description', __('Description', 'pages')).\n                Form::textarea('page_description', $description_to_edit, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (                \n                Form::label('robots', __('Search Engines Robots', 'pages')).\n                Html::br(1).\n                'no Index'.Html::nbsp().Form::checkbox('robots_index', 'index', $post_robots_index).Html::nbsp(2).\n                'no Follow'.Html::nbsp().Form::checkbox('robots_follow', 'follow', $post_robots_follow)\n            );\n        ?>\n        </div>\n    </div>\n    <div class=\"tab-pane <?php if (Notification::get('settings')) { ?>active<?php } ?>\" id=\"settings\">        \n            <?php\n                if (Request::get('name') == 'error404') {\n                    echo Form::hidden('pages', $parent_page);\n                } else {\n            ?>\n            <div class=\"form-group\">\n            <?php\n                echo (\n                    Form::label('pages', __('Parent', 'pages')).\n                    Form::select('pages', $pages_array, $parent_page, array('class' => 'form-control'))\n                );\n            ?>\n            </div>\n            <?php } ?>\n            <?php if (Request::get('name') != 'error404') { ?>\n                <div class=\"form-group\">\n            <?php } else { ?>\n            <div>\n            <?php } ?>\n            <?php\n                echo (\n                    Form::label('templates', __('Template', 'pages')).\n                    Form::select('templates', $templates_array, $template, array('class' => 'form-control'))\n                );\n            ?>\n            </div>\n            <?php\n                if (Request::get('name') == 'error404') {\n                    echo Form::hidden('status', $status);\n                } else {\n            ?>\n            <div class=\"form-group\">\n            <?php\n                echo (\n                    Form::label('status', __('Status', 'pages')).\n                    Form::select('status', $status_array, $status, array('class' => 'form-control'))\n                );\n            ?>\n            </div>\n            <?php } ?>\n            <?php\n                if (Request::get('name') == 'error404') {\n                    echo Form::hidden('access', $access);\n                } else {\n            ?>\n            <div class=\"form-group\">\n            <?php\n                echo (\n                    Form::label('access', __('Access', 'pages')).\n                    Form::select('access', $access_array, $access, array('class' => 'form-control'))\n                );\n            ?>\n            </div>\n            <?php } ?>        \n    </div>\n</div>\n\n<div class=\"row margin-bottom-1\">\n    <div class=\"col-xs-12\">\n        <?php Action::run('admin_editor', array(Html::toText($to_edit))); ?>\n    </div>\n</div>\n\n<div class=\"row margin-top-1\">\n    <div class=\"col-xs-12\">\n        <div class=\"form-group\">\n            <div class=\"input-group\">\n                <?php    \n                    echo (            \n                        Form::input('page_tags', $tags_to_edit, array('class' => 'form-control'))\n                    );\n                ?>\n                <span class=\"input-group-addon add-on\">\n                    <?php echo __('Tags', 'pages'); ?>\n                </span>            \n            </div>\n        </div>\n    </div>\n</div>\n\n<div class=\"row margin-top-1\">\n    <div class=\"col-sm-6\">\n        <?php\n            echo (\n                Form::submit('edit_page_and_exit', __('Save and Exit', 'pages'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n                Form::submit('edit_page', __('Save', 'pages'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n                Html::anchor(__('Cancel', 'pages'), 'index.php?id=pages', array('title' => __('Cancel', 'pages'), 'class' => 'btn btn-phone btn-default'))\n            );\n        ?>\n    </div>\n    <div class=\"col-sm-6 visible-sm visible-md visible-lg\">\n        <div class=\"pull-right\">               \n            <div class=\"input-group datapicker\">\n                <?php echo Form::input('page_date', $date, array('class' => 'form-control')); ?>\n                <span class=\"input-group-addon add-on\">\n                    <span class=\"glyphicon glyphicon-calendar\"></span>\n                </span>            \n            </div>           \n        </div>\n        <?php echo Form::close(); ?>\n    </div>\n</div>\n"
  },
  {
    "path": "plugins/box/pages/views/backend/index.view.php",
    "content": "<div class=\"vertical-align margin-bottom-1\">\n    <div class=\"text-left row-phone\">\n        <h2><?php echo __('Pages', 'pages'); ?></h2>\n    </div>\n    <div class=\"text-right row-phone\">\n        <?php\n            echo (\n                Html::anchor(__('Create New Page', 'pages'), 'index.php?id=pages&action=add_page', array('title' => __('Create New Page', 'pages'), 'class' => 'btn btn-phone btn-primary')). Html::nbsp(3).\n                Html::anchor(__('Edit 404 Page', 'pages'), 'index.php?id=pages&action=edit_page&name=error404', array('title' => __('Create New Page', 'pages'), 'class' => 'btn btn-phone btn-default'))\n            );\n        ?>\n    </div>\n</div>\n\n<div class=\"table-responsive\">\n<table class=\"table table-bordered\">\n    <thead>\n        <tr>\n            <th width=\"3%\"></th>\n            <th><?php echo __('Name', 'pages'); ?></th>\n            <th class=\"visible-lg hidden-xs\"><?php echo __('Author', 'pages'); ?></th>\n            <th class=\"visible-lg hidden-xs\"><?php echo __('Status', 'pages'); ?></th>\n            <th class=\"visible-lg\"><?php echo __('Access', 'pages'); ?></th>\n            <th class=\"visible-lg hidden-xs\"><?php echo __('Date', 'pages'); ?></th>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n    <?php\n        if (count($pages) != 0) {\n                foreach ($pages as $page) {\n                    if ($page['parent'] != '') { $dash = Html::arrow('right').'&nbsp;&nbsp;'; } else { $dash = \"\"; }\n     ?>\n     <?php if ($page['slug'] != 'error404') { ?>\n     <?php\n        $expand = PagesAdmin::$pages->select('[slug=\"'.(string) $page['parent'].'\"]', null);\n        if ($page['parent'] !== '' && isset($expand['expand']) && $expand['expand'] == '1') { $visibility = 'style=\"display:none;\"'; } else { $visibility = ''; }\n     ?>\n     <tr <?php echo $visibility; ?> <?php if (trim($page['parent']) !== '') {?> rel=\"children_<?php echo $page['parent']; ?>\" <?php } ?>>\n        <td>\n        <?php\n            if (count(PagesAdmin::$pages->select('[parent=\"'.(string) $page['slug'].'\"]', 'all')) > 0) {\n                if (isset($page['expand']) && $page['expand'] == '1') {\n                    echo '<a href=\"javascript:;\" class=\"btn-expand parent\" token=\"'.Security::token().'\" rel=\"'.$page['slug'].'\">+</a>';\n                } else {\n                    echo '<a href=\"javascript:;\" class=\"btn-expand parent\" token=\"'.Security::token().'\" rel=\"'.$page['slug'].'\">-</a>';\n                }\n            }\n        ?>\n        </td>\n        <td>\n            <?php\n                $_parent = (trim($page['parent']) == '') ? '' : $page['parent'];\n                $parent  = (trim($page['parent']) == '') ? '' : $page['parent'].'/';\n                echo (trim($page['parent']) == '') ? '' : '&nbsp;';\n                echo $dash.Html::anchor(Html::toText($page['title']), $site_url.'/'.$parent.$page['slug'], array('target' => '_blank', 'rel' => 'children_'.$_parent));\n            ?>\n        </td>\n        <td class=\"visible-lg hidden-xs\">\n            <?php echo $page['author']; ?>\n        </td>\n        <td class=\"visible-lg hidden-xs\">\n            <?php echo $page['status']; ?>\n        </td>\n        <td class=\"visible-lg\">\n            <?php echo $page['access']; ?>\n        </td>\n        <td class=\"visible-lg hidden-xs\">\n            <?php echo Date::format($page['date'], \"j.n.Y\"); ?>\n        </td>\n        <td>\n            <div class=\"pull-right\">\n                <div class=\"btn-group\">\n                  <?php echo Html::anchor(__('Edit', 'pages'), 'index.php?id=pages&action=edit_page&name='.$page['slug'], array('class' => 'btn btn-primary')); ?>\n                  <button type=\"button\" class=\"btn btn-primary dropdown-toggle\" data-toggle=\"dropdown\">\n                    <span class=\"caret\"></span>\n                    <span class=\"sr-only\">Toggle Dropdown</span>\n                  </button>\n                  <ul class=\"dropdown-menu\" role=\"menu\">\n                        <?php if ($page['parent'] == '') { ?>\n                            <li><a href=\"index.php?id=pages&action=add_page&parent_page=<?php echo $page['slug']; ?>\" title=\"<?php echo __('Create New Page', 'pages'); ?>\"><?php echo __('Add', 'pages'); ?></a></li>\n                        <?php } ?>\n                        <li><?php echo Html::anchor(__('Clone', 'pages'), 'index.php?id=pages&action=clone_page&name='.$page['slug'].'&token='.Security::token(), array('title' => __('Clone', 'pages'))); ?></li>\n                        <li class=\"divider\"></li>\n                        <li class=\"dropdown-header\"><?php echo __('Status', 'pages'); ?></li>\n                        <li><a href=\"index.php?id=pages&action=update_status&slug=<?php echo $page['slug']; ?>&status=published&token=<?php echo Security::token(); ?>\"><?php echo __('Published', 'pages'); ?> <?php if ($page['_status'] == 'published') { ?><i class=\"glyphicon glyphicon-ok\"></i><?php } ?></a></li>\n                        <li><a href=\"index.php?id=pages&action=update_status&slug=<?php echo $page['slug']; ?>&status=draft&token=<?php echo Security::token(); ?>\"><?php echo __('Draft', 'pages'); ?> <?php if ($page['_status'] == 'draft') { ?><i class=\"glyphicon glyphicon-ok\"></i><?php } ?></a></li>\n                        <li class=\"dropdown-header\"><?php echo __('Access', 'pages'); ?></li>\n                        <li><a href=\"index.php?id=pages&action=update_access&slug=<?php echo $page['slug']; ?>&access=public&token=<?php echo Security::token(); ?>\"><?php echo __('Public', 'pages'); ?> <?php if ($page['_access'] == 'public') { ?><i class=\"glyphicon glyphicon-ok\"></i><?php } ?></a></li>\n                        <li><a href=\"index.php?id=pages&action=update_access&slug=<?php echo $page['slug']; ?>&access=registered&token=<?php echo Security::token(); ?>\"><?php echo __('Registered', 'pages'); ?> <?php if ($page['_access'] == 'registered') { ?><i class=\"glyphicon glyphicon-ok\"></i><?php } ?></a></li>\n                  </ul>\n                </div>\n\n                <?php echo Html::anchor(__('Delete', 'pages'),\n                           'index.php?id=pages&action=delete_page&name='.$page['slug'].'&token='.Security::token(),\n                           array('class' => 'btn btn-danger btn-actions btn-actions-default', 'onclick' => \"return confirmDelete('\".__(\"Delete page: :page\", 'pages', array(':page' => Html::toText($page['title']))).\"')\"));\n                ?>\n            </div>\n        </td>\n     </tr>\n\n     <?php } ?>\n    <?php\n            }\n        }\n    ?>\n    </tbody>\n</table>\n</div>\n\n<form>\n    <input type=\"hidden\" name=\"url\" value=\"<?php echo Option::get('siteurl'); ?>/admin/index.php?id=pages\">\n</form>\n"
  },
  {
    "path": "plugins/box/pages/views/frontend/available_pages.view.php",
    "content": "<ul>\n<?php\n    foreach ($pages as $page) {\n        if ($page['status'] == 'published') {\n?>\n    <li><a href=\"<?php echo $page['parent'].'/'.$page['slug']; ?>\"><?php echo $page['title']; ?></a></li>\n<?php\n        }\n    }\n?>\n</ul>\n"
  },
  {
    "path": "plugins/box/pages/views/frontend/breadcrumbs.view.php",
    "content": "<?php if ($parent) { ?>\n    <a href=\"<?php echo Site::url().'/'.$page['parent']; ?>\"><?php echo $parent_page['title']; ?></a>&nbsp;<span>&rarr;</span>&nbsp;<a href=\"<?php echo Site::url().'/'.$page['parent'].'/'.$page['slug']; ?>\"><?php echo $page['title']; ?></a>\n<?php } else { ?>\n    <a href=\"<?php echo Site::url().'/'.$page['slug']; ?>\"><?php echo $page['title']; ?></a>\n<?php }\n"
  },
  {
    "path": "plugins/box/plugins/install/plugins.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/plugins/plugins.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>2</plugin_priority>\n    <plugin_name>Plugins</plugin_name>\n    <plugin_description>Plugins manager plugin</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/plugins/js/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/box/plugins/js/plugins.js",
    "content": "if (typeof $.monstra == 'undefined') $.monstra = {};\n\n$.monstra.plugins = {\n\n    init: function(){\n        if (window.location.hash && $('a[href=\"'+ window.location.hash +'\"]')) {\n            $('a[href=\"'+ window.location.hash +'\"]').click();\n        }\n    }\n\n};\n\n$(document).ready(function(){\n    $.monstra.plugins.init();\n});"
  },
  {
    "path": "plugins/box/plugins/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Pluginy',\n            'Name' => 'Název',\n            'Actions' => 'Akce',\n            'Description' => 'Popis',\n            'Installed' => 'Nainstalované',\n            'Install New' => 'Instalovat nový',\n            'Delete' => 'Vymazat',\n            'Delete plugin :plugin' => 'Vymazat plugin :plugin',\n            'This plugin does not exist' => 'Tento plugin neexistuje',\n            'Version' => 'Verze',\n            'Author' => 'Autor',\n            'Get More Plugins' => 'Získat víc pluginů',\n            'Install' => 'Instalovat',\n            'Uninstall' => 'Odinstalovat',\n            'README.md not found' => 'README.md nenalezeno',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Plugins',\n            'Name' => 'Name',\n            'Actions' => 'Aktionen',\n            'Description' => 'Beschreibung',\n            'Installed' => 'Installiert',\n            'Install New' => 'Installiere Neue',\n            'Delete' => 'Löschen',\n            'Delete plugin :plugin' => 'Lösche Plugin :plugin',\n            'This plugins does not exist' => 'Diese Plugins existieren nicht',\n            'Version' => 'Version',\n            'Author' => 'Author',\n            'Get More Plugins' => 'Hole weitere Plugins',\n            'Install' => 'Installieren',\n            'Uninstall' => 'Deinstallieren',\n            'README.md not found' => 'README.md nicht gefunden',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Plugins',\n            'Name' => 'Name',\n            'Actions' => 'Actions',\n            'Description' => 'Description',\n            'Installed' => 'Installed',\n            'Install New' => 'Install New',\n            'Delete' => 'Delete',\n            'Delete plugin :plugin' => 'Delete plugin :plugin',\n            'This plugin does not exist' => 'This plugin does not exist',\n            'Version' => 'Version',\n            'Author' => 'Author',\n            'Get More Plugins' => 'Get More Plugins',\n            'Install' => 'Install',\n            'Uninstall' => 'Uninstall',\n            'README.md not found' => 'README.md not found',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Plugins',\n            'Name' => 'Nombre',\n            'Actions' => 'Acciones',\n            'Description' => 'Descripción',\n            'Installed' => 'Instalado',\n            'Install New' => 'Instalar nuevo',\n            'Delete' => 'Eliminar',\n            'Delete plugin :plugin' => 'Eliminar plugin: :plugin',\n            'This plugin does not exist' => 'Este plugin no existe',\n            'Version' => 'Versión',\n            'Author' => 'Autor',\n            'Get More Plugins' => 'Obtener más plugins',\n            'Install' => 'Instalar',\n            'Uninstall' => 'Desinstalar',\n            'README.md not found' => 'README.md no encontrado',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'افزونه ها',\n            'Name' => 'نام',\n            'Actions' => 'عملیات',\n            'Description' => 'توضیحات',\n            'Installed' => 'نصب شده',\n            'Install New' => 'نصب جدید',\n            'Delete' => 'حذف',\n            'Delete plugin :plugin' => 'حذف افزونه :plugin',\n            'This plugin does not exist' => 'این افزونه وجود ندارد',\n            'Version' => 'نسخه',\n            'Author' => 'مولف',\n            'Get More Plugins' => 'دریافت افزونه های بیشتر',\n            'Install' => 'نصب',\n            'Uninstall' => 'حذف',\n            'README.md not found' => 'README.md not found',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/fr.lang.php",
    "content": "<?php\n    \n    return array(\n        'plugins' => array(\n            'Plugins' => 'Plugins',\n            'Name' => 'Nom',\n            'Actions' => 'Actions',\n            'Description' => 'Description',\n            'Installed' => 'Installé',\n            'Install New' => 'Installer un nouveau',\n            'Delete' => 'Supprimer',\n            'Delete plugin :plugin' => 'Supprimer le plugin :plugin',\n            'This plugin does not exist' => 'Ce plugin n\\\\\\'existe pas',\n            'Version' => 'Version',\n            'Author' => 'Auteur',\n            'Get More Plugins' => 'Obtenez plus de plugins',\n            'Install' => 'Installer',\n            'Uninstall' => 'Désinstaller',\n            'README.md not found' => 'README.md not found',\n        )\n    );"
  },
  {
    "path": "plugins/box/plugins/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Pluginok',\n            'Name' => 'Név',\n            'Actions' => 'Műveletek',\n            'Description' => 'Leírás',\n            'Installed' => 'Telepítve',\n            'Install New' => 'Új Telepítése',\n            'Delete' => 'Törlés',\n            'Delete plugin :plugin' => 'Plugin törlése :plugin',\n            'This plugin does not exist' => 'Ez a plugin nem létezik',\n            'Version' => 'Verzió',\n            'Author' => 'Szerző',\n            'Get More Plugins' => 'Még több Plugin',\n            'Install' => 'Telepít',\n            'Uninstall' => 'Töröl',\n            'README.md not found' => 'README.md not found',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Plugins',\n            'Name' => 'Nama',\n            'Actions' => 'Tindakan',\n            'Description' => 'Deskripsi',\n            'Installed' => 'Terpasang',\n            'Install New' => 'Pemasangan Baru',\n            'Delete' => 'Hapus',\n            'Delete plugin :plugin' => 'Hapus Plugin :plugin',\n            'This plugins does not exist' => 'Plugin ini tidak ada',\n            'Version' => 'Versi',\n            'Author' => 'Penulis',\n            'Get More Plugins' => 'Cari Plugins Baru',\n            'Install' => 'Memasangkan',\n            'Uninstall' => 'Menghapus Program',\n            'README.md not found' => 'README.md not found',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Plugin',\n            'Installed' => 'Installati',\n            'Install New' => 'Installa nuovi',\n            'Actions' => 'Azioni',\n            'Name' => 'Nome',\n            'Description' => 'Descrizione',\n            'Delete' => 'Elimina',\n            'Delete plugin :plugin' => 'Elimina plugin :plugin',\n            'This plugin does not exist' => 'Tale plugin non esiste',\n            'Version' => 'Versione',\n            'Author' => 'Autore',\n            'Get More Plugins' => 'Scarica altri plugin',\n            'Install' => 'Installa',\n            'Uninstall' => 'Disinstalla',\n            'README.md not found' => 'README.md not found',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'プラグイン',\n            'Name' => '名前',\n            'Actions' => '操作',\n            'Description' => '説明',\n            'Installed' => 'インストール済み',\n            'Install New' => 'インストール可能',\n            'Delete' => '削除',\n            'Delete plugin :plugin' => 'プラグインの削除: :plugin',\n            'This plugin does not exist' => 'プラグインが存在しません。',\n            'Version' => 'バージョン',\n            'Author' => '作成者',\n            'Get More Plugins' => 'さらにプラグインを取得',\n            'Install' => 'インストール',\n            'Uninstall' => '停止',\n            'README.md not found' => 'README.md not found',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'პლაგინები',\n            'Installed' => 'დაყენებული',\n            'Install New' => 'ახალის დაყენება',\n            'Actions' => 'მოქმედება',\n            'Name' => 'სახელწოდება',\n            'Description' => 'აღწერა',\n            'Delete' => 'წაშლა',\n            'Delete plugin :plugin' => ':plugin პლაგინის წაშლა',\n            'This plugin does not exist' => 'ასეთი პლაგინი არ არსებობს',\n            'Version' => 'ვერსია',\n            'Author' => 'ავტორი',\n            'Get More Plugins' => 'სხვა პლაგინების გადმოწერა',\n            'Install' => 'დაყენება',\n            'Uninstall' => 'წაშლა',\n            'README.md not found' => 'README.md არ არის ნაპოვნი',\n            'Info' => 'ინფო',\n            'Upload' => 'ატვირთვა',\n            'Drop File Here' => 'გადაიტანეთ ფაილი აქ',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Papildiniai',\n            'Name' => 'Pavadinimas',\n            'Actions' => 'Veiksmai',\n            'Description' => 'Aprašymas',\n            'Installed' => 'Įdiegti',\n            'Install New' => 'Įdiegti naują',\n            'Delete' => 'Ištrinti',\n            'Delete plugin :plugin' => 'Ištrinti papildinį :plugin',\n            'This plugins does not exist' => 'Tokio papildinio nėra',\n            'Version' => 'Versija',\n            'Author' => 'Autorius',\n            'Get More Plugins' => 'Gauti daugiau papildinių',\n            'Install' => 'Įdiegti',\n            'Uninstall' => 'Išdiegti',\n            'README.md not found' => 'README.md not found',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Plugins',\n            'Name' => 'Naam',\n            'Actions' => 'Acties',\n            'Description' => 'Beschrijving',\n            'Installed' => 'Geinstalleerd',\n            'Install New' => 'Installeer nieuwe plugin',\n            'Delete' => 'Verwijderen',\n            'Delete plugin :plugin' => 'Verwijder plugin: :plugin',\n            'This plugins does not exist' => 'Deze plugin bestaat niet',\n            'Version' => 'Versie',\n            'Author' => 'Auteur',\n            'Get More Plugins' => 'Vind meer plugins',\n            'Install' => 'Installeren',\n            'Uninstall' => 'Deinstalleren',\n            'README.md not found' => 'README.md not found',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Wtyczki',\n            'Name' => 'Nazwa',\n            'Actions' => 'Akcje',\n            'Description' => 'Opis',\n            'Installed' => 'Zainstalowane',\n            'Install New' => 'Zainstaluj nową',\n            'Delete' => 'Usuń',\n            'Delete plugin :plugin' => 'Czy napewno usunąć wtyczkę :plugin',\n            'This plugin does not exist' => 'Ta wtyczka nie istnieje',\n            'Version' => 'Wersja',\n            'Author' => 'Autor',\n            'Get More Plugins' => 'Pobierz więcej wtyczek',\n            'Install' => 'Instaluj',\n            'Uninstall' => 'Odinstaluj',\n            'README.md not found' => 'README.md not found',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Plugins',\n            'Name' => 'Nome',\n            'Actions' => 'Ações',\n            'Description' => 'Descrição',\n            'Installed' => 'Instalado',\n            'Install New' => 'Instalar novo',\n            'Delete' => 'Deletar',\n            'Delete plugin :plugin' => 'Deletar o plugin :plugin',\n            'This plugins does not exist' => 'Estes plugins não existem',\n            'Version' => 'Versão',\n            'Author' => 'Autor',\n            'Get More Plugins' => 'Ver mais plugins',\n            'Install' => 'Instalar',\n            'Uninstall' => 'Desinstalar',\n            'README.md not found' => 'README.md not found',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Плагины',\n            'Installed' => 'Установленные',\n            'Install New' => 'Установить новые',\n            'Actions' => 'Действия',\n            'Name' => 'Название',\n            'Description' => 'Описание',\n            'Delete' => 'Удалить',\n            'Delete plugin :plugin' => 'Удалить плагин :plugin',\n            'This plugin does not exist' => 'Такого плагина не существует',\n            'Version' => 'Версия',\n            'Author' => 'Автор',\n            'Get More Plugins' => 'Скачать другие плагины',\n            'Install' => 'Установить',\n            'Uninstall' => 'Удалить',\n            'README.md not found' => 'README.md не найден',\n            'Info' => 'Инфо',\n            'Upload' => 'Загрузить',\n            'Drop File Here' => 'Перетащите файл сюда',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Pluginy',\n            'Name' => 'Názov',\n            'Actions' => 'Akcie',\n            'Description' => 'Popis',\n            'Installed' => 'Nainštalované',\n            'Install New' => 'Inštalovať nový',\n            'Delete' => 'Vymazať',\n            'Delete plugin :plugin' => 'Vymazať plugin :plugin',\n            'This plugin does not exist' => 'Tento plugin neexistuje',\n            'Version' => 'Verzia',\n            'Author' => 'Autor',\n            'Get More Plugins' => 'Získať viacej pluginov',\n            'Install' => 'Inštalovať',\n            'Uninstall' => 'Odinštalovať',\n            'README.md not found' => 'README.md not found',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/sr.lang.php",
    "content": "<?php\n    \n    return array(\n        'plugins' => array(\n            'Plugins' => 'Dodaci',\n            'Name' => 'Ime',\n            'Actions' => 'Akcije',\n            'Description' => 'Opis',\n            'Installed' => 'Instalirani',\n            'Install New' => 'Instaliraj novi',\n            'Delete' => 'Obriši',\n            'Delete plugin :plugin' => 'Obriši dodatak :plugin',\n            'This plugin does not exist' => 'Ovaj dodatak ne postoji',\n            'Version' => 'Verzija',\n            'Author' => 'Autor',\n            'Get More Plugins' => 'Dodaj još dodataka',\n            'Install' => 'Instaliraj',\n            'Uninstall' => 'Deinstaliraj',\n            'README.md not found' => 'README.md Nije nađeno',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Eklentiler',\n            'Name' => 'Ad',\n            'Actions' => 'İşlemler',\n            'Description' => 'Açıklama',\n            'Installed' => 'Yüklenenler',\n            'Install New' => 'Yeni Yükle',\n            'Delete' => 'Sil',\n            'Delete plugin :plugin' => ':plugin adlı eklenti silinsin mi',\n            'This plugin does not exist' => 'Eklenti bulunamadı',\n            'Version' => 'Sürüm',\n            'Author' => 'Yazar',\n            'Get More Plugins' => 'Daha Fazla Eklenti',\n            'Install' => 'Yükle',\n            'Uninstall' => 'Kaldır',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => 'Плагіни',\n            'Installed' => 'Встановлені',\n            'Install New' => 'Встановити нові',\n            'Actions' => 'Дії',\n            'Name' => 'Назва',\n            'Description' => 'Опис',\n            'Delete' => 'Видалити',\n            'Delete plugin :plugin' => 'Видалити плагін :plugin',\n            'This plugin does not exist' => 'Такий плагін не існує',\n            'Version' => 'Версія',\n            'Author' => 'Автор',\n            'Get More Plugins' => 'Завантажити інші плагіни',\n            'Install' => 'Встановити',\n            'Uninstall' => 'Видалити',\n            'README.md not found' => 'README.md не знайдено',\n            'Info' => 'Інфо',\n            'Upload' => 'Завантажити',\n            'Drop File Here' => 'Перенесіть файл сюди',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'plugins' => array(\n            'Plugins' => '插件',\n            'Name' => '名称',\n            'Actions' => '操作',\n            'Description' => '描述',\n            'Installed' => '已安装',\n            'Install New' => '安装新插件',\n            'Delete' => '删除',\n            'Delete plugin :plugin' => '删除插件 :plugin',\n            'This plugin does not exist' => '此插件不存在',\n            'Version' => '版本',\n            'Author' => '作者',\n            'Get More Plugins' => '获取更多插件',\n            'Install' => '安装',\n            'Uninstall' => '卸载',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/plugins/plugins.admin.php",
    "content": "<?php\n\nStylesheet::add('plugins/box/filesmanager/css/style.css', 'backend', 11);\nJavascript::add('plugins/box/filesmanager/js/fileuploader.js', 'backend', 11);\nJavascript::add('plugins/box/plugins/js/plugins.js', 'backend', 11);\n\n// Add plugin navigation link\nNavigation::add(__('Plugins', 'plugins'), 'extends', 'plugins', 1);\n\n// Add action on admin_pre_render hook\nAction::add('admin_pre_render','PluginsAdmin::_readmeLoadAjax');\n\n/**\n * Plugins Admin\n */\nclass PluginsAdmin extends Backend\n{\n\n    /**\n     * Plugins admin\n     */\n    public static function main()\n    {\n        // Get siteurl\n        $site_url = Option::get('siteurl');\n\n        // Get installed plugin from $plugins array\n        $installed_plugins = Plugin::$plugins;\n\n        // Get installed users plugins\n        $_users_plugins = array();\n        foreach (Plugin::$plugins as $plugin) {\n            if ($plugin['privilege'] !== 'box') $_users_plugins[] = $plugin['id'];\n        }\n\n        // Get plugins table\n        $plugins = new Table('plugins');\n\n        // Delete plugin\n        // -------------------------------------\n        if (Request::get('delete_plugin')) {\n\n            if (Security::check(Request::get('token'))) {\n\n                // Nobody cant remove box plugins\n                if ($installed_plugins[Text::lowercase(str_replace(\"Plugin\", \"\", Request::get('delete_plugin')))]['privilege'] !== 'box') {\n\n                    // Run plugin uninstaller file\n                    $plugin_name = Request::get('delete_plugin');\n                    if (File::exists(PLUGINS . DS . $plugin_name . DS .'install' . DS . $plugin_name . '.uninstall.php')) {\n                        include PLUGINS . DS . $plugin_name . DS . 'install' . DS . $plugin_name . '.uninstall.php';\n                    }\n\n                    // Clean Monstra TMP folder.\n                    Monstra::cleanTmp();\n\n                    // Increment Styles and Javascript version\n                    Stylesheet::stylesVersionIncrement();\n                    Javascript::javascriptVersionIncrement();\n\n                    // Delete plugin form plugins table\n                    $plugins->deleteWhere('[name=\"'.Request::get('delete_plugin').'\"]');\n\n                    // Redirect\n                    Request::redirect('index.php?id=plugins');\n                }\n\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Install new plugin\n        // -------------------------------------\n        if (Request::get('install')) {\n\n            if (Security::check(Request::get('token'))) {\n\n                // Load plugin install xml file\n                $plugin_xml = XML::loadFile(PLUGINS . DS . basename(Text::lowercase(Request::get('install')), '.manifest.xml') . DS . 'install' . DS . Request::get('install'));\n\n                // Add plugin to plugins table\n                $plugins->insert(array('name'     => basename(Request::get('install'), '.manifest.xml'),\n                                       'location' => (string) $plugin_xml->plugin_location,\n                                       'status'   => (string) $plugin_xml->plugin_status,\n                                       'priority' => (int) $plugin_xml->plugin_priority));\n\n                // Clean Monstra TMP folder.\n                Monstra::cleanTmp();\n\n                Stylesheet::stylesVersionIncrement();\n                Javascript::javascriptVersionIncrement();\n\n                // Run plugin installer file\n                $plugin_name = str_replace(array(\"Plugin\", \".manifest.xml\"), \"\", Request::get('install'));\n                if (File::exists(PLUGINS . DS .basename(Text::lowercase(Request::get('install')), '.manifest.xml') . DS . 'install' . DS . $plugin_name . '.install.php')) {\n                    include PLUGINS . DS . basename(Text::lowercase(Request::get('install')), '.manifest.xml') . DS . 'install' . DS . $plugin_name . '.install.php';\n                }\n\n                Request::redirect('index.php?id=plugins');\n\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Delete plugin from server\n        // -------------------------------------\n        if (Request::get('delete_plugin_from_server')) {\n\n            if (Security::check(Request::get('token'))) {\n\n                // Clean Monstra TMP folder.\n                Monstra::cleanTmp();\n                \n                Stylesheet::stylesVersionIncrement();\n                Javascript::javascriptVersionIncrement();\n\n                Dir::delete(PLUGINS . DS . basename(Request::get('delete_plugin_from_server'), '.manifest.xml'));\n                Request::redirect('index.php?id=plugins');\n\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n        }\n\n\n        // Upload & extract plugin archive\n        // -------------------------------------\n        if (Request::post('upload_file')) {\n\n            if (Security::check(Request::post('csrf'))) {\n\n                if ($_FILES['file']) {\n                    if (in_array(File::ext($_FILES['file']['name']), array('zip'))) {\n\n                        $tmp_dir = ROOT . DS .'tmp'. DS . uniqid('plugin_');\n\n                        $error = 'Plugin was not uploaded';\n\n                        if (Dir::create($tmp_dir)) {\n                            $file_locations = Zip::factory()->extract($_FILES['file']['tmp_name'], $tmp_dir);\n                            if (!empty($file_locations)) {\n\n                                $manifest = '';\n                                foreach ($file_locations as $filepath) {\n                                    if (substr($filepath, -strlen('.manifest.xml')) === '.manifest.xml') {\n                                        $manifest = $filepath;\n                                        break;\n                                    }\n                                }\n\n                                if (!empty($manifest) && basename(dirname($manifest)) === 'install') {\n                                    $manifest_file = pathinfo($manifest, PATHINFO_BASENAME);\n                                    $plugin_name = str_replace('.manifest.xml', '', $manifest_file);\n\n                                    if (Dir::create(PLUGINS . DS . $plugin_name)) {\n                                        $tmp_plugin_dir = dirname(dirname($manifest));\n                                        Dir::copy($tmp_plugin_dir, PLUGINS . DS . $plugin_name);\n                                        Notification::set('success', __('Plugin was uploaded', 'plugins'));\n                                        $error = false;\n                                    }\n                                }\n                            }\n                        } else {\n                            $error = 'System error';\n                        }\n                    } else {\n                        $error = 'Forbidden plugin file type';\n                    }\n                } else {\n                    $error = 'Plugin was not uploaded';\n                }\n\n                if ($error) {\n                    Notification::set('error', __($error, 'plugins'));\n                }\n\n                if (Request::post('dragndrop')) {\n                    Request::shutdown();\n                } else {\n                    Request::redirect($site_url.'/admin/index.php?id=plugins#installnew');\n                }\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Installed plugins\n        $plugins_installed = array();\n\n        // New plugins\n        $plugins_new = array();\n\n        // Plugins to install\n        $plugins_to_intall = array();\n\n        // Scan plugins directory for .manifest.xml\n        $plugins_new = File::scan(PLUGINS, '.manifest.xml');\n\n        // Get installed plugins from plugins table\n        $plugins_installed = $plugins->select(null, 'all', null, array('location', 'priority'), 'priority', 'ASC');\n\n        // Update $plugins_installed array. extract plugins names\n        foreach ($plugins_installed as $plg) {\n            $_plg[] = basename($plg['location'], 'plugin.php').'manifest.xml';\n        }\n\n        // Diff\n        $plugins_to_install = array_diff($plugins_new, $_plg);\n\n        // Create array of plugins to install\n        $count = 0;\n        foreach ($plugins_to_install as $plugin) {\n            $plg_path = PLUGINS . DS . Text::lowercase(basename($plugin, '.manifest.xml')) . DS . 'install' . DS . $plugin;\n            if (file_exists($plg_path)) {\n                $plugins_to_intall[$count]['path']   = $plg_path;\n                $plugins_to_intall[$count]['plugin'] = $plugin;\n                $count++;\n            }\n        }\n\n        // Draw template\n        View::factory('box/plugins/views/backend/index')\n                ->assign('installed_plugins', $installed_plugins)\n                ->assign('plugins_to_intall', $plugins_to_intall)\n                ->assign('_users_plugins', $_users_plugins)\n                ->assign('fileuploader', array(\n                    'uploadUrl' => $site_url.'/admin/index.php?id=plugins',\n                    'csrf'      => Security::token(),\n                    'errorMsg'  => __('Upload server error', 'filesmanager')\n                ))\n                ->display();\n    }\n\n    /**\n     * _readmeLoadAjax\n     */\n    public static function _readmeLoadAjax() {\n        if (Request::post('readme_plugin')) {\n            if (File::exists($file = PLUGINS . DS . Request::post('readme_plugin') . DS . 'README.md')) {\n                echo Text::toHtml(markdown(Html::toText(File::getContent($file))));\n            } else {\n                echo __('README.md not found', 'plugins');\n            }\n            Request::shutdown();\n        }\n    }\n\n}\n"
  },
  {
    "path": "plugins/box/plugins/plugins.plugin.php",
    "content": "<?php\n\n/**\n *\tPlugins manger plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Plugins', 'plugins'),\n                __('Plugins manager', 'plugins'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {\n\n    // Include Admin\n    Plugin::admin('plugins', 'box');\n\n}\n"
  },
  {
    "path": "plugins/box/plugins/views/backend/index.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('Plugins', 'plugins'); ?></h2>\n\n<div class=\"tabbable mobile-nav-tabs\">\n\n    <!-- Plugins_tabs -->\n    <ul class=\"nav nav-tabs\">\n        <li class=\"active\"><a href=\"#installed\" data-toggle=\"tab\"><?php echo __('Installed', 'plugins'); ?></a></li>\n        <li><a href=\"#installnew\" data-toggle=\"tab\"><?php echo __('Install New', 'plugins'); ?> <?php if (count($plugins_to_intall) > 0) { ?><span class=\"badge\"><?php echo count($plugins_to_intall); ?></span><?php } ?></a></li>\n        <li><a href=\"http://monstra.org/download/plugins\" target=\"_blank\"><?php echo __('Get More Plugins', 'plugins'); ?></a></li>\n    </ul>\n    <!-- /Plugins_tabs -->\n\n    <div class=\"tab-content\">\n\n        <div class=\"tab-pane active\" id=\"installed\">\n            <div class=\"table-responsive\">\n            <table class=\"table table-bordered\">\n                <thead>\n                    <tr>\n                        <th><?php echo __('Name', 'plugins'); ?></th>\n                        <th class=\"hidden-phone\"><?php echo __('Description', 'plugins'); ?></th>\n                        <th><?php echo __('Author', 'plugins'); ?></th>\n                        <th><?php echo __('Version', 'plugins'); ?></th>\n                        <th></th>\n                    </tr>\n                </thead>\n                <tbody>\n                    <?php foreach ($installed_plugins as $plugin) { if ($plugin['privilege'] !== 'box') { ?>\n                    <tr>\n                        <td>\n                            <?php echo $plugin['title']; ?>\n                        </td>\n                        <td class=\"hidden-phone\">\n                           <?php echo $plugin['description']; ?>\n                        </td>\n                        <td>\n                           <a target=\"_blank\" href=\"<?php echo $plugin['author_uri']; ?>\"><?php echo $plugin['author']; ?></a>\n                        </td>\n                        <td>\n                            <?php echo $plugin['version']; ?>\n                        </td>\n                        <td>\n                            <div class=\"pull-right\">\n                            <?php if (File::exists(PLUGINS . DS . $plugin['id'] . DS . 'README.md')) { ?>\n                            <?php echo Html::anchor(__('Info', 'plugins'),\n                                       '#',\n                                       array('class' => 'btn btn-info hidden-sm hidden-md readme_plugin', 'data-toggle' => 'modal', 'data-target' => '#readme', 'readme_plugin' => $plugin['id']));\n                            ?>\n                            <?php } ?>\n                            <?php echo Html::anchor(__('Uninstall', 'plugins'),\n                                       'index.php?id=plugins&delete_plugin='.$plugin['id'].'&token='.Security::token(),\n                                       array('class' => 'btn btn-danger', 'onclick' => \"return confirmDelete('\".__('Delete plugin :plugin', 'plugins', array(':plugin' => $plugin['title'])).\"')\"));\n                            ?>\n                            </div>\n                        </td>\n                    </tr>\n                    <?php } } ?>\n                </tbody>\n            </table>\n            </div>\n        </div>\n\n         <div class=\"tab-pane\" id=\"installnew\">\n            <div class=\"table-responsive\">\n            <table class=\"table table-bordered\">\n                <thead>\n                    <tr>\n                        <th><?php echo __('Name', 'plugins'); ?></th>\n                        <th class=\"hidden-phone\"><?php echo __('Description', 'plugins'); ?></th>\n                        <th><?php echo __('Author', 'plugins'); ?></th>\n                        <th><?php echo __('Version', 'plugins'); ?></th>\n                        <th></th>\n                    </tr>\n                </thead>\n                <tbody>\n\n                    <?php foreach ($plugins_to_intall as $plug) { $plugin_xml = XML::loadFile($plug['path']); ?>\n                    <tr>\n                        <td>\n                            <?php echo $plugin_xml->plugin_name; ?>\n                        </td>\n                        <td class=\"hidden-phone\">\n                           <?php echo $plugin_xml->plugin_description; ?>\n                        </td>\n                        <td>\n                           <a href=\"<?php echo $plugin_xml->plugin_author_uri; ?>\"><?php echo $plugin_xml->plugin_author; ?></a>\n                        </td>\n                        <td>\n                            <?php echo $plugin_xml->plugin_version; ?>\n                        </td>\n                        <td>\n                            <div class=\"pull-right\">\n                            <?php if (File::exists(PLUGINS . DS . basename($plug['plugin'], '.manifest.xml') . DS . 'README.md')) { ?>\n                            <?php echo Html::anchor(__('Info', 'plugins'),\n                                       '#',\n                                       array('class' => 'btn btn-info readme_plugin', 'data-toggle' => 'modal', 'data-target' => '#readme', 'readme_plugin' => basename($plug['plugin'], '.manifest.xml')));\n                            ?>\n                            <?php } ?>\n                            <?php echo Html::anchor(__('Install', 'plugins'), 'index.php?id=plugins&install='.$plug['plugin'].'&token='.Security::token(), array('class' => 'btn btn-primary')); ?>\n                            <?php echo Html::anchor(__('Delete', 'plugins'),\n                                       'index.php?id=plugins&delete_plugin_from_server='.Text::lowercase(basename($plug['path'],'.manifest.xml')).'&token='.Security::token(),\n                                       array('class' => 'btn btn-danger', 'onclick' => \"return confirmDelete('\".__('Delete plugin :plugin', 'plugins', array(':plugin' => $plugin_xml->plugin_name)).\"')\"));\n                             ?>\n                            </div>\n                        </td>\n                    </tr>\n                    <?php } ?>\n                </tbody>\n            </table>\n            </div>\n\n\t\t <?php if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN'): ?>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\techo (\n\t\t\t\t\t\t\tForm::open(null, array('enctype' => 'multipart/form-data', 'class' => 'form-inline')).\n\t\t\t\t\t\t\tForm::hidden('csrf', Security::token())\n\t\t\t\t\t\t);\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"fileinput fileinput-new pull-left\" data-provides=\"fileinput\">\n\t\t\t\t\t\t<span class=\"btn btn-default btn-file\"><span class=\"fileinput-new\"><?php echo __('Select file', 'filesmanager'); ?></span><span class=\"fileinput-exists\"><?php echo __('Change', 'filesmanager'); ?></span><input type=\"file\" name=\"file\"></span>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\techo (\n\t\t\t\t\t\t\t\t\tForm::submit('upload_file', __('Upload', 'plugins'), array('class' => 'btn btn-primary')).\n\t\t\t\t\t\t\t\t\tForm::close()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t<span class=\"fileinput-filename\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"DgDfileUploader\">\n\t\t\t\t\t\t<div class=\"upload-area\">\n\t\t\t\t\t\t\t<div class=\"upload-progress\"></div>\n\t\t\t\t\t\t\t<div class=\"upload-file-pholder\"><?php echo __('Drop File Here', 'plugins'); ?></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"upload-file-info\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t <?php endif; ?>\n\n        </div>\n        <!-- /Plugins_to_install_list -->\n\n    </div>\n\n</div>\n\n<script>\n    $(document).ready(function () {\n        $('.readme_plugin').click(function() {\n            $.ajax({\n                type:\"post\",\n                data:\"readme_plugin=\"+$(this).attr('readme_plugin'),\n                url: \"<?php echo Site::url(); ?>/admin/index.php?id=plugins\",\n                success: function(data){\n                    $('#readme .modal-body').html(data);\n                }\n            });\n        });\n\t\t$.monstra.fileuploader.init($.extend({}, {uploaderId:'DgDfileUploader'}, <?php echo json_encode($fileuploader); ?>));\n\t\t$(document).on('uploaded.fuploader', function(){\n\t\t\tlocation.href = $.monstra.fileuploader.conf.uploadUrl +'#installnew';\n\t\t\twindow.location.reload(true);\n\t\t});\n    });\n</script>\n\n\n<!-- Modal -->\n<div class=\"modal fade\" id=\"readme\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">\n  <div class=\"modal-dialog\">\n    <div class=\"modal-content\">\n      <div class=\"modal-header\">\n        <div class=\"close\" data-dismiss=\"modal\">&times;</div>\n        <h4 class=\"modal-title\" id=\"myModalLabel\">README.md</h4>\n      </div>\n      <div class=\"modal-body\"></div>\n    </div>\n  </div>\n</div>\n"
  },
  {
    "path": "plugins/box/sitemap/install/sitemap.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/sitemap/sitemap.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>10</plugin_priority>\n    <plugin_name>Sitemap</plugin_name>\n    <plugin_description>Show sitemap</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/sitemap/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Mapa webu',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Sitemap',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Sitemap',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Mapa del sitio',\n        )\n    );"
  },
  {
    "path": "plugins/box/sitemap/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'نقشه سایت',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/fr.lang.php",
    "content": "<?php\n    \n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Plan du site',\n        )\n    );"
  },
  {
    "path": "plugins/box/sitemap/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Oldaltérkép',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Sitemap',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'サイトマップ',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'საიტის რუქა',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Sitemap',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Sitemap',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Mapa witryny',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Mapa do site',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Карта сайта',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Mapa webstánky',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/sr.lang.php",
    "content": "<?php\n    \n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Mapa sajta',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Site Haritası',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => 'Мапа сайту',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'sitemap' => array(\n            'Sitemap' => '网站地图',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/sitemap/sitemap.plugin.php",
    "content": "<?php\n\n/**\n *\tSitemap plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Sitemap', 'sitemap'),\n                __('Sitemap plugin', 'sitemap'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                'sitemap',\n                'box');\n\n// Add actions\nAction::add('admin_pages_action_add', 'Sitemap::create');\nAction::add('admin_pages_action_edit', 'Sitemap::create');\nAction::add('admin_pages_action_clone', 'Sitemap::create');\nAction::add('admin_pages_action_delete', 'Sitemap::create');\n\n/**\n * Sitemap class\n */\nclass Sitemap extends Frontend\n{\n    /**\n     * Forbidden components\n     *\n     * @var array\n     */\n    public static $forbidden_components = array('pages', 'sitemap');\n\n    /**\n     * Sitemap Title\n     *\n     * @return string\n     */\n    public static function title()\n    {\n        return __('Sitemap', 'sitemap');\n    }\n\n    /**\n     * Sitemap template\n     */\n    public static function template()\n    {\n        return 'index';\n    }\n\n   /**\n    * Get sitemap content\n    */\n   public static function content()\n   {\n        // Display view\n        return View::factory('box/sitemap/views/frontend/index')\n                      ->assign('pages_list', Pages::getPages())\n                      ->assign('components', Sitemap::getComponents())\n                      ->render();\n    }\n\n    /**\n     * Create sitemap\n     */\n    public static function create()\n    {\n        // Get pages list\n        $pages_list = Pages::getPages();\n\n        // Create sitemap content\n        $map  = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.\"\\n\";\n        $map .= '<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">'.\"\\n\";\n        foreach ($pages_list as $page) {\n            if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '0.5'; } else { $parent = ''; $priority = '1.0'; }\n            $map .= \"\\t\".'<url>'.\"\\n\\t\\t\".'<loc>'.Option::get('siteurl').'/'.$parent.$page['slug'].'</loc>'.\"\\n\\t\\t\".'<lastmod>'.date(\"Y-m-d\", (int) $page['date']).'</lastmod>'.\"\\n\\t\\t\".'<changefreq>weekly</changefreq>'.\"\\n\\t\\t\".'<priority>'.$priority.'</priority>'.\"\\n\\t\".'</url>'.\"\\n\";\n        }\n\n        // Get list of components\n        $components = Sitemap::getComponents();\n\n        // Add components to sitemap\n        if (count($components) > 0) {\n            foreach ($components as $component) {\n                $map .= \"\\t\".'<url>'.\"\\n\\t\\t\".'<loc>'.Option::get('siteurl').'/'.Text::lowercase($component).'</loc>'.\"\\n\\t\\t\".'<lastmod>'.date(\"Y-m-d\", time()).'</lastmod>'.\"\\n\\t\\t\".'<changefreq>weekly</changefreq>'.\"\\n\\t\\t\".'<priority>1.0</priority>'.\"\\n\\t\".'</url>'.\"\\n\";\n            }\n        }\n\n        // Close sitemap\n        $map .= '</urlset>';\n\n        // Save sitemap\n        return File::setContent(ROOT . DS . 'sitemap.xml', $map);\n    }\n\n    /**\n     * Get components\n     */\n    protected static function getComponents()\n    {\n        $components = array();\n\n        if (count(Plugin::$components) > 0) {\n            foreach (Plugin::$components as $component) {\n                if ( ! in_array($component, Sitemap::$forbidden_components)) $components[] = Text::lowercase($component);\n            }\n        }\n\n        return $components;\n    }\n\n}\n"
  },
  {
    "path": "plugins/box/sitemap/views/frontend/index.view.php",
    "content": "\n<ul>\n<?php\n\n    $sitemap_html = '';\n    \n    // Display pages\n    if (count($pages_list) > 0) {\n        $children_started = false;\n        $first = true;\n        foreach ($pages_list as $page) {\n            \n            if (trim($page['parent']) === '' && $children_started) { \n                $children_started = false;\n                $sitemap_html .= \"</li></ul></li>\\n\";\n            } elseif(!$first && (trim($page['parent']) !== '' && $children_started || trim($page['parent']) === '')) {\n                $sitemap_html .= \"</li>\\n\";\n            }\n        \n            if (trim($page['parent']) !== '') $parent = $page['parent'].'/'; else $parent = '';\n            if (trim($page['parent']) !== '' && !$children_started) { \n                $children_started = true;\n                $sitemap_html .= \"<ul>\\n\"; \n            }\n            $sitemap_html .= '<li><a href=\"'.Option::get('siteurl').'/'.$parent.$page['slug'].'\">'.$page['title'].'</a>';\n            $first = false;\n        }\n        if (trim($page['parent']) === '' && $children_started) { \n            $sitemap_html .= \"</li></ul></li>\\n\"; \n        } else {\n            $sitemap_html .= \"</li>\\n\";\n        }\n    }\n\n\n\n    // Display components\n    if (count($components) > 0) {\n        foreach ($components as $component) {\n            $sitemap_html .= '<li><a href=\"'.Option::get('siteurl').'/'.$component.'\">'.__(ucfirst($component), $component).'</a></li>'.\"\\n\";\n        }\n    }\n\n    echo $sitemap_html;\n\n?>\n</ul>\n"
  },
  {
    "path": "plugins/box/snippets/install/snippets.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/snippets/snippets.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>6</plugin_priority>\n    <plugin_name>Snippets</plugin_name>\n    <plugin_description>Snippets manager plugin</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/snippets/js/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/box/snippets/js/snippets.js",
    "content": "if (typeof $.monstra == 'undefined') $.monstra = {};\n\n$.monstra.snippets = {\n\n    init: function() { },\n\n    showEmbedCodes: function(name) {\n        $('#shortcode').html('{snippet get=\"'+name+'\"}');\n        $('#phpcode').html('&lt;?php echo Snippet::get(\"'+name+'\"); ?&gt;');\n        $('#embedCodes').modal();\n    }\n\n};\n\n\n$(document).ready(function(){\n    $.monstra.snippets.init();\n});"
  },
  {
    "path": "plugins/box/snippets/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Snippets / doplňky',\n            'Snippets manager' => 'Manažer Snippets',\n            'Actions' => 'Akce',\n            'Delete' => 'Vymazat',\n            'Edit' => 'Editovat',\n            'Name' => 'Název',\n            'Create New Snippet' => 'Vytvořit nový snippet',\n            'New Snippet' => 'Nový snippet',\n            'Edit Snippet' => 'Editovat snippet',\n            'Save' => 'Uložit',\n            'Save and Exit' => 'Uložit a ukončit',\n            'This snippet already exists' => 'Tento snippet už existuje',\n            'This snippet does not exist' => 'Tento snippet neexistuje',\n            'Delete snippet: :snippet' => 'Vymazat snippet: :snippet',\n            'Snippet content' => 'Obsah snippetu',\n            'Snippet <i>:name</i> deleted' => 'Snippet <i>:name</i> byl vymazaný',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Vaše změny ve snippetu <i>:name</i> byly uložené.',\n            'Delete snippet: :snippet' => 'Vymazat snippet: :snippet',\n            'Required field' => 'Povinné políčko',\n            'View Embed Code' => 'Zobrazit vložený kód',\n            'Embed Code' => 'Vložený Kód',\n            'Shortcode' => 'Zkrácený kód',\n            'PHP Code' => 'PHP Kód',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Snippets',\n            'Snippets manager' => 'Snippet Manager',\n            'Actions' => 'Aktionen',\n            'Delete' => 'Löschen',\n            'Edit' => 'Bearbeiten',\n            'Name' => 'Name',\n            'Create New Snippet' => 'Erstelle neues Snippet',\n            'New Snippet' => 'Neues Snippet',\n            'Edit Snippet' => 'Bearbeite Snippet',\n            'Save' => 'Speichern',\n            'Save and Exit' => 'Speichern und Schließen',\n            'This field should not be empty' => 'Dieses Feld darf nicht leer sein',\n            'This snippet already exists' => 'Dieses Snippet existiert bereits',\n            'This snippet does not exist' => 'Dieses Snippet existiert nicht',\n            'Delete snippet: :snippet' => 'Lösche Snippet: :snippet',\n            'Snippet content' => 'Snippet Inhalt',\n            'Snippet <i>:name</i> deleted' => 'Snippet <i>:name</i> wurde gelöscht',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Deine Änderungen für das Snippet <i>:name</i> wurden gespeichert.',\n            'Delete snippet: :snippet' => 'Lösche Snippet: :snippet',\n            'Required field' => 'Pflichtfeld',\n            'View Embed Code' => 'Zeige Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Abbrechen',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Snippets',\n            'Snippets manager' => 'Snippets manager',\n            'Actions' => 'Actions',\n            'Delete' => 'Delete',\n            'Edit' => 'Edit',\n            'Name' => 'Name',\n            'Create New Snippet' => 'Create New Snippet',\n            'New Snippet' => 'New Snippet',\n            'Edit Snippet' => 'Edit Snippet',\n            'Save' => 'Save',\n            'Save and Exit' => 'Save and Exit',\n            'This snippet already exists' => 'This snippet already exists',\n            'This snippet does not exist' => 'This snippet does not exist',\n            'Delete snippet: :snippet' => 'Delete snippet: :snippet',\n            'Snippet content' => 'Snippet content',\n            'Snippet <i>:name</i> deleted' => 'Snippet <i>:name</i> deleted',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Your changes to the snippet <i>:name</i> have been saved.',\n            'Delete snippet: :snippet' => 'Delete snippet: :snippet',\n            'Required field' => 'Required field',\n            'View Embed Code' => 'View Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Snippets',\n            'Snippets manager' => 'Administrador de snippets',\n            'Actions' => 'Acciones',\n            'Delete' => 'Eliminar',\n            'Edit' => 'Editar',\n            'Name' => 'Nombre',\n            'Create New Snippet' => 'Crear nuevo snippet',\n            'New Snippet' => 'Nuevo snippet',\n            'Edit Snippet' => 'Editar snippet',\n            'Save' => 'Guardar',\n            'Save and Exit' => 'Guardar y salir',\n            'This snippet already exists' => 'Este snippet ya existe',\n            'This snippet does not exist' => 'Este snippet no existe',\n            'Delete snippet: :snippet' => 'Eliminar snippet: :snippet',\n            'Snippet content' => 'Contenido del snippet',\n            'Snippet <i>:name</i> deleted' => 'Snippet <i>:name</i> eliminado',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Tus cambios realizados en el snippet <i>:name</i> han sido guardados.',\n            'Delete snippet: :snippet' => 'Eliminar snippet: :snippet',\n            'Required field' => 'Dato requerido',\n            'View Embed Code' => 'Ver código incrustado',\n            'Embed Code' => 'Código incrustado',\n            'Shortcode' => 'Código corto',\n            'PHP Code' => 'Código PHP',\n            'Cancel' => 'Cancelar',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'کدآماده',\n            'Snippets manager' => 'مدیریت کدآماده',  \n            'Actions' => 'عملیات',\n            'Delete' => 'حذف',\n            'Edit' => 'ویرایش',\n            'Name' => 'نام',\n            'Create New Snippet' => 'ایجاد کد آماده جدید',\n            'New Snippet' => 'کدآماده جدید',\n            'Edit Snippet' => 'ویرایش کدآماده',        \n            'Save' => 'ذخیره',        \n            'Save and Exit' => 'ذخیره و خروج', \n            'This snippet already exists' => 'این کدآماده از قبل موجود است',\n            'This snippet does not exist' => 'این کدآماده وجود ندارد',\n            'Delete snippet: :snippet' => 'حذف کدآماده: :snippet',\n            'Snippet content' => 'محتوی کدآماده',\n            'Snippet <i>:name</i> deleted' => 'کدآماده <i>:name</i> حذف شد',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'تغییرات شما بر روی کدآماده <i>:name</i> ذخیره شد.',\n            'Delete snippet: :snippet' => 'حذف کدآماده: :snippet',\n            'Required field' => 'کادر الزامی',\n            'View Embed Code' => 'مشاهده کد درج شده',\n            'Embed Code' => 'کد درج شده', \n            'Shortcode' => 'کدکوتاه',\n            'PHP Code' => 'کد PHP',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Snippets',\n            'Snippets manager' => 'Gestionnaire de snippets',  \n            'Actions' => 'Actions',\n            'Delete' => 'Supprimer',\n            'Edit' => 'Editer',\n            'Name' => 'Nom',\n            'Create new snippet' => 'Créer un nouveau snippet',\n            'New snippet' => 'Nouveau snippet',\n            'Edit snippet' => 'Editer le snippet',        \n            'Save' => 'Enregistrer',        \n            'Save and exit' => 'Enregistrer et sortir',        \n            'This snippet already exists' => 'Ce snippet existe déjà',\n            'This snippet does not exist' => 'Ce snippet n\\\\\\'existe pas',\n            'Delete snippet: :snippet' => 'Supprimer le snippet: :snippet',\n            'Snippet content' => 'Contenu du snippet',\n            'Snippet <i>:name</i> deleted' => 'Snippet <i>:name</i> supprimé',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Vos changements pour le snippet <i>:name</i> ont été enregistrés.',\n            'Delete snippet: :snippet' => 'Supprimer le snippet: :snippet',\n            'Required field' => 'Champs requis',\n            'View Embed Code' => 'Voir le code intégré',\n            'Embed Code' => 'Code intégré', \n            'Shortcode' => 'Code court',\n            'PHP Code' => 'Code PHP',\n            'Cancel' => 'Cancel',\n        )\n    );"
  },
  {
    "path": "plugins/box/snippets/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Snippets',\n            'Snippets manager' => 'Snippets manager',\n            'Actions' => 'Műveletek',\n            'Delete' => 'Töröl',\n            'Edit' => 'Szerkeszt',\n            'Name' => 'Név',\n            'Create New Snippet' => 'Új Snippet készítése',\n            'New Snippet' => 'Új Snippet',\n            'Edit Snippet' => 'Snippet szerkesztése',\n            'Save' => 'Mentés',\n            'Save and Exit' => 'Mentés és Kilépés',\n            'This snippet already exists' => 'Ez a snippet már létezik',\n            'This snippet does not exist' => 'Ez a snippet nem létezik',\n            'Delete snippet: :snippet' => 'Snippet törlés: :snippet',\n            'Snippet content' => 'Snippet tartalom',\n            'Snippet <i>:name</i> deleted' => 'A <i>:name</i> Snippet törölve',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'YA változtatások <i>:name</i> elmentve.',\n            'Delete snippet: :snippet' => 'Snippet törlés: :snippet',\n            'Required field' => 'Kötelező mező',\n            'View Embed Code' => 'View Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Snippets',\n            'Snippets manager' => 'Pengelolaan Snippets',\n            'Actions' => 'Tindakan',\n            'Delete' => 'Hapus',\n            'Edit' => 'Perbaiki',\n            'Name' => 'Nama',\n            'Create New Snippet' => 'Buat Snippet Baru',\n            'New Snippet' => 'Snippet Baru',\n            'Edit snippet' => 'Perbaiki Snippet',\n            'Save' => 'Simpan',\n            'Save and Exit' => 'Simpan dan Keluar',\n            'This snippet already exists' => 'Snippet ini sudah ada',\n            'This snippet does not exist' => 'Snippet ini belum ada',\n            'Delete snippet: :snippet' => 'Hapus snippet: :snippet',\n            'Snippet content' => 'Isi snippet',\n            'Snippet <i>:name</i> deleted' => 'Snippet <i>:name</i> dihapus',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Perubahan pada snippet <i>:name</i> telah disimpan.',\n            'Delete snippet: :snippet' => 'Hapus snippet: :snippet',\n            'Required field' => 'Isian yang Diperlukan',\n            'View Embed Code' => 'Lihat Kodingan yang Disisipkan',\n            'Embed Code' => 'Kode Sisipan',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Snippet',\n            'Snippets manager' => 'Gestione snippet',\n            'Actions' => 'Azioni',\n            'Delete' => 'Elimina',\n            'Edit' => 'Modifica',\n            'New Snippet' => 'Nuovo snippet',\n            'Create New Snippet' => 'Crea nuovo snippet',\n            'Name' => 'Nome',\n            'Edit Snippet' => 'Modifica snippet',\n            'Save' => 'Salva',\n            'Save and Exit' => 'Salva ed esci',\n            'This snippet already exists' => 'Tale snippet già esistente',\n            'This snippet does not exist' => 'Tale snippet non esiste',\n            'Delete snippet: :block' => 'Elimina snippet: :snippet',\n            'Snippet content' => 'Contenuto del snippet',\n            'Snippet <i>:name</i> deleted' => 'Snippet <i>:name</i> eliminato',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Le modifiche al snippet <i>:name</i> sono state salvate.',\n            'Delete snippet: :snippet' => 'Elimina snippet: :snippet',\n            'Required field' => 'Campo obbligatorio',\n            'View Embed Code' => 'View Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'スニペット',\n            'Snippets manager' => 'スニペットの管理',\n            'Actions' => '操作',\n            'Delete' => '削除',\n            'Edit' => '編集',\n            'Name' => '名前',\n            'Create New Snippet' => '新規スニペットの作成',\n            'New Snippet' => '新規スニペット',\n            'Edit Snippet' => 'スニペットの編集',\n            'Save' => '保存',\n            'Save and Exit' => '保存して終了',\n            'This snippet already exists' => 'スニペットはすでに存在しています',\n            'This snippet does not exist' => 'スニペットは存在しません',\n            'Delete snippet: :snippet' => 'スニペットの削除: :snippet',\n            'Snippet content' => 'スニペットの内容',\n            'Snippet <i>:name</i> deleted' => '<i>:name</i> スニペットは削除されました。',\n            'Your changes to the snippet <i>:name</i> have been saved.' => '<i>:name</i> スニペットへの変更は保存されました。',\n            'Delete snippet: :snippet' => 'スニペットの削除: :snippet',\n            'Required field' => '必須項目',\n            'View Embed Code' => '埋め込みコードを表示',\n            'Embed Code' => '埋め込みコード',\n            'Shortcode' => 'ショートコード',\n            'PHP Code' => 'PHPコード',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Snippet-ები',\n            'Snippets manager' => 'Snippet-ების მენეჯერი',\n            'Actions' => 'მოქმედება',\n            'Delete' => 'წაშლა',\n            'Edit' => 'რედაქტირება',\n            'New Snippet' => 'ახალი Snippet-ი',\n            'Create New Snippet' => 'ახალი Snippet-ის შექმნა',\n            'Name' => 'სახელწოდება',\n            'Edit Snippet' => 'Snippet-ის რედაქტირება',\n            'Save' => 'შენახვა',\n            'Save and Exit' => 'შენახვა და შემდეგ გამოსვლა',\n            'This snippet already exists' => 'ასეთი Snippet-ი უკვე არსებობს',\n            'This snippet does not exist' => 'ასეთი Snippet-ი არ არსებობს',\n            'Delete snippet: :block' => 'Snippet-ის წაშლა: :snippet',\n            'Snippet content' => 'Snippet-ის შედგენილობა',\n            'Snippet <i>:name</i> deleted' => 'Snippet-ი <i>:name</i> წაშლილია',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'თქვენი ცვლილებები Snippet-ის მიმართ <i>:name</i> შენახულია.',\n            'Delete snippet: :snippet' => 'Snippet-ის წაშლა: :snippet',\n            'Required field' => 'აუცილებელი ველი',\n            'View Embed Code' => 'ჩასაწერი კოდი',\n            'Embed Code' => 'ჩასაწერი კოდი',\n            'Shortcode' => 'Shortcode-ი',\n            'PHP Code' => 'PHP კოდი',\n            'Cancel' => 'გაუქმება',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Fragmentai',\n            'Snippets manager' => 'Fragmentų tvarkyklė',\n            'Actions' => 'Veiksmai',\n            'Delete' => 'Ištrinti',\n            'Edit' => 'Redaguoti',\n            'Name' => 'Pavadinimas',\n            'Create New Snippet' => 'Kurti naują fragmentą',\n            'New Snippet' => 'Naujas fragmentas',\n            'Edit Snippet' => 'Redaguoti fragmentą',\n            'Save' => 'Išsaugoti',\n            'Save and Exit' => 'Išsaugoti ir išeiti',\n            'Required field' => 'Privalomas laukas',\n            'This snippet already exists' => 'Toks fragmentas jau yra',\n            'This snippet does not exist' => 'Tokio fragmento nėra',\n            'Delete snippet: :snippet' => 'Ištrinti fragmentą :snippet',\n            'Snippet content' => 'Fragmento turinys',\n            'Snippet <i>:name</i> deleted' => 'Fragmentas <i>:name</i> ištrintas',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Fragmento <i>:name</i> pakeitimai išsaugoti.',\n            'View Embed Code' => 'View Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Snippets',\n            'Snippets manager' => 'Snippet Beheer',\n            'Actions' => 'Acties',\n            'Delete' => 'Verwijderen',\n            'Edit' => 'Bewerken',\n            'Name' => 'Naam',\n            'Create New Snippet' => 'Nieuwe Snippet',\n            'New Snippet' => 'Nieuwe snippet',\n            'Edit Snippet' => 'Bewerk snippet',\n            'Save' => 'Opslaan',\n            'Save and Exit' => 'Opslaan en Terug',\n            'This field should not be empty' => 'Dit veld mag niet leeg zijn',\n            'This snippet already exists' => 'Deze snippet bestaat al',\n            'This snippet does not exist' => 'Deze snippet bestaat niet',\n            'Delete snippet: :snippet' => 'Verwijder snippet: :snippet',\n            'Snippet content' => 'Snippet inhoud',\n            'Snippet <i>:name</i> deleted' => 'Snippet <i>:name</i> is verwijderd',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'De wijzigingen aan snippet <i>:name</i> zijn opgeslagen.',\n            'Delete snippet: :snippet' => 'Verwijder snippet: :snippet',\n            'Required field' => 'Vereist veld',\n            'View Embed Code' => 'Bekijk Insluitcode',\n            'Embed Code' => 'Insluitcode',\n            'Shortcode' => 'Korte code',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Skrawki (snippets)',\n            'Snippets manager' => 'Zarządzaj skrawkami',\n            'Actions' => 'Akcje',\n            'Delete' => 'Usuń',\n            'Edit' => 'Edytuj',\n            'Name' => 'Nazwa',\n            'Create New Snippet' => 'Utwórz nowy skrawek',\n            'New Snippet' => 'Nowy skrawek',\n            'Edit Snippet' => 'Edytuj skrawek',\n            'Save' => 'Zapisz',\n            'Save and Exit' => 'Zapisz i wyjdź',\n            'This snippet already exists' => 'Ten skrawek już istnieje',\n            'This snippet does not exist' => 'Ten skrawek nie istnieje',\n            'Delete snippet: :snippet' => 'Czy napewno usunąć skrawek: :snippet',\n            'Snippet content' => 'Zawartość skrawka',\n            'Snippet <i>:name</i> deleted' => 'Skrawek <i>:name</i> został usunięty',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Twoje zmiany dla skrawka <i>:name</i> zostały zapisane.',\n            'Delete snippet: :snippet' => 'Czy napewno usunąć skrawek: :snippet',\n            'Required field' => 'Pole wymagane',\n            'View Embed Code' => 'Pokaż osadzony kod',\n            'Embed Code' => 'Osadzony kod',\n            'Shortcode' => 'Krótki kod (shortcode)',\n            'PHP Code' => 'Kod PHP',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Códigos',\n            'Snippets manager' => 'Gerenciador de códigos',\n            'Actions' => 'Ações',\n            'Delete' => 'Deletar',\n            'Edit' => 'Editar',\n            'Name' => 'Nome',\n            'Create New Snippet' => 'Criar novo código',\n            'New Snippet' => 'Novo código',\n            'Edit Snippet' => 'Editar código',\n            'Save' => 'Salvar',\n            'Save and Exit' => 'Salvar e sair',\n            'This field should not be empty' => 'Este campo não pode estar vazio',\n            'This snippet already exists' => 'Este código já existe',\n            'This snippet does not exist' => 'Este código não existe',\n            'Delete snippet: :snippet' => 'Deletar o código: :snippet',\n            'Snippet content' => 'Conteúdo do código',\n            'Snippet <i>:name</i> deleted' => 'Código <i>:name</i> deletado',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Suas alterações no código <i>:name</i> foram salvas',\n            'Delete snippet: :snippet' => 'Deletar o código: :snippet',\n            'Required field' => 'Campo requerido',\n            'View Embed Code' => 'View Embed Code',\n            'Embed Code' => 'Embed Code',\n            'Shortcode' => 'Shortcode',\n            'PHP Code' => 'PHP Code',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Сниппеты',\n            'Snippets manager' => 'Менеджер сниппетов',\n            'Actions' => 'Действия',\n            'Delete' => 'Удалить',\n            'Edit' => 'Редактировать',\n            'New Snippet' => 'Новый сниппет',\n            'Create New Snippet' => 'Создать новый сниппет',\n            'Name' => 'Название',\n            'Edit Snippet' => 'Редактирование сниппета',\n            'Save' => 'Сохранить',\n            'Save and Exit' => 'Сохранить и выйти',\n            'This snippet already exists' => 'Такой сниппет уже существует',\n            'This snippet does not exist' => 'Такого сниппета не существует',\n            'Delete snippet: :block' => 'Удалить сниппет: :snippet',\n            'Snippet content' => 'Содержимое сниппета',\n            'Snippet <i>:name</i> deleted' => 'Сниппет <i>:name</i> удален',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Ваши изменения к сниппету <i>:name</i> были сохранены.',\n            'Delete snippet: :snippet' => 'Удалить сниппет: :snippet',\n            'Required field' => 'Обязательное поле',\n            'View Embed Code' => 'Код для вставки',\n            'Embed Code' => 'Код для вставки',\n            'Shortcode' => 'Шорткод',\n            'PHP Code' => 'PHP код',\n            'Cancel' => 'Отмена',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Snippets / Doplnky',\n            'Snippets manager' => 'Manažér Snippets',\n            'Actions' => 'Akcie',\n            'Delete' => 'Vymazať',\n            'Edit' => 'Editovať',\n            'Name' => 'Názov',\n            'Create New Snippet' => 'Vytvoriť nový snippet',\n            'New Snippet' => 'Nový snippet',\n            'Edit Snippet' => 'Editovať snippet',\n            'Save' => 'Uložiť',\n            'Save and Exit' => 'Uložiť a ukončiť',\n            'This snippet already exists' => 'Tento snippet už existuje',\n            'This snippet does not exist' => 'Tento snippet neexistuje',\n            'Delete snippet: :snippet' => 'Vymazať snippet: :snippet',\n            'Snippet content' => 'Obsah snippet',\n            'Snippet <i>:name</i> deleted' => 'Snippet <i>:name</i> bol vymazaný',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Vaše zmeny v snippet <i>:name</i> boli uložené.',\n            'Delete snippet: :snippet' => 'Vymazať snippet: :snippet',\n            'Required field' => 'Povinné políčko',\n            'View Embed Code' => 'Pozrieť vložený kód',\n            'Embed Code' => 'Vložený Kód',\n            'Shortcode' => 'Skrátený kód',\n            'PHP Code' => 'PHP Kód',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Klipovi',\n            'Snippets manager' => 'Menadžer klipova',  \n            'Actions' => 'Akcije',\n            'Delete' => 'Obriši',\n            'Edit' => 'Izmeni',\n            'Name' => 'Ime',\n            'Create new snippet' => 'Kreiraj novi klip',\n            'New snippet' => 'Novi klip',\n            'Edit snippet' => 'Izmeni klip',        \n            'Save' => 'Sačuvaj',        \n            'Save and exit' => 'Sačuvaj i izađi',        \n            'This snippet already exists' => 'Ovaj klip već postoji',\n            'This snippet does not exist' => 'Ovaj klip ne postoji',\n            'Delete snippet: :snippet' => 'Obriši klip: :snippet',\n            'Snippet content' => 'Sadržaj klipa',\n            'Snippet <i>:name</i> deleted' => 'Klip <i>:name</i> je uspešno obrisan',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Promene na klipu <i>:name</i> su uspešno sačuvane.',\n            'Delete snippet: :snippet' => 'Obriši klipove: :snippet',\n            'Required field' => 'Potrebno polje',\n            'View Embed Code' => 'Pogledaj Embed Kod',\n            'Embed Code' => 'Embed kod', \n            'Shortcode' => 'Kratak kod',\n            'PHP Code' => 'PHP kod',\n            'Cancel' => 'Otkaži',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Betikler',\n            'Snippets manager' => 'Betik Yöneticisi',\n            'Actions' => 'İşlemler',\n            'Delete' => 'Sil',\n            'Edit' => 'Düzenle',\n            'Name' => 'Ad',\n            'Create New Snippet' => 'Yeni Betik Oluştur',\n            'New Snippet' => 'Yeni Betik',\n            'Edit Snippet' => 'Betiği Düzenle',\n            'Save' => 'Kaydet',\n            'Save and Exit' => 'Kaydet ve Çık',\n            'This snippet already exists' => 'Bu betik zaten var',\n            'This snippet does not exist' => 'Betik bulunamadı',\n            'Delete snippet: :snippet' => ':snippet adlı betik silinsin mi',\n            'Snippet content' => 'Betik içeriği',\n            'Snippet <i>:name</i> deleted' => '<i>:name</i> adlı betik silindi',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Değişiklikleriniz <i>:name</i> adlı betiğe kaydedildi.',\n            'Required field' => 'Zorunlu alan',\n            'View Embed Code' => 'Gömülü Kodu Görüntüle',\n            'Embed Code' => 'Gömülü Kod',\n            'Shortcode' => 'Kısa Kod',\n            'PHP Code' => 'PHP Kodu',\n            'Cancel' => 'Vazgeç',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => 'Сніпети',\n            'Snippets manager' => 'Менеджер сніпетів',\n            'Actions' => 'Дії',\n            'Delete' => 'Видалити',\n            'Edit' => 'Редагувати',\n            'New Snippet' => 'Новий сніпет',\n            'Create New Snippet' => 'Створити новий сніпет',\n            'Name' => 'Назва',\n            'Edit Snippet' => 'Редагування  сніпета',\n            'Save' => 'Зберегти',\n            'Save and Exit' => 'Зберегти та вийти',\n            'This snippet already exists' => 'Такий сніпет вже існує',\n            'This snippet does not exist' => 'Такий сніпет не існує',\n            'Delete snippet: :block' => 'Видалити сніпет: :snippet',\n            'Snippet content' => 'Вміст сніпета',\n            'Snippet <i>:name</i> deleted' => 'Сніпет <i>:name</i> видалено',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Ваші зміни до сніпету <i>:name</i> були збережені.',\n            'Delete snippet: :snippet' => 'Видалити сніпет: :snippet',\n            'Required field' => 'Обов’язкове поле',\n            'View Embed Code' => 'Код для вставки',\n            'Embed Code' => 'Код для вставки',\n            'Shortcode' => 'Шорткод',\n            'PHP Code' => 'PHP код',\n            'Cancel' => 'Відмінити',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'snippets' => array(\n            'Snippets' => '片段',\n            'Snippets manager' => '片段管理',\n            'Actions' => '操作',\n            'Delete' => '删除',\n            'Edit' => '编辑',\n            'Name' => '名称',\n            'Create New Snippet' => '创建新片段',\n            'New Snippet' => '新建片段',\n            'Edit Snippet' => '编辑片段',\n            'Save' => '保存',\n            'Save and Exit' => '保存并退出',\n            'This snippet already exists' => '此片段已存在',\n            'This snippet does not exist' => '此片段不存在',\n            'Delete snippet: :snippet' => '删除片段: :snippet',\n            'Snippet content' => '片段内容',\n            'Snippet <i>:name</i> deleted' => '片段 <i>:name</i> 已删除',\n            'Your changes to the snippet <i>:name</i> have been saved.' => 'Y您修改的片段 <i>:name</i> 已保存。',\n            'Delete snippet: :snippet' => '删除片段: :snippet',\n            'Required field' => '必填字段',\n            'View Embed Code' => '查看嵌入代码',\n            'Embed Code' => '嵌入代码',\n            'Shortcode' => '短代码',\n            'PHP Code' => 'PHP 代码',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/snippets/snippets.admin.php",
    "content": "<?php\n\n// Add plugin navigation link\nNavigation::add(__('Snippets', 'snippets'), 'extends', 'snippets', 3);\nDashboard::addNewItem('snippets', __('Snippets', 'snippets'), 'index.php?id=snippets&action=add_snippet', 3);\n\n/**\n * Snippets Admin Class\n */\nclass SnippetsAdmin extends Backend\n{\n    /**\n     * Snippets admin function\n     */\n    public static function main()\n    {\n        // Init vars\n        $snippets_path = STORAGE . DS  . 'snippets' . DS;\n        $snippets_list = array();\n        $errors      = array();\n\n        // Check for get actions\n         // -------------------------------------\n        if (Request::get('action')) {\n\n            // Switch actions\n             // -------------------------------------\n            switch (Request::get('action')) {\n\n                // Add snippet\n                // -------------------------------------\n                case \"add_snippet\":\n                    if (Request::post('add_snippets') || Request::post('add_snippets_and_exit')) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['snippets_empty_name'] = __('Required field', 'snippets');\n                            if (file_exists($snippets_path.Security::safeName(Request::post('name')).'.snippet.php')) $errors['snippets_exists'] = __('This snippet already exists', 'snippets');\n\n                            if (count($errors) == 0) {\n\n                                // Save snippet\n                                File::setContent($snippets_path.Security::safeName(Request::post('name')).'.snippet.php', Request::post('content'));\n\n                                Notification::set('success', __('Your changes to the snippet <i>:name</i> have been saved.', 'snippets', array(':name' => Security::safeName(Request::post('name')))));\n\n                                if (Request::post('add_snippets_and_exit')) {\n                                    Request::redirect('index.php?id=snippets');\n                                } else {\n                                    Request::redirect('index.php?id=snippets&action=edit_snippet&filename='.Security::safeName(Request::post('name')));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n                    // Save fields\n                    if (Request::post('name')) $name = Request::post('name'); else $name = '';\n                    if (Request::post('content')) $content = Request::post('content'); else $content = '';\n\n                    // Display view\n                    View::factory('box/snippets/views/backend/add')\n                            ->assign('content', $content)\n                            ->assign('name', $name)\n                            ->assign('errors', $errors)\n                            ->display();\n                break;\n\n                // Edit snippet\n                // -------------------------------------\n                case \"edit_snippet\":\n                    // Save current snippet action\n                    if (Request::post('edit_snippets') || Request::post('edit_snippets_and_exit') ) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['snippets_empty_name'] = __('Required field', 'snippets');\n                            if ((file_exists($snippets_path.Security::safeName(Request::post('name')).'.snippet.php')) and (Security::safeName(Request::post('snippets_old_name')) !== Security::safeName(Request::post('name')))) $errors['snippets_exists'] = __('This snippet already exists', 'snippets');\n\n                            // Save fields\n                            if (Request::post('content')) $content = Request::post('content'); else $content = '';\n                            if (count($errors) == 0) {\n\n                                $snippet_old_filename = $snippets_path.Request::post('snippets_old_name').'.snippet.php';\n                                $snippet_new_filename = $snippets_path.Security::safeName(Request::post('name')).'.snippet.php';\n                                if ( ! empty($snippet_old_filename)) {\n                                    if ($snippet_old_filename !== $snippet_new_filename) {\n                                        rename($snippet_old_filename, $snippet_new_filename);\n                                        $save_filename = $snippet_new_filename;\n                                    } else {\n                                        $save_filename = $snippet_new_filename;\n                                    }\n                                } else {\n                                    $save_filename = $snippet_new_filename;\n                                }\n\n                                // Save snippet\n                                File::setContent($save_filename, Request::post('content'));\n\n                                Notification::set('success', __('Your changes to the snippet <i>:name</i> have been saved.', 'snippets', array(':name' => basename($save_filename, '.snippet.php'))));\n\n                                if (Request::post('edit_snippets_and_exit')) {\n                                    Request::redirect('index.php?id=snippets');\n                                } else {\n                                    Request::redirect('index.php?id=snippets&action=edit_snippet&filename='.Security::safeName(Request::post('name')));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n                    if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));\n                    $content = File::getContent($snippets_path.Request::get('filename').'.snippet.php');\n\n                    // Display view\n                    View::factory('box/snippets/views/backend/edit')\n                            ->assign('content', $content)\n                            ->assign('name', $name)\n                            ->assign('errors', $errors)\n                            ->display();\n                break;\n                case \"delete_snippet\":\n\n                    if (Security::check(Request::get('token'))) {\n\n                        File::delete($snippets_path.Request::get('filename').'.snippet.php');\n                        Notification::set('success', __('Snippet <i>:name</i> deleted', 'snippets', array(':name' => File::name(Request::get('filename')))));\n                        Request::redirect('index.php?id=snippets');\n\n                    } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n                break;\n            }\n        } else {\n\n            // Get snippets\n            $snippets_list = File::scan($snippets_path, '.snippet.php');\n\n            // Display view\n            View::factory('box/snippets/views/backend/index')\n                    ->assign('snippets_list', $snippets_list)\n                    ->display();\n\n        }\n    }\n\n}\n"
  },
  {
    "path": "plugins/box/snippets/snippets.plugin.php",
    "content": "<?php\n\n/**\n *\tSnippets plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Snippets', 'snippets'),\n                __('Snippets manager plugin', 'snippets'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\nif (Session::exists('user_role') && in_array(Session::get('user_role'),array('admin'))) {\n\n    // Include Admin\n    Plugin::admin('snippets', 'box');\n\n}\n\n// Add Plugin Javascript\nJavascript::add('plugins/box/snippets/js/snippets.js', 'backend');\n\n// Add shortcode {snippet}\nShortcode::add('snippet', 'Snippet::_content');\n\n/**\n * Snippet class\n */\nclass Snippet\n{\n    /**\n     * Get snippet\n     *\n     *  <code>\n     *      echo Snippet::get('snippetname');\n     *      echo Snippet::get('snippetname', array('message' => 'Hello World'));\n     *  </code>\n     *\n     * @param  string $name Snippet file name\n     * @param  string $vars Vars\n     * @return string\n     */\n    public static function get($name, $vars = array())\n    {\n        $vars['get'] = $name;\n\n        return Snippet::_content($vars);\n    }\n\n    /**\n     * Returns snippet content for shortcode {snippet get=\"snippetname\"}\n     *\n     *  <code>\n     *      {snippet get=\"snippetname\"}\n     *      {snippet get=\"snippetname\" message=\"Hello World\"}\n     *  </code>\n     *\n     * @param  array  $attributes Array of attributes\n     * @return string\n     */\n    public static function _content($attributes)\n    {\n        // Extracst attributes\n        extract($attributes);\n\n        // Get snippet name\n        $name = (isset($get)) ? (string) $get : '';\n\n        // Get snippet path\n        $snippet_path = STORAGE . DS . 'snippets' . DS . $name . '.snippet.php';\n\n        // Get snippet content\n        if (File::exists($snippet_path)) {\n\n            // Turn on output buffering\n            ob_start();\n\n            // Include view file\n            include $snippet_path;\n\n            // Output...\n            return ob_get_clean();\n\n        } else {\n            if (Session::exists('admin') && Session::get('admin') == true) {\n                return __('<b>Snippet <u>:name</u> is not found!</b>', 'snippets', array(':name' => $name));\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "plugins/box/snippets/views/backend/add.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('New Snippet', 'snippets'); ?></h2>\n\n<?php if (isset($errors['snippets_empty_name']) or isset($errors['snippets_exists'])) $error_class = 'error'; else $error_class = ''; ?>\n\n<?php echo (Form::open(null, array('class' => 'form-horizontal'))); ?>\n\n<?php echo (Form::hidden('csrf', Security::token())); ?>\n\n<?php echo (Form::label('name', __('Name', 'snippets'))); ?>\n<div class=\"input-group\">\n    <?php echo (Form::input('name', $name, array('class' => (isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'form-control error-field' : 'form-control'))); ?><span class=\"input-group-addon\">.snippet.php</span>\n</div>\n\n<?php\n    if (isset($errors['snippets_empty_name'])) echo '<span class=\"error-message\">'.$errors['snippets_empty_name'].'</span>';\n    if (isset($errors['snippets_exists'])) echo '<span class=\"error-message\">'.$errors['snippets_exists'].'</span>';\n?>\n\n<div class=\"margin-top-2 margin-bottom-2\">\n<?php\n    echo (\n       Form::label('content', __('Snippet content', 'snippets')).\n       Form::textarea('content', $content, array('style' => 'width:100%;height:400px;', 'class'=>'source-editor form-control'))\n    );\n?>\n</div>\n\n<?php\n    echo (\n       Form::submit('add_snippets_and_exit', __('Save and Exit', 'snippets'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n       Form::submit('add_snippets', __('Save', 'snippets'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n       Html::anchor(__('Cancel', 'snippets'), 'index.php?id=snippets', array('title' => __('Cancel', 'snippets'), 'class' => 'btn btn-phone btn-default')).\n       Form::close()\n    );\n?>"
  },
  {
    "path": "plugins/box/snippets/views/backend/edit.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('Edit Snippet', 'snippets'); ?></h2>\n\n<?php\n    if ($content !== null) {\n\n        if (isset($errors['snippets_empty_name']) or isset($errors['snippets_exists'])) $error_class = 'error'; else $error_class = '';\n\n        echo (Form::open(null, array('class' => 'form-horizontal')));\n\n        echo (Form::hidden('csrf', Security::token()));\n\n        echo (Form::hidden('snippets_old_name', Request::get('filename')));\n\n?>\n\n    <?php echo (Form::label('name', __('Name', 'snippets'))); ?>\n\n        <div class=\"input-group\">\n            <?php echo (Form::input('name', $name, array('class' => (isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'form-control error-field' : 'form-control'))); ?><span class=\"input-group-addon\">.snippet.php</span>\n        </div>\n\n        <?php\n            if (isset($errors['snippets_empty_name'])) echo '<span class=\"error-message\">'.$errors['snippets_empty_name'].'</span>';\n            if (isset($errors['snippets_exists'])) echo '<span class=\"error-message\">'.$errors['snippets_exists'].'</span>';\n        ?>\n\n<div class=\"margin-top-2 margin-bottom-2\">\n<?php\n  echo (\n      Form::label('content', __('Snippet content', 'snippets')).\n      Form::textarea('content', Html::toText($content), array('style' => 'width:100%;height:400px;', 'class' => 'source-editor form-control'))\n  );\n?>\n</div>\n\n<?php\n        echo (\n           Form::submit('edit_snippets_and_exit', __('Save and Exit', 'snippets'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n           Form::submit('edit_snippets', __('Save', 'snippets'), array('class' => 'btn btn-phone btn-primary')). Html::nbsp(2).\n           Html::anchor(__('Cancel', 'snippets'), 'index.php?id=snippets', array('title' => __('Cancel', 'snippets'), 'class' => 'btn btn-phone btn-default')).\n           Form::close()\n        );\n\n    } else {\n        echo '<div class=\"message-error\">'.__('This snippet does not exist', 'snippets').'</div>';\n    }\n?>\n"
  },
  {
    "path": "plugins/box/snippets/views/backend/index.view.php",
    "content": "<div class=\"vertical-align margin-bottom-1\">\n    <div class=\"text-left row-phone\">\n        <h2><?php echo __('Snippets', 'snippets'); ?></h2>\n    </div>\n    <div class=\"text-right row-phone\">\n        <?php\n            echo (\n                Html::anchor(__('Create New Snippet', 'snippets'), 'index.php?id=snippets&action=add_snippet', array('title' => __('Create New Snippet', 'snippets'), 'class' => 'btn btn-phone btn-primary'))\n            );\n        ?>\n    </div>\n</div>\n\n<!-- Snippets_list -->\n<table class=\"table table-bordered\">\n    <thead>\n        <tr>\n            <th><?php echo __('Snippets', 'snippets'); ?></th>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n    <?php if (count($snippets_list) != 0) foreach ($snippets_list as $snippet) { ?>\n    <tr>\n        <td><?php echo basename($snippet, '.snippet.php'); ?></td>\n        <td>\n            <div class=\"pull-right\">            \n                <div class=\"btn-group\">\n                    <?php echo Html::anchor(__('Edit', 'snippets'), 'index.php?id=snippets&action=edit_snippet&filename='.basename($snippet, '.snippet.php'), array('class' => 'btn btn-primary')); ?>\n                    <button type=\"button\" class=\"btn btn-primary dropdown-toggle\" data-toggle=\"dropdown\">\n                        <span class=\"caret\"></span>\n                        <span class=\"sr-only\">Toggle Dropdown</span>\n                    </button>\n                    <ul class=\"dropdown-menu\" role=\"menu\">\n                        <li><?php echo Html::anchor(__('View Embed Code', 'snippets'), 'javascript:;', array('title' => __('View Embed Code', 'snippets'), 'onclick' => '$.monstra.snippets.showEmbedCodes(\"'.basename($snippet, '.snippet.php').'\");')); ?></li>\n                    </ul>\n                </div>   \n                <?php echo Html::anchor(__('Delete', 'snippets'),\n                    'index.php?id=snippets&action=delete_snippet&filename='.basename($snippet, '.snippet.php').'&token='.Security::token(),\n                    array('class' => 'btn btn-danger', 'onclick' => \"return confirmDelete('\".__('Delete snippet: :snippet', 'snippets', array(':snippet' => basename($snippet, '.snippet.php'))).\"')\"));\n                ?>\n            </div>\n        </td>\n    </tr>\n    <?php } ?>\n    </tbody>\n</table>\n<!-- /Snippets_list -->\n\n<div class=\"modal fade\" id=\"embedCodes\"> \n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <div class=\"close\" data-dismiss=\"modal\">&times;</div>\n                <h4 class=\"modal-title\"><?php echo __('Embed Code', 'snippets'); ?></h4>\n            </div>\n            <div class=\"modal-body\">\n                <b><?php echo __('Shortcode', 'snippets'); ?></b><br>\n                <pre><code id=\"shortcode\"></code></pre>\n                <br>\n                <b><?php echo __('PHP Code', 'snippets'); ?></b><br>\n                <pre><code id=\"phpcode\"></code></pre>\n            </div>\n        </div>\n    </div>\n</div>"
  },
  {
    "path": "plugins/box/system/install/system.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/system/system.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>4</plugin_priority>\n    <plugin_name>System</plugin_name>\n    <plugin_description>Monstra System plugin</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/system/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Systém',\n            'Published a new version of the :monstra' => 'Byla vydaná nová verze :monstra',\n            'Sitemap Created' => 'Mapa webu byla vytvořená',\n            'Create Sitemap' => 'Vytvořit mapu webu',\n            'on' => 'Zapnout',\n            'off'=> 'Vypnout',\n            'Site url' => 'URL webu',\n            'Maintenance Mode' => 'Údržba webu',\n            'Maintenance Mode On' => 'Zapnout údržbu webu',\n            'Maintenance Mode Off' => 'Vypnout údržbu webu',\n            'Site Settings' => 'Nastavení webu',\n            'System Settings' => 'Nastavení systému',\n            'Site Name' => 'Název webu',\n            'Site Description' => 'Popis webu',\n            'Site Keywords' => 'Klíčová slova webu',\n            'Site Slogan' => 'Slogan webu',\n            'Default Page' => 'Úvodní stránka',\n            'Time zone' => 'Časové pásmo',\n            'Language' => 'Jazyk',\n            'Email' => 'Email',\n            'Save' => 'Uložit',\n            'System version' => 'Verze systému',\n            'System version ID' => 'ID verze systému',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Ladění',\n            'Plugin API' => 'Plugin API',\n            'Plugins active' => 'Aktivní pluginy',\n            'Actions registered' => 'Registrované akce',\n            'Filters registered' => 'Registrované filtry',\n            'Core' => 'Jádro',\n            'Delete Temporary Files' => 'Vymazat dočasné soubory',\n            'Download the latest version' => 'Stáhnout nejnovější verzi',\n            'Powered by' => 'Beží na',\n            'Administration' => 'Administrace',\n            'Settings' => 'Nastavení',\n            'Temporary files deleted' => 'Dočasné soubory byly odstraněny',\n            'Extends' => 'Rozšírení',\n            'View Site' => 'Zobrazit web',\n            'Welcome, :username' => 'Vítej, :username',\n            'Reset Password' => 'Obnovit heslo',\n            'Back to Website' => 'Zpět na web',\n            'Forgot your password ?' => 'Zapomněli jste heslo?',\n            'Administration' => 'Administrace',\n            'Send New Password' => 'Zaslat nové heslo',\n            'This user does not exist' => 'Tento uživatel neexistuje',\n            'Version' => 'Verze',\n            'Plugin does not exist' => 'Plugin neexistuje',\n\n            'Install script writable' => 'Instalační skript je zapisovatelný',\n            'Install script not writable' => 'Instalační skript není zapisovatelný',\n            'Directory: <b> :dir </b> writable' => 'Adresář: <b> :dir </b> je zapisovatelný',\n            'Directory: <b> :dir </b> not writable' => 'Adresář: <b> :dir </b> není zapisovatelný',\n            'PHP Version' => 'Verze PHP',\n            'Module DOM is installed' => 'Modul DOM je nainstalovaný',\n            'Module DOM is required' => 'Modul DOM je vyžadovaný',\n            'Module Mod Rewrite is installed' => 'Modul Apache Rewrite je nainstalovaný',\n            'Module SimpleXML is installed' => 'Modul SimpleXML je nainstalovaný',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 alebo vyšší je vyžadovaný',\n            'Apache Mod Rewrite is required' => 'Modul Apache Rewrite je vyžadovaný',\n            'SimpleXML module is required' => 'SimpleXML modul je vyžadovaný',\n            'Field \"Site name\" is empty' => 'Políčko \"Název webu\" je prázdné',\n            'Field \"Email\" is empty' => 'Políčko \"Email\" je prázdné',\n            'Field \"Username\" is empty' => 'Políčko \"Používateľ\" je prázdné',\n            'Field \"Password\" is empty' => 'Políčko \"Heslo\" je prázdné',\n            'Field \"Site url\" is empty' => 'Políčko \"URL webu\" je prázdné',\n            'Email not valid' => 'Email není ve správném tvaru',\n            'Install' => 'Instalovat',\n            '...Monstra says...' => '...Monstra říká...',\n            'Sitemap file writable' => 'Soubor sitemap je zapisovatelný',\n            'Sitemap file not writable' => 'Soubor sitemap není zapisovatelný',\n            'Main .htaccess file writable' => 'Hlavní soubor .htaccess je zapisovatelný',\n            'Main .htaccess file not writable' => 'Hlavní soubor .htaccess není zapisovatelný',\n            'Official Support Forum' => 'Oficiální podpora - Fórum',\n            'Documentation' => 'Dokumentace',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'System',\n            'Published a new version of the :monstra' => 'Veröffentlicht eine neue Version von :monstra',\n            'Sitemap created' => 'Sitemap wurde erstellt',\n            'Create Sitemap' => 'Erstelle Sitemap',\n            'on' => 'An',\n            'off'=> 'Aus',\n            'Site Url' => 'Seiten-URL',\n            'Maintenance Mode' => 'Wartungsmodus',\n            'Maintenance Mode On' => 'Wartungsmodus An',\n            'Maintenance Mode Off' => 'Wartungsmodus Aus',\n            'Site Settings' => 'Seiteneinstellungen',\n            'System Settings' => 'Systemeinstellungen',\n            'Site Name' => 'Seiten-Name',\n            'Site Description' => 'Seiten-Beschreibung',\n            'Site Keywords' => 'Seiten-Schlagwörter',\n            'Site Slogan' => 'Seiten-Slogan',\n            'Default Page' => 'Standardseite',\n            'Time zone' => 'Zeitzone',\n            'Language' => 'Sprache',\n            'Email' => 'Email',\n            'Save' => 'Speichern',\n            'Site' => 'Seite',\n            'System version' => 'Systemversion',\n            'System version ID' => 'Systemversions ID',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Fehlerbeseitigung',\n            'Plugin API' => 'Plugin API',\n            'Plugins active' => 'Plugins aktiv',\n            'Actions registered' => 'Aktionen registriert',\n            'Filters registered' => 'Filter registriert',\n            'Log Out' => 'Log Out',\n            'Site' => 'Seite',\n            'Delete Temporary Files' => 'Temporäre Dateien löschen',\n            'Download the latest version' => 'Lade die letzte Version herunter',\n            'Powered by' => 'Powered by',\n            'Administration' => 'Administration',\n            'Settings' => 'Einstellungen',\n            'Temporary files deleted' => 'Temporäre Dateien wurden gelöscht',\n            'Extends' => 'Erweitert',\n            'View Site' => 'Seite ansehen',\n            'Welcome, :username' => 'Willkommen, :username',\n            'Reset Password' => 'Password zurücksetzen',\n            'Back to Website' => 'Zurück zur Webseite',\n            'Forgot your password ?' => 'Passwort vergessen ?',\n            'Administration' => 'Administration',\n            'Send New Password' => 'Neues Passwort zusenden',\n            'This user does not exist' => 'Dieser Benutzer existiert nicht',\n            'Version' => 'Version',\n\n            'Install script writable' => 'Installationsskript beschreibbar',\n            'Install script not writable' => 'Installationsskript nicht beschreibbar',\n            'Directory: <b> :dir </b> writable' => 'Ordner: <b> :dir </b> beschreibbar',\n            'Directory: <b> :dir </b> not writable' => 'Ordner: <b> :dir </b> nicht beschreibbar',\n            'PHP Version' => 'PHP Version',\n            'Module DOM is installed' => 'Modul DOM ist installiert',\n            'Module DOM is required' => 'Modul DOM ist erforderlich',\n            'Module Mod Rewrite is installed' => 'Modul Mod Rewrite ist installiert',\n            'Module SimpleXML is installed' => 'Modul SimpleXML ist installiert',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 oder höher erforderlich',\n            'Apache Mod Rewrite is required' => 'Apache Mod Rewrite ist erforderlich',\n            'SimpleXML module is required' => 'SimpleXML-Modul ist erforderlich',\n            'Field \"Site name\" is empty' => 'Feld \"Seiten-Name\" ist leer',\n            'Field \"Email\" is empty' => 'Feld \"Email\" ist leer',\n            'Field \"Username\" is empty' => 'Feld \"Benutzername\" ist leer',\n            'Field \"Password\" is empty' => 'Feld \"Passwort\" ist leer',\n            'Field \"Site url\" is empty' => 'Feld \"Seiten-URL\" ist leer',\n            'Email not valid' => 'E-Mail ist ungültig',\n            'Install' => 'Installieren',\n            '...Monstra says...' => '...Monstra sagt...',\n            'Sitemap file writable' => 'Sitemap-Datei beschreibbar',\n            'Sitemap file not writable' => 'Sitemap-Datei ist nicht beschreibbar',\n            'Main .htaccess file writable' => 'Haupt .htaccess-Datei ist beschreibbar',\n            'Main .htaccess file not writable' => 'Haupt .htaccess-Datei ist nicht beschreibbar',\n            'Official Support Forum' => 'Offizielles Support Forum',\n            'Documentation' => 'Dokumentation',\n            'Your changes have been saved.' => 'Änderungen wurden gespeichert.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'System',\n            'Published a new version of the :monstra' => 'Published a new version of the :monstra',\n            'Sitemap created' => 'Sitemap created',\n            'Create Sitemap' => 'Create Sitemap',\n            'on' => 'on',\n            'off'=> 'off',\n            'Site Url' => 'Site Url',\n            'Maintenance Mode' => 'Maintenance Mode',\n            'Maintenance Mode On' => 'Maintenance Mode On',\n            'Maintenance Mode Off' => 'Maintenance Mode Off',\n            'Site Settings' => 'Site Settings',\n            'System Settings' => 'System Settings',\n            'Site Name' => 'Site Name',\n            'Site Description' => 'Site Description',\n            'Site Keywords' => 'Site Keywords',\n            'Site Slogan' => 'Site Slogan',\n            'Default Page' => 'Default Page',\n            'Time zone' => 'Time zone',\n            'Language' => 'Language',\n            'Email' => 'Email',\n            'Save' => 'Save',\n            'Site' => 'Site',\n            'System version' => 'System version',\n            'System version ID' => 'System version ID',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Debugging',\n            'Plugin API' => 'Plugin API',\n            'Plugins active' => 'Plugins active',\n            'Actions registered' => 'Actions registered',\n            'Filters registered' => 'Filters registered',\n            'Delete Temporary Files' => 'Delete Temporary Files',\n            'Download the latest version' => 'Download the latest version',\n            'Powered by' => 'Powered by',\n            'Administration' => 'Administration',\n            'Settings' => 'Settings',\n            'Temporary files deleted' => 'Temporary files deleted',\n            'Extends' => 'Extends',\n            'View Site' => 'View Site',\n            'Welcome, :username' => 'Welcome, :username',\n            'Reset Password' => 'Reset Password',\n            '< Back to Website' => '< Back to Website',\n            'Forgot your password? >' => 'Forgot your password? >',\n            'Administration >' => 'Administration >',\n            'Send New Password' => 'Send New Password',\n            'This user does not exist' => 'This user does not exist',\n            'Version' => 'Version',\n            'Plugin does not exist' => 'Plugin does not exist',\n            'Help' => 'Help',\n            \n            'Install script writable' => 'Install script writable',\n            'Install script not writable' => 'Install script not writable',\n            'Directory: <b> :dir </b> writable' => 'Directory: <b> :dir </b> writable',\n            'Directory: <b> :dir </b> not writable' => 'Directory: <b> :dir </b> not writable',\n            'PHP Version' => 'PHP Version',\n            'Module DOM is installed' => 'Module DOM is installed',\n            'Module DOM is required' => 'Module DOM is required',\n            'Module Mod Rewrite is installed' => 'Module Mod Rewrite is installed',\n            'Module SimpleXML is installed' => 'Module SimpleXML is installed',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 or greater is required',\n            'Apache Mod Rewrite is required' => 'Apache Mod Rewrite is required',\n            'SimpleXML module is required' => 'SimpleXML module is required',\n            'Field \"Site name\" is empty' => 'Field \"Site name\" is empty',\n            'Field \"Email\" is empty' => 'Field \"Email\" is empty',\n            'Field \"Username\" is empty' => 'Field \"Username\" is empty',\n            'Field \"Password\" is empty' => 'Field \"Password\" is empty',\n            'Field \"Site url\" is empty' => 'Field \"Site url\" is empty',\n            'Email not valid' => 'Email not valid',\n            'Continue' => 'Continue',\n            'Install' => 'Install',\n            '...Monstra says...' => '...Monstra says...',\n            'Sitemap file writable' => 'Sitemap file writable',\n            'Sitemap file not writable' => 'Sitemap file not writable',\n            'Main .htaccess file writable' => 'Main .htaccess file writable',\n            'Main .htaccess file not writable' => 'Main .htaccess file not writable',\n            'Official Support Forum' => 'Official Support Forum',\n            'Documentation' => 'Documentation',\n            'Your changes have been saved.' => 'Your changes have been saved.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Sistema',\n            'Published a new version of the :monstra' => 'Publicada una nueva versión de :monstra',\n            'Sitemap created' => 'Mapa del sitio creado',\n            'Create Sitemap' => 'Crear mapa del sitio',\n            'on' => 'Activar',\n            'off'=> 'Desactivar',\n            'Site Url' => 'URL del sitio',\n            'Maintenance Mode' => 'Modo mantenimiento',\n            'Maintenance Mode On' => 'Activar modo mantenimiento',\n            'Maintenance Mode Off' => 'Desactivar modo mantenimiento',\n            'Site Settings' => 'Configuración del sitio',\n            'System Settings' => 'Configuración del sistema',\n            'Site Name' => 'Nombre del sitio',\n            'Site Description' => 'Descripción del sitio',\n            'Site Keywords' => 'Palabras claves del sitio',\n            'Site Slogan' => 'Lema del sitio',\n            'Default Page' => 'Página por defecto',\n            'Time zone' => 'Zona horaria',\n            'Language' => 'Lenguaje',\n            'Email' => 'Correo electrónico',\n            'Save' => 'Guardar',\n            'Site' => 'Sitio',\n            'System Version' => 'Versión del sistema',\n            'System Version ID' => 'ID de versión web',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Depuración',\n            'Plugin API' => 'Plugin API',\n            'Plugins active' => 'Plugins activos',\n            'Actions registered' => 'Acciones registradas',\n            'Filters registered' => 'Filtros registrados',\n            'Delete Temporary Files' => 'Eliminar archivos temporales',\n            'Download the latest version' => 'Descargar versión más reciente',\n            'Powered by' => 'Powered by',\n            'Administration' => 'Administración',\n            'Settings' => 'Configuración',\n            'Temporary files deleted' => 'Archivos temporales eliminados',\n            'Extends' => 'Extensiones',\n            'View Site' => 'Ver sitio web',\n            'Welcome, :username' => 'Bienvenido, :username',\n            'Reset Password' => 'Restablecer Contraseña',\n            'Back to Website' => 'Regresar al sitio web',\n            'Forgot your password ?' => '¿Olvidaste tu contraseña?',\n            'Administration >' => 'Administración',\n            'Send New Password' => 'Enviar nueva contraseña',\n            'This user does not exist' => 'Este usuario no existe',\n            'Version' => 'Versión',\n\t    'Plugin does not exist' => 'El plugin no existe',\n            'Help' => 'Ayuda',\n            'Install script writable' => 'Instalación de scripts accesible',\n            'Install script not writable' => 'Instalación de scripts no accesible',\n            'Directory: <b> :dir </b> writable' => 'Directorio: <b> :dir </b> accesible',\n            'Directory: <b> :dir </b> not writable' => 'Directorio: <b> :dir </b> no accesible',\n            'PHP Version' => 'Versión PHP',\n            'Module DOM is installed' => 'El módulo DOM está instalado',\n            'Module DOM is required' => 'El módulo DOM es requerido',\n            'Module Mod Rewrite is installed' => 'El módulo Mod Rewrite está instalado',\n            'Module SimpleXML is installed' => 'El módulo SimpleXML está instalado',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 o superior es requerido',\n            'Apache Mod Rewrite is required' => 'Apache Mod Rewrite es requerido',\n            'SimpleXML module is required' => 'El Módulo SimpleXML es requerido',\n            'Field \"Site name\" is empty' => 'El campo \"Nombre del sitio\" está vacío',\n            'Field \"Email\" is empty' => 'El campo \"Correo electrónico\" está vacío',\n            'Field \"Username\" is empty' => 'El campo \"Nombre de usuario\" está vacío',\n            'Field \"Password\" is empty' => 'El campo \"Contraseña\" está vacío',\n            'Field \"Site url\" is empty' => 'El campo \"URL del sitio\" está vacío',\n            'Email not valid' => 'El correo electrónico es inválido',\n            'Continue' => 'Continuar',\n            'Install' => 'Instalar',\n            '...Monstra says...' => '...Monstra dice...',\n            'Sitemap file writable' => 'El archivo del mapa del sitio es accesible',\n            'Sitemap file not writable' => 'El archivo del mapa del sitio no es accesible',\n            'Main .htaccess file writable' => 'El archivo principal .htaccess es accesible',\n            'Main .htaccess file not writable' => 'El archivo principal .htaccess no es accesible',\n            'Official Support Forum' => 'Foro de Soporte Oficial',\n            'Documentation' => 'Documentación',\n            'Your changes have been saved.' => 'Tus cambios han sido guardados.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'سیستم',\n            'Published a new version of the :monstra' => 'نسخه جدید  :monstra منتشر شده',\n            'Sitemap created' => 'نقشه سایت ایجاد شد',\n            'Create Sitemap' => 'ایجاد نقشه سایت',\n            'on' => 'روشن',\n            'off'=> 'خاموش', \n            'Site Url' => 'آدرس سایت',\n            'Maintenance Mode' => 'حالت تعمیر و نگهداری',\n            'Maintenance Mode On' => 'حالت تعمیر و نگهداری روشن',\n            'Maintenance Mode Off' => 'حالت تعمیر و نگهداری خاموش',\n            'Site Settings' => 'تنظیمات سایت',\n            'System Settings' => 'تنظیمات سیستم',\n            'Site Name' => 'نام سایت',\n            'Site Description' => 'توضیحات سایت',\n            'Site Keywords' => 'کلمات کلیدی سایت',\n            'Site Slogan' => 'شعار سایت',\n            'Default Page' => 'صفحه پیشفرض',\n            'Time zone' => 'منطقه زمانی',\n            'Language' => 'زبان',\n            'Save' => 'ذخیره',\n            'Site' => 'سایت', \n            'System version' => 'نسخه سیستم',\n            'System version ID' => 'شناسه نسخه سیستم',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'اشکال زدائی',\n            'Plugin API' => 'API پلاگین',\n            'Plugins active' => 'پلاگینهای فعال', \n            'Actions registered' => 'عملیات ثبت شده',\n            'Filters registered' => 'فیلترهای ثبت شده',\n            'Delete Temporary Files' => 'حذف فایلهای موقت',\n            'Download the latest version' => 'دانلود جدیدترین نسخه',\n            'Powered by' => 'قدرت گرفته از',\n            'Administration' => 'مدیریت',\n            'Settings' => 'تنظیمات',\n            'Temporary files deleted' => 'فایلهای موقت حذف شدند',\n            'Extends' => 'گسترش',\n            'View site' => 'نمایش سایت',\n            'Welcome, :username' => 'خوش آمدید ، :username',\n            'Reset Password' => 'تنظیم مجدد پسورد',\n            '< Back to Website' => '< بازگشت به وبسایت',\n            'Forgot your password? >' => 'پسورد خود را فراموش کرده اید؟ >',\n            'Administration >' => 'مدیریت >',\n            'Send New Password' => 'ارسال پسورد جدید',\n            'This user does not exist' => 'این کاربر وجود ندارد',\n            'Version' => 'نسخه',\n            'Plugin does not exist' => 'پلاگین وجود ندارد',\n\n            'Install script writable' => 'اسکریپت نصب قابل نوشتن میباشد',\n            'Install script not writable' => 'اسکریپت نصب غیرقابل نوشتن میباشد',\n            'Directory: <b> :dir </b> writable' => 'شاخه: <b> :dir </b> قابل نوشتن میباشد',\n            'Directory: <b> :dir </b> not writable' => 'شاخه: <b> :dir </b> غیرقابل نوشتن میباشد',\n            'PHP Version' => 'نسخه PHP',\n            'Module DOM is installed' => 'ماژول DOM نصب شده است',\n            'Module DOM is required' => 'ماژول DOM مورد نیاز است',\n            'Module Mod Rewrite is installed' => 'ماژول Mod Rewrite نصب شده است',\n            'Module SimpleXML is installed' => 'ماژول SimpleXML نصب شده است',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 یا بالاتر مورد نیاز است',\n            'Apache Mod Rewrite is required' => 'Mod Rewrite آپاچی مورد نیاز است',\n            'SimpleXML module is required' => 'ماژول SimpleXML مورد نیاز است',\n            'Field \"Site name\" is empty' => 'کادر \"نام سایت\" خالی است',\n            'Field \"Email\" is empty' => 'کادر \"ایمیل\" خالی است',\n            'Field \"Username\" is empty' => 'کادر \"نام کاربری\" خالی است',\n            'Field \"Password\" is empty' => 'کادر \"پسورد\" خالی است',\n            'Field \"Site url\" is empty' => 'کادر \"آدرس سایت\" خالی است',\n            'Email not valid' => 'ایمیل معتبر نیست',\n            'Install' => 'نصب',\n            '...Monstra says...' => '...مونسترا میگوید...',\n            'Sitemap file writable' => 'فایل نقشه سایت قابل نوشتن میباشد',\n            'Sitemap file not writable' => 'فایل نقشه سایت غیرقابل نوشتن میباشد',\n            'Main .htaccess file writable' => 'فایل اصلی .htaccess قابل نوشتن میباشد',\n            'Main .htaccess file not writable' => 'فایل اصلی .htaccess غیرقابل نوشتن میباشد',\n            'Official Support Forum' => 'انجمن پشتیبانی',\n            'Documentation' => 'مستندات',\n        )\n    );"
  },
  {
    "path": "plugins/box/system/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Système',\n            'Published a new version of the :monstra' => 'Publication d\\'une nouvelle version de :monstra',\n            'Sitemap created' => 'Plan du site créé',\n            'Create sitemap' => 'Créer un plan du site',\n            'on' => 'on',\n            'off'=> 'off',\n            'Site url' => 'Url du site',\n            'Maintenance Mode' => 'Mode de maintenance',\n            'Maintenance Mode On' => 'Mode de maintenance On',\n            'Maintenance Mode Off' => 'Mode de maintenance Off',\n            'Site settings' => 'Paramètres du site',\n            'System settings' => 'Paramètres du système',\n            'Site name' => 'Nom du site',\n            'Site description' => 'Description du site',\n            'Site keywords' => 'Mots clés du site',\n            'Site slogan' => 'Slogan du site',\n            'Default page' => 'Page par défaut',\n            'Time zone' => 'Fuseau horaire',\n            'Language' => 'Langue',\n            'Email' => 'Email',\n            'Save' => 'Enregistrer',\n            'Site' => 'Site',\n            'System version' => 'Version du système',\n            'System version ID' => 'ID de la version du système',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Débogage',\n            'Plugin API' => 'Plugin API',\n            'Plugins active' => 'Plugins actifs',\n            'Actions registered' => 'Actions enregistrées',\n            'Filters registered' => 'Filtres enregistrées',\n            'logout' => 'déconnexion',\n            'site' => 'site',\n            'Core' => 'Noyau',\n            'Delete temporary files' => 'Supprimer les fichiers temporaires',\n            'Download the latest version' => 'Télécharger la dernière version',\n            'Powered by' => 'Propulsé par',\n            'Administration' => 'Administration',\n            'Settings' => 'Paramètres',\n            'Temporary files deleted' => 'Les fichiers temporaires ont été supprimés',\n            'Extends' => 'Extensions',\n            'View site' => 'Voir le site',\n            'Welcome, :username' => 'Bienvenue, :username',\n            'Reset Password' => 'Réinitialiser le mot de passe',\n            'Back to Website' => '< Retour au site',\n            'Forgot your password ?' => 'Mot de passe oublié ?',\n            'Administration >' => 'Administration >',\n            'Send New Password' => 'Envoyer un nouveau mot de passe',\n            'This user does not exist' => 'Cet utilisateur n\\'existe pas',\n            'Version' => 'Version',\n            'Plugin does not exist' => 'Ce plugin n\\'existe pas',\n\n            'Install script writable' => 'Le script d\\'installation est accessible en écriture', // pour ' = &#8217; (a voir)\n            'Install script not writable' => 'Le script d\\'installation n\\' est pas accessible en écriture',\n            'Directory: <b> :dir </b> writable' => 'Répertoire: <b> :dir </b> writable',\n            'Directory: <b> :dir </b> not writable' => 'Répertoire: <b> :dir </b> pas accessible en écriture',\n            'PHP Version' => 'Version de PHP',\n            'Module DOM is installed' => 'Module DOM est installé',\n            'Module DOM is required' => 'Module DOM est requis',\n            'Module Mod Rewrite is installed' => 'Module Mod Rewrite est installé',\n            'Module SimpleXML is installed' => 'Module SimpleXML est installé',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 ou supérieur est requis',\n            'Apache Mod Rewrite is required' => 'Apache Mod Rewrite est requis',\n            'SimpleXML module is required' => 'Le module SimpleXML est requis',\n            'Field \"Site name\" is empty' => 'Le champ \"Nom du site\" est vide',\n            'Field \"Email\" is empty' => 'Le champ \"Email\" est vide',\n            'Field \"Username\" is empty' => 'Le champ \"Nom d\\'utilisateur\" est vide',\n            'Field \"Password\" is empty' => 'Le champ \"Mot de Passe\" est vide',\n            'Field \"Site url\" is empty' => 'Le champ \"Url du site\" est vide',\n            'Email not valid' => 'Email non valide',\n            'Install' => 'Installer',\n            '...Monstra says...' => '...Monstra dit...',\n            'Sitemap file writable' => 'Fichier Sitemap accessible en écriture',\n            'Sitemap file not writable' => 'Fcihier Sitemap non accessible en écriture',\n            'Main .htaccess file writable' => 'Fichier .htaccess pricipale accessible en écriture',\n            'Main .htaccess file not writable' => 'Fichier .htaccess pricipale non accessible en écriture',\n            'Official Support Forum' => 'Forum Support Officiel',\n            'Documentation' => 'Documentation',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Rendszer',\n            'Published a new version of the :monstra' => 'Megjelent egy új Monstra változat',\n            'Sitemap created' => 'Oldaltérkép elkészült',\n            'Create Sitemap' => 'Oldaltérkép készítése',\n            'on' => 'be',\n            'off'=> 'ki',\n            'Site Url' => 'Weboldal címe (url)',\n            'Maintenance Mode' => 'Karbantartási mód',\n            'Maintenance Mode On' => 'Karbantartási mód Be',\n            'Maintenance Mode Off' => 'Karbantartási mód Ki',\n            'Site Settings' => 'Weboldal beállítások',\n            'System Settings' => 'Rendszer beállítások',\n            'Site Name' => 'Weboldal neve',\n            'Site Description' => 'Weboldal leírása',\n            'Site Keywords' => 'Weboldal kulcsszavak',\n            'Site Slogan' => 'Weboldal szlogen',\n            'Default Page' => 'Alapértelmezett kezdőoldal',\n            'Time zone' => 'Időzóna',\n            'Language' => 'Nyelv',\n            'Email' => 'Email',\n            'Save' => 'Mentés',\n            'Site' => 'Weboldal',\n            'System version' => 'Rendszer verzió',\n            'System version ID' => 'Rendszer verziószám',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Hibakeresés',\n            'Plugin API' => 'Plugin API',\n            'Plugins active' => 'A Pluginok aktívak',\n            'Actions registered' => 'Actions registered',\n            'Filters registered' => 'Filters registered',\n            'logout' => 'Kilépés',\n            'site' => 'oldal',\n            'Core' => 'Core',\n            'Delete Temporary Files' => 'Az ideiglenes fájlok törlése',\n            'Download the latest version' => 'Töltse le a legújabb verziót',\n            'Powered by' => 'Powered by',\n            'Administration' => 'Adminisztráció',\n            'Settings' => 'Beállítások',\n            'Temporary files deleted' => 'Ideiglenes fájlok törölve',\n            'Extends' => 'Bővítmények',\n            'View Site' => 'Oldal megtekintése',\n            'Welcome, :username' => 'Üdvözöllek :username',\n            'Reset Password' => 'Jelszó Törlése',\n            'Back to Website' => 'Vissza a weboldalra',\n            'Forgot your password ?' => 'Elfelejtette a jelszavát ?',\n            'Administration >' => 'Adminisztráció >',\n            'Send New Password' => 'Új Jelszó Küldése',\n            'This user does not exist' => 'Ez a felhasználó nem létezik',\n            'Version' => 'Verzió',\n            'Plugin does not exist' => 'Plugin nem létezik',\n\n            'Install script writable' => 'Install script írható',\n            'Install script not writable' => 'Install script nem írható',\n            'Directory: <b> :dir </b> writable' => 'Directory: <b> :dir </b> írható',\n            'Directory: <b> :dir </b> not writable' => 'Directory: <b> :dir </b> nem írható',\n            'PHP Version' => 'PHP Verzió',\n            'Module DOM is installed' => 'DOM modul telepítve van',\n            'Module DOM is required' => 'DOM modul szükséges',\n            'Module Mod Rewrite is installed' => 'Mod Rewrite modul telepítve van',\n            'Module SimpleXML is installed' => 'SimpleXML modul telepítve van',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 vagy újabb szükséges',\n            'Apache Mod Rewrite is required' => 'Apache Mod Rewrite szükséges',\n            'SimpleXML module is required' => 'SimpleXML modul szükséges',\n            'Field \"Site name\" is empty' => 'Mező \"Weboldal neve\" üres',\n            'Field \"Email\" is empty' => 'Mező \"Email\" üres',\n            'Field \"Username\" is empty' => 'Mező \"Felhasználónév\" üres',\n            'Field \"Password\" is empty' => 'Mező \"Jelszó\" üres',\n            'Field \"Site url\" is empty' => 'Mező \"Weboldal címe (url)\" üres',\n            'Email not valid' => 'E-mail nem érvényes',\n            'Install' => 'Telepítés',\n            '...Monstra says...' => '... Monstra mondja ...',\n            'Sitemap file writable' => 'Sitemap fájl írható',\n            'Sitemap file not writable' => 'Sitemap fájl nem írható',\n            'Main .htaccess file writable' => 'Main .htaccess fájl írható',\n            'Main .htaccess file not writable' => 'Main .htaccess fájl nem írható',\n            'Official Support Forum' => 'Hivatalos Fórum',\n            'Documentation' => 'Dokumentáció',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'System',\n            'Published a new version of the :monstra' => 'Memuat versi baru dari :monstra',\n            'Sitemap created' => 'Sitemap dibuat',\n            'Create Sitemap' => 'Buat Sitemap',\n            'on' => 'Nyala',\n            'off'=> 'Mati',\n            'Site Url' => 'URL Situs',\n            'Maintenance Mode' => 'Mode Perbaikan',\n            'Maintenance Mode On' => 'Nyalakan Mode Perbaikan',\n            'Maintenance Mode Off' => 'Matikan Mode Perbaikan',\n            'Site Settings' => 'Pengaturan Situs',\n            'System Settings' => 'Pengaturan Situs',\n            'Site Name' => 'Nama Situs',\n            'Site Description' => 'Deskripsi Situs',\n            'Site Keywords' => 'Kata Kunci Situs',\n            'Site Slogan' => 'Slogan Situs',\n            'Default Page' => 'Halaman Standart',\n            'Time zone' => 'Zona Waktu',\n            'Language' => 'Bahasa',\n            'Email' => 'Email',\n            'Save' => 'Simpan',\n            'Site' => 'Situs',\n            'System version' => 'Versi Sistem',\n            'System version ID' => 'ID Versi Sistem',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Debugging',\n            'Plugin API' => 'Plugin API',\n            'Plugins active' => 'Plugins aktif',\n            'Actions registered' => 'Tindakan telah terdaftar',\n            'Filters registered' => 'Filter telah terdaftar',\n            'Log Out' => 'Keluar',\n            'Site' => 'Situs',\n            'Delete Temporary Files' => 'Hapus File Sementara',\n            'Download the latest version' => 'Unduh Versi Terbaru',\n            'Powered by' => 'Didukung oleh',\n            'Administration' => 'Administrasi',\n            'Settings' => 'Pengaturan',\n            'Temporary files deleted' => 'Hapus File Sementara',\n            'Extends' => 'Ekstensi',\n            'View Site' => 'Lihat Situs',\n            'Welcome, :username' => 'Selamat datang, :username',\n            'Reset Password' => 'Reset Password',\n            'Back to Website' => '< Kembali ke Situs Web',\n            'Forgot your password ?' => 'Lupa Password ?',\n            'Administration' => 'Administrasi',\n            'Send New Password' => 'Kirim Password Baru',\n            'This user does not exist' => 'Pengguna ini tidak terdaftar',\n            'Version' => 'Versi',\n\n            'Install script writable' => 'Skrip Instalasi writable',\n            'Install script not writable' => 'Skrip Instalasi tidak writable',\n            'Directory: <b> :dir </b> writable' => 'Direktori: <b> :dir </b> writable',\n            'Directory: <b> :dir </b> not writable' => 'Direktori: <b> :dir </b> tidak writable',\n            'PHP Version' => 'Versi PHP',\n            'Module DOM is installed' => 'Modul DOM telah terpasang',\n            'Module DOM is required' => 'diperlukan Modul DOM',\n            'Module Mod Rewrite is installed' => 'Modul Mod Rewrite telah terpasang',\n            'Module SimpleXML is installed' => 'Modul SimpleXML telah terpasang',\n            'PHP 5.2 or greater is required' => 'diperlukan PHP 5.2 atau yang lebih baru',\n            'Apache Mod Rewrite is required' => 'diperlukan Apache Mod Rewrite',\n            'SimpleXML module is required' => 'diperlukan Modul simpleXML',\n            'Field \"Site name\" is empty' => 'Isian \"Nama Situs\" kosong',\n            'Field \"Email\" is empty' => 'Isian \"Email\" kosong',\n            'Field \"Username\" is empty' => 'Isian \"Nama Pengguna\" kosong',\n            'Field \"Password\" is empty' => 'Isian \"Password\" kosong',\n            'Field \"Site url\" is empty' => 'Isian \"Situs URL\" kosong',\n            'Email not valid' => 'E-Mail tidak cocok',\n            'Install' => 'Memasangkan',\n            '...Monstra says...' => '...Katanya Monstra...',\n            'Sitemap file writable' => 'File sitemap writable',\n            'Sitemap file not writable' => 'File sitemap tidak writable',\n            'Main .htaccess file writable' => 'File .htaccess-Datei writable',\n            'Main .htaccess file not writable' => 'File .htaccess tidak writable',\n            'Official Support Forum' => 'Forum Support Resmi',\n            'Documentation' => 'Dokumentasi',\n            'Your changes have been saved.' => 'Perubahan Telah Disimpan.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Sistema',\n            'Published a new version of the :monstra' => 'È disponibile una nuova versione :monstra',\n            'Sitemap created' => 'Sitemap è stata creata',\n            'Create Sitemap' => 'Crea Sitemap',\n            'on' => 'on',\n            'off'=> 'off',\n            'Site Url' => 'URL del sito',\n            'Maintenance Mode' => 'Modalità manutenzione',\n            'Maintenance Mode On' => 'Abilita modalità manutenzione',\n            'Maintenance Mode Off' => 'Disabilita modalità manutenzione',\n            'Site Settings' => 'Impostazioni del sito',\n            'System Settings' => 'Impostazioni di sistema',\n            'Site Name' => 'Nome del sito',\n            'Site Description' => 'Descrizione',\n            'Site Keywords' => 'Parole chiavi',\n            'Site Slogan' => 'Slogan',\n            'Default Page' => 'Pagina Predefinita',\n            'Time zone' => 'Fuso orario',\n            'Language' => 'Lingua',\n            'Email' => 'Email',\n            'Save' => 'Salva',\n            'System version' => 'Versione del sistema',\n            'System version ID' => 'ID del sistema',\n            'GZIP' => 'Compressione GZIP',\n            'Debugging' => 'Debugging',\n            'Plugin API' => 'Plugin API',\n            'Plugins active' => 'Plugin attivi',\n            'Actions registered' => 'Azioni registrati',\n            'Filters registered' => 'Filtri registrati',\n            'Delete Temporary Files' => 'Cancella i file temporanei',\n            'Download the latest version' => 'Scarica l&#8217;ultima versione',\n            'Powered by' => 'Powered by',\n            'Administration' => 'Amministrazione',\n            'Settings' => 'Impostazioni',\n            'Temporary files deleted' => 'File temporanei eliminati',\n            'Extends' => 'Estensioni',\n            'View site' => 'Visita sito',\n            'Welcome, :username' => 'Benvenuto, :username',\n            'Reset Password' => 'Resetta la password',\n            'Back to Website' => 'Vai al sito',\n            'Forgot your password ?' => 'Dimenticato la password ?',\n            'Administration >' => 'Amministrazione >',\n            'Send New Password' => 'Invia la nuova password',\n            'This user does not exist' => 'Tale utente non esiste',\n            'Version' => 'Versione',\n\n            'Install script writable' => 'Script d&#8217;installazione è scrivibile',\n            'Install script not writable' => 'Script d&#8217;installazione non è scrivibile',\n            'Directory: <b> :dir </b> writable' => 'Directory <b> :dir </b> è scrivibile',\n            'Directory: <b> :dir </b> not writable' => 'Directory <b> :dir </b> non è scrivibile',\n            'PHP Version' => 'Versione PHP',\n            'Module DOM is installed' => 'Modulo DOM installato',\n            'Module DOM is required' => 'Modulo DOM è richiesto',\n            'Module Mod Rewrite is installed' => 'Modulo Mod Rewrite installato',\n            'Module SimpleXML is installed' => 'Modulo SimpleXML installato',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 o superiore',\n            'Apache Mod Rewrite is required' => 'Apache Mod Rewrite è richiesto',\n            'SimpleXML module is required' => 'Modulo SimpleXML è richiesto',\n            'Field \"Site name\" is empty' => 'Campo \"Nome del sito\" è vuoto',\n            'Field \"Email\" is empty' => 'Campo \"E-mail\" è vuoto',\n            'Field \"Username\" is empty' => 'Campo \"Nome utente\" è vuoto',\n            'Field \"Password\" is empty' => 'Campo \"Password\" è vuoto',\n            'Field \"Site url\" is empty' => 'Campo \"URL del sito\" è vuoto',\n            'Email not valid' => 'E-mail non valido',\n            'Install' => 'Installa',\n            '...Monstra says...' => '...Monstra dice...',\n            'Sitemap file writable' => 'Sitemap file è scrivibile',\n            'Sitemap file not writable' => 'Sitemap file non è scrivibile',\n            'Main .htaccess file writable' => 'Principale file .htaccess è scrivibile',\n            'Main .htaccess file not writable' => 'Principale file .htaccess non è scrivibile',\n            'Official Support Forum' => 'Official Support Forum',\n            'Documentation' => 'Documentation',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/ja.lang.php",
    "content": "﻿<?php\n\n    return array(\n        'system' => array(\n            'System' => 'システム',\n            'Published a new version of the :monstra' => '新しいバージョンの:monstraが公開されています',\n            'Sitemap created' => 'サイトマップを作成しました',\n            'Create Sitemap' => 'サイトマップの作成',\n            'on' => 'オン',\n            'off'=> 'オフ',\n            'Site Url' => 'サイトのURL',\n            'Maintenance Mode' => 'メンテナンスモード',\n            'Maintenance Mode On' => 'メンテナンスモード On',\n            'Maintenance Mode Off' => 'メンテナンスモード Off',\n            'Site Settings' => 'サイトの設定',\n            'System Settings' => 'システム設定',\n            'Site Name' => 'サイト名',\n            'Site Description' => 'サイトの説明',\n            'Site Keywords' => 'サイトのキーワード',\n            'Site Slogan' => 'サイトのスローガン',\n            'Default Page' => 'デフォルトのページ',\n            'Time zone' => 'タイムゾーン',\n            'Language' => '言語',\n            'Email' => 'Eメール',\n            'Save' => '保存',\n            'Site' => 'サイト',\n            'System version' => 'システムバージョン',\n            'System version ID' => 'システムバージョンID',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'デバッグ',\n            'Plugin API' => 'プラグインAPI',\n            'Plugins active' => 'Plugins active',\n            'Actions registered' => 'アクションが登録されました',\n            'Filters registered' => 'フィルタが登録されました',\n            'Delete Temporary Files' => 'テンポラリファイルを削除',\n            'Download the latest version' => '最新バージョンをダウンロード',\n            'Powered by' => 'Powered by',\n            'Administration' => '管理者モード',\n            'Settings' => '設定',\n            'Temporary files deleted' => 'テンポラリファイルを削除しました',\n            'Extends' => '拡張',\n            'View Site' => 'サイトを見る',\n            'Welcome, :username' => ':usernameさん、ようこそ',\n            'Reset Password' => 'パスワードのリセット',\n            'Back to Website' => '< Webサイトに戻る',\n            'Forgot your password ?' => 'パスワードを忘れましたか？ >',\n            'Administration' => '管理者 >',\n            'Send New Password' => '新しいパスワードを送信',\n            'This user does not exist' => 'このユーザーは存在しません',\n            'Version' => 'バージョン',\n            'Plugin does not exist' => 'プラグインが存在しません',\n            'Install script writable' => 'インストールスクリプトは書き込み可能です',\n            'Install script not writable' => 'インストールスクリプトは書き込み不可能です',\n            'Directory: <b> :dir </b> writable' => 'ディレクトリ: <b> :dir </b> は書き込み可能です',\n            'Directory: <b> :dir </b> not writable' => 'ディレクトリ: <b> :dir </b> は書き込み不可能です',\n            'PHP Version' => 'PHPバージョン',\n            'Module DOM is installed' => 'DOMモジュールはインストールされています',\n            'Module DOM is required' => 'DOMモジュールが必要です',\n            'Module Mod Rewrite is installed' => 'Mod Rewriteモジュールはインストールされています',\n            'Module SimpleXML is installed' => 'SimpleXMLモジュールはインストールされています',\n            'PHP 5.2 or greater is required' => 'PHP 5.2以上が必要です',\n            'Apache Mod Rewrite is required' => 'ApacheのMod Rewriteが必要です',\n            'SimpleXML module is required' => 'SimpleXMLモジュールが必要です',\n            'Field \"Site name\" is empty' => '\"サイト名\"フィールドが空です',\n            'Field \"Email\" is empty' => '\"Eメール\"フィールドが空です',\n            'Field \"Username\" is empty' => '\"ユーザー名\"フィールドが空です',\n            'Field \"Password\" is empty' => '\"パスワード\"フィールドが空です',\n            'Field \"Site url\" is empty' => '\"サイトURL\"フィールドが空です',\n            'Email not valid' => '有効なEメールアドレスではありません',\n            'Install' => 'インストール',\n            '...Monstra says...' => '...Monstraより...',\n            'Sitemap file writable' => 'サイトマップファイルは書き込み可能です',\n            'Sitemap file not writable' => 'サイトマップファイルは書き込み不可能で',\n            'Main .htaccess file writable' => 'メイン .htaccess ファイルは書き込み可能です',\n            'Main .htaccess file not writable' => 'メイン .htaccess ファイルは書き込み不可能です',\n            'Official Support Forum' => 'オフィシャルサポートフォーラム',\n            'Documentation' => 'ドキュメント',\n            'Your changes have been saved.' => '変更された設定は保存されました。',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'სისტემა',\n            'Published a new version of the :monstra' => 'გამოქვეყნდა ახალი ვერსია :monstra',\n            'Sitemap created' => 'საიტის რუქა შეიქმნა',\n            'Create Sitemap' => 'საიტის რუქის შექმნა',\n            'on' => 'ჩართულია',\n            'off'=> 'გამორთულია',\n            'Site Url' => 'საიტის ადრესი',\n            'Maintenance Mode' => 'ტექნიკური სამუშაოები',\n            'Maintenance Mode On' => 'ტექნიკური სამუშაობების ჩართვა',\n            'Maintenance Mode Off' => 'ტექნიკური სამუშაობების. გამორთვა',\n            'Site Settings' => 'საიტის პარამეტრები',\n            'System Settings' => 'სისტემის პარამეტრები',\n            'Site Name' => 'საიტის სახელწოდება',\n            'Site Description' => 'საიტის აღწერა',\n            'Site Keywords' => 'საიტის საკვანძო სიტყვები',\n            'Site Slogan' => 'საიტის სლოგანი',\n            'Default Page' => 'მთავარი გვერდი',\n            'Time zone' => 'დროის სარტყელი',\n            'Language' => 'ენა',\n            'Email' => 'ელ-ფოსტა',\n            'Save' => 'დამახსოვრება',\n            'System version' => 'სისტემის ვერსია',\n            'System version ID' => 'სისტემის ვერსიის ID',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Debugging',\n            'Plugin API' => 'პლაგინი API',\n            'Plugins active' => 'შეერთებული პლაგინები',\n            'Actions registered' => 'დარეგისტრირებული მოქმედებები',\n            'Filters registered' => 'დარეგისტრირებული ფილტრები',\n            'Delete Temporary Files' => 'დროებითი ფაილების წაშლა',\n            'Download the latest version' => 'ბოლო ვერსიის გადმოწერა',\n            'Powered by' => 'Powered by',\n            'Administration' => 'ადმინისტრირება',\n            'Settings' => 'პარამეტრები',\n            'Temporary files deleted' => 'დროებითი ფაილები წაშლილია',\n            'Extends' => 'extend-ები',\n            'View Site' => 'საიტის ნახვა',\n            'Welcome, :username' => 'მოგესალმებით, :username',\n            'Reset Password' => 'პაროლის Reset-ი',\n            'Back to Website' => 'ვებ გვერდზე დაბრუნება',\n            'Forgot your password ?' => 'დაგავიწყდათ პაროლი?',\n            'Administration' => 'ადმინისტრირება',\n            'Send New Password' => 'ახალი პაროლის გაგზავნა',\n            'This user does not exist' => 'ესეთი მომხმარებელი არ არსებობს',\n            'Version' => 'ვერსია',\n            'Plugin does not exist' => 'პლაგინი არ არსებობს',\n            'Help' => 'დახმარება',\n            'Continue' => 'გაგრძელება',\n\n            'Install script writable' => 'დასაყენი script-ის წაკითხვა შესაძლებელია',\n            'Install script not writable' => 'დასაყენი script-ის წაკითხვა შეუძლებელია',\n            'Directory: <b> :dir </b> writable' => 'დირეკტორია <b> :dir </b> ჩაწერისთვის ხელმისაწვდომია',\n            'Directory: <b> :dir </b> not writable' => 'დირეკტორია <b> :dir </b> ჩაწერისთვის არ არის ხელმისაწვდომი',\n            'PHP Version' => 'PHP-ის ვერსია',\n            'Module DOM is installed' => 'DOM მოდული დაყენებულია',\n            'Module DOM is required' => 'საჭიროა DOM მოდული',\n            'Module Mod Rewrite is installed' => 'მოდული Mod Rewrite დაყენებულია',\n            'Module SimpleXML is installed' => 'მოდული SimpleXML დაყენებულია',\n            'PHP 5.2 or greater is required' => 'საჭიროა PHP 5.2 ან უფრო ახალი',\n            'Apache Mod Rewrite is required' => 'საჭიროა Apache Mod Rewrite',\n            'SimpleXML module is required' => 'საჭიროა SimpleXML მოდული',\n            'Field \"Site name\" is empty' => '\"საიტის სახელის\" ველი არ არის შევსებული',\n            'Field \"Email\" is empty' => '\"ელ-ფოსტის\" ველი არ არის შევსებული',\n            'Field \"Username\" is empty' => '\"მომხმარებლის სახელის\" ველი არ არის შევსებული',\n            'Field \"Password\" is empty' => '\"პაროლის\" ველი არ არის შევსებული',\n            'Field \"Site url\" is empty' => '\"საიტის ადრესის\" ველი არ არის შევსებული',\n            'Email not valid' => 'ელ-ფოსტა არასწორია',\n            'Install' => 'დაყენება',\n            '...Monstra says...' => '...Monstra ამბობს...',\n            'Sitemap file writable' => 'საიტის რუქის ჩაწერა შესაძლებელია',\n            'Sitemap file not writable' => 'საიტის რუქის ჩაწერა შეუძლებელია',\n            'Main .htaccess file writable' => 'მთავარი .htaccess ფაილის ჩაწერა შესაძლებელია',\n            'Main .htaccess file not writable' => 'მთავარი .htaccess ფაილის ჩაწერა შეუძლებელია',\n            'Official Support Forum' => 'ოფიციალური დახმარების ფორუმი',\n            'Documentation' => 'დოკუმენტაცია',\n            'Your changes have been saved.' => 'თქვენი ცვლილებები შენახულია.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Sistema',\n            'Published a new version of the :monstra' => 'Išleista nauja :monstra versija',\n            'Sitemap created' => 'Sitemap sukurtas',\n            'Create Sitemap' => 'Sukurti sitemap',\n            'on' => 'įjungti',\n            'off'=> 'išjungti',\n            'Site Url' => 'Tinklapio adresas (url)',\n            'Maintenance Mode' => 'Remonto režimas',\n            'Maintenance Mode On' => 'Įjungti remonto režimą',\n            'Maintenance Mode Off' => 'Išjungti remonto režimą',\n            'Site Settings' => 'Tinklapio nustatymai',\n            'System Settings' => 'Sistemos nustatymai',\n            'Site Name' => 'Tinklapio pavadinimas',\n            'Site Description' => 'Tinklapio aprašymas',\n            'Site Keywords' => 'Tinklapio raktažodžiai',\n            'Site Slogan' => 'Tinklapio šūkis',\n            'Default Page' => 'Pagrindinis puslapis',\n            'Time zone' => 'Laiko zona',\n            'Language' => 'Kalba',\n            'Email' => 'El. paštas',\n            'Save' => 'Išsaugoti',\n            'Site' => 'Tinklapis',\n            'System version' => 'Sistemos versija',\n            'System version ID' => 'Sistemos versijos ID',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Derinimas',\n            'Plugin API' => 'Įskiepių API',\n            'Plugins active' => 'Aktyvūs įskiepiai',\n            'Actions registered' => 'Veiksmai užregistruoti',\n            'Filters registered' => 'Filtrai užregistruoti',\n            'Delete Temporary Files' => 'Trinti laikinas bylas',\n            'Download the latest version' => 'Atsisiųsti naujausią versiją',\n            'Powered by' => 'Veikia su',\n            'Administration' => 'Administravimas',\n            'Settings' => 'Nustatymai',\n            'Temporary files deleted' => 'Laikinos bylos ištrintos',\n            'Extends' => 'Išplėtimas',\n            'View Site' => 'Peržiūrėti tinklapį',\n            'Welcome, :username' => 'Sveiki, :username',\n            'Reset Password' => 'Gauti naują slaptažodį',\n            'Back to Website' => 'Grįžti į tinklapį',\n            'Forgot your password ?' => 'Pamišote slaptažodį ?',\n            'Administration' => 'Administravimas',\n            'Send New Password' => 'Siųsti naują slaptažodį',\n            'This user does not exist' => 'Tokio naudotojo nėra',\n            'Version' => 'Versija',\n            'Plugin does not exist' => 'Papildinio nėra',\n\n            'Install script writable' => 'Galima rašyti į diegimo scenarijų',\n            'Install script not writable' => 'Negalima rašyti į diegimo scenarijų',\n            'Directory: <b> :dir </b> writable' => 'Aplankas: galima rašyti į <b> :dir </b>',\n            'Directory: <b> :dir </b> not writable' => 'Aplankas: negalima rašyti į <b> :dir </b>',\n            'PHP Version' => 'PHP versija',\n            'Module DOM is installed' => 'DOM modulis yra įdiegtas',\n            'Module DOM is required' => 'Reikalingas DOM modulis',\n            'Module Mod Rewrite is installed' => 'Apache Mod Rewrite yra įdiegtas',\n            'Module SimpleXML is installed' => 'SimpleXML modulis yra įdiegtas',\n            'PHP 5.2 or greater is required' => 'Reikalingas PHP 5.2 ar naujesnis',\n            'Apache Mod Rewrite is required' => 'Reikalingas Apache Mod Rewrite',\n            'SimpleXML module is required' => 'Reikalingas SimpleXML modulis',\n            'Field \"Site name\" is empty' => 'Laukas „Tinklapio pavadimas“ yra tuščias',\n            'Field \"Email\" is empty' => 'Laukas „El. paštas“ yra tuščias',\n            'Field \"Username\" is empty' => 'Laukas „Prisijungimo vardas“ yra tuščias',\n            'Field \"Password\" is empty' => 'Laukas „Slaptažodis“ yra tuščias',\n            'Field \"Site url\" is empty' => 'Laukas „Tinklapio adresas (url)“ yra tuščias',\n            'Email not valid' => 'Neteisingas el. pašto adresas',\n            'Install' => 'Įdiegti',\n            '...Monstra says...' => '...Monstra sako...',\n            'Sitemap file writable' => 'Galima rašyti į sitemap bylą',\n            'Sitemap file not writable' => 'Negalima rašyti į sitemap bylą',\n            'Main .htaccess file writable' => 'Galima rašyti į pagrindinę .htaccess bylą',\n            'Main .htaccess file not writable' => 'Negalima rašyti į pagrindinę .htaccess bylą',\n            'Official Support Forum' => 'Pagalbos forumas',\n            'Documentation' => 'Dokumentacija',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Systeem',\n            'Published a new version of the :monstra' => 'Een nieuwe versie van :monstra is gepubliceerd',\n            'Sitemap created' => 'Sitemap is aangemaakt',\n            'Create Sitemap' => 'Maak sitemap aan',\n            'on' => 'Aan',\n            'off'=> 'Uit',\n            'Site Url' => 'Website URL',\n            'Maintenance Mode' => 'Onderhoudsmodus',\n            'Maintenance Mode On' => 'Onderhoudsmodus Aan',\n            'Maintenance Mode Off' => 'Onderhoudsmodus Uit',\n            'Site Settings' => 'Website Instellingen',\n            'System Settings' => 'Systeem Instellingen',\n            'Site Name' => 'Website Naam',\n            'Site Description' => 'Website Beschrijving',\n            'Site Keywords' => 'Website Trefwoorden',\n            'Site Slogan' => 'Website Slogan',\n            'Default Page' => 'Standaard Pagina',\n            'Time zone' => 'Tijdzone',\n            'Language' => 'Taal',\n            'Email' => 'Email',\n            'Save' => 'Opslaan',\n            'Site' => 'Website',\n            'System version' => 'Systeemversie',\n            'System version ID' => 'Systeemversie ID',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Debuggen',\n            'Plugin API' => 'Plugin API',\n            'Plugins active' => 'Plugins aktief',\n            'Actions registered' => 'Acties opgeslagen',\n            'Filters registered' => 'Filters opgeslagen',\n            'Log Out' => 'Log uit',\n            'Site' => 'Website',\n            'Delete Temporary Files' => 'Verwijder tijdelijke bestanden',\n            'Download the latest version' => 'Download de laatste versie',\n            'Powered by' => 'Mogelijk gemaakt door',\n            'Administration' => 'Beheer',\n            'Settings' => 'Instellingen',\n            'Temporary files deleted' => 'Tijdelijke bestanden verwijderd',\n            'Extends' => 'Uitbreidingen',\n            'View Site' => 'Bekijk website',\n            'Welcome, :username' => 'Welkom, :username',\n            'Reset Password' => 'Wachtwoord opnieuw instellen',\n            'Back to Website' => 'Terug naar website',\n            'Forgot your password ?' => 'Wachtwoord vergeten ?',\n            'Administration' => 'Beheer',\n            'Send New Password' => 'Verstuur nieuw wachtwoord',\n            'This user does not exist' => 'Deze gebruiker bestaat niet',\n            'Version' => 'Versie',\n\n            'Install script writable' => 'Installatiescript schrijfbaar',\n            'Install script not writable' => 'Installatiescript niet schrijfbaar',\n            'Directory: <b> :dir </b> writable' => 'Map: <b> :dir </b> schrijfbaar',\n            'Directory: <b> :dir </b> not writable' => 'Map: <b> :dir </b> niet schrijfbaar',\n            'PHP Version' => 'PHP Versie',\n            'Module DOM is installed' => 'Modul DOM is geinstalleerd',\n            'Module DOM is required' => 'Modul DOM is vereist',\n            'Module Mod Rewrite is installed' => 'Modul Mod Rewrite is geinstalleerd',\n            'Module SimpleXML is installed' => 'Modul SimpleXML is geinstalleerd',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 of nieuwer is vereist',\n            'Apache Mod Rewrite is required' => 'Apache Mod Rewrite is vereist',\n            'SimpleXML module is required' => 'SimpleXML-Modul is vereist',\n            'Field \"Site name\" is empty' => 'Veld \"Website naam\" is leeg',\n            'Field \"Email\" is empty' => 'Veld \"Email\" is leeg',\n            'Field \"Username\" is empty' => 'Veld \"Gebruikersnaam\" is leeg',\n            'Field \"Password\" is empty' => 'Veld \"Wachtwoord\" is leeg',\n            'Field \"Site url\" is empty' => 'Veld \"Website-URL\" is leeg',\n            'Email not valid' => 'E-Mail is niet geldig',\n            'Install' => 'Installeren',\n            '...Monstra says...' => '...Monstra zegt...',\n            'Sitemap file writable' => 'Sitemap-bestand schrijfbaar',\n            'Sitemap file not writable' => 'Sitemap-bestand niet schrijfbaar',\n            'Main .htaccess file writable' => 'Hoofd .htaccess-bestand schrijfbaar',\n            'Main .htaccess file not writable' => 'Hoofd .htaccess-bestand niet schrijfbaar',\n            'Official Support Forum' => 'Officeel ondersteuningsforum',\n            'Documentation' => 'Documentatie',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'System',\n            'Published a new version of the :monstra' => 'Opublikowano nową wersję systemu :monstra',\n            'Sitemap created' => 'Utworzono mapę witryny',\n            'Create Sitemap' => 'Utwórz mapę witryny',\n            'on' => 'włączone',\n            'off'=> 'wyłączone',\n            'Site Url' => 'Adres URL witryny',\n            'Maintenance Mode' => 'Tryb konserwacji',\n            'Maintenance Mode On' => 'Włącz tryb konserwacji',\n            'Maintenance Mode Off' => 'Wyłącz tryb konserwacji',\n            'Site Settings' => 'Ustawienia witryny',\n            'System Settings' => 'Ustawienia systemu',\n            'Site Name' => 'Nazwa witryny',\n            'Site Description' => 'Opis witryny',\n            'Site Keywords' => 'Słowa kluczowe dla witryny',\n            'Site Slogan' => 'Dewiza witryny',\n            'Default Page' => 'Strona domyślna',\n            'Time zone' => 'Strefa czasowa',\n            'Language' => 'Język',\n            'Email' => 'Email',\n            'Save' => 'Zapisz',\n            'Site' => 'Witryna',\n            'System version' => 'Wersja systemu',\n            'System version ID' => 'Id wersji systemu',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Odpluskwianie',\n            'Plugin API' => 'API wtyczek',\n            'Plugins active' => 'Aktywne wtyczki',\n            'Actions registered' => 'Zarejestrowane akcje',\n            'Filters registered' => 'Zarejestrowane filtry',\n            'Delete Temporary Files' => 'Usuń pliki tymczasowe',\n            'Download the latest version' => 'Pobierz najnowszą wersję',\n            'Powered by' => 'Napędzane przez',\n            'Administration' => 'Administracja',\n            'Settings' => 'Ustawienia',\n            'Temporary files deleted' => 'Usunięto pliki tymczasowe',\n            'Extends' => 'Rozszerzenia',\n            'View Site' => 'Pokaż witrynę',\n            'Welcome, :username' => 'Witaj, :username',\n            'Reset Password' => 'Resetuj hasło',\n            'Back to Website' => 'Wróć do witryny internetowej',\n            'Forgot your password ?' => 'Nie pamiętasz swojego hasła ?',\n            'Administration' => 'Administracja',\n            'Send New Password' => 'Wyślij nowe hasło',\n            'This user does not exist' => 'Ten użytkownik nie istnieje',\n            'Version' => 'Wersja',\n            'Plugin does not exist' => 'Wtyczka nie istnieje',\n            'Help' => 'Pomoc',\n\n            'Install script writable' => 'Skrypt instalacyjny ma możliwość zapisu',\n            'Install script not writable' => 'Skrypt instalacyjny nie ma możliwości zapisu',\n            'Directory: <b> :dir </b> writable' => 'Katalog: <b> :dir </b> z możliwością zapisu',\n            'Directory: <b> :dir </b> not writable' => 'Katalog: <b> :dir </b> bez możliwości zapisu',\n            'PHP Version' => 'Wersja PHP',\n            'Module DOM is installed' => 'Moduł DOM jest zainstalowany',\n            'Module DOM is required' => 'Moduł DOM jest wymagany',\n            'Module Mod Rewrite is installed' => 'Moduł Mod Rewrite jest zainstalowany',\n            'Module SimpleXML is installed' => 'Moduł SimpleXML jest zainstalowany',\n            'PHP 5.2 or greater is required' => 'Wymagane jest PHP 5.2 lub nowsze',\n            'Apache Mod Rewrite is required' => 'Apache Mod Rewrite jest wymagany',\n            'SimpleXML module is required' => 'Moduł SimpleXML jest wymagany',\n            'Field \"Site name\" is empty' => 'Pole \"Nazwa witryny\" jest puste',\n            'Field \"Email\" is empty' => 'Pole \"Email\" jest puste',\n            'Field \"Username\" is empty' => 'Pole \"Nazwa użytkownika\" jest puste',\n            'Field \"Password\" is empty' => 'Pole \"Hasło\" jest puste',\n            'Field \"Site url\" is empty' => 'Pole \"URL witryny\" jest puste',\n            'Email not valid' => 'Email jest nieprawidłowy',\n            'Continue' => 'Kontynuuj',\n            'Install' => 'Instaluj',\n            '...Monstra says...' => '...Monstra mówi...',\n            'Sitemap file writable' => 'Plik mapy witryny ma możliwość zapisu',\n            'Sitemap file not writable' => 'Plik mapy witryny nie ma możliwości zapisu',\n            'Main .htaccess file writable' => 'Główny plik .htaccess ma możliwość zapisu',\n            'Main .htaccess file not writable' => 'Główny plik .htaccess nie ma możliwości zapisu',\n            'Official Support Forum' => 'Wsparcie oficjalnego forum',\n            'Documentation' => 'Dokumentacja',\n            'Your changes have been saved.' => 'Twoje zmiany zostały zapisane.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Sistema',\n            'Published a new version of the :monstra' => 'Foi publicada uma nova versão do :monstra',\n            'Sitemap created' => 'Mapa do site criado',\n            'Create Sitemap' => 'Criar mapa do site',\n            'on' => 'on',\n            'off'=> 'off',\n            'Site url' => 'URL do site',\n            'Maintenance Mode' => 'Modo de manutenção',\n            'Maintenance Mode On' => 'Modo de manutenção online',\n            'Maintenance Mode Off' => 'Modo de manutenção offline',\n            'Site Settings' => 'Configurações do site',\n            'System Settings' => 'Configurações do sistema',\n            'Site Name' => 'Nome do site',\n            'Site Description' => 'Descrição do site',\n            'Site Keywords' => 'Keywords do site',\n            'Site Slogan' => 'Slogan do site',\n            'Default Page' => 'Página padrão',\n            'Time zone' => 'Timezone padrão',\n            'Language' => 'Linguagem',\n            'Email' => 'Email',\n            'Save' => 'Salvar',\n            'System version' => 'Versão do sistema',\n            'System version ID' => 'ID (longo) da versão do sistema',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Debugando',\n            'Plugin API' => 'API do Plugin',\n            'Plugins active' => 'Plugins ativos',\n            'Actions registered' => 'Ações registradas',\n            'Filters registered' => 'Filtros registrados',\n            'Delete Temporary Files' => 'Deletar arquivo temporário',\n            'Download the latest version' => 'Baixar a última versão',\n            'Powered by' => 'Feito com',\n            'Administration' => 'Administração',\n            'Settings' => 'Configurações',\n            'Temporary files deleted' => 'Arquivos temporários deletados',\n            'Extends' => 'Extender',\n            'View Site' => 'Ver Site',\n            'Welcome, :username' => 'Olá, :username',\n            'Reset Password' => 'Resetar senha',\n            'Back to Website' => 'Voltar para o site',\n            'Forgot your password ?' => 'Esqueceu sua senha ?',\n            'Administration' => 'Administração',\n            'Send New Password' => 'Enviar nova senha',\n            'This user does not exist' => 'Este usuário não existe',\n            'Version' => 'Versão',\n            'Install script writable' => 'Script de instalação com permissões de escrita',\n            'Install script not writable' => 'Script de instalação sem permissões de escrita',\n            'Directory: <b> :dir </b> writable' => 'Diretório: <b>:dir</b> com permissões de escrita',\n            'Directory: <b> :dir </b> not writable' => 'Diretório: <b>:dir</b> sem permissões de escrita',\n            'PHP Version' => 'Versão do PHP',\n            'Module DOM is installed' => 'O módulo DOM está instalado',\n            'Module DOM is required' => 'O módulo DOM é necessário',\n            'Module Mod Rewrite is installed' => 'O módulo mod_rewrite está instalado',\n            'Module SimpleXML is installed' => 'O module SimpleXML está instalado',\n            'PHP 5.2 or greater is required' => 'A versão do PHP precisa ser acima da 5.2.*',\n            'Apache Mod Rewrite is required' => 'O módulo mod_rewrite do apache é requerido',\n            'SimpleXML module is required' => 'o módulo SimpleXML é requerido',\n            'Field \"Site name\" is empty' => 'O campo \"Nome do site\" está vazio',\n            'Field \"Email\" is empty' => 'O campo \"Email\" está vazio',\n            'Field \"Username\" is empty' => 'O campo \"Usuário\" está vazio',\n            'Field \"Password\" is empty' => 'O campo \"Senha\" está vazio',\n            'Field \"Site url\" is empty' => 'O campo \"URL do site\" está vazio',\n            'Email not valid' => 'Email inválido',\n            'Install' => 'Instalar',\n            '...Monstra says...' => '... O Monstra diz ...',\n            'Sitemap file writable' => 'O arquivo \\'sitemap.xml\\' tem permissões de escrita',\n            'Sitemap file not writable' => 'O arquivo \\'sitemap.xml\\' não tem permissões de escrita',\n            'Main .htaccess file writable' => 'O arquivo .htaccess principal tem permissões de escrita',\n            'Main .htaccess file not writable' => 'O arquivo .htacces principal não tem permissões de escrita',\n            'Official Support Forum' => 'Official Support Forum',\n            'Documentation' => 'Documentation',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Система',\n            'Published a new version of the :monstra' => 'Опубликована новая версия :monstra',\n            'Sitemap created' => 'Карта сайта создана',\n            'Create Sitemap' => 'Создать карту сайта',\n            'on' => 'включен',\n            'off'=> 'выключен',\n            'Site Url' => 'Адрес сайта',\n            'Maintenance Mode' => 'Тех. обслуживание',\n            'Maintenance Mode On' => 'Включить тех. обслуживание',\n            'Maintenance Mode Off' => 'Выключить тех. обслуживание',\n            'Site Settings' => 'Настройки сайта',\n            'System Settings' => 'Настройки системы',\n            'Site Name' => 'Название сайта',\n            'Site Description' => 'Описание сайта',\n            'Site Keywords' => 'Ключевые слова',\n            'Site Slogan' => 'Слоган',\n            'Default Page' => 'Страница по умолчанию',\n            'Time zone' => 'Временная зона',\n            'Language' => 'Язык',\n            'Email' => 'Эл. почта',\n            'Save' => 'Сохранить',\n            'System version' => 'Версия системы',\n            'System version ID' => 'Версия системы ID',\n            'GZIP' => 'Cжатие GZIP',\n            'Debugging' => 'Дебаггинг',\n            'Plugin API' => 'Plugin API',\n            'Plugins active' => 'Подключенные плагины',\n            'Actions registered' => 'Зарегистрированные экшны',\n            'Filters registered' => 'Зарегистрированные фильтры',\n            'Delete Temporary Files' => 'Удалить временные файлы',\n            'Download the latest version' => 'Скачать последнюю версию',\n            'Powered by' => 'Работает на',\n            'Administration' => 'Администрирование',\n            'Settings' => 'Настройки',\n            'Temporary files deleted' => 'Временные файлы удалены',\n            'Extends' => 'Расширения',\n            'View Site' => 'Сайт',\n            'Welcome, :username' => 'Добро пожаловать, :username',\n            'Reset Password' => 'Сброс пароля',\n            'Back to Website' => 'Вернуться на сайт',\n            'Forgot your password ?' => 'Забыли пароль ?',\n            'Administration' => 'Администрирование',\n            'Send New Password' => 'Отправить новый пароль',\n            'This user does not exist' => 'Такого пользователя не существует',\n            'Version' => 'Версия',\n            'Plugin does not exist' => 'Такого плагина не существует',\n            'Help' => 'Помощь',\n            'Continue' => 'Продолжить',\n\n            'Install script writable' => 'Установочный скрипт доступен для записи',\n            'Install script not writable' => 'Установочный скрипт не доступен для записи',\n            'Directory: <b> :dir </b> writable' => 'Директория <b> :dir </b> доступна для записи',\n            'Directory: <b> :dir </b> not writable' => 'Директория <b> :dir </b> не доступна для записи',\n            'PHP Version' => 'Версия PHP',\n            'Module DOM is installed' => 'Модуль DOM установлен',\n            'Module DOM is required' => 'Требуется DOM модуль',\n            'Module Mod Rewrite is installed' => 'Модуль Mod Rewrite установлен',\n            'Module SimpleXML is installed' => 'Модуль SimpleXML установлен',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 или высше',\n            'Apache Mod Rewrite is required' => 'Требуется Apache Mod Rewrite',\n            'SimpleXML module is required' => 'Требуется SimpleXML модуль',\n            'Field \"Site name\" is empty' => 'Поле \"Название сайта\" не заполнено',\n            'Field \"Email\" is empty' => 'Поле \"Эл. почта\" не заполнено',\n            'Field \"Username\" is empty' => 'Поле \"Имя пользователя\" не заполнено',\n            'Field \"Password\" is empty' => 'Поле \"Пароль\" не заполнено',\n            'Field \"Site url\" is empty' => 'Поле \"Адрес сайта\" не заполнено',\n            'Email not valid' => 'Эл. почта недействительна',\n            'Install' => 'Установить',\n            '...Monstra says...' => '...Monstra говорит...',\n            'Sitemap file writable' => 'Карта сайта доступна для записи',\n            'Sitemap file not writable' => 'Карта сайта не доступна для записи',\n            'Main .htaccess file writable' => 'Главный .htaccess файл доступен для записи',\n            'Main .htaccess file not writable' => 'Главный .htaccess файл не доступен для записи',\n            'Official Support Forum' => 'Официальный Форум Поддержки',\n            'Documentation' => 'Документация',\n            'Your changes have been saved.' => 'Ваши изменения сохранены.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Systém',\n            'Published a new version of the :monstra' => 'Bola vydaná nová verzia :monstra',\n            'Sitemap Created' => 'Mapa webstránky bola vytvorená',\n            'Create Sitemap' => 'Vytvoriť mapu webstránky',\n            'on' => 'Zapnúť',\n            'off'=> 'Vypnúť',\n            'Site url' => 'URL Webstránky',\n            'Maintenance Mode' => 'Údržba webstránky',\n            'Maintenance Mode On' => 'Zapnúť údržbu webstránky',\n            'Maintenance Mode Off' => 'Vypnúť údržbu webstránky',\n            'Site Settings' => 'Nastavenia webstránky',\n            'System Settings' => 'Nastavenia systému',\n            'Site Name' => 'Názov webstránky',\n            'Site Description' => 'Popis webstránky',\n            'Site Keywords' => 'Kľúčové slová webstránky',\n            'Site Slogan' => 'Slogan webstránky',\n            'Default Page' => 'Základná stránka - Default page',\n            'Time zone' => 'Časové pásmo',\n            'Language' => 'Jazyk',\n            'Email' => 'Email',\n            'Save' => 'Uložiť',\n            'System version' => 'Verzia systému',\n            'System version ID' => 'ID verzie systému',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Ladenie',\n            'Plugin API' => 'Plugin API',\n            'Plugins active' => 'Aktívne pluginy',\n            'Actions registered' => 'Registrované akcie',\n            'Filters registered' => 'Registrované filtre',\n            'Core' => 'Jadro',\n            'Delete Temporary Files' => 'Vymazať dočasné súbory',\n            'Download the latest version' => 'Stiahnuť najnovšiu verziu',\n            'Powered by' => 'Beží na',\n            'Administration' => 'Administrácia',\n            'Settings' => 'Nastavenia',\n            'Temporary files deleted' => 'Dočasné súbory boli vymazané',\n            'Extends' => 'Rozšírenia',\n            'View Site' => 'Zobraziť webstránku',\n            'Welcome, :username' => 'Vitaj, :username',\n            'Reset Password' => 'Obnoviť heslo',\n            'Back to Website' => 'Späť na webstránku',\n            'Forgot your password ?' => 'Zabudli ste heslo ?',\n            'Administration' => 'Administrácia',\n            'Send New Password' => 'Zaslať nové heslo',\n            'This user does not exist' => 'Tento používateľ neexistuje',\n            'Version' => 'Verzia',\n            'Plugin does not exist' => 'Plugin neexistuje',\n\n            'Install script writable' => 'Inštalačný skript je zapisovateľný',\n            'Install script not writable' => 'Inštalačný skript nie je zapisovateľný',\n            'Directory: <b> :dir </b> writable' => 'Priečinok: <b> :dir </b> je zapisovateľný',\n            'Directory: <b> :dir </b> not writable' => 'Priečinok: <b> :dir </b> nie je zapisovateľný',\n            'PHP Version' => 'Verzia PHP',\n            'Module DOM is installed' => 'Modul DOM je nainštalovaný',\n            'Module DOM is required' => 'Modul DOM je požadovaný',\n            'Module Mod Rewrite is installed' => 'Modul Apache Rewrite je nainštalovaný',\n            'Module SimpleXML is installed' => 'Modul SimpleXML je nainštalovaný',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 alebo vyšší je požadovaný',\n            'Apache Mod Rewrite is required' => 'Modul Apache Rewrite je požadovaný',\n            'SimpleXML module is required' => 'SimpleXML modul je požadovaný',\n            'Field \"Site name\" is empty' => 'Políčko \"Názov webstránky\" je prázdne',\n            'Field \"Email\" is empty' => 'Políčko \"Email\" je prázdne',\n            'Field \"Username\" is empty' => 'Políčko \"Používateľ\" je prázdne',\n            'Field \"Password\" is empty' => 'Políčko \"Heslo\" je prázdne',\n            'Field \"Site url\" is empty' => 'Políčko \"URL webstránky\" je prázdne',\n            'Email not valid' => 'Email nie je v správnom tvare',\n            'Install' => 'Inštalovať',\n            '...Monstra says...' => '...Monstra hovorí...',\n            'Sitemap file writable' => 'Súbor sitemap je zapisovateľný',\n            'Sitemap file not writable' => 'Súbor sitemap nie je zapisovateľný',\n            'Main .htaccess file writable' => 'Hlavný súbor .htaccess je zapisovateľný',\n            'Main .htaccess file not writable' => 'Hlavný súbor .htaccess nie je zapisovateľný',\n            'Official Support Forum' => 'Oficiálna podpora - Fórum',\n            'Documentation' => 'Dokumentácia',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Sistem',\n            'Published a new version of the :monstra' => 'Objavili smo novu verziju :monstr-e',\n            'Sitemap created' => 'Mapa sajta je Kreirana!!!',\n            'Create sitemap' => 'Kreiraj Mapu sajta',\n            'on' => 'uključeno',\n            'off'=> 'isključeno',\n            'Site url' => 'URL sajta',\n            'Maintenance Mode' => 'Mod Održavanja',\n            'Maintenance Mode On' => 'Uključi Mod Održavanja',\n            'Maintenance Mode Off' => 'Isključi Mod Održavanja',\n            'Site settings' => 'Podešavanja sajta',\n            'System settings' => 'Podešavanja sistema',\n            'Site name' => 'Ime sajta',\n            'Site description' => 'Opis sajta',\n            'Site keywords' => 'Ključne reči sajta',\n            'Site slogan' => 'Slogan sajta',\n            'Default page' => 'Početna stranica',\n            'Time zone' => 'Vremenska zona',\n            'Language' => 'Jezik',\n            'Email' => 'Email',\n            'Save' => 'Sačuvaj',\n            'Site' => 'Sajt',\n            'System version' => 'Sistemska verzija',\n            'System version ID' => 'ID sistemske verzije',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Odklanjanje grešaka',\n            'Plugin API' => 'Dodatak API',\n            'Plugins active' => 'Aktivni Dodaci',\n            'Actions registered' => 'Akcije su registrovane',\n            'Filters registered' => 'Filteri su registrovani',\n            'logout' => 'Izloguj se',\n            'site' => 'Sajt',\n            'Core' => 'Sistem',\n            'Delete temporary files' => 'Obriši privremene datoteke',\n            'Download the latest version' => 'Preuzmi poslednju verziju',\n            'Powered by' => 'Pokreće',\n            'Administration' => 'Administracija',\n            'Settings' => 'Podesavanja',\n            'Temporary files deleted' => 'Privremeni fajlovi obrisani',\n            'Extends' => 'Proširenja',\n            'View site' => 'Pogledaj sajt',\n            'Welcome, :username' => 'Dobrodošao, :username',\n            'Reset Password' => 'Resetuj šifru',\n            'Back to Website' => 'Nazad da websajt',\n            'Forgot your password ?' => 'Zaboravio si svoju šifru ?',\n            'Administration' => 'Administracija',\n            'Send New Password' => 'Pošalji novu šifru',\n            'This user does not exist' => 'Ovaj korisnik ne postoji',\n            'Version' => 'Verzija',\n            'Plugin does not exist' => 'Ovaj Dodatak ne postoji',\n            'Install script writable' => 'Instaliranje skripte',\n            'Install script not writable' => 'Nemoguće je instalirati skriptu',\n            'Directory: <b> :dir </b> writable' => 'Direktorijum: <b> :dir </b> dozvoljen za pisanje',\n            'Directory: <b> :dir </b> not writable' => 'Direktorijum: <b> :dir </b> nije dozvoljen za posanje',\n            'PHP Version' => 'PHP Verzija',\n            'Module DOM is installed' => 'Modul DOM je instaliran',\n            'Module DOM is required' => 'Modul DOM je Potreban',\n            'Module Mod Rewrite is installed' => 'Modul Mod Rewrite je instaliran',\n            'Module SimpleXML is installed' => 'Modul SimpleXML je instaliran',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 ili noviji je potreban',\n            'Apache Mod Rewrite is required' => 'Apache Mod Rewrite je potreban',\n            'SimpleXML module is required' => 'SimpleXML modul je potreban',\n            'Field \"Site name\" is empty' => 'Polje \"Site name\" je prazno',\n            'Field \"Email\" is empty' => 'Polje \"Email\" je prazno',\n            'Field \"Username\" is empty' => 'Polje \"Username\" je prazno',\n            'Field \"Password\" is empty' => 'Polje \"Password\" je prazno',\n            'Field \"Site url\" is empty' => 'Polje \"Site url\" je prazno',\n            'Email not valid' => 'Email nije validan',\n            'Install' => 'Instaliraj',\n            '...Monstra says...' => '...Monstra kaže...',\n            'Sitemap file writable' => 'Sitemap Fajl je dozvoljen za pisanje',\n            'Sitemap file not writable' => 'Sitemap Fajl nije dozvoljen za pisanje',\n            'Main .htaccess file writable' => 'Glavni .htaccess je dozvoljen za pisanje',\n            'Main .htaccess file not writable' => 'Glavni .htaccess nije dozvoljen za pisanje',\n            'Official Support Forum' => 'Zvaničan forum podrške',\n            'Documentation' => 'Dokumentacija',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Sistem',\n            'Published a new version of the :monstra' => ':monstra için yeni bir sürüm yayınlandı.',\n            'Sitemap created' => 'Site haritası oluşturuldu.',\n            'Create Sitemap' => 'Site Haritası Oluştur',\n            'on' => 'açık',\n            'off'=> 'kapalı',\n            'Site Url' => 'Site Url\\'si',\n            'Maintenance Mode' => 'Bakım Modu',\n            'Maintenance Mode On' => 'Bakım Modunu Aç',\n            'Maintenance Mode Off' => 'Bakım Modunu Kapat',\n            'Site Settings' => 'Site Ayarları',\n            'System Settings' => 'Sistem Ayarları',\n            'Site Name' => 'Site Adı',\n            'Site Description' => 'Site Açıklaması',\n            'Site Keywords' => 'Site Anahtar Sözcükleri',\n            'Site Slogan' => 'Site Sloganı',\n            'Default Page' => 'Açılış Sayfası',\n            'Time zone' => 'Zaman Dilimi',\n            'Language' => 'Dil',\n            'Email' => 'E-posta',\n            'Save' => 'Kaydet',\n            'Site' => 'Site',\n            'System version' => 'Sistem sürümü',\n            'System version ID' => 'Sistem sürüm ID',\n            'GZIP' => 'GZIP',\n            'Debugging' => 'Hata Ayıklama',\n            'Plugin API' => 'Eklenti API\\'si',\n            'Plugins active' => 'Etkin eklentiler',\n            'Actions registered' => 'Kayıtlı eylemler',\n            'Filters registered' => 'Kayıtlı filtreler',\n            'Delete Temporary Files' => 'Geçici Dosyaları Sil',\n            'Download the latest version' => 'En güncel sürümü indir',\n            'Powered by' => 'Geliştiren:',\n            'Administration' => 'Yönetim',\n            'Settings' => 'Ayarlar',\n            'Temporary files deleted' => 'Geçici dosyalar silindi',\n            'Extends' => 'Uzantılar',\n            'View Site' => 'Siteyi Gör',\n            'Welcome, :username' => 'Hoş geldin, :username',\n            'Reset Password' => 'Parola Sıfırla',\n            '< Back to Website' => '< Siteye Dön',\n            'Forgot your password? >' => 'Parolanızı unuttunuz mu? >',\n            'Administration >' => 'Yönetim >',\n            'Send New Password' => 'Yeni Parola Gönder',\n            'This user does not exist' => 'Bu kullanıcı bulunamadı',\n            'Version' => 'Sürüm',\n            'Plugin does not exist' => 'Eklenti bulunamadı',\n            'Help' => 'Yardım',\n\n            'Install script writable' => 'Kurulum betiği, yazma izinlerine sahip',\n            'Install script not writable' => 'Kurulum betiği, yazma izinlerine sahip değil',\n            'Directory: <b> :dir </b> writable' => '<b> :dir </b> dizini, yazma izinlerine sahip',\n            'Directory: <b> :dir </b> not writable' => '<b> :dir </b> dizini, yazma izinlerine sahip değil',\n            'PHP Version' => 'PHP Sürümü',\n            'Module DOM is installed' => 'DOM modülü kurulu',\n            'Module DOM is required' => 'DOM modülü gerekiyor',\n            'Module Mod Rewrite is installed' => 'Mod Rewrite modülü kurulu',\n            'Module SimpleXML is installed' => 'SimpleXML modülü kurulu',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 ya da sonrası gerekiyor',\n            'Apache Mod Rewrite is required' => 'Apache Mod Rewrite gerekiyor',\n            'SimpleXML module is required' => 'SimpleXML modülü gerekiyor',\n            'Field \"Site name\" is empty' => '\"Site Adı\" alanı boş',\n            'Field \"Email\" is empty' => '\"E-posta\" alanı boş',\n            'Field \"Username\" is empty' => '\"Kullanıcı Adı\" alanı boş',\n            'Field \"Password\" is empty' => '\"Parola\" alanı boş',\n            'Field \"Site url\" is empty' => '\"Site Url\\'si\" alanı boş',\n            'Email not valid' => 'E-posta adresi geçersiz',\n            'Continue' => 'Devam et',\n            'Install' => 'Yükle',\n            '...Monstra says...' => '...Monstra diyor ki...',\n            'Sitemap file writable' => 'Site haritası dosyası, yazma izinlerine sahip',\n            'Sitemap file not writable' => 'Site haritası dosyası, yazma izinlerine sahip değil',\n            'Main .htaccess file writable' => 'Ana dizindeki .htaccess dosyası, yazma izinlerine sahip',\n            'Main .htaccess file not writable' => 'Ana dizindeki .htaccess dosyası, yazma izinlerine sahip değil',\n            'Official Support Forum' => 'Resmi Destek Forumu',\n            'Documentation' => 'Belgeler',\n            'Your changes have been saved.' => 'Değişiklikleriniz kaydedildi.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => 'Система',\n            'Published a new version of the :monstra' => 'Опублікована нова версія :monstra',\n            'Sitemap created' => 'Мапа сайту створена',\n            'Create Sitemap' => 'Створити мапу сайту',\n            'on' => 'увімкнено',\n            'off'=> 'вимкнено',\n            'Site Url' => 'Адреса сайту',\n            'Maintenance Mode' => 'Технічне обслуговування',\n            'Maintenance Mode On' => 'Увімкнути технічне обслуговування',\n            'Maintenance Mode Off' => 'Вимкнути технічне обслуговування',\n            'Site Settings' => 'Налаштування сайту',\n            'System Settings' => 'Налаштування системи',\n            'Site Name' => 'Назва сайту',\n            'Site Description' => 'Опис сайту',\n            'Site Keywords' => 'Ключові слова',\n            'Site Slogan' => 'Слоган (гасло)',\n            'Default Page' => 'Сторінка за замовчуванням',\n            'Time zone' => 'Часовий пояс',\n            'Language' => 'Мова',\n            'Email' => 'Електронна пошта (Email)',\n            'Save' => 'Зберегти',\n            'Site' => 'Сайт',\n            'System version' => 'Версія системи',\n            'System version ID' => 'Версія системи ID',\n            'GZIP' => 'Стиснення GZIP',\n            'Debugging' => 'Дебаггінг',\n            'Plugin API' => 'Плагін API',\n            'Plugins active' => 'Підключені плагіни',\n            'Actions registered' => 'Зареєстровані дії',\n            'Filters registered' => 'Зареєстровані фільтри',\n            'Delete Temporary Files' => 'Видалити тимчасові файли',\n            'Download the latest version' => 'Завантажити останню версію',\n            'Powered by' => 'Працює на',\n            'Administration' => 'Адміністрування',\n            'Settings' => 'Налаштування',\n            'Temporary files deleted' => 'Тимчасові файли видалені',\n            'Extends' => 'Розширення',\n            'View Site' => 'Сайт',\n            'Welcome, :username' => 'Ласкаво просимо, :username',\n            'Reset Password' => 'Скидання пароля',\n            'Back to Website' => 'Повернутися на сайт',\n            'Forgot your password ?' => 'Не пам’ятаєте  пароль ?',\n            'Administration' => 'Адміністрування',\n            'Send New Password' => 'Надіслати новий пароль',\n            'This user does not exist' => 'Такого користувача не існує',\n            'Version' => 'Версія',\n            'Plugin does not exist' => 'Такий плагін не існує',\n            'Help' => 'Довідка',\n\n            'Install script writable' => 'Інсталяційний скрипт доступний для запису',\n            'Install script not writable' => 'Інсталяційний скрипт не доступний для запису',\n            'Directory: <b> :dir </b> writable' => 'Директорія <b> :dir </b> доступна для запису',\n            'Directory: <b> :dir </b> not writable' => 'Директорія <b> :dir </b> не доступна для запису',\n            'PHP Version' => 'Версія PHP',\n            'Module DOM is installed' => 'Модуль DOM встановлено',\n            'Module DOM is required' => 'Потрібен DOM модуль',\n            'Module Mod Rewrite is installed' => 'Модуль Mod Rewrite встановлено',\n            'Module SimpleXML is installed' => 'Модуль SimpleXML встановлено',\n            'PHP 5.2 or greater is required' => 'PHP 5.2 або вище',\n            'Apache Mod Rewrite is required' => 'Потрібен Apache Mod Rewrite',\n            'SimpleXML module is required' => 'Потрібен SimpleXML модуль',\n            'Field \"Site name\" is empty' => 'Поле \"Назва сайту\" не заповнено',\n            'Field \"Email\" is empty' => 'Поле \"Ел. пошта\" не заповнено',\n            'Field \"Username\" is empty' => 'Поле \"Ім’я користувача\" не заповнено',\n            'Field \"Password\" is empty' => 'Поле \"Пароль\" не заповнено',\n            'Field \"Site url\" is empty' => 'Поле \"Адреса сайту\" не заповнено',\n            'Email not valid' => 'Ел. пошта не дійсна',\n            'Continue' => 'Продовжити',\n            'Install' => 'Інсталювати',\n            '...Monstra says...' => '... Monstra каже ...',\n            'Sitemap file writable' => 'Карта сайту доступна для запису',\n            'Sitemap file not writable' => 'Карта сайту не доступна для запису',\n            'Main .htaccess file writable' => 'Головний .htaccess файл - доступний для запису',\n            'Main .htaccess file not writable' => 'Головний .htaccess файл - не доступний для запису',\n            'Official Support Forum' => 'Офіційний Форум Підтримки',\n            'Documentation' => 'Документація',\n            'Your changes have been saved.' => 'Ваші зміни були збережені.',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'system' => array(\n            'System' => '系统管理',\n            'Published a new version of the :monstra' => '发布一个新版本 :monstra',\n            'Sitemap created' => '网站地图已创建',\n            'Create Sitemap' => '创建网站地图',\n            'on' => '开',\n            'off'=> '关',\n            'Site Url' => '网站 Url',\n            'Maintenance Mode' => '维护模式',\n            'Maintenance Mode On' => '维护模式开',\n            'Maintenance Mode Off' => '维护模式关',\n            'Site Settings' => '网站设置',\n            'System Settings' => '系统设置',\n            'Site Name' => '网站名称',\n            'Site Description' => '网站描述',\n            'Site Keywords' => '文章关键词',\n            'Site Slogan' => '网站口号',\n            'Default Page' => '默认页面',\n            'Time zone' => '时区',\n            'Language' => '语言',\n            'Email' => '邮箱',\n            'Save' => '保存',\n            'Site' => '网站',\n            'System version' => '系统版本',\n            'System version ID' => '系统版本 ID',\n            'GZIP' => 'GZIP',\n            'Debugging' => '调试',\n            'Plugin API' => '插件 API',\n            'Plugins active' => '插件激活',\n            'Actions registered' => '注册操作',\n            'Filters registered' => '注册过滤',\n            'Delete Temporary Files' => '删除临时文件',\n            'Download the latest version' => '下载最新的版本',\n            'Powered by' => '技术支持',\n            'Administration' => '后台管理',\n            'Settings' => '设置',\n            'Temporary files deleted' => '临时文件已删除',\n            'Extends' => '扩展管理',\n            'View Site' => '查看网站',\n            'Welcome, :username' => '欢迎, :username',\n            'Reset Password' => '重设密码',\n            'Back to Website' => '返回网站',\n            'Forgot your password ?' => '忘记密码 ？',\n            'Administration' => '管理',\n            'Send New Password' => '发送新密码',\n            'This user does not exist' => '此用户不存在',\n            'Version' => '版本',\n            'Plugin does not exist' => '插件不存在',\n\n            'Install script writable' => '安装脚本可写',\n            'Install script not writable' => '安装脚本不可写',\n            'Directory: <b> :dir </b> writable' => '目录: <b> :dir </b> 可写',\n            'Directory: <b> :dir </b> not writable' => '目录: <b> :dir </b> 不可写',\n            'PHP Version' => 'PHP 版本',\n            'Module DOM is installed' => '模块 DOM 已安装',\n            'Module DOM is required' => '模块 DOM 是必需的',\n            'Module Mod Rewrite is installed' => '模块 Mod Rewrite 已安装',\n            'Module SimpleXML is installed' => '模块 SimpleXML 已安装',\n            'PHP 5.2 or greater is required' => '必须是 PHP 5.2 或更高版本',\n            'Apache Mod Rewrite is required' => '必须开启 Apache Mod Rewrite',\n            'SimpleXML module is required' => '必须开启 SimpleXML 模块',\n            'Field \"Site name\" is empty' => '\"网站名称\" 字段为空',\n            'Field \"Email\" is empty' => '\"邮箱地址\" 字段为空',\n            'Field \"Username\" is empty' => '\"用户名\" 字段为空',\n            'Field \"Password\" is empty' => '\"密码\" 字段为空',\n            'Field \"Site url\" is empty' => '\"网站 url\" 字段为空',\n            'Email not valid' => '邮箱地址无效',\n            'Install' => '安装',\n            '...Monstra says...' => '...Monstra 提示...',\n            'Sitemap file writable' => '网站地图文件可写',\n            'Sitemap file not writable' => '网站地图文件不可写',\n            'Main .htaccess file writable' => '主要 .htaccess 文件可写',\n            'Main .htaccess file not writable' => '主要 .htaccess 文件不可写',\n            'Official Support Forum' => '官方支持论坛',\n            'Documentation' => '文档',\n\t\t\t'Your changes have been saved.' => '您的更改已保存。',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/system/system.admin.php",
    "content": "<?php\n\n// Add Monstra check action\nif (CHECK_MONSTRA_VERSION) {\n    Action::add('admin_post_template', 'checkMonstraVersion', 9999);\n}\n\n/**\n * Check Monstra version\n */\nfunction checkMonstraVersion()\n{\n    echo ('\n            <script type=\"text/javascript\">\n                $.getJSON(\"http://monstra.org/api/version.php?jsoncallback=?\",\n                    function(data){\n                        var current_monstra_version = \"'.Monstra::VERSION.'\";\n                        var stable_monstra_version = data.version;\n                        if (current_monstra_version < stable_monstra_version) {\n                            $(\"#update-monstra\").addClass(\"alert alert-info\").html(\"'.__(\"Published a new version of the :monstra\", \"system\", array(\":monstra\" => \"<a target='_blank' href='http://monstra.org/download'>Monstra</a>\")).'\");\n                        }\n                    }\n                );\n            </script>\n    ');\n}\n\n/**\n * System Admin\n */\nclass SystemAdmin extends Backend\n{\n    /**\n     * System plugin admin\n     */\n    public static function main()\n    {\n        if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {\n\n            $filters    = Filter::$filters;\n            $plugins    = Plugin::$plugins;\n            $components = Plugin::$components;\n            $actions    = Action::$actions;\n\n            // Get pages table\n            $pages = new Table('pages');\n\n            // Get system timezone\n            $system_timezone = Option::get('timezone');\n\n            // Get languages files\n            $language_files = File::scan(PLUGINS_BOX . DS . 'system' . DS . 'languages' . DS, '.lang.php');\n            foreach ($language_files as $language) {\n                $parts = explode('.', $language);\n                $languages_array[$parts[0]] = I18n::$locales[$parts[0]];\n            }\n\n            // Get all pages\n            $pages_array = array();\n            $pages_list = $pages->select('[slug!=\"error404\" and parent=\"\" and status=\"published\"]');\n            foreach ($pages_list as $page) {\n                $pages_array[$page['slug']] = Html::toText($page['title']);\n            }\n\n            // Create Sitemap\n            // -------------------------------------\n            if (Request::get('sitemap') == 'create') {\n\n                if (Security::check(Request::get('token'))) {\n\n                    Notification::set('success', __('Sitemap created', 'system'));\n\n                    Sitemap::create();\n\n                    Request::redirect('index.php?id=system');\n\n                } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n            }\n\n            // Delete temporary files\n            // -------------------------------------\n            if (Request::get('temporary_files') == 'delete') {\n\n                if (Security::check(Request::get('token'))) {\n\n                    Monstra::cleanTmp();\n\n                    if (count(File::scan(MINIFY, array('css', 'js', 'php'))) == 0 && count(Dir::scan(CACHE)) == 0) {\n                        Notification::set('success', __('Temporary files deleted', 'system'));\n                        Request::redirect('index.php?id=system');\n                    }\n\n                } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n            }\n\n            // Set maintenance state on or off\n            // -------------------------------------\n            if (Request::get('maintenance')) {\n\n                if (Security::check(Request::get('token'))) {\n\n                    if ('on' == Request::get('maintenance')) {\n                        Option::update('maintenance_status', 'on');\n                        Request::redirect('index.php?id=system');\n                    }\n\n                    if ('off' == Request::get('maintenance')) {\n                        Option::update('maintenance_status', 'off');\n                        Request::redirect('index.php?id=system');\n                    }\n\n                } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n            }\n\n            // Edit settings\n            // -------------------------------------\n            if (Request::post('edit_settings')) {\n\n                if (Security::check(Request::post('csrf'))) {\n\n                    // Add trailing slashes\n                    $_site_url = Request::post('system_url');\n\n                    Option::update(array('sitename'          => Request::post('site_name'),\n                                       'keywords'            => Request::post('site_keywords'),\n                                       'description'         => Request::post('site_description'),\n                                       'slogan'              => Request::post('site_slogan'),\n                                       'defaultpage'         => Request::post('site_default_page'),\n                                       'siteurl'             => $_site_url,\n                                       'timezone'            => Request::post('system_timezone'),\n                                       'system_email'        => Request::post('system_email'),\n                                       'language'            => Request::post('system_language'),\n                                       'maintenance_message' => Request::post('site_maintenance_message')));\n\n                    Notification::set('success', __('Your changes have been saved.', 'system'));\n                    Request::redirect('index.php?id=system');\n\n                } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n            }\n\n            // Its mean that you can add your own actions for this plugin\n            Action::run('admin_system_extra_actions');\n\n            // Display view\n            View::factory('box/system/views/backend/index')\n                    ->assign('pages_array', $pages_array)\n                    ->assign('languages_array', $languages_array)\n                    ->display();\n\n        } else {\n\n            Request::redirect('index.php?id=users&action=edit&user_id='.Session::get('user_id'));\n        }\n    }\n}\n"
  },
  {
    "path": "plugins/box/system/system.plugin.php",
    "content": "<?php\n\n/**\n *\tSystem plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('System', 'system'),\n                __('System plugin', 'system'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {\n\n    // Admin top navigation\n    Navigation::add(__('Welcome, :username', 'system', array(':username' => Session::get('user_login'))), 'top', 'users&action=edit&user_id='.Session::get('user_id'), 1, Navigation::TOP, false);\n    Navigation::add(__('View Site', 'system'), 'top', Option::get('siteurl'), 2, Navigation::TOP, true);\n    Navigation::add(__('Log Out', 'users'), 'top', '&logout=do', 3, Navigation::TOP, false);\n\n    if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {\n        Navigation::add(__('Settings', 'system'), 'system', 'system', 1);\n    }\n\n}\n\nPlugin::Admin('system', 'box');\n"
  },
  {
    "path": "plugins/box/system/views/backend/index.view.php",
    "content": "<?php echo Html::anchor(__('Create Sitemap', 'system'), 'index.php?id=system&sitemap=create&token='.Security::token(), array('class' => 'btn btn-phone btn-default')).Html::nbsp(2); ?>\n<?php echo Html::anchor(__('Delete Temporary Files', 'system'), 'index.php?id=system&temporary_files=delete&token='.Security::token(), array('class' => 'btn btn-phone btn-default')).Html::nbsp(2); ?>\n<?php if ('off' == Option::get('maintenance_status', 'system')) { ?>\n<?php echo Html::anchor(__('Maintenance Mode On', 'system'), 'index.php?id=system&maintenance=on&token='.Security::token(), array('class' => 'btn btn-phone btn-default')); ?>\n<?php } else { ?>\n<?php echo Html::anchor(__('Maintenance Mode Off', 'system'), 'index.php?id=system&maintenance=off&token='.Security::token(), array('class' => 'btn btn-phone btn-danger')); ?>\n<?php } ?>\n<?php Action::run('admin_system_extra_buttons'); ?>\n\n<hr>\n\n<div class=\"row\">\n    <div class=\"col-md-6\">\n        <h2 class=\"margin-bottom-1\"><?php echo __('Site Settings', 'system'); ?></h2>\n        <?php\n            echo (\n                Form::open().\n                Form::hidden('csrf', Security::token())\n                );\n            ?>\n            <div class=\"form-group\">\n            <?php\n                echo (\n                    Form::label('site_name', __('Site Name', 'system')).\n                    Form::input('site_name', Option::get('sitename'), array('class' => 'form-control'))\n                );\n            ?>\n            </div>\n            <div class=\"form-group\">\n            <?php \n                echo (\n                    Form::label('site_description', __('Site Description', 'system')).\n                    Form::textarea('site_description', Option::get('description'), array('class' => 'form-control'))\n                );\n            ?>\n            </div>\n            <div class=\"form-group\">\n            <?php\n                echo (\n                    Form::label('site_keywords', __('Site Keywords', 'system')).\n                    Form::input('site_keywords', Option::get('keywords'), array('class' => 'form-control'))\n                );\n            ?>\n            </div>\n            <div class=\"form-group\">\n            <?php\n                echo (\n                    Form::label('site_slogan', __('Site Slogan', 'system')).\n                    Form::input('site_slogan', Option::get('slogan'), array('class' => 'form-control'))\n                );\n            ?>\n            </div>\n            <div class=\"form-group\">\n            <?php \n                echo (\n                    Form::label('site_default_page', __('Default Page', 'system')).\n                    Form::select('site_default_page', $pages_array, Option::get('defaultpage'), array('class' => 'form-control'))\n                );\n            ?>\n        </div>\n    </div>\n    <div class=\"col-md-6\">\n        <h2 class=\"margin-bottom-1\"><?php echo __('System Settings', 'system'); ?></h2>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('system_url', __('Site Url', 'system')).\n                Form::input('system_url', Option::get('siteurl'), array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php            \n            echo (\n                Form::label('system_timezone', __('Time zone', 'system')).\n                Form::select('system_timezone', Date::timezones(), Option::get('timezone'), array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('system_language', __('Language', 'system')).\n                Form::select('system_language', $languages_array, Option::get('language'), array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('system_email', __('Email', 'system')).\n                Form::input('system_email', Option::get('system_email'), array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('site_maintenance_message', __('Maintenance Mode', 'system')).\n                Form::textarea('site_maintenance_message', Html::toText(Option::get('maintenance_message')), array('class' => 'form-control', 'style' => 'height:160px;'))\n            );\n        ?>\n        </div>\n    </div>\n</div>\n\n<div class=\"row\">\n    <div class=\"col-md-6\">\n        <?php\n            echo (\n                Form::submit('edit_settings', __('Save', 'system'), array('class' => 'btn btn-phone btn-primary')).\n                Form::close()\n            );\n        ?>   \n    </div> \n</div>\n\n<?php\n    // Custom code for this plugin\n    Action::run('admin_system_extra_index_template_actions');\n?>\n"
  },
  {
    "path": "plugins/box/themes/install/themes.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/themes/themes.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>3</plugin_priority>\n    <plugin_name>Themes</plugin_name>\n    <plugin_description>Themes managment plugin</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/themes/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Témata',\n            'Themes manager' => 'Manažer témat',\n            'Select Theme' => 'Vybrat téma',\n            'Save' => 'Uložit',\n            'Save and Exit' => 'Uložit a ukončit',\n            'Name' => 'Název',\n            'Create New Template' => 'Vytvořit nové téma',\n            'New Template' => 'Nová téma',\n            'Delete template: :name' => 'Vymazat téma: :name',\n            'Delete chunk: :name' => 'Vymazat sekci: :name',\n            'Delete styles: :name' => 'Vymazat CSS styl: :name',\n            'Templates' => 'Témy',\n            'Clone' => 'Klonovat',\n            'Edit' => 'Editovat',\n            'Delete' => 'Vymazat',\n            'Actions' => 'Akcie',\n            'Create New Chunk' => 'Vytvořit novou sekci',\n            'New Chunk' => 'Nová sekce',\n            'Chunks' => 'Sekce',\n            'Create New Styles' => 'Vytvořit nový CSS styl',\n            'New Styles' => 'Nový CSS styl',\n            'Styles' => 'CSS styly',\n            'Template content' => 'Obsah tématu',\n            'Styles content' => 'Obsah CSS stylu',\n            'Chunk content' => 'Obsah sekce',\n            'Edit Template' => 'Editovat téma',\n            'Edit Chunk' => 'Editovat sekci',\n            'Edit Styles' => 'Editovat CSS styl',\n            'Current Site Theme' => 'Aktuální téma webu',\n            'Current admin theme' => 'Aktuální téma administrace',\n            'This template already exists' => 'Toto téma již existuje',\n            'This chunk already exists' => 'Tato sekce již existuje',\n            'This styles already exist' => 'Tento CSS styl již existuje',\n            'Components templates' => 'Téma komponentů',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Vaše změny v sekci <i>:name</i> byly uloženy.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Vaše změny v CSS stylu <i>:name</i> byly uloženy.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Vaše změny v tématu <i>:name</i> byly uloženy.',\n            'Chunk <i>:name</i> deleted' => 'Sekce <i>:name</i> odstraněna',\n            'Required field' => 'Povinné políčko',\n            'Scripts' => 'Skripty',\n            'Site Theme' => 'Téma webu',\n            'Admin Theme' => 'Téma administrace',\n            'Create New Script' => 'Vytvořit nový skript',\n            'Script content' => 'Obsah skriptu',\n            'New Script' => 'Nový skript',\n            'Edit Script' => 'Editovat skript',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Themes',\n            'Themes manager' => 'Themes Manager',\n            'Select Theme' => 'Wähle Theme',\n            'Save' => 'Speichern',\n            'Save and Exit' => 'Speichern und Schließen',\n            'Name' => 'Name',\n            'Create New Template' => 'Erstelle neues Template',\n            'New Template' => 'Neues Template',\n            'Admin Theme' => 'Admin Theme',\n            'Delete template: :name' => 'Lösche Template: :name',\n            'Delete chunk: :name' => 'Lösche Chunk: :name',\n            'Delete styles: :name' => 'Lösche Styles: :name',\n            'Templates' => 'Templates',\n            'Clone' => 'Klonen',\n            'Edit' => 'Bearbeiten',\n            'Delete' => 'Löschen',\n            'Actions' => 'Aktionen',\n            'Create New Chunk' => 'Erstelle neuen chunk',\n            'New Chunk' => 'Neuer Chunk',\n            'Chunks' => 'Chunks',\n            'Create New Styles' => 'Erstelle neue Styles',\n            'New Styles' => 'Neue Styles',\n            'Styles' => 'Styles',\n            'Template content' => 'Template Inhalt',\n            'Styles content' => 'Styles Inhalt',\n            'Chunk content' => 'Chunk Inhalt',\n            'Edit Template' => 'Bearbeite Template',\n            'Edit Chunk' => 'Bearbeite Chunk',\n            'Edit Styles' => 'Bearbeite Styles',\n            'Current Site Theme' => 'Aktuelles Seiten Template',\n            'Current admin theme' => 'Aktuelles Admin Template',\n            'This template already exists' => 'Dieses Template existiert bereits',\n            'This chunk already exists' => 'Dieser Chunk exisitert bereits',\n            'This styles already exists' => 'Diese Styles existieren bereits',\n            'Components templates' => 'Komponenten Templates',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Deine Änderungen für das Chunk <i>:name</i> wurden gespeichert.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Deine Änderungen für die Styles <i>:name</i> wurden gespeichert.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Deine Änderungen für das Template <i>:name</i> wurden gespeichert.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'This field should not be empty' => 'Dieses Feld darf nicht leer sein.',\n            'Scripts' => 'Scripts',\n            'Create New Script' => 'Erstelle neues Script',\n            'Script content' => 'Script Inhalt',\n            'New Script' => 'Neues Script',\n            'Edit Script' => 'Bearbeite Script',\n            'Site Theme' => 'Seiten Theme',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Themes',\n            'Themes manager' => 'Themes manager',\n            'Select Theme' => 'Select Theme',\n            'Save' => 'Save',\n            'Save and Exit' => 'Save and Exit',\n            'Name' => 'Name',\n            'Create New Template' => 'Create New Template',\n            'New Template' => 'New Template',\n            'Delete template: :name' => 'Delete template: :name',\n            'Delete chunk: :name' => 'Delete chunk: :name',\n            'Delete styles: :name' => 'Delete styles: :name',\n            'Templates' => 'Templates',\n            'Clone' => 'Clone',\n            'Edit' => 'Edit',\n            'Delete' => 'Delete',\n            'Actions' => 'Actions',\n            'Admin Theme' => 'Admin Theme',\n            'Create New Chunk' => 'Create New Chunk',\n            'New Chunk' => 'New Chunk',\n            'Chunks' => 'Chunks',\n            'Create New Styles' => 'Create New Styles',\n            'New Styles' => 'New Styles',\n            'Styles' => 'Styles',\n            'Template content' => 'Template content',\n            'Styles content' => 'Styles content',\n            'Chunk content' => 'Chunk content',\n            'Edit Template' => 'Edit Template',\n            'Edit Chunk' => 'Edit Chunk',\n            'Edit Styles' => 'Edit Styles',\n            'Current Site Theme' => 'Current Site Theme',\n            'Current admin theme' => 'Current admin theme',\n            'This template already exists' => 'This template already exists',\n            'This chunk already exists' => 'This chunk already exists',\n            'This styles already exist' => 'This styles already exists',\n            'Components templates' => 'Components templates',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Your changes to the chunk <i>:name</i> have been saved.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Your changes to the styles <i>:name</i> have been saved.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Your changes to the template <i>:name</i> have been saved.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'Required field' => 'Required field',\n            'Scripts' => 'Scripts',\n            'Create New Script' => 'Create New Script',\n            'Script content' => 'Script content',\n            'New Script' => 'New Script',\n            'Edit Script' => 'Edit Script',\n            'Site Theme' => 'Site Theme',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Temas',\n            'Themes manager' => 'Administrador de temas',\n            'Select Theme' => 'Seleccionar tema',\n            'Save' => 'Guardar',\n            'Save and Exit' => 'Guardar y salir',\n            'Name' => 'Nombre',\n            'Create New Template' => 'Crear nueva plantilla',\n            'New Template' => 'Nueva plantilla',\n            'Delete template: :name' => 'Eliminar plantilla: :name',\n            'Delete chunk: :name' => 'Eliminar chunk: :name',\n            'Delete styles: :name' => 'Eliminar estilo: :name',\n            'Templates' => 'Plantillas',\n            'Clone' => 'Clonar',\n            'Edit' => 'Editar',\n            'Delete' => 'Eliminar',\n            'Actions' => 'Acciones',\n            'Create New Chunk' => 'Crear nuevo chunk',\n            'New Chunk' => 'Nuevo chunk',\n            'Chunks' => 'Chunks',\n            'Create New Styles' => 'Crear nuevo estilo',\n            'New Styles' => 'Nuevo estilo',\n            'Styles' => 'Estilos',\n            'Template content' => 'Contenido de la plantilla',\n            'Styles content' => 'Contenido del estilo',\n            'Chunk content' => 'Contenido del chunk',\n            'Edit Template' => 'Editar plantilla',\n            'Edit Chunk' => 'Editar chunk',\n            'Edit Styles' => 'Editar estilo',\n            'Site Theme' => 'Tema del sitio',\n            'Admin Theme' => 'Tema del backend',\n            'Current Site Theme' => 'Tema actual del sitio',\n            'Current admin theme' => 'Tema actual de administración',\n            'This template already exists' => 'Esta plantilla ya existe',\n            'This chunk already exists' => 'Este chunk ya existe',\n            'This styles already exist' => 'Este estilo ya existe',\n            'Components templates' => 'Componentes de plantillas',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Tus cambios realizados en el chunk <i>:name</i> han sido guardados.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Tus cambios realizados en el estilo <i>:name</i> han sido guardados.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Tus cambios realizados en la plantilla <i>:name</i> han sido guardados.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> eliminado',\n\t    'Template <i>:name</i> deleted' => 'Plantilla <i>:name</i> eliminada',\n\t    'Styles <i>:name</i> deleted' => 'Estilo <i>:name</i> eliminado',\n            'Required field' => 'Dato requerido',\n            'Scripts' => 'Scripts',\n            'Create New Script' => 'Crear nuevo script',\n            'Script content' => 'Contenido del script',\n            'New Script' => 'Nuevo script',\n            'Edit Script' => 'Editar script',\n            'Site Theme' => 'Tema del sitio',\n            'Cancel' => 'Cancelar',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'پوسته',\n            'Themes manager' => 'مدیریت پوسته',\n            'Select Theme' => 'انتخاب پوسته',\n            'Save' => 'ذخیره',\n            'Save and Exit' => 'ذخیره و خروج',\n            'Name' => 'نام',\n            'Create New Template' => 'ایجاد قالب جدید',\n            'New Template' => 'قالب جدید',\n            'Delete template: :name' => 'حذف قالب: :name',\n            'Delete chunk: :name' => 'حذف قسمت: :name',\n            'Delete styles: :name' => 'حذف استایل: :name',\n            'Templates' => 'قالب ها',\n            'Clone' => 'کپی برداری',\n            'Edit' => 'ویرایش',\n            'Delete' => 'حذف',\n            'Actions' => 'عملیات',\n            'Admin Theme' => 'قالب مدیریت',\n            'Create New Chunk' => 'ایجاد قسمت جدید',\n            'New Chunk' => 'قسمت جدید',\n            'Chunks' => 'قسمتها',\n            'Create New Styles' => 'ایجاد استایل جدید',\n            'New Styles' => 'استایل جدید',\n            'Styles' => 'استایل',\n            'Template content' => 'محتوی قالب',\n            'Styles content' => 'محتوی استایل',\n            'Chunk content' => 'محتوی قسمت',\n            'Edit Template' => 'ویرایش قالب',\n            'Edit Chunk' => 'ویرایش قسمت',\n            'Edit Styles' => 'ویرایش استایل',\n            'Current site theme' => 'پوسته فعلی سایت',\n            'Current admin theme' => 'پوسته فعلی مدیریت',\n            'This template already exists' => 'این قالب هم اکنون موجود است',\n            'This chunk already exists' => 'این قسمت هم اکنون موجود است',\n            'This styles already exist' => 'این استایل هم اکنون موجود است',\n            'Components templates' => 'قالب کامپوننت',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'تغییرات شما بر روی قسمت <i>:name</i> ذخیره شد.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'تغییرات شما بر روی استایل <i>:name</i> ذخیره شد.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'تغییرات شما بر روی قالب <i>:name</i> ذخیره شد.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'Required field' => 'کادرهای الزامی',\n            'Scripts' => 'اسکریپت ها',\n            'Create New Script' => 'ایجاد اسکریپت جدید',\n            'Script content' => 'اسکریپت محتوا',\n            'New Script' => 'اسکریپت جدید',\n            'Edit Script' => 'ویرایش اسکریپت',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Thèmes',\n            'Themes manager' => 'Gestionnaire de thèmes',\n            'Select theme' => 'Sélectionner un thème',\n            'Save' => 'Enregistrer',\n            'Save and exit' => 'Enregistrer et sortir',\n            'Name' => 'Nom',\n            'Create new template' => 'Créer un nouveau modèle',\n            'New template' => 'Nouveau modèle',\n            'Delete template: :name' => 'Supprimer le modèle :name',\n            'Delete chunk: :name' => 'Supprimer le chunk: :name', // pièce ou composants\n            'Delete styles: :name' => 'Supprimer les styles: :name',\n            'Templates' => 'Mdèles',\n            'Clone' => 'Clone',\n            'Edit' => 'Editer',\n            'Delete' => 'Supprimer',\n            'Actions' => 'Actions',        \n            'Create new chunk' => 'Créer un nouveau chunk',\n            'New chunk' => 'Nouveau chunk',\n            'Chunks' => 'Chunks',\n            'Create new styles' => 'Créer de nouveaux styles',\n            'New styles' => 'Nouveaux styles',\n            'Styles' => 'Styles',\n            'Template content' => 'Contenu du modèle',\n            'Styles content' => 'Contenu des styles',\n            'Chunk content' => 'Contenu du chunk',\n            'Edit template' => 'Editer le modèle',\n            'Edit chunk' => 'Editer le chunk',\n            'Edit styles' => 'Editer les styles',\n            'Current site theme' => 'Thème actuel du site',\n            'Current admin theme' => 'Thème actuel de l\\'admin',\n            'This template already exists' => 'Ce modèle existe déjà',\n            'This chunk already exists' => 'Ce chunk existe déjà',\n            'This styles already exist' => 'Ce style existe déjà',\n            'Components templates' => 'modèles de composants',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Les modifications apportées au chunk <i>:name</i> ont été enregistrées.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Les modifications apportées au styles <i>:name</i> ont été enregistrées.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Les modifications apportées au modèle <i>:name</i> ont été enregistrées.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'Required field' => 'Champs requis',\n            'Scripts' => 'Scripts',\n            'Create new script' => 'Créer un nouveau script',\n            'Script content' => 'contenu du script',\n            'New script' => 'Nouveau script',\n            'Edit script' => 'Editer le script',\n        )\n    );"
  },
  {
    "path": "plugins/box/themes/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Sablonok',\n            'Themes manager' => 'Sablonkezelő',\n            'Select Theme' => 'Sablon választás',\n            'Save' => 'Mentés',\n            'Save and Exit' => 'Mentés és Kilépés',\n            'Name' => 'Név',\n            'Create New Template' => 'Új Sablon Készítése',\n            'New Template' => 'Új Sablon',\n            'Delete template: :name' => 'Sablon törölve: :name',\n            'Delete chunk: :name' => 'Chunk törölve: :name',\n            'Delete styles: :name' => 'Styles törölve: :name',\n            'Templates' => 'Sablonok',\n            'Clone' => 'Klón',\n            'Edit' => 'Szerkeszt',\n            'Delete' => 'Törlés',\n            'Actions' => 'Műveletek',\n            'Admin Theme' => 'Admin Sablon',\n            'Create New Chunk' => 'Új Chunk készítése',\n            'New Chunk' => 'Új Chunk',\n            'Chunks' => 'Chunks',\n            'Create New Styles' => 'Új Styles készítése',\n            'New Styles' => 'Új Styles',\n            'Styles' => 'Styles',\n            'Template content' => 'Sablon tartalma',\n            'Styles content' => 'Styles tartalma',\n            'Chunk content' => 'Chunk tartalma',\n            'Edit Template' => 'Sablon szerkesztése',\n            'Edit Chunk' => 'Chunk szerkesztése',\n            'Edit Styles' => 'Styles szerkesztése',\n            'Current Site Theme' => 'Jelenlegi Oldal Sablon',\n            'Current admin theme' => 'Jelenlegi admin Sablon',\n            'This template already exists' => 'Ez a sablon már létezik',\n            'This chunk already exists' => 'Ez a chunk már létezik',\n            'This styles already exist' => 'Ez a styles már létezik',\n            'Components templates' => 'Components sablonok',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'A chunk <i>:name</i> változtatásai mentve.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'A styles <i>:name</i> változtatásai mentve.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'A sablon <i>:name</i> változtatásai mentve.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'Required field' => 'Kötelező mező',\n            'Scripts' => 'Szkriptek',\n            'Create New Script' => 'Új Szkript Készítése',\n            'Script content' => 'Szkript tartalma',\n            'New Script' => 'Új Szkript',\n            'Edit Script' => 'Szkript Szerkesztése',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Tema',\n            'Themes manager' => 'Pengelolaan Tema',\n            'Select Theme' => 'Pilih Tema',\n            'Save' => 'Simpan',\n            'Save and Exit' => 'Simpan dan Keluar',\n            'Name' => 'Nama',\n            'Create New Template' => 'Buat Template Baru',\n            'New Template' => 'Template Baru',\n            'Delete template: :name' => 'Hapus Template: :name',\n            'Delete chunk: :name' => 'Hapus chunk: :name',\n            'Delete styles: :name' => 'Hapus model: :name',\n            'Templates' => 'Template',\n            'Clone' => 'Duplikasi',\n            'Edit' => 'Perbaiki',\n            'Delete' => 'Hapus',\n            'Actions' => 'Tindakan',\n            'Create New Chunk' => 'Buat Chunk Baru',\n            'New chunk' => 'Chunk Baru',\n            'Chunks' => 'chunks',\n            'Create New Styles' => 'Buat Model Baru',\n            'New Styles' => 'Model Baru',\n            'Styles' => 'Model',\n            'Template Content' => 'Isi Template',\n            'Styles Content' => 'Model Template',\n            'Chunk content' => 'Isi Chunk',\n            'Edit Cemplate' => 'Perbaiki Template',\n            'Edit Chunk' => 'Perbaiki Chunk',\n            'Edit Styles' => 'Perbaiki Model',\n            'Site Theme' => 'Tema Situs',\n            'Admin Theme' => 'Tema Admin',\n            'Current Site Theme' => 'Tema Situs Sekarang',\n            'Current Admin Theme' => 'Tema Admin Sekarang',\n            'This template already exists' => 'Template ini sudah ada',\n            'This chunk already exists' => 'Chunk ini sudah ada',\n            'This styles already exist' => 'Model ini sudah ada',\n            'Components Templates' => 'Komponen template',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Perubahan pada chunk <i>:name</i> telah disimpan.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Perubahan pada model <i>:name</i> telah disimpan.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Perubahan pada template <i>:name</i> telah disimpan.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'Required field' => 'Isian yang Diperlukan',\n            'Scripts' => 'Skrip',\n            'Create New Script' => 'Buat Skrip Baru',\n            'Script Content' => 'Isi Skrip',\n            'New Script' => 'Skrip Baru',\n            'Edit Script' => 'Perbaiki Skrip',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Temi',\n            'Themes manager' => 'Gestione temi',\n            'Select Theme' => 'Scegli tema',\n            'Save' => 'Salva',\n            'Name' => 'Nome',\n            'Save and Exit' => 'Salva ed esci',\n            'Create New Template' => 'Crea nuovo modello',\n            'New Template' => 'Nuovo modello',\n            'Delete template: :name' => 'Elimina modello: :name',\n            'Delete chunk: :name' => 'Elimina chunk: :name',\n            'Delete styles: :name' => 'Elimina stili: :name',\n            'Templates' => 'Templates',\n            'Clone' => 'Duplica',\n            'Edit' => 'Modifica',\n            'Delete' => 'Elimina',\n            'Actions' => 'Azioni',\n            'Create New Chunk' => 'Crea nuovo chunk',\n            'New Chunk' => 'Nuovo chunk',\n            'Chunks' => 'Chunks',\n            'Create New Styles' => 'Crea nuovi stili',\n            'New Styles' => 'Nuovi stili',\n            'Styles' => 'Stili',\n            'Template content' => 'Contenuto del modello',\n            'Styles content' => 'Contenuto dei stili',\n            'Chunk content' => 'Contenuto del chunk',\n            'Edit Template' => 'Modifica modello',\n            'Edit Chunk' => 'Modifica chunk',\n            'Edit Styles' => 'Modifica stili',\n            'Site Theme' => 'Tema del sito',\n            'Admin Theme' => 'Tema del backend',\n            'Current Site Theme' => 'Tema corrente del sito',\n            'Current admin theme' => 'Tema corrente del backend',\n            'This template already exists' => 'Tale modello già esistente',\n            'This chunk already exists' => 'Tale chunk già esistente',\n            'This styles already exist' => 'Tale stili già esistenti',\n            'Components templates' => 'Modello dei componenti',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Le modifiche al chunk <i>:name</i> sono state salvate',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Le modifiche ai stili <i>:name</i> sono state salvate',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Le modifiche al modello <i>:name</i> sono state salvate',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'Required field' => 'Campo obbligatorio',\n            'Scripts' => 'Script',\n            'Create New Script' => 'Crea nuovo script',\n            'Script content' => 'Contenuto dello script',\n            'New Script' => 'Nuovo script',\n            'Edit Script' => 'Modifica script',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'テーマ',\n            'Themes manager' => 'テーマの管理',\n            'Select Theme' => 'テーマの選択',\n            'Save' => '保存',\n            'Save and Exit' => '保存して終了',\n            'Name' => '名前',\n            'Create New Template' => '新規テンプレートの作成',\n            'New Template' => '新規テンプレート',\n            'Delete template: :name' => 'テンプレートの削除: :name',\n            'Delete chunk: :name' => 'チャンクの削除: :name',\n            'Delete styles: :name' => 'スタイルの削除: :name',\n            'Templates' => 'テンプレート',\n            'Clone' => '複製',\n            'Edit' => '編集',\n            'Delete' => '削除',\n            'Actions' => '操作',\n            'Admin Theme' => '管理者テーマ',\n            'Create New Chunk' => '新規チャンクの作成',\n            'New Chunk' => '新規チャンク',\n            'Chunks' => 'チャンク',\n            'Create New Styles' => '新規スタイルの作成',\n            'New Styles' => '新規スタイル',\n            'Styles' => 'スタイル',\n            'Template content' => '内容のテンプレート',\n            'Styles content' => 'スタイルの内容',\n            'Chunk content' => 'チャンクの内容',\n            'Edit Template' => 'テンプレートの編集',\n            'Edit Chunk' => 'チャンクの編集',\n            'Edit Styles' => 'スタイルの編集',\n            'Current Site Theme' => '現在のサイトテーマ',\n            'Current admin theme' => '現在の管理者のテーマ',\n            'This template already exists' => 'テンプレートはすでに存在しています',\n            'This chunk already exists' => 'チャンクはすでに存在しています',\n            'This styles already exist' => 'スタイルはすでに存在しています',\n            'Components templates' => 'コンポーネントのテンプレート',\n            'Your changes to the chunk <i>:name</i> have been saved.' => '<i>:name</i> チャンクへの変更は保存されました。',\n            'Your changes to the styles <i>:name</i> have been saved.' => ' <i>:name</i> スタイルへの変更は保存されました。',\n            'Your changes to the template <i>:name</i> have been saved.' => '<i>:name</i> テンプレートへの変更は保存されました。',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'Required field' => '必須項目',\n            'Scripts' => 'スクリプト',\n            'Create New Script' => '新規スクリプトの作成',\n            'Script content' => 'スクリプトの内容',\n            'New Script' => '新規スクリプト',\n            'Edit Script' => 'スクリプトの編集',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'თემები',\n            'Themes manager' => 'თემების მენეჯერი',\n            'Select Theme' => 'თემის არჩევა',\n            'Save' => 'შენახვა',\n            'Name' => 'სახელწოდება',\n            'Save and Exit' => 'შენახვა და შემდეგ გომოსვლა',\n            'Create New Template' => 'ახალი Template-ის შექმნა',\n            'New Template' => 'ახალი Template-ი',\n            'Delete template: :name' => 'Template-ის წაშლა: :name',\n            'Delete chunk: :name' => 'chunk-ის წაშლა: :name',\n            'Delete styles: :name' => 'სტილის წაშლა: :name',\n            'Templates' => 'Template-ები',\n            'Clone' => 'კლონირება',\n            'Edit' => 'რედაქტირება',\n            'Delete' => 'წაშლა',\n            'Actions' => 'მოქმედება',\n            'Admin Theme' => 'თემა',\n            'Create New Chunk' => 'ახალი Chunk-ის შექმნა',\n            'New Chunk' => 'ახალი Chunk-ი',\n            'Chunks' => 'Chunk-ები',\n            'Create New Styles' => 'ახალი სტილის შექმნა',\n            'New Styles' => 'ახალი სტილები',\n            'Styles' => 'სტილები',\n            'Template content' => 'Template-ის შემადგენლობა',\n            'Styles content' => 'სტილების შემადგენლობა',\n            'Chunk content' => 'Chunk-ის შემადგენლობა',\n            'Edit Template' => 'Template-ის რედაქტირება',\n            'Edit Chunk' => 'Chunk-ის რედაქტირება',\n            'Edit Styles' => 'სტილების რედაქტირება',\n            'Site Theme' => 'საიტის თემა',\n            'Admin Theme' => 'ადმინის პანელის თემა',\n            'Current Site Theme' => 'საიტის მიმდინარე თემა',\n            'Current admin theme' => 'ადმინის პანელის მიმდინარე თემა',\n            'This template already exists' => 'ეს Template-ი უკვე არსებობს',\n            'This chunk already exists' => 'ეს Chunk-ი უკვე არსებობს',\n            'This styles already exist' => 'ეს სტილები უკვე არსებობენ',\n            'Components templates' => 'კომპონენტების Template-ები',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'თქვენი ცვლილებები chunk-ის მიმართ <i>:name</i> შენახულია',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'თქვენი ცვლილებები სტილების მიმართ <i>:name</i> შენახულია',\n            'Your changes to the template <i>:name</i> have been saved.' => 'თქვენი ცვლილებები Template-ის მიმართ <i>:name</i> შენახულია',\n            'Chunk <i>:name</i> deleted' => 'Chunk-ი <i>:name</i> წაშლილია',\n            'Required field' => 'აუცილებელი ველი',\n            'Scripts' => 'Script-ები',\n            'Create New Script' => 'ახალი Script-ის შექმნა',\n            'Script content' => 'Script-ის შემადგენლობა',\n            'New Script' => 'ახალი Script-ი',\n            'Edit Script' => 'Script-ის რედაქტირება',\n            'Cancel' => 'გაუქმება',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Išvaizda',\n            'Themes manager' => 'Išvaizdos tvarkyklė',\n            'Select Theme' => 'Pasirinkti išvaizdą',\n            'Save' => 'Išsaugoti',\n            'Save and Exit' => 'Išsaugoti ir išeiti',\n            'Name' => 'Pavadinimas',\n            'Create New Template' => 'Sukurti naują šabloną',\n            'New Template' => 'Naujas šablonas',\n            'Delete template: :name' => 'Trinti šabloną :name',\n            'Delete chunk: :name' => 'Trinti šablono dalį :name',\n            'Delete styles: :name' => 'Trinti stiliaus aprašą :name',\n            'Templates' => 'Šablonai',\n            'Clone' => 'Klonuoti',\n            'Edit' => 'Redaguoti',\n            'Delete' => 'Ištrinti',\n            'Actions' => 'Veiksmai',\n            'Admin Theme' => 'Admin Theme',\n            'Site Theme' => 'Site Theme',\n            'Create New Chunk' => 'Sukurti naują šablono dalį',\n            'New Chunk' => 'Nauja šablono dalis',\n            'Chunks' => 'Šablono dalys',\n            'Create New Styles' => 'Sukurti naują stiliaus aprašą',\n            'New Styles' => 'Naujas stiliaus aprašas',\n            'Styles' => 'Stiliaus aprašai',\n            'Template content' => 'Šablono turinys',\n            'Styles content' => 'Stiliaus aprašo turinys',\n            'Chunk content' => 'Šablono dalies turinys',\n            'Edit Template' => 'Redaguoti šabloną',\n            'Edit Chunk' => 'Redaguoti šablono dalį',\n            'Edit Styles' => 'Redaguoti stiliaus aprašą',\n            'Current Site Theme' => 'Dabartinė tema',\n            'Current admin theme' => 'Dabartinė administravimo tema',\n            'This template already exists' => 'Toks šablonas jau yra',\n            'This chunk already exists' => 'Tokia šablono dalis jau yra',\n            'This styles already exists' => 'Toks stiliaus aprašas jau yra',\n            'Components templates' => 'Šablonų komponentai',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Šablono dalies <i>:name</i> pakeitimai išsaugoti.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Stiliaus aprašo <i>:name</i> pakeitimai išsaugoti.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Šablono <i>:name</i> pakeitimai išsaugoti.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'This field should not be empty' => 'Šis laukas negali būti tuščias',\n            'Scripts' => 'Skriptai',\n            'Create New Script' => 'Sukurti naują skriptą',\n            'Script content' => 'Skripto turinys',\n            'New Script' => 'Naujas skriptas',\n            'Edit Script' => 'Redaguoti skriptą',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Thema\\'s',\n            'Themes manager' => 'Thema beheer',\n            'Select Theme' => 'Selecteer thema',\n            'Save' => 'Opslaan',\n            'Save and Exit' => 'Opslaan en Terug',\n            'Name' => 'Naam',\n            'Create New Template' => 'Nieuwe Template',\n            'New Template' => 'Nieuwe template',\n            'Admin Theme' => 'Admin thema',\n            'Delete template: :name' => 'Verwijder thema: :name',\n            'Delete chunk: :name' => 'Verwijder onderdeel: :name',\n            'Delete styles: :name' => 'Verwijder stijl: :name',\n            'Templates' => 'Templates',\n            'Clone' => 'Kopieren',\n            'Edit' => 'Bewerken',\n            'Delete' => 'Verwijderen',\n            'Actions' => 'Acties',\n            'Create New Chunk' => 'Nieuw Onderdeel',\n            'New Chunk' => 'Nieuwe onderdeel',\n            'Chunks' => 'Onderdelen',\n            'Create New Styles' => 'Nieuwe Stijl',\n            'New Styles' => 'Nieuwe stijl',\n            'Styles' => 'Stijlen',\n            'Template content' => 'Template inhoud',\n            'Styles content' => 'Inhoud stijlen',\n            'Chunk content' => 'Inhoud onderdeel',\n            'Edit Template' => 'Bewerk Template',\n            'Edit Chunk' => 'Bewerk Onderdeel',\n            'Edit Styles' => 'Bewerk stijlen',\n            'Current Site Theme' => 'Huidige Website Thema',\n            'Current admin theme' => 'Huidige Admin Template',\n            'This template already exists' => 'Deze template bestaat al',\n            'This chunk already exists' => 'Dit onderdeel bestaat al',\n            'This styles already exists' => 'Deze stijl bestaat al',\n            'Components templates' => 'Componenten templates',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Uw wijzigingen aan onderdeel <i>:name</i> zijn opgeslagen.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Uw wijzigingen aan stijl <i>:name</i> zijn opgeslagen.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Uw wijzigingen aan template <i>:name</i> zijn opgeslagen.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'This field should not be empty' => 'Dit veld mag niet leeg zijn.',\n            'Scripts' => 'Scripts',\n            'Create New Script' => 'Nieuw Script',\n            'Script content' => 'Inhoud script',\n            'New Script' => 'Nieuw Script',\n            'Edit Script' => 'Bewerk Script',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Motywy',\n            'Themes manager' => 'Zarządzaj motywami',\n            'Select Theme' => 'Wybierz motyw',\n            'Save' => 'Zapisz',\n            'Save and Exit' => 'Zapisz i wyjdź',\n            'Name' => 'Nazwa',\n            'Create New Template' => 'Utwórz nowy szablon',\n            'New Template' => 'Nowy szablon',\n            'Delete template: :name' => 'Czy napewno usunąć szablon: :name',\n            'Delete chunk: :name' => 'Czy napewno usunąć cegiełkę: :name',\n            'Delete styles: :name' => 'Czy napewno usunąć style: :name',\n            'Templates' => 'Szablony',\n            'Clone' => 'Skopiuj',\n            'Edit' => 'Edytuj',\n            'Delete' => 'Usuń',\n            'Actions' => 'Akcje',\n            'Admin Theme' => 'Motyw administracji',\n            'Create New Chunk' => 'Utwórz nową cegiełkę',\n            'New Chunk' => 'Nowa cegiełka',\n            'Chunks' => 'Cegiełki',\n            'Create New Styles' => 'Utwórz nowe style',\n            'New Styles' => 'Nowe style',\n            'Styles' => 'Style',\n            'Template content' => 'Zawartość szablonu',\n            'Styles content' => 'Zawartość stylów',\n            'Chunk content' => 'Zawartość cegiełki',\n            'Edit Template' => 'Edytuj szablon',\n            'Edit Chunk' => 'Edytuj cegiełkę',\n            'Edit Styles' => 'Edytuj style',\n            'Current Site Theme' => 'Bieżący motyw strony',\n            'Current admin theme' => 'Bieżący motyw administracji',\n            'This template already exists' => 'Ten szablon już istnieje',\n            'This chunk already exists' => 'Ta cegiełka już istnieje',\n            'This styles already exist' => 'Te style już istnieją',\n            'Components templates' => 'Części składowe szablonów',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Twoje zmiany dla cegiełki <i>:name</i> zostały zapisane.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Twoje zmiany dla stylów <i>:name</i> zostały zapisane.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Twoje zmiany dla szablonu <i>:name</i> zostały zapisane.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'Required field' => 'Pole wymagane',\n            'Scripts' => 'Skrypty',\n            'Create New Script' => 'Utwórz nowy skrypt',\n            'Script content' => 'Zawartość skryptu',\n            'New Script' => 'Nowy skrypt',\n            'Edit Script' => 'Edytuj skrypt',\n            'Site Theme' => 'Motyw strony',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Temas',\n            'Themes manager' => 'Gerenciador de temas',\n            'Select Theme' => 'Selecionar tema',\n            'Save' => 'Salvar',\n            'Save and Exit' => 'Salvar e sair',\n            'Name' => 'Nome',\n            'Create New Template' => 'Criar novo template',\n            'New Template' => 'Novo template',\n            'Delete template: :name' => 'Deletar o template: :name',\n            'Delete chunk: :name' => 'Deletar o pedaço: :name',\n            'Delete styles: :name' => 'Deletar o estilo :name',\n            'Templates' => 'Templates',\n            'Clone' => 'Clonar',\n            'Edit' => 'Editar',\n            'Delete' => 'Deletar',\n            'Actions' => 'Ações',\n            'Admin Theme' => 'Admin Theme',\n            'Site Theme' => 'Site Theme',\n            'Create New Chunk' => 'Criar novo pedaço',\n            'New Chunk' => 'Novo pedaço',\n            'Chunks' => 'Pedaços',\n            'Create New Styles' => 'Criar novo estilo',\n            'New Styles' => 'Novo estilo',\n            'Styles' => 'Estilos',\n            'Template content' => 'Conteúdo do template',\n            'Styles content' => 'Conteúdo do estilo',\n            'Chunk content' => 'Conteúdo do pedaço',\n            'Edit Template' => 'Editar template',\n            'Edit Chunk' => 'Editar pedaço',\n            'Edit Styles' => 'Editar estilo',\n            'Current Site Theme' => 'Tema atual do site',\n            'Current admin theme' => 'Tema atual da administração',\n            'This template already exists' => 'Este template já existe',\n            'This chunk already exists' => 'Este pedaço já existe',\n            'This styles already exists' => 'Este estilo já existe',\n            'Components templates' => 'Componentes do template',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Suas alterações no pedaço <i>:name</i> foram salvas',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Suas alterações no estilo <i>:name</i> foram salvas.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Suas alterações no template <i>:name</i> foram salvas.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'This field should not be empty' => 'Este campo não pode estar vazio',\n            'Scripts' => 'Scripts',\n            'Create New Script' => 'Criar novo script',\n            'Script content' => 'Conteúdo do script',\n            'New Script' => 'Novo script',\n            'Edit Script' => 'Editar script',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Темы',\n            'Themes manager' => 'Менеджер тем',\n            'Select Theme' => 'Выбрать тему',\n            'Save' => 'Сохранить',\n            'Name' => 'Название',\n            'Save and Exit' => 'Сохранить и выйти',\n            'Create New Template' => 'Создать новый шаблон',\n            'New Template' => 'Новый шаблон',\n            'Delete template: :name' => 'Удалить шаблон: :name',\n            'Delete chunk: :name' => 'Удалить чанк: :name',\n            'Delete styles: :name' => 'Удалить стили: :name',\n            'Templates' => 'Шаблоны',\n            'Clone' => 'Клонировать',\n            'Edit' => 'Редактировать',\n            'Delete' => 'Удалить',\n            'Actions' => 'Действия',\n            'Admin Theme' => 'Тема ',\n            'Create New Chunk' => 'Создать новый чанк',\n            'New Chunk' => 'Новый чанк',\n            'Chunks' => 'Чанки',\n            'Create New Styles' => 'Создать новые стили',\n            'New Styles' => 'Новые стили',\n            'Styles' => 'Стили',\n            'Template content' => 'Содержимое шаблона',\n            'Styles content' => 'Содержимое стилей',\n            'Chunk content' => 'Содержимое чанка',\n            'Edit Template' => 'Редактирование шаблона',\n            'Edit Chunk' => 'Редактирование чанка',\n            'Edit Styles' => 'Редкатирование стилей',\n            'Site Theme' => 'Тема сайта',\n            'Admin Theme' => 'Тема админки',\n            'Current Site Theme' => 'Текущая тема сайта',\n            'Current admin theme' => 'Текущая тема админки',\n            'This template already exists' => 'Этот шаблон уже существует',\n            'This chunk already exists' => 'Этот чанк уже существует',\n            'This styles already exist' => 'Эти стили уже существуют',\n            'Components templates' => 'Шаблоны компонентов',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Ваши изменения к чанку <i>:name</i> были сохранены',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Ваши изменения к стилям <i>:name</i> были сохранены',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Ваши изменения к шаблону <i>:name</i> были сохранены',\n            'Chunk <i>:name</i> deleted' => 'Чанк <i>:name</i> удален',\n            'Required field' => 'Обязательное поле',\n            'Scripts' => 'Скрипты',\n            'Create New Script' => 'Создать новый скрипт',\n            'Script content' => 'Содержимое скрипта',\n            'New Script' => 'Новый скрипт',\n            'Edit Script' => 'Редактирование скрипта',\n            'Cancel' => 'Отмена',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Témy',\n            'Themes manager' => 'Manažér tém',\n            'Select Theme' => 'Vybrať tému',\n            'Save' => 'Uložiť',\n            'Save and Exit' => 'Uložiť a ukončiť',\n            'Name' => 'Názov',\n            'Create New Template' => 'Vytvoriť novú tému',\n            'New Template' => 'Nová téma',\n            'Delete template: :name' => 'Vymazať tému: :name',\n            'Delete chunk: :name' => 'Vymazať sekciu: :name',\n            'Delete styles: :name' => 'Vymazať CSS štýl: :name',\n            'Templates' => 'Témy',\n            'Clone' => 'Klonovať',\n            'Edit' => 'Editovať',\n            'Delete' => 'Vymazať',\n            'Actions' => 'Akcie',\n            'Create New Chunk' => 'Vytvoriť novú sekciu',\n            'New Chunk' => 'Nová sekcia',\n            'Chunks' => 'Sekcie',\n            'Create New Styles' => 'Vytvoriť nový CSS štýl',\n            'New Styles' => 'Nový CSS štýl',\n            'Styles' => 'CSS štýly',\n            'Template content' => 'Obsah témy',\n            'Styles content' => 'Obsah CSS štýlu',\n            'Chunk content' => 'Obsah sekcie',\n            'Edit Template' => 'Editovať tému',\n            'Edit Chunk' => 'Editovať sekciu',\n            'Edit Styles' => 'Editovať CSS štýl',\n            'Current Site Theme' => 'Aktuálna téma webstránky',\n            'Current admin theme' => 'Aktuálna téma administrácie',\n            'This template already exists' => 'Táto téma už existuje',\n            'This chunk already exists' => 'Táto sekcia už existuje',\n            'This styles already exist' => 'Tento CSS štýl už existuje',\n            'Components templates' => 'Témy komponentov',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Vaše zmeny v sekcii <i>:name</i> boli uložené.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Vaše zmeny v CSS štýle <i>:name</i> boli uložené.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Vaše zmeny v téme <i>:name</i> boli uložené.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'Required field' => 'Povinné políčko',\n            'Scripts' => 'Skripty',\n            'Site Theme' => 'Site Theme',\n            'Admin Theme' => 'Admin Theme',\n            'Create New Script' => 'Vytvoriť nový skript',\n            'Script content' => 'Obsah skriptu',\n            'New Script' => 'Nový skript',\n            'Edit Script' => 'Editovať skript',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Šabloni',\n            'Themes manager' => 'Menadžer šablona',\n            'Select theme' => 'Odaberi temu',\n            'Save' => 'Sačuvaj',\n            'Save and exit' => 'Sačuvaj i izađi',\n            'Name' => 'Ime',\n            'Create new template' => 'Kreiraj novi šablon',\n            'New template' => 'Novi šablon',\n            'Delete template: :name' => 'Obriši šablon: :name',\n            'Delete chunk: :name' => 'Obriši komade: :name',\n            'Delete styles: :name' => 'Obriši stilove: :name',\n            'Templates' => 'Šabloni',\n            'Clone' => 'Kloniraj',\n            'Edit' => 'Izmeni',\n            'Delete' => 'Obriši',\n            'Actions' => 'Akcije',        \n            'Create new chunk' => 'Napravi novi parče',\n            'New chunk' => 'Novo parče',\n            'Chunks' => 'Parčići',\n            'Create new styles' => 'Kreiraj novi stil',\n            'New styles' => 'Novi stil',\n            'Styles' => 'Stilovi',\n            'Template content' => 'Sadržaj šablona',\n            'Styles content' => 'Stil sadržaja',\n            'Chunk content' => 'Sadržaj komada',\n            'Edit template' => 'Izmeni šablon',\n            'Edit chunk' => 'Izmeni komad',\n            'Edit styles' => 'Izmeni stil',\n            'Current site theme' => 'Trenutni šablon sajta',\n            'Current admin theme' => 'Trenutni administratorski šablon',\n            'This template already exists' => 'Ovaj šablon već postoji',\n            'This chunk already exists' => 'Ovaj komad već postoji',\n            'This styles already exist' => 'Ovaj stil već postoji',\n            'Components templates' => 'Komponente šablona',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Vaše promene na komadićima <i>:name</i> su sačuvane.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Promene na stilovima <i>:name</i> su sačuvane.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Promene na šablonu <i>:name</i> su sačuvane.',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'Required field' => 'Potrebno polje',\n            'Scripts' => 'Skripte',\n            'Create new script' => 'Kreiraj novu skriptu',\n            'Script content' => 'Sadržaj skripte',\n            'New script' => 'Nova skripta',\n            'Edit script' => 'Izmeni skriptu',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Temalar',\n            'Themes manager' => 'Tema Yöneticisi',\n            'Select Theme' => 'Tema Seç',\n            'Save' => 'Kaydet',\n            'Save and Exit' => 'Kaydet ve Çık',\n            'Name' => 'Ad',\n            'Create New Template' => 'Yeni Şablon Oluştur',\n            'New Template' => 'Yeni Şablon',\n            'Delete template: :name' => ':name adlı şablon silinsin mi',\n            'Delete chunk: :name' => ':name adlı yığın silinsin mi',\n            'Delete styles: :name' => ':name adlı stil silinsin mi',\n            'Templates' => 'Şablonlar',\n            'Clone' => 'Klonla',\n            'Edit' => 'Düzenle',\n            'Delete' => 'Sil',\n            'Actions' => 'İşlemler',\n            'Admin Theme' => 'Yönetim Teması',\n            'Create New Chunk' => 'Yeni Yığın Oluştur',\n            'New Chunk' => 'Yeni Yığın',\n            'Chunks' => 'Yığın',\n            'Create New Styles' => 'Yeni Stil Oluştur',\n            'New Styles' => 'Yeni Stil',\n            'Styles' => 'Stil',\n            'Template content' => 'Şablon İçeriği',\n            'Styles content' => 'Stil İçeriği',\n            'Chunk content' => 'Yığın İçeriği',\n            'Edit Template' => 'Şablonu Düzenle',\n            'Edit Chunk' => 'Yığını Düzenle',\n            'Edit Styles' => 'Stili Düzenle',\n            'Current Site Theme' => 'Kullanılan site teması',\n            'Current admin theme' => 'Kullanılan yönetim teması',\n            'This template already exists' => 'Bu şablon zaten var',\n            'This chunk already exists' => 'Bu yığın zaten var',\n            'This styles already exist' => 'Bu stil zaten var',\n            'Components templates' => 'Eklenti şablonları',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Değişiklikleriniz <i>:name</i> adlı yığına kaydedildi.',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Değişiklikleriniz <i>:name</i> adlı stile kaydedildi.',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Değişiklikleriniz <i>:name</i> adlı şablona kaydedildi.',\n            'Chunk <i>:name</i> deleted' => '<i>:name</i> adlı yığın silindi',\n            'Required field' => 'Zorunlu alan',\n            'Scripts' => 'Betikler',\n            'Create New Script' => 'Yeni Betik Oluştur',\n            'Script content' => 'Betik içeriği',\n            'New Script' => 'Yeni Betik',\n            'Edit Script' => 'Betiği Düzenle',\n            'Site Theme' => 'Site Teması',\n            'Cancel' => 'Vazgeç',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => 'Теми',\n            'Themes manager' => 'Менеджер тем',\n            'Select Theme' => 'Вибрати тему',\n            'Save' => 'Зберегти',\n            'Name' => 'Назва',\n            'Save and Exit' => 'Зберегти та вийти',\n            'Create New Template' => 'Створити новий шаблон',\n            'New Template' => 'Новий шаблон',\n            'Delete template: :name' => 'Видалити шаблон: :name',\n            'Delete chunk: :name' => 'Видалити чанк: :name',\n            'Delete styles: :name' => 'Видалити стилі: :name',\n            'Templates' => 'Шаблони',\n            'Clone' => 'Клонувати',\n            'Edit' => 'Редагувати',\n            'Delete' => 'Видалити',\n            'Actions' => 'Дії',\n            'Admin Theme' => 'Тема ',\n            'Create New Chunk' => 'Створити новий чанк',\n            'New Chunk' => 'Новий чанк',\n            'Chunks' => 'Чанки',\n            'Create New Styles' => 'Створити нові стилі',\n            'New Styles' => 'Нові стилі',\n            'Styles' => 'Стилі',\n            'Template content' => 'Вміст шаблону',\n            'Styles content' => 'Вміст стилів',\n            'Chunk content' => 'Вміст чанка',\n            'Edit Template' => 'Редагування шаблону',\n            'Edit Chunk' => 'Редагування чанка',\n            'Edit Styles' => 'Редагування стилів',\n            'Site Theme' => 'Тема сайту',\n            'Admin Theme' => 'Тема адмінки',\n            'Current Site Theme' => 'Поточна тема сайтау',\n            'Current admin theme' => 'Поточна тема адмінки',\n            'This template already exists' => 'Цей шаблон вже існує',\n            'This chunk already exists' => 'Цей чанк вже існує',\n            'This styles already exist' => 'Цей стиль вже існує',\n            'Components templates' => 'Шаблони компонентів',\n            'Your changes to the chunk <i>:name</i> have been saved.' => 'Ваші зміни до чанку <i>:name</i> були збережені',\n            'Your changes to the styles <i>:name</i> have been saved.' => 'Ваші зміни до стиля <i>:name</i> були збережені',\n            'Your changes to the template <i>:name</i> have been saved.' => 'Ваші зміни до шаблону <i>:name</i> були збережені',\n            'Chunk <i>:name</i> deleted' => 'Чанк <i>:name</i> видалено',\n            'Required field' => 'Обов’язкове поле',\n            'Scripts' => 'Скрипти',\n            'Create New Script' => 'Створити новий скрипт',\n            'Script content' => 'Вміст скрипта',\n            'New Script' => 'Новий скрипт',\n            'Edit Script' => 'Редагування скрипту',\n            'Cancel' => 'Відмінити',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'themes' => array(\n            'Themes' => '主题',\n            'Themes manager' => '主题管理',\n            'Select Theme' => '选择主题',\n            'Save' => '保存',\n            'Save and Exit' => '保存并退出',\n            'Name' => '名称',\n            'Create New Template' => '创建新模板',\n            'New Template' => '新建模板',\n            'Delete template: :name' => '删除模板: :name',\n            'Delete chunk: :name' => '删除区块: :name',\n            'Delete styles: :name' => '删除样式: :name',\n            'Templates' => '模板',\n            'Clone' => '克隆',\n            'Edit' => '编辑',\n            'Delete' => '删除',\n            'Actions' => '操作',\n            'Admin Theme' => '后台主题',\n            'Create New Chunk' => '创建新区块',\n            'New Chunk' => '新建区块',\n            'Chunks' => '区块',\n            'Create New Styles' => '创建新样式',\n            'New Styles' => '新建样式',\n            'Styles' => '样式',\n            'Template content' => '模板内容',\n            'Styles content' => '样式内容',\n            'Chunk content' => '区块内容',\n            'Edit Template' => '编辑模板',\n            'Edit Chunk' => '编辑区块',\n            'Edit Styles' => '编辑样式',\n            'Current Site Theme' => '当前网站主题',\n            'Current admin theme' => '当前后台主题',\n            'This template already exists' => '此模板已存在',\n            'This chunk already exists' => '此区块已存在',\n            'This styles already exist' => '此样式已存在',\n            'Components templates' => '组件模板',\n            'Your changes to the chunk <i>:name</i> have been saved.' => '您修改的区块 <i>:name</i> 已保存。',\n            'Your changes to the styles <i>:name</i> have been saved.' => '您修改的样式 <i>:name</i> 已保存。',\n            'Your changes to the template <i>:name</i> have been saved.' => '您修改的模板 <i>:name</i> 已保存。',\n            'Chunk <i>:name</i> deleted' => 'Chunk <i>:name</i> deleted',\n            'Required field' => '必填字段',\n            'Scripts' => '脚本',\n            'Create New Script' => '创建新脚本',\n            'Script content' => '脚本内容',\n            'New Script' => '新建脚本',\n            'Edit Script' => '编辑脚本',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/themes/themes.admin.php",
    "content": "<?php\n\n// Add plugin navigation link\nNavigation::add(__('Themes', 'themes'), 'extends', 'themes', 2);\n\n/**\n * Themes Admin Class\n */\nclass ThemesAdmin extends Backend\n{\n    /**\n     * Themes plugin admin\n     */\n    public static function main()\n    {\n        // Get current themes\n        $current_site_theme = Option::get('theme_site_name');\n        $current_admin_theme = Option::get('theme_admin_name');\n\n        // Init vars\n        $themes_site   = Themes::getSiteThemes();\n        $themes_admin  = Themes::getAdminThemes();\n        $templates     = Themes::getTemplates();\n        $chunks        = Themes::getChunks();\n        $styles        = Themes::getStyles();\n        $scripts       = Themes::getScripts();\n        $errors        = array();\n        $chunk_path     = THEMES_SITE . DS . $current_site_theme . DS;\n        $template_path  = THEMES_SITE . DS . $current_site_theme . DS;\n        $style_path     = THEMES_SITE . DS . $current_site_theme . DS . 'css' . DS;\n        $script_path    = THEMES_SITE . DS . $current_site_theme . DS . 'js' . DS;\n\n        // Save site theme\n        if (Request::post('save_site_theme')) {\n\n            if (Security::check(Request::post('csrf'))) {\n\n                Option::update('theme_site_name', Request::post('themes'));\n\n                // Clean Monstra TMP folder.\n                Monstra::cleanTmp();\n\n                // Increment Styles and Javascript version\n                Stylesheet::stylesVersionIncrement();\n                Javascript::javascriptVersionIncrement();\n\n                Request::redirect('index.php?id=themes');\n\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Save site theme\n        if (Request::post('save_admin_theme')) {\n\n            if (Security::check(Request::post('csrf'))) {\n\n                Option::update('theme_admin_name', Request::post('themes'));\n\n                // Clean Monstra TMP folder.\n                Monstra::cleanTmp();\n\n                Request::redirect('index.php?id=themes');\n\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Its mean that you can add your own actions for this plugin\n        Action::run('admin_themes_extra_actions');\n\n        // Check for get actions\n        // -------------------------------------\n        if (Request::get('action')) {\n\n            // Switch actions\n            // -------------------------------------\n            switch (Request::get('action')) {\n\n                // Add chunk\n                // -------------------------------------\n                case \"add_chunk\":\n                    if (Request::post('add_file') || Request::post('add_file_and_exit')) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');\n                            if (file_exists($chunk_path.Security::safeName(Request::post('name'), null, false).'.chunk.php')) $errors['file_exists'] = __('This chunk already exists', 'themes');\n\n                            if (count($errors) == 0) {\n\n                                // Save chunk\n                                File::setContent($chunk_path.Security::safeName(Request::post('name'), null, false).'.chunk.php', Request::post('content'));\n\n                                Notification::set('success', __('Your changes to the chunk <i>:name</i> have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false))));\n\n                                if (Request::post('add_file_and_exit')) {\n                                    Request::redirect('index.php?id=themes');\n                                } else {\n                                    Request::redirect('index.php?id=themes&action=edit_chunk&filename='.Security::safeName(Request::post('name'), null, false));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n\n                    // Save fields\n                    if (Request::post('name')) $name = Request::post('name'); else $name = '';\n                    if (Request::post('content')) $content = Request::post('content'); else $content = '';\n\n                    // Display view\n                    View::factory('box/themes/views/backend/add')\n                            ->assign('name', $name)\n                            ->assign('content', $content)\n                            ->assign('errors', $errors)\n                            ->assign('action', 'chunk')\n                            ->display();\n                break;\n\n                // Add template\n                // -------------------------------------\n                case \"add_template\":\n                     if (Request::post('add_file') || Request::post('add_file_and_exit')) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');\n                            if (file_exists($template_path.Security::safeName(Request::post('name'), null, false).'.template.php')) $errors['file_exists'] = __('This template already exists', 'themes');\n\n                            if (count($errors) == 0) {\n\n                                // Save chunk\n                                File::setContent($template_path.Security::safeName(Request::post('name'), null, false).'.template.php', Request::post('content'));\n\n                                Notification::set('success', __('Your changes to the chunk <i>:name</i> have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false))));\n\n                                if (Request::post('add_file_and_exit')) {\n                                    Request::redirect('index.php?id=themes');\n                                } else {\n                                    Request::redirect('index.php?id=themes&action=edit_template&filename='.Security::safeName(Request::post('name'), null, false));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n\n                    // Save fields\n                    if (Request::post('name')) $name = Request::post('name'); else $name = '';\n                    if (Request::post('content')) $content = Request::post('content'); else $content = '';\n\n                    // Display view\n                    View::factory('box/themes/views/backend/add')\n                            ->assign('name', $name)\n                            ->assign('content', $content)\n                            ->assign('errors', $errors)\n                            ->assign('action', 'template')\n                            ->display();\n                break;\n\n                // Add styles\n                // -------------------------------------\n                case \"add_styles\":\n                     if (Request::post('add_file') || Request::post('add_file_and_exit')) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');\n                            if (file_exists($style_path.Security::safeName(Request::post('name'), null, false).'.css')) $errors['file_exists'] = __('This styles already exists', 'themes');\n\n                            if (count($errors) == 0) {\n\n                                // Save chunk\n                                File::setContent($style_path.Security::safeName(Request::post('name'), null, false).'.css', Request::post('content'));\n\n                                Notification::set('success', __('Your changes to the styles <i>:name</i> have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false))));\n\n                                // Clean Monstra TMP folder.\n                                Monstra::cleanTmp();\n\n                                // Increment Styles version\n                                Stylesheet::stylesVersionIncrement();\n\n                                if (Request::post('add_file_and_exit')) {\n                                    Request::redirect('index.php?id=themes');\n                                } else {\n                                    Request::redirect('index.php?id=themes&action=edit_styles&filename='.Security::safeName(Request::post('name'), null, false));\n                                }\n\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n\n                    // Save fields\n                    if (Request::post('name')) $name = Request::post('name'); else $name = '';\n                    if (Request::post('content')) $content = Request::post('content'); else $content = '';\n\n                    // Display view\n                    View::factory('box/themes/views/backend/add')\n                            ->assign('name', $name)\n                            ->assign('content', $content)\n                            ->assign('errors', $errors)\n                            ->assign('action', 'styles')\n                            ->display();\n                break;\n\n                // Add script\n                // -------------------------------------\n                case \"add_script\":\n                     if (Request::post('add_file') || Request::post('add_file_and_exit')) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');\n                            if (file_exists($script_path.Security::safeName(Request::post('name'), null, false).'.js')) $errors['file_exists'] = __('This script already exists', 'themes');\n\n                            if (count($errors) == 0) {\n\n                                // Save chunk\n                                File::setContent($script_path.Security::safeName(Request::post('name'), null, false).'.js', Request::post('content'));\n\n                                Notification::set('success', __('Your changes to the script <i>:name</i> have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false))));\n\n\n                                // Clean Monstra TMP folder.\n                                Monstra::cleanTmp();\n\n                                // Increment Javascript version\n                                Javascript::javascriptVersionIncrement();\n\n\n                                if (Request::post('add_file_and_exit')) {\n                                    Request::redirect('index.php?id=themes');\n                                } else {\n                                    Request::redirect('index.php?id=themes&action=edit_script&filename='.Security::safeName(Request::post('name'), null, false));\n                                }\n\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n\n                    // Save fields\n                    if (Request::post('name')) $name = Request::post('name'); else $name = '';\n                    if (Request::post('content')) $content = Request::post('content'); else $content = '';\n\n                    // Display view\n                    View::factory('box/themes/views/backend/add')\n                            ->assign('name', $name)\n                            ->assign('content', $content)\n                            ->assign('errors', $errors)\n                            ->assign('action', 'script')\n                            ->display();\n                break;\n\n                // Edit chunk\n                // -------------------------------------\n                case \"edit_chunk\":\n\n                    // Save current chunk action\n                    if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');\n                            if ((file_exists($chunk_path.Security::safeName(Request::post('name'), null, false).'.chunk.php') and (Security::safeName(Request::post('chunk_old_name'), null, false)) !== Security::safeName(Request::post('name'), null, false))) $errors['file_exists'] = __('This chunk already exists', 'themes');\n\n                            // Save fields\n                            if (Request::post('content')) $content = Request::post('content'); else $content = '';\n                            if (count($errors) == 0) {\n\n                                $chunk_old_filename = $chunk_path.Request::post('chunk_old_name').'.chunk.php';\n                                $chunk_new_filename = $chunk_path.Security::safeName(Request::post('name'), null, false).'.chunk.php';\n                                if ( ! empty($chunk_old_filename)) {\n                                    if ($chunk_old_filename !== $chunk_new_filename) {\n                                        rename($chunk_old_filename, $chunk_new_filename);\n                                        $save_filename = $chunk_new_filename;\n                                    } else {\n                                        $save_filename = $chunk_new_filename;\n                                    }\n                                } else {\n                                    $save_filename = $chunk_new_filename;\n                                }\n\n                                // Save chunk\n                                File::setContent($save_filename, Request::post('content'));\n\n                                Notification::set('success', __('Your changes to the chunk <i>:name</i> have been saved.', 'themes', array(':name' => basename($save_filename, '.chunk.php'))));\n\n                                if (Request::post('edit_file_and_exit')) {\n                                    Request::redirect('index.php?id=themes');\n                                } else {\n                                    Request::redirect('index.php?id=themes&action=edit_chunk&filename='.Security::safeName(Request::post('name'), null, false));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n                    if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));\n                    $content = File::getContent($chunk_path.Request::get('filename').'.chunk.php');\n\n                    // Display view\n                    View::factory('box/themes/views/backend/edit')\n                            ->assign('content', $content)\n                            ->assign('name', $name)\n                            ->assign('errors', $errors)\n                            ->assign('action', 'chunk')\n                            ->display();\n\n                break;\n\n                // Edit Template\n                // -------------------------------------\n                case \"edit_template\":\n\n                    // Save current chunk action\n                    if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');\n                            if ((file_exists($template_path.Security::safeName(Request::post('name'), null, false).'.template.php') and (Security::safeName(Request::post('template_old_name'), null, false)) !== Security::safeName(Request::post('name'), null, false))) $errors['template_exists'] = __('This template already exists', 'themes');\n\n                            // Save fields\n                            if (Request::post('content')) $content = Request::post('content'); else $content = '';\n                            if (count($errors) == 0) {\n\n                                $template_old_filename = $template_path.Request::post('template_old_name').'.template.php';\n                                $template_new_filename = $template_path.Security::safeName(Request::post('name'), null, false).'.template.php';\n                                if ( ! empty($template_old_filename)) {\n                                    if ($template_old_filename !== $template_new_filename) {\n                                        rename($template_old_filename, $template_new_filename);\n                                        $save_filename = $template_new_filename;\n                                    } else {\n                                        $save_filename = $template_new_filename;\n                                    }\n                                } else {\n                                    $save_filename = $template_new_filename;\n                                }\n\n                                // Save chunk\n                                File::setContent($save_filename, Request::post('content'));\n\n                                Notification::set('success', __('Your changes to the template <i>:name</i> have been saved.', 'themes', array(':name' => basename($save_filename, '.template.php'))));\n\n                                if (Request::post('edit_file_and_exit')) {\n                                    Request::redirect('index.php?id=themes');\n                                } else {\n                                    Request::redirect('index.php?id=themes&action=edit_template&filename='.Security::safeName(Request::post('name'), null, false));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n                    if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));\n                    $content = File::getContent($chunk_path.Request::get('filename').'.template.php');\n\n                    // Display view\n                    View::factory('box/themes/views/backend/edit')\n                            ->assign('content', $content)\n                            ->assign('name', $name)\n                            ->assign('errors', $errors)\n                            ->assign('action', 'template')\n                            ->display();\n\n                break;\n\n                // Edit Styles\n                // -------------------------------------\n                case \"edit_styles\":\n\n                    // Save current chunk action\n                    if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');\n                            if ((file_exists($style_path.Security::safeName(Request::post('name'), null, false).'.css') and (Security::safeName(Request::post('styles_old_name'), null, false)) !== Security::safeName(Request::post('name'), null, false))) $errors['file_exists'] = __('This styles already exists', 'themes');\n\n                            // Save fields\n                            if (Request::post('content')) $content = Request::post('content'); else $content = '';\n                            if (count($errors) == 0) {\n\n                                $styles_old_filename = $style_path.Request::post('styles_old_name').'.css';\n                                $styles_new_filename = $style_path.Security::safeName(Request::post('name'), null, false).'.css';\n                                if ( ! empty($styles_old_filename)) {\n                                    if ($styles_old_filename !== $styles_new_filename) {\n                                        rename($styles_old_filename, $styles_new_filename);\n                                        $save_filename = $styles_new_filename;\n                                    } else {\n                                        $save_filename = $styles_new_filename;\n                                    }\n                                } else {\n                                    $save_filename = $styles_new_filename;\n                                }\n\n                                // Save chunk\n                                File::setContent($save_filename, Request::post('content'));\n\n                                Notification::set('success', __('Your changes to the styles <i>:name</i> have been saved.', 'themes', array(':name' => basename($save_filename, '.css'))));\n\n                                // Clean Monstra TMP folder.\n                                Monstra::cleanTmp();\n\n                                // Increment Styles version\n                                Stylesheet::stylesVersionIncrement();\n\n                                if (Request::post('edit_file_and_exit')) {\n                                    Request::redirect('index.php?id=themes');\n                                } else {\n                                    Request::redirect('index.php?id=themes&action=edit_styles&filename='.Security::safeName(Request::post('name'), null, false));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n                    if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));\n                    $content = File::getContent($style_path.Request::get('filename').'.css');\n\n                    // Display view\n                    View::factory('box/themes/views/backend/edit')\n                            ->assign('content', $content)\n                            ->assign('name', $name)\n                            ->assign('errors', $errors)\n                            ->assign('action', 'styles')\n                            ->display();\n\n                break;\n\n                // Edit Script\n                // -------------------------------------\n                case \"edit_script\":\n\n                    // Save current chunk action\n                    if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) {\n\n                        if (Security::check(Request::post('csrf'))) {\n\n                            if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');\n                            if ((file_exists($script_path.Security::safeName(Request::post('name'), null, false).'.js')) and (Security::safeName(Request::post('script_old_name'), null, false)) !== Security::safeName(Request::post('name'), null, false)) $errors['file_exists'] = __('This script already exists', 'themes');\n\n                            // Save fields\n                            if (Request::post('content')) $content = Request::post('content'); else $content = '';\n                            if (count($errors) == 0) {\n\n                                $script_old_filename = $script_path.Request::post('script_old_name').'.js';\n                                $script_new_filename = $script_path.Security::safeName(Request::post('name'), null, false).'.js';\n                                if ( ! empty($script_old_filename)) {\n                                    if ($script_old_filename !== $script_new_filename) {\n                                        rename($script_old_filename, $script_new_filename);\n                                        $save_filename = $script_new_filename;\n                                    } else {\n                                        $save_filename = $script_new_filename;\n                                    }\n                                } else {\n                                    $save_filename = $script_new_filename;\n                                }\n\n                                // Save chunk\n                                File::setContent($save_filename, Request::post('content'));\n\n                                Notification::set('success', __('Your changes to the script <i>:name</i> have been saved.', 'themes', array(':name' => basename($save_filename, '.js'))));\n\n                                // Clean Monstra TMP folder.\n                                Monstra::cleanTmp();\n\n                                // Increment Javascript version\n                                Javascript::javascriptVersionIncrement();\n\n                                if (Request::post('edit_file_and_exit')) {\n                                    Request::redirect('index.php?id=themes');\n                                } else {\n                                    Request::redirect('index.php?id=themes&action=edit_script&filename='.Security::safeName(Request::post('name'), null, false));\n                                }\n                            }\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                    }\n                    if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));\n                    $content = File::getContent($script_path.Request::get('filename').'.js');\n\n                    // Display view\n                    View::factory('box/themes/views/backend/edit')\n                            ->assign('content', $content)\n                            ->assign('name', $name)\n                            ->assign('errors', $errors)\n                            ->assign('action', 'script')\n                            ->display();\n\n                break;\n\n                // Delete chunk\n                // -------------------------------------\n                case \"delete_chunk\":\n\n                    if (Security::check(Request::get('token'))) {\n\n                        File::delete($chunk_path.Request::get('filename').'.chunk.php');\n                        Notification::set('success', __('Chunk <i>:name</i> deleted', 'themes', array(':name' => File::name(Request::get('filename')))));\n                        Request::redirect('index.php?id=themes');\n\n                    } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n                break;\n\n                // Delete styles\n                // -------------------------------------\n                case \"delete_styles\":\n\n                    if (Security::check(Request::get('token'))) {\n\n                        File::delete($style_path.Request::get('filename').'.css');\n                        Notification::set('success', __('Styles <i>:name</i> deleted', 'themes', array(':name' => File::name(Request::get('filename')))));\n\n                        // Clean Monstra TMP folder.\n                        Monstra::cleanTmp();\n\n                        // Increment Styles version\n                        Stylesheet::stylesVersionIncrement();\n\n                        Request::redirect('index.php?id=themes');\n\n                    } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n                break;\n\n                // Delete script\n                // -------------------------------------\n                case \"delete_script\":\n\n                    if (Security::check(Request::get('token'))) {\n\n                        File::delete($script_path.Request::get('filename').'.js');\n                        Notification::set('success', __('Script <i>:name</i> deleted', 'themes', array(':name' => File::name(Request::get('filename')))));\n\n                        // Clean Monstra TMP folder.\n                        Monstra::cleanTmp();\n\n                        // Increment Javascript version\n                        Javascript::javascriptVersionIncrement();\n\n                        Request::redirect('index.php?id=themes');\n\n                    } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n                break;\n\n                // Delete template\n                // -------------------------------------\n                case \"delete_template\":\n\n                    if (Security::check(Request::get('token'))) {\n\n                        File::delete($template_path.Request::get('filename').'.template.php');\n                        Notification::set('success', __('Template <i>:name</i> deleted', 'themes', array(':name' => File::name(Request::get('filename')))));\n                        Request::redirect('index.php?id=themes');\n                    }\n\n                break;\n\n                // Clone styles\n                // -------------------------------------\n                case \"clone_styles\":\n\n                    if (Security::check(Request::get('token'))) {\n\n                        File::setContent(THEMES_SITE . DS . $current_site_theme . DS . 'css' . DS . Request::get('filename') .'_clone_'.date(\"Ymd_His\").'.css',\n                                         File::getContent(THEMES_SITE . DS . $current_site_theme . DS . 'css' . DS . Request::get('filename') . '.css'));\n\n                        // Clean Monstra TMP folder.\n                        Monstra::cleanTmp();\n\n                        // Increment Styles version\n                        Stylesheet::stylesVersionIncrement();\n\n                        Request::redirect('index.php?id=themes');\n                    }\n\n                break;\n\n                // Clone script\n                // -------------------------------------\n                case \"clone_script\":\n\n                    if (Security::check(Request::get('token'))) {\n\n                        File::setContent(THEMES_SITE . DS . $current_site_theme . DS . 'js' . DS . Request::get('filename') .'_clone_'.date(\"Ymd_His\").'.js',\n                                         File::getContent(THEMES_SITE . DS . $current_site_theme . DS . 'js' . DS . Request::get('filename') . '.js'));\n\n\n                        // Clean Monstra TMP folder.\n                        Monstra::cleanTmp();\n\n                        // Increment Javascript version\n                        Javascript::javascriptVersionIncrement();\n                        \n                        Request::redirect('index.php?id=themes');\n                    }\n\n                break;\n\n                // Clone template\n                // -------------------------------------\n                case \"clone_template\":\n\n                    if (Security::check(Request::get('token'))) {\n\n                        File::setContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') .'_clone_'.date(\"Ymd_His\").'.template.php',\n                                         File::getContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') . '.template.php'));\n\n                        Request::redirect('index.php?id=themes');\n\n                    }\n\n                break;\n\n                // Clone chunk\n                // -------------------------------------\n                case \"clone_chunk\":\n\n                    if (Security::check(Request::get('token'))) {\n                        File::setContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') .'_clone_'.date(\"Ymd_His\").'.chunk.php',\n                                         File::getContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') . '.chunk.php'));\n\n                        Request::redirect('index.php?id=themes');\n                    }\n\n                break;\n\n            }\n\n        } else {\n\n            // Display view\n            View::factory('box/themes/views/backend/index')\n                    ->assign('themes_site', $themes_site)\n                    ->assign('themes_admin', $themes_admin)\n                    ->assign('templates', $templates)\n                    ->assign('chunks', $chunks)\n                    ->assign('styles', $styles)\n                    ->assign('scripts', $scripts)\n                    ->assign('current_site_theme', $current_site_theme)\n                    ->assign('current_admin_theme', $current_admin_theme)\n                    ->display();\n\n        }\n    }\n}\n"
  },
  {
    "path": "plugins/box/themes/themes.plugin.php",
    "content": "<?php\n\n/**\n *  Themes plugin\n *\n *  @package Monstra\n *  @subpackage Plugins\n *  @author Romanenko Sergey / Awilum\n *  @copyright 2012-2014 Romanenko Sergey / Awilum\n *  @version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Themes', 'themes'),\n                __('Themes manager', 'themes'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                null,\n                'box');\n\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {\n\n    // Include Admin\n    Plugin::admin('themes', 'box');\n\n}\n\n/**\n * Themes Class\n */\nclass Themes\n{\n    /**\n     * Get Themes\n     */\n    public static function getAdminThemes()\n    {\n        $themes_folders = array();\n\n        // Get all themes folders\n        $_themes_admin_folders = Dir::scan(THEMES_ADMIN);\n\n        // Create an array of valid themes folders\n        foreach($_themes_admin_folders as $folder) if (File::exists(THEMES_ADMIN . DS . $folder . DS . 'index.template.php')) $__themes_admin_folders[] = $folder;\n        foreach($__themes_admin_folders as $theme) $themes[$theme] = $theme;\n\n        return $themes;\n    }\n\n    /**\n     * Get Admin Themes\n     */\n    public static function getSiteThemes()\n    {\n        $themes_folders = array();\n\n        // Get all themes folders\n        $_themes_folders = Dir::scan(THEMES_SITE);\n\n        // Create an array of valid themes folders\n        foreach($_themes_folders as $folder) if (File::exists(THEMES_SITE . DS . $folder . DS . 'index.template.php')) $__themes_folders[] = $folder;\n        foreach($__themes_folders as $theme) $themes[$theme] = $theme;\n\n        return $themes;\n    }\n\n    /**\n     * Get Templates\n     *\n     * @param  string $theme Theme name\n     * @return mixed\n     */\n    public static function getTemplates($theme = null)\n    {\n        $theme = ($theme === null) ? null : (string) $theme;\n\n        if ($theme == null) $theme = Option::get('theme_site_name');\n\n        $templates = array();\n\n        // Get all templates in current theme folder\n        $templates = File::scan(THEMES_SITE . DS . $theme, '.template.php');\n\n        return ($templates) ? $templates : array();\n    }\n\n    /**\n     * Get Chunks\n     *\n     * @param  string $theme Theme name\n     * @return mixed\n     */\n    public static function getChunks($theme = null)\n    {\n        $theme = ($theme === null) ? null : (string) $theme;\n\n        if ($theme == null) $theme = Option::get('theme_site_name');\n\n        $chunks = array();\n\n        // Get all templates in current theme folder\n        $chunks = File::scan(THEMES_SITE . DS . $theme, '.chunk.php');\n\n        return ($chunks) ? $chunks : array();\n    }\n\n    /**\n     * Get Styles\n     *\n     * @param  string $theme Theme name\n     * @return mixed\n     */\n    public static function getStyles($theme = null)\n    {\n        $theme = ($theme === null) ? null : (string) $theme;\n\n        if ($theme == null) $theme = Option::get('theme_site_name');\n\n        $styles = array();\n\n        // Get all templates in current theme folder\n        $styles = File::scan(THEMES_SITE . DS . $theme . DS . 'css', '.css');\n\n        return ($styles) ? $styles : array();\n    }\n\n    /**\n     * Get Scripts\n     *\n     * @param  string $theme Theme name\n     * @return mixed\n     */\n    public static function getScripts($theme = null)\n    {\n        $theme = ($theme === null) ? null : (string) $theme;\n\n        if ($theme == null) $theme = Option::get('theme_site_name');\n\n        $scripts = array();\n\n        // Get all templates in current theme folder\n        $scripts = File::scan(THEMES_SITE . DS . $theme . DS . 'js' . DS , '.js');\n\n        return ($scripts) ? $scripts : array();\n    }\n\n}\n\n/**\n * Chunk class\n */\nclass Chunk\n{\n    /**\n     * Get chunk\n     *\n     * @param string $name  Chunk name\n     * @param string $theme Theme name\n     */\n    public static function get($name, $vars = array(), $theme = null)\n    {\n        // Redefine vars\n        $name  = (string) $name;\n        $current_theme = ($theme === null) ? Option::get('theme_site_name') : (string) $theme;\n\n        // Extract vars\n        extract($vars);\n\n        // Chunk path\n        $chunk_path  = THEMES_SITE . DS . $current_theme . DS;\n\n        // Is chunk exist ?\n        if (file_exists($chunk_path . $name . '.chunk.php')) {\n\n            // Is chunk minified\n            if ( ! file_exists(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php') or\n                filemtime(THEMES_SITE . DS . $current_theme . DS . $name .'.chunk.php') > filemtime(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php')) {\n                    file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php',\n                                      MinifyHTML::process(file_get_contents(THEMES_SITE. DS . $current_theme . DS . $name .'.chunk.php')));\n            }\n\n            // Include chunk\n            include MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php';\n        }\n\n    }\n\n}\n"
  },
  {
    "path": "plugins/box/themes/views/backend/add.view.php",
    "content": "<?php if ($action == 'chunk') { ?><h2 class=\"margin-bottom-1\"><?php echo __('New Chunk', 'themes'); ?></h2><?php } ?>\n<?php if ($action == 'template') { ?><h2 class=\"margin-bottom-1\"><?php echo __('New Template', 'themes'); ?></h2><?php } ?>\n<?php if ($action == 'styles') { ?><h2 class=\"margin-bottom-1\"><?php echo __('New Styles', 'themes'); ?></h2><?php } ?>\n<?php if ($action == 'script') { ?><h2 class=\"margin-bottom-1\"><?php echo __('New Script', 'themes'); ?></h2><?php } ?>\n<br>\n\n<?php if (isset($errors['file_empty_name']) || isset($errors['file_exists'])) $error_class = 'error'; else $error_class = ''; ?>\n\n<?php echo (Form::open(null, array('class' => 'form-horizontal'))); ?>\n\n<?php echo (Form::hidden('csrf', Security::token())); ?>\n\n<?php echo (Form::label('name', __('Name', 'themes'))); ?>\n\n<div class=\"input-group\">\n    <?php echo (Form::input('name', $name, array('class' => (isset($errors['file_empty_name']) || isset($errors['file_exists'])) ? 'form-control error-field' : 'form-control'))); ?>    \n    <?php if ($action == 'chunk') { ?><span class=\"input-group-addon\">.chunk.php</span><?php } ?>\n    <?php if ($action == 'template') { ?><span class=\"input-group-addon\">.template.php</span><?php } ?>\n    <?php if ($action == 'styles') { ?><span class=\"input-group-addon\">.css</span><?php } ?>\n    <?php if ($action == 'script') { ?><span class=\"input-group-addon\">.js</span><?php } ?>\n</div>\n\n<?php\n    if (isset($errors['file_empty_name'])) echo '<span class=\"error-message\">'.$errors['file_empty_name'].'</span>';\n    if (isset($errors['file_exists'])) echo '<span class=\"error-message\">'.$errors['file_exists'].'</span>';\n?>\n\n<div class=\"margin-top-2 margin-bottom-2\">\n<?php\n    if ($action == 'chunk') { echo Form::label('content', __('Chunk content', 'themes')); }\n    if ($action == 'template') { echo Form::label('content', __('Template content', 'themes')); }\n    if ($action == 'styles') { echo Form::label('content', __('Styles content', 'themes')); }\n    if ($action == 'script') { echo Form::label('content', __('Script content', 'themes')); }\n\n    echo Form::textarea('content', $content, array('style' => 'width:100%;height:400px;', 'class' => 'source-editor')); \n?>\n</div>\n\n<?php\n    echo (\n        Form::submit('add_file_and_exit', __('Save and Exit', 'themes'), array('class' => 'btn btn-primary')).Html::nbsp(2).\n        Form::submit('add_file', __('Save', 'themes'), array('class' => 'btn btn-default')).Html::nbsp(2).\n        Html::anchor(__('Cancel', 'themes'), 'index.php?id=themes', array('title' => __('Cancel', 'themes'), 'class' => 'btn btn-default')).\n        Form::close()\n    );\n?>"
  },
  {
    "path": "plugins/box/themes/views/backend/edit.view.php",
    "content": "<?php if ($action == 'chunk') { ?><h2 class=\"margin-bottom-1\"><?php echo __('Edit Chunk', 'themes'); ?></h2><?php } ?>\n<?php if ($action == 'template') { ?><h2 class=\"margin-bottom-1\"><?php echo __('Edit Template', 'themes'); ?></h2><?php } ?>\n<?php if ($action == 'styles') { ?><h2 class=\"margin-bottom-1\"><?php echo __('Edit Styles', 'themes'); ?></h2><?php } ?>\n<?php if ($action == 'script') { ?><h2 class=\"margin-bottom-1\"><?php echo __('Edit Script', 'themes'); ?></h2><?php } ?>\n\n<?php\n    if ($content !== null) {\n\n        if (isset($errors['file_empty_name']) or isset($errors['file_exists'])) $error_class = 'error'; else $error_class = '';\n\n        echo (Form::open(null, array('class' => 'form-horizontal')));\n        echo (Form::hidden('csrf', Security::token()));\n\n?>\n\n<?php if ($action == 'chunk') { echo (Form::hidden('chunk_old_name', Request::get('filename'))); } ?>\n<?php if ($action == 'template') { echo (Form::hidden('template_old_name', Request::get('filename'))); } ?>\n<?php if ($action == 'styles') { echo (Form::hidden('styles_old_name', Request::get('filename'))); } ?>\n<?php if ($action == 'script') { echo (Form::hidden('script_old_name', Request::get('filename'))); } ?>\n\n<?php echo (Form::label('name', __('Name', 'themes'))); ?>\n\n<div class=\"input-group\">\n    <?php echo (Form::input('name', $name, array('class' => (isset($errors['file_empty_name']) || isset($errors['file_exists'])) ? 'form-control error-field' : 'form-control'))); ?>    \n    <?php if ($action == 'chunk') { ?><span class=\"input-group-addon\">.chunk.php</span><?php } ?>\n    <?php if ($action == 'template') { ?><span class=\"input-group-addon\">.template.php</span><?php } ?>\n    <?php if ($action == 'styles') { ?><span class=\"input-group-addon\">.css</span><?php } ?>\n    <?php if ($action == 'script') { ?><span class=\"input-group-addon\">.js</span><?php } ?>\n</div>\n\n<?php\n    if (isset($errors['file_empty_name'])) echo '<span class=\"error-message\">'.$errors['file_empty_name'].'</span>';\n    if (isset($errors['file_exists'])) echo '<span class=\"error-message\">'.$errors['file_exists'].'</span>';\n?>\n\n<div class=\"margin-top-2 margin-bottom-2\">\n<?php\n    if ($action == 'chunk') { echo Form::label('content', __('Chunk content', 'themes')); }\n    if ($action == 'template') { echo Form::label('content', __('Template content', 'themes')); }\n    if ($action == 'styles') { echo Form::label('content', __('Styles content', 'themes')); }\n    if ($action == 'script') { echo Form::label('content', __('Script content', 'themes')); }\n    echo (\n       Form::textarea('content', Html::toText($content), array('style' => 'width:100%;height:400px;', 'class' => 'source-editor'))\n    );\n?>\n</div>\n\n<?php\n    echo (\n       Form::submit('edit_file_and_exit', __('Save and Exit', 'themes'), array('class' => 'btn btn-primary')).Html::nbsp(2).\n       Form::submit('edit_file', __('Save', 'themes'), array('class' => 'btn btn-default')).Html::nbsp(2).\n       Html::anchor(__('Cancel', 'themes'), 'index.php?id=themes', array('title' => __('Cancel', 'themes'), 'class' => 'btn btn-default')).\n       Form::close()\n    );\n\n    } else {\n        if ($action == 'chunk') { echo '<div class=\"message-error\">'.__('This chunk does not exist', 'themes').'</div>'; }\n        if ($action == 'template') { echo '<div class=\"message-error\">'.__('This template does not exist', 'themes').'</div>'; }\n        if ($action == 'styles') { echo '<div class=\"message-error\">'.__('This styles does not exist', 'themes').'</div>'; }\n        if ($action == 'script') { echo '<div class=\"message-error\">'.__('This script does not exist', 'themes').'</div>'; }\n    }\n?>"
  },
  {
    "path": "plugins/box/themes/views/backend/index.view.php",
    "content": "<div class=\"row margin-bottom-2\">\n        <div class=\"col-xs-6\">\n\n            <h2 class=\"margin-bottom-1\"><?php echo __('Site Theme', 'themes'); ?></h2>\n\n            <!-- Themes_selector -->\n            <?php\n                echo (\n                    Form::open().\n                    Form::hidden('csrf', Security::token()).\n                    Form::label('themes', __('Select Theme', 'themes')).\n                    Form::select('themes', $themes_site, $current_site_theme, array('class' => 'form-control')). Html::br().\n                    Form::submit('save_site_theme', __('Save', 'themes'), array('class' => 'btn btn-primary')).\n                    Form::close()\n                );\n            ?>\n            <!-- /Themes_selector -->\n\n        </div>\n\n        <div class=\"col-xs-6\">\n\n            <h2 class=\"margin-bottom-1\"><?php echo __('Admin Theme', 'themes'); ?></h2>\n   \n            <!-- Themes_selector -->\n            <?php\n                echo (\n                    Form::open().\n                    Form::hidden('csrf', Security::token()).\n                    Form::label('themes', __('Select Theme', 'themes')).\n                    Form::select('themes', $themes_admin, $current_admin_theme, array('class' => 'form-control')). Html::br().\n                    Form::submit('save_admin_theme', __('Save', 'themes'), array('class' => 'btn btn-primary')).\n                    Form::close()\n                );\n            ?>\n            <!-- /Themes_selector -->\n\n        </div>\n\n</div>\n\n<hr>\n\n<div class=\"row\">\n\n    <div class=\"col-xs-12\">\n\n<?php\n    echo (\n        Html::heading(__('Current Site Theme', 'themes') . ': '. $current_site_theme, 2). Html::br()\n    );\n?>\n\n<?php echo (Html::anchor(__('Create New Template', 'themes'), 'index.php?id=themes&action=add_template', array('title' => __('Create New Template'), 'class' => 'btn btn-default')).Html::br(2)); ?>\n\n<!-- Templates_list -->\n<table class=\"table table-bordered\">\n    <thead>\n        <tr>\n            <th><?php echo __('Templates', 'themes'); ?></th>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n    <?php if (count($templates) != 0) foreach ($templates as $template) { ?>\n    <tr>\n        <td><?php echo basename($template, '.template.php'); ?></td>\n        <td>\n            <div class=\"pull-right\">\n                <div class=\"btn-group\">\n                    <?php echo Html::anchor(__('Edit', 'themes'), 'index.php?id=themes&action=edit_template&filename='.basename($template, '.template.php'), array('class' => 'btn btn-primary')); ?>\n                    <button type=\"button\" class=\"btn btn-primary dropdown-toggle\" data-toggle=\"dropdown\">\n                        <span class=\"caret\"></span>\n                        <span class=\"sr-only\">Toggle Dropdown</span>\n                    </button>\n                    <ul class=\"dropdown-menu\" role=\"menu\">\n                        <li><?php echo Html::anchor(__('Clone', 'themes'), 'index.php?id=themes&action=clone_template&filename='.basename($template, '.template.php').'&token='.Security::token(), array('title' => __('Clone'))); ?></li>\n                    </ul>\n                </div>\n                    <?php echo Html::anchor(__('Delete', 'themes'),\n                               'index.php?id=themes&action=delete_template&filename='.basename($template, '.template.php').'&token='.Security::token(),\n                               array('class' => 'btn btn-actions btn-danger btn-actions-default', 'onclick' => \"return confirmDelete('\".__('Delete template: :name', 'themes', array(':name' => basename($template, '.template.php'))).\"')\"));\n                    ?>\n            </div>\n        </td>\n    </tr>\n    <?php } ?>\n    </tbody>\n</table>\n<!-- /Templates_list -->\n\n<?php echo (Html::anchor(__('Create New Chunk', 'themes'), 'index.php?id=themes&action=add_chunk', array('title' => __('Create New Chunk', 'themes'), 'class' => 'btn btn-default')).Html::br(2)); ?>\n\n<!-- Chunks_list -->\n<table class=\"table table-bordered\">\n    <thead>\n        <tr>\n            <th><?php echo __('Chunks', 'themes'); ?></th>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n    <?php if (count($chunks) != 0) foreach ($chunks as $chunk) { ?>\n    <tr>\n        <td><?php echo basename($chunk, '.chunk.php'); ?></td>\n        <td>\n            <div class=\"pull-right\">\n                <div class=\"btn-group\">\n                    <?php echo Html::anchor(__('Edit', 'themes'), 'index.php?id=themes&action=edit_chunk&filename='.basename($chunk, '.chunk.php'), array('class' => 'btn btn-primary')); ?>\n                    <button type=\"button\" class=\"btn btn-primary dropdown-toggle\" data-toggle=\"dropdown\">\n                        <span class=\"caret\"></span>\n                        <span class=\"sr-only\">Toggle Dropdown</span>\n                    </button>\n                    <ul class=\"dropdown-menu\" role=\"menu\">\n                        <li><?php echo Html::anchor(__('Clone', 'themes'), 'index.php?id=themes&action=clone_chunk&filename='.basename($chunk, '.chunk.php').'&token='.Security::token(), array('title' => __('Clone', 'themes'))); ?></li>\n                    </ul>\n\t\t\t\t</div>\n                    <?php echo Html::anchor(__('Delete', 'themes'),\n                               'index.php?id=themes&action=delete_chunk&filename='.basename($chunk, '.chunk.php').'&token='.Security::token(),\n                               array('class' => 'btn btn-actions btn-danger btn-actions-default', 'onclick' => \"return confirmDelete('\".__('Delete chunk: :name', 'themes', array(':name' => basename($chunk, '.chunk.php'))).\"')\"));\n                    ?>\n            </div>\n        </td>\n    </tr>\n    <?php } ?>\n    </tbody>\n</table>\n<!-- /Chunks_list -->\n\n<?php echo (Html::anchor(__('Create New Styles', 'themes'), 'index.php?id=themes&action=add_styles', array('title' => __('Create New Style', 'themes'), 'class' => 'btn btn-default')).Html::br(2)); ?>\n\n<!-- Styles_list -->\n<table class=\"table table-bordered\">\n    <thead>\n        <tr>\n            <th><?php echo __('Styles', 'themes'); ?></td>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n    <?php if (count($styles) != 0) foreach ($styles as $style) { ?>\n    <tr>\n        <td><?php echo basename($style, '.css'); ?></td>\n        <td>\n            <div class=\"pull-right\">\n                <div class=\"btn-group\">\n                    <?php echo Html::anchor(__('Edit', 'themes'), 'index.php?id=themes&action=edit_styles&filename='.basename($style, '.css'), array('class' => 'btn btn-primary')); ?>\n                    <button type=\"button\" class=\"btn btn-primary dropdown-toggle\" data-toggle=\"dropdown\">\n                        <span class=\"caret\"></span>\n                        <span class=\"sr-only\">Toggle Dropdown</span>\n                    </button>\n                    <ul class=\"dropdown-menu\" role=\"menu\">\n                        <li><?php echo Html::anchor(__('Clone', 'themes'), 'index.php?id=themes&action=clone_styles&filename='.basename($style, '.css').'&token='.Security::token(), array('title' => __('Clone', 'themes'))); ?></li>\n                    </ul>\n\t\t\t\t</div>\n                    <?php echo Html::anchor(__('Delete', 'themes'),\n                               'index.php?id=themes&action=delete_styles&filename='.basename($style, '.css').'&token='.Security::token(),\n                               array('class' => 'btn btn-actions btn-danger btn-actions-default', 'onclick' => \"return confirmDelete('\".__('Delete styles: :name', 'themes', array(':name' => basename($style, '.css'))).\"')\"));\n                    ?>\n            </div>\n        </td>\n    </tr>\n    <?php } ?>\n    </tbody>\n</table>\n<!-- /Styles_list -->\n\n<?php echo (Html::anchor(__('Create New Script', 'themes'), 'index.php?id=themes&action=add_script', array('title' => __('Create New Script', 'themes'), 'class' => 'btn btn-default')).Html::br(2)); ?>\n\n<!-- Scripts_list -->\n<table class=\"table table-bordered\">\n    <thead>\n        <tr>\n            <th><?php echo __('Scripts', 'themes'); ?></th>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n    <?php if (count($scripts) != 0) foreach ($scripts as $script) { ?>\n    <tr>\n        <td><?php echo basename($script, '.js'); ?></td>\n        <td>\n            <div class=\"pull-right\">\n                <div class=\"btn-group\">\n                    <?php echo Html::anchor(__('Edit', 'themes'), 'index.php?id=themes&action=edit_script&filename='.basename($script, '.js'), array('class' => 'btn btn-primary')); ?>\n                    <button type=\"button\" class=\"btn btn-primary dropdown-toggle\" data-toggle=\"dropdown\">\n                        <span class=\"caret\"></span>\n                        <span class=\"sr-only\">Toggle Dropdown</span>\n                    </button>\n                    <ul class=\"dropdown-menu\" role=\"menu\">\n                        <li><?php echo Html::anchor(__('Clone', 'themes'), 'index.php?id=themes&action=clone_script&filename='.basename($script, '.js').'&token='.Security::token(), array('title' => __('Clone', 'themes'))); ?></li>\n                    </ul>\n                </div>\n                    <?php echo Html::anchor(__('Delete', 'themes'),\n                               'index.php?id=themes&action=delete_script&filename='.basename($script, '.js').'&token='.Security::token(),\n                               array('class' => 'btn btn-actions btn-danger btn-actions-default', 'onclick' => \"return confirmDelete('\".__('Delete script: :name', 'themes', array(':name' => basename($script, '.js'))).\"')\"));\n                    ?>\n            </div>\n        </td>\n    </tr>\n    <?php } ?>\n    </tbody>\n</table>\n<!-- /Scripts_list -->\n\n<?php  // All exept Pages, Users and Sitemap plugins\nif (count(Plugin::$components) > 3) {\n?>\n    <h2><?php echo __('Components templates', 'themes'); ?></h2><br>\n<?php\n    // Its mean that you can add your own actions for this plugin\n    Action::run('admin_themes_extra_index_template_actions');\n}\n?>\n\n    </div>\n</div>\n"
  },
  {
    "path": "plugins/box/users/install/users.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/box/users/users.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>7</plugin_priority>\n    <plugin_name>Users</plugin_name>\n    <plugin_description>Users plugin</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/box/users/js/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/box/users/js/users.js",
    "content": "if (typeof $.monstra == 'undefined') $.monstra = {};\n\n$.monstra.users = {\n\n    init: function() {\n        this.usersFrontendRegistration();\n    },\n\n    usersFrontendRegistration: function() {\n\t\t$('#users_frontend_registration').on('ifChanged', function(event){\n\t\t\t$(\"form[name=users_frontend]\").submit();\n\t\t});\n    }\n\n};\n\n\n$(document).ready(function(){\n    $.monstra.users.init();\n});"
  },
  {
    "path": "plugins/box/users/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Uživatelé',\n            'Login' => 'Přihlásit',\n            'Username' => 'Přihlašovací jméno',\n            'Password' => 'Heslo',\n            'Registered' => 'Registrovaný',\n            'Email' => 'Email',\n            'Role' => 'Úloha',\n            'Roles' => 'Úlohy',\n            'Edit' => 'Editovat',\n            'Actions' => 'Akce',\n            'Delete' => 'Vymazat',\n            'Log In' => 'Přihlásit',\n            'Log Out' => 'Odhlásit',\n            'Register New User' => 'Registrace Nového Uživatele',\n            'New User Registration' => 'Registrace nového uživatele',\n            'Delete user: :user' => 'Vymazat uživatele: :user',\n            'User <i>:user</i> have been deleted.' => 'Uživatel <i>:user</i> byl vymazán.',\n            'This user already exists' => 'Tento uživatel už existuje',\n            'This email already exists' => 'Tento email už existuje',\n            'Changes saved' => 'Uložit změny',\n            'Wrong old password' => 'Nesprávné staré heslo',\n            'Admin' => 'Administrátor',\n            'User' => 'Uživatel',\n            'Editor' => 'Editor',\n            'Register' => 'Registrovat',\n            'Edit profile' => 'Editovat profil',\n            'Save' => 'Uložit',\n            'Firstname' => 'Křestní jméno',\n            'Lastname' => 'Příjmení',\n            'Old password' => 'Staré heslo',\n            'New password' => 'Nové heslo',\n            'Welcome' => 'Vítejte',\n            'Wrong <b>username</b> or <b>password</b>' => 'Nesprávné <b>uživatelské jméno</b> nebo <b>heslo</b>',\n            'Your changes have been saved.' => 'Vaše změny byly uloženy.',\n            'New user have been registered.' => 'Nový uživatel byl zaregistrovaný.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'Registrace',\n            'Username' => 'Uživatelské heslo',\n            'User email is invalid' => 'Uživatelský email není ve správném tvaru',\n            'Reset Password' => 'Obnovit heslo',\n            'Send New Password' => 'Poslat nové heslo',\n            'This user doesnt alredy exist' => 'Tento uživatel neexistuje',\n            'Users - Profile' => 'Uživatelé - Profil',\n            'Users - Edit Profile' => 'Uživatelé - Editovat Profil',\n            'Users - Log In' => 'Uživatelé - Přihlášení',\n            'Users - Registration' => 'Uživatelé - Registrace',\n            'Users - Password Recover' => 'Uživatelé - Obnova hesla',\n            'New Password' => 'Nové heslo',\n            'Forgot your password?' => 'Zapomněli jste heslo?',\n            'New password has been sent' => 'Nové heslo bylo zaslané',\n            'Monstra says: This is not your profile...' => 'Monstra říká: Toto není Váš profil...',\n            'User registration is closed.' => 'Registrace uživatelů je uzavřená.',\n            'Allow user registration' => 'Povolit registraci uživatelů',\n            'Required field' => 'Povinné políčko',\n            'This user doesnt exist' => 'Tento uživatel neexistuje',\n            'Captcha code is wrong' => 'Captcha kód není správný',\n            'Your login details for :site_name has been sent' => 'Váše přihlašovací údaje pro :site_name byly zaslané',\n            'Your new password for :site_name' => 'Vaše nové heslo pro :site_name',\n            'Your login details for :site_name' => 'Vaše přihlašovací údaje pro :site_name',\n            'About Me' => 'O mně',\n            'Profile' => 'Profil',\n            'You are banned for 10 minutes. Try again later' => 'Máte ban na 10 minut. Zkuste to znovu později',\n            'Cancel' => 'Zrušit',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Benutzer',\n            'Login' => 'Login',\n            'Username' => 'Benutzername',\n            'Password' => 'Passwort',\n            'Registered' => 'Registriert',\n            'Email' => 'Email',\n            'Role' => 'Funktion',\n            'Roles' => 'Funktionen',\n            'Edit' => 'Bearbeiten',\n            'Actions' => 'Aktionen',\n            'Delete' => 'Löschen',\n            'Log In' => 'Einloggen',\n            'Log Out' => 'Abmelden',\n            'Register New User' => 'Registriere Neuen Benutzer',\n            'New User Registration' => 'Neuen Benutzer registrieren',\n            'Delete user: :user' => 'Lösche Benutzer: :user',\n            'User <i>:user</i> have been deleted.' => 'Benutzer <i>:user</i> wurde gelöscht.',\n            'This field should not be empty' => 'Dieses Feld darf nicht leer sein',\n            'This user alredy exist' => 'Dieser Benutzer existiert bereits',\n            'Changes saved' => 'Änderungen gespeichert',\n            'Wrong old password' => 'Altes Passwort falsch',\n            'Admin' => 'Admin',\n            'User' => 'Benutzer',\n            'Editor' => 'Redakteur',\n            'Register' => 'Registrieren',\n            'Edit profile' => 'Profil bearbeiten',\n            'Save' => 'Speichern',\n            'Firstname' => 'Vorname',\n            'Lastname' => 'Nachname',\n            'Old password' => 'Altes Passwort',\n            'New password' => 'Neues Passwort',\n            'Welcome' => 'Willkommen',\n            'Wrong <b>username</b> or <b>password</b>' => 'Falscher <b>Benutzername</b> oder <b>Passwort</b>',\n            'Your changes have been saved.' => 'Deine Änderungen wurden gespeichert.',\n            'New user have been registered.' => 'Neuer Benutzer wurde registriert.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'Registrierung',\n            'Username' => 'Benutzername',\n            'User email is invalid' => 'Benutzer-Email ist nicht gültig',\n            'Reset Password' => 'Passwort zurücksetzen',\n            'Send New Password' => 'Neues Passwort zusenden',\n            'This user doesnt alredy exist' => 'Dieser Benutzer ist nocht nicht vorhanden',\n            'Users - Profile' => 'Benutzer - Profil',\n            'Users - Edit Profile' => 'Benutzer - Profil Bearbeiten',\n            'Users - Log In' => 'Benutzer - Log In',\n            'Users - Registration' => 'Benutzer - Registration',\n            'Users - Password Recover' => 'Benutzer - Passwort wiederherstellen',\n            'New Password' => 'Neues Passwort',\n            'Forgot your password?' => 'Passwort vergessen?',\n            'New password has been sent' => 'Neues Passwort wurde versendet',\n            'Monstra says: This is not your profile...' => 'Monstra sagt: Das ist nicht dein Profil...',\n            'User registration is closed.' => 'Benutzer Registration ist geschloßen.',\n            'Allow user registration' => 'Erlaube Benutzer Registration',\n            'Required field' => 'Pflichtfeld',\n            'This user doesnt exist' => 'Dieser Benutzer existiert nicht',\n            'Captcha code is wrong' => 'Captcha Code ist falsch',\n            'Your login details for :site_name has been sent' => 'Deine Login-Daten für :site_name wurden versendet',\n            'Your new password for :site_name' => 'Dein neues Passwort für :site_name',\n            'Your login details for :site_name' => 'Deine Login-Daten für :site_name',\n            'About Me' => 'Über Mich',\n            'Profile' => 'Profil',\n            'You are banned for 10 minutes. Try again later' => 'Du wurdest für 10 Minuten blockiert. Bitte probier es später nochmal',\n            'Cancel' => 'Abbrechen',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Users',\n            'Login' => 'Login',\n            'Username' => 'Username',\n            'Password' => 'Password',\n            'Registered' => 'Registered',\n            'Email' => 'Email',\n            'Role' => 'Role',\n            'Roles' => 'Roles',\n            'Edit' => 'Edit',\n            'Actions' => 'Actions',\n            'Delete' => 'Delete',\n            'Log In' => 'Log In',\n            'Log Out' => 'Log Out',\n            'Register New User' => 'Register New User',\n            'New User Registration' => 'New User Registration',\n            'Delete user: :user' => 'Delete user: :user',\n            'User <i>:user</i> have been deleted.' => 'User <i>:user</i> have been deleted.',\n            'This user already exists' => 'This user already exists',\n            'This email already exists' => 'This email already exists',\n            'Changes saved' => 'Changes saved',\n            'Wrong old password' => 'Wrong old password',\n            'Admin' => 'Admin',\n            'User' => 'User',\n            'Editor' => 'Editor',\n            'Register' => 'Register',\n            'Edit profile' => 'Edit profile',\n            'Save' => 'Save',\n            'Firstname' => 'Firstname',\n            'Lastname' => 'Lastname',\n            'Old password' => 'Old password',\n            'New password' => 'New password',\n            'Welcome' => 'Welcome',\n            'Wrong <b>username</b> or <b>password</b>' => 'Wrong <b>username</b> or <b>password</b>',\n            'Your changes have been saved.' => 'Your changes have been saved.',\n            'New user have been registered.' => 'New user have been registered.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'Registration',\n            'Username' => 'Username',\n            'User email is invalid' => 'User email is invalid',\n            'Reset Password' => 'Reset Password',\n            'Send New Password' => 'Send New Password',\n            'This user doesnt alredy exist' => 'This user doesnt alredy exist',\n            'Users - Profile' => 'Users - Profile',\n            'Users - Edit Profile' => 'Users - Edit Profile',\n            'Users - Log In' => 'Users - Log In',\n            'Users - Registration' => 'Users - Registration',\n            'Users - Password Recover' => 'Users - Password Recover',\n            'New Password' => 'New Password',\n            'Forgot your password?' => 'Forgot your password?',\n            'New password has been sent' => 'New password has been sent',\n            'Monstra says: This is not your profile...' => 'Monstra says: This is not your profile...',\n            'User registration is closed.' => 'User registration is closed.',\n            'Allow user registration' => 'Allow user registration',\n            'Required field' => 'Required field',\n            'This user doesnt exist' => 'This user doesnt exist',\n            'Captcha code is wrong' => 'Captcha code is wrong',\n            'Your login details for :site_name has been sent' => 'Your login details for :site_name has been sent',\n            'Your new password for :site_name' => 'Your new password for :site_name',\n            'Your login details for :site_name' => 'Your login details for :site_name',\n            'About Me' => 'About Me',\n            'Profile' => 'Profile',\n            'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Usuarios',\n            'Login' => 'Iniciar sesión',\n            'Username' => 'Nombre de usuario',\n            'Password' => 'Contraseña',\n            'Registered' => 'Fecha de registro',\n            'Email' => 'Correo electrónico',\n            'Role' => 'Nivel',\n            'Roles' => 'Niveles',\n            'Edit' => 'Editar',\n            'Actions' => 'Acciones',\n            'Delete' => 'Eliminar',\n            'Log In' => 'Iniciar sesión',\n            'Log Out' => 'Cerrar sesión',\n            'Register New User' => 'Registrar nuevo usuario',\n            'New User Registration' => 'Registro de nuevo usuario',\n            'Delete user: :user' => 'Eliminar usuario: :user',\n            'User <i>:user</i> have been deleted.' => 'El usuario <i>:user</i> ha sido eliminado.',\n            'This user alredy exist' => 'Este usuario ya existe',\n\t       'This email alredy exist' => 'Este correo ya existe',\n            'Changes saved' => 'Cambios guardados',\n            'Wrong old password' => 'Contraseña antigua incorrecta',\n            'Admin' => 'Administrador',\n            'User' => 'Usuario',\n            'Editor' => 'Editor',\n            'Register' => 'Registrar',\n            'Edit profile' => 'Editar perfil',\n            'Save' => 'Guardar',\n            'Firstname' => 'Nombre',\n            'Lastname' => 'Apellido',\n            'Old password' => 'Contraseña antigua',\n            'New password' => 'Nueva contraseña',\n            'Welcome' => 'Bienvenido',\n            'Wrong <b>username</b> or <b>password</b>' => '<b>Nombre de usuario</b> o <b>contraseña</b> incorrectos',\n            'Your changes have been saved.' => 'Tus cambios han sido guardados.',\n            'New user have been registered.' => 'El nuevo usuario ha sido registrado.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'Registro',\n            'Username' => 'Nombre de usuario',\n            'User email is invalid' => 'El correo del usuario es inválido',\n            'Reset Password' => 'Restablecer contraseña',\n            'Send New Password' => 'Enviar nueva contraseña',\n            'This user doesnt alredy exist' => 'Este usuario no existe aún',\n            'Users - Profile' => 'Usuarios - Perfil',\n            'Users - Edit Profile' => 'Usuarios - Editar perfil',\n            'Users - Log In' => 'Usuarios - Iniciar sesión',\n            'Users - Registration' => 'Usuarios - Registro',\n            'Users - Password Recover' => 'Usuarios - Recuperar contraseña',\n            'New Password' => 'Nueva contraseña',\n            'Forgot your password?' => '¿Olvidaste tu contraseña?',\n            'New password has been sent' => 'Tu nueva contraseña ha sido enviada',\n            'Monstra says: This is not your profile...' => 'Monstra dice: Este es tu perfil...',\n            'User registration is closed.' => 'El registro de usuarios está cerrado.',\n            'Allow user registration' => 'Permitir registro',\n            'Required field' => 'Campo requerido',\n            'This user doesnt exist' => 'Este usuario no existe',\n            'Captcha code is wrong' => 'Código captcha incorrecto',\n            'Your login details for :site_name has been sent' => 'Tus detalles para iniciar sesión en :site_name han sido enviados',\n            'Your new password for :site_name' => 'Tu nueva contraseña para :site_name',\n            'Your login details for :site_name' => 'Tus detalles para iniciar sesión en :site_name',\n            'About Me' => 'Acerca de mí',\n            'Profile' => 'Perfil',\n            'You are banned for 10 minutes. Try again later' => 'Has sido baneado por 10 minutos. Inténtalo nuevamente más tarde',\n            'Cancel' => 'Cancelar',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'کاربران',\n            'Login' => 'ورود',\n            'Username' => 'نام کاربری',\n            'Password' => 'پسورد',\n            'Registered' => 'عضو',\n            'Email' => 'ایمیل',\n            'Role' => 'سمت',\n            'Roles' => 'سمت',\n            'Edit' => 'ویرایش',\n            'Actions' => 'عملیات',\n            'Delete' => 'حذف',\n            'Enter' => 'ورود',\n            'Logout' => 'خروج',\n            'Register New User' => 'ثبت نام کاربر جدید',\n            'New User Registration' => 'ثبت نام کاربر جدید',\n            'Delete user: :user' => 'حذف کاربر: :user',\n            'User <i>:user</i> have been deleted.' => 'کاربر <i>:user</i> حذف شد.',\n            'This user already exists' => 'این کاربر هم اکنون وجود دارد',\n            'This email already exists' => 'این ایمیل هم اکنون وجود دارد',\n            'Changes saved' => 'تغییرات ذخیره شد',\n            'Wrong old password' => 'پسورد قدیمی اشتباه است',\n            'Admin' => 'مدیر',\n            'User' => 'کاربر',\n            'Editor' => 'ویرایشگر',\n            'Register' => 'عضو',\n            'Edit profile' => 'ویرایش پروفایل',\n            'Save' => 'ذخیره',\n            'Firstname' => 'نام کوچک',\n            'Lastname' => 'نام خانوادگی',\n            'Old password' => 'پسورد قدیم',\n            'New password' => 'پسورد جدید',\n            'Welcome' => 'خوش آمدید',\n            'Wrong <b>username</b> or <b>password</b>' => '<b>نام کاربری</b> و یا <b>پسورد</b> اشتباه است',\n            'Your changes have been saved.' => 'تغییرات شما ذخیره شدند.',\n            'New user have been registered.' => 'کاربر جدید ثبت نام شد.',\n            'Captcha' => 'کدامنیتی',\n            'Registration' => 'ثبت نام',\n            'Username' => 'نام کاربری',\n            'User email is invalid' => 'ایمیل کاربر معتبر نیست',\n            'Reset Password' => 'تنظیم مجدد پسورد',\n            'Send New Password' => 'ارسال پسورد جدید',\n            'This user doesnt alredy exist' => 'این کاربر وجود ندارد',\n            'Users - Profile' => 'کاربران - پروفایل',\n            'Users - Edit Profile' => 'کاربران - ویرایش پروفایل',\n            'Users - Login' => 'کاربران - ورود',\n            'Users - Registration' => 'کاربران - ثبت نام',\n            'Users - Password Recover' => 'کاربران - بازیابی پسورد',\n            'New Password' => 'پسورد جدید',\n            'Forgot your password?' => 'پسورد خود را فراموش کرده اید؟',\n            'New password has been sent' => 'پسورد جدید ارسال شد',\n            'Monstra says: This is not your profile...' => 'مونسترا میگوید: این پروفایل شما نیست ...',\n            'User registration is closed.' => 'ثبت نام کاربر بسته شده است.',\n            'Allow user registration' => 'اجازه ثبت نام کاربر',\n            'Required field' => 'کادر الزامی',\n            'This user doesnt exist' => 'این کاربر وجود ندارد',\n            'Captcha code is wrong' => 'کدامنیتی اشتباه است',\n            'Your login details for :site_name has been sent' => 'جزئیات ورود شما برای :site_name ارسال شد',\n            'Your new password for :site_name' => 'پسورد جدید شما برای :site_name',\n            'Your login details for :site_name' => 'جزئیات ورود شما برای :site_name',\n            'About Me' => 'درباره من',\n            'Profile' => 'پروفایل',\n            'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Utilisateurs',\n            'Login' => 'Identifiant',\n            'Username' => 'Nom d\\'utilisateur',\n            'Password' => 'Mot de passe',\n            'Registered' => 'Enregistrer',\n            'Email' => 'Email',\n            'Role' => 'Role',\n            'Roles' => 'Roles',\n            'Edit' => 'Editer',\n            'Actions' => 'Actions',\n            'Delete' => 'Supprimer',\n            'Enter' => 'Entrer',\n            'Logout' => 'Déconnexion',\n            'Register new user' => 'Inscription d\\'un nouvel utilisateur',\n            'New User Registration' => 'Nouveau utilisateur enregistrer',\n            'Delete user: :user' => 'Supprimer l\\'utilisateur: :user',\n            'User <i>:user</i> have been deleted.' => 'L\\'utilisateur <i>:user</i> a été supprimer.',\n            'This user already exists' => 'Cet utilisateur existe déjà',\n            'This email already exists' => 'Cet email existe déjà',\n            'Changes saved' => 'Changements enregistrer',\n            'Wrong old password' => 'Ancien mot de passe erroné',\n            'Admin' => 'Admin',\n            'User' => 'Utilisateur',\n            'Editor' => 'Editeur',\n            'Register' => 'Enregistrer',\n            'Edit profile' => 'Editer le profil',\n            'Save' => 'Enregistrer',\n            'Firstname' => 'Prénom',\n            'Lastname' => 'Nom',\n            'Old password' => 'Ancien mot de passe',\n            'New password' => 'Nouveau mot de passe',\n            'Welcome' => 'Bienvenue',\n            'Wrong <b>username</b> or <b>password</b>' => 'Mauvais <b>nom d\\'utilisateur</b> ou <b>mot de passe</b>',\n            'Your changes have been saved.' => 'Vos changements ont été sauvegardés.',\n            'New user have been registered.' => 'Le nouvel utilisateura été enregistrer.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'Inscription',\n            'Username' => 'Nom d\\'utilisateur',\n            'User email is invalid' => 'Le mot de passe utilisateur est invalide',\n            'Reset Password' => 'Réinitialiser le mot de passe',\n            'Send New Password' => 'Envoyer un nouveau mot de passe',\n            'This user doesnt alredy exist' => 'Cet utilisateur n\\'existe pas',\n            'Users - Profile' => 'Utilisateurs - Profil',\n            'Users - Edit Profile' => 'Utilisateurs - Editer le profile',\n            'Users - Login' => 'Utilisateurs - Identifiant',\n            'Users - Registration' => 'Utilisateurs - Inscription',\n            'Users - Password Recover' => 'Utilisateurs - Récupération du mot de passe',\n            'New Password' => 'Nouveau mot de passe',\n            'Forgot your password?' => 'Mot de passe oublié ?',\n            'New password has been sent' => 'Un nouveau mot de passe a été envoyé',\n            'Monstra says: This is not your profile...' => 'Monstra dit: Ce n\\'est pas votre profil ...',\n            'User registration is closed.' => 'L\\'enregistrement d\\'utilisateur est fermé.',\n            'Allow user registration' => 'Permettre l\\'enregistrement des utilisateurs',\n            'Required field' => 'Champ requis',\n            'This user doesnt exist' => 'Cet utilisateur n\\'existe pas',\n            'Captcha code is wrong' => 'Le code Captcha est faux',\n            'Your login details for :site_name has been sent' => 'Vos informations de connexion pour :site_name ont étés envoyé',\n            'Your new password for :site_name' => 'Votre nouveau mot de passe pour :site_name',\n            'Your login details for :site_name' => 'Vos identifiants de connexion pour :site_name',\n            'About Me' => 'A propos de moi',\n            'Profile' => 'Profil',\n            'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',\n            'Cancel' => 'Cancel',\n        )\n    );"
  },
  {
    "path": "plugins/box/users/languages/hu.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Felhasználók',\n            'Log In' => 'Belépés',\n            'Username' => 'Felhasználónév',\n            'Password' => 'Jelszó',\n            'Registered' => 'Regisztrált',\n            'Email' => 'E-mail',\n            'Role' => 'Státusz',\n            'Roles' => 'Státuszok',\n            'Edit' => 'Szerkeszt',\n            'Actions' => 'Műveletek',\n            'Delete' => 'Töröl',\n            'Enter' => 'Belépés',\n            'Log Out' => 'Kilépés',\n            'Register New User' => 'Új felhasználó regisztrálása',\n            'New User Registration' => 'Új felhasználó regisztráció',\n            'Delete user: :user' => 'Felhasználó törlése: :user',\n            'User <i>:user</i> have been deleted.' => 'A <i>:user</i> nevű felhasználó törölve.',\n            'This user already exists' => 'Ez a felhasználónév már létezik',\n            'This email already exists' => 'Az e-mail már létezik',\n            'Changes saved' => 'Változtatások elmentve',\n            'Wrong old password' => 'Rossz a régi jelszó',\n            'Admin' => 'Admin',\n            'User' => 'Felhasználó',\n            'Editor' => 'Szerkesztő',\n            'Register' => 'Mehet',\n            'Edit profile' => 'Profil szerkesztése',\n            'Save' => 'Mentés',\n            'Firstname' => 'Keresztnév',\n            'Lastname' => 'Vezetéknév',\n            'Old password' => 'Régi jelszó',\n            'New password' => 'Új jelszó',\n            'Welcome' => 'Üdvözlünk',\n            'Wrong <b>username</b> or <b>password</b>' => 'Hibás <b>username</b> vagy <b>password</b>',\n            'Your changes have been saved.' => 'A módosítások mentése megtörtént.',\n            'New user have been registered.' => 'Új felhasználó regisztrálva.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'Regisztráció',\n            'Username' => 'Felhasználónév',\n            'User email is invalid' => 'A felhasználó e-mail cím érvénytelen',\n            'Reset Password' => 'Jelszó törlése',\n            'Send New Password' => 'Új jelszó küldése',\n            'This user doesnt alredy exist' => 'Ez a felhasználó nem létezik',\n            'Users - Profile' => 'Felhasználók - Profil',\n            'Users - Edit Profile' => 'Felhasználók - Profil szerkesztése',\n            'Users - Login' => 'Felhasználók - Belépés',\n            'Users - Registration' => 'Felhasználók - Regisztráció',\n            'Users - Password Recover' => 'Felhasználók - Elfelejtett jelszó',\n            'New Password' => 'Új jelszó',\n            'Forgot your password?' => 'Elfelejtette a jelszavát?',\n            'New password has been sent' => 'Az új jelszót elküldtük',\n            'Monstra says: This is not your profile...' => 'Monstra mondja: Ez nem a Ön profilja ...',\n            'User registration is closed.' => 'Felhasználó regisztráció lezárult.',\n            'Allow user registration' => 'Felhasználó regisztráció engedélyezve',\n            'Required field' => 'Kötelező mező',\n            'This user doesnt exist' => 'Ez a felhasználó nem létezik',\n            'Captcha code is wrong' => 'Captcha kód hibás',\n            'Your login details for :site_name has been sent' => 'Elküldve a belépési adatai a(z) :site_name weboldalhoz',\n            'Your new password for :site_name' => 'Új jelszó a(z) :site_name weboldalhoz',\n            'Your login details for :site_name' => 'Belépési adatok a(z) :site_name weboldalhoz',\n            'About Me' => 'Rólam',\n            'Profile' => 'Profil',\n            'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',\n            'Cancel' => 'Cancel',\n        )\n    );"
  },
  {
    "path": "plugins/box/users/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Pengguna',\n            'Login' => 'Masuk',\n            'Username' => 'Pengguna',\n            'Password' => 'Password',\n            'Registered' => 'Terdaftar',\n            'Email' => 'Email',\n            'Role' => 'Peran',\n            'Roles' => 'Peranan',\n            'Edit' => 'Perbaiki',\n            'Actions' => 'Tindakan',\n            'Delete' => 'Hapus',\n            'Enter' => 'Masukkan',\n            'Logout' => 'Keluar',\n            'Register New User' => 'Daftarkan Pengguna Baru',\n            'New User Registration' => 'Pendaftaran Pengguna Baru',\n            'Delete user: :user' => 'Hapus pengguna: :user',\n            'User <i>:user</i> have been deleted.' => 'Pengguna <i>:user</i> telah dihapus.',\n            'This user already exists' => 'Pengguna ini sudah terdaftar',\n            'This email already exists' => 'Email',\n            'Changes saved' => 'Perubahan disimpan',\n            'Wrong old password' => 'Password lama salah',\n            'Admin' => 'Admin',\n            'User' => 'Pengguna',\n            'Editor' => 'Editor',\n            'Register' => 'Daftar',\n            'Edit profile' => 'Perbaiki Profil',\n            'Save' => 'Simpan',\n            'Firstname' => 'Nama Pertama',\n            'Lastname' => 'Nama Terakhir',\n            'Old password' => 'Password Lama',\n            'New password' => 'Password Baru',\n            'Welcome' => 'Selamat Datang',\n            'Wrong <b>username</b> or <b>password</b>' => 'Kesalahan <b>nama pengguna</b> atau <b>password</b>',\n            'Your changes have been saved.' => 'Perubahan telah disimpan.',\n            'New user have been registered.' => 'Pengguna baru telah terdaftar.',\n            'Captcha' => 'Verifikasi',\n            'Registration' => 'Pendaftaran',\n            'Username' => 'Nama Pengguna',\n            'User email is invalid' => 'Email tidak cocok',\n            'Reset Password' => 'Mengganti Password',\n            'Send New Password' => 'Mengirim password baru',\n            'This user doesnt alredy exist' => 'Pengguna ini belum ada',\n            'Users - Profile' => 'Pengguna - Profil',\n            'Users - Edit Profile' => 'Pengguna - Perbaiki Profil',\n            'Users - Login' => 'Pengguna - Masuk',\n            'Users - Registration' => 'Pengguna -  Pendaftaran',\n            'Users - Password Recover' => 'Pengguna - Mendapatkan Kembali Password',\n            'New Password' => 'Password Baru',\n            'Forgot your password?' => 'Lupa Password Anda?',\n            'New password has been sent' => 'Password baru telah dikirim',\n            'Monstra says: This is not your profile...' => 'Katanya Monstra: Ini bukan profil Anda ...',\n            'User registration is closed.' => 'Pendaftaran pengguna telah ditutup.',\n            'Allow user registration' => 'Izinkan pendaftaran pengguna',\n            'Required field' => 'Isian yang diperlukan',\n            'This user doesnt exist' => 'Pengguna ini tidak terdaftar',\n            'Captcha code is wrong' => 'Kode verifikasi salah',\n            'Your login details for :site_name has been sent' => 'Rincian data :site_name telah dikirim',\n            'Your new password for :site_name' => 'Password baru untuk :site_name',\n            'Your login details for :site_name' => 'Rincian data untuk :site_name',\n            'About Me' => 'Tentang Saya',\n            'Profile' => 'Profil',\n            'You are banned for 10 minutes. Try again later' => 'Anda dilarang masuk selama 10 menit. Silahkan dicoba lagi nanti',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Utenti',\n            'Login' => 'Login',\n            'Password' => 'Password',\n            'Email' => 'E-mail',\n            'Registered' => 'Registrato',\n            'Role' => 'Ruolo',\n            'Roles' => 'Ruoli',\n            'Actions' => 'Azioni',\n            'Edit' => 'Modifica',\n            'Delete' => 'Cancella',\n            'Log In' => 'Log In',\n            'Log Out' => 'Esci',\n            'Register New User' => 'Crea Un Account',\n            'Delete user: :user' => 'Elimina utente: :user',\n            'User <i>:user</i> have been deleted.' => 'Utente <i>:user</i> è stato eliminato.',\n            'This user already exists' => 'Tale utente è già esistente',\n            'This email already exists' => 'Tale ta email è già esistente',\n            'Changes saved' => 'Le modifiche sono state salvate',\n            'Wrong old password' => 'Vecchia password errata',\n            'Admin' => 'Amministratore',\n            'User' => 'Utente',\n            'Editor' => 'Editore',\n            'Register' => 'Registrazione',\n            'Edit profile' => 'Modifica profilo',\n            'Save' => 'Salva',\n            'Firstname' => 'Nome',\n            'Lastname' => 'Cognome',\n            'Old password' => 'Vecchia password',\n            'New password' => 'Nuova password',\n            'Welcome' => 'Benvenuto',\n            'Wrong <b>username</b> or <b>password</b>' => '<b>username</b> o <b>password</b> errata',\n            'Your changes have been saved.' => 'Le modifiche sono state salvate.',\n            'New user have been registered.' => 'Nuovo utente è stato registrato.',\n            'Captcha' => 'Codice captcha',\n            'Registration' => 'Registrazione',\n            'Username' => 'Nome utente',\n            'User email is invalid' => 'E-mail non valido',\n            'Reset Password' => 'Resetta la password',\n            'Send New Password' => 'Invia la password',\n            'Users - Profile' => 'Utenti - Profilo',\n            'Users - Edit Profile' => 'Utenti - Modifica profilo',\n            'Users - Log In' => 'Utenti - Log In',\n            'Users - Registration' => 'Utenti - Registrazione',\n            'Users - Password Recover' => 'Utenti - Password Recovery',\n            'New Password' => 'Nuova password',\n            'Forgot your password?' => 'Password dimenticata?',\n            'New password has been sent' => 'Nuova password è stata inviata',\n            'Monstra says: This is not your profile...' => 'Monstra dice: Questo non è il tuo profilo.',\n            'User registration is closed.' => 'Registrazione utenti è chiusa.',\n            'Allow user registration' => 'Consenti registrazione utenti.',\n            'Required field' => 'Campo obbligatorio',\n            'This user doesnt exist' => 'Tale utente non esiste',\n            'Captcha code is wrong' => 'Codice captcha errato',\n            'Your login details for :site_name has been sent' => 'I tuoi dati di accesso :site_name sono stati inviati',\n            'Your new password for :site_name' => 'La tua nuova password per :site_name',\n            'Your login details for :site_name' => 'I tuoi dati di accesso per :site_name',\n            'About Me' => 'Su di me',\n            'Profile' => 'Profilo',\n            'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/ja.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'ユーザー',\n            'Login' => 'ログイン',\n            'Username' => 'ユーザー名',\n            'Password' => 'パスワード',\n            'Registered' => '登録日',\n            'Email' => 'メールアドレス',\n            'Role' => 'ロール',\n            'Roles' => 'ロール',\n            'Edit' => '編集',\n            'Actions' => '操作',\n            'Delete' => '削除',\n            'Log In' => 'ログイン',\n            'Log Out' => 'ログアウト',\n            'Register New user' => '新規ユーザー登録',\n            'New User Registration' => '新規ユーザーの登録',\n            'Delete user: :user' => 'ユーザーの削除: :user',\n            'User <i>:user</i> have been deleted.' => 'ユーザー <i>:user</i> は削除されました。',\n            'This user already exists' => 'ユーザーはすでに存在しています。',\n            'This email already exists' => 'このメールアドレスはすでに存在しています。',\n            'Changes saved' => '変更は保存されました',\n            'Wrong old password' => '古いパスワードが間違っています',\n            'Admin' => '管理者',\n            'User' => 'ユーザー',\n            'Editor' => '編集者',\n            'Register' => '登録',\n            'Edit profile' => 'プロフィールの編集',\n            'Save' => '保存',\n            'Firstname' => '名',\n            'Lastname' => '姓',\n            'Old password' => '古いパスワード',\n            'New password' => '新しいパスワード',\n            'Welcome' => 'ようこそ',\n            'Wrong <b>username</b> or <b>password</b>' => '<b>ユーザー名</b> または <b>パスワード</b> が不正です',\n            'Your changes have been saved.' => '変更は保存されました。',\n            'New user have been registered.' => '新規ユーザーが登録されました。',\n            'Captcha' => 'Captcha',\n            'Registration' => '登録',\n            'Username' => 'ユーザー名',\n            'User email is invalid' => 'ユーザーのメールアドレスが無効です',\n            'Reset Password' => 'パスワードをリセット',\n            'Send New Password' => '新しいパスワードを送信しました。',\n            'This user doesnt alredy exist' => 'このユーザーはすでに存在しています。',\n            'Users - Profile' => 'ユーザー - プロフィール',\n            'Users - Edit Profile' => 'ユーザー - プロフィールの編集',\n            'Users - Log In' => 'ユーザー - ログイン',\n            'Users - Registration' => 'ユーザー - 登録',\n            'Users - Password Recover' => 'ユーザー - パスワードの復帰',\n            'New Password' => '新しいパスワード',\n            'Forgot your password?' => 'パスワードを忘れましたか？',\n            'New password has been sent' => '新しいパスワードを送信しました。',\n            'Monstra says: This is not your profile...' => 'Monstraより: これはあなたのプロフィールではありません...',\n            'User registration is closed.' => '現在ユーザー登録はできません。',\n            'Allow user registration' => 'ユーザー登録可能',\n            'Required field' => '必須項目',\n            'This user doesnt exist' => 'ユーザーは存在しません',\n            'Captcha code is wrong' => 'Captchaコードが間違っています',\n            'Your login details for :site_name has been sent' => 'Your login details for :site_name has been sent',\n            'Your new password for :site_name' => 'Your new password for :site_name',\n            'Your login details for :site_name' => 'Your login details for :site_name',\n            'About Me' => 'ひとこと',\n            'Profile' => 'プロフィール',\n            'You are banned for 10 minutes. Try again later' => '10分間ログインができません。後ほどお試しください。',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'მომხმარებლები',\n            'Login' => 'შესვლა',\n            'Password' => 'პაროლი',\n            'Email' => 'ელ-ფოსტა',\n            'Registered' => 'დარეგისტრირებული',\n            'Role' => 'როლი',\n            'Roles' => 'როლები',\n            'Actions' => 'მოქმედება',\n            'Edit' => 'რედაქტირება',\n            'Delete' => 'წაშლა',\n            'Log In' => 'შესვლა',\n            'Log Out' => 'გომოსვლა',\n            'Register New User' => 'ახალი მომხმარებლის რეგისტრაცია',\n            'New User Registration' => 'ახალი მომხმარებლის რეგისტრაცია',\n            'Delete user: :user' => 'მომხმარებლის წაშლა: :user',\n            'User <i>:user</i> have been deleted.' => 'მომხმარებელი <i>:user</i> წაშლილია.',\n            'This user already exists' => 'ეს მომხმარებელი უკვე არსებობს',\n            'This email already exists' => 'ეს ელ-ფოსტა უკვე არსებობს',\n            'Changes saved' => 'ცვლილებები შენახულია',\n            'Wrong old password' => 'არასწორი ძველი პაროლი',\n            'Admin' => 'ადმინისტრატორი',\n            'User' => 'მომხმარებელი',\n            'Editor' => 'რედაქტორი',\n            'Register' => 'რეგისტრაცია',\n            'Edit profile' => 'მომხმარებლის პროფილის რედაქტირება',\n            'Save' => 'შენახვა',\n            'Firstname' => 'სახელი',\n            'Lastname' => 'გვარი',\n            'Old password' => 'ძველი პაროლი',\n            'New password' => 'ახალი პაროლი',\n            'Welcome' => 'მოგესალმებით',\n            'Wrong <b>username</b> or <b>password</b>' => 'არასწორი <b>ლოგინი</b> ან <b>პაროლი</b>',\n            'Your changes have been saved.' => 'თქვენი ცვლილებები შენახულია.',\n            'New user have been registered.' => 'ახლი მომხმარებელი დარეგისტრირდა.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'რეგისტრაცია',\n            'Username' => 'მომხმარებლის სახელი',\n            'User email is invalid' => 'ელ-ფოსტა არასწორია',\n            'Reset Password' => 'პაროლის რესეტი',\n            'Send New Password' => 'პაროლის გაგზავნა',\n            'Users - Profile' => 'მომხმარებლები - პროფილი',\n            'Users - Edit Profile' => 'მომხმარებლები - პროფილის რედაქტირება',\n            'Users - Log In' => 'მომხმარებლები - შესვლა',\n            'Users - Registration' => 'მომხმარებლები - რეგისტრაცია',\n            'Users - Password Recover' => 'მომხმარებლები - პაროლის აღდგენა',\n            'New Password' => 'ახალი პაროლი',\n            'Forgot your password?' => 'პაროლი დაგავიწყდათ?',\n            'New password has been sent' => 'ახალი პაროლი გაგზავნილია',\n            'Monstra says: This is not your profile...' => 'Monstra ამბობს: ეს არ არის შენი პროფილი...',\n            'User registration is closed.' => 'მომხმარებლების რეგისტრაცია დახურულია.',\n            'Allow user registration' => 'მომხმარებლების რეგისტრაციას ნების მიცემა.',\n            'Required field' => 'აუცილებელი ველი',\n            'This user doesnt exist' => 'ასეთი მომხმარებელი არ არსებობს',\n            'Captcha code is wrong' => 'Captcha-ზე პასუხი არასწორია!',\n            'Your login details for :site_name has been sent' => 'თქვენი მონაცემები :site_name -ის მისაწვდომად გაგზავნილია',\n            'Your new password for :site_name' => 'თქვენი ახალი პაროლი :site_name -თვის',\n            'Your login details for :site_name' => 'თქვენი მონაცემები :site_name -ის მისაწვდომად',\n            'About Me' => 'ჩემს შესახებ',\n            'Profile' => 'პროფილი',\n            'You are banned for 10 minutes. Try again later' => 'თქვენ 10 წუთით ხართ დაბლოკილი. სცადეთ მოგვიანებით',\n            'Cancel' => 'გაუქმება',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Naudotojai',\n            'Login' => 'Prisijungti',\n            'Username' => 'Prisijungimo vardas',\n            'Password' => 'Slaptažodis',\n            'Registered' => 'Registruotis',\n            'Email' => 'El. paštas',\n            'Role' => 'Rolė',\n            'Roles' => 'Rolės',\n            'Edit' => 'Redaguoti',\n            'Actions' => 'Veiksmai',\n            'Delete' => 'Ištrinti',\n            'Log In' => 'Prisijungti',\n            'Log Out' => 'Atsijungti',\n            'Register New User' => 'Užregistruoti Naują Naudotoją',\n            'New User Registration' => 'Naujo naudotojo registracija',\n            'Delete user: :user' => 'Ištrinti naudotoją :user',\n            'User <i>:user</i> have been deleted.' => 'Naudotojas <i>:user</i> ištrintas.',\n            'This field should not be empty' => 'Šis laukas negali būti tuščias',\n            'This user alredy exist' => 'Toks naudotojas jau yra',\n            'Changes saved' => 'Pakeitimai išsaugoti',\n            'Wrong old password' => 'Neteisingas senas slaptažodis',\n            'Admin' => 'Administratorius',\n            'User' => 'Naudotojas',\n            'Editor' => 'Redaktorius',\n            'Register' => 'Užregistruoti',\n            'Edit profile' => 'Redaguoti profilį',\n            'Save' => 'Išsaugoti',\n            'Firstname' => 'Vardas',\n            'Lastname' => 'Pavardė',\n            'Old password' => 'Senas slaptažodis',\n            'New password' => 'Naujas slaptažodis',\n            'Welcome' => 'Sveiki',\n            'Wrong <b>username</b> or <b>password</b>' => 'Neteisingas <b>prisijungimo vardas</b> arba <b>slaptažodis</b>',\n            'Your changes have been saved.' => 'Pakeitimai išsaugoti.',\n            'New user have been registered.' => 'Nauja naudotojas užregistruotas.',\n            'Captcha' => 'Saugos kodas',\n            'Registration' => 'Registracija',\n            'User email is invalid' => 'Neteisingas naudotojo el. pašto adresas',\n            'Reset Password' => 'Atstatyti slaptažodį',\n            'Send New Password' => 'Išsiųsti naują slaptažodį',\n            'This user doesnt alredy exist' => 'Tokio naudoto nebėra',\n            'Users - Profile' => 'Naudotojai - Profilis',\n            'Users - Edit Profile' => 'Naudotojai - Redaguoti profilį',\n            'Users - Log In' => 'Naudotojai - Prisijungti',\n            'Users - Registration' => 'Naudotojai - Registracija',\n            'Users - Password Recover' => 'Naudotojai - Slaptažodžio priminimas',\n            'New Password' => 'Naujas slaptažodis',\n            'Forgot your password?' => 'Pamiršai slaptažodį?',\n            'New password has been sent' => 'Naujas slaptažodis išsiųstas',\n            'Monstra says: This is not your profile...' => 'Monstra sako: profilis ne tavo...',\n            'User registration is closed.' => 'Registracija uždaryta.',\n            'Allow user registration' => 'Leisti registruotis naudotojams',\n            'Required field' => 'Privalomas laukas',\n            'This user doesnt exist' => 'Tokio naudotojo nėra',\n            'Captcha code is wrong' => 'Saugos kodas neteisingas',\n            'Your login details for :site_name has been sent' => 'Prisijungimo duomenys prie :site_name išsiųsti',\n            'Your new password for :site_name' => 'Naujas :site_name slaptažodis',\n            'Your login details for :site_name' => 'Prisijungimo prie :site_name detalės',\n            'About Me' => 'Apie mane',\n            'Profile' => 'Profilis',\n            'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Gebruikers',\n            'Login' => 'Login',\n            'Username' => 'Gebruikersnaam',\n            'Password' => 'Wachtwoord',\n            'Registered' => 'Geregistreerd',\n            'Email' => 'Email',\n            'Role' => 'Type',\n            'Roles' => 'Types',\n            'Edit' => 'Bewerken',\n            'Actions' => 'Acties',\n            'Delete' => 'Verwijderen',\n            'Log In' => 'Log in',\n            'Log Out' => 'Uitloggen',\n            'Register New User' => 'Nieuwe gebruiker',\n            'New User Registration' => 'Registratie nieuwe gebruiker',\n            'Delete user: :user' => 'Verwijder gebruiker: :user',\n            'User <i>:user</i> have been deleted.' => 'Gebruiker <i>:user</i> is verwijderd.',\n            'This field should not be empty' => 'Dit veld mag niet leeg zijn',\n            'This user alredy exist' => 'Deze gebruiker bestaat al',\n            'Changes saved' => 'Wijzigingen opgeslagen',\n            'Wrong old password' => 'Foutief oud wachtwoord',\n            'Admin' => 'Admin',\n            'User' => 'Gebruiker',\n            'Editor' => 'Redacteur',\n            'Register' => 'Registreer',\n            'Edit profile' => 'Profiel bewerken',\n            'Save' => 'Opslaan',\n            'Firstname' => 'Voornaam',\n            'Lastname' => 'Achternaam',\n            'Old password' => 'Oude wachtwoord',\n            'New password' => 'Nieuw wachtwoord',\n            'Welcome' => 'Welkom',\n            'Wrong <b>username</b> or <b>password</b>' => 'Foutieve <b>gebruikersnaam</b> of <b>wachtwoord</b>',\n            'Your changes have been saved.' => 'De wijzigingen zijn opgeslagen.',\n            'New user have been registered.' => 'Nieuwe gebruiker is geregistreerd.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'Registratie',\n            'Username' => 'Gebruikersnaam',\n            'User email is invalid' => 'Gebruikers email is ongeldig',\n            'Reset Password' => 'Wachtwoord Opnieuw Instellen',\n            'Send New Password' => 'Verzend nieuw wachtwoord',\n            'This user doesnt alredy exist' => 'Deze gebruiker bestaat nog niet',\n            'Users - Profile' => 'Gebruikers - Profiel',\n            'Users - Edit Profile' => 'Gebruikers - Bewerk profiel',\n            'Users - Log In' => 'Gebruikers - Log In',\n            'Users - Registration' => 'Gebruikers - Registratie',\n            'Users - Password Recover' => 'Gebruikers - Wachtwoord opnieuw instellen',\n            'New Password' => 'Nieuw wachtwoord',\n            'Forgot your password?' => 'Wachtwoord vergeten?',\n            'New password has been sent' => 'Nieuw wachtwoord is verzonden',\n            'Monstra says: This is not your profile...' => 'Monstra zegt: dit is niet uw profiel...',\n            'User registration is closed.' => 'Gebruikersregistratie is gesloten.',\n            'Allow user registration' => 'Sta gebruikersregistratie toe',\n            'Required field' => 'Vereist veld',\n            'This user doesnt exist' => 'Deze gebruiker bestaat niet',\n            'Captcha code is wrong' => 'Captcha Code is helaas foutief',\n            'Your login details for :site_name has been sent' => 'Uw login details voor :site_name worden verzonden',\n            'Your new password for :site_name' => 'Uw nieuwe wachtwoord voor :site_name',\n            'Your login details for :site_name' => 'Uw login details voor :site_name',\n            'About Me' => 'Over mij',\n            'Profile' => 'Profiel',\n            'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Użytkownicy',\n            'Login' => 'Login',\n            'Username' => 'Nazwa użytkownika',\n            'Password' => 'Hasło',\n            'Registered' => 'Zarejestrowany',\n            'Email' => 'Email',\n            'Role' => 'Rola',\n            'Roles' => 'Role',\n            'Edit' => 'Edytuj',\n            'Actions' => 'Akcje',\n            'Delete' => 'Usuń',\n            'Log In' => 'Zaloguj',\n            'Log Out' => 'Wyloguj',\n            'Register New user' => 'Zarejestruj nowego użytkownika',\n            'New User Registration' => 'Rejestracja nowego użytkownika',\n            'Delete user: :user' => 'Czy napewno usunąć użytkownika: :user',\n            'User <i>:user</i> have been deleted.' => 'Użytkownik <i>:user</i> został usunięty.',\n            'This user already exists' => 'Ten użytkownik już istnieje',\n            'This email already exists' => 'Ten email już istnieje',\n            'Changes saved' => 'Zmiany zostały zapisane',\n            'Wrong old password' => 'Stare hasło jest niewłaściwe',\n            'Admin' => 'Wydawca',\n            'User' => 'Użytkownik',\n            'Editor' => 'Redaktor',\n            'Register' => 'Zarejestruj',\n            'Edit profile' => 'Edytuj profil',\n            'Save' => 'Zapisz',\n            'Firstname' => 'Imię',\n            'Lastname' => 'Nazwisko',\n            'Old password' => 'Stare hasło',\n            'New password' => 'Nowe hasło',\n            'Welcome' => 'Witaj',\n            'Wrong <b>username</b> or <b>password</b>' => 'Niewłaściwa <b>nazwa użytkownika</b> lub <b>hasło</b>',\n            'Your changes have been saved.' => 'Twoje zmiany zostały zapisane.',\n            'New user have been registered.' => 'Nowy użytkownik został zarejestrowany.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'Rejestracja',\n            'Username' => 'Nazwa użytkownika',\n            'User email is invalid' => 'Email użytkownika jest nieprawidłowy',\n            'Reset Password' => 'Resetuj hasło',\n            'Send New Password' => 'Wyślij nowe hasło',\n            'This user doesnt alredy exist' => 'Ten użytkownik już nie istnieje',\n            'Users - Profile' => 'Użytkownicy - Profil',\n            'Users - Edit Profile' => 'Użytkownicy - Edytuj profil',\n            'Users - Log In' => 'Użytkownicy - Zaloguj',\n            'Users - Registration' => 'Użytkownicy - Rejestracja',\n            'Users - Password Recover' => 'Użytkownicy - Odzyskaj hasło',\n            'New Password' => 'Nowe hasło',\n            'Forgot your password?' => 'Nie pamiętasz swojego hasła?',\n            'New password has been sent' => 'Nowe hasło zostało wysłane',\n            'Monstra says: This is not your profile...' => 'Monstra mówi: To nie jest Twój profil...',\n            'User registration is closed.' => 'Rejestracja użytkowników jest zamknięta.',\n            'Allow user registration' => 'Pozwól na rejestrację użytkowników',\n            'Required field' => 'Pole wymagane',\n            'This user doesnt exist' => 'Ten użytkownik nie istnieje',\n            'Captcha code is wrong' => 'Kod captcha jest niewłaściwy',\n            'Your login details for :site_name has been sent' => 'Twoje dane logowania dla :site_name zostały wysłane',\n            'Your new password for :site_name' => 'Twoje nowe hasło dla :site_name',\n            'Your login details for :site_name' => 'Twoje dane logowania dla :site_name',\n            'About Me' => 'O mnie',\n            'Profile' => 'Profil',\n            'You are banned for 10 minutes. Try again later' => 'Jesteś zbanowany na 10 minut. Spróbuj ponownie później',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Usuários',\n            'Login' => 'Login',\n            'Username' => 'Usuário',\n            'Password' => 'Senha',\n            'Registered' => 'Registrado',\n            'Email' => 'Email',\n            'Role' => 'Grupo',\n            'Roles' => 'Grupos',\n            'Edit' => 'Editar',\n            'Actions' => 'Ações',\n            'Delete' => 'Deletar',\n            'Log In' => 'Log In',\n            'Log Out' => 'Sair',\n            'Register New User' => 'Registrar Novo Usuário',\n            'New User Registration' => 'Novo usuário registrado',\n            'Delete user: :user' => 'Deletar o usuário: :user',\n            'User <i>:user</i> have been deleted.' => 'O usuário <i>:user</i> foi deletado.',\n            'This field should not be empty' => 'Este campo não pode estar vazio',\n            'This user alredy exist' => 'Este usuário já existe',\n            'Changes saved' => 'Alterações salvas',\n            'Wrong old password' => 'Senha antiga incorreta',\n            'Admin' => 'Admin',\n            'User' => 'Usuário',\n            'Editor' => 'Editor',\n            'Register' => 'Registrar',\n            'Edit profile' => 'Editar perfil',\n            'Save' => 'Salvar',\n            'Firstname' => 'Nome',\n            'Lastname' => 'Sobrenome',\n            'Old password' => 'Senha antiga',\n            'New password' => 'Senha nova',\n            'Welcome' => 'Bem vindo',\n            'Wrong <b>username</b> or <b>password</b>' => '<b>usuário</b> ou <b>senha</b> incorretos',\n            'Your changes have been saved.' => 'Suas alterações foram salvas.',\n            'New user have been registered.' => 'Novo usuário registrado.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'Registração',\n            'Username' => 'Nome de usuário',\n            'User email is invalid' => 'O email do usuário é inválido',\n            'Reset Password' => 'Resetar sebga',\n            'Send New Password' => 'Enviar nova senha',\n            'This user doesnt alredy exist' => 'Este usuário não existe ainda',\n            'Users - Profile' => 'Usuários - Perfil',\n            'Users - Edit Profile' => 'Usuários - Editar Perfil',\n            'Users - Log In' => 'Usuários - Log In',\n            'Users - Registration' => 'Usuários - Registração',\n            'Users - Password Recover' => 'Usuários - Lembrar Senha',\n            'New Password' => 'Nova senha',\n            'Forgot your password?' => 'Esqueceu sua senha?',\n            'New password has been sent' => 'A nova senha foi enviada',\n            'Monstra says: This is not your profile...' => 'Monstra diz: Este não é o seu perfil...',\n            'User registration is closed.' => 'O registro de usuários está desativado.',\n            'Allow user registration' => 'Permitir novos registros de usuários',\n            'Required field' => 'Campo requerido',\n            'This user doesnt exist' => 'Este usuário não existe',\n            'Captcha code is wrong' => 'O captcha está errado',\n            'Your login details for :site_name has been sent' => 'Seus dados de login para o site :site_name foram enviados',\n            'Your new password for :site_name' => 'Sua nova senha para o site :site_name',\n            'Your login details for :site_name' => 'Seu novo login para o site :site_name',\n            'About Me' => 'Sobre mim',\n            'Profile' => 'Perfil',\n            'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Пользователи',\n            'Login' => 'Вход',\n            'Password' => 'Пароль',\n            'Email' => 'Эл. почта',\n            'Registered' => 'Зарегистрирован',\n            'Role' => 'Роль',\n            'Roles' => 'Роли',\n            'Actions' => 'Действия',\n            'Edit' => 'Редактировать',\n            'Delete' => 'Удалить',\n            'Log In' => 'Вход',\n            'Log Out' => 'Выход',\n            'Register New User' => 'Регистрация нового пользователя',\n            'New User Registration' => 'Регистрация нового пользователя',\n            'Delete user: :user' => 'Удалить пользователя: :user',\n            'User <i>:user</i> have been deleted.' => 'Пользователь <i>:user</i> удален.',\n            'This user already exists' => 'Такой пользователь уже существует',\n            'This email already exists' => 'Такая эл. почта уже существует',\n            'Changes saved' => 'Изменения сохранены',\n            'Wrong old password' => 'Неправильный старый пароль',\n            'Admin' => 'Администратор',\n            'User' => 'Пользователь',\n            'Editor' => 'Редактор',\n            'Register' => 'Регистрация',\n            'Edit profile' => 'Редактирование профиля пользователя',\n            'Save' => 'Сохранить',\n            'Firstname' => 'Имя',\n            'Lastname' => 'Фамилия',\n            'Old password' => 'Старый пароль',\n            'New password' => 'Новый пароль',\n            'Welcome' => 'Добро пожаловать',\n            'Wrong <b>username</b> or <b>password</b>' => 'Неправильный <b>логин</b> или <b>пароль</b>',\n            'Your changes have been saved.' => 'Ваши изменения были сохранены.',\n            'New user have been registered.' => 'Новый пользователь был зарегистрирован.',\n            'Captcha' => 'Каптча',\n            'Registration' => 'Регистрация',\n            'Username' => 'Имя пользователя',\n            'User email is invalid' => 'Эл. почта является недействительной',\n            'Reset Password' => 'Сбросить пароль',\n            'Send New Password' => 'Отправить пароль',\n            'Users - Profile' => 'Пользователи - Профиль',\n            'Users - Edit Profile' => 'Пользователи - Редактирование профиля',\n            'Users - Log In' => 'Пользователи - Вход',\n            'Users - Registration' => 'Пользователи - Регистрация',\n            'Users - Password Recover' => 'Пользователи - Восстановление пароля',\n            'New Password' => 'Новый пароль',\n            'Forgot your password?' => 'Забыли пароль?',\n            'New password has been sent' => 'Новый пароль был отправлен',\n            'Monstra says: This is not your profile...' => 'Монстра говорит: Это не твой профиль...',\n            'User registration is closed.' => 'Регистрация пользователей закрыта.',\n            'Allow user registration' => 'Разрешить регистрацию пользователей.',\n            'Required field' => 'Обязательное поле',\n            'This user doesnt exist' => 'Такого пользователя не существует',\n            'Captcha code is wrong' => 'Неверный код каптча',\n            'Your login details for :site_name has been sent' => 'Ваши данные для доступа к :site_name были отправлены',\n            'Your new password for :site_name' => 'Ваш новый пароль для :site_name',\n            'Your login details for :site_name' => 'Ваши данные для доступа к :site_name',\n            'About Me' => 'Обо мне',\n            'Profile' => 'Профиль',\n            'You are banned for 10 minutes. Try again later' => 'Вы заблокированы на 10 минут. Попробуйте позже',\n            'Cancel' => 'Отмена',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Používatelia',\n            'Login' => 'Prihlásiť',\n            'Username' => 'Prihlasovacie meno',\n            'Password' => 'Heslo',\n            'Registered' => 'Registrovaný',\n            'Email' => 'Email',\n            'Role' => 'Úloha',\n            'Roles' => 'Úlohy',\n            'Edit' => 'Editovať',\n            'Actions' => 'Akcie',\n            'Delete' => 'Vymazať',\n            'Log In' => 'Log In',\n            'Log Out' => 'Odhlásiť',\n            'Register New User' => 'Registrácia Nového Používateľa',\n            'New User Registration' => 'Registrácia nového používateľa',\n            'Delete user: :user' => 'Vymazať používateľa: :user',\n            'User <i>:user</i> have been deleted.' => 'Používateľ <i>:user</i> bol vymazaný.',\n            'This user already exists' => 'Tento používateľ už existuje',\n            'This email already exists' => 'Tento email už existuje',\n            'Changes saved' => 'Uložiť zmeny',\n            'Wrong old password' => 'Nesprávne staré heslo',\n            'Admin' => 'Administrátor',\n            'User' => 'Používateľ',\n            'Editor' => 'Editor',\n            'Register' => 'Registrovať',\n            'Edit profile' => 'Editovať profil',\n            'Save' => 'Uložiť',\n            'Firstname' => 'Krstné meno',\n            'Lastname' => 'Priezvisko',\n            'Old password' => 'Staré heslo',\n            'New password' => 'Nové heslo',\n            'Welcome' => 'Vitajte',\n            'Wrong <b>username</b> or <b>password</b>' => 'Nesprávne <b>username</b> or <b>password</b>',\n            'Your changes have been saved.' => 'Vaše zmeny boli uložené.',\n            'New user have been registered.' => 'Nový používateľ bol zaregistrovaný.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'Registrácia',\n            'Username' => 'Používateľské heslo',\n            'User email is invalid' => 'Používateľský email nie je v správnom tvare',\n            'Reset Password' => 'Obnoviť heslo',\n            'Send New Password' => 'Poslať nové heslo',\n            'This user doesnt alredy exist' => 'Tento používateľ neexistuje',\n            'Users - Profile' => 'Používatelia - Profil',\n            'Users - Edit Profile' => 'Používatelia - Editovať Profil',\n            'Users - Log In' => 'Používatelia - Prihlásenie',\n            'Users - Registration' => 'Používatelia - Registrácia',\n            'Users - Password Recover' => 'Používatelia - Obnova hesla',\n            'New Password' => 'Nové heslo',\n            'Forgot your password?' => 'Zabudli ste heslo?',\n            'New password has been sent' => 'Nové heslo bolo zaslané',\n            'Monstra says: This is not your profile...' => 'Monstra hovorí: Toto nie je Váš profil...',\n            'User registration is closed.' => 'Registrácia používateľov je uzavretá.',\n            'Allow user registration' => 'Povoliť registráciu používateľov',\n            'Required field' => 'Povinné políčko',\n            'This user doesnt exist' => 'Tento používateľ neexistuje',\n            'Captcha code is wrong' => 'Captcha kód nie je správny',\n            'Your login details for :site_name has been sent' => 'Váše prihlasovacie detaily pre :site_name boli zaslané',\n            'Your new password for :site_name' => 'Vaše nové heslo pre :site_name',\n            'Your login details for :site_name' => 'Vaše prihlasovacie detaily pre :site_name',\n            'About Me' => 'O mne',\n            'Profile' => 'Profil',\n            'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',\n            'Cancel' => 'Cancel',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Korisnici',\n            'Login' => 'Uloguj se',\n            'Username' => 'Korisničko ime',\n            'Password' => 'Šifra',\n            'Registered' => 'Registrovan',\n            'Email' => 'Email',\n            'Role' => 'Uloga',\n            'Roles' => 'Uloge',\n            'Edit' => 'Izmeni',\n            'Actions' => 'Akcije',\n            'Delete' => 'Obriši',\n            'Enter' => 'Udji',\n            'Logout' => 'Izloguj se',\n            'Register new user' => 'registruj novog korisnika',\n            'New User Registration' => 'registracija novog korisnika',\n            'Delete user: :user' => 'Obriši korisnika: :user',\n            'User <i>:user</i> have been deleted.' => 'Korisnik <i>:user</i> je uklonjen.',\n            'This user already exists' => 'Ovaj korisnik već postoji',\n            'This email already exists' => 'Ovaj email već postoji',\n            'Changes saved' => 'Promene su sačuvane',\n            'Wrong old password' => 'Pogrešan unos stare šifre',\n            'Admin' => 'Admin',\n            'User' => 'Korisnik',\n            'Editor' => 'Editor',\n            'Register' => 'Registrovan',\n            'Edit profile' => 'Izmeni profil',\n            'Save' => 'Sačuvaj',\n            'Firstname' => 'Prvo ime',\n            'Lastname' => 'Prezime',\n            'Old password' => 'Stara šifra',\n            'New password' => 'Nova šifra',\n            'Welcome' => 'Dobrodošli',\n            'Wrong <b>username</b> or <b>password</b>' => 'Pogrešno <b>KOrisničko ime</b> ili <b>šifra </b>',\n            'Your changes have been saved.' => 'Vaša podešavanja su sačuvana.',\n            'New user have been registered.' => 'novi korisnik je registrovan.',\n            'Captcha' => 'Captcha',\n            'Registration' => 'Registracija',\n            'Username' => 'Korisničko ime',\n            'User email is invalid' => 'Korisnički mail je netačan',\n            'Reset Password' => 'Resetuj šifru',\n            'Send New Password' => 'Pošalji novu šifru',\n            'This user doesnt alredy exist' => 'Ovaj korisnik još uvek ne postoji',\n            'Users - Profile' => 'Korisnici -- profil',\n            'Users - Edit Profile' => 'Korisnici - Izmena profila',\n            'Users - Login' => 'Korisnici - Uloguj se.',\n            'Users - Registration' => 'Korisnici - registracija',\n            'Users - Password Recover' => 'Korisnici - Potsetnik šifre',\n            'New Password' => 'Nova šifra',\n            'Forgot your password?' => 'Zaboravljena šifra?',\n            'New password has been sent' => 'Nova šifra je poslata',\n            'Monstra says: This is not your profile...' => 'Monstra kaže: Ovo nije vaš profil...',\n            'User registration is closed.' => 'registracija novih korisnika je zatvorena.',\n            'Allow user registration' => 'Dozvoli registraciju korisnika',\n            'Required field' => 'Potrebna polja.',\n            'This user doesnt exist' => 'Ovaj korisnik ne postoji',\n            'Captcha code is wrong' => 'Captcha kod je pogrešan',\n            'Your login details for :site_name has been sent' => 'vaši detalji logovanja na sajtu :site_name su poslati',\n            'Your new password for :site_name' => 'Vaša šifra za  :site_name',\n            'Your login details for :site_name' => 'Vaši podaci za logovanje na :site_name',\n            'About Me' => 'O meni',\n            'Profile' => 'Profil',\n            'You are banned for 10 minutes. Try again later' => 'Vi ste banovani na 10 minuta. Pokušajte kasnije',\n            'Cancel' => 'Otkaži',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Kullanıcılar',\n            'Login' => 'Giriş',\n            'Username' => 'Kullanıcı Adı',\n            'Password' => 'Parola',\n            'Registered' => 'Kayıtlı',\n            'Email' => 'E-Posta',\n            'Role' => 'Rol',\n            'Roles' => 'Roller',\n            'Edit' => 'Düzenle',\n            'Actions' => 'İşlemler',\n            'Delete' => 'Sil',\n            'Log In' => 'Giriş',\n            'Log Out' => 'Çıkış',\n            'Register New User' => 'Yeni Üye Kaydet',\n            'New User Registration' => 'Yeni Üye Kaydı',\n            'Delete user: :user' => ':user kullanıcısı silinsin mi',\n            'User <i>:user</i> have been deleted.' => '<i>:user</i> kullanıcısı silindi.',\n            'This user already exists' => 'Bu kullanıcı zaten var',\n            'This email already exists' => 'Bu e-posta zaten kayıtlı',\n            'Changes saved' => 'Değişiklikler kaydedildi',\n            'Wrong old password' => 'Yanlış eski parola',\n            'Admin' => 'Yönetici',\n            'User' => 'Kullanıcı',\n            'Editor' => 'Editör',\n            'Register' => 'Kayıt',\n            'Edit profile' => 'Profil Düzenle',\n            'Save' => 'Kaydet',\n            'Firstname' => 'Ad',\n            'Lastname' => 'Soyad',\n            'Old password' => 'Eski Parola',\n            'New password' => 'Yeni Parola',\n            'Welcome' => 'Hoş geldin',\n            'Wrong <b>username</b> or <b>password</b>' => 'Hatalı <b>kullanıcı adı</b> ya da <b>parola</b>',\n            'Your changes have been saved.' => 'Değişiklikler kaydedildi.',\n            'New user have been registered.' => 'Yeni kullanıcı kaydedildi.',\n            'Captcha' => 'Doğrulama Kodu',\n            'Registration' => 'Kayıt',\n            'Username' => 'Kullanıcı Adı',\n            'User email is invalid' => 'E-posta geçersiz',\n            'Reset Password' => 'Parola Sıfırla',\n            'Send New Password' => 'Yeni Parola Gönder',\n            'This user doesnt alredy exist' => 'Kullanıcı bulunamadı',\n            'Users - Profile' => 'Kullanıcı - Profil',\n            'Users - Edit Profile' => 'Kullanıcı - Profil Düzenle',\n            'Users - Log In' => 'Kullanıcı - Giriş',\n            'Users - Registration' => 'Kullanıcı - Kayıt',\n            'Users - Password Recover' => 'Kullanıcı - Parola Sıfırlama',\n            'New Password' => 'Yeni Parola',\n            'Forgot your password?' => 'Parolanızı unuttunuz mu?',\n            'New password has been sent' => 'Yeni parola gönderildi',\n            'Monstra says: This is not your profile...' => 'Monstra: Bu profil size ait değil...',\n            'User registration is closed.' => 'Kullanıcı kaydı kapalı',\n            'Allow user registration' => 'Kullanıcı kaydını etkinleştir',\n            'Required field' => 'Zorunlu alan',\n            'This user doesnt exist' => 'Kullanıcı yok',\n            'Captcha code is wrong' => 'Doğrulama kodu hatalı',\n            'Your login details for :site_name has been sent' => ':site_name için giriş bilgileriniz gönderildi',\n            'Your new password for :site_name' => ':site_name için yeni parolanız',\n            'Your login details for :site_name' => ':site_name için giriş bilgileriniz',\n            'About Me' => 'Hakkımda',\n            'Profile' => 'Profil',\n            'Cancel' => 'Vazgeç',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => 'Користувачі',\n            'Login' => 'Вхід',\n            'Password' => 'Пароль',\n            'Email' => 'Ел. пошта',\n            'Registered' => 'Зареєстрований',\n            'Role' => 'Роль',\n            'Roles' => 'Ролі',\n            'Actions' => 'Дії',\n            'Edit' => 'Редагувати',\n            'Delete' => 'Видалити',\n            'Log In' => 'Вхід',\n            'Log Out' => 'Вихід',\n            'Register New User' => 'Реєстрація нового користувача',\n            'New User Registration' => 'Реєстрація нового користувача',\n            'Delete user: :user' => 'Видалити користувача: :user',\n            'User <i>:user</i> have been deleted.' => 'Користувача <i>:user</i> вилучено.',\n            'This user already exists' => 'Такий користувач вже існує',\n            'This email already exists' => 'Така ел. пошта вже існує',\n            'Changes saved' => 'Зміни збережені',\n            'Wrong old password' => 'Невірний старий пароль',\n            'Admin' => 'Адміністратор',\n            'User' => 'Користувач',\n            'Editor' => 'Редактор',\n            'Register' => 'Реєстрація',\n            'Edit profile' => 'Редагування профілю користувача',\n            'Save' => 'Зберегти',\n            'Firstname' => 'Ім’я',\n            'Lastname' => 'Прізвище',\n            'Old password' => 'Старий пароль',\n            'New password' => 'Новий пароль',\n            'Welcome' => 'Ласкаво просимо',\n            'Wrong <b>username</b> or <b>password</b>' => 'Неправильний <b>логін</b> або <b>пароль</b>',\n            'Your changes have been saved.' => 'Ваші зміни були збережені.',\n            'New user have been registered.' => 'Новий користувач був зареєстрований.',\n            'Captcha' => 'Каптча',\n            'Registration' => 'Реєстрація',\n            'Username' => 'Ім’я користувача',\n            'User email is invalid' => 'Ел. пошта є недійсною',\n            'Reset Password' => 'Скинути пароль',\n            'Send New Password' => 'Відправити пароль',\n            'Users - Profile' => 'Користувачі - Профіль',\n            'Users - Edit Profile' => 'Користувачі - Редагування профілю',\n            'Users - Log In' => 'Користувачі - Вхід',\n            'Users - Registration' => 'Користувачі - Реєстрація',\n            'Users - Password Recover' => 'Користувачі - Відновлення пароля',\n            'New Password' => 'Новий пароль',\n            'Forgot your password?' => 'Забули пароль?',\n            'New password has been sent' => 'Новий пароль було відправлено',\n            'Monstra says: This is not your profile...' => 'Монстра каже: Це не твій профіль...',\n            'User registration is closed.' => 'Реєстрація користувачів закрита.',\n            'Allow user registration' => 'Дозволити реєстрацію користувачів.',\n            'Required field' => 'Обов’язкове поле',\n            'This user doesnt exist' => 'Такого користувача не існує',\n            'Captcha code is wrong' => 'Невірний захисний код',\n            'Your login details for :site_name has been sent' => 'Ваші дані для доступу до :site_name були відправлені',\n            'Your new password for :site_name' => 'Ваш новий пароль до :site_name',\n            'Your login details for :site_name' => 'Ваші дані для доступу до :site_name',\n            'About Me' => 'Про мене',\n            'Profile' => 'Профіль',\n            'You are banned for 10 minutes. Try again later' => 'Ви заблоковані на 10 хвилин. Спробуйте пізніше',\n            'Cancel' => 'Відмінити',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'users' => array(\n            'Users' => '用户',\n            'Login' => '登录',\n            'Username' => '用户名',\n            'Password' => '密码',\n            'Registered' => '已注册',\n            'Email' => '邮箱',\n            'Role' => '角色',\n            'Roles' => '角色',\n            'Edit' => '编辑',\n            'Actions' => '操作',\n            'Delete' => '删除',\n            'Log In' => '登录',\n            'Log Out' => '退出',\n            'Register New user' => '注册新用户',\n            'New User Registration' => '新用户注册',\n            'Delete user: :user' => '删除用户: :user',\n            'User <i>:user</i> have been deleted.' => '用户 <i>:user</i> 已被删除。',\n            'This user already exists' => '此用户已存在',\n            'This email already exists' => '此邮箱已存在',\n            'Changes saved' => '更改已保存',\n            'Wrong old password' => '旧密码错误',\n            'Admin' => '管理员',\n            'User' => '用户',\n            'Editor' => '编辑者',\n            'Register' => '注册者',\n            'Edit profile' => '编辑资料',\n            'Save' => '保存',\n            'Firstname' => '名字',\n            'Lastname' => '姓氏',\n            'Old password' => '旧密码',\n            'New password' => '新密码',\n            'Welcome' => '欢迎',\n            'Wrong <b>username</b> or <b>password</b>' => '<b>用户名</b> 或 <b>密码</b> 错误',\n            'Your changes have been saved.' => '您的更改已保存。',\n            'New user have been registered.' => '新用户已注册。',\n            'Captcha' => '验证码',\n            'Registration' => '注册',\n            'Username' => '用户名',\n            'User email is invalid' => '用户邮箱无效',\n            'Reset Password' => '重置密码',\n            'Send New Password' => '发送新密码',\n            'This user doesnt alredy exist' => '此用户不存在',\n            'Users - Profile' => '用户 - 资料',\n            'Users - Edit Profile' => '用户 - 编辑资料',\n            'Users - Log In' => '用户 - 登录',\n            'Users - Registration' => '用户 - 注册',\n            'Users - Password Recover' => '用户 - 找回密码',\n            'New Password' => '新密码',\n            'Forgot your password?' => '忘记密码？',\n            'New password has been sent' => '新密码已发送',\n            'Monstra says: This is not your profile...' => 'Monstra 提示: 这不是您的个人资料...',\n            'User registration is closed.' => '用户注册已关闭。',\n            'Allow user registration' => '允许用户注册',\n            'Required field' => '必填字段',\n            'This user doesnt exist' => '此用户不存在',\n            'Captcha code is wrong' => '验证码错误',\n            'Your login details for :site_name has been sent' => '您在 :site_name 的登录信息为已发送',\n            'Your new password for :site_name' => '您在 :site_name 的新密码',\n            'Your login details for :site_name' => '您在 :site_name 的登录信息',\n            'About Me' => '关于我',\n            'Profile' => '个人资料',\n            'You are banned for 10 minutes. Try again later' => '你被禁止10分钟。请稍后再试',\n        )\n    );\n"
  },
  {
    "path": "plugins/box/users/users.admin.php",
    "content": "<?php\n\n// Add plugin navigation link\nNavigation::add(__('Users', 'users'), 'system', 'users', 2);\n\n/**\n * Users Admin Class\n */\nclass UsersAdmin extends Backend\n{\n    /**\n     * Users admin\n     */\n    public static function main()\n    {\n        // Users roles\n        $roles = array('admin'  => __('Admin', 'users'),\n                       'editor' => __('Editor', 'users'),\n                       'user'   => __('User', 'users'));\n\n        // Get uses table\n        $users = new Table('users');\n\n        if (Option::get('users_frontend_registration') === 'true') {\n            $users_frontend_registration = true;\n        } else {\n            $users_frontend_registration = false;\n        }\n\n        if (Request::post('users_frontend_submit')) {\n\n            if (Security::check(Request::post('csrf'))) {\n\n                if (Request::post('users_frontend_registration')) $users_frontend_registration = 'true'; else $users_frontend_registration = 'false';\n                \n                if (Option::update('users_frontend_registration', $users_frontend_registration)) {\n                    Notification::set('success', __('Your changes have been saved.', 'users'));\n                } else {\n                    Notification::set('error', __('Your changes was not saved.', 'users'));\n                }\n\n                Request::redirect('index.php?id=users');\n\n            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n        }\n\n        // Check for get actions\n        // ---------------------------------------------\n        if (Request::get('action')) {\n\n            // Switch actions\n            // -----------------------------------------\n            switch (Request::get('action')) {\n\n                // Add\n                // -------------------------------------\n                case \"add\":\n\n                    if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {\n\n                        // Errors\n                        $errors = array();\n\n                        if (Request::post('register')) {\n\n                            if (Security::check(Request::post('csrf'))) {\n\n                                $user_login    = trim(Request::post('login'));\n                                $user_password = trim(Request::post('password'));\n                                $user_email    = trim(Request::post('email'));\n\n                                if ($user_login == '')    $errors['users_empty_login']    = __('Required field', 'users');\n                                if ($user_password == '') $errors['users_empty_password'] = __('Required field', 'users');\n                                if ($user_email == '')    $errors['users_empty_email']    = __('Required field', 'users');\n                                if ($users->select(\"[login='\".$user_login.\"']\")) $errors['users_this_user_already_exists']  = __('This user already exists', 'users');\n                                if ($users->select(\"[email='\".$user_email.\"']\")) $errors['users_this_email_already_exists'] = __('This email already exists', 'users');\n\n                                if (count($errors) == 0) {\n\n                                    if ($users->insert(array('login'           => Security::safeName($user_login),\n                                                             'password'        => Security::encryptPassword(Request::post('password')),\n                                                             'email'           => Request::post('email'),\n                                                             'hash'            => Text::random('alnum', 12),\n                                                             'date_registered' => time(),\n                                                             'role'            => Request::post('role')))) {\n                                        Notification::set('success', __('New user have been registered.', 'users'));\n                                    } else {\n                                        Notification::set('error', __('New user was not registered.', 'users'));\n                                    }\n\n                                    Request::redirect('index.php?id=users');\n                                }\n\n                            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                        }\n\n                        // Display view\n                        View::factory('box/users/views/backend/add')\n                                ->assign('roles', $roles)\n                                ->assign('errors', $errors)\n                                ->display();\n\n                    } else {\n                        Request::redirect('index.php?id=users&action=edit&user_id='.Session::get('user_id'));\n                    }\n\n                break;\n\n                // Edit\n                // -------------------------------------\n                case \"edit\":\n\n                    // Get current user record\n                    $user = $users->select(\"[id='\".(int) Request::get('user_id').\"']\", null);\n\n                    if (isset($user['firstname'])) $user_firstname = $user['firstname']; else $user_firstname = '';\n                    if (isset($user['lastname']))  $user_lastname  = $user['lastname'];  else $user_lastname  = '';\n                    if (isset($user['email']))     $user_email = $user['email']; else $user_email = '';\n                    if (isset($user['twitter']))   $user_twitter = $user['twitter']; else $user_twitter = '';\n                    if (isset($user['skype']))     $user_skype = $user['skype']; else $user_skype = '';\n                    if (isset($user['about_me']))  $user_about_me = $user['about_me']; else $user_about_me = '';\n\n                    if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {\n\n                        if ((Request::post('edit_profile')) and\n                             (((int) Session::get('user_id') == (int) Request::get('user_id')) or\n                               (in_array(Session::get('user_role'), array('admin'))))){\n\n                                if (Security::check(Request::post('csrf'))) {\n\n                                    if (Security::safeName(Request::post('login')) != '') {\n\n                                        if ($users->update(Request::post('user_id'), array('login' => Security::safeName(Request::post('login')),\n                                                                                      'firstname' => Request::post('firstname'),\n                                                                                      'lastname'  => Request::post('lastname'),\n                                                                                      'email'     => Request::post('email'),\n                                                                                      'skype'     => Request::post('skype'),\n                                                                                      'twitter'   => Request::post('twitter'),\n                                                                                      'about_me'  => Request::post('about_me'),\n                                                                                      'role'      => Request::post('role')))) {\n                                            Notification::set('success', __('Your changes have been saved.', 'users'));\n                                        } else {\n                                            Notification::set('error', __('Your changes was not saved.', 'users'));\n                                        }\n                                        \n                                        Request::redirect('index.php?id=users&action=edit&user_id='.Request::post('user_id'));\n                                        \n                                    } \n\n                                } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n                        }\n\n                        if (Request::post('edit_profile_password')) {\n\n                            if (Security::check(Request::post('csrf'))) {\n\n                                if (trim(Request::post('new_password')) != '') {\n                                    \n                                    if ($users->update(Request::post('user_id'), array('password' => Security::encryptPassword(trim(Request::post('new_password')))))) {\n                                        Notification::set('success', __('Your changes have been saved.', 'users'));\n                                    } else {\n                                        Notification::set('error', __('Your changes was not saved.', 'users'));\n                                    }\n                    \n                                    Request::redirect('index.php?id=users&action=edit&user_id='.Request::post('user_id'));\n                                }\n\n                            } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                        }\n\n                        if ( ((int) Session::get('user_id') == (int) Request::get('user_id')) or (in_array(Session::get('user_role'), array('admin')) && count($user) != 0) ) {\n\n                            // Display view\n                            View::factory('box/users/views/backend/edit')\n                                    ->assign('user', $user)\n                                    ->assign('user_firstname', $user_firstname)\n                                    ->assign('user_lastname', $user_lastname)\n                                    ->assign('user_email', $user_email)\n                                    ->assign('user_twitter', $user_twitter)\n                                    ->assign('user_skype', $user_skype)\n                                    ->assign('user_about_me', $user_about_me)\n                                    ->assign('roles', $roles)\n                                    ->display();\n\n                        } else {\n                            echo __('Monstra says: This is not your profile...', 'users');\n                        }\n\n                    }\n\n                break;\n\n                // Delete\n                // -------------------------------------\n                case \"delete\":\n\n                    if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin')) && (int)$_SESSION['user_id'] != (int)Request::get('user_id')) {\n\n                        if (Security::check(Request::get('token'))) {\n\n                            $user = $users->select('[id=\"'.Request::get('user_id').'\"]', null);\n                            if ($users->delete(Request::get('user_id'))) {\n                                Notification::set('success', __('User <i>:user</i> have been deleted.', 'users', array(':user' => $user['login'])));\n                            } else {\n                                Notification::set('error', __('User <i>:user</i> was not deleted.', 'users', array(':user' => $user['login'])));\n                            }\n                            \n                            Request::redirect('index.php?id=users');\n\n                        } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n                    }\n\n                break;\n            }\n        } else {\n\n            if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {\n\n                // Dislay view\n                View::factory('box/users/views/backend/index')\n                        ->assign('roles', $roles)\n                        ->assign('users_list', $users->select())\n                        ->assign('users_frontend_registration', $users_frontend_registration)\n                        ->display();\n\n            } else {\n                Request::redirect('index.php?id=users&action=edit&user_id='.Session::get('user_id'));\n            }\n        }\n\n    }\n}\n"
  },
  {
    "path": "plugins/box/users/users.plugin.php",
    "content": "<?php\n\n/**\n *\tUsers plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Users', 'users'),\n                __('Users manager', 'users'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                'users',\n                'box');\n\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {\n\n    // Include Users Admin\n    Plugin::Admin('users', 'box');\n    \n}\n\n// Add Plugin Javascript\nJavascript::add('plugins/box/users/js/users.js', 'backend');\n\n/**\n * Users class\n */\nclass Users extends Frontend\n{\n    /**\n     * Users table\n     */\n    public static $users = null;\n\n    /**\n     * Sandbox main function\n     */\n    public static function main()\n    {\n        // Get users table\n        Users::$users = new Table('users');\n\n        // Logout\n        if (Uri::segment(1) == 'logout') { Users::logout(); }\n\n    }\n\n    /**\n     * Route\n     */\n    protected static function route()\n    {\n        /* /users */\n        if (Uri::segment(0) == 'users' && !Uri::segment(1)) return 'list';\n        /* /users/(int) */\n        if (Uri::segment(1) && (Uri::segment(1) !== 'login' && Uri::segment(1) !== 'registration' && Uri::segment(1) !== 'password-reset' && Uri::segment(2) !== 'edit')) return 'profile';\n        /* /users/login */\n        if (Uri::segment(1) == 'login') return 'login';\n        /* /users/registration */\n        if (Uri::segment(1) == 'registration') return 'registration';\n        /* /pusers/password-reset */\n        if (Uri::segment(1) == 'password-reset') return 'password-reset';\n        /* /users/(int) /edit */\n        if ( ( Uri::segment(1) and (Uri::segment(1) !== 'login' && Uri::segment(1) !== 'registration' && Uri::segment(1) !== 'password-reset') ) and  Uri::segment(2) == 'edit') return 'edit';\n        /* /users/logout */\n        if (Uri::segment(1) == 'logout') return 'logout';\n    }\n\n    /**\n     * Get users list\n     */\n    public static function getList()\n    {\n        View::factory('box/users/views/frontend/index')\n            ->assign('users', Users::$users->select(null, 'all'))\n            ->display();\n    }\n\n    /**\n     * Get user profile\n     */\n    public static function getProfile($id)\n    {\n        View::factory('box/users/views/frontend/profile')\n            ->assign('user', Users::$users->select(\"[id=\".(int) $id.\"]\", null))\n            ->display();\n    }\n\n    /**\n     * Get New User Registration\n     */\n    public static function getRegistration()\n    {\n        if (Option::get('users_frontend_registration') == 'true') {\n\n            // Is User Loged in ?\n            if ( ! Session::get('user_id')) {\n\n                $errors = array();\n\n                $user_email = Request::post('email');\n                $user_login = Request::post('login');\n                $user_password = Request::post('password');\n\n                // Register form submit\n                if (Request::post('register')) {\n\n                    // Check csrf\n                    if (Security::check(Request::post('csrf'))) {\n\n                        $user_email = trim($user_email);\n                        $user_login = trim($user_login);\n                        $user_password = trim($user_password);\n\n                        if (Option::get('captcha_installed') == 'true' && ! CryptCaptcha::check(Request::post('answer'))) $errors['users_captcha_wrong'] = __('Captcha code is wrong', 'captcha');\n                        if ($user_login == '')    $errors['users_empty_login']    = __('Required field', 'users');\n                        if ($user_password == '') $errors['users_empty_password'] = __('Required field', 'users');\n                        if ($user_email == '')    $errors['users_empty_email']    = __('Required field', 'users');\n                        if ($user_email != '' && ! Valid::email($user_email)) $errors['users_invalid_email'] = __('User email is invalid', 'users');\n                        if (Users::$users->select(\"[login='\".$user_login.\"']\")) $errors['users_this_user_alredy_exists'] = __('This user alredy exist', 'users');\n                        if (Users::$users->select(\"[email='\".$user_email.\"']\")) $errors['users_this_email_alredy_exists'] = __('This email alredy exist', 'users');\n\n                        if (count($errors) == 0) {\n\n                            Users::$users->insert(array('login'    => Security::safeName($user_login),\n                                                 'password'        => Security::encryptPassword(Request::post('password')),\n                                                 'email'           => Request::post('email'),\n                                                 'hash'            => Text::random('alnum', 12),\n                                                 'date_registered' => time(),\n                                                 'role'            => 'user'));\n\n                            // Log in\n                            $user = Users::$users->select(\"[id='\".Users::$users->lastId().\"']\", null);\n                            Session::set('user_id', (int) $user['id']);\n                            Session::set('user_login', (string) $user['login']);\n                            Session::set('user_role', (string) $user['role']);\n                            Session::set('user_email', (string) $user['email']);\n\n                            $mail = new PHPMailer();\n                            $mail->CharSet = 'utf-8';\n                            $mail->ContentType = 'text/html';\n                            $mail->SetFrom(Option::get('system_email'));\n                            $mail->AddReplyTo(Option::get('system_email'));\n                            $mail->AddAddress($user['email'], $user['login']);\n                            $mail->Subject = Option::get('sitename');\n                            $mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')\n                                ->assign('site_name', Option::get('sitename'))\n                                ->assign('user_login', $user['login'])\n                                ->assign('email_template', 'new-user')\n                                ->render());\n                            $mail->Send();\n\n                            // Redirect to user profile\n                            Request::redirect(Option::get('siteurl').'/users/'.Users::$users->lastId());\n                        }\n\n                    } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                }\n\n                // Display view\n                View::factory('box/users/views/frontend/registration')\n                        ->assign('errors', $errors)\n                        ->assign('user_email', $user_email)\n                        ->assign('user_login', $user_login)\n                        ->assign('user_password', $user_password)\n                        ->display();\n\n            } else {\n                Request::redirect(Site::url().'/users/'.Session::get('user_id'));\n            }\n\n        } else {\n            echo __('User registration is closed.', 'users');\n        }\n\n    }\n\n    /**\n     * Get user panel\n     */\n    public static function getPanel()\n    {\n        View::factory('box/users/views/frontend/userspanel')->display();\n    }\n\n    /**\n     * Is User Loged\n     */\n    public static function isLoged()\n    {\n        if ((Session::get('user_id')) and (((int) Session::get('user_id') == Uri::segment(1)) or (in_array(Session::get('user_role'), array('admin'))))) {\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * Logout\n     */\n    public static function logout()\n    {\n        Session::destroy();\n        Request::redirect($_SERVER[\"HTTP_REFERER\"]);\n    }\n\n    /**\n     * Edit user profile\n     */\n    public static function getProfileEdit($id)\n    {\n        // Is Current User Loged in ?\n        if (Users::isLoged()) {\n\n            $user = Users::$users->select(\"[id='\".(int) $id.\"']\", null);\n\n            // Edit Profile Submit\n            if (Request::post('edit_profile')) {\n\n                // Check csrf\n                if (Security::check(Request::post('csrf'))) {\n                    \n                    // Check for POST data manipulation\n                    if( ((int) Session::get('user_id') == (int) Request::post('user_id')) or (in_array(Session::get('user_role'), array('admin'))) ) {\n                        \n                        if (Security::safeName(Request::post('login')) != '') {\n                            if (Users::$users->update(Request::post('user_id'),\n                                                                    array('login' => Security::safeName(Request::post('login')),\n                                                                          'firstname' => Request::post('firstname'),\n                                                                          'lastname'  => Request::post('lastname'),\n                                                                          'email'     => Request::post('email'),\n                                                                          'skype'     => Request::post('skype'),\n                                                                          'about_me'  => Request::post('about_me'),\n                                                                          'twitter'   => Request::post('twitter')))) {\n    \n                                // Change password\n                                if (trim(Request::post('new_password')) != '') {\n                                    Users::$users->update(Request::post('user_id'), array('password' => Security::encryptPassword(trim(Request::post('new_password')))));\n                                }\n    \n                                Notification::set('success', __('Your changes have been saved.', 'users'));\n                                Request::redirect(Site::url().'/users/'.$user['id']);\n                            }\n                        } else { }\n                        \n                    } else { die('Monstra says: This is not your profile...'); }\n                        \n                } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n            }\n\n            View::factory('box/users/views/frontend/edit')\n                ->assign('user', $user)\n                ->display();\n\n        } else {\n            Request::redirect(Site::url().'/users/login');\n        }\n    }\n\n    /**\n     * Get Password Reset\n     */\n    public static function getPasswordReset()\n    {\n        // Is User Loged in ?\n        if ( ! Session::get('user_id')) {\n\n            $errors = array();\n\n            $site_url  = Option::get('siteurl');\n            $site_name = Option::get('sitename');\n\n            // Reset Password from hash\n            if (Request::get('hash')) {\n\n                // Get user with specific hash\n                $user = Users::$users->select(\"[hash='\" . Request::get('hash') . \"']\", null);\n\n                // If user exists\n                if ((count($user) > 0) && ($user['hash'] == Request::get('hash'))) {\n\n                    // Generate new password\n                    $new_password = Text::random('alnum', 6);\n\n                    // Update user profile\n                    // Set new hash and new password\n                    Users::$users->updateWhere(\"[login='\" . $user['login'] . \"']\", array('hash' => Text::random('alnum', 12), 'password' => Security::encryptPassword($new_password)));\n\n                    $mail = new PHPMailer();\n                    $mail->CharSet = 'utf-8';\n                    $mail->ContentType = 'text/html';\n                    $mail->SetFrom(Option::get('system_email'));\n                    $mail->AddReplyTo(Option::get('system_email'));\n                    $mail->AddAddress($user['email'], $user['login']);\n                    $mail->Subject = __('Your new password for :site_name', 'users', array(':site_name' => $site_name));\n                    $mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')\n                        ->assign('site_url', $site_url)\n                        ->assign('site_name', $site_name)\n                        ->assign('user_id', $user['id'])\n                        ->assign('user_login', $user['login'])\n                        ->assign('new_password', $new_password)\n                        ->assign('email_template', 'new-password')\n                        ->render());\n                    $mail->Send();\n\n                    // Set notification\n                    Notification::set('success', __('New password has been sent', 'users'));\n\n                    // Redirect to password-reset page\n                    Request::redirect(Site::url().'/users/login');\n\n                }\n            }\n\n            // Reset Password Form Submit\n            if (Request::post('reset_password_submit')) {\n\n                $user_login = trim(Request::post('login'));\n\n                // Check csrf\n                if (Security::check(Request::post('csrf'))) {\n\n                    if (Option::get('captcha_installed') == 'true' && ! CryptCaptcha::check(Request::post('answer'))) $errors['users_captcha_wrong'] = __('Captcha code is wrong', 'users');\n                    if ($user_login == '') $errors['users_empty_field'] = __('Required field', 'users');\n                    if ($user_login != '' && ! Users::$users->select(\"[login='\".$user_login.\"']\")) $errors['users_user_doesnt_exists'] = __('This user doesnt exist', 'users');\n\n                    if (count($errors) == 0) {\n\n                        // Get user\n                        $user = Users::$users->select(\"[login='\" . $user_login . \"']\", null);\n\n                        // Generate new hash\n                        $new_hash = Text::random('alnum', 12);\n\n                        // Update user hash\n                        Users::$users->updateWhere(\"[login='\" . $user_login . \"']\", array('hash' => $new_hash));\n\n                        $mail = new PHPMailer();\n                        $mail->CharSet = 'utf-8';\n                        $mail->ContentType = 'text/html';\n                        $mail->SetFrom(Option::get('system_email'));\n                        $mail->AddReplyTo(Option::get('system_email'));\n                        $mail->AddAddress($user['email'], $user['login']);\n                        $mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));\n                        $mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')\n                            ->assign('site_url', $site_url)\n                            ->assign('site_name', $site_name)\n                            ->assign('user_id', $user['id'])\n                            ->assign('user_login', $user['login'])\n                            ->assign('new_hash', $new_hash)\n                            ->assign('email_template', 'reset-password')\n                            ->render());\n                        $mail->Send();\n\n                        // Set notification\n                        Notification::set('success', __('Your login details for :site_name has been sent', 'users', array(':site_name' => $site_name)));\n\n                        // Redirect to password-reset page\n                        Request::redirect(Site::url().'/users/password-reset');\n\n                    }\n\n                } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n\n            }\n\n            View::factory('box/users/views/frontend/password_reset')\n                ->assign('errors', $errors)\n                ->assign('user_login', trim(Request::post('login')))\n                ->display();\n\n        }\n    }\n\n    /**\n     * Get User login\n     */\n    public static function getLogin()\n    {\n        // Is User Loged in ?\n        if ( ! Session::get('user_id')) {\n\n            // Login Form Submit\n            if (Request::post('login_submit')) {\n\n                if (Cookie::get('login_attempts') && Cookie::get('login_attempts') >= 5) {\n                    \n                    Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users'));\n\n                } else {\n\n                    // Check csrf\n                    if (Security::check(Request::post('csrf'))) {\n\n                        $user = Users::$users->select(\"[login='\" . trim(Request::post('username')) . \"']\", null);\n\n                        if (count($user) !== 0) {\n                            if ($user['login'] == Request::post('username')) {\n                                if (trim($user['password']) == Security::encryptPassword(Request::post('password'))) {\n                                    if ($user['role'] == 'admin' || $user['role'] == 'editor') {\n                                        Session::set('admin', true);\n                                    }\n                                    Session::set('user_id', (int) $user['id']);\n                                    Session::set('user_login', (string) $user['login']);\n                                    Session::set('user_role', (string) $user['role']);\n                                    Session::set('user_email', (string) $user['email']);\n                                    Request::redirect(Site::url().'/users/'.Session::get('user_id'));\n                                } else {\n                                    Notification::setNow('error', __('Wrong <b>username</b> or <b>password</b>', 'users'));\n\n                                    if (Cookie::get('login_attempts')) {\n                                        if (Cookie::get('login_attempts') < 5) {\n                                            $attempts = Cookie::get('login_attempts') + 1;\n                                            Cookie::set('login_attempts', $attempts , 600);\n                                        } else {\n                                            Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users'));\n                                        }\n                                    } else {\n                                        Cookie::set('login_attempts', 1, 600);\n                                    }\n                                }\n                            }\n                        } else {\n                            Notification::setNow('error', __('Wrong <b>username</b> or <b>password</b>', 'users'));\n\n                            if (Cookie::get('login_attempts')) {\n                                if (Cookie::get('login_attempts') < 5) {\n                                    $attempts = Cookie::get('login_attempts') + 1;\n                                    Cookie::set('login_attempts', $attempts , 600);\n                                } else {\n                                    Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users'));\n                                }\n                            } else {\n                                Cookie::set('login_attempts', 1, 600);\n                            }\n                        }\n\n                    } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }\n                }\n            }\n\n            View::factory('box/users/views/frontend/login')->display();\n        } else {\n            Request::redirect(Site::url().'/users/'.Session::get('user_id'));\n        }\n    }\n\n    /**\n     * Set title\n     */\n    public static function title()\n    {\n        switch (Users::route()) {\n            case 'list':   return __('Users', 'users'); break;\n            case 'profile': return __('Users - Profile', 'users'); break;\n            case 'edit': return __('Users - Edit Profile', 'users'); break;\n            case 'login':   return __('Users - Login', 'users'); break;\n            case 'registration':   return __('Users - Registration', 'users'); break;\n            case 'password-reset': return __('Users - Password Recover', 'users'); break;\n        }\n    }\n\n    /**\n     * Set content\n     */\n    public static function content()\n    {\n        switch (Users::route()) {\n            case 'list':    Users::getList(); break;\n            case 'profile': Users::getProfile(Uri::segment(1)); break;\n            case 'edit': Users::getProfileEdit(Uri::segment(1)); break;\n            case 'login':   Users::getLogin(); break;\n            case 'registration': Users::getRegistration(); break;\n            case 'password-reset': Users::getPasswordReset(); break;\n\n        }\n    }\n\n    /**\n     * Set template\n     */\n    public static function template()\n    {\n        return 'index';\n    }\n\n    /**\n     * Get Gravatar\n     *\n     *  <code>\n     *      <img src=\"<?php echo Users::getGravatarURL('monstra@monstra.org', 64); ?>\" alt=\"\">\n     *  </code>\n     *\n     * @param string  $email  Email\n     * @param integer $size   Image Size\n     */\n    public static function getGravatarURL($email, $size)\n    {\n        return 'http://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).'?size='.$size;\n    }\n\n}\n"
  },
  {
    "path": "plugins/box/users/views/backend/add.view.php",
    "content": "<!-- Users_add -->\n<h2 class=\"margin-bottom-1\"><?php echo __('New User Registration', 'users'); ?></h2>\n<?php\n    echo (\n        Form::open().\n        Form::hidden('csrf', Security::token())\n    );\n?>\n <div class=\"row\">\n    <div class=\"col-md-6\">\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('login', __('Username', 'users')).\n                Form::input('login', null, array('class' => (isset($errors['users_this_user_alredy_exists']) || isset($errors['users_empty_login'])) ? 'form-control error-field' : 'form-control'))\n            );\n\n            if (isset($errors['users_this_user_alredy_exists'])) echo '<span class=\"error-message\">'.$errors['users_this_user_alredy_exists'].'</span>';\n            if (isset($errors['users_empty_l-ogin'])) echo '<span class=\"error-message\">'.$errors['users_empty_login'].'</span>';\n        ?>\n        </div>\n\n        <div class=\"form-group\">\n        <?php \n            echo (\n                Form::label('password', __('Password', 'users')).\n                Form::password('password', null, array('class' => (isset($errors['users_empty_password'])) ? 'form-control error-field' : 'form-control'))\n            );\n            if (isset($errors['users_empty_password'])) echo '<span class=\"error-message\">'.$errors['users_empty_password'].'</span>';\n        ?>\n        </div>\n\n        <div class=\"form-group\">\n        <?php\n\n            echo (\n                Form::label('email', __('Email', 'users')).\n                Form::input('email', null, array('class' => (isset($errors['users_this_email_alredy_exists']) || isset($errors['users_empty_email'])) ? 'form-control error-field' : 'form-control'))\n            );\n\n            if (isset($errors['users_this_email_alredy_exists'])) echo '<span class=\"error-message\">'.$errors['users_this_email_alredy_exists'].'</span>';\n            if (isset($errors['users_empty_email'])) echo '<span class=\"error-message\">'.$errors['users_empty_email'].'</span>';\n        ?>\n        </div>\n        <div class=\"form-group\">\n        <?php\n            echo (\n                Form::label('role', __('Role', 'users')).\n                Form::select('role', array('admin' => __('Admin', 'users'), 'editor' => __('Editor', 'users'), 'user' => __('User', 'users')), null, array('class' => 'form-control'))\n            );\n        ?>\n        </div>\n        <?php\n            echo (\n                Form::submit('register', __('Register', 'users'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n                Html::anchor(__('Cancel', 'users'), 'index.php?id=users', array('title' => __('Cancel', 'users'), 'class' => 'btn btn-phone btn-default')).\n                Form::close()\n            );\n        ?>\n    </div>\n</div>"
  },
  {
    "path": "plugins/box/users/views/backend/edit.view.php",
    "content": "<?php\n    // Show template for exist user else show error\n    if ($user !== null) {\n?>\n<h2 class=\"margin-bottom-1\"><?php echo __('Edit profile', 'users'); ?></h2>\n\n<div class=\"row\">\n    <div class=\"col-md-6\">\n    <?php\n\n        echo (\n            Form::open().\n            Form::hidden('csrf', Security::token()).\n            Form::hidden('user_id', Request::get('user_id'))\n        );\n\n        if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {\n    ?>\n        <div class=\"form-group\">\n    <?php\n            echo Form::label('login', __('Username', 'users'));\n            echo Form::input('login', $user['login'], array('class' => 'form-control'));\n    ?>\n        </div>\n    <?php\n        } else {\n            echo Form::hidden('login', $user['login']);\n        }\n    ?>\n        <div class=\"form-group\">\n    <?php            \n        echo (            \n            Form::label('firstname', __('Firstname', 'users')).\n            Form::input('firstname', $user_firstname, array('class' => 'form-control'))\n        );\n    ?>\n        </div>\n        <div class=\"form-group\">\n    <?php \n        echo (\n            Form::label('lastname', __('Lastname', 'users')).\n            Form::input('lastname', $user_lastname, array('class' => 'form-control'))\n        );\n    ?>\n        </div>\n        <div class=\"form-group\">\n    <?php\n        echo (\n            Form::label('email', __('Email', 'users')).\n            Form::input('email', $user_email, array('class' => 'form-control'))\n        );\n    ?>\n        </div>\n        <div class=\"form-group\">\n    <?php\n        echo (\n            Form::label('twitter', __('Twitter', 'users')).\n            Form::input('twitter', $user_twitter, array('class' => 'form-control'))\n        );\n    ?>\n        </div>\n        <div class=\"form-group\">\n    <?php\n        echo (\n            Form::label('skype', __('Skype', 'users')).\n            Form::input('skype', $user_skype, array('class' => 'form-control'))\n        );\n    ?>\n        </div>\n        <div class=\"form-group\">\n    <?php \n        echo (\n            Form::label('about_me', __('About Me', 'users')).\n            Form::textarea('about_me', $user_about_me, array('class' => 'form-control'))\n        );\n    ?>\n        </div>\n    <?php\n        if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {\n    ?>\n        <div class=\"form-group\">\n    <?php\n            echo Form::label('role', __('Role', 'users'));\n            echo Form::select('role', array('admin' => __('Admin', 'users'), 'editor' => __('Editor', 'users'), 'user' => __('User', 'users')), $user['role'], array('class' => 'form-control'))\n    ?>\n        </div>\n    <?php\n        } else {\n            echo Form::hidden('role', Session::get('user_role'));\n        }\n\n        echo (\n            Html::br().\n            Form::submit('edit_profile', __('Save', 'users'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).\n            Html::anchor(__('Cancel', 'users'), 'index.php?id=users', array('title' => __('Cancel', 'users'), 'class' => 'btn btn-phone btn-cancel btn-default')).\n            Form::close()\n        );\n\n    ?>\n    </div>\n\n    <div class=\"col-md-6\">\n    <?php\n        echo (\n            Form::open().\n            Form::hidden('csrf', Security::token()).\n            Form::hidden('user_id', Request::get('user_id'))\n        );\n    ?>\n        <div class=\"form-group\">\n    <?php\n        echo (\n            Form::label('new_password', __('New password', 'users')).\n            Form::password('new_password', null, array('class' => 'form-control'))\n        );\n    ?>\n        </div>\n    <?php\n        echo (    \n            Form::submit('edit_profile_password', __('Save', 'users'), array('class' => 'btn btn-phone btn-primary')).\n            Form::close()\n        );\n    ?>\n    </div>\n\n</div>\n\n\n<?php\n    } else {\n        echo '<div class=\"error-message\">'.__('This user does not exist', 'users').'</div>';\n    }\n?>\n"
  },
  {
    "path": "plugins/box/users/views/backend/index.view.php",
    "content": "<h2 class=\"margin-bottom-1\"><?php echo __('Users', 'users'); ?></h2>\n\n<div class=\"users-btns vertical-align margin-bottom-1\">\n    <div class=\"text-left\">\n        <?php echo Html::anchor(__('Register New User', 'users'), 'index.php?id=users&action=add', array('title' => __('Register New User', 'users'), 'class' => 'btn btn-phone btn-primary')); ?>\n    </div>\n    <div class=\"text-right\">\n        <?php echo Form::open(null, array('name' => 'users_frontend')); ?>\n        <?php echo Form::hidden('csrf', Security::token()); ?>\n        <?php echo Form::checkbox('users_frontend_registration', 'users_frontend_registration', $users_frontend_registration); ?> <?php echo __('Allow user registration', 'users') ?>\n        <?php echo Form::input('users_frontend_submit', 'users_frontend_submit', array('style' => 'display:none;')); ?>\n        <?php echo Form::close();?>\n    </div>\n</div>\n\n<!-- Users_list -->\n<table class=\"table table-bordered\">\n    <thead>\n        <tr>\n            <th><?php echo __('Username', 'users'); ?></th>\n            <th class=\"visible-lg hidden-xs\"><?php echo __('Email', 'users'); ?></th>\n            <th class=\"visible-lg hidden-xs\"><?php echo __('Registered', 'users'); ?></th>\n            <th class=\"visible-lg hidden-xs\"><?php echo __('Role', 'users'); ?></th>\n            <th></th>\n        </tr>\n    </thead>\n    <tbody>\n    <?php foreach ($users_list as $user) { ?>\n    <tr>\n        <td>\n            <?php echo Html::toText($user['login']); ?>\n        </td>\n        <td class=\"visible-lg hidden-xs\">\n            <?php echo Html::toText($user['email']); ?>\n        </td>\n        <td class=\"visible-lg hidden-xs\">\n            <?php echo Date::format($user['date_registered']); ?>\n        </td>\n        <td class=\"visible-lg hidden-xs\">\n            <?php echo $roles[\"{$user['role']}\"]; ?>\n        </td>\n        <td>\n            <div class=\"pull-right\">\n            <?php echo Html::anchor(__('Edit', 'users'), 'index.php?id=users&action=edit&user_id='.$user['id'], array('class' => 'btn btn-primary')); ?>\n            <?php\n                if ((int)$user['id'] != (int)Session::get('user_id')) {\n                    echo Html::anchor(__('Delete', 'users'),\n                       'index.php?id=users&action=delete&user_id='.$user['id'].'&token='.Security::token(),\n                       array('class' => 'btn btn-danger', 'onclick' => \"return confirmDelete('\".__('Delete user: :user', 'users', array(':user' => Html::toText($user['login']))).\"')\"));\n                }\n             ?>\n             </div>\n        </td>\n    </tr>\n    <?php } ?>\n    </tbody>\n</table>\n<!-- /Users_list -->\n"
  },
  {
    "path": "plugins/box/users/views/frontend/edit.view.php",
    "content": "<div class=\"row\">\n\t<div class=\"col-md-3\">\n\n\t\t<form method=\"post\">\n\t\t<?php\n\t\t    echo (\n\t\t        Form::hidden('csrf', Security::token()).\n\t\t        Form::hidden('user_id', $user['id'])\n\t\t    );\n\t\t?>\n\n\t\t<?php if (isset($_SESSION['user_role']) && in_array($_SESSION['user_role'], array('admin'))) { ?>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Username', 'users'); ?></label>\n\t\t\t<input class=\"form-control\" type=\"text\" value=\"<?php echo $user['login']; ?>\" name=\"login\">\n\t\t</div>\n\t\t<?php } else { echo Form::hidden('login', $user['login']); } ?>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Firstname', 'users'); ?></label>\n\t\t\t<input class=\"form-control\" type=\"text\" value=\"<?php echo $user['firstname']; ?>\" name=\"firstname\">\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Lastname', 'users'); ?></label>\n\t\t\t<input class=\"form-control\" type=\"text\" value=\"<?php echo $user['lastname']; ?>\" name=\"lastname\">\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Email', 'users'); ?></label>\n\t\t\t<input class=\"form-control\" type=\"text\" value=\"<?php echo $user['email']; ?>\" name=\"email\">\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Twitter', 'users'); ?></label>\n\t\t\t<input class=\"form-control\" type=\"text\" value=\"<?php echo $user['twitter']; ?>\" name=\"twitter\">\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Skype', 'users'); ?></label>\n\t\t\t<input class=\"form-control\" type=\"text\" value=\"<?php echo $user['skype']; ?>\" name=\"skype\">\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('About Me', 'users'); ?></label>\n\t\t\t<textarea class=\"form-control\" name=\"about_me\"><?php echo $user['about_me']; ?></textarea>\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('New Password', 'users'); ?></label>\n\t\t\t<input class=\"form-control\" type=\"text\" name=\"new_password\">\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t<input type=\"submit\" class=\"btn btn-primary\" value=\"<?php echo __('Save', 'users'); ?>\" name=\"edit_profile\">\n\t\t<?php echo Html::anchor(__('Cancel', 'users'), Site::url().'/users/'.Uri::segment(1), array('title' => __('Cancel', 'pages'), 'class' => 'btn btn-default')); ?>\n\t\t</div>\n\t\t</form>\n\t</div>\n</div>"
  },
  {
    "path": "plugins/box/users/views/frontend/index.view.php",
    "content": "<table>\n    <tr>\n        <td></td>\n    </tr>\n    <?php foreach ($users as $user) { ?>\n    <tr>\n        <td>\n            <a href=\"<?php echo Site::url(); ?>/users/<?php echo $user['id']; ?>\"><?php echo $user['login']; ?></a>\n        </td>\n    </tr>\n    <?php } ?>\n</table>"
  },
  {
    "path": "plugins/box/users/views/frontend/login.view.php",
    "content": "<div class=\"row\">\t\n\t<div class=\"col-md-12\">\t\t\n\t    <?php\n            // Monstra Notifications\n            $error = Notification::get('error') ?: '';\n            ($error != '') AND print('<div class=\"error margin-bottom-1\">'.$error.'</div>');\n        ?>\n    </div>\n</div>\n<div class=\"row\">\t\n\t<div class=\"col-md-3\">\n\t\t<form method=\"post\">\n\t\t    <?php echo Form::hidden('csrf', Security::token()); ?>\n\t\t    <div class=\"form-group\">\n\t\t    \t<label><?php echo __('Username', 'users'); ?></label>\n\t\t    \t<input name=\"username\" type=\"text\" class=\"form-control\">\n\t\t    </div>    \n\t\t    <div class=\"form-group\">\n\t\t\t    <label><?php echo __('Password', 'users'); ?></label>\n\t\t\t    <input name=\"password\" type=\"password\" class=\"form-control\">\n\t\t\t</div>\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<input name=\"login_submit\" class=\"btn btn-primary\" type=\"submit\" value=\"<?php echo __('Log In', 'users'); ?>\"> <a class=\"small-grey-text reset-password-btn\" href=\"<?php echo Option::get('siteurl').'/users/password-reset'; ?>\"><?php echo __('Forgot your password?', 'users');?></a>\n\t\t\t</div>    \n\t\t</form>\n\t</div>\n</div>"
  },
  {
    "path": "plugins/box/users/views/frontend/password_reset.view.php",
    "content": "<div class=\"row\">\t\n\t<div class=\"col-md-12\">\t\t\n\t    <?php\n            // Monstra Notifications\n\t     \t$success = Notification::get('success') ?: '';\n\t     \t($success != '') AND print('<div class=\"success margin-bottom-1\">'.$success.'</div>');\n        ?>\n    </div>\n</div>\n<div class=\"row\">\n\t<div class=\"col-md-3\">\n\t\t<form method=\"post\">\n\n\t\t<?php echo (Form::hidden('csrf', Security::token())); ?>\n\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Username', 'users'); ?></label>\n\t\t\t<input type=\"text\" value=\"<?php echo $user_login; ?>\" name=\"login\" class=\"form-control\">\n\t\t\t<?php\n\t\t\t    if (isset($errors['users_user_doesnt_exists'])) echo Html::nbsp(3).'<span class=\"error\">'.$errors['users_user_doesnt_exists'].'</span>';\n\t\t\t    if (isset($errors['users_empty_field'])) echo Html::nbsp(3).'<span class=\"error\">'.$errors['users_empty_field'].'</span>';\n\t\t\t?>\n\t\t</div>\n\n\t\t<?php if (Option::get('captcha_installed') == 'true') { ?>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Captcha', 'users'); ?></label>\n\t\t\t<input type=\"text\" name=\"answer\" class=\"form-control\"><?php if (isset($errors['users_captcha_wrong'])) echo Html::nbsp(3).'<span class=\"error\">'.$errors['users_captcha_wrong'].'</span>'; ?>\n\t\t\t<br>\n\t\t\t<?php CryptCaptcha::draw(); ?>\n\t\t</div>\n\t\t<?php } ?>\n\n\t\t<div class=\"form-group\">\n\t\t\t<input type=\"submit\" class=\"btn btn-primary\" value=\"<?php echo __('Send New Password', 'users'); ?>\" name=\"reset_password_submit\">\n\t\t</div>\n\t\t</form>\n\t</div>\n</div>"
  },
  {
    "path": "plugins/box/users/views/frontend/profile.view.php",
    "content": "<?php if ($user) { ?>\n<table>\n<tr><td><b><?php echo __('Username', 'users'); ?></b>:</td><td><?php echo $user['login']; ?></td></tr>\n<?php if ($user['firstname'] !== '') { ?><tr><td><b><?php echo __('Firstname', 'users'); ?></b>:</td><td><?php echo Html::toText($user['firstname']); ?></td></tr><?php } ?>\n<?php if ($user['lastname'] !== '') { ?><tr><td><b><?php echo __('Lastname', 'users'); ?></b>:</td><td><?php echo Html::toText($user['lastname']); ?></td></tr><?php } ?>\n<?php if ($user['email'] !== '') { ?><tr><td><b><?php echo __('Email', 'users'); ?></b>:</td><td><?php echo Html::email(Html::toText($user['email'])); ?></td></tr><?php } ?>\n<?php if ($user['date_registered'] !== '') { ?><tr><td><b><?php echo __('Registered', 'users'); ?></b>:</td><td><?php echo Date::format($user['date_registered']); ?></td></tr><?php } ?>\n<?php if ($user['skype'] !== '') { ?><tr><td><b><?php echo __('Skype', 'users'); ?></b>:</td><td><?php echo Html::toText($user['skype']); ?></td></tr><?php } ?>\n<?php if ($user['twitter'] !== '') { ?><tr><td><b><?php echo __('Twitter', 'users'); ?></b>:</td><td><?php echo Html::toText($user['twitter']); ?></td></tr><?php } ?>\n<?php if ($user['about_me'] !== '') { ?><tr><td><b><?php echo __('About Me', 'users'); ?></b>:</td><td><?php echo Filter::apply('content', Html::toText($user['about_me'])); ?></td></tr><?php } ?>\n</table>\n<?php if (Users::isLoged()) { ?>\n<br>\n<a href=\"<?php echo Site::url(); ?>/users/<?php echo $user['id']; ?>/edit\"><?php echo __('Edit profile', 'users'); ?></a> /\n<?php if (in_array(Session::get('user_role'), array('admin', 'editor'))) { ?> <a href=\"<?php echo Site::url(); ?>/admin\"><?php echo __('Administration', 'system'); ?></a> / <?php } ?>\n<a href=\"<?php echo Site::url(); ?>/users/logout\"><?php echo __('Log Out', 'users'); ?></a>\n<?php } ?>\n<?php } else { echo __('This users doesnt exists', 'users'); } ?>\n"
  },
  {
    "path": "plugins/box/users/views/frontend/registration.view.php",
    "content": "<div class=\"row\">\n\t<div class=\"col-md-3\">\n\t\t<form method=\"post\">\n\t\t<?php echo (Form::hidden('csrf', Security::token())); ?>\n\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Username', 'users'); ?></label>\n\t\t\t<input type=\"text\" value=\"<?php echo $user_login; ?>\" name=\"login\" class=\"form-control\">\n\t\t\t<?php\n\t\t\t    if (isset($errors['users_this_user_alredy_exists'])) echo Html::nbsp(3).'<span class=\"error\">'.$errors['users_this_user_alredy_exists'].'</span>';\n\t\t\t    if (isset($errors['users_empty_login'])) echo Html::nbsp(3).'<span class=\"error\">'.$errors['users_empty_login'].'</span>';\n\t\t\t?>\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Password', 'users'); ?></label>\n\t\t\t<input type=\"password\" value=\"<?php echo $user_password; ?>\" name=\"password\" class=\"form-control\">\n\t\t\t<?php\n\t\t\t    if (isset($errors['users_empty_password'])) echo Html::nbsp(3).'<span class=\"error\">'.$errors['users_empty_password'].'</span>';\n\t\t\t?>\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Email', 'users'); ?></label>\n\t\t\t<input type=\"text\" value=\"<?php echo $user_email; ?>\" name=\"email\" class=\"form-control\">\n\t\t\t<?php\n\t\t\t    if (isset($errors['users_this_email_alredy_exists'])) echo Html::nbsp(3).'<span class=\"error\">'.$errors['users_this_email_alredy_exists'].'</span>';\n\t\t\t    if (isset($errors['users_empty_email'])) echo Html::nbsp(3).'<span class=\"error\">'.$errors['users_empty_email'].'</span>';\n\t\t\t    if (isset($errors['users_invalid_email'])) echo Html::nbsp(3).'<span class=\"error\">'.$errors['users_invalid_email'].'</span>';\n\t\t\t?>\n\t\t</div>\n\t\t<?php if (Option::get('captcha_installed') == 'true') { ?>\n\t\t<div class=\"form-group\">\n\t\t\t<label><?php echo __('Captcha', 'users'); ?></label>\n\t\t\t<input type=\"text\" name=\"answer\" class=\"form-control\"><?php if (isset($errors['users_captcha_wrong'])) echo Html::nbsp(3).'<span class=\"error\">'.$errors['users_captcha_wrong'].'</span>'; ?>\n\t\t\t<br>\t\t\t\n\t\t\t<?php CryptCaptcha::draw(); ?>\n\t\t</div>\n\t\t<?php } ?>\n\t\t<div class=\"form-group\">\n\t\t\t<input type=\"submit\" class=\"btn btn-primary\" value=\"<?php echo __('Register', 'users'); ?>\" name=\"register\">\n\t\t</div>\n\t\t</form>\n\t</div>\n</div>\n"
  },
  {
    "path": "plugins/box/users/views/frontend/userspanel.view.php",
    "content": "<?php if (Session::get('user_id')) { ?>\n    <li class=\"dropdown\">\n        <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><?php echo __('Welcome', 'users'); ?>, <?php echo Session::get('user_login'); ?><b class=\"caret\"></b></a>\n        <ul class=\"dropdown-menu\">\n            <li><a href=\"<?php echo Site::url(); ?>/users/<?php echo Session::get('user_id'); ?>\"><?php echo __('Profile', 'users'); ?></a></li>\n            <?php if (in_array(Session::get('user_role'), array('admin', 'editor'))) { ?>\n                <li><a href=\"<?php echo Site::url(); ?>/admin\"><?php echo __('Administration', 'system'); ?></a></li>\n            <?php } ?>\n            <li><a href=\"<?php echo Site::url(); ?>/users/logout\"><?php echo __('Log Out', 'users'); ?></a></li>\n        </ul>\n    </li>\n    <?php } else { ?>\n    <li><a href=\"<?php echo Site::url(); ?>/users/login\"><?php echo __('Log In', 'users'); ?></a></li>\n    <li><a href=\"<?php echo Site::url(); ?>/users/registration\"><?php echo __('Registration', 'users'); ?></a></li>\n<?php } ?>"
  },
  {
    "path": "plugins/captcha/captcha.plugin.php",
    "content": "<?php\n\n/**\n *  Captcha plugin\n *\n *  @package Monstra\n *  @subpackage Plugins\n *  @author Romanenko Sergey / Awilum\n *  @copyright 2012-2014 Romanenko Sergey / Awilum\n *  @version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Captcha', 'captcha'),\n                __('Captcha plugin for Monstra', 'captcha'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/');\n\n// Set crypt captcha path to images\n$cryptinstall = Option::get('siteurl').'/plugins/captcha/crypt/images/';\n\n// Include Crypt Captcha\ninclude PLUGINS . DS . 'captcha/crypt/cryptographp.fct.php';\n\n/**\n * Crypt Captha class\n */\nclass CryptCaptcha\n{\n    /**\n     * Draw\n     */\n    public static function draw()\n    {\n        dsp_crypt();\n    }\n\n    /**\n     * Check\n     */\n    public static function check($answer)\n    {\n        return chk_crypt($answer);\n    }\n}\n"
  },
  {
    "path": "plugins/captcha/crypt/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/captcha/crypt/cryptographp.cfg.php",
    "content": "<?php\n\n// -------------------------------------\n// General config\n// -------------------------------------\n\n$cryptwidth  = 130;  // Crypt image width (pixels)\n$cryptheight = 40;   // Crypt image height (pixels)\n\n$bgR  = 255;         // Background color RGB: Red (0 - 255)\n$bgG  = 255;         // Background color RGB: Green (0 - 255)\n$bgB  = 255;         // Background color RGB: Blue (0 - 255)\n\n$bgclear = true;     // Background transparent (true/false)\n$bgimg   = '';       // Background image\n$bgframe = true;     // Image frame/border\n\n// ----------------------------\n// Characters config\n// ----------------------------\n\n$charR = 0;     // Characters color RGB: Red (0 - 255)\n$charG = 0;     // Characters color RGB: Green (0 - 255)\n$charB = 0;     // Characters color RGB: Blue (0 - 255)\n\n$charcolorrnd = false;     // Random colors\n$charcolorrndlevel = 2;    // Brightness level (0 - 4)\n$charclear = 10;           // Intensity of characters transparency (0 - 127)\n\n// Fonts\n$tfont[] = 'luggerbu.ttf';\n//$tfont[] = 'other ttf fonts';\n\n$charel = 'ABCDEFGHKLMNPRTWXYZ234569'; // Characters to use\n\n$crypteasy = true;       // Crypt image easy to read (true) or not (false)\n\n$charelc = 'BCDFGHKLMNPRTVWXZ';   //  $crypteasy = true\n$charelv = 'AEIOUY';              //  $crypteasy = true\n\n$difuplow = false;\n\n$charnbmin = 4;         // Minimum characters in the ciphertext\n$charnbmax = 4;         // Maximum characters in the ciphertext\n\n$charspace = 20;        // Character spacing (in pixels)\n$charsizemin = 14;      // The minimum size of the characters\n$charsizemax = 16;      // The maximum size of the characters\n\n$charanglemax  = 25;     // The maximum steering angle of characters (0 - 360)\n$charup   = true;        // Vertical movement of random characters (yes / no)\n\n// Additional effects\n\n$cryptgaussianblur = false; // Gaussian Blur\n$cryptgrayscal = false;     // Grayscal\n\n// ----------------------\n// Configuration du bruit\n// ----------------------\n\n$noisepxmin = 10;      // Noise: The minimum number of random pixels\n$noisepxmax = 10;      // Noise: The maximum number of random pixels\n\n$noiselinemin = 1;     // Noise: The minimum number of random lines\n$noiselinemax = 1;     // Noise: The maximum number of random lines\n\n$nbcirclemin = 1;      // Noise: The minimum random circles\n$nbcirclemax = 1;      // Noise: The maximum random circles\n\n$noisecolorchar  = 3;  // Noise: pixel colors, lines, circles: (1 - 3)\n                       // 1: Characters color\n                       // 2: The background color\n                       // 3: Random Color\n\n$brushsize = 1;        // Brush size (in pixels) (1 - 25)\n\n$noiseup = false;      // Noise is under entry (TRUE) or below (false)\n\n// --------------------------------\n// System configuration and security\n// --------------------------------\n\n$cryptformat = \"png\";   // Image format \"GIF\", \"PNG\" or \"JPG\"\n$cryptsecure = \"md5\";   // Crypt method \"md5\", \"sha1\" or \"\"\n$cryptusetimer = 0;     // Time sleep\n$cryptusertimererror = 3;  // Min times\n$cryptusemax = 1000;     // Max times\n$cryptoneuse = false;    //\n"
  },
  {
    "path": "plugins/captcha/crypt/cryptographp.fct.php",
    "content": "<?php\n\nif (session_id() == \"\") session_start();\n\n$_SESSION['cryptdir'] = dirname($cryptinstall);\n\n/**\n * Render Capthca\n */\nfunction dsp_crypt($cfg = 0, $reload = 1)\n{\n    echo \"<table><tr><td><img id='cryptogram' src='\".$_SESSION['cryptdir'].\"/cryptographp.php?cfg=\".$cfg.\"&\".SID.\"'></td>\";\n    if ($reload) echo \"<td>&nbsp;&nbsp;<a title='\".($reload==1?'':$reload).\"' style=\\\"cursor:pointer\\\" onclick=\\\"javascript:document.images.cryptogram.src='\".$_SESSION['cryptdir'].\"/cryptographp.php?cfg=\".$cfg.\"&\".SID.\"&'+Math.round(Math.random(0)*1000)+1\\\"><img src=\\\"\".$_SESSION['cryptdir'].\"/images/reload.png\\\"></a></td>\";\n    echo \"</tr></table>\";\n}\n\n/**\n * Verify Code\n */\nfunction chk_crypt($code)\n{\n    include ($_SESSION['configfile']);\n    $code = addslashes ($code);\n    $code = str_replace(' ', '', $code);\n    $code = ($difuplow ? $code : strtoupper($code));\n    switch (strtoupper($cryptsecure)) {\n        case \"MD5\"  : $code = md5($code); break;\n        case \"SHA1\" : $code = sha1($code); break;\n    }\n    if ($_SESSION['cryptcode'] and ($_SESSION['cryptcode'] == $code)) {\n        unset($_SESSION['cryptreload']);\n        if ($cryptoneuse) unset($_SESSION['cryptcode']);\n        return true;\n    } else {\n         $_SESSION['cryptreload'] = true;\n\n         return false;\n    }\n}\n"
  },
  {
    "path": "plugins/captcha/crypt/cryptographp.inc.php",
    "content": "<?php\n\n/**\n *  Cryptographp / v1.5\n *\n *  @version 1.5 Romanenko Sergey / Awilum\n *  @version 1.4 by Sylvain BRISON\n */\n\nerror_reporting(0);\nsrand((double) microtime()*1000000);\n\nif (( ! isset($_COOKIE['cryptcookietest'])) and ($_GET[$_GET['sn']] == \"\")) {\n    header(\"Content-type: image/png\");\n    readfile('images/erreur3.png');\n    exit;\n}\n\nif ($_GET[$_GET['sn']] == \"\") { unset ($_GET['sn']); }\n\nsession_start();\n\n// Takes only the configuration files in the same directory\nif (is_file($_GET['cfg']) and dirname($_GET['cfg']) == '.' ) { $_SESSION['configfile']=$_GET['cfg']; } else {  $_SESSION['configfile'] = \"cryptographp.cfg.php\"; }\n\ninclude($_SESSION['configfile']);\n\nif ($_SESSION['cryptcptuse'] >= $cryptusemax) {\n    header(\"Content-type: image/png\");\n    readfile('images/erreur1.png');\n    exit;\n}\n\n$delai = time()-$_SESSION['crypttime'];\nif ($delai < $cryptusetimer) {\n   switch ($cryptusertimererror) {\n        case 2  : header(\"Content-type: image/png\");\n                readfile('images/erreur2.png');\n                exit;\n        case 3  : sleep ($cryptusetimer-$delai);\n                break; // Fait une pause\n        case 1  :\n        default : exit;  // Quitte le script sans rien faire\n    }\n}\n\n// Create temporary cryptogram\n$imgtmp = imagecreatetruecolor($cryptwidth,$cryptheight);\n$blank  = imagecolorallocate($imgtmp,255,255,255);\n$black   = imagecolorallocate($imgtmp,0,0,0);\nimagefill($imgtmp,0,0,$blank);\n\n$word ='';\n$x = 10;\n$pair = rand(0,1);\n$charnb = rand($charnbmin,$charnbmax);\nfor ($i=1;$i<= $charnb;$i++) {\n     $tword[$i]['font'] =  $tfont[array_rand($tfont,1)];\n     $tword[$i]['angle'] = (rand(1,2)==1)?rand(0,$charanglemax):rand(360-$charanglemax,360);\n\n     if ($crypteasy) $tword[$i]['element'] =(!$pair)?$charelc{rand(0,strlen($charelc)-1)}:$charelv{rand(0,strlen($charelv)-1)};\n        else $tword[$i]['element'] = $charel{rand(0,strlen($charel)-1)};\n\n    $pair=!$pair;\n    $tword[$i]['size'] = rand($charsizemin,$charsizemax);\n    $tword[$i]['y'] = ($charup?($cryptheight/2)+rand(0,($cryptheight/5)):($cryptheight/1.5));\n    $word .=$tword[$i]['element'];\n\n    $lafont=\"fonts/\".$tword[$i]['font'];\n    imagettftext($imgtmp,$tword[$i]['size'],$tword[$i]['angle'],$x,$tword[$i]['y'],$black,$lafont,$tword[$i]['element']);\n\n    $x +=$charspace;\n}\n\n// Calculation of horizontal framing cryptograms temporary\n$xbegin=0;\n$x=0;\nwhile (($x<$cryptwidth)and(!$xbegin)) {\n      $y=0;\n      while (($y<$cryptheight)and(!$xbegin)) {\n           if (imagecolorat($imgtmp,$x,$y) != $blank) $xbegin = $x;\n           $y++;\n      }\n      $x++;\n}\n\n$xend=0;\n$x=$cryptwidth-1;\nwhile (($x>0)and(!$xend)) {\n     $y=0;\n     while (($y<$cryptheight)and(!$xend)) {\n          if (imagecolorat($imgtmp,$x,$y) != $blank) $xend = $x;\n          $y++;\n      }\n      $x--;\n}\n\n$xvariation = round(($cryptwidth/2)-(($xend-$xbegin)/2));\nimagedestroy ($imgtmp);\n\n// Creating the final cryptogram\n$img = imagecreatetruecolor($cryptwidth, $cryptheight);\n\nif ($bgimg and is_dir($bgimg)) {\n    $dh  = opendir($bgimg);\n    while (false !== ($filename = readdir($dh)))\n        if (eregi(\".[gif|jpg|png]$\", $filename)) { $files[] = $filename; }\n        closedir($dh);\n        $bgimg = $bgimg.'/'.$files[array_rand($files,1)];\n}\n\nif ($bgimg) {\n    list($getwidth, $getheight, $gettype, $getattr) = getimagesize($bgimg);\n    switch ($gettype) {\n        case \"1\": $imgread = imagecreatefromgif($bgimg); break;\n        case \"2\": $imgread = imagecreatefromjpeg($bgimg); break;\n        case \"3\": $imgread = imagecreatefrompng($bgimg); break;\n    }\n    imagecopyresized ($img, $imgread, 0,0,0,0,$cryptwidth,$cryptheight,$getwidth,$getheight);\n    imagedestroy ($imgread);\n} else {\n    $bg = imagecolorallocate($img,$bgR,$bgG,$bgB);\n    imagefill($img,0,0,$bg);\n    if ($bgclear) imagecolortransparent($img,$bg);\n}\n\nfunction ecriture()\n{\n    global  $img, $ink, $charR, $charG, $charB, $charclear, $xvariation, $charnb, $charcolorrnd, $charcolorrndlevel, $tword, $charspace;\n    if (function_exists ('imagecolorallocatealpha')) $ink = imagecolorallocatealpha($img,$charR,$charG,$charB,$charclear);\n       else $ink = imagecolorallocate ($img,$charR,$charG,$charB);\n\n    $x = $xvariation;\n    for ($i = 1; $i <= $charnb; $i++) {\n\n    if ($charcolorrnd) {\n       $ok = false;\n       do {\n          $rndR = rand(0,255); $rndG = rand(0,255); $rndB = rand(0,255);\n          $rndcolor = $rndR+$rndG+$rndB;\n          switch ($charcolorrndlevel) {\n                 case 1  : if ($rndcolor<200) $ok=true; break; // tres sombre\n                 case 2  : if ($rndcolor<400) $ok=true; break; // sombre\n                 case 3  : if ($rndcolor>500) $ok=true; break; // claires\n                 case 4  : if ($rndcolor>650) $ok=true; break; // tr?s claires\n                 default : $ok=true;\n                 }\n          } while (!$ok);\n\n      if (function_exists ('imagecolorallocatealpha')) $rndink = imagecolorallocatealpha($img,$rndR,$rndG,$rndB,$charclear);\n          else $rndink = imagecolorallocate ($img,$rndR,$rndG,$rndB);\n      }\n\n    $lafont=\"fonts/\".$tword[$i]['font'];\n    imagettftext($img,$tword[$i]['size'],$tword[$i]['angle'],$x,$tword[$i]['y'],$charcolorrnd?$rndink:$ink,$lafont,$tword[$i]['element']);\n\n    $x +=$charspace;\n    }\n}\n\nfunction noisecolor()\n{\n    global $img, $noisecolorchar, $ink, $bg, $brushsize;\n    switch ($noisecolorchar) {\n        case 1  : $noisecol = $ink; break;\n        case 2  : $noisecol = $bg; break;\n        case 3  :\n        default : $noisecol = imagecolorallocate ($img,rand(0,255),rand(0,255),rand(0,255)); break;\n    }\n    if ($brushsize and $brushsize > 1 and function_exists('imagesetbrush')) {\n        $brush = imagecreatetruecolor($brushsize,$brushsize);\n        imagefill($brush, 0, 0, $noisecol);\n        imagesetbrush($img, $brush);\n        $noisecol = IMG_COLOR_BRUSHED;\n    }\n\n    return $noisecol;\n}\n\nfunction bruit()\n{\n    global $noisepxmin, $noisepxmax, $noiselinemin, $noiselinemax, $nbcirclemin, $nbcirclemax,$img, $cryptwidth, $cryptheight;\n    $nbpx = rand($noisepxmin,$noisepxmax);\n    $nbline = rand($noiselinemin,$noiselinemax);\n    $nbcircle = rand($nbcirclemin,$nbcirclemax);\n    for ($i=1;$i<$nbpx;$i++) imagesetpixel ($img,rand(0,$cryptwidth-1),rand(0,$cryptheight-1),noisecolor());\n    for ($i=1;$i<=$nbline;$i++) imageline($img,rand(0,$cryptwidth-1),rand(0,$cryptheight-1),rand(0,$cryptwidth-1),rand(0,$cryptheight-1),noisecolor());\n    for ($i=1;$i<=$nbcircle;$i++) imagearc($img,rand(0,$cryptwidth-1),rand(0,$cryptheight-1),$rayon=rand(5,$cryptwidth/3),$rayon,0,360,noisecolor());\n}\n\nif ($noiseup) {\n    ecriture();\n    bruit();\n} else {\n    bruit();\n    ecriture();\n}\n\n// Creating frame\nif ($bgframe) {\n    $framecol = imagecolorallocate($img,($bgR*3+$charR)/4,($bgG*3+$charG)/4,($bgB*3+$charB)/4);\n    imagerectangle($img, 0, 0, $cryptwidth-1, $cryptheight-1, $framecol);\n}\n\n// Additional changes: grayscale and gaussian blur\nif (function_exists('imagefilter')) {\n    if ($cryptgrayscal) imagefilter ( $img, IMG_FILTER_GRAYSCALE);\n    if ($cryptgaussianblur) imagefilter ( $img, IMG_FILTER_GAUSSIAN_BLUR);\n}\n\n// Shift conversion cryptograms\n$word = ($difuplow?$word:strtoupper($word));\n\n// Write cryptcode to the Session\nswitch (strtoupper($cryptsecure)) {\n    case \"MD5\"  : $_SESSION['cryptcode'] = md5($word); break;\n    case \"SHA1\" : $_SESSION['cryptcode'] = sha1($word); break;\n    default     : $_SESSION['cryptcode'] = $word; break;\n}\n\n$_SESSION['crypttime'] = time();\n$_SESSION['cryptcptuse']++;\n\n// Render image\nswitch (strtoupper($cryptformat)) {\n       case \"JPG\"  :\n         case \"JPEG\" : if (imagetypes() & IMG_JPG) {\n                        header(\"Content-type: image/jpeg\");\n                        imagejpeg($img, \"\", 80);\n                        }\n                     break;\n         case \"GIF\"  : if (imagetypes() & IMG_GIF) {\n                        header(\"Content-type: image/gif\");\n                        imagegif($img);\n                        }\n                     break;\n         case \"PNG\"  :\n         default     : if (imagetypes() & IMG_PNG) {\n                        header(\"Content-type: image/png\");\n                        imagepng($img);\n                        }\n}\n\nimagedestroy ($img);\nunset ($word,$tword);\nunset ($_SESSION['cryptreload']);\n"
  },
  {
    "path": "plugins/captcha/crypt/cryptographp.php",
    "content": "<?php\nsession_start();\nerror_reporting(E_ALL ^ E_NOTICE);\nSetCookie(\"cryptcookietest\", \"1\");\nHeader(\"Location: cryptographp.inc.php?cfg=\".$_GET['cfg'].\"&sn=\".session_name().\"&\".SID);\n"
  },
  {
    "path": "plugins/captcha/crypt/fonts/index.html",
    "content": ""
  },
  {
    "path": "plugins/captcha/crypt/fonts/luggerbu.txt",
    "content": "LuggerBug\nMacintosh & Windows TrueType.\n\nLuggerBug - The lowdown:\nThis version of LuggerBug is 18 (days) old, It's come of age. Which means it can drink in pubs, vote and watch adult  videos. These are, of course, three things which should not be attempted in one day. However, I did just that and following an afternoon shuffling between the pub and the video store, I ended up voting for . . . Alicia Silverstone\n\nLuggerBug - whats included\nUppercase & Lowercase are the same, numerals and some punctuation. The characters [ ] \\ have the numbers 99, 95 and 00 on them for better displaying of prices like 24.99 etc.\n\nLuggerBug ?!\nI was originaly going to call it BuggerLugs, but I though that might be a bit stupid. You may or may not know what 'Buggerlugs' means, well in Scotland it's a semi-effectionate term to describe someone you know quite well, but at the same time, slag them off without any guilt being attached.\n\nLegal frivolity\n1. This lovely font is completely and utterly free, you can use it in any way you see fit. email me if you use it for something useful.\n2. Please keep this archive intact along with this readme file.\n3. And if you want to put these onto a magazine floppy, CD-Rom, go ahead, as long as you follow (2).\n\nPaul Reid.\nOctober '97.\n\nemail: whoami@btinternet.com \nSite: http://www.btinternet.com/~whoami\n\n\"That night they stayed outside the Asylum and watched TV from inside it.\""
  },
  {
    "path": "plugins/captcha/crypt/images/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/captcha/crypt/images/index.html",
    "content": ""
  },
  {
    "path": "plugins/captcha/crypt/index.html",
    "content": ""
  },
  {
    "path": "plugins/captcha/crypt/index.php",
    "content": ""
  },
  {
    "path": "plugins/captcha/install/captcha.install.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n    // Add New Options\n    Option::add('captcha_installed', 'true');\n"
  },
  {
    "path": "plugins/captcha/install/captcha.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/captcha/captcha.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>15</plugin_priority>\n    <plugin_name>Captcha</plugin_name>\n    <plugin_description>Captcha plugin for Monstra</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/captcha/install/captcha.uninstall.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n    // Delete Options\n    Option::delete('captcha_installed');\n"
  },
  {
    "path": "plugins/captcha/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Captcha plugin pro Monstra',\n            'Captcha code is wrong' => 'Captcha kód je nesprávný',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Captcha Plugin für Monstra',\n            'Captcha code is wrong' => 'Captcha Code ist falsch',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Captcha plugin for Monstra',\n            'Captcha code is wrong' => 'Captcha code is wrong',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Captcha plugin for Monstra',\n            'Captcha code is wrong' => 'El código captcha es incorrecto',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'کدامنيتي',\n            'Captcha plugin for Monstra' => 'کدامنيتي براي مونسترا',\n            'Captcha code is wrong' => 'کدامنيتي اشتباه است',\n        ) \n    );"
  },
  {
    "path": "plugins/captcha/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Plugin Captcha pour Monstra',\n            'Captcha code is wrong' => 'Le code Captcha est erroné',\n        ) \n    );"
  },
  {
    "path": "plugins/captcha/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Verifikasi',\n            'Captcha plugin for Monstra' => 'Verifikasi plugin untuk Monstra',\n            'Captcha code is wrong' => 'Kode Verifikasi salah',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Captcha plugin per Monstra',\n            'Captcha code is wrong' => 'Codice captcha è errato',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Captcha პლაგინი Monstra-თვის',\n            'Captcha code is wrong' => 'Captcha-ზე პასუხი არასწორია!',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Saugos kodas',\n            'Captcha plugin for Monstra' => 'Saugos kodo papildinys',\n            'Captcha code is wrong' => 'Saugos kodas yra neteisingas',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Captcha Plugin voor Monstra',\n            'Captcha code is wrong' => 'Captcha Code is helaas foutief',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Wtyczka Captcha dla systemu Monstra',\n            'Captcha code is wrong' => 'Niewłaściwy kod Captcha',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Plugin de captcha para o Monstra CMS',\n            'Captcha code is wrong' => 'O Captcha está errado',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Captcha плагин для Monstra',\n            'Captcha code is wrong' => 'Captcha код неправильный',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Captcha plugin pre Monstra',\n            'Captcha code is wrong' => 'Captcha kód je nesprávny',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha',\n            'Captcha plugin for Monstra' => 'Captcha dodatak za Monstra',\n            'Captcha code is wrong' => 'Captcha Kod je pogrešan',\n        ) \n    );\n"
  },
  {
    "path": "plugins/captcha/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Captcha/Doğrulama',\n            'Captcha plugin for Monstra' => 'Monstra için captcha/doğrulama eklentisi',\n            'Captcha code is wrong' => 'Doğrulama kodu yanlış',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => 'Каптча',\n            'Captcha plugin for Monstra' => 'Каптча плагін для Monstra',\n            'Captcha code is wrong' => 'Код каптчі невірний',\n        )\n    );\n"
  },
  {
    "path": "plugins/captcha/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'captcha' => array(\n            'Captcha' => '验证码',\n            'Captcha plugin for Monstra' => 'Monstra 验证码插件',\n            'Captcha code is wrong' => '验证码错误',\n        )\n    );\n"
  },
  {
    "path": "plugins/markitup/install/markitup.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/markitup/markitup.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>15</plugin_priority>\n    <plugin_name>MarkItUp!</plugin_name>\n    <plugin_description>MarkItUp! universal markup jQuery editor</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>\n"
  },
  {
    "path": "plugins/markitup/markitup/.htaccess",
    "content": "Options -Indexes\nAllow from all"
  },
  {
    "path": "plugins/markitup/markitup/jquery.markitup.js",
    "content": "// ----------------------------------------------------------------------------\n// markItUp! Universal MarkUp Engine, JQuery plugin\n// v 1.1.x\n// Dual licensed under the MIT and GPL licenses.\n// ----------------------------------------------------------------------------\n// Copyright (C) 2007-2012 Jay Salvat\n// http://markitup.jaysalvat.com/\n// ----------------------------------------------------------------------------\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// ----------------------------------------------------------------------------\n(function($) {\n\t$.fn.markItUp = function(settings, extraSettings) {\n\t\tvar method, params, options, ctrlKey, shiftKey, altKey; ctrlKey = shiftKey = altKey = false;\n\n\t\tif (typeof settings == 'string') {\n\t\t\tmethod = settings;\n\t\t\tparams = extraSettings;\n\t\t} \n\n\t\toptions = {\tid:\t\t\t\t\t\t'',\n\t\t\t\t\tnameSpace:\t\t\t\t'',\n\t\t\t\t\troot:\t\t\t\t\t'',\n\t\t\t\t\tpreviewHandler:\t\t\tfalse,\n\t\t\t\t\tpreviewInWindow:\t\t'', // 'width=800, height=600, resizable=yes, scrollbars=yes'\n\t\t\t\t\tpreviewInElement:\t\t'',\n\t\t\t\t\tpreviewAutoRefresh:\t\ttrue,\n\t\t\t\t\tpreviewPosition:\t\t'after',\n\t\t\t\t\tpreviewTemplatePath:\t'~/templates/preview.html',\n\t\t\t\t\tpreviewParser:\t\t\tfalse,\n\t\t\t\t\tpreviewParserPath:\t\t'',\n\t\t\t\t\tpreviewParserVar:\t\t'data',\n\t\t\t\t\tresizeHandle:\t\t\ttrue,\n\t\t\t\t\tbeforeInsert:\t\t\t'',\n\t\t\t\t\tafterInsert:\t\t\t'',\n\t\t\t\t\tonEnter:\t\t\t\t{},\n\t\t\t\t\tonShiftEnter:\t\t\t{},\n\t\t\t\t\tonCtrlEnter:\t\t\t{},\n\t\t\t\t\tonTab:\t\t\t\t\t{},\n\t\t\t\t\tmarkupSet:\t\t\t[\t{ /* set */ } ]\n\t\t\t\t};\n\t\t$.extend(options, settings, extraSettings);\n\n\t\t// compute markItUp! path\n\t\tif (!options.root) {\n\t\t\t$('script').each(function(a, tag) {\n\t\t\t\tmiuScript = $(tag).get(0).src.match(/(.*)jquery\\.markitup(\\.pack)?\\.js$/);\n\t\t\t\tif (miuScript !== null) {\n\t\t\t\t\toptions.root = miuScript[1];\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Quick patch to keep compatibility with jQuery 1.9\n\t\tvar uaMatch = function(ua) {\n\t\t\tua = ua.toLowerCase();\n\n\t\t\tvar match = /(chrome)[ \\/]([\\w.]+)/.exec(ua) ||\n\t\t\t\t/(webkit)[ \\/]([\\w.]+)/.exec(ua) ||\n\t\t\t\t/(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(ua) ||\n\t\t\t\t/(msie) ([\\w.]+)/.exec(ua) ||\n\t\t\t\tua.indexOf(\"compatible\") < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) ||\n\t\t\t\t[];\n\n\t\t\treturn {\n\t\t\t\tbrowser: match[ 1 ] || \"\",\n\t\t\t\tversion: match[ 2 ] || \"0\"\n\t\t\t};\n\t\t};\n\t\tvar matched = uaMatch( navigator.userAgent );\n\t\tvar browser = {};\n\n\t\tif (matched.browser) {\n\t\t\tbrowser[matched.browser] = true;\n\t\t\tbrowser.version = matched.version;\n\t\t}\n\t\tif (browser.chrome) {\n\t\t\tbrowser.webkit = true;\n\t\t} else if (browser.webkit) {\n\t\t\tbrowser.safari = true;\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tvar $$, textarea, levels, scrollPosition, caretPosition, caretOffset,\n\t\t\t\tclicked, hash, header, footer, previewWindow, template, iFrame, abort;\n\t\t\t$$ = $(this);\n\t\t\ttextarea = this;\n\t\t\tlevels = [];\n\t\t\tabort = false;\n\t\t\tscrollPosition = caretPosition = 0;\n\t\t\tcaretOffset = -1;\n\n\t\t\toptions.previewParserPath = localize(options.previewParserPath);\n\t\t\toptions.previewTemplatePath = localize(options.previewTemplatePath);\n\n\t\t\tif (method) {\n\t\t\t\tswitch(method) {\n\t\t\t\t\tcase 'remove':\n\t\t\t\t\t\tremove();\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'insert':\n\t\t\t\t\t\tmarkup(params);\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: \n\t\t\t\t\t\t$.error('Method ' +  method + ' does not exist on jQuery.markItUp');\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// apply the computed path to ~/\n\t\t\tfunction localize(data, inText) {\n\t\t\t\tif (inText) {\n\t\t\t\t\treturn \tdata.replace(/(\"|')~\\//g, \"$1\"+options.root);\n\t\t\t\t}\n\t\t\t\treturn \tdata.replace(/^~\\//, options.root);\n\t\t\t}\n\n\t\t\t// init and build editor\n\t\t\tfunction init() {\n\t\t\t\tid = ''; nameSpace = '';\n\t\t\t\tif (options.id) {\n\t\t\t\t\tid = 'id=\"'+options.id+'\"';\n\t\t\t\t} else if ($$.attr(\"id\")) {\n\t\t\t\t\tid = 'id=\"markItUp'+($$.attr(\"id\").substr(0, 1).toUpperCase())+($$.attr(\"id\").substr(1))+'\"';\n\n\t\t\t\t}\n\t\t\t\tif (options.nameSpace) {\n\t\t\t\t\tnameSpace = 'class=\"'+options.nameSpace+'\"';\n\t\t\t\t}\n\t\t\t\t$$.wrap('<div '+nameSpace+'></div>');\n\t\t\t\t$$.wrap('<div '+id+' class=\"markItUp\"></div>');\n\t\t\t\t$$.wrap('<div class=\"markItUpContainer\"></div>');\n\t\t\t\t$$.addClass(\"markItUpEditor\");\n\n\t\t\t\t// add the header before the textarea\n\t\t\t\theader = $('<div class=\"markItUpHeader\"></div>').insertBefore($$);\n\t\t\t\t$(dropMenus(options.markupSet)).appendTo(header);\n\n\t\t\t\t// add the footer after the textarea\n\t\t\t\tfooter = $('<div class=\"markItUpFooter\"></div>').insertAfter($$);\n\n\t\t\t\t// add the resize handle after textarea\n\t\t\t\tif (options.resizeHandle === true && browser.safari !== true) {\n\t\t\t\t\tresizeHandle = $('<div class=\"markItUpResizeHandle\"></div>')\n\t\t\t\t\t\t.insertAfter($$)\n\t\t\t\t\t\t.bind(\"mousedown.markItUp\", function(e) {\n\t\t\t\t\t\t\tvar h = $$.height(), y = e.clientY, mouseMove, mouseUp;\n\t\t\t\t\t\t\tmouseMove = function(e) {\n\t\t\t\t\t\t\t\t$$.css(\"height\", Math.max(20, e.clientY+h-y)+\"px\");\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tmouseUp = function(e) {\n\t\t\t\t\t\t\t\t$(\"html\").unbind(\"mousemove.markItUp\", mouseMove).unbind(\"mouseup.markItUp\", mouseUp);\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t$(\"html\").bind(\"mousemove.markItUp\", mouseMove).bind(\"mouseup.markItUp\", mouseUp);\n\t\t\t\t\t});\n\t\t\t\t\tfooter.append(resizeHandle);\n\t\t\t\t}\n\n\t\t\t\t// listen key events\n\t\t\t\t$$.bind('keydown.markItUp', keyPressed).bind('keyup', keyPressed);\n\t\t\t\t\n\t\t\t\t// bind an event to catch external calls\n\t\t\t\t$$.bind(\"insertion.markItUp\", function(e, settings) {\n\t\t\t\t\tif (settings.target !== false) {\n\t\t\t\t\t\tget();\n\t\t\t\t\t}\n\t\t\t\t\tif (textarea === $.markItUp.focused) {\n\t\t\t\t\t\tmarkup(settings);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// remember the last focus\n\t\t\t\t$$.bind('focus.markItUp', function() {\n\t\t\t\t\t$.markItUp.focused = this;\n\t\t\t\t});\n\n\t\t\t\tif (options.previewInElement) {\n\t\t\t\t\trefreshPreview();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// recursively build header with dropMenus from markupset\n\t\t\tfunction dropMenus(markupSet) {\n\t\t\t\tvar ul = $('<ul></ul>'), i = 0;\n\t\t\t\t$('li:hover > ul', ul).css('display', 'block');\n\t\t\t\t$.each(markupSet, function() {\n\t\t\t\t\tvar button = this, t = '', title, li, j;\n\t\t\t\t\ttitle = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||'');\n\t\t\t\t\tkey   = (button.key) ? 'accesskey=\"'+button.key+'\"' : '';\n\t\t\t\t\tif (button.separator) {\n\t\t\t\t\t\tli = $('<li class=\"markItUpSeparator\">'+(button.separator||'')+'</li>').appendTo(ul);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tfor (j = levels.length -1; j >= 0; j--) {\n\t\t\t\t\t\t\tt += levels[j]+\"-\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tli = $('<li class=\"markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'\"><a href=\"\" '+key+' title=\"'+title+'\">'+(button.name||'')+'</a></li>')\n\t\t\t\t\t\t.bind(\"contextmenu.markItUp\", function() { // prevent contextmenu on mac and allow ctrl+click\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}).bind('click.markItUp', function(e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t}).bind(\"focusin.markItUp\", function(){\n                            $$.focus();\n\t\t\t\t\t\t}).bind('mouseup', function() {\n\t\t\t\t\t\t\tif (button.call) {\n\t\t\t\t\t\t\t\teval(button.call)();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsetTimeout(function() { markup(button) },1);\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}).bind('mouseenter.markItUp', function() {\n\t\t\t\t\t\t\t\t$('> ul', this).show();\n\t\t\t\t\t\t\t\t$(document).one('click', function() { // close dropmenu if click outside\n\t\t\t\t\t\t\t\t\t\t$('ul ul', header).hide();\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}).bind('mouseleave.markItUp', function() {\n\t\t\t\t\t\t\t\t$('> ul', this).hide();\n\t\t\t\t\t\t}).appendTo(ul);\n\t\t\t\t\t\tif (button.dropMenu) {\n\t\t\t\t\t\t\tlevels.push(i);\n\t\t\t\t\t\t\t$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}); \n\t\t\t\tlevels.pop();\n\t\t\t\treturn ul;\n\t\t\t}\n\n\t\t\t// markItUp! markups\n\t\t\tfunction magicMarkups(string) {\n\t\t\t\tif (string) {\n\t\t\t\t\tstring = string.toString();\n\t\t\t\t\tstring = string.replace(/\\(\\!\\(([\\s\\S]*?)\\)\\!\\)/g,\n\t\t\t\t\t\tfunction(x, a) {\n\t\t\t\t\t\t\tvar b = a.split('|!|');\n\t\t\t\t\t\t\tif (altKey === true) {\n\t\t\t\t\t\t\t\treturn (b[1] !== undefined) ? b[1] : b[0];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn (b[1] === undefined) ? \"\" : b[0];\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\t// [![prompt]!], [![prompt:!:value]!]\n\t\t\t\t\tstring = string.replace(/\\[\\!\\[([\\s\\S]*?)\\]\\!\\]/g,\n\t\t\t\t\t\tfunction(x, a) {\n\t\t\t\t\t\t\tvar b = a.split(':!:');\n\t\t\t\t\t\t\tif (abort === true) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue = prompt(b[0], (b[1]) ? b[1] : '');\n\t\t\t\t\t\t\tif (value === null) {\n\t\t\t\t\t\t\t\tabort = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\treturn string;\n\t\t\t\t}\n\t\t\t\treturn \"\";\n\t\t\t}\n\n\t\t\t// prepare action\n\t\t\tfunction prepare(action) {\n\t\t\t\tif ($.isFunction(action)) {\n\t\t\t\t\taction = action(hash);\n\t\t\t\t}\n\t\t\t\treturn magicMarkups(action);\n\t\t\t}\n\n\t\t\t// build block to insert\n\t\t\tfunction build(string) {\n\t\t\t\tvar openWith \t\t\t= prepare(clicked.openWith);\n\t\t\t\tvar placeHolder \t\t= prepare(clicked.placeHolder);\n\t\t\t\tvar replaceWith \t\t= prepare(clicked.replaceWith);\n\t\t\t\tvar closeWith \t\t\t= prepare(clicked.closeWith);\n\t\t\t\tvar openBlockWith \t\t= prepare(clicked.openBlockWith);\n\t\t\t\tvar closeBlockWith \t\t= prepare(clicked.closeBlockWith);\n\t\t\t\tvar multiline \t\t\t= clicked.multiline;\n\t\t\t\t\n\t\t\t\tif (replaceWith !== \"\") {\n\t\t\t\t\tblock = openWith + replaceWith + closeWith;\n\t\t\t\t} else if (selection === '' && placeHolder !== '') {\n\t\t\t\t\tblock = openWith + placeHolder + closeWith;\n\t\t\t\t} else {\n\t\t\t\t\tstring = string || selection;\n\n\t\t\t\t\tvar lines = [string], blocks = [];\n\t\t\t\t\t\n\t\t\t\t\tif (multiline === true) {\n\t\t\t\t\t\tlines = string.split(/\\r?\\n/);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor (var l = 0; l < lines.length; l++) {\n\t\t\t\t\t\tline = lines[l];\n\t\t\t\t\t\tvar trailingSpaces;\n\t\t\t\t\t\tif (trailingSpaces = line.match(/ *$/)) {\n\t\t\t\t\t\t\tblocks.push(openWith + line.replace(/ *$/g, '') + closeWith + trailingSpaces);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tblocks.push(openWith + line + closeWith);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tblock = blocks.join(\"\\n\");\n\t\t\t\t}\n\n\t\t\t\tblock = openBlockWith + block + closeBlockWith;\n\n\t\t\t\treturn {\tblock:block, \n\t\t\t\t\t\t\topenBlockWith:openBlockWith,\n\t\t\t\t\t\t\topenWith:openWith, \n\t\t\t\t\t\t\treplaceWith:replaceWith, \n\t\t\t\t\t\t\tplaceHolder:placeHolder,\n\t\t\t\t\t\t\tcloseWith:closeWith,\n\t\t\t\t\t\t\tcloseBlockWith:closeBlockWith\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\t// define markup to insert\n\t\t\tfunction markup(button) {\n\t\t\t\tvar len, j, n, i;\n\t\t\t\thash = clicked = button;\n\t\t\t\tget();\n\t\t\t\t$.extend(hash, {\tline:\"\", \n\t\t\t\t\t\t \t\t\troot:options.root,\n\t\t\t\t\t\t\t\t\ttextarea:textarea, \n\t\t\t\t\t\t\t\t\tselection:(selection||''), \n\t\t\t\t\t\t\t\t\tcaretPosition:caretPosition,\n\t\t\t\t\t\t\t\t\tctrlKey:ctrlKey, \n\t\t\t\t\t\t\t\t\tshiftKey:shiftKey, \n\t\t\t\t\t\t\t\t\taltKey:altKey\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t// callbacks before insertion\n\t\t\t\tprepare(options.beforeInsert);\n\t\t\t\tprepare(clicked.beforeInsert);\n\t\t\t\tif ((ctrlKey === true && shiftKey === true) || button.multiline === true) {\n\t\t\t\t\tprepare(clicked.beforeMultiInsert);\n\t\t\t\t}\t\t\t\n\t\t\t\t$.extend(hash, { line:1 });\n\n\t\t\t\tif ((ctrlKey === true && shiftKey === true)) {\n\t\t\t\t\tlines = selection.split(/\\r?\\n/);\n\t\t\t\t\tfor (j = 0, n = lines.length, i = 0; i < n; i++) {\n\t\t\t\t\t\tif ($.trim(lines[i]) !== '') {\n\t\t\t\t\t\t\t$.extend(hash, { line:++j, selection:lines[i] } );\n\t\t\t\t\t\t\tlines[i] = build(lines[i]).block;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlines[i] = \"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tstring = { block:lines.join('\\n')};\n\t\t\t\t\tstart = caretPosition;\n\t\t\t\t\tlen = string.block.length + ((browser.opera) ? n-1 : 0);\n\t\t\t\t} else if (ctrlKey === true) {\n\t\t\t\t\tstring = build(selection);\n\t\t\t\t\tstart = caretPosition + string.openWith.length;\n\t\t\t\t\tlen = string.block.length - string.openWith.length - string.closeWith.length;\n\t\t\t\t\tlen = len - (string.block.match(/ $/) ? 1 : 0);\n\t\t\t\t\tlen -= fixIeBug(string.block);\n\t\t\t\t} else if (shiftKey === true) {\n\t\t\t\t\tstring = build(selection);\n\t\t\t\t\tstart = caretPosition;\n\t\t\t\t\tlen = string.block.length;\n\t\t\t\t\tlen -= fixIeBug(string.block);\n\t\t\t\t} else {\n\t\t\t\t\tstring = build(selection);\n\t\t\t\t\tstart = caretPosition + string.block.length ;\n\t\t\t\t\tlen = 0;\n\t\t\t\t\tstart -= fixIeBug(string.block);\n\t\t\t\t}\n\t\t\t\tif ((selection === '' && string.replaceWith === '')) {\n\t\t\t\t\tcaretOffset += fixOperaBug(string.block);\n\t\t\t\t\t\n\t\t\t\t\tstart = caretPosition + string.openBlockWith.length + string.openWith.length;\n\t\t\t\t\tlen = string.block.length - string.openBlockWith.length - string.openWith.length - string.closeWith.length - string.closeBlockWith.length;\n\n\t\t\t\t\tcaretOffset = $$.val().substring(caretPosition,  $$.val().length).length;\n\t\t\t\t\tcaretOffset -= fixOperaBug($$.val().substring(0, caretPosition));\n\t\t\t\t}\n\t\t\t\t$.extend(hash, { caretPosition:caretPosition, scrollPosition:scrollPosition } );\n\n\t\t\t\tif (string.block !== selection && abort === false) {\n\t\t\t\t\tinsert(string.block);\n\t\t\t\t\tset(start, len);\n\t\t\t\t} else {\n\t\t\t\t\tcaretOffset = -1;\n\t\t\t\t}\n\t\t\t\tget();\n\n\t\t\t\t$.extend(hash, { line:'', selection:selection });\n\n\t\t\t\t// callbacks after insertion\n\t\t\t\tif ((ctrlKey === true && shiftKey === true) || button.multiline === true) {\n\t\t\t\t\tprepare(clicked.afterMultiInsert);\n\t\t\t\t}\n\t\t\t\tprepare(clicked.afterInsert);\n\t\t\t\tprepare(options.afterInsert);\n\n\t\t\t\t// refresh preview if opened\n\t\t\t\tif (previewWindow && options.previewAutoRefresh) {\n\t\t\t\t\trefreshPreview(); \n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t// reinit keyevent\n\t\t\t\tshiftKey = altKey = ctrlKey = abort = false;\n\t\t\t}\n\n\t\t\t// Substract linefeed in Opera\n\t\t\tfunction fixOperaBug(string) {\n\t\t\t\tif (browser.opera) {\n\t\t\t\t\treturn string.length - string.replace(/\\n*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t// Substract linefeed in IE\n\t\t\tfunction fixIeBug(string) {\n\t\t\t\tif (browser.msie) {\n\t\t\t\t\treturn string.length - string.replace(/\\r*/g, '').length;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\t\n\t\t\t// add markup\n\t\t\tfunction insert(block) {\t\n\t\t\t\tif (document.selection) {\n\t\t\t\t\tvar newSelection = document.selection.createRange();\n\t\t\t\t\tnewSelection.text = block;\n\t\t\t\t} else {\n\t\t\t\t\ttextarea.value =  textarea.value.substring(0, caretPosition)  + block + textarea.value.substring(caretPosition + selection.length, textarea.value.length);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// set a selection\n\t\t\tfunction set(start, len) {\n\t\t\t\tif (textarea.createTextRange){\n\t\t\t\t\t// quick fix to make it work on Opera 9.5\n\t\t\t\t\tif (browser.opera && browser.version >= 9.5 && len == 0) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\trange = textarea.createTextRange();\n\t\t\t\t\trange.collapse(true);\n\t\t\t\t\trange.moveStart('character', start); \n\t\t\t\t\trange.moveEnd('character', len); \n\t\t\t\t\trange.select();\n\t\t\t\t} else if (textarea.setSelectionRange ){\n\t\t\t\t\ttextarea.setSelectionRange(start, start + len);\n\t\t\t\t}\n\t\t\t\ttextarea.scrollTop = scrollPosition;\n\t\t\t\ttextarea.focus();\n\t\t\t}\n\n\t\t\t// get the selection\n\t\t\tfunction get() {\n\t\t\t\ttextarea.focus();\n\n\t\t\t\tscrollPosition = textarea.scrollTop;\n\t\t\t\tif (document.selection) {\n\t\t\t\t\tselection = document.selection.createRange().text;\n\t\t\t\t\tif (browser.msie) { // ie\n\t\t\t\t\t\tvar range = document.selection.createRange(), rangeCopy = range.duplicate();\n\t\t\t\t\t\trangeCopy.moveToElementText(textarea);\n\t\t\t\t\t\tcaretPosition = -1;\n\t\t\t\t\t\twhile(rangeCopy.inRange(range)) {\n\t\t\t\t\t\t\trangeCopy.moveStart('character');\n\t\t\t\t\t\t\tcaretPosition ++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else { // opera\n\t\t\t\t\t\tcaretPosition = textarea.selectionStart;\n\t\t\t\t\t}\n\t\t\t\t} else { // gecko & webkit\n\t\t\t\t\tcaretPosition = textarea.selectionStart;\n\n\t\t\t\t\tselection = textarea.value.substring(caretPosition, textarea.selectionEnd);\n\t\t\t\t} \n\t\t\t\treturn selection;\n\t\t\t}\n\n\t\t\t// open preview window\n\t\t\tfunction preview() {\n\t\t\t\tif (typeof options.previewHandler === 'function') {\n\t\t\t\t\tpreviewWindow = true;\n\t\t\t\t} else if (options.previewInElement) {\n\t\t\t\t\tpreviewWindow = $(options.previewInElement);\n\t\t\t\t} else if (!previewWindow || previewWindow.closed) {\n\t\t\t\t\tif (options.previewInWindow) {\n\t\t\t\t\t\tpreviewWindow = window.open('', 'preview', options.previewInWindow);\n\t\t\t\t\t\t$(window).unload(function() {\n\t\t\t\t\t\t\tpreviewWindow.close();\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tiFrame = $('<iframe class=\"markItUpPreviewFrame\"></iframe>');\n\t\t\t\t\t\tif (options.previewPosition == 'after') {\n\t\t\t\t\t\t\tiFrame.insertAfter(footer);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tiFrame.insertBefore(header);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\tpreviewWindow = iFrame[iFrame.length - 1].contentWindow || frame[iFrame.length - 1];\n\t\t\t\t\t}\n\t\t\t\t} else if (altKey === true) {\n\t\t\t\t\tif (iFrame) {\n\t\t\t\t\t\tiFrame.remove();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpreviewWindow.close();\n\t\t\t\t\t}\n\t\t\t\t\tpreviewWindow = iFrame = false;\n\t\t\t\t}\n\t\t\t\tif (!options.previewAutoRefresh) {\n\t\t\t\t\trefreshPreview(); \n\t\t\t\t}\n\t\t\t\tif (options.previewInWindow) {\n\t\t\t\t\tpreviewWindow.focus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// refresh Preview window\n\t\t\tfunction refreshPreview() {\n \t\t\t\trenderPreview();\n\t\t\t}\n\n\t\t\tfunction renderPreview() {\n\t\t\t\tvar phtml;\n\t\t\t\tif (options.previewHandler && typeof options.previewHandler === 'function') {\n\t\t\t\t\toptions.previewHandler( $$.val() );\n\t\t\t\t} else if (options.previewParser && typeof options.previewParser === 'function') {\n\t\t\t\t\tvar data = options.previewParser( $$.val() );\n\t\t\t\t\twriteInPreview(localize(data, 1) ); \n\t\t\t\t} else if (options.previewParserPath !== '') {\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\tdataType: 'text',\n\t\t\t\t\t\tglobal: false,\n\t\t\t\t\t\turl: options.previewParserPath,\n\t\t\t\t\t\tdata: options.previewParserVar+'='+encodeURIComponent($$.val()),\n\t\t\t\t\t\tsuccess: function(data) {\n\t\t\t\t\t\t\twriteInPreview( localize(data, 1) ); \n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tif (!template) {\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\turl: options.previewTemplatePath,\n\t\t\t\t\t\t\tdataType: 'text',\n\t\t\t\t\t\t\tglobal: false,\n\t\t\t\t\t\t\tsuccess: function(data) {\n\t\t\t\t\t\t\t\twriteInPreview( localize(data, 1).replace(/<!-- content -->/g, $$.val()) );\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\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tfunction writeInPreview(data) {\n\t\t\t\tif (options.previewInElement) {\n\t\t\t\t\t$(options.previewInElement).html(data);\n\t\t\t\t} else if (previewWindow && previewWindow.document) {\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsp = previewWindow.document.documentElement.scrollTop\n\t\t\t\t\t} catch(e) {\n\t\t\t\t\t\tsp = 0;\n\t\t\t\t\t}\t\n\t\t\t\t\tpreviewWindow.document.open();\n\t\t\t\t\tpreviewWindow.document.write(data);\n\t\t\t\t\tpreviewWindow.document.close();\n\t\t\t\t\tpreviewWindow.document.documentElement.scrollTop = sp;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// set keys pressed\n\t\t\tfunction keyPressed(e) { \n\t\t\t\tshiftKey = e.shiftKey;\n\t\t\t\taltKey = e.altKey;\n\t\t\t\tctrlKey = (!(e.altKey && e.ctrlKey)) ? (e.ctrlKey || e.metaKey) : false;\n\n\t\t\t\tif (e.type === 'keydown') {\n\t\t\t\t\tif (ctrlKey === true) {\n\t\t\t\t\t\tli = $('a[accesskey=\"'+((e.keyCode == 13) ? '\\\\n' : String.fromCharCode(e.keyCode))+'\"]', header).parent('li');\n\t\t\t\t\t\tif (li.length !== 0) {\n\t\t\t\t\t\t\tctrlKey = false;\n\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\tli.triggerHandler('mouseup');\n\t\t\t\t\t\t\t},1);\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (e.keyCode === 13 || e.keyCode === 10) { // Enter key\n\t\t\t\t\t\tif (ctrlKey === true) {  // Enter + Ctrl\n\t\t\t\t\t\t\tctrlKey = false;\n\t\t\t\t\t\t\tmarkup(options.onCtrlEnter);\n\t\t\t\t\t\t\treturn options.onCtrlEnter.keepDefault;\n\t\t\t\t\t\t} else if (shiftKey === true) { // Enter + Shift\n\t\t\t\t\t\t\tshiftKey = false;\n\t\t\t\t\t\t\tmarkup(options.onShiftEnter);\n\t\t\t\t\t\t\treturn options.onShiftEnter.keepDefault;\n\t\t\t\t\t\t} else { // only Enter\n\t\t\t\t\t\t\tmarkup(options.onEnter);\n\t\t\t\t\t\t\treturn options.onEnter.keepDefault;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (e.keyCode === 9) { // Tab key\n\t\t\t\t\t\tif (shiftKey == true || ctrlKey == true || altKey == true) {\n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (caretOffset !== -1) {\n\t\t\t\t\t\t\tget();\n\t\t\t\t\t\t\tcaretOffset = $$.val().length - caretOffset;\n\t\t\t\t\t\t\tset(caretOffset, 0);\n\t\t\t\t\t\t\tcaretOffset = -1;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmarkup(options.onTab);\n\t\t\t\t\t\t\treturn options.onTab.keepDefault;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction remove() {\n\t\t\t\t$$.unbind(\".markItUp\").removeClass('markItUpEditor');\n\t\t\t\t$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);\n\t\t\t\t$$.data('markItUp', null);\n\t\t\t}\n\n\t\t\tinit();\n\t\t});\n\t};\n\n\t$.fn.markItUpRemove = function() {\n\t\treturn this.each(function() {\n\t\t\t\t$(this).markItUp('remove');\n\t\t\t}\n\t\t);\n\t};\n\n\t$.markItUp = function(settings) {\n\t\tvar options = { target:false };\n\t\t$.extend(options, settings);\n\t\tif (options.target) {\n\t\t\treturn $(options.target).each(function() {\n\t\t\t\t$(this).focus();\n\t\t\t\t$(this).trigger('insertion', [options]);\n\t\t\t});\n\t\t} else {\n\t\t\t$('textarea').trigger('insertion', [options]);\n\t\t}\n\t};\n})(jQuery);\n"
  },
  {
    "path": "plugins/markitup/markitup/sets/html/set.js",
    "content": "// ----------------------------------------------------------------------------\n// markItUp!\n// ----------------------------------------------------------------------------\n// Copyright (C) 2008 Jay Salvat\n// http://markitup.jaysalvat.com/\n// ----------------------------------------------------------------------------\n// Html tags\n// http://en.wikipedia.org/wiki/html\n// ----------------------------------------------------------------------------\n// Basic set. Feel free to add more tags\n// ----------------------------------------------------------------------------\nmySettings = {\n\tonShiftEnter:\t{keepDefault:false, replaceWith:'<br>\\n'},\n\tonCtrlEnter:\t{keepDefault:false, openWith:'\\n<p>', closeWith:'</p>\\n'},\n\tonTab:\t\t\t{keepDefault:false, openWith:'\t '},\n\tmarkupSet: [\n\t\t{name:'Heading 1', key:'1', openWith:'<h1(!( class=\"[![Class]!]\")!)>', closeWith:'</h1>', placeHolder:'Your title here...' },\n\t\t{name:'Heading 2', key:'2', openWith:'<h2(!( class=\"[![Class]!]\")!)>', closeWith:'</h2>', placeHolder:'Your title here...' },\n\t\t{name:'Heading 3', key:'3', openWith:'<h3(!( class=\"[![Class]!]\")!)>', closeWith:'</h3>', placeHolder:'Your title here...' },\n\t\t{name:'Heading 4', key:'4', openWith:'<h4(!( class=\"[![Class]!]\")!)>', closeWith:'</h4>', placeHolder:'Your title here...' },\n\t\t{name:'Heading 5', key:'5', openWith:'<h5(!( class=\"[![Class]!]\")!)>', closeWith:'</h5>', placeHolder:'Your title here...' },\n\t\t{name:'Heading 6', key:'6', openWith:'<h6(!( class=\"[![Class]!]\")!)>', closeWith:'</h6>', placeHolder:'Your title here...' },\n\t\t{name:'Paragraph', openWith:'<p(!( class=\"[![Class]!]\")!)>', closeWith:'</p>' },\n\t\t{separator:'---------------' },\n\t\t{name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)' },\n\t\t{name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)' },\n\t\t{name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>' },\n\t\t{separator:'---------------' },\n\t\t{name:'Ul', openWith:'<ul>\\n', closeWith:'</ul>\\n' },\n\t\t{name:'Ol', openWith:'<ol>\\n', closeWith:'</ol>\\n' },\n\t\t{name:'Li', openWith:'<li>', closeWith:'</li>' },\n\t\t{separator:'---------------' },\n\t\t{name:'Picture', key:'P', replaceWith:'<img src=\"[![Source:!:http://]!]\" alt=\"[![Alternative text]!]\" />' },\n\t\t{name:'Link', key:'L', openWith:'<a href=\"[![Link:!:http://]!]\"(!( title=\"[![Title]!]\")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },\n\t\t{name:'Colors', className:'palette', dropMenu: [\n\t\t\t\t{name:'Yellow',\topenWith:'<span style=\"color:#FCE94F\">', closeWith:'</span>', className:\"col1-1\" },\n\t\t\t\t{name:'Yellow',\topenWith:'<span style=\"color:#EDD400\">', closeWith:'</span>', className:\"col1-2\" },\n\t\t\t\t{name:'Yellow', openWith:'<span style=\"color:#C4A000\">', closeWith:'</span>', className:\"col1-3\" },\n\t\t\t\t\n\t\t\t\t{name:'Orange', openWith:'<span style=\"color:#FCAF3E\">', closeWith:'</span>', className:\"col2-1\" },\n\t\t\t\t{name:'Orange', openWith:'<span style=\"color:#F57900\">', closeWith:'</span>', className:\"col2-2\" },\n\t\t\t\t{name:'Orange', openWith:'<span style=\"color:#CE5C00\">', closeWith:'</span>', className:\"col2-3\" },\n\t\t\t\t\n\t\t\t\t{name:'Brown', \topenWith:'<span style=\"color:#E9B96E\">', closeWith:'</span>', className:\"col3-1\" },\n\t\t\t\t{name:'Brown', \topenWith:'<span style=\"color:#C17D11\">', closeWith:'</span>', className:\"col3-2\" },\n\t\t\t\t{name:'Brown',\topenWith:'<span style=\"color:#8F5902\">', closeWith:'</span>', className:\"col3-3\" },\n\t\t\t\t\n\t\t\t\t{name:'Green', \topenWith:'<span style=\"color:#8AE234\">', closeWith:'</span>', className:\"col4-1\" },\n\t\t\t\t{name:'Green', \topenWith:'<span style=\"color:#73D216\">', closeWith:'</span>', className:\"col4-2\" },\n\t\t\t\t{name:'Green',\topenWith:'<span style=\"color:#4E9A06\">', closeWith:'</span>', className:\"col4-3\" },\n\t\t\t\t\n\t\t\t\t{name:'Blue', \topenWith:'<span style=\"color:#729FCF\">', closeWith:'</span>',\tclassName:\"col5-1\" },\n\t\t\t\t{name:'Blue', \topenWith:'<span style=\"color:#3465A4\">', closeWith:'</span>',\tclassName:\"col5-2\" },\n\t\t\t\t{name:'Blue',\topenWith:'<span style=\"color:#204A87\">', closeWith:'</span>',\tclassName:\"col5-3\" },\n\t\n\t\t\t\t{name:'Purple', openWith:'<span style=\"color:#AD7FA8\">', closeWith:'</span>',\tclassName:\"col6-1\" },\n\t\t\t\t{name:'Purple', openWith:'<span style=\"color:#75507B\">', closeWith:'</span>',\tclassName:\"col6-2\" },\n\t\t\t\t{name:'Purple',\topenWith:'<span style=\"color:#5C3566\">', closeWith:'</span>',\tclassName:\"col6-3\" },\n\t\t\t\t\n\t\t\t\t{name:'Red', \topenWith:'<span style=\"color:#EF2929\">', closeWith:'</span>',\tclassName:\"col7-1\" },\n\t\t\t\t{name:'Red', \topenWith:'<span style=\"color:#CC0000\">', closeWith:'</span>',\tclassName:\"col7-2\" },\n\t\t\t\t{name:'Red',\topenWith:'<span style=\"color:#A40000\">', closeWith:'</span>',\tclassName:\"col7-3\" },\n\t\t\t\t\n\t\t\t\t{name:'Gray', \topenWith:'<span style=\"color:#FFFFFF\">', closeWith:'</span>',\tclassName:\"col8-1\" },\n\t\t\t\t{name:'Gray', \topenWith:'<span style=\"color:#D3D7CF\">', closeWith:'</span>',\tclassName:\"col8-2\" },\n\t\t\t\t{name:'Gray',\topenWith:'<span style=\"color:#BABDB6\">', closeWith:'</span>',\tclassName:\"col8-3\" },\n\t\t\t\t\n\t\t\t\t{name:'Gray', \topenWith:'<span style=\"color:#888A85\">', closeWith:'</span>',\tclassName:\"col9-1\" },\n\t\t\t\t{name:'Gray', \topenWith:'<span style=\"color:#555753\">', closeWith:'</span>',\tclassName:\"col9-2\" },\n\t\t\t\t{name:'Gray',\topenWith:'<span style=\"color:#000000\">', closeWith:'</span>',\tclassName:\"col9-3\" }\n\t\t\t]\n\t\t},\n\t\t{separator:'---------------' },\n\t\t{name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, \"\") } },\n\t\t{name:'Preview', className:'preview', call:'preview' }\n\t]\n}"
  },
  {
    "path": "plugins/markitup/markitup/sets/html/style.css",
    "content": "/* -------------------------------------------------------------------\n// markItUp!\n// By Jay Salvat - http://markitup.jaysalvat.com/\n// ------------------------------------------------------------------*/\n.markItUp .markItUpButton1 a {\n\tbackground-image:url(images/h1.png); \n}\n.markItUp .markItUpButton2 a {\n\tbackground-image:url(images/h2.png); \n}\n.markItUp .markItUpButton3 a {\n\tbackground-image:url(images/h3.png); \n}\n.markItUp .markItUpButton4 a {\n\tbackground-image:url(images/h4.png); \n}\n.markItUp .markItUpButton5 a {\n\tbackground-image:url(images/h5.png); \n}\n.markItUp .markItUpButton6 a {\n\tbackground-image:url(images/h6.png); \n}\n.markItUp .markItUpButton7 a {\n\tbackground-image:url(images/paragraph.png); \n}\n\n.markItUp .markItUpButton8 a {\n\tbackground-image:url(images/bold.png);\n}\n.markItUp .markItUpButton9 a {\n\tbackground-image:url(images/italic.png);\n}\n.markItUp .markItUpButton10 a {\n\tbackground-image:url(images/stroke.png);\n}\n\n.markItUp .markItUpButton11 a {\n\tbackground-image:url(images/list-bullet.png);\n}\n.markItUp .markItUpButton12 a {\n\tbackground-image:url(images/list-numeric.png);\n}\n.markItUp .markItUpButton13 a {\n\tbackground-image:url(images/list-item.png);\n}\n\n.markItUp .markItUpButton14 a {\n\tbackground-image:url(images/picture.png); \n}\n.markItUp .markItUpButton15 a {\n\tbackground-image:url(images/link.png);\n}\n.markItUp .markItUpButton16 a {\n\tbackground-image:url(images/colors.png);\n}\n\n.markItUp .clean a {\n\tbackground-image:url(images/clean.png);\n}\n.markItUp .preview a {\n\tbackground-image:url(images/preview.png);\n}\n\n\n.markItUp .palette a {\n\tbackground-image:url(images/colors.png);\n}\n\t.markItUp .palette ul {\n\t\twidth:81px;\n\t\tpadding:1px;\t\n\t}\n\t.markItUp .palette  li {\n\t\tborder:1px solid white;\n\t\twidth:25px;\theight:25px;\n\t\toverflow:hidden;\n\t\tpadding:0px; margin:0px;\n\t\tfloat:left;\n\t}\n\t.markItUp .palette ul a {\n\t\twidth:25px;\theight:25px;\n\t}\n\t.markItUp .palette ul a:hover {\n\t\tbackground-color:none;\n\t}\n\t\n\t.markItUp .palette .col1-1 a {\n\t\tbackground:#FCE94F;\n\t}\n\t.markItUp .palette .col1-2 a {\n\t\tbackground:#EDD400;\n\t}\n\t.markItUp .palette .col1-3 a {\n\t\tbackground:#C4A000;\n\t}\n\t\n\t.markItUp .palette .col2-1 a {\n\t\tbackground:#FCAF3E;\n\t}\n\t.markItUp .palette .col2-2 a {\n\t\tbackground:#F57900;\n\t}\n\t.markItUp .palette .col2-3 a {\n\t\tbackground:#CE5C00;\n\t}\n\t\n\t.markItUp .palette .col3-1 a {\n\t\tbackground:#E9B96E;\n\t}\n\t.markItUp .palette .col3-2 a {\n\t\tbackground:#C17D11;\n\t}\n\t.markItUp .palette .col3-3 a {\n\t\tbackground:#8F5902;\n\t}\n\t\n\t.markItUp .palette .col4-1 a {\n\t\tbackground:#8AE234;\n\t}\n\t.markItUp .palette .col4-2 a {\n\t\tbackground:#73D216;\n\t}\n\t.markItUp .palette .col4-3 a {\n\t\tbackground:#4E9A06;\n\t}\n\t\t\t\t\t\t\t\t\n\t.markItUp .palette .col5-1 a {\n\t\tbackground:#729FCF;\n\t}\n\t.markItUp .palette .col5-2 a {\n\t\tbackground:#3465A4;\n\t}\n\t.markItUp .palette .col5-3 a {\n\t\tbackground:#204A87;\n\t}\n\n\t.markItUp .palette .col6-1 a {\n\t\tbackground:#AD7FA8;\n\t}\n\t.markItUp .palette .col6-2 a {\n\t\tbackground:#75507B;\n\t}\n\t.markItUp .palette .col6-3 a {\n\t\tbackground:#5C3566;\n\t}\n\t\n\t.markItUp .palette .col7-1 a {\n\t\tbackground:#EF2929;\n\t}\n\t.markItUp .palette .col7-2 a {\n\t\tbackground:#CC0000;\n\t}\n\t.markItUp .palette .col7-3 a {\n\t\tbackground:#A40000;\n\t}\n\t\n\t.markItUp .palette .col8-1 a {\n\t\tbackground:#FFFFFF;\n\t}\n\t.markItUp .palette .col8-2 a {\n\t\tbackground:#D3D7CF;\n\t}\n\t.markItUp .palette .col8-3 a {\n\t\tbackground:#BABDB6;\n\t}\n\t\n\t.markItUp .palette .col9-1 a {\n\t\tbackground:#888A85;\n\t}\n\t.markItUp .palette .col9-2 a {\n\t\tbackground:#555753;\n\t}\n\t.markItUp .palette .col9-3 a {\n\t\tbackground:#000000;\n\t}\n"
  },
  {
    "path": "plugins/markitup/markitup/skins/simple/style.css",
    "content": "/* -------------------------------------------------------------------\n// markItUp! Universal MarkUp Engine, JQuery plugin\n// By Jay Salvat - http://markitup.jaysalvat.com/\n// ------------------------------------------------------------------*/\n.markItUp * {\n\tmargin:0px; padding:0px;\n\toutline:none;\n}\n.markItUp a:link,\n.markItUp a:visited {\n\tcolor:#000;\n\ttext-decoration:none;\n}\n.markItUp  {\n\twidth:100%;\n\tmargin:5px 0 5px 0;\n}\n.markItUpContainer  {\n\tfont:11px Verdana, Arial, Helvetica, sans-serif;\n}\n.markItUpEditor {\n\tfont:12px 'Courier New', Courier, monospace;\n\tpadding:5px;\n\twidth:100%;\n\theight:320px;\n\tclear:both;\n\tline-height:18px;\n\toverflow:auto;\n}\n.markItUpPreviewFrame\t{\n\toverflow:auto;\n\tbackground-color:#FFF;\n\twidth:99.9%;\n\theight:300px;\n\tmargin:5px 0;\n\tborder:1px solid #ccc;\n}\n.markItUpFooter {\n\twidth:100%;\n}\n.markItUpResizeHandle {\n\toverflow:hidden;\n\twidth:22px; height:5px;\n\tmargin-left:auto;\n\tmargin-right:auto;\n\tbackground-image:url(images/handle.png);\n\tcursor:n-resize;\n}\n/***************************************************************************************/\n/* first row of buttons */\n.markItUpHeader ul li\t{\n\tlist-style:none;\n\tfloat:left;\n\tposition:relative;\n}\n.markItUpHeader ul li:hover > ul{\n\tdisplay:block;\n}\n.markItUpHeader ul .markItUpDropMenu {\n\tbackground:transparent url(images/menu.png) no-repeat 115% 50%;\n\tmargin-right:5px;\n}\n.markItUpHeader ul .markItUpDropMenu li {\n\tmargin-right:0px;\n}\n/* next rows of buttons */\n.markItUpHeader ul ul {\n\tdisplay:none;\n\tposition:absolute;\n\ttop:18px; left:0px;\t\n\tbackground:#FFF;\n\tborder:1px solid #000;\n}\n.markItUpHeader ul ul li {\n\tfloat:none;\n\tborder-bottom:1px solid #000;\n}\n.markItUpHeader ul ul .markItUpDropMenu {\n\tbackground:#FFF url(images/submenu.png) no-repeat 100% 50%;\n}\n.markItUpHeader ul .markItUpSeparator {\n\tmargin:0 10px;\n\twidth:1px;\n\theight:16px;\n\toverflow:hidden;\n\tbackground-color:#CCC;\n}\n.markItUpHeader ul ul .markItUpSeparator {\n\twidth:auto; height:1px;\n\tmargin:0px;\n}\n/* next rows of buttons */\n.markItUpHeader ul ul ul {\n\tposition:absolute;\n\ttop:-1px; left:150px; \n}\n.markItUpHeader ul ul ul li {\n\tfloat:none;\n}\n.markItUpHeader ul a {\n\tdisplay:block;\n\twidth:16px; height:16px;\n\ttext-indent:-10000px;\n\tbackground-repeat:no-repeat;\n\tpadding:3px;\n\tmargin:0px;\n}\n.markItUpHeader ul ul a {\n\tdisplay:block;\n\tpadding-left:0px;\n\ttext-indent:0;\n\twidth:120px; \n\tpadding:5px 5px 5px 25px;\n\tbackground-position:2px 50%;\n}\n.markItUpHeader ul ul a:hover  {\n\tcolor:#FFF;\n\tbackground-color:#000;\n}\n"
  },
  {
    "path": "plugins/markitup/markitup/templates/preview.css",
    "content": "/* preview style examples */\nbody { background-color:#fff; font:100% \"Helvetica Neue\", Helvetica, Arial, sans-serif; }"
  },
  {
    "path": "plugins/markitup/markitup/templates/preview.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>markItUp! preview template</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"~/templates/preview.css\" />\n</head>\n<body>\n<!-- content -->\n</body>\n</html>\n"
  },
  {
    "path": "plugins/markitup/markitup.plugin.php",
    "content": "<?php\n\n/**\n *\tMarkItUp! plugin\n *\n *\t@package Monstra\n *  @subpackage Plugins\n *\t@author Romanenko Sergey / Awilum\n *\t@copyright 2012-2014 Romanenko Sergey / Awilum\n *\t@version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('MarkItUp!', 'markitup'),\n                __('MarkItUp! universal markup jQuery editor', 'markitup'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/');\n\n// Add hooks\nAction::add('admin_header', 'MarkItUp::headers');\n\n/**\n * MarkItUp Class\n */\nclass MarkItUp\n{\n    /**\n     * Set editor headers\n     */\n    public static function headers()\n    {\n        echo ('\n            <!-- markItUp! 1.1.13 -->\n            <script type=\"text/javascript\" src=\"'.Option::get('siteurl').'/plugins/markitup/markitup/jquery.markitup.js\"></script>\n            <!-- markItUp! toolbar settings -->\n            <script type=\"text/javascript\" src=\"'.Option::get('siteurl').'/plugins/markitup/markitup/sets/html/set.js\"></script>\n            <!-- markItUp! skin -->\n            <link rel=\"stylesheet\" type=\"text/css\" href=\"'.Option::get('siteurl').'/plugins/markitup/markitup/skins/simple/style.css\" />\n            <!--  markItUp! toolbar skin -->\n            <link rel=\"stylesheet\" type=\"text/css\" href=\"'.Option::get('siteurl').'/plugins/markitup/markitup/sets/html/style.css\" />\n        ');\n\n        echo ('<script>$(document).ready(function(){$(\"#editor_area\").markItUp(mySettings);});</script>');\n    }\n\n}\n"
  },
  {
    "path": "plugins/sandbox/install/sandbox.install.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n// Add New Options\nOption::add('sandbox', 'sandbox test value');\nOption::add('sandbox_template', 'index');\n"
  },
  {
    "path": "plugins/sandbox/install/sandbox.manifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n    <plugin_location>plugins/sandbox/sandbox.plugin.php</plugin_location>\n    <plugin_status>active</plugin_status>\n    <plugin_priority>15</plugin_priority>\n    <plugin_name>Sandbox</plugin_name>\n    <plugin_description>Sandbox plugin for Monstra</plugin_description>\n    <plugin_version>1.0.0</plugin_version>\n    <plugin_author>Awilum</plugin_author>\n    <plugin_author_uri>http://monstra.org/</plugin_author_uri>\n</root>"
  },
  {
    "path": "plugins/sandbox/install/sandbox.uninstall.php",
    "content": "<?php defined('MONSTRA_ACCESS') or die('No direct script access.');\n\n// Delete Options\nOption::delete('sandbox');\nOption::delete('sandbox_template');\n"
  },
  {
    "path": "plugins/sandbox/languages/cs.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Sandbox plugin pro Monstra',\n            'Sandbox template' => 'Sandbox téma',\n            'Save' => 'Uložit',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/de.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Sandbox Plugin für Monstra',\n            'Sandbox template' => 'Sandbox Template',\n            'Save' => 'Speichern',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/en.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Sandbox plugin for Monstra',\n            'Sandbox template' => 'Sandbox template',\n            'Save' => 'Save',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/es.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Sandbox plugin for Monstra',\n            'Sandbox template' => 'Plantilla sandbox',\n            'Save' => 'Guardar',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/fa.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'سندباکس',\n            'Sandbox plugin for Monstra' => 'پلاگین سندباکس برای مونسترا',\n            'Sandbox template' => 'قالب سندباکس',\n            'Save' => 'ذخیره',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/fr.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Plugin Sandbox pour Monstra',\n            'Sandbox template' => 'Modèle Sandbox',\n            'Save' => 'Enregistrer',\n        ) \n    );"
  },
  {
    "path": "plugins/sandbox/languages/id.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Plugin Sandbox untuk Monstra',\n            'Sandbox template' => 'Template Sandbox',\n            'Save' => 'Simpan',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/it.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Plugin Sandbox per Monstra',\n            'Sandbox template' => 'Modello Sandbox',\n            'Save' => 'Salva',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/ka-ge.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Sandbox-ის პლაგინი Monstra-თვის',\n            'Sandbox template' => 'Sandbox-ის ნიმუში',\n            'Save' => 'შენახვა',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/lt.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Sandbox papildinys',\n            'Sandbox template' => 'Sandbox šablonas',\n            'Save' => 'Išsaugoti',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/nl.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Sandbox Plugin voor Monstra',\n            'Sandbox template' => 'Sandbox Template',\n            'Save' => 'Opslaan',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/pl.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Wtyczka Sandbox dla systemu Monstra',\n            'Sandbox template' => 'Szablon Sandbox',\n            'Save' => 'Zapisz',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/pt-br.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Caixa de Areia',\n            'Sandbox plugin for Monstra' => 'Plugin Caixa de Areia para o Monstra CMS',\n            'Sandbox template' => 'Template da caixa de areia',\n            'Save' => 'Salvar',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/ru.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Песочница',\n            'Sandbox plugin for Monstra' => 'Плагин песочница для Monstra',\n            'Sandbox template' => 'Шаблон песочницы',\n            'Save' => 'Сохранить',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/sk.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Sandbox plugin pre Monstra',\n            'Sandbox template' => 'Sandbox téma',\n            'Save' => 'Uložiť',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/sr.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Sandbox',\n            'Sandbox plugin for Monstra' => 'Sandbox dodatak za Monstra',\n            'Sandbox template' => 'Sandbox šablon',\n            'Save' => 'Sačuvaj',\n        ) \n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/tr.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Deneme',\n            'Sandbox plugin for Monstra' => 'Monstra için deneme/test eklentisi',\n            'Sandbox template' => 'Deneme şablonu',\n            'Save' => 'Kaydet',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/uk.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => 'Пісочниця',\n            'Sandbox plugin for Monstra' => 'Плагін пісочниця для Monstra',\n            'Sandbox template' => 'Шаблон пісочниці',\n            'Save' => 'Зберегти',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/languages/zh-cn.lang.php",
    "content": "<?php\n\n    return array(\n        'sandbox' => array(\n            'Sandbox' => '沙盒',\n            'Sandbox plugin for Monstra' => 'Monstra 沙盒插件',\n            'Sandbox template' => '沙盒模板',\n            'Save' => '保存',\n        )\n    );\n"
  },
  {
    "path": "plugins/sandbox/sandbox.admin.php",
    "content": "<?php\n\n// Admin Navigation: add new item\nNavigation::add(__('Sandbox', 'sandbox'), 'content', 'sandbox', 10);\n\n// Add actions\nAction::add('admin_themes_extra_index_template_actions','SandboxAdmin::formComponent');\nAction::add('admin_themes_extra_actions','SandboxAdmin::formComponentSave');\n\n/**\n * Sandbox admin class\n */\nclass SandboxAdmin extends Backend\n{\n    /**\n     * Main Sandbox admin function\n     */\n    public static function main()\n    {\n        //\n        // Do something here...\n        //\n\n        // Check for get actions\n        // -------------------------------------\n        if (Request::get('action')) {\n\n            // Switch actions\n            // -------------------------------------\n            switch (Request::get('action')) {\n\n                // Plugin action\n                // -------------------------------------\n                case \"add\":\n                    //\n                    // Do something here...\n                    //\n                break;\n\n                // Plugin action\n                // -------------------------------------\n                case \"delete\":\n                    //\n                    // Do something here...\n                    //\n                break;\n            }\n\n        } else {\n\n            // Display view\n            View::factory('sandbox/views/backend/index')->display();\n        }\n\n    }\n\n    /**\n     * Form Component Save\n     */\n    public static function formComponentSave()\n    {\n        if (Request::post('sandbox_component_save')) {\n            if (Security::check(Request::post('csrf'))) {\n                Option::update('sandbox_template', Request::post('sandbox_form_template'));\n                Request::redirect('index.php?id=themes');\n            }\n        }\n    }\n\n    /**\n     * Form Component\n     */\n    public static function formComponent()\n    {\n        $_templates = Themes::getTemplates();\n        foreach ($_templates as $template) {\n            $templates[basename($template, '.template.php')] = basename($template, '.template.php');\n        }\n\n        echo (\n            '<div class=\"col-xs-3\">'.\n            Form::open().\n            Form::hidden('csrf', Security::token()).\n            Form::label('sandbox_form_template', __('Sandbox template', 'sandbox')).\n            Form::select('sandbox_form_template', $templates, Option::get('sandbox_template'), array('class' => 'form-control')).\n            Html::br().\n            Form::submit('sandbox_component_save', __('Save', 'sandbox'), array('class' => 'btn btn-default')).\n            Form::close().\n            '</div>'\n        );\n    }\n\n}\n"
  },
  {
    "path": "plugins/sandbox/sandbox.plugin.php",
    "content": "<?php\n\n/**\n *  Sandbox plugin\n *\n *  @package Monstra\n *  @subpackage Plugins\n *  @author Romanenko Sergey / Awilum\n *  @copyright 2012-2014 Romanenko Sergey / Awilum\n *  @version 1.0.0\n *\n */\n\n// Register plugin\nPlugin::register( __FILE__,\n                __('Sandbox', 'sandbox'),\n                __('Sandbox plugin for Monstra', 'sandbox'),\n                '1.0.0',\n                'Awilum',\n                'http://monstra.org/',\n                'sandbox');\n\n// Load Sandbox Admin for Editor and Admin\nif (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {\n\n    Plugin::admin('sandbox');\n\n}\n\n/**\n * Sandbox class\n */\nclass Sandbox extends Frontend\n{\n    /**\n     * Sandbox main function\n     */\n    public static function main()\n    {\n        // Do something...\n    }\n\n    /**\n     * Set Sandbox title\n     */\n    public static function title()\n    {\n        return 'Sandbox title';\n    }\n\n    /**\n     * Set Sandbox keywords\n     */\n    public static function keywords()\n    {\n        return 'Sandbox keywords';\n    }\n\n    /**\n     * Set Sandbox description\n     */\n    public static function description()\n    {\n        return 'Sandbox description';\n    }\n\n    /**\n     * Set Sandbox content\n     */\n    public static function content()\n    {\n        return 'Sandbox content';\n    }\n\n    /**\n     * Set Sandbox template\n     */\n    public static function template()\n    {\n        return 'index';\n    }\n}\n"
  },
  {
    "path": "plugins/sandbox/views/backend/index.view.php",
    "content": "Sandbox backend view\n"
  },
  {
    "path": "plugins/sandbox/views/frontend/index.view.php",
    "content": "Sandbox frontend view\n"
  },
  {
    "path": "robots.txt",
    "content": "User-agent: *\nDisallow: /admin/\nDisallow: /engine/\nDisallow: /libraries/\nDisallow: /plugins/"
  },
  {
    "path": "rss.php",
    "content": "<?php\ndefine('DS', DIRECTORY_SEPARATOR);\ndefine('ROOT', rtrim(dirname(__FILE__), '\\\\/'));\ndefine('BACKEND', false);\ndefine('MONSTRA_ACCESS', true);\n\n// Load bootstrap file\nrequire_once(ROOT . DS . 'engine' . DS . '_init.php');\n\n// Get all posts for blog parent page/post\n$posts = Pages::$pages->select('[parent=\"'.Blog::$parent_page_name.'\" and status=\"published\"]', 5, 0, array('slug', 'title', 'author', 'date'), 'date', 'DESC');\n\n// Date now\n$now = date(\"D, d M Y H:i:s T\");\nob_end_clean();\n?>\n<?php header('Content-type: text/xml; charset=\"utf-8\"'); ?>\n<?php echo'<?xml version=\"1.0\" encoding=\"utf-8\"?>'.\"\\n\"; ?>\n<rss version=\"2.0\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:wfw=\"http://wellformedweb.org/CommentAPI/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n<channel>\n<title>MonstraCMS::BLOG::RSS</title>\n<link><?php echo Option::get('siteurl'); ?>/blog</link>\n<description>The latest updates for <?php echo Option::get('sitename'); ?>.</description>\n<language>en-us</language>\n<pubDate><?php echo $now; ?></pubDate>\n<lastBuildDate><?php echo $now; ?></lastBuildDate>\n<atom:link href=\"<?php echo Option::get('siteurl'); ?>/rss.php\" rel=\"self\" type=\"application/rss+xml\" />\n<generator>Monstra</generator>\n<?php foreach ($posts as $post) { ?>\n<item>\n<title><?php echo $post['title']; ?></title>\n<link><?php echo Option::get('siteurl').'/blog/'.$post['slug']; ?></link>\n<guid><?php echo Option::get('siteurl').'/blog/'.$post['slug']; ?></guid>\n<pubDate><?php echo Date::format($post['date'], 'd M Y'); ?></pubDate>\n<description><![CDATA[<?php echo Text::toHtml(Text::cut(File::getContent(STORAGE . DS . 'pages' . DS . $post['id'] . '.page.txt'), 300)); ?>]]></description>\n<author><?php echo $post['author']; ?></author>\n</item>\n<?php } ?>\n</channel>\n</rss>\n"
  }
]