Repository: monstra-cms/monstra
Branch: dev
Commit: 5f6573facc11
Files: 540
Total size: 1.5 MB
Directory structure:
gitextract_7f0ld_nn/
├── .gitignore
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── admin/
│ ├── index.php
│ └── themes/
│ └── default/
│ ├── css/
│ │ └── default.css
│ ├── index.template.php
│ ├── js/
│ │ └── default.js
│ └── login.template.php
├── boot/
│ └── defines.php
├── engine/
│ ├── Alert.php
│ ├── Monstra.php
│ ├── Option.php
│ ├── Plugin/
│ │ ├── Action.php
│ │ ├── Backend.php
│ │ ├── Filter.php
│ │ ├── Frontend.php
│ │ ├── I18n.php
│ │ ├── Javascript.php
│ │ ├── Navigation.php
│ │ ├── Plugin.php
│ │ ├── Stylesheet.php
│ │ └── View.php
│ ├── Security.php
│ ├── Shortcode.php
│ ├── Site.php
│ ├── Uri.php
│ ├── Xmldb/
│ │ ├── DB.php
│ │ ├── Table.php
│ │ └── XML.php
│ ├── _init.php
│ └── boot/
│ ├── actions.php
│ ├── defines.php
│ ├── filters.php
│ └── shortcodes.php
├── index.php
├── install.php
├── libraries/
│ ├── Gelato/
│ │ ├── Agent/
│ │ │ └── Agent.php
│ │ ├── Arr/
│ │ │ └── Arr.php
│ │ ├── Cache/
│ │ │ └── Cache.php
│ │ ├── ClassLoader/
│ │ │ └── ClassLoader.php
│ │ ├── Cookie/
│ │ │ └── Cookie.php
│ │ ├── Curl/
│ │ │ └── Curl.php
│ │ ├── Date/
│ │ │ └── Date.php
│ │ ├── Debug/
│ │ │ └── Debug.php
│ │ ├── ErrorHandler/
│ │ │ ├── ErrorHandler.php
│ │ │ └── Resources/
│ │ │ └── Views/
│ │ │ └── Errors/
│ │ │ ├── exception.php
│ │ │ └── production.php
│ │ ├── FileSystem/
│ │ │ ├── Dir.php
│ │ │ └── File.php
│ │ ├── Form/
│ │ │ └── Form.php
│ │ ├── Gelato.php
│ │ ├── Html/
│ │ │ └── Html.php
│ │ ├── Http/
│ │ │ ├── Request.php
│ │ │ └── Response.php
│ │ ├── Image/
│ │ │ └── Image.php
│ │ ├── Inflector/
│ │ │ └── Inflector.php
│ │ ├── Log/
│ │ │ └── Log.php
│ │ ├── Minify/
│ │ │ ├── MinifyCSS.php
│ │ │ ├── MinifyHTML.php
│ │ │ └── MinifyJS.php
│ │ ├── Notification/
│ │ │ └── Notification.php
│ │ ├── Number/
│ │ │ └── Number.php
│ │ ├── README.md
│ │ ├── Registry/
│ │ │ └── Registry.php
│ │ ├── Security/
│ │ │ └── Token.php
│ │ ├── Session/
│ │ │ └── Session.php
│ │ ├── Text/
│ │ │ └── Text.php
│ │ ├── Url/
│ │ │ └── Url.php
│ │ ├── Validation/
│ │ │ └── Valid.php
│ │ ├── Zip/
│ │ │ └── Zip.php
│ │ ├── _logs/
│ │ │ └── .empty
│ │ ├── changelog.txt
│ │ └── license.txt
│ ├── Idiorm/
│ │ └── ORM.php
│ └── PHPMailer/
│ └── PHPMailer.php
├── plugins/
│ ├── box/
│ │ ├── backup/
│ │ │ ├── backup.admin.php
│ │ │ ├── backup.plugin.php
│ │ │ ├── install/
│ │ │ │ └── backup.manifest.xml
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── fa.lang.php
│ │ │ │ ├── fr.lang.php
│ │ │ │ ├── hu.lang.php
│ │ │ │ ├── id.lang.php
│ │ │ │ ├── it.lang.php
│ │ │ │ ├── ja.lang.php
│ │ │ │ ├── lt.lang.php
│ │ │ │ ├── nl.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── pt-br.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sk.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ ├── uk.lang.php
│ │ │ │ └── zh-cn.lang.php
│ │ │ └── views/
│ │ │ └── backend/
│ │ │ └── index.view.php
│ │ ├── blocks/
│ │ │ ├── blocks.admin.php
│ │ │ ├── blocks.plugin.php
│ │ │ ├── install/
│ │ │ │ └── blocks.manifest.xml
│ │ │ ├── js/
│ │ │ │ ├── .htaccess
│ │ │ │ └── blocks.js
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── fa.lang.php
│ │ │ │ ├── fr.lang.php
│ │ │ │ ├── hu.lang.php
│ │ │ │ ├── id.lang.php
│ │ │ │ ├── it.lang.php
│ │ │ │ ├── ja.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── lt.lang.php
│ │ │ │ ├── nl.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── pt-br.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sk.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ ├── uk.lang.php
│ │ │ │ └── zh-cn.lang.php
│ │ │ └── views/
│ │ │ └── backend/
│ │ │ ├── add.view.php
│ │ │ ├── edit.view.php
│ │ │ └── index.view.php
│ │ ├── dashboard/
│ │ │ ├── dashboard.admin.php
│ │ │ ├── dashboard.plugin.php
│ │ │ ├── install/
│ │ │ │ └── dashboard.manifest.xml
│ │ │ ├── js/
│ │ │ │ ├── .htaccess
│ │ │ │ └── ganalytics.js
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ └── uk.lang.php
│ │ │ └── views/
│ │ │ └── backend/
│ │ │ ├── ga.view.php
│ │ │ └── index.view.php
│ │ ├── editor/
│ │ │ ├── editor.plugin.php
│ │ │ ├── install/
│ │ │ │ └── editor.manifest.xml
│ │ │ └── languages/
│ │ │ ├── cs.lang.php
│ │ │ ├── de.lang.php
│ │ │ ├── en.lang.php
│ │ │ ├── es.lang.php
│ │ │ ├── fa.lang.php
│ │ │ ├── fr.lang.php
│ │ │ ├── hu.lang.php
│ │ │ ├── it.lang.php
│ │ │ ├── ja.lang.php
│ │ │ ├── ka-ge.lang.php
│ │ │ ├── lt.lang.php
│ │ │ ├── nl.lang.php
│ │ │ ├── pl.lang.php
│ │ │ ├── pt-br.lang.php
│ │ │ ├── ru.lang.php
│ │ │ ├── sk.lang.php
│ │ │ ├── sr.lang.php
│ │ │ ├── tr.lang.php
│ │ │ ├── uk.lang.php
│ │ │ └── zh-cn.lang.php
│ │ ├── emails/
│ │ │ ├── css/
│ │ │ │ ├── .htaccess
│ │ │ │ └── inc.css
│ │ │ ├── emails.admin.php
│ │ │ ├── emails.plugin.php
│ │ │ ├── install/
│ │ │ │ └── emails.manifest.xml
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ └── uk.lang.php
│ │ │ └── views/
│ │ │ ├── backend/
│ │ │ │ ├── edit.view.php
│ │ │ │ └── index.view.php
│ │ │ └── emails/
│ │ │ └── email_layout.view.php
│ │ ├── filesmanager/
│ │ │ ├── css/
│ │ │ │ ├── .htaccess
│ │ │ │ └── style.css
│ │ │ ├── filesmanager.admin.php
│ │ │ ├── filesmanager.plugin.php
│ │ │ ├── install/
│ │ │ │ └── filesmanager.manifest.xml
│ │ │ ├── js/
│ │ │ │ ├── .htaccess
│ │ │ │ ├── filesmanager.js
│ │ │ │ └── fileuploader.js
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── fa.lang.php
│ │ │ │ ├── fr.lang.php
│ │ │ │ ├── hu.lang.php
│ │ │ │ ├── id.lang.php
│ │ │ │ ├── it.lang.php
│ │ │ │ ├── ja.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── lt.lang.php
│ │ │ │ ├── nl.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── pt-br.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sk.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ ├── uk.lang.php
│ │ │ │ └── zh-cn.lang.php
│ │ │ └── views/
│ │ │ └── backend/
│ │ │ └── index.view.php
│ │ ├── information/
│ │ │ ├── information.admin.php
│ │ │ ├── information.plugin.php
│ │ │ ├── install/
│ │ │ │ └── information.manifest.xml
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── fa.lang.php
│ │ │ │ ├── fr.lang.php
│ │ │ │ ├── hu.lang.php
│ │ │ │ ├── id.lang.php
│ │ │ │ ├── it.lang.php
│ │ │ │ ├── ja.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── lt.lang.php
│ │ │ │ ├── nl.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── pt-br.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sk.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ ├── uk.lang.php
│ │ │ │ └── zh-cn.lang.php
│ │ │ └── views/
│ │ │ └── backend/
│ │ │ └── index.view.php
│ │ ├── menu/
│ │ │ ├── install/
│ │ │ │ └── menu.manifest.xml
│ │ │ ├── js/
│ │ │ │ ├── .htaccess
│ │ │ │ └── menu.js
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── fa.lang.php
│ │ │ │ ├── fr.lang.php
│ │ │ │ ├── hu.lang.php
│ │ │ │ ├── id.lang.php
│ │ │ │ ├── it.lang.php
│ │ │ │ ├── ja.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── lt.lang.php
│ │ │ │ ├── nl.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── pt-br.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sk.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ ├── uk.lang.php
│ │ │ │ └── zh-cn.lang.php
│ │ │ ├── menu.admin.php
│ │ │ ├── menu.plugin.php
│ │ │ └── views/
│ │ │ ├── backend/
│ │ │ │ ├── add.view.php
│ │ │ │ ├── edit.view.php
│ │ │ │ └── index.view.php
│ │ │ └── frontend/
│ │ │ └── index.view.php
│ │ ├── pages/
│ │ │ ├── install/
│ │ │ │ └── pages.manifest.xml
│ │ │ ├── js/
│ │ │ │ ├── .htaccess
│ │ │ │ └── pages.js
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── fa.lang.php
│ │ │ │ ├── fr.lang.php
│ │ │ │ ├── hu.lang.php
│ │ │ │ ├── id.lang.php
│ │ │ │ ├── it.lang.php
│ │ │ │ ├── ja.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── lt.lang.php
│ │ │ │ ├── nl.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── pt-br.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sk.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ ├── uk.lang.php
│ │ │ │ └── zh-cn.lang.php
│ │ │ ├── pages.admin.php
│ │ │ ├── pages.plugin.php
│ │ │ └── views/
│ │ │ ├── backend/
│ │ │ │ ├── add.view.php
│ │ │ │ ├── edit.view.php
│ │ │ │ └── index.view.php
│ │ │ └── frontend/
│ │ │ ├── available_pages.view.php
│ │ │ └── breadcrumbs.view.php
│ │ ├── plugins/
│ │ │ ├── install/
│ │ │ │ └── plugins.manifest.xml
│ │ │ ├── js/
│ │ │ │ ├── .htaccess
│ │ │ │ └── plugins.js
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── fa.lang.php
│ │ │ │ ├── fr.lang.php
│ │ │ │ ├── hu.lang.php
│ │ │ │ ├── id.lang.php
│ │ │ │ ├── it.lang.php
│ │ │ │ ├── ja.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── lt.lang.php
│ │ │ │ ├── nl.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── pt-br.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sk.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ ├── uk.lang.php
│ │ │ │ └── zh-cn.lang.php
│ │ │ ├── plugins.admin.php
│ │ │ ├── plugins.plugin.php
│ │ │ └── views/
│ │ │ └── backend/
│ │ │ └── index.view.php
│ │ ├── sitemap/
│ │ │ ├── install/
│ │ │ │ └── sitemap.manifest.xml
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── fa.lang.php
│ │ │ │ ├── fr.lang.php
│ │ │ │ ├── hu.lang.php
│ │ │ │ ├── it.lang.php
│ │ │ │ ├── ja.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── lt.lang.php
│ │ │ │ ├── nl.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── pt-br.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sk.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ ├── uk.lang.php
│ │ │ │ └── zh-cn.lang.php
│ │ │ ├── sitemap.plugin.php
│ │ │ └── views/
│ │ │ └── frontend/
│ │ │ └── index.view.php
│ │ ├── snippets/
│ │ │ ├── install/
│ │ │ │ └── snippets.manifest.xml
│ │ │ ├── js/
│ │ │ │ ├── .htaccess
│ │ │ │ └── snippets.js
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── fa.lang.php
│ │ │ │ ├── fr.lang.php
│ │ │ │ ├── hu.lang.php
│ │ │ │ ├── id.lang.php
│ │ │ │ ├── it.lang.php
│ │ │ │ ├── ja.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── lt.lang.php
│ │ │ │ ├── nl.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── pt-br.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sk.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ ├── uk.lang.php
│ │ │ │ └── zh-cn.lang.php
│ │ │ ├── snippets.admin.php
│ │ │ ├── snippets.plugin.php
│ │ │ └── views/
│ │ │ └── backend/
│ │ │ ├── add.view.php
│ │ │ ├── edit.view.php
│ │ │ └── index.view.php
│ │ ├── system/
│ │ │ ├── install/
│ │ │ │ └── system.manifest.xml
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── fa.lang.php
│ │ │ │ ├── fr.lang.php
│ │ │ │ ├── hu.lang.php
│ │ │ │ ├── id.lang.php
│ │ │ │ ├── it.lang.php
│ │ │ │ ├── ja.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── lt.lang.php
│ │ │ │ ├── nl.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── pt-br.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sk.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ ├── uk.lang.php
│ │ │ │ └── zh-cn.lang.php
│ │ │ ├── system.admin.php
│ │ │ ├── system.plugin.php
│ │ │ └── views/
│ │ │ └── backend/
│ │ │ └── index.view.php
│ │ ├── themes/
│ │ │ ├── install/
│ │ │ │ └── themes.manifest.xml
│ │ │ ├── languages/
│ │ │ │ ├── cs.lang.php
│ │ │ │ ├── de.lang.php
│ │ │ │ ├── en.lang.php
│ │ │ │ ├── es.lang.php
│ │ │ │ ├── fa.lang.php
│ │ │ │ ├── fr.lang.php
│ │ │ │ ├── hu.lang.php
│ │ │ │ ├── id.lang.php
│ │ │ │ ├── it.lang.php
│ │ │ │ ├── ja.lang.php
│ │ │ │ ├── ka-ge.lang.php
│ │ │ │ ├── lt.lang.php
│ │ │ │ ├── nl.lang.php
│ │ │ │ ├── pl.lang.php
│ │ │ │ ├── pt-br.lang.php
│ │ │ │ ├── ru.lang.php
│ │ │ │ ├── sk.lang.php
│ │ │ │ ├── sr.lang.php
│ │ │ │ ├── tr.lang.php
│ │ │ │ ├── uk.lang.php
│ │ │ │ └── zh-cn.lang.php
│ │ │ ├── themes.admin.php
│ │ │ ├── themes.plugin.php
│ │ │ └── views/
│ │ │ └── backend/
│ │ │ ├── add.view.php
│ │ │ ├── edit.view.php
│ │ │ └── index.view.php
│ │ └── users/
│ │ ├── install/
│ │ │ └── users.manifest.xml
│ │ ├── js/
│ │ │ ├── .htaccess
│ │ │ └── users.js
│ │ ├── languages/
│ │ │ ├── cs.lang.php
│ │ │ ├── de.lang.php
│ │ │ ├── en.lang.php
│ │ │ ├── es.lang.php
│ │ │ ├── fa.lang.php
│ │ │ ├── fr.lang.php
│ │ │ ├── hu.lang.php
│ │ │ ├── id.lang.php
│ │ │ ├── it.lang.php
│ │ │ ├── ja.lang.php
│ │ │ ├── ka-ge.lang.php
│ │ │ ├── lt.lang.php
│ │ │ ├── nl.lang.php
│ │ │ ├── pl.lang.php
│ │ │ ├── pt-br.lang.php
│ │ │ ├── ru.lang.php
│ │ │ ├── sk.lang.php
│ │ │ ├── sr.lang.php
│ │ │ ├── tr.lang.php
│ │ │ ├── uk.lang.php
│ │ │ └── zh-cn.lang.php
│ │ ├── users.admin.php
│ │ ├── users.plugin.php
│ │ └── views/
│ │ ├── backend/
│ │ │ ├── add.view.php
│ │ │ ├── edit.view.php
│ │ │ └── index.view.php
│ │ └── frontend/
│ │ ├── edit.view.php
│ │ ├── index.view.php
│ │ ├── login.view.php
│ │ ├── password_reset.view.php
│ │ ├── profile.view.php
│ │ ├── registration.view.php
│ │ └── userspanel.view.php
│ ├── captcha/
│ │ ├── captcha.plugin.php
│ │ ├── crypt/
│ │ │ ├── .htaccess
│ │ │ ├── cryptographp.cfg.php
│ │ │ ├── cryptographp.fct.php
│ │ │ ├── cryptographp.inc.php
│ │ │ ├── cryptographp.php
│ │ │ ├── fonts/
│ │ │ │ ├── index.html
│ │ │ │ └── luggerbu.txt
│ │ │ ├── images/
│ │ │ │ ├── .htaccess
│ │ │ │ └── index.html
│ │ │ ├── index.html
│ │ │ └── index.php
│ │ ├── install/
│ │ │ ├── captcha.install.php
│ │ │ ├── captcha.manifest.xml
│ │ │ └── captcha.uninstall.php
│ │ └── languages/
│ │ ├── cs.lang.php
│ │ ├── de.lang.php
│ │ ├── en.lang.php
│ │ ├── es.lang.php
│ │ ├── fa.lang.php
│ │ ├── fr.lang.php
│ │ ├── id.lang.php
│ │ ├── it.lang.php
│ │ ├── ka-ge.lang.php
│ │ ├── lt.lang.php
│ │ ├── nl.lang.php
│ │ ├── pl.lang.php
│ │ ├── pt-br.lang.php
│ │ ├── ru.lang.php
│ │ ├── sk.lang.php
│ │ ├── sr.lang.php
│ │ ├── tr.lang.php
│ │ ├── uk.lang.php
│ │ └── zh-cn.lang.php
│ ├── markitup/
│ │ ├── install/
│ │ │ └── markitup.manifest.xml
│ │ ├── markitup/
│ │ │ ├── .htaccess
│ │ │ ├── jquery.markitup.js
│ │ │ ├── sets/
│ │ │ │ └── html/
│ │ │ │ ├── set.js
│ │ │ │ └── style.css
│ │ │ ├── skins/
│ │ │ │ └── simple/
│ │ │ │ └── style.css
│ │ │ └── templates/
│ │ │ ├── preview.css
│ │ │ └── preview.html
│ │ └── markitup.plugin.php
│ └── sandbox/
│ ├── install/
│ │ ├── sandbox.install.php
│ │ ├── sandbox.manifest.xml
│ │ └── sandbox.uninstall.php
│ ├── languages/
│ │ ├── cs.lang.php
│ │ ├── de.lang.php
│ │ ├── en.lang.php
│ │ ├── es.lang.php
│ │ ├── fa.lang.php
│ │ ├── fr.lang.php
│ │ ├── id.lang.php
│ │ ├── it.lang.php
│ │ ├── ka-ge.lang.php
│ │ ├── lt.lang.php
│ │ ├── nl.lang.php
│ │ ├── pl.lang.php
│ │ ├── pt-br.lang.php
│ │ ├── ru.lang.php
│ │ ├── sk.lang.php
│ │ ├── sr.lang.php
│ │ ├── tr.lang.php
│ │ ├── uk.lang.php
│ │ └── zh-cn.lang.php
│ ├── sandbox.admin.php
│ ├── sandbox.plugin.php
│ └── views/
│ ├── backend/
│ │ └── index.view.php
│ └── frontend/
│ └── index.view.php
├── robots.txt
└── rss.php
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# ignore os/app generated files
Thumbs.db
.DS_Store
*.esproj
*.project
*.sublime-project
*.sublime-workspace
# ignore user .htaccess
/.htaccess
# ignore user sitemap
/sitemap.xml
# ignore user defines
/monstra/boot/defines.php
# ignore debug and custom themes
/public/themes/*
/admin/themes/*
!/public/themes/default
!/admin/themes/default
# ignore user plugins
/plugins/*
!/plugins/box
!/plugins/captcha
!/plugins/markitup
!/plugins/sandbox
# ignore user files and folders
/backups/*
/public/*
/storage/*
/tmp/*
================================================
FILE: CHANGELOG.md
================================================
Monstra 3.0.4, 2016-04-05
------------------------
- Fixed User Security by adding a check that compares POST id with SESSION
id for none admin edits
- Fixed ability to read robots.txt
- Stylesheet: Changed minified URIs to eliminate query strings
- FilesManager: added alphabetical order for files and directories
- Localization: Major Fixes for ES locale
Monstra 3.0.3, 2016-01-29
------------------------
- Improved Monstra Security
- Minimum PHP version for Monstra is 5.3.2
- Admin: Fixed 404 error when using certain server configurations
- Localization: Major Fixes for SR, KA-GE, and ES
- Install Script Fixes
Monstra 3.0.2, 2015-10-16
------------------------
- Added Monstra MIT LICENSE instead of GNU GENERAL PUBLIC LICENSE v3
- Code standards fixes.
- Localization: Major Fixes for ES and SR
Monstra 3.0.1, 2014-08-10
------------------------
- Minimum php is 5.3
- Themes Plugin: Imposible to create new CSS - fixed
- Themes Plugin: js and css counter does not recalculate - fixed
- Error in Monstra Notifications - fixed
- Updated plugins url from plugins.monstra.org to monstra.org/download/plugins
Monstra 3.0.0, 2014-08-01
------------------------
- Mobile Ready! Monstra fully responsive for mobile devices, tablets, and normal computer screens.
- Twitter Bootstrap updated to 3.1.1
- Idiorm updated to 1.4.1
- jQuery updated to 2.1.0
- Admin: New Modern User Interface
- Site: New default theme
- Layout fixes according to World Wide Web Consortium (W3C) Standards
- Prefetch DNS to reduce look up times
- Files Manager: added ability to create & rename directories.
- Files Manager: Maximum upload file size message - added.
- Files Manager: Bootstrap fileinput.js updated to 3.0.0
- Files Manager: File Info Popup
- Backup: Restore Site from Backup added
- Plugins Manager: Uploading new plugins via the admin panel added
- Plugins Manager: Read plugin help(README.MD) ability added.
- Responsive Chocolat Lightbox instead of TB Lightbox
- Blog Plugin as a part of Monstra CMS
- CodeMirror Plugin as a part of Monstra CMS
- Markdown Plugin as a part of Monstra CMS
- MarkItUp Color Pallete fixes
- Site Url without trailing slashes
- Admin Help Section - added.
- Pages Plugin: tags field added.
- Pages Plugin: Meta Title added.
- Sitemap Errors Fixes.
- Monstra automatically renames files - fixed
- Monstra Dashboard created and set as default Plugin for Admin Panel
- Ink Framework for Monstra Email Templates
- iCheck plugin for checkboxes added.
- Emails Manager Plugin added.
- HubSpot Messaging Library added for notifications
- Gelato: Unzip Functionality added.
- Gelato: Number Class new method convertToBytes() added.
- Gelato: ErroHandler styles updates
- Users Plugin getGravatarURL() improve
- Plugin API - Actions - Closure support added.
- Plugin API - Filters - Closure support added.
- Core: Better statuses notification (error,success,warning)
- Core: Store user_email in Session
- Core: Javascript may be broken if there is no break line - fixed
- Core: Added ability to avoid caching JS/CSS by the browser.
- Core: Monstra automatically rename files Issue - fixed
- Sandbox Plugin cleanup
- New Flags: Japanese(JA), Indonesian(ID), Chinese(ZH-CN), Turkish(TR) added.
- Localization: Japanese(JA), Indonesian(ID), Chinese(ZH-CN), Turkish(TR) translations added.
- Localization: Major Fixes
Monstra 2.3.1, 2013-12-25
------------------------
- Localization: Major Fixes
- Gelato: Image.php Major Fixes
- Sitemap: Errors #175 - fixes
- New favicon added #182 - by bernte
- Layouts: General Fixes - by bernte
- Installer: SERVER_PORT issue - fixed by KANekT
- Gelato: Number Class - updated bytes format (JEDEC & IEC 60027) by mbarzda
- Email Layout: footer fixes
Monstra 2.3.0, 2013-12-19
------------------------
- Update Twitter Bootstrap to 2.3.2
- Security: Added limits for login attempts #104
- Security: Obfuscate users email to prevent spam-bots from sniffing it.
- Core: Added ability to map Monstra Engine Directory.
- Core: Maintenance Mode Improvements
- Core: ORM::configure - driver options added
- Gelato: Image.php fix for PNG files
- Gelato: Number.php: Undefined offset fix
- XMLDB: error select for empty table fix
- Plugin API: Stylesheet.php updates - sourcecode misses a linebreak after minified css
- Files Manager: jasny bootstrap-fileupload - added #89
- Users Plugin: login page fixes
- Users Plugin: Deleting users - fixed by Oleg Gatseluk #158
- Pages Plugin: General method getPages() created #123
- Pages Plugin: page expand ajax bug #115 - fixed
- Pages Plugin: Improved available() method to show only published pages
- Pages Plugin: Bug with pages renaming - fixed
- Monstra Email Templates #164
- Localization: Major Fixes
- Localization: PL added
- Localization: NL added
- .htaccess SEO improvements
Monstra 2.2.1, 2013-04-06
------------------------
- Update Gelato to 1.0.3
- Error Handler turned off for Production environment
- Localization: Farsi(fa) translations fixes.
- Pages Manager: fix translates #107
- Missing Translation on Login Page - fixed #106
- Lithuanian flag and other languages fixes. Thanks to mbarzda
Monstra 2.2.0, 2013-03-25
------------------------
- Mobile Ready! Monstra fully responsive for mobile devices, tablets, and normal computer screens.
- Improved Monstra Architecture!
- New Stand-alone Monstra Library (Gelato) was created! Totally improved old classes and added new classes!
- Monstra Library with new useful classes - ClassLoader, ErrorHandler, Log, MinifyJS, MinifyCSS, MinifyHTML, Token, Registry.
- Adopted PSR-0 PSR-1 PSR-2
- 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.
- Idiorm Updated to 1.3.0
- jQuery Updated to 1.9.1
- Twitter Bootstrap Updated to 2.3.0
- Default Theme: Social Meta Tags - added.
- Default Theme: Hook "theme_meta" - added.
- Admin Default Theme: Added missing meta tags.
- Improve Installer Usability. Flags Added.
- Default Site Email added.
- PHPMailer added.
- Pages Manager: added ability to quickly update page status and page access.
- Intstaller Layout: Added missing meta tags.
- Filesmanager plugin: added ability to view images.
- Filesmanager Plugin: forbidden types array - updated.
- CSRF detection text - updated.
- Engine Uri: code improvements.
- XMLDB: Table Class - fixed select method. Thanks to DmitriyMX
- Bootstrap CSS: Icons url - fixed.
- Plugins Manager: buttons confirm dialog message - fixed.
- Pages Manager: page cloning problem - fixed.
- Localizations: translations fixes.
Monstra 2.1.3, 2012-12-09
------------------------
- Pages Plugin: New shortcodes added - page_author, page_slug, page_url page_available, page_breadcrumbs, page_date, page_content.
- Pages Plugin: add ability to get content for specific page.
- XMLDB: New method factory() added.
- Twitter Bootstrap updated to Version 2.2.2
- Sitemap Plugin: `_blank` removed.
- Filesmanager Plugin: fixes.
- Backup Plugin: fixes.
Monstra 2.1.2, 2012-12-05
------------------------
- Blocks Plugin: added ability create and render inline content blocks with {block_inline} and {block_inline_create}
- Site Module: methods keywords() and description() fixes.
- Pages Plugin: pages.js fixes.
- Admin main index.php fixes.
Monstra 2.1.1, 2012-11-30
------------------------
- Plugins: Minify bug #71 - fixed.
- Menu Plugin: bug with categories #70 - fixed.
- Localization: IT translations - fixed.
Monstra 2.1.0, 2012-11-29
------------------------
- Localization: PT-BR, UK translations added.
- Default theme: hook "theme_header" added.
- System Plugin: new action "admin_system_extra_index_template_actions" added.
- Shortcodes API: new delete() clear() exists() methods added.
- Options API: new exists() method added.
- Core: new constant VERSION - added.
- Core: added ability to load: defines, actions, filters, shortcodes for current environment.
- Defines: deprecated constants: MONSTRA_GZIP_STYLES, MONSTRA_VERSION, MONSTRA_VERSION_ID, MONSTRA_SITEURL, MONSTRA_MOBILE deleted.
- Box Plugins: used Core::VERSION to compare Monstra CMS version.
- Installer: use version_compare() function to compare php versions.
- Installer: Get system timezone with date_default_timezone_get() function.
- Admin Default Theme: general improvements.
- Users Plugin: user profile editing fixed.
- Shortcodes API: bug with similar shortcode names fixed.
- Site: template() method improvements. Added ability to get template from specific theme.
- Menu Plugin: added ability to select children pages.
- Snippets Plugin: added ability to add parameters for snippets.
- Themes Plugin: added ability to add parameters for chunks.
- Pages Plugin: pages expand/collapse feature added.
- Pages Plugin: pages "access" feature added.
- Pages Plugin: tab "seo" changed to "metadata"
- Pages Table: "expand, "access" fields added.
- Information Plugin: new "Directory Permissions" tab added.
- Twitter Bootstrap updated to Version 2.2.1
- MarkitUp! updated to Version 1.1.13
- Sitemap Plugin: links title issue fixed.
- Core: Init Site module on frontend only.
- Core: IDIORM optimization.
- Site Class: code optimization.
- Sitemap Plugin: bug with priority fixed.
- File .gitignore added.
- Monstra logo updated.
- README: general updates
- Pages Plugin: "delete" action fixes.
- Plugins Manager: add ability to Cleanup minify with new plugin installation or plugin uninstallation.
- MarkitUp Plugin: unnecessary files removed.
- XMLDB: select() method fixes.
- XMLDB: new method existsField() added.
- Information Plugin: shows "PHP Built On", "Web Server", "WebServer to PHP Interface" information.
- Installer: general fixes.
- Blocks Plugin: view embed codes feature added.
- Snippets Plugin: view embed codes feature added.
- Text Helper: method strpSlashes() fixed.
- Text Helper: new method increment() added.
- Pages Plugin: method robots() fixes.
- Pages Plugin: improved page author detection.
- Pages Plugin: add, edit, delete, clone actions improvements.
- Users Plugin: apply "content" filter for "about_me" field.
- Plugin API: Stylesheet and Javascript load() methods - fixed.
- Pages Plugin: Page editing date issue - fixed.
- Localization: EN, RU, IT, LT, DE translations fixed.
- Imformation Plugin: config file(defines.php) checking removed.
- Box Plugins: general code refactoring.
Monstra 2.0.1, 2012-10-18
------------------------
- Localization: DE, LT, IT translations added
- Validation Helper: Updated email, ip and url methods with filter_var instead preg_match function.
- Localization: EN, RU translations fixed
- Users Plugin: field "about_me" fixed
Monstra 2.0.0, 2012-10-09
------------------------
- Idiorm Added! Idiorm - a lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5.
- Added Crypt Capthca Plugin
- Users Plugin: Added ability to close users frontend registration. Updated frontend and backend templates. Using Capthca Plugin instead of Captca Helper for more secure.
- Admin Password Reset Page: Capthca Plugin added.
- Backup Plugin: Loading state button added. Shows "Creating..." while site backups create.
- Pages Plugin: Added new actions: admin_pages_action_add, admin_pages_action_edit, admin_pages_action_clone, admin_pages_action_delete
- Pages Plugin: Updated date() method - added ability to set date format.
- Pages Plugin: UI and Logic updates.
- Users Plugin: Email templates added.
- Users Table: Added new fields: hash, about_me
- Users Plugin: Admin - New User Registration Validation - Fixed
- Users Plugin: Added ability to set "about me" information.
- Improved Password Reset Logic.
- Information Plugin: Added new tab "Server" with common server information.
- Box Plugins: CSRF vulnerability resolved.
- Sitemap Plugin: Basic search engine optimization.
- Improved Menu Plugin. Added ability to manage items categories.
- Improved Admin Theme - built with best frontend optimization practice. Updated architecture and User Interface. Admin theme more responsive now!
- Added Twitter Bootstrap 2.1.1.
- Added Twitter Bootstrap icons.
- Dir Helper: Fixed size() method.
- New Default Theme: built with best frontend optimization practice.
- Options API: Updated get() method. Return empty string if option value doesnt exists.
- CSS variables: Added - @theme_site_url @theme_admin_url
- CSS variables: Deleted - @theme_url
- Themes Plugin: Added ability to create/edit/clone JavaScripts. Added ability to change admin theme in one click.
- Apply filter 'content' to Blocks.
- Array Helper: get() method improved. New methods keyExists() isAssoc() set() delete() random() added.
- Plugin API: Fixed Javascript and Stylesheet class.
- Plugin API: Added ability to set view file from current theme folder.
- New options theme_admin_name, theme_site_name, users_frontend_registration added.
- Form Helper: Custom Macros - added
- Install Script Improvments.
- Monstra Localization Improvments. Added locales array to I18N class.
- Translates updates.
- Path updates.
- And a lot of general engine improvements.
Monstra 1.3.1, 2012-09-02
------------------------
- Fix Plugins Output
Monstra 1.3.0, 2012-09-01
------------------------
- Improve Multi-user system. Front-end registration, authorization, profile editing added.
- Improve Default Monstra theme.
- Security: Fix Script Insertion Vulnerability.
- Blocks and Snippets plugins code fix. Issue #35, Issue #34
- XMLDB: new method updateField()
- Plugin API: path updates.
- Dir Helper: new method size()
- Filesmanager: shows directory size.
- Security Helper: update safeName() method.
- Pages Plugin: new method children() Get children pages for a specific parent page.
- Update translates.
- And a lot of general engine improvements.
Monstra 1.2.1, 2012-08-09
------------------------
- Admin styles: add .error class
- Fix translates
- Security: fix Cross Site Request Forgery
- Site Module: fix template() function
- Html Helper: fix nbsp() function
- Site Module: fix template() function
Monstra 1.2.0, 2012-07-03
------------------------
- Improve I18N
- Improve Monstra Check Version: set priority 9999
- XMLDB: fix updateWhere function
- Fix Agent Helper
- Sitemap: use time() instead of mktime()
- Security Helper: add Tokenizer
Monstra 1.1.6, 2012-06-12
------------------------
- Sitemap Plugin: return content instead of displaying.
- Improve content filtering.
Monstra 1.1.5, 2012-06-10
------------------------
- Improve Monstra Error Handler
- Cookie Helper: fix set() function
Monstra 1.1.4, 2012-06-09
------------------------
- Improve Monstra Error Handler
Monstra 1.1.3, 2012-06-06
------------------------
- Improve Monstra Error Handler
Monstra 1.1.2, 2012-06-05
------------------------
- Remove Fatal Error Handler
- File helper: fix writable() function
Monstra 1.1.1, 2012-06-04
------------------------
- Fix error reporting!
- Themes Plugin: fix Chunk class
Monstra 1.1.0, 2012-06-02
------------------------
- Menu plugin: added ability to add plugins(components) to site menu.
- Improve installation script: add ability to change Monstra language.
- Improve installation script: better error checking.
- Improve monstra check version
- Update Users table autoincrement value to 0
- Pages Plugin: return empty meta robots if current component is not pages
- Html Helper: fix arrow() function.
- XMLDB: fix select function.
- Themes Plugin: fix theme navigation item order. set 2
- Time Zones updates
- Fix translates
Monstra 1.0.1, 2012-04-26
------------------------
- Cleanup minify during saving the theme
- add new css variables: @site_url and @theme_url
- Remove deprecated @url css variable
Monstra 1.0.0, 2012-04-24
------------------------
- Initial release
================================================
FILE: LICENSE.md
================================================
The MIT License (MIT)
Copyright (c) 2012 - 2016 Monstra Content Management
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# THIS PROJECT IS NOT SUPPORTED ANYMORE!
Check FLEXTYPE.ORG
## Monstra
Monstra is a modern and lightweight Content Management System.
[](https://gitter.im/monstra-cms/monstra?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## System Requirements
Operation system: Unix, Linux, Windows, Mac OS
Middleware: PHP 5.3.2 or higher with PHP's [SimpleXML module](http://php.net/simplexml) and [Multibyte String module](http://php.net/mbstring)
Webserver: Apache with [Mod Rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) or Ngnix with [Rewrite Module](http://wiki.nginx.org/HttpRewriteModule)
## Steps to Install
1. [Download the latest version.](http://monstra.org/download)
2. Unzip the contents to a new folder on your local computer.
3. Upload that whole folder with an FTP client to your host.
4. 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.
5. 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.
6. Type http://example.org/install.php in the browser.
## Contributing
1. Help on the [Forum.](http://forum.monstra.org)
2. Donate to keep Monstra free. We will add you to Monstra [Sponsors Page.](http://monstra.org/contribute/sponsors)
3. Develop a new plugin.
4. Create a new theme.
5. Find and [report issues.](https://github.com/monstra-cms/monstra/issues)
6. Link back to [Monstra](http://monstra.org).
## Links
- [Site](http://monstra.org)
- [Forum](http://forum.monstra.org)
- [Documentation](http://monstra.org/documentation)
- [GitHub Documentation](https://github.com/monstra-cms/monstra-cms-documentation)
- [GitHub Repository](https://github.com/monstra-cms/monstra)
## License
See [LICENSE](https://github.com/monstra-cms/monstra/blob/master/LICENSE.md)
================================================
FILE: admin/index.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
// Main engine defines
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', rtrim(str_replace(array('admin'), array(''), dirname(__FILE__)), '\\/'));
define('BACKEND', true);
define('MONSTRA_ACCESS', true);
// Load Monstra engine _init.php file
require_once ROOT. DS .'engine'. DS .'_init.php';
// Errors var when users login failed
$login_error = '';
// Get users Table
$users = new Table('users');
// Admin login
if (Request::post('login_submit')) {
if (Cookie::get('login_attempts') && Cookie::get('login_attempts') >= 5) {
$login_error = __('You are banned for 10 minutes. Try again later', 'users');
} else {
$user = $users->select("[login='" . trim(Request::post('login')) . "']", null);
if (count($user) !== 0) {
if ($user['login'] == Request::post('login')) {
if (trim($user['password']) == Security::encryptPassword(Request::post('password'))) {
if ($user['role'] == 'admin' || $user['role'] == 'editor') {
Session::set('admin', true);
Session::set('user_id', (int) $user['id']);
Session::set('user_login', (string) $user['login']);
Session::set('user_role', (string) $user['role']);
Session::set('user_email', (string) $user['email']);
Request::redirect('index.php');
}
} else {
$login_error = __('Wrong username or password', 'users');
if (Cookie::get('login_attempts')) {
if (Cookie::get('login_attempts') < 5) {
$attempts = Cookie::get('login_attempts') + 1;
Cookie::set('login_attempts', $attempts, 600);
} else {
$login_error = __('You are banned for 10 minutes. Try again later', 'users');
}
} else {
Cookie::set('login_attempts', 1, 600);
}
}
}
} else {
$login_error = __('Wrong username or password', 'users');
if (Cookie::get('login_attempts')) {
if (Cookie::get('login_attempts') < 5) {
$attempts = Cookie::get('login_attempts') + 1;
Cookie::set('login_attempts', $attempts, 600);
} else {
$login_error = __('You are banned for 10 minutes. Try again later', 'users');
}
} else {
Cookie::set('login_attempts', 1, 600);
}
}
}
Notification::setNow('error', $login_error);
}
// Errors
$errors = array();
$site_url = Option::get('siteurl');
$site_name = Option::get('sitename');
$user_login = trim(Request::post('login'));
// Reset Password Form Submit
if (Request::post('reset_password_submit')) {
if (Option::get('captcha_installed') == 'true' && ! CryptCaptcha::check(Request::post('answer'))) {
$errors['users_captcha_wrong'] = __('Captcha code is wrong', 'users');
}
if ($user_login == '') {
$errors['users_empty_field'] = __('Required field', 'users');
}
if ($user_login != '' && ! $users->select("[login='".$user_login."']")) {
$errors['users_user_doesnt_exists'] = __('This user doesnt exist', 'users');
}
if (count($errors) == 0) {
// Get user
$user = $users->select("[login='" . $user_login . "']", null);
// Generate new hash
$new_hash = Text::random('alnum', 12);
// Update user hash
$users->updateWhere("[login='" . $user_login . "']", array('hash' => $new_hash));
$mail = new PHPMailer();
$mail->CharSet = 'utf-8';
$mail->ContentType = 'text/html';
$mail->SetFrom(Option::get('system_email'));
$mail->AddReplyTo(Option::get('system_email'));
$mail->AddAddress($user['email'], $user['login']);
$mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));
$mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
->assign('site_url', $site_url)
->assign('site_name', $site_name)
->assign('user_id', $user['id'])
->assign('user_login', $user['login'])
->assign('new_hash', $new_hash)
->assign('email_template', 'reset-password')
->render());
$mail->Send();
// Set notification
Notification::set('success', __('Your login details for :site_name has been sent', 'users', array(':site_name' => $site_name)));
Notification::set('reset_password', 'reset_password');
// Redirect to password-reset page
Request::redirect(Site::url().'/admin');
}
Notification::setNow('reset_password', 'reset_password');
}
// If admin user is login = true then set is_admin = true
if (Session::exists('admin') && Session::get('admin') == true) {
$is_admin = true;
} else {
$is_admin = false;
}
// Logout user from system
if (Request::get('logout') && Request::get('logout') == 'do') {
Session::destroy();
}
// If is admin then load admin area
if ($is_admin) {
// If id is empty then redirect to default plugin PAGES
if (Request::get('id')) {
$area = Request::get('id');
} else {
Request::redirect(Site::url().'/admin/index.php?id=dashboard');
}
$plugins_registered = Plugin::$plugins;
foreach ($plugins_registered as $plugin) {
$plugins_registered_areas[] = $plugin['id'];
}
// Show plugins admin area only for registered plugins
if (in_array($area, $plugins_registered_areas)) {
$plugin_admin_area = true;
} else {
$plugin_admin_area = false;
}
// Backend pre render
Action::run('admin_pre_render');
// Display admin template
require 'themes'. DS . Option::get('theme_admin_name') . DS . 'index.template.php';
// Backend post render
Action::run('admin_post_render');
} else {
// Display login template
require 'themes'. DS . Option::get('theme_admin_name') . DS . 'login.template.php';
}
// Flush (send) the output buffer and turn off output buffering
ob_end_flush();
================================================
FILE: admin/themes/default/css/default.css
================================================
/************************************
Monstra
default.css
*************************************
CONTENTS
1. GENERAL
2. COMPONENTS
3. MEDIA QUERIES
*************************************
1. GENERAL
*************************************/
@font-face {
font-family: 'Glyphicons Halflings';
src: url('@site_url/public/assets/fonts/glyphicons-halflings-regular.eot');
src: url('@site_url/public/assets/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
url('@site_url/public/assets/fonts/glyphicons-halflings-regular.woff') format('woff'),
url('@site_url/public/assets/fonts/glyphicons-halflings-regular.ttf') format('truetype'),
url('@site_url/public/assets/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
}
body {
background: #fafafa;
}
h1,
h2,
h3,
h4,
h5 {
color: #222;
}
.error-none {
display: none;
}
.error-field {
border: 1px solid red!important;
}
.error-message {
color: red;
}
a.btn-expand {
font-size: 14px;
font-weight: bold;
padding-right: 4px;
padding-left: 4px;
text-decoration: none;
color: #333;
}
.btn:active,
.btn.active {
outline: 0;
background-image: none;
box-shadow: none;
}
.login-footer,
.login-footer a {
font-size: 12px;
color: #777;
}
footer {
margin-top: 40px;
}
footer,
footer a {
font-size: 12px;
color: #777;
}
footer span {
padding-top: 10px;
border-top: 1px solid #e0e0e0;
}
footer .highlight {
color: #333;
}
/*************************************
2. COMPONENTS
*************************************/
/* Well */
.well {
color: #555;
border: none;
border-radius: 0px;
background: #fff;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,.13);
box-shadow: 0 1px 3px rgba(0,0,0,.13);
-webkit-font-smoothing: subpixel-antialiased;
}
.dashboard-well {
padding-top: 6px;
padding-bottom: 6px;
}
.dashboard-well a.welcome-back {
font-size: 16px;
padding-left: 0;
text-decoration: none;
color: #333;
}
/* Admin Form */
.form-signin {
max-width: 400px;
}
.form-signin {
margin-top: 40px;
}
.form-signin .administration-area,
.form-signin .reset-password-area {
margin-top: 40px;
}
/* Dropdown Menu */
.dropdown-menu .divider {
background-color: #555454;
}
.dropdown-menu {
border: 1px solid #333;
background: #333;
box-shadow: none;
}
.dropdown-menu > li > a {
color: #eee;
}
/* Navbar */
.navbar-inverse .navbar-nav > li > a {
color: #eee;
}
.navbar-inverse {
background: #222;
}
.navbar-default {
border-radius: 0px;
}
ul.navbar-nav {
min-height: 60px;
}
.navbar-nav > li {
min-height: 60px;
}
.navbar-nav > li > a {
line-height: 30px;
}
.navbar-brand {
font-size: 24px;
line-height: inherit;
padding: 13px 15px;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus {
background: #333;
}
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
background: #333;
}
a.navbar-brand {
font-weight: bold;
color: #fafafa!important;
}
.navbar-nav .dropdown-menu {
padding-top: 0;
padding-bottom: 0;
}
.navbar-nav .dropdown-menu > li > a {
padding: 7px 20px;
}
.nav > li > a {
padding-top: 15px;
padding-right: 20px;
padding-bottom: 15px;
padding-left: 20px;
}
.nav > li > a > img {
width: 28px;
height: 28px;
margin: 0 0 0 4px;
border: 1px solid #888;
}
/* Flat Elements */
.form-control,
.btn,
.dropdown-menu,
.modal-content,
.badge,
.label,
.input-group-addon,
.alert,
.tooltip,
.tooltip-inner,
pre,
code {
border-radius: 0px;
}
.badge,
.tooltip,
.tooltip-inner,
.label,
pre,
code {
font-weight: normal;
text-shadow: none;
}
pre {
border: none;
}
/* Inputs */
select,
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"],
.form-control,
.uneditable-input {
color: #3c3c3c;
border-color: #d0d0d0;
background-color: #fff;
}
select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.form-control:focus,
.uneditable-input:focus {
border-color: #aaaaaa;
-webkit-box-shadow: 0 0 8px #dce1e5;
-moz-box-shadow: 0 0 8px #dce1e5;
box-shadow: 0 0 8px #dce1e5;
}
/* Datapicker */
.datapicker {
width: 200px;
}
/* Breadcrumb */
.breadcrumb {
border-radius: 0px;
background: #fff;
}
/* Tabs */
.nav-tabs > li > a {
border-radius: 0px;
}
.tab-page {
background: #fff;
}
.tab-pane > table {
border-top: none!important;
}
.tab-content {
overflow: visible;
}
.tab-page {
padding: 20px 10px 10px;
border-right: 1px solid #dddddd;
border-bottom: 1px solid #dddddd;
border-left: 1px solid #dddddd;
}
/* Tables */
table {
max-width: 100%;
border-spacing: 0;
border-collapse: collapse;
background-color: transparent;
}
.table {
width: 100%;
margin-bottom: 18px;
}
.table th,
.table td {
line-height: 18px;
padding: 8px;
text-align: left;
border-top: 1px solid #dddddd;
background: #fff;
}
.table th {
font-weight: bold;
}
.table thead th {
vertical-align: bottom;
}
.table colgroup + thead tr:first-child th,
.table colgroup + thead tr:first-child td,
.table thead:first-child tr:first-child th,
.table thead:first-child tr:first-child td {
border-top: 0;
}
.table tbody + tbody {
border-top: 2px solid #dddddd;
}
.table-condensed th,
.table-condensed td {
padding: 4px 5px;
}
.table-bordered {
border-collapse: separate;
border: 1px solid #dddddd;
border-left: 0;
*border-collapse: collapsed;
}
.table-bordered th:first-child,
.table-bordered td:first-child {
border-left: 1px solid #dddddd;
}
.table-bordered td:first-child {
padding-left: 15px;
}
.table-bordered thead:first-child tr:first-child th,
.table-bordered tbody:first-child tr:first-child th,
.table-bordered tbody:first-child tr:first-child td {
border-top: 0;
}
.table-bordered thead tr th {
font-weight: bold;
background-color: #fff;
}
.table-bordered thead:first-child tr:first-child > th:first-child,
.table-bordered tbody:first-child tr:first-child > td:first-child {
border-top-left-radius: 0px;
}
.table-bordered thead:last-child tr:last-child > th:last-child,
.table-bordered tbody:last-child tr:last-child > td:last-child {
border-top-right-radius: 0px;
}
.table-striped tbody tr:nth-child(odd) td,
.table-striped tbody tr:nth-child(odd) th {
background-color: #f9f9f9;
}
.table tbody tr:hover td,
.table tbody tr:hover th {
background-color: #f5f5f5;
}
.table-bordered th,
.table-bordered td {
height: 50px;
border-left: none;
}
.table-bordered > thead > tr {
height: 45px;
}
td,
th {
display: table-cell;
vertical-align: inherit!important;
}
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
border: 0;
border-bottom: 1px solid #ccc;
}
.vertical-align {
display: table;
width: 100%;
}
.vertical-align > div {
display: table-cell;
vertical-align: middle;
}
.vertical-align > div > h1,
.vertical-align > div > h2,
.vertical-align > div > h3,
.vertical-align > div > h4,
.vertical-align > div > h5 {
margin-top: 10px;
margin-bottom: 10px;
}
.margin-top-1 {
margin-top: 1em;
}
.margin-top-2 {
margin-top: 2em;
}
.margin-bottom-1 {
margin-bottom: 1em;
}
.margin-bottom-2 {
margin-bottom: 2em;
}
/* Editor */
#editor_area {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.428571429;
height: 400px!important;
padding: 6px 9px;
color: #555;
border: 1px solid #ccc;
}
.markItUpHeader ul li {
padding: 5px;
}
.markItUpHeader ul .markItUpSeparator {
display: none;
}
.modal-header {
border-bottom: 1px solid #f3f3f3;
}
.modal-header .close {
font-size: 26px;
}
.modal-footer {
border-top: 1px solid #f3f3f3;
}
.drop-file-here {
margin-left: 4px;
padding: 5px 40px;
color: #ccc;
border: 3px dashed #d5d5d5;
background: #ccc;
background: #f7f7f7;
}
.modal-backdrop {
background-color: #000;
}
.modal-backdrop.in {
opacity: 0.8;
}
.modal-content {
border: none;
box-shadow: none;
}
#readme .modal-dialog {
width: 70%;
}
#readme .modal-body {
padding-top: 0px;
}
#Choco_container_via {
display: none;
}
/*************************************
3. MEDIA QUERIES
*************************************/
@media (max-width: 480px) {
/* MarkItUp */
.markItUpButton11,
.markItUpButton12,
.markItUpButton13,
.markItUpButton14,
.markItUpButton15,
.markItUpButton16,
.markItUpButton17,
.markItUpButton18 {
display: none;
}
.markItUpSeparator {
display: none;
}
/* Dashboard */
.dashboard-well .col-xs-6 {
width: 100%;
}
.dashboard-well .col-xs-6 .pull-right {
float: left!important;
}
.btn-phone {
width: 100%;
}
.row-phone {
display: block!important;
width: 100%!important;
text-align: left!important;
}
/* Users */
.users-btns > div {
display: block;
width: 100%;
margin-top: 10px;
text-align: left;
}
.users-btns > div:nth-child(2) {
margin-top: 15px;
}
.page-users .btn-cancel {
margin-bottom: 20px;
}
}
@media (max-width: 768px) {
.nav > li > a {
padding: 15px 9px!important;
}
}
@media (max-width: 320px) {
.mobile-nav-tabs .nav-tabs > li {
width: 100%;
height: 46px;
margin: 0px;
}
.mobile-nav-tabs .nav-tabs > li > a {
border: 0;
background: #fff;
}
.mobile-nav-tabs .nav-tabs > li.active > a,
.mobile-nav-tabs .nav-tabs > li.active > a:hover,
.mobile-nav-tabs .nav-tabs > li.active > a:focus {
color: #fff;
border: 0;
background-color: #428bca;
}
.mobile-nav-tabs .nav-tabs {
margin-top: 10px;
margin-bottom: 10px;
border: 0;
}
.mobile-nav-tabs .tab-pane > table {
border-top: 1px solid #ddd!important;
}
}
================================================
FILE: admin/themes/default/index.template.php
================================================
* Alert::success('Message here...');
*
*
* @param string $message Message
* @param integer $seconds Seconds
*/
public static function success($message, $seconds = 3)
{
// Redefine vars
$message = (string) $message;
$seconds = (int) $seconds;
echo '';
}
/**
* Show warning message
*
*
* Alert::warning('Message here...');
*
*
* @param string $message Message
* @param integer $seconds Seconds
*/
public static function warning($message, $seconds = 3)
{
// Redefine vars
$message = (string) $message;
$seconds = (int) $seconds;
echo '';
}
/**
* Show error message
*
*
* Alert::error('Message here...');
*
*
* @param string $message Message
* @param integer $seconds Seconds
*/
public static function error($message, $seconds = 3)
{
// Redefine vars
$message = (string) $message;
$seconds = (int) $seconds;
echo '';
}
}
================================================
FILE: engine/Monstra.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Monstra
{
/**
* An instance of the Monstra class
*
* @var core
*/
protected static $instance = null;
/**
* Common environment type constants for consistency and convenience
*/
const PRODUCTION = 1;
const STAGING = 2;
const TESTING = 3;
const DEVELOPMENT = 4;
/**
* The version of Monstra
*/
const VERSION = '3.0.4';
/**
* Monstra environment
*
* @var string
*/
public static $environment = Monstra::PRODUCTION;
/**
* Monstra environment names
*
* @var array
*/
public static $environment_names = array(
Monstra::PRODUCTION => 'production',
Monstra::STAGING => 'staging',
Monstra::TESTING => 'testing',
Monstra::DEVELOPMENT => 'development',
);
/**
* Protected clone method to enforce singleton behavior.
*
* @access protected
*/
protected function __clone()
{
// Nothing here.
}
/**
* Protected Construct
*/
protected function __construct()
{
/**
* Load core defines
*/
Monstra::loadDefines();
/**
* Compress HTML with gzip
*/
if (MONSTRA_GZIP) {
if (! ob_start("ob_gzhandler")) {
ob_start();
}
} else {
ob_start();
}
/**
* Send default header and set internal encoding
*/
header('Content-Type: text/html; charset=UTF-8');
function_exists('mb_language') and mb_language('uni');
function_exists('mb_regex_encoding') and mb_regex_encoding('UTF-8');
function_exists('mb_internal_encoding') and mb_internal_encoding('UTF-8');
/**
* Gets the current configuration setting of magic_quotes_gpc
* and kill magic quotes
*/
if (get_magic_quotes_gpc()) {
function stripslashesGPC(&$value)
{
$value = stripslashes($value);
}
array_walk_recursive($_GET, 'stripslashesGPC');
array_walk_recursive($_POST, 'stripslashesGPC');
array_walk_recursive($_COOKIE, 'stripslashesGPC');
array_walk_recursive($_REQUEST, 'stripslashesGPC');
}
/**
* Set Gelato Display Errors to False for Production environment.
*/
if (Monstra::$environment == Monstra::PRODUCTION) {
define('GELATO_DEVELOPMENT', false);
}
/**
* Define Monstra Folder for Gelato Logs
*/
define('GELATO_LOGS_PATH', LOGS);
/**
* Include Gelato Library
*/
include ROOT . DS . 'libraries'. DS .'Gelato'. DS .'Gelato.php';
/**
* Map Monstra Engine Directory
*/
ClassLoader::directory(ROOT . DS . 'engine' . DS);
/**
* Map all Monstra Classes
*/
ClassLoader::mapClasses(array(
// Site Modules
'Security' => ROOT . DS .'engine'. DS .'Security.php',
'Uri' => ROOT . DS .'engine'. DS .'Uri.php',
'Site' => ROOT . DS .'engine'. DS .'Site.php',
'Alert' => ROOT . DS .'engine'. DS .'Alert.php',
// XMLDB API
'XML' => ROOT . DS .'engine'. DS .'Xmldb'. DS .'XML.php',
'DB' => ROOT . DS .'engine'. DS .'Xmldb'. DS .'DB.php',
'Table' => ROOT . DS .'engine'. DS .'Xmldb'. DS .'Table.php',
// Plugin API
'Plugin' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Plugin.php',
'Frontend' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Frontend.php',
'Backend' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Backend.php',
'Action' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Action.php',
'Filter' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Filter.php',
'View' => ROOT . DS .'engine'. DS .'Plugin'. DS .'View.php',
'I18n' => ROOT . DS .'engine'. DS .'Plugin'. DS .'I18n.php',
'Stylesheet' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Stylesheet.php',
'Javascript' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Javascript.php',
'Navigation' => ROOT . DS .'engine'. DS .'Plugin'. DS .'Navigation.php',
// Option API
'Option' => ROOT . DS .'engine'. DS .'Option.php',
// Shortcode API
'Shortcode' => ROOT . DS .'engine'. DS .'Shortcode.php',
// Idiorm
'ORM' => ROOT . DS .'libraries'. DS . 'Idiorm'. DS .'ORM.php',
// PHPMailer
'PHPMailer' => ROOT . DS .'libraries'. DS . 'PHPMailer'. DS .'PHPMailer.php',
));
/**
* Start session
*/
Session::start();
/**
* Init Idiorm
*/
if (defined('MONSTRA_DB_DSN')) {
ORM::configure(MONSTRA_DB_DSN);
ORM::configure('username', MONSTRA_DB_USER);
ORM::configure('password', MONSTRA_DB_PASSWORD);
ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
}
/**
* Auto cleanup if DEVELOPMENT environment
*/
if (Monstra::$environment == Monstra::DEVELOPMENT) {
Monstra::cleanTmp();
}
/**
* Set Cache dir
*/
Cache::configure('cache_dir', CACHE);
/**
* Init Options API module
*/
Option::init();
/**
* Set default timezone
*/
@ini_set('date.timezone', Option::get('timezone'));
if (function_exists('date_default_timezone_set')) {
date_default_timezone_set(Option::get('timezone'));
} else {
putenv('TZ='.Option::get('timezone'));
}
/**
* Sanitize URL to prevent XSS - Cross-site scripting
*/
Security::runSanitizeURL();
/**
* Load default
*/
Monstra::loadPluggable();
/**
* Init I18n
*/
I18n::init(Option::get('language'));
/**
* Init Plugins API
*/
Plugin::init();
/**
* Init Notification service
*/
Notification::init();
/**
* Init site module
*/
if (! BACKEND) {
Site::init();
}
}
/**
* Load Defines
*/
protected static function loadDefines()
{
$root_defines = ROOT . DS . 'boot' . DS . 'defines.php';
$environment_defines = ROOT . DS . 'boot' . DS . Monstra::$environment_names[Monstra::$environment] . DS . 'defines.php';
$monstra_defines = ROOT . DS . 'engine' . DS . 'boot' . DS . 'defines.php';
if (file_exists($root_defines)) {
include $root_defines;
} elseif (file_exists($environment_defines)) {
include $environment_defines;
} elseif (file_exists($monstra_defines)) {
include $monstra_defines;
} else {
throw new RuntimeException("The defines file does not exist.");
}
}
/**
* Load Pluggable
*/
protected static function loadPluggable()
{
$root_pluggable = ROOT . DS . 'boot';
$environment_pluggable = ROOT . DS . 'boot' . DS . Monstra::$environment_names[Monstra::$environment];
$monstra_pluggable = ROOT . DS . 'engine' . DS . 'boot';
if (file_exists($root_pluggable . DS . 'filters.php')) {
include $root_pluggable . DS . 'filters.php';
} elseif (file_exists($environment_pluggable . DS . 'filters.php')) {
include $environment_pluggable . DS . 'filters.php';
} elseif (file_exists($monstra_pluggable . DS . 'filters.php')) {
include $monstra_pluggable . DS . 'filters.php';
} else {
throw new RuntimeException("The pluggable filters.php file does not exist.");
}
if (file_exists($root_pluggable . DS . 'actions.php')) {
include $root_pluggable . DS . 'actions.php';
} elseif (file_exists($environment_pluggable . DS . 'actions.php')) {
include $environment_pluggable . DS . 'actions.php';
} elseif (file_exists($monstra_pluggable . DS . 'actions.php')) {
include $monstra_pluggable . DS . 'actions.php';
} else {
throw new RuntimeException("The pluggable actions.php file does not exist.");
}
if (file_exists($root_pluggable . DS . 'shortcodes.php')) {
include $root_pluggable . DS . 'shortcodes.php';
} elseif (file_exists($environment_pluggable . DS . 'shortcodes.php')) {
include $environment_pluggable . DS . 'shortcodes.php';
} elseif (file_exists($monstra_pluggable . DS . 'shortcodes.php')) {
include $monstra_pluggable . DS . 'shortcodes.php';
} else {
throw new RuntimeException("The pluggable shortcodes.php file does not exist.");
}
}
/**
* Clean Monstra TMP folder.
*/
public static function cleanTmp()
{
// Cleanup minify
if (count($files = File::scan(MINIFY, array('css', 'js', 'php'))) > 0) {
foreach ($files as $file) {
File::delete(MINIFY . DS . $file);
}
}
// Cleanup cache
if (count($namespaces = Dir::scan(CACHE)) > 0) {
foreach ($namespaces as $namespace) {
Dir::delete(CACHE . DS . $namespace);
}
}
}
/**
* Initialize Monstra Engine
*
* @return Monstra
*/
public static function init()
{
if (! isset(self::$instance)) {
self::$instance = new Monstra();
}
return self::$instance;
}
}
================================================
FILE: engine/Option.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Option
{
/**
* Options
*
* @var array
*/
protected static $options = null;
/**
* An instance of the Option class
*
* @var option
*/
protected static $instance = null;
/**
* Initializing options
*
* @param string $name Options file
*/
public static function init()
{
if (! isset(self::$instance)) {
self::$instance = new Option();
}
return self::$instance;
}
/**
* Protected clone method to enforce singleton behavior.
*
* @access protected
*/
protected function __clone()
{
// Nothing here.
}
/**
* Construct
*/
protected function __construct()
{
Option::$options = new Table('options');
}
/**
* Add a new option
*
*
* Option::add('pages_limit', 10);
* Option::add(array('pages_count' => 10, 'pages_default' => 'home'));
*
*
* @param mixed $option Name of option to add.
* @param mixed $value Option value.
* @return boolean
*/
public static function add($option, $value = null)
{
if (is_array($option)) {
foreach ($option as $k => $v) {
$_option = Option::$options->select('[name="'.$k.'"]', null);
if (count($_option) == 0) {
Option::$options->insert(array('name' => $k, 'value' => $v));
}
}
} else {
$_option = Option::$options->select('[name="'.$option.'"]', null);
if (count($_option) == 0) {
return Option::$options->insert(array('name' => $option, 'value' => $value));
}
}
}
/**
* Update option value
*
*
* Option::update('pages_limit', 12);
* Option::update(array('pages_count' => 10, 'pages_default' => 'home'));
*
*
* @param mixed $option Name of option to update.
* @param mixed $value Option value.
* @return boolean
*/
public static function update($option, $value = null)
{
if (is_array($option)) {
foreach ($option as $k => $v) {
Option::$options->updateWhere('[name="'.$k.'"]', array('value' => $v));
}
} else {
return Option::$options->updateWhere('[name="'.$option.'"]', array('value' => $value));
}
}
/**
* Get option value
*
*
* $pages_limit = Option::get('pages_limit');
* if ($pages_limit == '10') {
* // do something...
* }
*
*
* @param string $option Name of option to get.
* @return string
*/
public static function get($option)
{
// Redefine vars
$option = (string) $option;
// Select specific option
$option_name = Option::$options->select('[name="'.$option.'"]', null);
// Return specific option value
return isset($option_name['value']) ? $option_name['value'] : '';
}
/**
* Delete option
*
*
* Option::delete('pages_limit');
*
*
* @param string $option Name of option to delete.
* @return boolean
*/
public static function delete($option)
{
// Redefine vars
$option = (string) $option;
// Delete specific option
return Option::$options->deleteWhere('[name="'.$option.'"]');
}
/**
* Check if option exist
*
*
* if (Option::exists('pages_limit')) {
* // do something...
* }
*
*
* @param string $option Name of option to check.
* @return boolean
*/
public static function exists($option)
{
// Redefine vars
$option = (string) $option;
// Check if option exists
return (count(Option::$options->select('[name="'.$option.'"]', null)) > 0) ? true : false;
}
}
================================================
FILE: engine/Plugin/Action.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Action
{
/**
* Actions
*
* @var array
*/
public static $actions = array();
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Hooks a function on to a specific action.
*
*
* // Hooks a function "newLink" on to a "footer" action.
* Action::add('footer', 'newLink', 10);
*
* function newLink() {
* echo 'My link';
* }
*
*
* @param string $action_name Action name
* @param mixed $added_function Added function
* @param integer $priority Priority. Default is 10
* @param array $args Arguments
*/
public static function add($action_name, $added_function, $priority = 10, array $args = null)
{
// Hooks a function on to a specific action.
Action::$actions[] = array(
'action_name' => (string) $action_name,
'function' => $added_function,
'priority' => (int) $priority,
'args' => $args
);
}
/**
* Run functions hooked on a specific action hook.
*
*
* // Run functions hooked on a "footer" action hook.
* Action::run('footer');
*
*
* @param string $action_name Action name
* @param array $args Arguments
* @param boolean $return Return data or not. Default is false
* @return mixed
*/
public static function run($action_name, $args = array(), $return = false)
{
// Redefine arguments
$action_name = (string) $action_name;
$return = (bool) $return;
// Run action
if (count(Action::$actions) > 0) {
// Sort actions by priority
$actions = Arr::subvalSort(Action::$actions, 'priority');
// Loop through $actions array
foreach ($actions as $action) {
// Execute specific action
if ($action['action_name'] == $action_name) {
// isset arguments ?
if (isset($args)) {
// Return or Render specific action results ?
if ($return) {
return call_user_func_array($action['function'], $args);
} else {
call_user_func_array($action['function'], $args);
}
} else {
if ($return) {
return call_user_func_array($action['function'], $action['args']);
} else {
call_user_func_array($action['function'], $action['args']);
}
}
}
}
}
}
}
================================================
FILE: engine/Plugin/Backend.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Backend
{
public static function main()
{
}
}
================================================
FILE: engine/Plugin/Filter.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Filter
{
/**
* Filters
*
* @var array
*/
public static $filters = array();
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Apply filters
*
*
* Filter::apply('content', $content);
*
*
* @param string $filter_name The name of the filter hook.
* @param mixed $value The value on which the filters hooked.
* @return mixed
*/
public static function apply($filter_name, $value)
{
// Redefine arguments
$filter_name = (string) $filter_name;
$args = array_slice(func_get_args(), 2);
if (! isset(Filter::$filters[$filter_name])) {
return $value;
}
foreach (Filter::$filters[$filter_name] as $priority => $functions) {
if (! is_null($functions)) {
foreach ($functions as $function) {
$all_args = array_merge(array($value), $args);
$function_name = $function['function'];
$accepted_args = $function['accepted_args'];
if ($accepted_args == 1) {
$the_args = array($value);
} elseif ($accepted_args > 1) {
$the_args = array_slice($all_args, 0, $accepted_args);
} elseif ($accepted_args == 0) {
$the_args = null;
} else {
$the_args = $all_args;
}
$value = call_user_func_array($function_name, $the_args);
}
}
}
return $value;
}
/**
* Add filter
*
*
* Filter::add('content', 'replacer');
*
* function replacer($content) {
* return preg_replace(array('/\[b\](.*?)\[\/b\]/ms'), array('\1'), $content);
* }
*
*
* @param string $filter_name The name of the filter to hook the $function_to_add to.
* @param mixed $function_to_add The name of the function to be called when the filter is applied.
* @param integer $priority Function to add priority - default is 10.
* @param integer $accepted_args The number of arguments the function accept default is 1.
* @return boolean
*/
public static function add($filter_name, $function_to_add, $priority = 10, $accepted_args = 1)
{
// Redefine arguments
$filter_name = (string) $filter_name;
$function_to_add = $function_to_add;
$priority = (int) $priority;
$accepted_args = (int) $accepted_args;
// Check that we don't already have the same filter at the same priority. Thanks to WP :)
if (isset(Filter::$filters[$filter_name]["$priority"])) {
foreach (Filter::$filters[$filter_name]["$priority"] as $filter) {
if ($filter['function'] == $function_to_add) {
return true;
}
}
}
Filter::$filters[$filter_name]["$priority"][] = array('function' => $function_to_add, 'accepted_args' => $accepted_args);
// Sort
ksort(Filter::$filters[$filter_name]["$priority"]);
return true;
}
}
================================================
FILE: engine/Plugin/Frontend.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Frontend
{
public static function main()
{
}
public static function title()
{
return '';
}
public static function description()
{
return '';
}
public static function keywords()
{
return '';
}
public static function template()
{
return 'index';
}
public static function content()
{
return '';
}
}
================================================
FILE: engine/Plugin/I18n.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class I18n
{
/**
* Locales array
*
* @var array
*/
public static $locales = array(
'ar' => 'العربية',
'bg' => 'Български',
'ca' => 'Català',
'cs' => 'Česky',
'da' => 'Dansk',
'de' => 'Deutsch',
'el' => 'Ελληνικά',
'en' => 'English',
'es' => 'Español',
'fa' => 'Farsi',
'fi' => 'Suomi',
'fr' => 'Français',
'gl' => 'Galego',
'ka-ge' => 'Georgian',
'hu' => 'Magyar',
'it' => 'Italiano',
'id' => 'Bahasa Indonesia',
'ja' => '日本語',
'lt' => 'Lietuvių',
'nl' => 'Nederlands',
'no' => 'Norsk',
'pl' => 'Polski',
'pt' => 'Português',
'pt-br' => 'Português do Brasil',
'ru' => 'Русский',
'sk' => 'Slovenčina',
'sl' => 'Slovenščina',
'sv' => 'Svenska',
'sr' => 'Srpski',
'tr' => 'Türkçe',
'uk' => 'Українська',
'zh-cn' => '简体中文',
);
/**
* Dictionary
*
* @var array
*/
public static $dictionary = array();
/**
* An instance of the I18n class
*
* @var I18n
*/
protected static $instance = null;
/**
* Initializing I18n
*
* @param string $dir Plugins directory
*/
public static function init($locale)
{
if (! isset(self::$instance)) {
self::$instance = new I18n($locale);
}
return self::$instance;
}
/**
* Protected clone method to enforce singleton behavior.
*
* @access protected
*/
protected function __clone()
{
// Nothing here.
}
/**
* Construct
*/
protected function __construct($locale)
{
// Redefine arguments
$locale = (string) $locale;
// Get lang table for current locale
$lang_table = Cache::get('i18n', $locale);
// If lang_table is empty then create new
if (! $lang_table) {
// Get plugins Table
$plugins = new Table('plugins');
// Get all plugins
$records = $plugins->select(null, 'all', null, array('location', 'priority'), 'priority', 'ASC');
// Init var
$lang_table = array();
// Loop through each installed plugin
foreach ($records as $record) {
if (is_dir(ROOT . DS . dirname($record['location']) . DS . 'languages')) {
// Init var
$t = array();
// Check lang file
if (file_exists(ROOT . DS . dirname($record['location']) . DS . 'languages' . DS . $locale . '.lang.php')) {
// Merge the language strings into the sub table
$t = array_merge($t, include ROOT . DS . dirname($record['location']) . DS . 'languages' . DS . $locale . '.lang.php');
}
// Append the sub table, preventing less specific language files from overloading more specific files
$lang_table += $t;
}
}
// Save lang table for current locale
Cache::put('i18n', $locale, $lang_table);
// Update dictionary
I18n::$dictionary = $lang_table;
}
// Update dictionary
I18n::$dictionary = $lang_table;
}
/**
* Returns translation of a string. If no translation exists, the original
* string will be returned. No parameters are replaced.
*
*
* $hello = I18n::find('Hello friends, my name is :name', 'namespace');
*
*
* @param string $string Text to translate
* @param string $namespace Namespace
* @return string
*/
public static function find($string, $namespace = null)
{
// Redefine arguments
$string = (string) $string;
// Return string
if (isset(I18n::$dictionary[$namespace][$string])) {
return I18n::$dictionary[$namespace][$string];
} else {
return $string;
}
}
}
/**
* Global Translation/internationalization function.
* Accepts an English string and returns its translation
* to the active system language. If the given string is not available in the
* current dictionary the original English string will be returned.
*
*
* // Display a translated message
* echo __('Hello, world', 'namespace');
*
* // With parameter replacement
* echo __('Hello, :user', 'namespace', array(':user' => $username));
*
*
* @global array $dictionary Dictionary
* @param string $string String to translate
* @param array $values Values to replace in the translated text
* @param string $namespace Namespace
* @return string
*/
function __($string, $namespace = null, array $values = null)
{
// Redefine arguments
$string = (string) $string;
// Find string in dictionary
$string = I18n::find($string, $namespace);
// Return string
return empty($values) ? $string : strtr($string, $values);
}
================================================
FILE: engine/Plugin/Javascript.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Javascript
{
/**
* Javascripts
*
* @var array
*/
public static $javascripts = array();
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Add javascript
*
*
* Javascript::add('path/to/my/script1.js');
* Javascript::add('path/to/my/script2.js', 'frontend', 11);
* Javascript::add('path/to/my/script3.js', 'backend', 12);
*
*
* @param string $file File path
* @param string $load Load script on frontend, backend or both
* @param inteeer $priority Priority default is 10
*/
public static function add($file, $load = 'frontend', $priority = 10)
{
Javascript::$javascripts[] = array(
'file' => (string) $file,
'load' => (string) $load,
'priority' => (int) $priority,
);
}
/**
* Combine and load site javascript
*/
public static function load()
{
$backend_site_js_path = MINIFY . DS . 'backend_site.minify.js';
$frontend_site_js_path = MINIFY . DS . 'frontend_site.minify.'.Option::get('javascript_version').'.js';
// Load javascripts
if (count(Javascript::$javascripts) > 0) {
$backend_buffer = '';
$backend_regenerate = false;
$frontend_buffer = '';
$frontend_regenerate = false;
// Sort javascripts by priority
$javascripts = Arr::subvalSort(Javascript::$javascripts, 'priority');
if (BACKEND) {
// Build backend site javascript
foreach ($javascripts as $javascript) {
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both'))) {
if (! file_exists($backend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($backend_site_js_path)) {
$backend_regenerate = true;
break;
}
}
}
// Regenerate site javascript
if ($backend_regenerate) {
foreach ($javascripts as $javascript) {
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both'))) {
$backend_buffer .= file_get_contents(ROOT . DS . $javascript['file'])."\n";
}
}
file_put_contents($backend_site_js_path, $backend_buffer);
$backend_regenerate = false;
}
} else {
// Build frontend site javascript
foreach ($javascripts as $javascript) {
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both'))) {
if (! file_exists($frontend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($frontend_site_js_path)) {
$frontend_regenerate = true;
break;
}
}
}
// Regenerate site javascript
if ($frontend_regenerate) {
foreach ($javascripts as $javascript) {
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both'))) {
$frontend_buffer .= file_get_contents(ROOT . DS . $javascript['file'])."\n";
}
}
file_put_contents($frontend_site_js_path, $frontend_buffer);
$frontend_regenerate = false;
}
}
// Render
if (BACKEND) {
echo '';
} else {
echo ''."\n";
}
}
}
/**
* javascriptVersionIncrement
*/
public static function javascriptVersionIncrement()
{
Option::update('javascript_version', (int) Option::get('javascript_version') + 1);
}
}
================================================
FILE: engine/Plugin/Navigation.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Navigation
{
/**
* Items
*
* @var array
*/
public static $items = array();
/**
* Navigation types
*/
const LEFT = 1;
const TOP = 2;
/**
* Add new item
*
*
* // Add link for left navigation
* Navigation::add(__('Blog'), 'content', 'blog', 11);
*
* // Add link for top navigation
* Navigation::add(__('View site'), 'top', 'http://site.com/', 11, Navigation::TOP, true);
*
*
* @param string $name Name
* @param string $category Category
* @param stirng $link Link
* @param integer $priority Priority. Default is 10
* @param integer $type Type. Default is LEFT
* @param bool $external External or not. Default is false
*/
public static function add($name, $category, $id, $priority = 10, $type = Navigation::LEFT, $external = false)
{
Navigation::$items[] = array(
'name' => (string) $name,
'category' => (string) $category,
'id' => (string) $id,
'priority' => (int) $priority,
'type' => (int) $type,
'external' => (bool) $external,
);
}
/**
* Draw items
*
*
* Navigation::draw('content');
* Navigation::draw('top', Navigation::TOP);
*
*
* @param string $category Category
* @param integer $type Type. Default is LEFT
*/
public static function draw($category, $type = Navigation::LEFT)
{
// Sort items by priority
$items = Arr::subvalSort(Navigation::$items, 'priority');
// Draw left navigation
if ($type == Navigation::LEFT) {
// Loop trough the items
foreach ($items as $item) {
// If current plugin id == selected item id then set class to current
if (Request::get('id') == $item['id'] && $item['external'] == false) {
$class = 'class = "current" ';
} else {
$class = '';
}
// If current category == item category and navigation type is left them draw this item
if ($item['category'] == $category && $item['type'] == Navigation::LEFT) {
// Is external item id or not ?
if ($item['external'] == false) {
echo ''.$item['name'].' ';
} else {
echo ''.$item['name'].' ';
}
}
}
} elseif ($type == Navigation::TOP) {
// Draw top navigation
foreach ($items as $item) {
if ($item['category'] == $category && $item['type'] == Navigation::TOP) {
if ($item['external'] == false) {
echo ''.$item['name'].''.Html::nbsp(2);
} else {
echo ''.$item['name'].''.Html::nbsp(2);
}
}
}
}
}
/**
* Draw items
*
*
* Navigation::draw('content');
* Navigation::draw('top', Navigation::TOP);
*
*
* @param string $category Category
* @param integer $type Type. Default is LEFT
*/
public static function get($category, $type = Navigation::LEFT)
{
// Sort items by priority
$items = Arr::subvalSort(Navigation::$items, 'priority');
// Draw left navigation
if ($type == Navigation::LEFT) {
// Loop trough the items
foreach ($items as $item) {
// If current plugin id == selected item id then set class to current
if (Request::get('id') == $item['id'] && $item['external'] == false) {
$class = 'class = "current" ';
} else {
$class = '';
}
// If current category == item category and navigation type is left them draw this item
if ($item['category'] == $category && $item['type'] == Navigation::LEFT) {
// Is external item id or not ?
if ($item['external'] == false) {
echo ''.$item['name'].' ';
} else {
echo ''.$item['name'].' ';
}
}
}
} elseif ($type == Navigation::TOP) {
// Draw top navigation
foreach ($items as $item) {
if ($item['category'] == $category && $item['type'] == Navigation::TOP) {
if ($item['external'] == false) {
echo ''.$item['name'].''.Html::nbsp(2);
} else {
echo ''.$item['name'].''.Html::nbsp(2);
}
}
}
}
}
/**
* Draw dropdown items
*
*
* Navigation::getDropdown('content');
*
*
* @param string $category Category
*/
public static function getDropdown($category)
{
// Sort items by priority
$items = Arr::subvalSort(Navigation::$items, 'priority');
// Loop trough the items
foreach ($items as $item) {
// If current plugin id == selected item id then set class to current
if (Request::get('id') == $item['id'] && $item['external'] == false) {
$class = 'selected = "selected" ';
} else {
$class = '';
}
// If current category == item category and navigation type is left them draw this item
if ($item['category'] == $category && $item['type'] == Navigation::LEFT) {
// Is external item id or not ?
if ($item['external'] == false) {
echo '';
}
}
}
}
}
================================================
FILE: engine/Plugin/Plugin.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Plugin
{
/**
* Plugins
*
* @var array
*/
public static $plugins = array();
/**
* Components
*
* @var array
*/
public static $components = array();
/**
* An instance of the Plugin class
*
* @var plugin
*/
protected static $instance = null;
/**
* Initializing plugins
*
* @return Plugin
*/
public static function init()
{
if (! isset(self::$instance)) {
self::$instance = new Plugin();
}
return self::$instance;
}
/**
* Protected clone method to enforce singleton behavior.
*
* @access protected
*/
protected function __clone()
{
// Nothing here.
}
/**
* Construct
*/
protected function __construct()
{
// Get plugins Table
$plugins = new Table('plugins');
// Select all plugins
$records = $plugins->select(null, 'all', null, array('location', 'status', 'priority'), 'priority', 'ASC');
// Now include plugins from $records plugins array
// If plugin is active then load it to the system.
foreach ($records as $record) {
if ($record['status'] == 'active') {
include_once ROOT . DS . $record['location'];
}
}
}
/**
* Get plugin admin
*
*
* // Get admin for Blog plugin
* Plugin::admin('blog');
*
*
* @param string $plug Plugin Name
* @param string $alt_folder Alternative plugin folder
*/
public static function admin($plug, $alt_folder = null)
{
// Redefine arguments
$plug = (string) $plug;
// Plugin admin extension
$ext = '.admin.php';
// Plugin admin can be loaded only in backend
if (BACKEND) {
// Plugin admin folder
if (! empty($alt_folder)) {
$folder = $alt_folder . DS . strtolower($plug);
} else {
$folder = strtolower($plug);
}
// Path to plugin admin file
$path = PLUGINS . DS . $folder . DS . $plug . $ext;
// Load plugin admin
if (File::exists($path)) {
include $path;
}
}
}
/**
* Register new plugin in system
*
*
* // Register plugin
* Plugin::register( __FILE__,
* __('Blog'),
* __('Blog plugin'),
* '1.0.0',
* 'Awilum',
* 'http://example.org/',
* 'blog');
*
*
* @param string $file Plugin file
* @param string $title Plugin title
* @param string $description Plugin description
* @param string $version Plugin version
* @param string $author Plugin author
* @param string $author_uri Plugin author uri
* @param string $component Plugin as component
* @param boolean $box Plugin as box
*/
public static function register($file, $title, $description = null, $version = null, $author = null, $author_uri = null, $component = null, $box = false)
{
// Redefine arguments
$file = (string) $file;
$title = (string) $title;
$description = ($description === null) ? null : (string) $description;
$version = ($version === null) ? null : (string) $version;
$author = ($author === null) ? null : (string) $author;
$author_uri = ($author_uri === null) ? null : (string) $author_uri;
$component = ($component === null) ? null : (string) $component;
$box = (bool) $box;
// Get plugin id from name.plugin.php
$id = strtolower(basename($file, '.plugin.php'));
// Set plugin privilege 'box' if $box is true
if ($box) {
$privilege = 'box';
} else {
$privilege = '';
}
// Register plugin in global plugins array.
Plugin::$plugins[$id] = array(
'id' => $id,
'title' => $title,
'privilege' => $privilege,
'version' => $version,
'description' => $description,
'author' => $author,
'author_uri' => $author_uri,
);
// Add plugin as a component
// Plugin - component will be available at the link sitename/component_name
// Example:
// www.example.org/guestbook
// www.example.org/news
if (! empty($component)) {
Plugin::$components[] = $component;
}
}
}
================================================
FILE: engine/Plugin/Stylesheet.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Stylesheet
{
/**
* Stylesheets
*
* @var array
*/
public static $stylesheets = array();
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Add stylesheet
*
*
* Stylesheet::add('path/to/my/stylesheet1.css');
* Stylesheet::add('path/to/my/stylesheet2.css', 'frontend', 11);
* Stylesheet::add('path/to/my/stylesheet3.css', 'backend',12);
*
*
* @param string $file File path
* @param string $load Load stylesheet on frontend, backend or both
* @param integer $priority Priority. Default is 10
*/
public static function add($file, $load = 'frontend', $priority = 10)
{
Stylesheet::$stylesheets[] = array(
'file' => (string) $file,
'load' => (string) $load,
'priority' => (int) $priority,
);
}
/**
* Minify, combine and load site stylesheet
*/
public static function load()
{
$backend_site_css_path = MINIFY . DS . 'backend_site.minify.css';
$frontend_site_css_path = MINIFY . DS . 'frontend_site.minify.'.Option::get('styles_version').'.css';
// Load stylesheets
if (count(Stylesheet::$stylesheets) > 0) {
$backend_buffer = '';
$backend_regenerate = false;
$frontend_buffer = '';
$frontend_regenerate = false;
// Sort stylesheets by priority
$stylesheets = Arr::subvalSort(Stylesheet::$stylesheets, 'priority');
if (BACKEND) {
// Build backend site stylesheets
foreach ($stylesheets as $stylesheet) {
if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both'))) {
if (! file_exists($backend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($backend_site_css_path)) {
$backend_regenerate = true;
break;
}
}
}
// Regenerate site stylesheet
if ($backend_regenerate) {
foreach ($stylesheets as $stylesheet) {
if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both'))) {
$backend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']);
}
}
$backend_buffer = Stylesheet::parseVariables($backend_buffer);
file_put_contents($backend_site_css_path, MinifyCSS::process($backend_buffer));
$backend_regenerate = false;
}
} else {
// Build frontend site stylesheets
foreach ($stylesheets as $stylesheet) {
if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both'))) {
if (! file_exists($frontend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($frontend_site_css_path)) {
$frontend_regenerate = true;
break;
}
}
}
// Regenerate site stylesheet
if ($frontend_regenerate) {
foreach ($stylesheets as $stylesheet) {
if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both'))) {
$frontend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']);
}
}
$frontend_buffer = Stylesheet::parseVariables($frontend_buffer);
file_put_contents($frontend_site_css_path, MinifyCSS::process($frontend_buffer));
$frontend_regenerate = false;
}
}
// Render
if (BACKEND) {
echo '';
} else {
echo ''."\n";
}
}
}
/**
* CSS Parser
*/
public static function parseVariables($frontend_buffer)
{
return str_replace(array('@site_url',
'@theme_site_url',
'@theme_admin_url'),
array(Option::get('siteurl'),
Option::get('siteurl').'/public/themes/'.Option::get('theme_site_name'),
Option::get('siteurl').'/admin/themes/'.Option::get('theme_admin_name')),
$frontend_buffer);
}
/**
* stylesVersionIncrement
*/
public static function stylesVersionIncrement()
{
Option::update('styles_version', (int) Option::get('styles_version') + 1);
}
}
================================================
FILE: engine/Plugin/View.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class View
{
/**
* Path to view file.
*
* @var string
*/
protected $view_file;
/**
* View variables.
*
* @var array
*/
protected $vars = array();
/**
* Global view variables.
*
* @var array
*/
protected static $global_vars = array();
/**
* The output.
*
* @var string
*/
protected $output;
/**
* Create a new view object.
*
*
* // Create new view object
* $view = new View('blog/views/backend/index');
*
* // Assign some new variables
* $view->assign('msg', 'Some message...');
*
* // Get view
* $output = $view->render();
*
* // Display view
* echo $output;
*
*
* @param string $view Name of the view file
* @param array $variables Array of view variables
*/
public function __construct($view, array $variables = array())
{
// Set view file
// From current theme folder or from plugin folder
if (File::exists($theme_view_file = THEMES_SITE . DS . Site::theme() . DS . $view . '.view.php') && BACKEND == false) {
$this->view_file = $theme_view_file;
} else {
$this->view_file = PLUGINS . DS . $view . '.view.php';
}
// Is view file exists ?
if (file_exists($this->view_file) === false) {
throw new RuntimeException(vsprintf("%s(): The '%s' view does not exist.", array(__METHOD__, $view)));
}
// Set view variables
$this->vars = $variables;
}
/**
* View factory
*
*
* // Create new view object, assign some variables
* // and displays the rendered view in the browser.
* View::factory('blog/views/backend/index')
* ->assign('msg', 'Some message...')
* ->display();
*
*
* @param string $view Name of the view file
* @param array $variables Array of view variables
* @return View
*/
public static function factory($view, array $variables = array())
{
return new View($view, $variables);
}
/**
* Assign a view variable.
*
*
* $view->assign('msg', 'Some message...');
*
*
* @param string $key Variable name
* @param mixed $value Variable value
* @param boolean $global Set variable available in all views
* @return View
*/
public function assign($key, $value, $global = false)
{
// Assign a new view variable (global or locale)
if ($global === false) {
$this->vars[$key] = $value;
} else {
View::$global_vars[$key] = $value;
}
return $this;
}
/**
* Include the view file and extracts the view variables before returning the generated output.
*
*
* // Get view
* $output = $view->render();
*
* // Display output
* echo $output;
*
*
* @param string $filter Callback function used to filter output
* @return string
*/
public function render($filter = null)
{
// Is output empty ?
if (empty($this->output)) {
// Extract variables as references
extract(array_merge($this->vars, View::$global_vars), EXTR_REFS);
// Turn on output buffering
ob_start();
// Include view file
include($this->view_file);
// Output...
$this->output = ob_get_clean();
}
// Filter output ?
if ($filter !== null) {
$this->output = call_user_func($filter, $this->output);
}
// Return output
return $this->output;
}
/**
* Displays the rendered view in the browser.
*
*
* $view->display();
*
*
*/
public function display()
{
echo $this->render();
}
/**
* Magic setter method that assigns a view variable.
*
* @param string $key Variable name
* @param mixed $value Variable value
*/
public function __set($key, $value)
{
$this->vars[$key] = $value;
}
/**
* Magic getter method that returns a view variable.
*
* @param string $key Variable name
* @return mixed
*/
public function __get($key)
{
if (isset($this->vars[$key])) {
return $this->vars[$key];
}
}
/**
* Magic isset method that checks if a view variable is set.
*
* @param string $key Variable name
* @return boolean
*/
public function __isset($key)
{
return isset($this->vars[$key]);
}
/**
* Magic unset method that unsets a view variable.
*
* @param string $key Variable name
*/
public function __unset($key)
{
unset($this->vars[$key]);
}
/**
* Method that magically converts the view object into a string.
*
* @return string
*/
public function __toString()
{
return $this->render();
}
}
================================================
FILE: engine/Security.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Security
{
/**
* Key name for token storage
*
* @var string
*/
protected static $token_name = 'security_token';
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Generate and store a unique token which can be used to help prevent
* [CSRF](http://wikipedia.org/wiki/Cross_Site_Request_Forgery) attacks.
*
*
* $token = Security::token();
*
*
* You can insert this token into your forms as a hidden field:
*
*
* echo Form::hidden('csrf', Security::token());
*
*
* This provides a basic, but effective, method of preventing CSRF attacks.
*
* @param boolean $new force a new token to be generated?. Default is false
* @return string
*/
public static function token($new = false)
{
// Get the current token
$token = Session::get(Security::$token_name);
// Create a new unique token
if ($new === true or ! $token) {
// Generate a new unique token
$token = sha1(uniqid(mt_rand(), true));
// Store the new token
Session::set(Security::$token_name, $token);
}
// Return token
return $token;
}
/**
* Check that the given token matches the currently stored security token.
*
*
* if (Security::check($token)) {
* // Pass
* }
*
*
* @param string $token token to check
* @return boolean
*/
public static function check($token)
{
return Security::token() === $token;
}
/**
* Encrypt password
*
*
* $encrypt_password = Security::encryptPassword('password');
*
*
* @param string $password Password to encrypt
*/
public static function encryptPassword($password)
{
return md5(md5(trim($password) . MONSTRA_PASSWORD_SALT));
}
/**
* Create safe name. Use to create safe username, filename, pagename.
*
*
* $safe_name = Security::safeName('hello world');
*
*
* @param string $str String
* @param mixed $delimiter String delimiter
* @param boolean $lowercase String Lowercase
* @return string
*/
public static function safeName($str, $delimiter = '-', $lowercase = false)
{
// Redefine vars
$str = (string) $str;
$delimiter = $delimiter;
$lowercase = (bool) $lowercase;
$delimiter = $delimiter;
// Remove tags
$str = filter_var($str, FILTER_SANITIZE_STRING);
// Decode all entities to their simpler forms
$str = html_entity_decode($str, ENT_QUOTES, 'UTF-8');
// Reserved characters (RFC 3986)
$reserved_characters = array(
'/', '?', ':', '@', '#', '[', ']',
'!', '$', '&', '\'', '(', ')', '*',
'+', ',', ';', '='
);
// Remove reserved characters
$str = str_replace($reserved_characters, ' ', $str);
// Set locale to en_US.UTF8
setlocale(LC_ALL, 'en_US.UTF8');
// Translit ua,ru => latin
$str = Text::translitIt($str);
// Convert string
$str = iconv('UTF-8', 'ASCII//TRANSLIT', $str);
// Remove characters
$str = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $str);
if ($delimiter != null) {
$str = preg_replace("/[\/_|+ -]+/", $delimiter, $str);
$str = trim($str, $delimiter);
}
// Lowercase
if ($lowercase === true) {
$str = Text::lowercase($str);
}
// Return safe name
return $str;
}
/**
* Create safe url.
*
*
* $url = Security::sanitizeURL('http://test.com');
*
*
* @param string $url Url to sanitize
* @return string
*/
public static function sanitizeURL($url)
{
$url = trim($url);
$url = rawurldecode($url);
$url = str_replace(array('--', '"', '!', '@', '#', '$', '%', '^', '*', '(', ')', '+', '{', '}', '|', ':', '"', '<', '>',
'[', ']', '\\', ';', "'", ',', '*', '+', '~', '`', 'laquo', 'raquo', ']>', '‘', '’', '“', '”', '–', '—'),
array('-', '-', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
$url);
$url = str_replace('--', '-', $url);
$url = rtrim($url, "-");
$url = str_replace('..', '', $url);
$url = str_replace('//', '', $url);
$url = preg_replace('/^\//', '', $url);
$url = preg_replace('/^\./', '', $url);
return $url;
}
/**
* Sanitize URL to prevent XSS - Cross-site scripting
*/
public static function runSanitizeURL()
{
$_GET = array_map('Security::sanitizeURL', $_GET);
}
/**
* That prevents null characters between ascii characters.
*
* @param string $str String
*/
public static function removeInvisibleCharacters($str)
{
// Redefine vars
$str = (string) $str;
// Thanks to ci for this tip :)
$non_displayables = array('/%0[0-8bcef]/', '/%1[0-9a-f]/', '/[\x00-\x08]/', '/\x0b/', '/\x0c/', '/[\x0e-\x1f]/');
do {
$cleaned = $str;
$str = preg_replace($non_displayables, '', $str);
} while ($cleaned != $str);
// Return safe string
return $str;
}
/**
* Sanitize data to prevent XSS - Cross-site scripting
*
* @param string $str String
*/
public static function xssClean($str)
{
// Remove invisible characters
$str = Security::removeInvisibleCharacters($str);
// Convert html to plain text
$str = Html::toText($str);
// Return safe string
return $str;
}
}
================================================
FILE: engine/Shortcode.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Shortcode
{
/**
* Shortcode tags array
*
* @var shortcode_tags
*/
protected static $shortcode_tags = array();
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Add new shortcode
*
*
* function returnSiteUrl() {
* return Option::get('siteurl');
* }
*
* // Add shortcode {siteurl}
* Shortcode::add('siteurl', 'returnSiteUrl');
*
*
* @param string $shortcode Shortcode tag to be searched in content.
* @param string $callback_function The callback function to replace the shortcode with.
*/
public static function add($shortcode, $callback_function)
{
// Redefine vars
$shortcode = (string) $shortcode;
// Add new shortcode
if (is_callable($callback_function)) {
Shortcode::$shortcode_tags[$shortcode] = $callback_function;
}
}
/**
* Remove a specific registered shortcode.
*
*
* Shortcode::delete('shortcode_name');
*
*
* @param string $shortcode Shortcode tag.
*/
public static function delete($shortcode)
{
// Redefine vars
$shortcode = (string) $shortcode;
// Delete shortcode
if (Shortcode::exists($shortcode)) {
unset(Shortcode::$shortcode_tags[$shortcode]);
}
}
/**
* Remove all registered shortcodes.
*
*
* Shortcode::clear();
*
*
*/
public static function clear()
{
Shortcode::$shortcode_tags = array();
}
/**
* Check if a shortcode has been registered.
*
*
* if (Shortcode::exists('shortcode_name')) {
* // do something...
* }
*
*
* @param string $shortcode Shortcode tag.
*/
public static function exists($shortcode)
{
// Redefine vars
$shortcode = (string) $shortcode;
// Check shortcode
return array_key_exists($shortcode, Shortcode::$shortcode_tags);
}
/**
* Parse a string, and replace any registered shortcodes within it with the result of the mapped callback.
*
*
* $content = Shortcode::parse($content);
*
*
* @param string $content Content
* @return string
*/
public static function parse($content)
{
if (! Shortcode::$shortcode_tags) {
return $content;
}
$shortcodes = implode('|', array_map('preg_quote', array_keys(Shortcode::$shortcode_tags)));
$pattern = "/(.?)\{([$shortcodes]+)(.*?)(\/)?\}(?(4)|(?:(.+?)\{\/\s*\\2\s*\}))?(.?)/s";
return preg_replace_callback($pattern, 'Shortcode::_handle', $content);
}
/**
* _handle()
*/
protected static function _handle($matches)
{
$prefix = $matches[1];
$suffix = $matches[6];
$shortcode = $matches[2];
// Allow for escaping shortcodes by enclosing them in {{shortcode}}
if ($prefix == '{' && $suffix == '}') {
return substr($matches[0], 1, -1);
}
$attributes = array(); // Parse attributes into into this array.
if (preg_match_all('/(\w+) *= *(?:([\'"])(.*?)\\2|([^ "\'>]+))/', $matches[3], $match, PREG_SET_ORDER)) {
foreach ($match as $attribute) {
if (! empty($attribute[4])) {
$attributes[strtolower($attribute[1])] = $attribute[4];
} elseif (! empty($attribute[3])) {
$attributes[strtolower($attribute[1])] = $attribute[3];
}
}
}
// Check if this shortcode realy exists then call user function else return empty string
return (isset(Shortcode::$shortcode_tags[$shortcode])) ? $prefix . call_user_func(Shortcode::$shortcode_tags[$shortcode], $attributes, $matches[5], $shortcode) . $suffix : '';
}
}
================================================
FILE: engine/Site.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Site
{
/**
* An instance of the Site class
*
* @var site
*/
protected static $instance = null;
/**
* Initializing site
*
* @return Site
*/
public static function init()
{
if (! isset(self::$instance)) {
self::$instance = new Site();
}
return self::$instance;
}
/**
* Protected clone method to enforce singleton behavior.
*
* @access protected
*/
protected function __clone()
{
// Nothing here.
}
/**
* Construct
*/
protected function __construct()
{
call_user_func(ucfirst(Uri::command()).'::main');
}
/**
* Get site name
*
*
* echo Site::name();
*
*
* @return string
*/
public static function name()
{
return Option::get('sitename');
}
/**
* Get site theme
*
*
* echo Site::theme();
*
*
* @return string
*/
public static function theme()
{
return Option::get('theme_site_name');
}
/**
* Get Page title
*
*
* echo Site::title();
*
*
* @return string
*/
public static function title()
{
return call_user_func(ucfirst(Uri::command()).'::title');
}
/**
* Get page description
*
*
* echo Site::description();
*
*
* @return string
*/
public static function description()
{
return (($description = trim(call_user_func(ucfirst(Uri::command()).'::description'))) == '') ? Html::toText(Option::get('description')) : Html::toText($description);
}
/**
* Get page keywords
*
*
* echo Site::keywords();
*
*
* @return string
*/
public static function keywords()
{
return (($keywords = trim(call_user_func(ucfirst(Uri::command()).'::keywords'))) == '') ? Html::toText(Option::get('keywords')) : Html::toText($keywords);
}
/**
* Get site slogan
*
*
* echo Site::slogan();
*
*
* @return string
*/
public static function slogan()
{
return Option::get('slogan');
}
/**
* Get page content
*
*
* echo Site::content();
*
*
* @return string
*/
public static function content()
{
return Filter::apply('content', call_user_func(ucfirst(Uri::command()).'::content'));
}
/**
* Get compressed template
*
*
* echo Site::template();
*
*
* @param string $theme Theme name
* @return mixed
*/
public static function template($theme = null)
{
// Get specific theme or current theme
$current_theme = ($theme == null) ? Option::get('theme_site_name') : $theme ;
// Get template
$template = call_user_func(ucfirst(Uri::command()).'::template');
// Check whether is there such a template in the current theme
// else return default template: index
// also compress template file :)
if (File::exists(THEMES_SITE . DS . $current_theme . DS . $template . '.template.php')) {
if (! file_exists(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php') or
filemtime(THEMES_SITE . DS . $current_theme . DS . $template .'.template.php') > filemtime(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php')) {
$buffer = file_get_contents(THEMES_SITE. DS . $current_theme . DS . $template .'.template.php');
$buffer = MinifyHTML::process($buffer);
file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php', $buffer);
}
return 'minify.'.$template;
} else {
if (! File::exists(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php') or
filemtime(THEMES_SITE . DS . $current_theme . DS . 'index.template.php') > filemtime(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php')) {
$buffer = file_get_contents(THEMES_SITE . DS . $current_theme . DS . 'index.template.php');
$buffer = MinifyHTML::process($buffer);
file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php', $buffer);
}
return 'minify.index';
}
}
/**
* Get site url
*
*
* echo Site::url();
*
*
* @return string
*/
public static function url()
{
return Option::get('siteurl');
}
/**
* Get copyright information
*
*
* echo Site::powered();
*
*
* @return string
*/
public static function powered()
{
return __('Powered by', 'system').' Monstra ' . Monstra::VERSION;
}
}
================================================
FILE: engine/Uri.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Uri
{
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Default component
*
* @var string
*/
public static $default_component = 'pages';
/**
* Get uri and explode command/param1/param2
*
*
* $segments = Uri::segments();
*
*
* @return array
*/
public static function segments()
{
// Get request uri and current script path
$request_uri = explode('/', $_SERVER['REQUEST_URI']);
$script_name = explode('/', $_SERVER['SCRIPT_NAME']);
// Delete script name
for ($i = 0; $i < sizeof($script_name); $i++) {
if ($request_uri[$i] == $script_name[$i]) {
unset($request_uri[$i]);
}
}
// Get all the values of an array
$uri = array_values($request_uri);
// Ability to pass parameters
foreach ($uri as $i => $u) {
if (isset($uri[$i])) {
$pos = strrpos($uri[$i], "?");
if ($pos === false) {
$uri[$i] = Security::sanitizeURL($uri[$i]);
} else {
$uri[$i] = Security::sanitizeURL(substr($uri[$i], 0, $pos));
}
}
}
// Return uri segments
return $uri;
}
/**
* Get uri segment
*
*
* $segment = Uri::segment(1);
*
*
* @param integer $segment Segment
* @return mixed
*/
public static function segment($segment)
{
$segments = Uri::segments();
return isset($segments[$segment]) ? $segments[$segment] : null;
}
/**
* Get command/component from registed components
*
*
* $command = Uri::command();
*
*
* @return array
*/
public static function command()
{
// Get uri segments
$uri = Uri::segments();
if (! isset($uri[0])) {
$uri[0] = Uri::$default_component;
} else {
if (! in_array($uri[0], Plugin::$components)) {
$uri[0] = Uri::$default_component;
} else {
$uri[0] = $uri[0];
}
}
return $uri[0];
}
/**
* Get uri parammeters
*
*
* $params = Uri::params();
*
*
* @return array
*/
public static function params()
{
//Init data array
$data = array();
// Get URI
$uri = Uri::segments();
// http://site.com/ and http://site.com/index.php same main home pages
if (! isset($uri[0])) {
$uri[0] = '';
}
// param1/param2
if ($uri[0] !== Uri::$default_component) {
if (isset($uri[1])) {
foreach ($uri as $part) {
$data[] = $part;
}
} else { // default
$data[0] = $uri[0];
}
} else {
// This is good for box plugin Pages
// parent/child
if (isset($uri[2])) {
$data[0] = $uri[1];
$data[1] = $uri[2];
} else { // default
$data[0] = $uri[1];
}
}
return $data;
}
}
================================================
FILE: engine/Xmldb/DB.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class DB
{
/**
* XMLDB directory
*
* @var string
*/
public static $db_dir = STORAGE;
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Configure the settings of XMLDB
*
* @param mixed $setting Setting name
* @param mixed $value Setting value
*/
public static function configure($setting, $value)
{
if (property_exists("db", $setting)) {
DB::$$setting = $value;
}
}
/**
* Create new database
*
* @param string $db_name Database name
* @param integer $mode Mode
* @return boolean
*/
public static function create($db_name, $chmod = 0775)
{
// Redefine vars
$db_name = (string) $db_name;
// Create
if (is_dir(DB::$db_dir . '/' . $db_name)) {
return false;
}
return mkdir(DB::$db_dir . '/' . $db_name, $chmod);
}
/**
* Drop database
*
* @param string $db_name Database name
* @return boolean
*/
public static function drop($db_name)
{
// Redefine vars
$db_name = (string) $db_name;
// Drop
if (is_dir(DB::$db_dir . '/' . $db_name)) {
$ob=scandir(DB::$db_dir . '/' . $db_name); foreach ($ob as $o) {
if ($o!='.'&&$o!='..') {
if (filetype(DB::$db_dir . '/' . $db_name.'/'.$o)=='dir') {
DB::drop(DB::$db_dir . '/' . $db_name.'/'.$o);
} else {
unlink(DB::$db_dir . '/' . $db_name.'/'.$o);
}
}
}
}
reset($ob);
rmdir(DB::$db_dir . '/' . $db_name);
}
}
================================================
FILE: engine/Xmldb/Table.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Table
{
/**
* XMLDB Tables directory
*
* @var string
*/
public static $tables_dir = XMLDB;
/**
* Table
*
* @var object
*/
private $table;
/**
* Table name
*
* @var string
*/
private $name;
/**
* Configure the settings of XMLDB Tables
*
* @param mixed $setting Setting name
* @param mixed $value Setting value
*/
public static function configure($setting, $value)
{
if (property_exists("table", $setting)) {
Table::$$setting = $value;
}
}
/**
* Table factory.
*
*
* $users = Table::factory('table_name');
*
*
* @param string $table_name Table name
* @return Table
*/
public static function factory($table_name)
{
return new Table($table_name);
}
/**
* Table construct
*
*
* $users = new Table('table_name');
*
*
* @param string $table_name Table name
*/
public function __construct($table_name)
{
// Redefine vars
$table_name = (string) $table_name;
$this->table = Table::get($table_name);
$this->name = $table_name;
}
/**
* Create new table
*
* XMLDB Table structure:
*
*
*
* 0
*
*
*
*
*
* value
* value
*
*
*
*
* Table::create('table_name', array('field1', 'field2'));
*
*
* @param string $table_name Table name
* @param array $fields Fields
* @return boolean
*/
public static function create($table_name, $fields)
{
// Redefine vars
$table_name = (string) $table_name;
if (! file_exists(Table::$tables_dir . '/' . $table_name . '.table.xml') &&
is_dir(dirname(Table::$tables_dir)) &&
is_writable(dirname(Table::$tables_dir)) &&
isset($fields) &&
is_array($fields)) {
// Create table fields
$_fields = '';
foreach ($fields as $field) {
$_fields .= "<$field/>";
}
$_fields .= ' ';
// Create new table
return file_put_contents(Table::$tables_dir . '/' . $table_name . '.table.xml', '0 '.$_fields.' ', LOCK_EX);
} else {
// Something wrong... return false
return false;
}
}
/**
* Delete table
*
*
* Table::drop('table_name');
*
*
* @param string $table_name Table name
* @return boolean
*/
public static function drop($table_name)
{
// Redefine vars
$table_name = (string) $table_name;
// Drop
if (! is_dir(Table::$tables_dir . '/' . $table_name . '.table.xml')) {
return unlink(Table::$tables_dir . '/' . $table_name . '.table.xml');
}
return false;
}
/**
* Get table
*
*
* $table = Table::get('table_name');
*
*
* @param array $table_name Table name
* @return mixed
*/
public static function get($table_name)
{
// Redefine vars
$table_name = (string) $table_name;
// Load table
if (file_exists(Table::$tables_dir . '/' . $table_name.'.table.xml') && is_file(Table::$tables_dir . '/' . $table_name.'.table.xml')) {
$data = array('xml_object' => XML::loadFile(Table::$tables_dir . '/' . $table_name.'.table.xml'),
'xml_filename' => Table::$tables_dir . '/' . $table_name.'.table.xml');
return $data;
} else {
return false;
}
}
/**
* Get information about table
*
*
* var_dump($users->info());
*
*
* @return array
*/
public function info()
{
return array(
'table_name' => basename($this->table['xml_filename'], '.table.xml'),
'table_size' => filesize($this->table['xml_filename']),
'table_last_change' => filemtime($this->table['xml_filename']),
'table_last_access' => fileatime($this->table['xml_filename']),
'table_fields' => $this->fields(),
'records_count' => $this->count(),
'records_last_id' => $this->lastId()
);
}
/**
* Get table fields
*
*
* var_dump($users->fields());
*
*
* @return array
*/
public function fields()
{
// Select fields
$fields_obj = Table::_selectOne($this->table, "fields");
// Create fields array
foreach ($fields_obj as $key => $field) {
$fields[] = $key;
}
// Return array of fields
return $fields;
}
/**
* Add new field
*
*
* $users->addField('test');
*
*
* @param string $name Field name
* @return boolean
*/
public function addField($name)
{
// Redefine vars
$name = (string) $name;
// Get table
$table = $this->table;
// Select all fields
$fields = Table::_selectOne($this->table, "fields");
// Select current field
$field = Table::_selectOne($this->table, "fields/{$name}");
// If field dosnt exists than create new field
if ($field == null) {
// Create new field
$fields->addChild($name, '');
// Save table
return Table::_save($table);
} else {
return false;
}
}
/**
* Delete field
*
*
* $users->deleteField('test');
*
*
* @param string $name Field name
* @return boolean
*/
public function deleteField($name)
{
// Redefine vars
$name = (string) $name;
// Get table
$table = $this->table;
// Select field
$field = Table::_selectOne($this->table, "fields/{$name}");
// If field exist than delete it
if ($field != null) {
// Delete field
unset($field[0]);
// Save table
return Table::_save($table);
} else {
return false;
}
}
/**
* Update field
*
*
* $users->updateField('login', 'username');
*
*
* @param string $old_name Old field name
* @param string $new_name New field name
* @return boolean
*/
public function updateField($old_name, $new_name)
{
if (file_exists(Table::$tables_dir . '/' . $this->name.'.table.xml') && is_file(Table::$tables_dir . '/' . $this->name.'.table.xml')) {
$table = strtr(file_get_contents(Table::$tables_dir . '/' . $this->name.'.table.xml'), array('<'.$old_name.'>' => '<'.$new_name.'>',
''.$old_name.'>' => ''.$new_name.'>',
'<'.$old_name.'/>' => '<'.$new_name.'/>'));
if (file_put_contents(Table::$tables_dir . '/' . $this->name.'.table.xml', $table)) {
return true;
} else {
return false;
}
}
}
/**
* Check if field exist
*
*
* if ($users->existsField('field_name')) {
* // do something...
* }
*
*
* @param string $name Name of field to check.
* @return boolean
*/
public function existsField($name)
{
// Redefine vars
$name = (string) $name;
// Get table
$table = $this->table;
// Select field
$field = Table::_selectOne($this->table, "fields/{$name}");
// Return true or false
return ($field == null) ? false : true;
}
/**
* Add new record
*
*
* $users->insert(array('login'=>'admin', 'password'=>'pass'));
*
*
* @param array $fields Record fields to insert
* @return boolean
*/
public function insert(array $fields = null)
{
// Set save flag to true
$save = true;
// Foreach fields check is current field alredy exists
if (count($fields) !== 0) {
foreach ($fields as $key => $value) {
if (Table::_selectOne($this->table, "fields/{$key}") == null) {
$save = false;
break;
}
}
}
// Get table fields and create fields names array
$_fields = Table::_selectOne($this->table, "fields");
foreach ($_fields as $key => $value) {
$field_names[(string) $key] = (string) $key;
}
// Save record
if ($save) {
// Find autoincrement option
$inc = Table::_selectOne($this->table, "options/autoincrement");
// Increment
$inc_upd = $inc + 1;
// Add record
$node = $this->table['xml_object']->addChild(XML::safe($this->name));
// Update autoincrement
Table::_updateWhere($this->table, "options", array('autoincrement' => $inc_upd));
// Add common record fields: id and uid
$node->addChild('id', $inc_upd);
$node->addChild('uid', Table::_generateUID());
// If exists fields to insert then insert them
if (count($fields) !== 0) {
$table_fields = array_diff_key($field_names, $fields);
// Defined fields
foreach ($table_fields as $table_field) {
$node->addChild($table_field, '');
}
// User fields
foreach ($fields as $key => $value) {
$node->addChild($key, XML::safe($value));
}
}
// Save table
return Table::_save($this->table);
} else {
return false;
}
}
/**
* Select record(s) in table
*
*
* $records = $users->select('[id=2]');
* $records = $users->select(null, 'all');
* $records = $users->select(null, 'all', null, array('login'));
* $records = $users->select(null, 2, 1);
*
*
* @param string $query XPath query
* @param integer $row_count Row count. To select all records write 'all'
* @param integer $offset Offset
* @param array $fields Fields
* @param string $order_by Order by
* @param string $order Order type
* @return array
*/
public function select($query = null, $row_count = 'all', $offset = null, array $fields = null, $order_by = 'id', $order = 'ASC')
{
// Redefine vars
$query = ($query === null) ? null : (string) $query;
$offset = ($offset === null) ? null : (int) $offset;
$order_by = (string) $order_by;
$order = (string) $order;
// Execute query
if ($query !== null) {
$tmp = $this->table['xml_object']->xpath('//'.$this->name.$query);
} else {
$tmp = $this->table['xml_object']->xpath($this->name);
}
// Init vars
$data = array();
$records = array();
$_records = array();
$one_record = false;
// If row count is null then select only one record
// eg: $users->select('[login="admin"]', null);
if ($row_count == null) {
if (isset($tmp[0])) {
$_records = $tmp[0];
$one_record = true;
}
} else {
// If row count is 'all' then select all records
// eg:
// $users->select('[status="active"]', 'all');
// or
// $users->select('[status="active"]');
foreach ($tmp as $record) {
$data[] = $record;
}
$_records = $data;
}
// If array of fields is exits then get records with this fields only
if (count($fields) > 0) {
if (count($_records) > 0) {
$count = 0;
foreach ($_records as $key => $record) {
foreach ($fields as $field) {
$record_array[$count][$field] = (string) $record->$field;
}
$record_array[$count]['id'] = (int) $record->id;
if ($order_by == 'id') {
$record_array[$count]['sort'] = (int) $record->$order_by;
} else {
$record_array[$count]['sort'] = (string) $record->$order_by;
}
$count++;
}
// Sort records
$records = Table::subvalSort($record_array, 'sort', $order);
// Slice records array
if ($offset === null && is_int($row_count)) {
$records = array_slice($records, -$row_count, $row_count);
} elseif ($offset !== null && is_int($row_count)) {
$records = array_slice($records, $offset, $row_count);
}
}
} else {
// Convert from XML object to array
if (! $one_record) {
$count = 0;
foreach ($_records as $xml_objects) {
$vars = get_object_vars($xml_objects);
foreach ($vars as $key => $value) {
$records[$count][$key] = (string) $value;
if ($order_by == 'id') {
$records[$count]['sort'] = (int) $vars['id'];
} else {
$records[$count]['sort'] = (string) $vars[$order_by];
}
}
$count++;
}
// Sort records
$records = Table::subvalSort($records, 'sort', $order);
// Slice records array
if ($offset === null && is_int($row_count)) {
$records = array_slice($records, -$row_count, $row_count);
} elseif ($offset !== null && is_int($row_count)) {
$records = array_slice($records, $offset, $row_count);
}
} else {
// Single record
$vars = get_object_vars($_records[0]);
foreach ($vars as $key => $value) {
$records[$key] = (string) $value;
}
}
}
// Return records
return $records;
}
/**
* Delete current record in table
*
*
* $users->delete(2);
*
*
* @param integer $id Record ID
* @return boolean
*/
public function delete($id)
{
// Redefine vars
$id = (int) $id;
// Find record to delete
$xml_arr = Table::_selectOne($this->table, "//".$this->name."[id='".$id."']");
// If its exists then delete it
if (count($xml_arr) !== 0) {
// Delete
unset($xml_arr[0]);
}
// Save table
return Table::_save($this->table);
}
/**
* Delete with xPath query record in xml file
*
*
* $users->deleteWhere('[id=2]');
*
*
* @param string $query xPath query
* @return boolean
*/
public function deleteWhere($query)
{
// Redefine vars
$query = (string) $query;
// Find record to delete
$xml_arr = Table::_selectOne($this->table, '//'.$this->name.$query);
// If its exists then delete it
if (count($xml_arr) !== 0) {
// Delete
unset($xml_arr[0]);
}
// Save table
return Table::_save($this->table);
}
/**
* Update record with xPath query in XML file
*
*
* $users->updateWhere('[id=2]', array('login'=>'Admin', 'password'=>'new pass'));
*
*
* @param string $query XPath query
* @param array $fields Record fields to udpate
* @return boolean
*/
public function updateWhere($query, array $fields = null)
{
// Redefine vars
$query = (string) $query;
// Set save flag to true
$save = true;
// Foreach fields check is current field alredy exists
if (count($fields) !== 0) {
foreach ($fields as $key => $value) {
if (Table::_selectOne($this->table, "fields/{$key}") == null) {
$save = false;
break;
}
}
}
// Get table fields and create fields names array
$_fields = Table::_selectOne($this->table, "fields");
foreach ($_fields as $key => $value) {
$field_names[(string) $key] = (string) $key;
}
// Save record
if ($save) {
// Find record
$xml_arr = Table::_selectOne($this->table, '//'.$this->name.$query);
// If its exists then delete it
if (count($fields) !== 0) {
foreach ($fields as $key => $value) {
// Else: Strict Mode Error
// Creating default object from empty value
@$xml_arr->$key = XML::safe($value, false);
}
}
// Save table
return Table::_save($this->table);
} else {
return false;
}
}
/**
* Update current record in table
*
*
* $users->update(1, array('login'=>'Admin','password'=>'new pass'));
*
*
* @param integer $id Record ID
* @param array $fields Record fields to udpate
* @return boolean
*/
public function update($id, array $fields = null)
{
// Redefine vars
$id = (int) $id;
// Set save flag to true
$save = true;
// Foreach fields check is current field alredy exists
if (count($fields) !== 0) {
foreach ($fields as $key => $value) {
if (Table::_selectOne($this->table, "fields/{$key}") == null) {
$save = false;
break;
}
}
}
// Get table fields and create fields names array
$_fields = Table::_selectOne($this->table, "fields");
foreach ($_fields as $key => $value) {
$field_names[(string) $key] = (string) $key;
}
// Save record
if ($save) {
// Find record to delete
$xml_arr = Table::_selectOne($this->table, "//".$this->name."[id='".(int) $id."']");
// If its exists then update it
if (count($fields) !== 0) {
foreach ($fields as $key => $value) {
// Delete current
unset($xml_arr->$key);
// And add new one
$xml_arr->addChild($key, XML::safe($value, false));
}
}
// Save table
return Table::_save($this->table);
} else {
return false;
}
}
/**
* Get last record id
*
*
* echo $users->lastId();
*
*
* @return integer
*/
public function lastId()
{
$data = $this->table['xml_object']->xpath("//root/node()[last()]");
return (int) $data[0]->id;
}
/**
* Get count of records
*
*
* echo $users->count();
*
*
* @return integer
*/
public function count()
{
return count($this->table['xml_object'])-2;
}
/**
* Subval sort
*
* @param array $a Array
* @param string $subkey Key
* @param string $order Order type DESC or ASC
* @return array
*/
protected static function subvalSort($a, $subkey, $order = null)
{
if (count($a) != 0 || (!empty($a))) {
foreach ($a as $k=>$v) {
$b[$k] = function_exists('mb_strtolower') ? mb_strtolower($v[$subkey]) : strtolower($v[$subkey]);
}
if ($order==null || $order== 'ASC') {
asort($b);
} elseif ($order == 'DESC') {
arsort($b);
}
foreach ($b as $key=>$val) {
$c[] = $a[$key];
}
return $c;
}
return $a;
}
/**
* _selectOne
*/
protected static function _selectOne($table, $query)
{
$tmp = $table['xml_object']->xpath($query);
return isset($tmp[0])? $tmp[0]: null;
}
/**
* _updateWhere
*/
protected static function _updateWhere($table, $query, $fields = array())
{
// Find record to delete
$xml_arr = Table::_selectOne($table, $query);
// If its exists then delete it
if (count($fields) !== 0) {
foreach ($fields as $key => $value) {
$xml_arr->$key = XML::safe($value, false);
}
}
// Save table
Table::_save($table);
}
/**
* _generateUID
*/
protected static function _generateUID()
{
return substr(md5(uniqid(rand(), true)), 0, 10);
}
/**
* Format XML and save
*
* @param array $table Array of database name and XML object
*/
protected static function _save($table)
{
$dom = new DOMDocument('1.0', 'utf-8');
$dom->preserveWhiteSpace = false;
// Save new xml data to xml file only if loadXML successful.
// Preventing the destruction of the database by unsafe data.
// note: If loadXML !successful then _save() add&save empty record.
// This record cant be removed by delete[Where]() Problem solved by hand removing...
// Possible solution: modify delete[Where]() or prevent add&saving of such records.
// the result now: database cant be destroyed :)
if ($dom->loadXML($table['xml_object']->asXML())) {
$dom->save($table['xml_filename']);
return true;
} else {
return false;
// report about errors...
}
}
}
================================================
FILE: engine/Xmldb/XML.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class XML
{
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Create safe xml data. Removes dangerous characters for string.
*
*
* $xml_safe = XML::safe($xml_unsafe);
*
*
* @param string $str String
* @param boolean $flag Flag
* @return string
*/
public static function safe($str, $flag = true)
{
// Redefine vars
$str = (string) $str;
$flag = (bool) $flag;
// Remove invisible chars
$non_displayables = array('/%0[0-8bcef]/', '/%1[0-9a-f]/', '/[\x00-\x08]/', '/\x0b/', '/\x0c/', '/[\x0e-\x1f]/');
do {
$cleaned = $str;
$str = preg_replace($non_displayables, '', $str);
} while ($cleaned != $str);
// htmlspecialchars
if ($flag) {
$str = htmlspecialchars($str, ENT_QUOTES, 'utf-8');
}
// Return safe string
return $str;
}
/**
* Get XML file
*
*
* $xml_file = XML::loadFile('path/to/file.xml');
*
*
* @param string $file File name
* @param boolean $force Method
* @return array
*/
public static function loadFile($file, $force = false)
{
// Redefine vars
$file = (string) $file;
$force = (bool) $force;
// For CMS API XML file force method
if ($force) {
$xml = file_get_contents($file);
$data = simplexml_load_string($xml);
return $data;
} else {
if (file_exists($file) && is_file($file)) {
$xml = file_get_contents($file);
$data = simplexml_load_string($xml);
return $data;
} else {
return false;
}
}
}
}
================================================
FILE: engine/_init.php
================================================
'."\n";
}
================================================
FILE: engine/boot/defines.php
================================================
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
// Main engine defines
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', rtrim(dirname(__FILE__), '\\/'));
define('BACKEND', false);
define('MONSTRA_ACCESS', true);
// First check for installer then go
if (file_exists('install.php')) {
if (isset($_GET['install'])) {
if ($_GET['install'] == 'done') {
// Try to delete install file if not delete manually
@unlink('install.php');
// Redirect to main page
header('location: index.php');
}
} else {
include 'install.php';
}
} else {
// Load Engine init file
require_once ROOT. DS . 'engine'. DS . '_init.php';
// Check for maintenance mod
if ('on' == Option::get('maintenance_status')) {
// Set maintenance mode for all except admin and editor
if ((Session::exists('user_role')) and (Session::get('user_role') == 'admin' or Session::get('user_role') == 'editor')) {
// Monstra show this page :)
} else {
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 600');
die(Text::toHtml(Option::get('maintenance_message')));
}
}
// Frontend pre render
Action::run('frontend_pre_render');
// Load site template
require MINIFY . DS . 'theme.' . Site::theme() . '.' . Site::template() . '.template.php';
// Frontend pre render
Action::run('frontend_post_render');
// Flush (send) the output buffer and turn off output buffering
ob_end_flush();
}
================================================
FILE: install.php
================================================
button then try to install
if (Request::post('install_submit')) {
if (Request::post('sitename') == '') {
$errors['sitename'] = __('Field "Site name" is empty', 'system');
}
if (Request::post('siteurl') == '') {
$errors['siteurl'] = __('Field "Site url" is empty', 'system');
}
if (Request::post('login') == '') {
$errors['login'] = __('Field "Username" is empty', 'system');
}
if (Request::post('password') == '') {
$errors['password'] = __('Field "Password" is empty', 'system');
}
if (Request::post('email') == '') {
$errors['email'] = __('Field "Email" is empty', 'system');
}
if (! Valid::email(Request::post('email'))) {
$errors['email_valid'] = __('Email not valid', 'system');
}
if (trim(Request::post('php') !== '')) {
$errors['php'] = true;
}
if (trim(Request::post('simplexml') !== '')) {
$errors['simplexml'] = true;
}
if (trim(Request::post('mod_rewrite') !== '')) {
$errors['mod_rewrite'] = true;
}
if (trim(Request::post('htaccess') !== '')) {
$errors['htaccess'] = true;
}
if (trim(Request::post('sitemap') !== '')) {
$errors['sitemap'] = true;
}
if (trim(Request::post('install') !== '')) {
$errors['install'] = true;
}
if (trim(Request::post('public') !== '')) {
$errors['public'] = true;
}
if (trim(Request::post('storage') !== '')) {
$errors['storage'] = true;
}
if (trim(Request::post('backups') !== '')) {
$errors['backups'] = true;
}
if (trim(Request::post('tmp') !== '')) {
$errors['tmp'] = true;
}
// If errors is 0 then install cms
if (count($errors) == 0) {
// Update options
Option::update(array('maintenance_status' => 'off',
'sitename' => Request::post('sitename'),
'siteurl' => Request::post('siteurl'),
'description' => __('Site description', 'system'),
'keywords' => __('Site keywords', 'system'),
'slogan' => __('Site slogan', 'system'),
'defaultpage' => 'home',
'timezone' => Request::post('timezone'),
'system_email' => Request::post('email'),
'theme_site_name' => 'default',
'theme_admin_name' => 'default'));
// Get users table
$users = new Table('users');
// Insert new user with role = admin
$users->insert(array('login' => Security::safeName(Request::post('login')),
'password' => Security::encryptPassword(Request::post('password')),
'email' => Request::post('email'),
'hash' => Text::random('alnum', 12),
'date_registered' => time(),
'role' => 'admin'));
// Write .htaccess
$htaccess = file_get_contents('.htaccess');
$save_htaccess_content = str_replace("/%siteurlhere%/", $rewrite_base, $htaccess);
$handle = fopen('.htaccess', "w");
fwrite($handle, $save_htaccess_content);
fclose($handle);
// Installation done :)
header("location: index.php?install=done");
} else {
Notification::setNow('errors', $errors);
}
}
?>
Monstra :: Install
'.__('PHP 5.3.2 or greater is required', 'system').'';
} else {
echo '- '.__('PHP Version', 'system').' '.PHP_VERSION.'
';
}
if (in_array('SimpleXML', $php_modules)) {
echo '- '.__('Module SimpleXML is installed', 'system').'
';
} else {
echo '- '.__('SimpleXML module is required', 'system').'
';
}
if (in_array('dom', $php_modules)) {
echo '- '.__('Module DOM is installed', 'system').'
';
} else {
echo '- '.__('Module DOM is required', 'system').'
';
}
if (function_exists('apache_get_modules')) {
if (! in_array('mod_rewrite', apache_get_modules())) {
echo '- '.__('Apache Mod Rewrite is required', 'system').'
';
} else {
echo '- '.__('Module Mod Rewrite is installed', 'system').'
';
}
} else {
echo '- '.__('Module Mod Rewrite is installed', 'system').'
';
}
foreach ($dir_array as $dir) {
if (is_writable($dir.'/')) {
echo '- '.__('Directory: :dir writable', 'system', array(':dir' => $dir)).'
';
} else {
echo '- '.__('Directory: :dir not writable', 'system', array(':dir' => $dir)).'
';
}
}
if (is_writable(__FILE__)) {
echo '- '.__('Install script writable', 'system').'
';
} else {
echo '- '.__('Install script not writable', 'system').'
';
}
if (is_writable('sitemap.xml')) {
echo '- '.__('Sitemap file writable', 'system').'
';
} else {
echo '- '.__('Sitemap file not writable', 'system').'
';
}
if (is_writable('.htaccess')) {
echo '- '.__('Main .htaccess file writable', 'system').'
';
} else {
echo '- '.__('Main .htaccess file not writable', 'system').'
';
}
if (isset($errors['sitename'])) {
echo '- '.$errors['sitename'].'
';
}
if (isset($errors['siteurl'])) {
echo '- '.$errors['siteurl'].'
';
}
if (isset($errors['login'])) {
echo '- '.$errors['login'].'
';
}
if (isset($errors['password'])) {
echo '- '.$errors['password'].'
';
}
if (isset($errors['email'])) {
echo '- '.$errors['email'].'
';
}
if (isset($errors['email_valid'])) {
echo '- '.$errors['email_valid'].'
';
}
?>
================================================
FILE: libraries/Gelato/Agent/Agent.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Agent
{
/**
* Mobiles
*
* @var array
*/
public static $mobiles = array (
'ipad',
'iphone',
'ipod',
'android',
'windows ce',
'windows phone',
'mobileexplorer',
'opera mobi',
'opera mini',
'fennec',
'blackberry',
'nokia',
'kindle',
'ericsson',
'motorola',
'minimo',
'iemobile',
'symbian',
'webos',
'hiptop',
'palmos',
'palmsource',
'xiino',
'avantgo',
'docomo',
'up.browser',
'vodafone',
'portable',
'pocket',
'mobile',
'phone',
);
/**
* Robots
*
* @var array
*/
public static $robots = array(
'googlebot',
'msnbot',
'slurp',
'yahoo',
'askjeeves',
'fastcrawler',
'infoseek',
'lycos',
'ia_archiver',
'yandex',
'mail.ru',
'ask.com',
'Copyscape.com',
'bing.com',
);
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Searches for a string in the user agent string.
*
* @param array $agents Array of strings to look for
* @return boolean
*/
protected static function find($agents)
{
// If isset HTTP_USER_AGENT ?
if (isset($_SERVER['HTTP_USER_AGENT'])) {
// Loop through $agents array
foreach ($agents as $agent) {
// If current user agent == agents[agent] then return true
if (stripos($_SERVER['HTTP_USER_AGENT'], $agent) !== false) {
return true;
}
}
}
// Else return false
return false;
}
/**
* Returns true if the user agent that made the request is identified as a mobile device.
*
*
* if (Agent::isMobile()) {
* // Do something...
* }
*
*
* @return boolean
*/
public static function isMobile()
{
return Agent::find(Agent::$mobiles);
}
/**
* Returns true if the user agent that made the request is identified as a robot/crawler.
*
*
* if (Agent::isRobot()) {
* // Do something...
* }
*
*
* @return boolean
*/
public static function isRobot()
{
return Agent::find(Agent::$robots);
}
/**
* Returns TRUE if the string you're looking for exists in the user agent string and FALSE if not.
*
*
* if (Agent::is('iphone')) {
* // Do something...
* }
*
* if (Agent::is(array('iphone', 'ipod'))) {
* // Do something...
* }
*
*
* @param mixed $device String or array of strings you're looking for
* @return boolean
*/
public static function is($device)
{
return Agent::find((array) $device);
}
}
================================================
FILE: libraries/Gelato/Arr/Arr.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Arr
{
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Subval sort
*
*
* $new_array = Arr::subvalSort($old_array, 'sort');
*
*
* @param array $a Array
* @param string $subkey Key
* @param string $order Order type DESC or ASC
* @return array
*/
public static function subvalSort($a, $subkey, $order = null)
{
if (count($a) != 0 || (!empty($a))) {
foreach ($a as $k => $v) $b[$k] = function_exists('mb_strtolower') ? mb_strtolower($v[$subkey]) : strtolower($v[$subkey]);
if ($order == null || $order == 'ASC') asort($b); else if ($order == 'DESC') arsort($b);
foreach ($b as $key => $val) $c[] = $a[$key];
return $c;
}
}
/**
* Returns value from array using "dot notation".
* If the key does not exist in the array, the default value will be returned instead.
*
*
* $login = Arr::get($_POST, 'login');
*
* $array = array('foo' => 'bar');
* $foo = Arr::get($array, 'foo');
*
* $array = array('test' => array('foo' => 'bar'));
* $foo = Arr::get($array, 'test.foo');
*
*
* @param array $array Array to extract from
* @param string $path Array path
* @param mixed $default Default value
* @return mixed
*/
public static function get($array, $path, $default = null)
{
// Get segments from path
$segments = explode('.', $path);
// Loop through segments
foreach ($segments as $segment) {
// Check
if ( ! is_array($array) || !isset($array[$segment])) {
return $default;
}
// Write
$array = $array[$segment];
}
// Return
return $array;
}
/**
* Deletes an array value using "dot notation".
*
*
* Arr::delete($array, 'foo.bar');
*
*
* @access public
* @param array $array Array you want to modify
* @param string $path Array path
* @return boolean
*/
public static function delete(&$array, $path)
{
// Get segments from path
$segments = explode('.', $path);
// Loop through segments
while (count($segments) > 1) {
$segment = array_shift($segments);
if ( ! isset($array[$segment]) || !is_array($array[$segment])) {
return false;
}
$array =& $array[$segment];
}
unset($array[array_shift($segments)]);
return true;
}
/**
* Checks if the given dot-notated key exists in the array.
*
*
* if (Arr::keyExists($array, 'foo.bar')) {
* // Do something...
* }
*
*
* @param array $array The search array
* @param mixed $path Array path
* @return boolean
*/
public static function keyExists($array, $path)
{
foreach (explode('.', $path) as $segment) {
if ( ! is_array($array) or ! array_key_exists($segment, $array)) {
return false;
}
$array = $array[$segment];
}
return true;
}
/**
* Returns a random value from an array.
*
*
* Arr::random(array('php', 'js', 'css', 'html'));
*
*
* @access public
* @param array $array Array path
* @return mixed
*/
public static function random($array)
{
return $array[array_rand($array)];
}
/**
* Returns TRUE if the array is associative and FALSE if not.
*
*
* if (Arr::isAssoc($array)) {
* // Do something...
* }
*
*
* @param array $array Array to check
* @return boolean
*/
public static function isAssoc($array)
{
return (bool) count(array_filter(array_keys($array), 'is_string'));
}
}
================================================
FILE: libraries/Gelato/Cache/Cache.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Cache
{
/**
* Cache directory
*
* @var string
*/
protected static $cache_dir = '';
/**
* Cache file ext
*
* @var string
*/
protected static $cache_file_ext = 'txt';
/**
* Cache life time (in seconds)
*
* @var int
*/
public static $cache_time = 31556926;
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Configure the settings of Cache
*
*
* Cache::configure('cache_dir', 'path/to/cache/dir');
*
*
* @param mixed $setting Setting name
* @param mixed $value Setting value
*/
public static function configure($setting, $value)
{
if (property_exists("cache", $setting)) Cache::$$setting = $value;
}
/**
* Get data from cache
*
*
* $profile = Cache::get('profiles', 'profile');
*
*
* @param string $namespace Namespace
* @param string $key Cache key
* @return boolean
*/
public static function get($namespace, $key)
{
// Redefine vars
$namespace = (string) $namespace;
// Get cache file id
$cache_file_id = Cache::getCacheFileID($namespace, $key);
// Is cache file exists ?
if (file_exists($cache_file_id)) {
// If cache file has not expired then fetch it
if ((time() - filemtime($cache_file_id)) < Cache::$cache_time) {
$handle = fopen($cache_file_id, 'r');
$cache = '';
while ( ! feof($handle)) {
$cache .= fgets($handle);
}
fclose($handle);
return unserialize($cache);
} else {
unlink($cache_file_id);
return false;
}
} else {
return false;
}
}
/**
* Create new cache file $key in namescapce $namespace with the given data $data
*
*
* $profile = array('login' => 'Awilum',
* 'email' => 'awilum@msn.com');
* Cache::put('profiles', 'profile', $profile);
*
*
* @param string $namespace Namespace
* @param string $key Cache key
* @param mixed $data The variable to store
* @return boolean
*/
public static function put($namespace, $key, $data)
{
// Redefine vars
$namespace = (string) $namespace;
// Is CACHE directory writable ?
if (file_exists(CACHE) === false || is_readable(CACHE) === false || is_writable(CACHE) === false) {
throw new RuntimeException(vsprintf("%s(): Cache directory ('%s') is not writable.", array(__METHOD__, CACHE)));
}
// Create namespace
if ( ! file_exists(Cache::getNamespaceID($namespace))) {
mkdir(Cache::getNamespaceID($namespace), 0775, true);
}
// Write cache to specific namespace
return file_put_contents(Cache::getCacheFileID($namespace, $key), serialize($data), LOCK_EX);
}
/**
* Deletes a cache in specific namespace
*
*
* Cache::delete('profiles', 'profile');
*
*
* @param string $namespace Namespace
* @param string $key Cache key
* @return boolean
*/
public static function delete($namespace, $key)
{
// Redefine vars
$namespace = (string) $namespace;
if (file_exists(Cache::getCacheFileID($namespace, $key))) unlink(Cache::getCacheFileID($namespace, $key)); else return false;
}
/**
* Clean specific cache namespace.
*
*
* Cache::clean('profiles');
*
*
* @param string $namespace Namespace
* @return null
*/
public static function clean($namespace)
{
// Redefine vars
$namespace = (string) $namespace;
array_map("unlink", glob(Cache::$cache_dir . DS . md5($namespace) . DS . "*." . Cache::$cache_file_ext));
}
/**
* Get cache file ID
*
* @param string $namespace Namespace
* @param string $key Cache key
* @return string
*/
protected static function getCacheFileID($namespace, $key)
{
// Redefine vars
$namespace = (string) $namespace;
return Cache::$cache_dir . DS . md5($namespace) . DS . md5($key) . '.' . Cache::$cache_file_ext;
}
/**
* Get namespace ID
*
* @param string $namespace Namespace
* @return string
*/
protected static function getNamespaceID($namespace)
{
// Redefine vars
$namespace = (string) $namespace;
return Cache::$cache_dir . DS . md5($namespace);
}
}
================================================
FILE: libraries/Gelato/ClassLoader/ClassLoader.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class ClassLoader
{
/**
* Mapping from class names to paths.
*
* @var array
*/
protected static $classes = array();
/**
* PSR-0 directories.
*
* @var array
*/
protected static $directories = array();
/**
* Registered namespaces.
*
* @var array
*/
protected static $namespaces = array();
/**
* Class aliases.
*
* @var array
*/
protected static $aliases = array();
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Add class to mapping.
*
*
* ClassLoader::mapClass('ClassName', 'path/to/class');
*
*
* @access public
* @param string $className Class name
* @param string $classPath Full path to class
*/
public static function mapClass($className, $classPath)
{
ClassLoader::$classes[$className] = $classPath;
}
/**
* Add multiple classes to mapping.
*
*
* ClassLoader::mapClasses(array('ClassName' => 'path/to/class','ClassName' => 'path/to/class'));
*
*
* @access public
* @param array $classes Array of classes to map (key = class name and value = class path)
*/
public static function mapClasses(array $classes)
{
foreach ($classes as $name => $path) {
ClassLoader::$classes[$name] = $path;
}
}
/**
* Adds a PSR-0 directory path.
*
*
* ClassLoader::directory('path/to/classes');
*
*
* @access public
* @param string $path Path to PSR-0 directory
*/
public static function directory($path)
{
ClassLoader::$directories[] = rtrim($path, '/');
}
/**
* Registers a namespace.
*
*
* ClassLoader::registerNamespace('Namespace', '/path/to/namespace/');
*
*
* @access public
* @param string $namespace Namespace
* @param string $path Path
*/
public static function registerNamespace($namespace, $path)
{
ClassLoader::$namespaces[trim($namespace, '\\') . '\\'] = rtrim($path, '/');
}
/**
* Set an alias for a class.
*
*
* ClassLoader::alias('ClassNameAlias', 'ClassName');
*
*
* @access public
* @param string $alias Class alias
* @param string $className Class name
*/
public static function alias($alias, $className)
{
ClassLoader::$aliases[$alias] = $className;
}
/**
* Try to load a PSR-0 compatible class.
*
* @access protected
* @param string $className Class name
* @param string $directory (Optional) Overrides the array of PSR-0 paths
* @return boolean
*/
protected static function loadPSR0($className, $directory = null)
{
$classPath = '';
if (($pos = strripos($className, '\\')) !== false) {
$namespace = substr($className, 0, $pos);
$className = substr($className, $pos + 1);
$classPath = str_replace('\\', '/', $namespace) . '/';
}
$classPath .= str_replace('_', '/', $className) . '.php';
$directories = ($directory === null) ? ClassLoader::$directories : array($directory);
foreach ($directories as $directory) {
if (file_exists($directory . '/' . $classPath)) {
include($directory . '/' . $classPath);
return true;
}
}
return false;
}
/**
* Autoloader.
*
*
* ClassLoader::load();
*
*
* @access public
* @param string $className Class name
* @return boolean
*/
public static function load($className)
{
$className = ltrim($className, '\\');
/**
* Try to autoload an aliased class
*/
if (isset(ClassLoader::$aliases[$className])) {
return class_alias(ClassLoader::$aliases[$className], $className);
}
/**
* Try to load a mapped class
*/
if (isset(ClassLoader::$classes[$className]) && file_exists(ClassLoader::$classes[$className])) {
include ClassLoader::$classes[$className];
return true;
}
/**
* Try to load class from a registered namespace
*/
foreach (ClassLoader::$namespaces as $namespace => $path) {
if (strpos($className, $namespace) === 0) {
if (ClassLoader::loadPSR0(substr($className, strlen($namespace)), $path)) {
return true;
}
}
}
/**
* Try to load a PSR-0 compatible class
* The second call to the loadPSR0 method is used to autoload legacy code
*/
if (ClassLoader::loadPSR0($className) || ClassLoader::loadPSR0(strtolower($className))) {
return true;
}
return false;
}
/**
* Register the Gelato ClassLoader to the SPL autoload stack.
*
* @return void
*/
public static function register()
{
spl_autoload_register('ClassLoader::load', true);
}
}
================================================
FILE: libraries/Gelato/Cookie/Cookie.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Cookie
{
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Send a cookie
*
*
* Cookie::set('limit', 10);
*
*
* @param string $key A name for the cookie.
* @param mixed $value The value to be stored. Keep in mind that they will be serialized.
* @param integer $expire The number of seconds that this cookie will be available.
* @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.
* @param string $domain The domain that the cookie is available on. Use .example.com to make it available on all subdomains of example.com.
* @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.
* @param boolean $httpOnly Should the cookie only be available through HTTP-protocol? If true, the cookie can't be accessed by Javascript, ...
* @return boolean
*/
public static function set($key, $value, $expire = 86400, $domain = '', $path = '/', $secure = false, $httpOnly = false)
{
// Redefine vars
$key = (string) $key;
$value = serialize($value);
$expire = time() + (int) $expire;
$path = (string) $path;
$domain = (string) $domain;
$secure = (bool) $secure;
$httpOnly = (bool) $httpOnly;
// Set cookie
return setcookie($key, $value, $expire, $path, $domain, $secure, $httpOnly);
}
/**
* Get a cookie
*
*
* $limit = Cookie::get('limit');
*
*
* @param string $key The name of the cookie that should be retrieved.
* @return mixed
*/
public static function get($key)
{
// Redefine key
$key = (string) $key;
// Cookie doesn't exist
if( ! isset($_COOKIE[$key])) return false;
// Fetch base value
$value = (get_magic_quotes_gpc()) ? stripslashes($_COOKIE[$key]) : $_COOKIE[$key];
// Unserialize
$actual_value = @unserialize($value);
// If unserialize failed
if($actual_value === false && serialize(false) != $value) return false;
// Everything is fine
return $actual_value;
}
/**
* Delete a cookie
*
*
* Cookie::delete('limit');
*
*
* @param string $name The name of the cookie that should be deleted.
*/
public static function delete($key)
{
unset($_COOKIE[$key]);
}
}
================================================
FILE: libraries/Gelato/Curl/Curl.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Curl
{
/**
* Default curl options.
*
* @var array
*/
protected static $default_options = array(
CURLOPT_USERAGENT => 'Mozilla/5.0 (compatible; Monstra CMS; +http://monstra.org)',
CURLOPT_RETURNTRANSFER => true
);
/**
* Information about the last transfer.
*
* @var array
*/
protected static $info;
/**
* Performs a curl GET request.
*
*
* $res = Curl::get('http://site.com/');
*
*
* @param string $url The URL to fetch
* @param array $options An array specifying which options to set and their values
* @return string
*/
public static function get($url, array $options = null)
{
// Redefine vars
$url = (string) $url;
// Check if curl is available
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__)));
// Initialize a cURL session
$handle = curl_init($url);
// Merge options
$options = (array) $options + Curl::$default_options;
// Set multiple options for a cURL transfer
curl_setopt_array($handle, $options);
// Perform a cURL session
$response = curl_exec($handle);
// Set information regarding a specific transfer
Curl::$info = curl_getinfo($handle);
// Close a cURL session
curl_close($handle);
// Return response
return $response;
}
/**
* Performs a curl POST request.
*
*
* $res = Curl::post('http://site.com/login');
*
*
* @param string $url The URL to fetch
* @param array $data An array with the field name as key and field data as value
* @param boolean $multipart True to send data as multipart/form-data and false to send as application/x-www-form-urlencoded
* @param array $options An array specifying which options to set and their values
* @return string
*/
public static function post($url, array $data = null, $multipart = false, array $options = null)
{
// Redefine vars
$url = (string) $url;
// Check if curl is available
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__)));
// Initialize a cURL session
$handle = curl_init($url);
// Merge options
$options = (array) $options + Curl::$default_options;
// Add options
$options[CURLOPT_POST] = true;
$options[CURLOPT_POSTFIELDS] = ($multipart === true) ? (array) $data : http_build_query((array) $data);
// Set multiple options for a cURL transfer
curl_setopt_array($handle, $options);
// Perform a cURL session
$response = curl_exec($handle);
// Set information regarding a specific transfer
Curl::$info = curl_getinfo($handle);
// Close a cURL session
curl_close($handle);
// Return response
return $response;
}
/**
* Gets information about the last transfer.
*
*
* $res = Curl::getInfo();
*
*
* @param string $value Array key of the array returned by curl_getinfo()
* @return mixed
*/
public static function getInfo($value = null)
{
if (empty(Curl::$info)) {
return false;
}
return ($value === null) ? Curl::$info : Curl::$info[$value];
}
}
================================================
FILE: libraries/Gelato/Date/Date.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Date
{
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Get format date
*
*
* echo Date::format($date, 'j.n.Y');
*
*
* @param integer $date Unix timestamp
* @param string $format Date format
* @return integer
*/
public static function format($date, $format = 'j.n.Y')
{
// Redefine vars
$format = (string) $format;
$date = (int) $date;
return date($format, $date);
}
/**
* Get number of seconds in a minute, incrementing by a step.
*
*
* $seconds = Date::seconds();
*
*
* @param integer $step Amount to increment each step by, 1 to 30
* @param integer $start Start value
* @param integer $end End value
* @return array
*/
public static function seconds($step = 1, $start = 0, $end = 60)
{
// Redefine vars
$step = (int) $step;
$start = (int) $start;
$end = (int) $end;
return Date::_range($step, $start, $end);
}
/**
* Get number of minutes in a hour, incrementing by a step.
*
*
* $minutes = Date::minutes();
*
*
* @param integer $step Amount to increment each step by, 1 to 30
* @param integer $start Start value
* @param integer $end End value
* @return array
*/
public static function minutes($step = 5, $start = 0, $end = 60)
{
// Redefine vars
$step = (int) $step;
$start = (int) $start;
$end = (int) $end;
return Date::_range($step, $start, $end);
}
/**
* Get number of hours, incrementing by a step.
*
*
* $hours = Date::hours();
*
*
* @param integer $step Amount to increment each step by, 1 to 30
* @param integer $long Start value
* @param integer $start End value
* @return array
*/
public static function hours($step = 1, $long = false, $start = null)
{
// Redefine vars
$step = (int) $step;
$long = (bool) $long;
if ($start === null) $start = ($long === FALSE) ? 1 : 0;
$end = ($long === true) ? 23 : 12;
return Date::_range($step, $start, $end, true);
}
/**
* Get number of months.
*
*
* $months = Date::months();
*
*
* @return array
*/
public static function months()
{
return Date::_range(1, 1, 12, true);
}
/**
* Get number of days.
*
*
* $months = Date::days();
*
*
* @return array
*/
public static function days()
{
return Date::_range(1, 1, Date::daysInMonth((int) date('M')), true);
}
/**
* Returns the number of days in the requested month
*
*
* $days = Date::daysInMonth(1);
*
*
* @param integer $month Month as a number (1-12)
* @param integer $year The year
* @return integer
*/
public static function daysInMonth($month, $year = null)
{
// Redefine vars
$month = (int) $month;
$year = ! empty($year) ? (int) $year : (int) date('Y');
if ($month < 1 or $month > 12) {
return false;
} elseif ($month == 2) {
if ($year % 400 == 0 or ($year % 4 == 0 and $year % 100 != 0)) {
return 29;
}
}
$days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
return $days_in_month[$month-1];
}
/**
* Get number of years.
*
*
* $years = Date::years();
*
*
* @param integer $long Start value
* @param integer $start End value
* @return array
*/
public static function years($start = 1980, $end = 2024)
{
// Redefine vars
$start = (int) $start;
$end = (int) $end;
return Date::_range(1, $start, $end, true);
}
/**
* Get current season name
*
*
* echo Date::season();
*
*
* @return string
*/
public static function season()
{
$seasons = array("Winter", "Spring", "Summer", "Autumn");
return $seasons[(int) ((date("n") %12)/3)];
}
/**
* Get today date
*
*
* echo Date::today();
*
*
* @param string $format Date format
* @return string
*/
public static function today($format = '')
{
// Redefine vars
$format = (string) $format;
if ($format != '') { return date($format); } else { return date(MONSTRA_DATE_FORMAT); }
}
/**
* Get yesterday date
*
*
* echo Date::yesterday();
*
*
* @param string $format Date format
* @return string
*/
public static function yesterday($format = '')
{
// Redefine vars
$format = (string) $format;
if ($format != '') { return date($format, strtotime("-1 day")); } else { return date(MONSTRA_DATE_FORMAT, strtotime("-1 day")); }
}
/**
* Get tomorrow date
*
*
* echo Date::tomorrow();
*
*
* @param string $format Date format
* @return string
*/
public static function tomorrow($format = '')
{
// Redefine vars
$format = (string) $format;
if ($format != '') { return date($format, strtotime("+1 day")); } else { return date(MONSTRA_DATE_FORMAT, strtotime("-1 day")); }
}
/**
* Converts a UNIX timestamp to DOS format.
*
*
* $dos = Date::unix2dos($unix);
*
*
* @param integer $timestamp UNIX timestamp
* @return integer
*/
public static function unix2dos($timestamp = 0)
{
$timestamp = ($_timestamp == 0) ? getdate() : getdate($_timestamp);
if ($timestamp['year'] < 1980) return (1 << 21 | 1 << 16);
$timestamp['year'] -= 1980;
return ($timestamp['year'] << 25 | $timestamp['mon'] << 21 |
$timestamp['mday'] << 16 | $timestamp['hours'] << 11 |
$timestamp['minutes'] << 5 | $timestamp['seconds'] >> 1);
}
/**
* Converts a DOS timestamp to UNIX format.
*
*
* $unix = Date::dos2unix($dos);
*
*
* @param integer $timestamp DOS timestamp
* @return integer
*/
public static function dos2unix($timestamp)
{
$sec = 2 * ($timestamp & 0x1f);
$min = ($timestamp >> 5) & 0x3f;
$hrs = ($timestamp >> 11) & 0x1f;
$day = ($timestamp >> 16) & 0x1f;
$mon = (($timestamp >> 21) & 0x0f);
$year = (($timestamp >> 25) & 0x7f) + 1980;
return mktime($hrs, $min, $sec, $mon, $day, $year);
}
/**
* Get Time zones
*
* @return array
*/
public static function timezones()
{
return array('Kwajalein'=>'(GMT-12:00) International Date Line West',
'Pacific/Samoa'=>'(GMT-11:00) Midway Island, Samoa',
'Pacific/Honolulu'=>'(GMT-10:00) Hawaii',
'America/Anchorage'=>'(GMT-09:00) Alaska',
'America/Los_Angeles'=>'(GMT-08:00) Pacific Time (US & Canada)',
'America/Tijuana'=>'(GMT-08:00) Tijuana, Baja California',
'America/Denver'=>'(GMT-07:00) Mountain Time (US & Canada)',
'America/Chihuahua'=>'(GMT-07:00) Chihuahua, La Paz, Mazatlan',
'America/Phoenix'=>'(GMT-07:00) Arizona',
'America/Regina'=>'(GMT-06:00) Saskatchewan',
'America/Tegucigalpa'=>'(GMT-06:00) Central America',
'America/Chicago'=>'(GMT-06:00) Central Time (US & Canada)',
'America/Mexico_City'=>'(GMT-06:00) Guadalajara, Mexico City, Monterrey',
'America/New_York'=>'(GMT-05:00) Eastern Time (US & Canada)',
'America/Bogota'=>'(GMT-05:00) Bogota, Lima, Quito, Rio Branco',
'America/Indiana/Indianapolis'=>'(GMT-05:00) Indiana (East)',
'America/Caracas'=>'(GMT-04:30) Caracas',
'America/Halifax'=>'(GMT-04:00) Atlantic Time (Canada)',
'America/Manaus'=>'(GMT-04:00) Manaus',
'America/Santiago'=>'(GMT-04:00) Santiago',
'America/La_Paz'=>'(GMT-04:00) La Paz',
'America/St_Johns'=>'(GMT-03:30) Newfoundland',
'America/Argentina/Buenos_Aires'=>'(GMT-03:00) Buenos Aires',
'America/Sao_Paulo'=>'(GMT-03:00) Brasilia',
'America/Godthab'=>'(GMT-03:00) Greenland',
'America/Montevideo'=>'(GMT-03:00) Montevideo',
'America/Argentina/Buenos_Aires'=>'(GMT-03:00) Georgetown',
'Atlantic/South_Georgia'=>'(GMT-02:00) Mid-Atlantic',
'Atlantic/Azores'=>'(GMT-01:00) Azores',
'Atlantic/Cape_Verde'=>'(GMT-01:00) Cape Verde Is.',
'Europe/London'=>'(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London',
'Atlantic/Reykjavik'=>'(GMT) Monrovia, Reykjavik',
'Africa/Casablanca'=>'(GMT) Casablanca',
'Europe/Belgrade'=>'(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague',
'Europe/Sarajevo'=>'(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb',
'Europe/Brussels'=>'(GMT+01:00) Brussels, Copenhagen, Madrid, Paris',
'Africa/Algiers'=>'(GMT+01:00) West Central Africa',
'Europe/Amsterdam'=>'(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna',
'Africa/Cairo'=>'(GMT+02:00) Cairo',
'Europe/Helsinki'=>'(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius',
'Europe/Athens'=>'(GMT+02:00) Athens, Bucharest, Istanbul',
'Asia/Jerusalem'=>'(GMT+02:00) Jerusalem',
'Asia/Amman'=>'(GMT+02:00) Amman',
'Asia/Beirut'=>'(GMT+02:00) Beirut',
'Africa/Windhoek'=>'(GMT+02:00) Windhoek',
'Africa/Harare'=>'(GMT+02:00) Harare, Pretoria',
'Asia/Kuwait'=>'(GMT+03:00) Kuwait, Riyadh',
'Asia/Baghdad'=>'(GMT+03:00) Baghdad',
'Europe/Minsk'=>'(GMT+03:00) Minsk',
'Africa/Nairobi'=>'(GMT+03:00) Nairobi',
'Asia/Tbilisi'=>'(GMT+03:00) Tbilisi',
'Asia/Tehran'=>'(GMT+03:30) Tehran',
'Asia/Muscat'=>'(GMT+04:00) Abu Dhabi, Muscat',
'Asia/Baku'=>'(GMT+04:00) Baku',
'Europe/Moscow'=>'(GMT+04:00) Moscow, St. Petersburg, Volgograd',
'Asia/Yerevan'=>'(GMT+04:00) Yerevan',
'Asia/Karachi'=>'(GMT+05:00) Islamabad, Karachi',
'Asia/Tashkent'=>'(GMT+05:00) Tashkent',
'Asia/Kolkata'=>'(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi',
'Asia/Colombo'=>'(GMT+05:30) Sri Jayawardenepura',
'Asia/Katmandu'=>'(GMT+05:45) Kathmandu',
'Asia/Dhaka'=>'(GMT+06:00) Astana, Dhaka',
'Asia/Yekaterinburg'=>'(GMT+06:00) Ekaterinburg',
'Asia/Rangoon'=>'(GMT+06:30) Yangon (Rangoon)',
'Asia/Novosibirsk'=>'(GMT+07:00) Almaty, Novosibirsk',
'Asia/Bangkok'=>'(GMT+07:00) Bangkok, Hanoi, Jakarta',
'Asia/Beijing'=>'(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi',
'Asia/Ulaanbaatar'=>'(GMT+08:00) Irkutsk, Ulaan Bataar',
'Asia/Krasnoyarsk'=>'(GMT+08:00) Krasnoyarsk',
'Asia/Kuala_Lumpur'=>'(GMT+08:00) Kuala Lumpur, Singapore',
'Asia/Taipei'=>'(GMT+08:00) Taipei',
'Australia/Perth'=>'(GMT+08:00) Perth',
'Asia/Seoul'=>'(GMT+09:00) Seoul',
'Asia/Tokyo'=>'(GMT+09:00) Osaka, Sapporo, Tokyo',
'Australia/Darwin'=>'(GMT+09:30) Darwin',
'Australia/Adelaide'=>'(GMT+09:30) Adelaide',
'Australia/Sydney'=>'(GMT+10:00) Canberra, Melbourne, Sydney',
'Australia/Brisbane'=>'(GMT+10:00) Brisbane',
'Australia/Hobart'=>'(GMT+10:00) Hobart',
'Asia/Yakutsk'=>'(GMT+10:00) Yakutsk',
'Pacific/Guam'=>'(GMT+10:00) Guam, Port Moresby',
'Asia/Vladivostok'=>'(GMT+11:00) Vladivostok',
'Pacific/Fiji'=>'(GMT+12:00) Fiji, Kamchatka, Marshall Is.',
'Asia/Magadan'=>'(GMT+12:00) Magadan, Solomon Is., New Caledonia',
'Pacific/Auckland'=>'(GMT+12:00) Auckland, Wellington',
'Pacific/Tongatapu'=>'(GMT+13:00) Nukualofa'
);
}
/**
* _range()
*/
protected static function _range($step, $start, $end, $flag = false)
{
$result = array();
if ($flag) {
for ($i = $start; $i <= $end; $i += $step) $result[$i] = (string) $i;
} else {
for ($i = $start; $i < $end; $i += $step) $result[$i] = sprintf('%02d', $i);
}
return $result;
}
}
================================================
FILE: libraries/Gelato/Debug/Debug.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Debug
{
/**
* Time
*
* @var array
*/
protected static $time = array();
/**
* Memory
*
* @var array
*/
protected static $memory = array();
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Save current time for current point
*
*
* Debug::elapsedTimeSetPoint('point_name');
*
*
* @param string $point_name Point name
*/
public static function elapsedTimeSetPoint($point_name)
{
Debug::$time[$point_name] = microtime(true);
}
/**
* Get elapsed time for current point
*
*
* echo Debug::elapsedTime('point_name');
*
*
* @param string $point_name Point name
* @return string
*/
public static function elapsedTime($point_name)
{
if (isset(Debug::$time[$point_name])) return sprintf("%01.4f", microtime(true) - Debug::$time[$point_name]);
}
/**
* Save current memory for current point
*
*
* Debug::memoryUsageSetPoint('point_name');
*
*
* @param string $point_name Point name
*/
public static function memoryUsageSetPoint($point_name)
{
Debug::$memory[$point_name] = memory_get_usage();
}
/**
* Get memory usage for current point
*
*
* echo Debug::memoryUsage('point_name');
*
*
* @param string $point_name Point name
* @return string
*/
public static function memoryUsage($point_name)
{
if (isset(Debug::$memory[$point_name])) return Number::byteFormat(memory_get_usage() - Debug::$memory[$point_name]);
}
/**
* Print the variable $data and exit if exit = true
*
*
* Debug::dump($data);
*
*
* @param mixed $data Data
* @param boolean $exit Exit
*/
public static function dump($data, $exit = false)
{
echo "dump \n---------------------- \n\n" . print_r($data, true) . "\n----------------------
";
if ($exit) exit;
}
}
================================================
FILE: libraries/Gelato/ErrorHandler/ErrorHandler.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class ErrorHandler
{
/**
* Error Levels
*/
public static $levels = array (
E_ERROR => 'Fatal Error',
E_PARSE => 'Parse Error',
E_COMPILE_ERROR => 'Compile Error',
E_COMPILE_WARNING => 'Compile Warning',
E_STRICT => 'Strict Mode Error',
E_NOTICE => 'Notice',
E_WARNING => 'Warning',
E_RECOVERABLE_ERROR => 'Recoverable Error',
E_USER_NOTICE => 'Notice',
E_USER_WARNING => 'Warning',
E_USER_ERROR => 'Error',
/*E_DEPRECATED => 'Deprecated',*/ /* PHP 5.3 only */
/*E_USER_DEPRECATED => 'Deprecated'*/ /* PHP 5.3 only */
);
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Returns an array of lines from a file.
*
* @access public
* @param string $file File in which you want to highlight a line
* @param int $line Line number to highlight
* @param int $padding (optional) Number of padding lines
* @return array
*/
protected static function highlightCode($file, $line, $padding = 6)
{
if ( ! is_readable($file)) {
return false;
}
$handle = fopen($file, 'r');
$lines = array();
$currentLine = 0;
while ( ! feof($handle)) {
$currentLine++;
$temp = fgets($handle);
if ($currentLine > $line + $padding) {
break; // Exit loop after we have found what we were looking for
}
if ($currentLine >= ($line - $padding) && $currentLine <= ($line + $padding)) {
$lines[] = array
(
'number' => str_pad($currentLine, 4, ' ', STR_PAD_LEFT),
'highlighted' => ($currentLine === $line),
'code' => ErrorHandler::highlightString($temp),
);
}
}
fclose($handle);
return $lines;
}
/**
* Converts errors to ErrorExceptions.
*
* @param integer $code The error code
* @param string $message The error message
* @param string $file The filename where the error occurred
* @param integer $line The line number where the error occurred
* @return boolean
*/
public static function error($code, $message, $file, $line)
{
// If isset error_reporting and $code then throw new error exception
if ((error_reporting() & $code) !== 0) {
/**
* Dont thow NOTICE exception for PRODUCTION Environment. Just write to log.
*/
if (GELATO_DEVELOPMENT == false && $code == 8) {
// Get exception info
$error['code'] = $code;
$error['message'] = $message;
$error['file'] = $file;
$error['line'] = $line;
$error['type'] = 'ErrorException: ';
$codes = array (
E_USER_NOTICE => 'Notice',
);
$error['type'] .= in_array($error['code'], array_keys($codes)) ? $codes[$error['code']] : 'Unknown Error';
// Write to log
Log::write("{$error['type']}: {$error['message']} in {$error['file']} at line {$error['line']}");
} else {
throw new ErrorException($message, $code, 0, $file, $line);
}
}
// Don't execute PHP internal error handler
return true;
}
/**
* Highlight string
*
* @param string $string String
* @return string
*/
protected static function highlightString($string)
{
$search = array("\r\n", "\n\r", "\r", "\n", '', '', '<?php ', '#$@r4!/*');
$replace = array('', '', '', '', '', '', '', '/*');
return str_replace($search, $replace, highlight_string(' 0) {
foreach ($entry['args'] as $arg) {
ob_start();
var_dump($arg);
$arg = htmlspecialchars(ob_get_contents());
ob_end_clean();
$arguments[] = $arg;
}
}
/**
* Location
*/
$location = array();
if (isset($entry['file'])) {
$location['file'] = $entry['file'];
$location['line'] = $entry['line'];
$location['code'] = self::highlightCode($entry['file'], $entry['line']);
}
/**
* Compile into array
*/
$trace[] = array
(
'function' => $function,
'arguments' => $arguments,
'location' => $location,
);
}
return $trace;
}
/**
* Convert errors not caught by the error handler to ErrorExceptions.
*/
public static function fatal()
{
$e = error_get_last();
if ($e !== null && (error_reporting() & $e['type']) !== 0) {
ErrorHandler::exception(new ErrorException($e['message'], $e['type'], 0, $e['file'], $e['line']));
exit(1);
}
}
/**
* Handles uncaught exceptions and returns a pretty error screen.
*
* @access public
* @param Exception $exception An exception object
*/
public static function exception($exception)
{
try {
// Empty output buffers
while(ob_get_level() > 0) ob_end_clean();
// Get exception info
$error['code'] = $exception->getCode();
$error['message'] = $exception->getMessage();
$error['file'] = $exception->getFile();
$error['line'] = $exception->getLine();
// Determine error type
if ($exception instanceof ErrorException) {
$error['type'] = 'ErrorException: ';
$error['type'] .= in_array($error['code'], array_keys(ErrorHandler::$levels)) ? ErrorHandler::$levels[$error['code']] : 'Unknown Error';
} else {
$error['type'] = get_class($exception);
}
// Write to log
Log::write("{$error['type']}: {$error['message']} in {$error['file']} at line {$error['line']}");
// Send headers and output
@header('Content-Type: text/html; charset=UTF-8');
if (GELATO_DEVELOPMENT) {
$error['backtrace'] = $exception->getTrace();
if ($exception instanceof ErrorException) {
$error['backtrace'] = array_slice($error['backtrace'], 1); //Remove call to error handler from backtrace
}
$error['backtrace'] = self::formatBacktrace($error['backtrace']);
$error['highlighted'] = self::highlightCode($error['file'], $error['line']);
@header('HTTP/1.1 500 Internal Server Error');
include 'Resources/Views/Errors/exception.php';
} else {
@header('HTTP/1.1 500 Internal Server Error');
include 'Resources/Views/Errors/production.php';
}
} catch (Exception $e) {
// Empty output buffers
while(ob_get_level() > 0) ob_end_clean();
echo $e->getMessage() . ' in ' . $e->getFile() . ' (line ' . $e->getLine() . ').';
}
exit(1);
}
}
================================================
FILE: libraries/Gelato/ErrorHandler/Resources/Views/Errors/exception.php
================================================
Error
[]
Gelato
Message:
Location: (line )
class="highlighted">
Backtrace +
Superglobals +
Included Files +
================================================
FILE: libraries/Gelato/ErrorHandler/Resources/Views/Errors/production.php
================================================
Error
Error
Aw, snap! An error has occurred while processing your request.
================================================
FILE: libraries/Gelato/FileSystem/Dir.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Dir
{
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Creates a directory
*
*
* Dir::create('folder1');
*
*
* @param string $dir Name of directory to create
* @param integer $chmod Chmod
* @return boolean
*/
public static function create($dir, $chmod = 0775)
{
// Redefine vars
$dir = (string) $dir;
// Create new dir if $dir !exists
return ( ! Dir::exists($dir)) ? @mkdir($dir, $chmod, true) : true;
}
/**
* Checks if this directory exists.
*
*
* if (Dir::exists('folder1')) {
* // Do something...
* }
*
*
* @param string $dir Full path of the directory to check.
* @return boolean
*/
public static function exists($dir)
{
// Redefine vars
$dir = (string) $dir;
// Directory exists
if (file_exists($dir) && is_dir($dir)) return true;
// Doesn't exist
return false;
}
/**
* Check dir permission
*
*
* echo Dir::checkPerm('folder1');
*
*
* @param string $dir Directory to check
* @return string
*/
public static function checkPerm($dir)
{
// Redefine vars
$dir = (string) $dir;
// Clear stat cache
clearstatcache();
// Return perm
return substr(sprintf('%o', fileperms($dir)), -4);
}
/**
* Delete directory
*
*
* Dir::delete('folder1');
*
*
* @param string $dir Name of directory to delete
*/
public static function delete($dir)
{
// Redefine vars
$dir = (string) $dir;
// Delete dir
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);}}}
reset($ob); rmdir($dir);
}
/**
* Get list of directories
*
*
* $dirs = Dir::scan('folders');
*
*
* @param string $dir Directory
*/
public static function scan($dir)
{
// Redefine vars
$dir = (string) $dir;
// Scan dir
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;}
}
/**
* Check if a directory is writable.
*
*
* if (Dir::writable('folder1')) {
* // Do something...
* }
*
*
* @param string $path The path to check.
* @return booleans
*/
public static function writable($path)
{
// Redefine vars
$path = (string) $path;
// Create temporary file
$file = tempnam($path, 'writable');
// File has been created
if ($file !== false) {
// Remove temporary file
File::delete($file);
// Writable
return true;
}
// Else not writable
return false;
}
/**
* Get directory size.
*
*
* echo Dir::size('folder1');
*
*
* @param string $path The path to directory.
* @return integer
*/
public static function size($path)
{
// Redefine vars
$path = (string) $path;
$total_size = 0;
$files = scandir($path);
$clean_path = rtrim($path, '/') . '/';
foreach ($files as $t) {
if ($t <> "." && $t <> "..") {
$current_file = $clean_path . $t;
if (is_dir($current_file)) {
$total_size += Dir::size($current_file);
} else {
$total_size += filesize($current_file);
}
}
}
// Return total size
return $total_size;
}
/**
* Copy directory.
*
* Dir::copy('source_folder_path', 'destination_folder_path);
*
* @param $src
* @param $dst
*/
public static function copy($src, $dst) {
$dir = opendir($src);
@mkdir($dst);
while(false !== ( $file = readdir($dir)) ) {
if (( $file != '.' ) && ( $file != '..' )) {
if ( is_dir($src .'/'. $file) ) {
self::copy($src .'/'. $file, $dst .'/'. $file);
} else {
copy($src .'/'. $file,$dst .'/'. $file);
}
}
}
closedir($dir);
}
}
================================================
FILE: libraries/Gelato/FileSystem/File.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class File
{
/**
* Mime type list
*
* @var array
*/
public static $mime_types = array(
'aac' => 'audio/aac',
'atom' => 'application/atom+xml',
'avi' => 'video/avi',
'bmp' => 'image/x-ms-bmp',
'c' => 'text/x-c',
'class' => 'application/octet-stream',
'css' => 'text/css',
'csv' => 'text/csv',
'deb' => 'application/x-deb',
'dll' => 'application/x-msdownload',
'dmg' => 'application/x-apple-diskimage',
'doc' => 'application/msword',
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'exe' => 'application/octet-stream',
'flv' => 'video/x-flv',
'gif' => 'image/gif',
'gz' => 'application/x-gzip',
'h' => 'text/x-c',
'htm' => 'text/html',
'html' => 'text/html',
'ini' => 'text/plain',
'jar' => 'application/java-archive',
'java' => 'text/x-java',
'jpeg' => 'image/jpeg',
'jpg' => 'image/jpeg',
'js' => 'text/javascript',
'json' => 'application/json',
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mka' => 'audio/x-matroska',
'mkv' => 'video/x-matroska',
'mp3' => 'audio/mpeg',
'mp4' => 'application/mp4',
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'odt' => 'application/vnd.oasis.opendocument.text',
'ogg' => 'audio/ogg',
'pdf' => 'application/pdf',
'php' => 'text/x-php',
'png' => 'image/png',
'psd' => 'image/vnd.adobe.photoshop',
'py' => 'application/x-python',
'ra' => 'audio/vnd.rn-realaudio',
'ram' => 'audio/vnd.rn-realaudio',
'rar' => 'application/x-rar-compressed',
'rss' => 'application/rss+xml',
'safariextz' => 'application/x-safari-extension',
'sh' => 'text/x-shellscript',
'shtml' => 'text/html',
'swf' => 'application/x-shockwave-flash',
'tar' => 'application/x-tar',
'tif' => 'image/tiff',
'tiff' => 'image/tiff',
'torrent' => 'application/x-bittorrent',
'txt' => 'text/plain',
'wav' => 'audio/wav',
'webp' => 'image/webp',
'wma' => 'audio/x-ms-wma',
'xls' => 'application/vnd.ms-excel',
'xml' => 'text/xml',
'zip' => 'application/zip',
);
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Returns true if the File exists.
*
*
* if (File::exists('filename.txt')) {
* // Do something...
* }
*
*
* @param string $filename The file name
* @return boolean
*/
public static function exists($filename)
{
// Redefine vars
$filename = (string) $filename;
// Return
return (file_exists($filename) && is_file($filename));
}
/**
* Delete file
*
*
* File::delete('filename.txt');
*
*
* @param mixed $filename The file name or array of files
* @return boolean
*/
public static function delete($filename)
{
// Is array
if (is_array($filename)) {
// Delete each file in $filename array
foreach ($filename as $file) {
@unlink((string) $file);
}
} else {
// Is string
return @unlink((string) $filename);
}
}
/**
* Rename file
*
*
* File::rename('filename1.txt', 'filename2.txt');
*
*
* @param string $from Original file location
* @param string $to Desitination location of the file
* @return boolean
*/
public static function rename($from, $to)
{
// Redefine vars
$from = (string) $from;
$to = (string) $to;
// If file exists $to than rename it
if ( ! File::exists($to)) return rename($from, $to);
// Else return false
return false;
}
/**
* Copy file
*
*
* File::copy('folder1/filename.txt', 'folder2/filename.txt');
*
*
* @param string $from Original file location
* @param string $to Desitination location of the file
* @return boolean
*/
public static function copy($from, $to)
{
// Redefine vars
$from = (string) $from;
$to = (string) $to;
// If file !exists $from and exists $to then return false
if ( ! File::exists($from) || File::exists($to)) return false;
// Else copy file
return copy($from, $to);
}
/**
* Get the File extension.
*
*
* echo File::ext('filename.txt');
*
*
* @param string $filename The file name
* @return string
*/
public static function ext($filename)
{
// Redefine vars
$filename = (string) $filename;
// Return file extension
return substr(strrchr($filename, '.'), 1);
}
/**
* Get the File name
*
*
* echo File::name('filename.txt');
*
*
* @param string $filename The file name
* @return string
*/
public static function name($filename)
{
// Redefine vars
$filename = (string) $filename;
// Return filename
return basename($filename, '.'.File::ext($filename));
}
/**
* Get list of files in directory recursive
*
*
* $files = File::scan('folder');
* $files = File::scan('folder', 'txt');
* $files = File::scan('folder', array('txt', 'log'));
*
*
* @param string $folder Folder
* @param mixed $type Files types
* @return array
*/
public static function scan($folder, $type = null)
{
$data = array();
if (is_dir($folder)) {
$iterator = new RecursiveDirectoryIterator($folder);
foreach (new RecursiveIteratorIterator($iterator) as $file) {
if ($type !== null) {
if (is_array($type)) {
$file_ext = substr(strrchr($file->getFilename(), '.'), 1);
if (in_array($file_ext, $type)) {
if (strpos($file->getFilename(), $file_ext, 1)) {
$data[] = $file->getFilename();
}
}
} else {
if (strpos($file->getFilename(), $type, 1)) {
$data[] = $file->getFilename();
}
}
} else {
if ($file->getFilename() !== '.' && $file->getFilename() !== '..') $data[] = $file->getFilename();
}
}
return $data;
} else {
return false;
}
}
/**
* Fetch the content from a file or URL.
*
*
* echo File::getContent('filename.txt');
*
*
* @param string $filename The file name
* @return boolean
*/
public static function getContent($filename)
{
// Redefine vars
$filename = (string) $filename;
// If file exists load it
if (File::exists($filename)) {
return file_get_contents($filename);
}
}
/**
* Writes a string to a file.
*
* @param string $filename The path of the file.
* @param string $content The content that should be written.
* @param boolean $createFile Should the file be created if it doesn't exists?
* @param boolean $append Should the content be appended if the file already exists?
* @param integer $chmod Mode that should be applied on the file.
* @return boolean
*/
public static function setContent($filename, $content, $create_file = true, $append = false, $chmod = 0666)
{
// Redefine vars
$filename = (string) $filename;
$content = (string) $content;
$create_file = (bool) $create_file;
$append = (bool) $append;
// File may not be created, but it doesn't exist either
if ( ! $create_file && File::exists($filename)) throw new RuntimeException(vsprintf("%s(): The file '{$filename}' doesn't exist", array(__METHOD__)));
// Create directory recursively if needed
Dir::create(dirname($filename));
// Create file & open for writing
$handler = ($append) ? @fopen($filename, 'a') : @fopen($filename, 'w');
// Something went wrong
if ($handler === false) throw new RuntimeException(vsprintf("%s(): The file '{$filename}' could not be created. Check if PHP has enough permissions.", array(__METHOD__)));
// Store error reporting level
$level = error_reporting();
// Disable errors
error_reporting(0);
// Write to file
$write = fwrite($handler, $content);
// Validate write
if($write === false) throw new RuntimeException(vsprintf("%s(): The file '{$filename}' could not be created. Check if PHP has enough permissions.", array(__METHOD__)));
// Close the file
fclose($handler);
// Chmod file
chmod($filename, $chmod);
// Restore error reporting level
error_reporting($level);
// Return
return true;
}
/**
* Get time(in Unix timestamp) the file was last changed
*
*
* echo File::lastChange('filename.txt');
*
*
* @param string $filename The file name
* @return boolean
*/
public static function lastChange($filename)
{
// Redefine vars
$filename = (string) $filename;
// If file exists return filemtime
if (File::exists($filename)) {
return filemtime($filename);
}
// Return
return false;
}
/**
* Get last access time
*
*
* echo File::lastAccess('filename.txt');
*
*
* @param string $filename The file name
* @return boolean
*/
public static function lastAccess($filename)
{
// Redefine vars
$filename = (string) $filename;
// If file exists return fileatime
if (File::exists($filename)) {
return fileatime($filename);
}
// Return
return false;
}
/**
* Returns the mime type of a file. Returns false if the mime type is not found.
*
*
* echo File::mime('filename.txt');
*
*
* @param string $file Full path to the file
* @param boolean $guess Set to false to disable mime type guessing
* @return string
*/
public static function mime($file, $guess = true)
{
// Redefine vars
$file = (string) $file;
$guess = (bool) $guess;
// Get mime using the file information functions
if (function_exists('finfo_open')) {
$info = finfo_open(FILEINFO_MIME_TYPE);
$mime = finfo_file($info, $file);
finfo_close($info);
return $mime;
} else {
// Just guess mime by using the file extension
if ($guess === true) {
$mime_types = File::$mime_types;
$extension = pathinfo($file, PATHINFO_EXTENSION);
return isset($mime_types[$extension]) ? $mime_types[$extension] : false;
} else {
return false;
}
}
}
/**
* Forces a file to be downloaded.
*
*
* File::download('filename.txt');
*
*
* @param string $file Full path to file
* @param string $content_type Content type of the file
* @param string $filename Filename of the download
* @param integer $kbps Max download speed in KiB/s
*/
public static function download($file, $content_type = null, $filename = null, $kbps = 0)
{
// Redefine vars
$file = (string) $file;
$content_type = ($content_type === null) ? null : (string) $content_type;
$filename = ($filename === null) ? null : (string) $filename;
$kbps = (int) $kbps;
// Check that the file exists and that its readable
if (file_exists($file) === false || is_readable($file) === false) {
throw new RuntimeException(vsprintf("%s(): Failed to open stream.", array(__METHOD__)));
}
// Empty output buffers
while (ob_get_level() > 0) ob_end_clean();
// Send headers
if ($content_type === null) $content_type = File::mime($file);
if ($filename === null) $filename = basename($file);
header('Content-type: ' . $content_type);
header('Content-Disposition: attachment; filename="' . $filename . '"');
header('Content-Length: ' . filesize($file));
// Read file and write it to the output
@set_time_limit(0);
if ($kbps === 0) {
readfile($file);
} else {
$handle = fopen($file, 'r');
while ( ! feof($handle) && !connection_aborted()) {
$s = microtime(true);
echo fread($handle, round($kbps * 1024));
if (($wait = 1e6 - (microtime(true) - $s)) > 0) usleep($wait);
}
fclose($handle);
}
exit();
}
/**
* Display a file in the browser.
*
*
* File::display('filename.txt');
*
*
* @param string $file Full path to file
* @param string $content_type Content type of the file
* @param string $filename Filename of the download
*/
public static function display($file, $content_type = null, $filename = null)
{
// Redefine vars
$file = (string) $file;
$content_type = ($content_type === null) ? null : (string) $content_type;
$filename = ($filename === null) ? null : (string) $filename;
// Check that the file exists and that its readable
if (file_exists($file) === false || is_readable($file) === false) {
throw new RuntimeException(vsprintf("%s(): Failed to open stream.", array(__METHOD__)));
}
// Empty output buffers
while (ob_get_level() > 0) ob_end_clean();
// Send headers
if ($content_type === null) $content_type = File::mime($file);
if($filename === null) $filename = basename($file);
header('Content-type: ' . $content_type);
header('Content-Disposition: inline; filename="' . $filename . '"');
header('Content-Length: ' . filesize($file));
// Read file and write to output
readfile($file);
exit();
}
/**
* Tests whether a file is writable for anyone.
*
*
* if (File::writable('filename.txt')) {
* // do something...
* }
*
*
* @param string $file File to check
* @return boolean
*/
public static function writable($file)
{
// Redefine vars
$file = (string) $file;
// Is file exists ?
if ( ! file_exists($file)) throw new RuntimeException(vsprintf("%s(): The file '{$file}' doesn't exist", array(__METHOD__)));
// Gets file permissions
$perms = fileperms($file);
// Is writable ?
if (is_writable($file) || ($perms & 0x0080) || ($perms & 0x0010) || ($perms & 0x0002)) return true;
}
}
================================================
FILE: libraries/Gelato/Form/Form.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Form
{
/**
* The registered custom macros.
*
* @var array
*/
public static $macros = array();
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Registers a custom macro.
*
*
*
* // Registering a Form macro
* Form::macro('my_field', function() {
* return '';
* });
*
* // Calling a custom Form macro
* echo Form::my_field();
*
*
* // Registering a Form macro with parameters
* Form::macro('my_field', function($value = '') {
* return '';
* });
*
* // Calling a custom Form macro with parameters
* echo Form::my_field('Monstra');
*
*
*
* @param string $name Name
* @param Closure $macro Macro
*/
public static function macro($name, $macro)
{
Form::$macros[$name] = $macro;
}
/**
* Create an opening HTML form tag.
*
*
* // Form will submit back to the current page using POST
* echo Form::open();
*
* // Form will submit to 'search' using GET
* echo Form::open('search', array('method' => 'get'));
*
* // When "file" inputs are present, you must include the "enctype"
* echo Form::open(null, array('enctype' => 'multipart/form-data'));
*
*
* @param mixed $action Form action, defaults to the current request URI.
* @param array $attributes HTML attributes.
* @uses Url::base
* @uses Html::attributes
* @return string
*/
public static function open($action = null, array $attributes = null)
{
if (! $action) {
// Submits back to the current url
$action = '';
} elseif (strpos($action, '://') === false) {
// Make the URI absolute
$action = Url::base() . '/' . $action;
}
// Add the form action to the attributes
$attributes['action'] = $action;
if ( ! isset($attributes['method'])) {
// Use POST method
$attributes['method'] = 'post';
}
return '';
}
/**
* Dynamically handle calls to custom macros.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public static function __callStatic($method, $parameters)
{
if (isset(Form::$macros[$method])) {
return call_user_func_array(Form::$macros[$method], $parameters);
}
throw new RuntimeException("Method [$method] does not exist.");
}
}
================================================
FILE: libraries/Gelato/Gelato.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* The version of Gelato
*/
define('GELATO_VERSION', '1.0.3');
/**
* Define __DIR__ constant for PHP 5.2.x
*/
if ( ! defined('__DIR__')) {
define('__DIR__', dirname(__FILE__));
}
/**
* Display Gelato Errors or not ?
*/
if ( ! defined('GELATO_DEVELOPMENT')) {
define('GELATO_DEVELOPMENT', true);
}
/**
* Use Gelato Class Loader or not ?
*/
if ( ! defined('GELATO_CLASS_LOADER')) {
define('GELATO_CLASS_LOADER', true);
}
/**
* Load Gelato Logger
*/
require_once __DIR__ . '/Log/Log.php';
/**
* Use Gelato Logger default path or not ?
*/
if ( ! defined('GELATO_LOGS_PATH')) {
define('GELATO_LOGS_PATH', __DIR__. '/_logs');
}
/**
* Configure Gelato Logger
*/
Log::configure('path', GELATO_LOGS_PATH);
/**
* Load Gelato Error Handler
*/
require_once __DIR__ . '/ErrorHandler/ErrorHandler.php';
/**
* Set Error Handler
*/
set_error_handler('ErrorHandler::error');
/**
* Set Fatal Error Handler
*/
register_shutdown_function('ErrorHandler::fatal');
/**
* Set Exception Handler
*/
set_exception_handler('ErrorHandler::exception');
/**
* Gelato Class Loader
*/
require_once __DIR__ . '/ClassLoader/ClassLoader.php';
/**
* Map all Gelato Classes
*/
ClassLoader::mapClasses(array(
'Agent' => __DIR__.'/Agent/Agent.php',
'Arr' => __DIR__.'/Arr/Arr.php',
'Cache' => __DIR__.'/Cache/Cache.php',
'Cookie' => __DIR__.'/Cookie/Cookie.php',
'Curl' => __DIR__.'/Curl/Curl.php',
'Date' => __DIR__.'/Date/Date.php',
'Debug' => __DIR__.'/Debug/Debug.php',
'File' => __DIR__.'/FileSystem/File.php',
'Dir' => __DIR__.'/FileSystem/Dir.php',
'Form' => __DIR__.'/Form/Form.php',
'Html' => __DIR__.'/Html/Html.php',
'Image' => __DIR__.'/Image/Image.php',
'Inflector' => __DIR__.'/Inflector/Inflector.php',
'MinifyCSS' => __DIR__.'/Minify/MinifyCSS.php',
'MinifyHTML' => __DIR__.'/Minify/MinifyHTML.php',
'MinifyJS' => __DIR__.'/Minify/MinifyJS.php',
'Notification' => __DIR__.'/Notification/Notification.php',
'Number' => __DIR__.'/Number/Number.php',
'Registry' => __DIR__.'/Registry/Registry.php',
'Request' => __DIR__.'/Http/Request.php',
'Response' => __DIR__.'/Http/Response.php',
'Token' => __DIR__.'/Security/Token.php',
'Text' => __DIR__.'/Text/Text.php',
'Session' => __DIR__.'/Session/Session.php',
'Url' => __DIR__.'/Url/Url.php',
'Valid' => __DIR__.'/Validation/Valid.php',
'Zip' => __DIR__.'/Zip/Zip.php',
));
/**
* Register Gelato Class Loader
*/
if (GELATO_CLASS_LOADER) {
ClassLoader::register();
}
================================================
FILE: libraries/Gelato/Html/Html.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Html
{
/**
* Preferred order of attributes
*
* @var array
*/
public static $attribute_order = array (
'action', 'method', 'type', 'id', 'name', 'value',
'href', 'src', 'width', 'height', 'cols', 'rows',
'size', 'maxlength', 'rel', 'media', 'accept-charset',
'accept', 'tabindex', 'accesskey', 'alt', 'title', 'class',
'style', 'selected', 'checked', 'readonly', 'disabled',
);
/**
* The registered custom macros.
*
* @var array
*/
public static $macros = array();
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Registers a custom macro.
*
*
*
* // Registering a Html macro
* Html::macro('my_element', function() {
* return '';
* });
*
* // Calling a custom Html macro
* echo Html::my_element();
*
*
* // Registering a Html macro with parameters
* Html::macro('my_element', function($id = '') {
* return '';
* });
*
* // Calling a custom Html macro with parameters
* echo Html::my_element('monstra');
*
*
*
* @param string $name Name
* @param Closure $macro Macro
*/
public static function macro($name, $macro)
{
Html::$macros[$name] = $macro;
}
/**
* Convert special characters to HTML entities. All untrusted content
* should be passed through this method to prevent XSS injections.
*
*
* echo Html::chars($username);
*
*
* @param string $value String to convert
* @param boolean $double_encode Encode existing entities
* @return string
*/
public static function chars($value, $double_encode = true)
{
return htmlspecialchars((string) $value, ENT_QUOTES, 'utf-8', $double_encode);
}
/**
* Compiles an array of HTML attributes into an attribute string.
* Attributes will be sorted using Html::$attribute_order for consistency.
*
*
* echo ''.$content.'';
*
*
* @param array $attributes Attribute list
* @return string
*/
public static function attributes(array $attributes = null)
{
if (empty($attributes)) return '';
// Init var
$sorted = array();
foreach (Html::$attribute_order as $key) {
if (isset($attributes[$key])) {
// Add the attribute to the sorted list
$sorted[$key] = $attributes[$key];
}
}
// Combine the sorted attributes
$attributes = $sorted + $attributes;
$compiled = '';
foreach ($attributes as $key => $value) {
if ($value === NULL) {
// Skip attributes that have NULL values
continue;
}
if (is_int($key)) {
// Assume non-associative keys are mirrored attributes
$key = $value;
}
// Add the attribute value
$compiled .= ' '.$key.'="'.Html::chars($value).'"';
}
return $compiled;
}
/**
* Create br tags
*
*
* echo Html::br(2);
*
*
* @param integer $num Count of line break tag
* @return string
*/
public static function br($num = 1)
{
return str_repeat("
",(int) $num);
}
/**
* Create
*
*
* echo Html::nbsp(2);
*
*
* @param integer $num Count of
* @return string
*/
public static function nbsp($num = 1)
{
return str_repeat(" ", (int) $num);
}
/**
* Create an arrow
*
*
* echo Html::arrow('right');
*
*
* @param string $direction Arrow direction [up,down,left,right]
* @param boolean $render If this option is true then render html object else return it
* @return string
*/
public static function arrow($direction)
{
switch ($direction) {
case "up": $output = '↑'; break;
case "down": $output = '↓'; break;
case "left": $output = '←'; break;
case "right": $output = '→'; break;
}
return $output;
}
/**
* Create HTML link anchor.
*
*
* echo Html::anchor('About', 'http://sitename.com/about');
*
*
* @param string $title Anchor title
* @param string $url Anchor url
* @param array $attributes Anchor attributes
* @uses Html::attributes
* @return string
*/
public static function anchor($title, $url = null, array $attributes = null)
{
// Add link
if ($url !== null) $attributes['href'] = $url;
return ''.$title.'';
}
/**
* Create HTML tag
*
*
* echo Html::heading('Title', 1);
*
*
* @param string $title Text
* @param integer $h Number [1-6]
* @param array $attributes Heading attributes
* @uses Html::attributes
* @return string
*/
public static function heading($title, $h = 1, array $attributes = null)
{
$output = ''.$title.' ';
return $output;
}
/**
* Generate document type declarations
*
*
* echo Html::doctype('html5');
*
*
* @param string $type Doctype to generated
* @return mixed
*/
public static function doctype($type = 'html5')
{
$doctypes = array('xhtml11' => '',
'xhtml1-strict' => '',
'xhtml1-trans' => '',
'xhtml1-frame' => '',
'html5' => '',
'html4-strict' => '',
'html4-trans' => '',
'html4-frame' => '');
if (isset($doctypes[$type])) return $doctypes[$type]; else return false;
}
/**
* Create image
*
*
* echo Html::image('data/files/pic1.jpg');
*
*
* @param array $attributes Image attributes
* @param string $file File
* @uses Url::base
* @return string
*/
public static function image($file, array $attributes = null)
{
if (strpos($file, '://') === FALSE) {
$file = Url::base().'/'.$file;
}
// Add the image link
$attributes['src'] = $file;
$attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($file, PATHINFO_FILENAME);
return '
';
}
/**
* Obfuscate an e-mail address to prevent spam-bots from sniffing it.
*
*
* echo Html::email('gelato@monstra.org');
*
*
* @param string $email
* @return string
*/
public static function email($email)
{
return str_replace('@', '@', Html::obfuscate($email));
}
/**
* Obfuscate a string to prevent spam-bots from sniffing it.
*
* This method obfuscate the value, randomly convert each
* letter to its entity or hexadecimal representation, keeping a
* bot from sniffing the randomly obfuscated letters.
*
*
* echo Html::obfuscate('gelato@monstra.org');
*
*
* @param string $value
* @return string
*/
public static function obfuscate($value)
{
$safe = '';
foreach (str_split($value) as $letter) {
switch (rand(1, 3)) {
case 1:
$safe .= ''.ord($letter).';';
break;
case 2:
$safe .= ''.dechex(ord($letter)).';';
break;
case 3:
$safe .= $letter;
}
}
return $safe;
}
/**
* Convert html to plain text
*
*
* echo Html::toText('test');
*
*
* @param string $str String
* @return string
*/
public static function toText($str)
{
return htmlspecialchars($str, ENT_QUOTES, 'utf-8');
}
/**
* Dynamically handle calls to custom macros.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public static function __callStatic($method, $parameters)
{
if (isset(Html::$macros[$method])) {
return call_user_func_array(Html::$macros[$method], $parameters);
}
throw new RuntimeException("Method [$method] does not exist.");
}
}
================================================
FILE: libraries/Gelato/Http/Request.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Request
{
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Redirects the browser to a page specified by the $url argument.
*
*
* Request::redirect('test');
*
*
* @param string $url The URL
* @param integer $status Status
* @param integer $delay Delay
*/
public static function redirect($url, $status = 302, $delay = null)
{
// Redefine vars
$url = (string) $url;
$status = (int) $status;
// Status codes
$messages = array();
$messages[301] = '301 Moved Permanently';
$messages[302] = '302 Found';
// Is Headers sent ?
if (headers_sent()) {
echo "\n";
} else {
// Redirect headers
Request::setHeaders('HTTP/1.1 ' . $status . ' ' . Arr::get($messages, $status, 302));
// Delay execution
if ($delay !== null) sleep((int) $delay);
// Redirect
Request::setHeaders("Location: $url");
// Shutdown request
Request::shutdown();
}
}
/**
* Set one or multiple headers.
*
*
* Request::setHeaders('Location: http://site.com/');
*
*
* @param mixed $headers String or array with headers to send.
*/
public static function setHeaders($headers)
{
// Loop elements
foreach ((array) $headers as $header) {
// Set header
header((string) $header);
}
}
/**
* Get
*
*
* $action = Request::get('action');
*
*
* @param string $key Key
* @param mixed
*/
public static function get($key)
{
return Arr::get($_GET, $key);
}
/**
* Post
*
*
* $login = Request::post('login');
*
*
* @param string $key Key
* @param mixed
*/
public static function post($key)
{
return Arr::get($_POST, $key);
}
/**
* Returns whether this is an ajax request or not
*
*
* if (Request::isAjax()) {
* // do something...
* }
*
*
* @return boolean
*/
public static function isAjax()
{
return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest';
}
/**
* Terminate request
*
*
* Request::shutdown();
*
*
*/
public static function shutdown()
{
exit(0);
}
}
================================================
FILE: libraries/Gelato/Http/Response.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Response
{
/**
* HTTP status codes and messages
*
* @var array
*/
public static $messages = array(
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing', // RFC2518
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Content',
205 => 'Reset Content',
206 => 'Partial Content',
207 => 'Multi-Status', // RFC4918
208 => 'Already Reported', // RFC5842
226 => 'IM Used', // RFC3229
300 => 'Multiple Choices',
301 => 'Moved Permanently',
302 => 'Found',
303 => 'See Other',
304 => 'Not Modified',
305 => 'Use Proxy',
306 => 'Reserved',
307 => 'Temporary Redirect',
308 => 'Permanent Redirect', // RFC-reschke-http-status-308-07
400 => 'Bad Request',
401 => 'Unauthorized',
402 => 'Payment Required',
403 => 'Forbidden',
404 => 'Not Found',
405 => 'Method Not Allowed',
406 => 'Not Acceptable',
407 => 'Proxy Authentication Required',
408 => 'Request Timeout',
409 => 'Conflict',
410 => 'Gone',
411 => 'Length Required',
412 => 'Precondition Failed',
413 => 'Request Entity Too Large',
414 => 'Request-URI Too Long',
415 => 'Unsupported Media Type',
416 => 'Requested Range Not Satisfiable',
417 => 'Expectation Failed',
418 => 'I\'m a teapot', // RFC2324
422 => 'Unprocessable Entity', // RFC4918
423 => 'Locked', // RFC4918
424 => 'Failed Dependency', // RFC4918
425 => 'Reserved for WebDAV advanced collections expired proposal', // RFC2817
426 => 'Upgrade Required', // RFC2817
428 => 'Precondition Required', // RFC6585
429 => 'Too Many Requests', // RFC6585
431 => 'Request Header Fields Too Large', // RFC6585
500 => 'Internal Server Error',
501 => 'Not Implemented',
502 => 'Bad Gateway',
503 => 'Service Unavailable',
504 => 'Gateway Timeout',
505 => 'HTTP Version Not Supported',
506 => 'Variant Also Negotiates (Experimental)', // RFC2295
507 => 'Insufficient Storage', // RFC4918
508 => 'Loop Detected', // RFC5842
510 => 'Not Extended', // RFC2774
511 => 'Network Authentication Required', // RFC6585
);
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Set header status
*
*
* Response::status(404);
*
*
* @param integer $status Status code
*/
public static function status($status)
{
if (array_key_exists($status, Response::$messages)) header('HTTP/1.1 ' . $status . ' ' . Response::$messages[$status]);
}
}
================================================
FILE: libraries/Gelato/Image/Image.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Image
{
/**
* Resizing contraint.
*
* @var integer
*/
const AUTO = 1;
/**
* Resizing contraint.
*
* @var integer
*/
const WIDTH = 2;
/**
* Resizing contraint.
*
* @var integer
*/
const HEIGHT = 3;
/**
* Watermark position.
*/
const TOP_LEFT = 4;
/**
* Watermark position.
*/
const TOP_RIGHT = 5;
/**
* Watermark position.
*/
const BOTTOM_LEFT = 6;
/**
* Watermark position.
*/
const BOTTOM_RIGHT = 7;
/**
* Watermark position.
*/
const CENTER = 8;
/**
* Holds info about the image.
*
* @var array
*/
protected $image_info;
/**
* Get value
*
* @param string $key Key
* @return mixed
*/
public function __get($key)
{
if (array_key_exists($key, $this->image_info)) return $this->image_info[$key];
}
/**
* Set value for specific key
*
* @param string $key Key
* @param mixed $value Value
*/
public function __set($key, $value)
{
$this->image_info[$key] = $value;
}
/**
* Image factory.
*
*
* $image = Image::factory('original.png');
*
*
* @param string $filename Filename
* @return Image
*/
public static function factory($filename)
{
return new Image($filename);
}
/**
* Construct
*
* @param string $file Filename
*/
public function __construct($file)
{
// Redefine vars
$file = (string) $file;
// Check if the file exists
if (file_exists($file)) {
// Extract attributes of the image file
list($this->width, $this->height, $type, $a) = getimagesize($file);
// Save image type
$this->type = $type;
// Create a new image
$this->image = $this->createImage($file, $type);
} else {
throw new RuntimeException(vsprintf("%s(): The file '{$file}' doesn't exist", array(__METHOD__)));
}
}
/**
* Create a new image from file.
*
* @param string $file Path to the image file
* @param integer $type Image type
* @return resource
*/
protected function createImage($file, $type)
{
// Create image from file
switch ($type) {
case IMAGETYPE_JPEG:
return imagecreatefromjpeg($file);
break;
case IMAGETYPE_GIF:
return imagecreatefromgif($file);
break;
case IMAGETYPE_PNG:
return imagecreatefrompng($file);
break;
default:
throw new RuntimeException(vsprintf("%s(): Unable to open '%s'. Unsupported image type.", array(__METHOD__, $type)));
}
}
/**
* Resizes the image to the chosen size.
*
*
* Image::factory('original.png')->resize(800, 600)->save('edited.png');
*
*
* @param integer $width Width of the image
* @param integer $height Height of the image
* @param integer $aspect_ratio Aspect ratio (Image::AUTO Image::WIDTH Image::HEIGHT)
* @return Image
*/
public function resize($width, $height = null, $aspect_ratio = null)
{
// Redefine vars
$width = (int) $width;
$height = ($height === null) ? null : (int) $height;
$aspect_ratio = ($aspect_ratio === null) ? null : (int) $aspect_ratio;
$xpos = $ypos = 0;
// Resizes the image to {$width}% of the original size
if ($height === null) {
$new_width = round($this->width * ($width / 100));
$new_height = round($this->height * ($width / 100));
} else {
// Resizes the image to the smalles possible dimension while maintaining aspect ratio
if ($aspect_ratio === Image::AUTO || $aspect_ratio === null) {
// Calculate smallest size based on given height and width while maintaining aspect ratio
$percentage = min(($width / $this->width), ($height / $this->height));
$new_width = round($this->width * $percentage);
$new_height = round($this->height * $percentage);
if ($aspect_ratio === null) {
$xpos = (int)(($width - $new_width) / 2);
$ypos = (int)(($height - $new_height) / 2);
}
// Resizes the image using the width to maintain aspect ratio
} elseif ($aspect_ratio === Image::WIDTH) {
// Base new size on given width while maintaining aspect ratio
$new_width = $width;
$new_height = round($this->height * ($width / $this->width));
// Resizes the image using the height to maintain aspect ratio
} elseif ($aspect_ratio === Image::HEIGHT) {
// Base new size on given height while maintaining aspect ratio
$new_width = round($this->width * ($height / $this->height));
$new_height = $height;
// Resizes the image to a dimension of {$width}x{$height} pixels while ignoring the aspect ratio
} else {
$new_width = $width;
$new_height = $height;
}
}
$old_image = $this->image;
if ($aspect_ratio === null) {
$this->image = imagecreatetruecolor($width, $height);
} else {
$this->image = imagecreatetruecolor($new_width, $new_height);
}
if ($this->type === IMAGETYPE_PNG) {
$bgcolor = imagecolorallocatealpha($this->image, 0, 0, 0, 127);
} else {
$bgcolor = imagecolorallocate($this->image, 255, 255, 255);
}
imagefill($this->image, 0, 0, $bgcolor);
// Copy and resize part of an image with resampling
imagecopyresampled($this->image, $old_image, $xpos, $ypos, 0, 0, $new_width, $new_height, $this->width, $this->height);
// Destroy an image
imagedestroy($old_image);
// Save new width and height
$this->width = $new_width;
$this->height = $new_height;
return $this;
}
/**
* Crops the image
*
*
* Image::factory('original.png')->crop(800, 600, 0, 0)->save('edited.png');
*
*
* @param integer $width Width of the crop
* @param integer $height Height of the crop
* @param integer $x The X coordinate of the cropped region's top left corner
* @param integer $y The Y coordinate of the cropped region's top left corner
* @return Image
*/
public function crop($width, $height, $x, $y)
{
// Redefine vars
$width = (int) $width;
$height = (int) $height;
$x = (int) $x;
$y = (int) $y;
// Calculate
if ($x + $width > $this->width) $width = $this->width - $x;
if ($y + $height > $this->height) $height = $this->height - $y;
if ($width <= 0 || $height <= 0) return false;
$old_image = $this->image;
// Create a new true color image
$this->image = imagecreatetruecolor($width, $height);
$transparent = imagecolorallocatealpha($this->image, 0, 0, 0, 127);
imagefill($this->image, 0, 0, $transparent);
// Copy and resize part of an image with resampling
imagecopyresampled($this->image, $old_image, 0, 0, $x, $y, $width, $height, $width, $height);
// Destroy an image
imagedestroy($old_image);
// Save new width and height
$this->width = $width;
$this->height = $height;
return $this;
}
/**
* Adds a watermark to the image.
*
* @param string $file Path to the image file
* @param integer $position Position of the watermark
* @param integer $opacity Opacity of the watermark in percent
* @return Image
*/
public function watermark($file, $position = null, $opacity = 100)
{
// Check if the image exists
if ( ! file_exists($file)) {
throw new RuntimeException(vsprintf("%s(): The image file ('%s') does not exist.", array(__METHOD__, $file)));
}
$watermark = $this->createImage($file, $this->type);
$watermarkW = imagesx($watermark);
$watermarkH = imagesy($watermark);
// Make sure that opacity is between 0 and 100
$opacity = max(min((int) $opacity, 100), 0);
if ($opacity < 100) {
if (GD_BUNDLED === 0) {
throw new RuntimeException(vsprintf("%s(): Setting watermark opacity requires the 'imagelayereffect' function which is only available in the bundled version of GD.", array(__METHOD__)));
}
// Convert alpha to 0-127
$alpha = min(round(abs(($opacity * 127 / 100) - 127)), 127);
$transparent = imagecolorallocatealpha($watermark, 0, 0, 0, $alpha);
imagelayereffect($watermark, IMG_EFFECT_OVERLAY);
imagefilledrectangle($watermark, 0, 0, $watermarkW, $watermarkH, $transparent);
}
// Position the watermark.
switch ($position) {
case Image::TOP_RIGHT:
$x = imagesx($this->image) - $watermarkW;
$y = 0;
break;
case Image::BOTTOM_LEFT:
$x = 0;
$y = imagesy($this->image) - $watermarkH;
break;
case Image::BOTTOM_RIGHT:
$x = imagesx($this->image) - $watermarkW;
$y = imagesy($this->image) - $watermarkH;
break;
case Image::CENTER:
$x = (imagesx($this->image) / 2) - ($watermarkW / 2);
$y = (imagesy($this->image) / 2) - ($watermarkH / 2);
break;
default:
$x = 0;
$y = 0;
}
imagealphablending($this->image, true);
imagecopy($this->image, $watermark, $x, $y, 0, 0, $watermarkW, $watermarkH);
imagedestroy($watermark);
// Return Image
return $this;
}
/**
* Convert image into grayscale
*
*
* Image::factory('original.png')->grayscale()->save('edited.png');
*
*
* @return Image
*/
public function grayscale()
{
imagefilter($this->image, IMG_FILTER_GRAYSCALE);
return $this;
}
/**
* Convert image into sepia
*
*
* Image::factory('original.png')->sepia()->save('edited.png');
*
*
* @return Image
*/
public function sepia()
{
imagefilter($this->image, IMG_FILTER_GRAYSCALE);
imagefilter($this->image, IMG_FILTER_COLORIZE, 112, 66, 20);
return $this;
}
/**
* Convert image into brightness
*
*
* Image::factory('original.png')->brightness(60)->save('edited.png');
*
*
* @param integer $level Level. From -255(min) to 255(max)
* @return Image
*/
public function brightness($level = 0)
{
imagefilter($this->image, IMG_FILTER_BRIGHTNESS, (int) $level);
return $this;
}
/**
* Convert image into colorize
*
*
* Image::factory('original.png')->colorize(60, 0, 0)->save('edited.png');
*
*
* @param integer $red Red
* @param integer $green Green
* @param integer $blue Blue
* @return Image
*/
public function colorize($red, $green, $blue)
{
imagefilter($this->image, IMG_FILTER_COLORIZE, (int) $red, (int) $green, (int) $blue);
return $this;
}
/**
* Convert image into contrast
*
*
* Image::factory('original.png')->contrast(60)->save('edited.png');
*
*
* @param integer $level Level. From -100(max) to 100(min) note the direction!
* @return Image
*/
public function contrast($level)
{
imagefilter($this->image, IMG_FILTER_CONTRAST, (int) $level);
return $this;
}
/**
* Creates a color based on a hex value.
*
* @param string $hex Hex code of the color
* @param integer $alpha Alpha. Default is 100
* @param boolean $returnRGB FALSE returns a color identifier, TRUE returns a RGB array
* @return integer
*/
protected function createColor($hex, $alpha = 100, $return_rgb = false)
{
// Redefine vars
$hex = (string) $hex;
$alpha = (int) $alpha;
$return_rgb = (bool) $return_rgb;
$hex = str_replace('#', '', $hex);
if (preg_match('/^([a-f0-9]{3}){1,2}$/i', $hex) === 0) {
throw new RuntimeException(vsprintf("%s(): Invalid color code ('%s').", array(__METHOD__, $hex)));
}
if (strlen($hex) === 3) {
$r = hexdec(str_repeat(substr($hex, 0, 1), 2));
$g = hexdec(str_repeat(substr($hex, 1, 1), 2));
$b = hexdec(str_repeat(substr($hex, 2, 1), 2));
} else {
$r = hexdec(substr($hex, 0, 2));
$g = hexdec(substr($hex, 2, 2));
$b = hexdec(substr($hex, 4, 2));
}
if ($return_rgb === true) {
return array('r' => $r, 'g' => $g, 'b' => $b);
} else {
// Convert alpha to 0-127
$alpha = min(round(abs(($alpha * 127 / 100) - 127)), 127);
return imagecolorallocatealpha($this->image, $r, $g, $b, $alpha);
}
}
/**
* Rotates the image using the given angle in degrees.
*
*
* Image::factory('original.png')->rotate(90)->save('edited.png');
*
*
* @param integer $degrees Degrees to rotate the image
* @return Image
*/
public function rotate($degrees)
{
if (GD_BUNDLED === 0) {
throw new RuntimeException(vsprintf("%s(): This method requires the 'imagerotate' function which is only available in the bundled version of GD.", array(__METHOD__)));
}
// Redefine vars
$degrees = (int) $degrees;
// Get image width and height
$width = imagesx($this->image);
$height = imagesy($this->image);
// Allocate a color for an image
$transparent = imagecolorallocatealpha($this->image, 0, 0, 0, 127);
// Rotate gif image
if ($this->image_info['type'] === IMAGETYPE_GIF) {
// Create a new true color image
$temp = imagecreatetruecolor($width, $height);
// Flood fill
imagefill($temp, 0, 0, $transparent);
// Copy part of an image
imagecopy($temp, $this->image, 0, 0, 0, 0, $width, $height);
// Destroy an image
imagedestroy($this->image);
// Save temp image
$this->image = $temp;
}
// Rotate an image with a given angle
$this->image = imagerotate($this->image, (360 - $degrees), $transparent);
// Define a color as transparent
imagecolortransparent($this->image, $transparent);
return $this;
}
/**
* Adds a border to the image.
*
*
* Image::factory('original.png')->border('#000', 5)->save('edited.png');
*
*
* @param string $color Hex code for the color
* @param integer $thickness Thickness of the frame in pixels
* @return Image
*/
public function border($color = '#000', $thickness = 5)
{
// Redefine vars
$color = (string) $color;
$thickness = (int) $thickness;
// Get image width and height
$width = imagesx($this->image);
$height = imagesy($this->image);
// Creates a color based on a hex value
$color = $this->createColor($color);
// Create border
for ($i = 0; $i < $thickness; $i++) {
if ($i < 0) {
$x = $width + 1;
$y = $hidth + 1;
} else {
$x = --$width;
$y = --$height;
}
imagerectangle($this->image, $i, $i, $x, $y, $color);
}
return $this;
}
/**
* Save image
*
*
* Image::factory('original.png')->save('edited.png');
*
*
* @param string $dest Desitination location of the file
* @param integer $quality Image quality. Default is 100
* @return Image
*/
public function save($file, $quality = 100)
{
// Redefine vars
$file = (string) $file;
$quality = (int) $quality;
$path_info = pathinfo($file);
if ( ! is_writable($path_info['dirname'])) {
throw new RuntimeException(vsprintf("%s(): '%s' is not writable.", array(__METHOD__, $path_info['dirname'])));
}
// Make sure that quality is between 0 and 100
$quality = max(min((int) $quality, 100), 0);
// Save image
switch ($path_info['extension']) {
case 'jpg':
case 'jpeg':
imagejpeg($this->image, $file, $quality);
break;
case 'gif':
imagegif($this->image, $file);
break;
case 'png':
imagealphablending($this->image, true);
imagesavealpha($this->image, true);
imagepng($this->image, $file, (9 - (round(($quality / 100) * 9))));
break;
default:
throw new RuntimeException(vsprintf("%s(): Unable to save to '%s'. Unsupported image format.", array(__METHOD__, $path_info['extension'])));
}
// Return Image
return $this;
}
/**
* Destructor
*/
public function __destruct()
{
imagedestroy($this->image);
}
}
================================================
FILE: libraries/Gelato/Inflector/Inflector.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Inflector
{
/**
* Plural rules
*
* @var array
*/
protected static $plural_rules = array(
'/^(ox)$/' => '\1\2en', // ox
'/([m|l])ouse$/' => '\1ice', // mouse, louse
'/(matr|vert|ind)ix|ex$/' => '\1ices', // matrix, vertex, index
'/(x|ch|ss|sh)$/' => '\1es', // search, switch, fix, box, process, address
'/([^aeiouy]|qu)y$/' => '\1ies', // query, ability, agency
'/(hive)$/' => '\1s', // archive, hive
'/(?:([^f])fe|([lr])f)$/' => '\1\2ves', // half, safe, wife
'/sis$/' => 'ses', // basis, diagnosis
'/([ti])um$/' => '\1a', // datum, medium
'/(p)erson$/' => '\1eople', // person, salesperson
'/(m)an$/' => '\1en', // man, woman, spokesman
'/(c)hild$/' => '\1hildren', // child
'/(buffal|tomat)o$/' => '\1\2oes', // buffalo, tomato
'/(bu|campu)s$/' => '\1\2ses', // bus, campus
'/(alias|status|virus)$/' => '\1es', // alias
'/(octop)us$/' => '\1i', // octopus
'/(ax|cris|test)is$/' => '\1es', // axis, crisis
'/s$/' => 's', // no change (compatibility)
'/$/' => 's',
);
/**
* Singular rules
*
* @var array
*/
protected static $singular_rules = array(
'/(matr)ices$/' => '\1ix',
'/(vert|ind)ices$/' => '\1ex',
'/^(ox)en/' => '\1',
'/(alias)es$/' => '\1',
'/([octop|vir])i$/' => '\1us',
'/(cris|ax|test)es$/' => '\1is',
'/(shoe)s$/' => '\1',
'/(o)es$/' => '\1',
'/(bus|campus)es$/' => '\1',
'/([m|l])ice$/' => '\1ouse',
'/(x|ch|ss|sh)es$/' => '\1',
'/(m)ovies$/' => '\1\2ovie',
'/(s)eries$/' => '\1\2eries',
'/([^aeiouy]|qu)ies$/' => '\1y',
'/([lr])ves$/' => '\1f',
'/(tive)s$/' => '\1',
'/(hive)s$/' => '\1',
'/([^f])ves$/' => '\1fe',
'/(^analy)ses$/' => '\1sis',
'/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/' => '\1\2sis',
'/([ti])a$/' => '\1um',
'/(p)eople$/' => '\1\2erson',
'/(m)en$/' => '\1an',
'/(s)tatuses$/' => '\1\2tatus',
'/(c)hildren$/' => '\1\2hild',
'/(n)ews$/' => '\1\2ews',
'/([^us])s$/' => '\1',
);
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Returns a camelized string from a string using underscore syntax.
*
*
* // "some_text_here" becomes "SomeTextHere"
* echo Inflector::camelize('some_text_here');
*
*
* @param string $string Word to camelize.
* @return string Camelized word.
*/
public static function camelize($string)
{
// Redefine vars
$string = (string) $string;
return str_replace(' ', '', ucwords(str_replace('_', ' ', $string)));
}
/**
* Returns a string using underscore syntax from a camelized string.
*
*
* // "SomeTextHere" becomes "some_text_here"
* echo Inflector::underscore('SomeTextHere');
*
*
* @param string $string CamelCased word
* @return string Underscored version of the $string
*/
public static function underscore($string)
{
// Redefine vars
$string = (string) $string;
return strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $string));
}
/**
* Returns a humanized string from a string using underscore syntax.
*
*
* // "some_text_here" becomes "Some text here"
* echo Inflector::humanize('some_text_here');
*
*
* @param string $string String using underscore syntax.
* @return string Humanized version of the $string
*/
public static function humanize($string)
{
// Redefine vars
$string = (string) $string;
return ucfirst(strtolower(str_replace('_', ' ', $string)));
}
/**
* Returns ordinalize number.
*
*
* // 1 becomes 1st
* echo Inflector::ordinalize(1);
*
*
* @param integer $number Number to ordinalize
* @return string
*/
public static function ordinalize($number)
{
if ( ! is_numeric($number)) {
return $number;
}
if (in_array(($number % 100), range(11, 13))) {
return $number . 'th';
} else {
switch ($number % 10) {
case 1: return $number . 'st'; break;
case 2: return $number . 'nd'; break;
case 3: return $number . 'rd'; break;
default: return $number . 'th'; break;
}
}
}
/**
* Returns the plural version of the given word
*
*
* echo Inflector::pluralize('cat');
*
*
* @param string $word Word to pluralize
* @return string
*/
public static function pluralize($word)
{
$result = (string) $word;
foreach (Inflector::$plural_rules as $rule => $replacement) {
if (preg_match($rule, $result)) {
$result = preg_replace($rule, $replacement, $result);
break;
}
}
return $result;
}
/**
* Returns the singular version of the given word
*
*
* echo Inflector::singularize('cats');
*
*
* @param string $word Word to singularize
* @return string
*/
public static function singularize($word)
{
$result = (string) $word;
foreach (Inflector::$singular_rules as $rule => $replacement) {
if (preg_match($rule, $result)) {
$result = preg_replace($rule, $replacement, $result);
break;
}
}
return $result;
}
}
================================================
FILE: libraries/Gelato/Log/Log.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Log
{
/**
* Path to the logs.
*
* @var string
*/
protected static $path = '';
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Configure Log
*
* @access public
* @param string $setting The setting
* @param string $value The value
*/
public static function configure($setting, $value)
{
if (property_exists("log", $setting)) Log::$$setting = $value;
}
/**
* Writes message to log.
*
* @access public
* @param string $message The message to write to the log
* @return boolean
*/
public static function write($message)
{
return (bool) file_put_contents(rtrim(Log::$path, '/') . '/' . gmdate('Y_m_d') . '.log',
'[' . gmdate('d-M-Y H:i:s') . '] ' . $message . PHP_EOL,
FILE_APPEND);
}
}
================================================
FILE: libraries/Gelato/Minify/MinifyCSS.php
================================================
* @author Stephen Clay
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class MinifyCSS
{
/**
* @var array
*/
protected $_options = null;
/**
* Are we "in" a hack? I.e. are some browsers targetted until the next comment?
*
* @var bool
*/
protected $_inHack = false;
/**
* Constructor
*
* @param array $options (currently ignored)
*/
private function __construct($options)
{
$this->_options = $options;
}
/**
* Minify a CSS string
*
* @param string $css
*
* @param array $options (currently ignored)
*
* @return string
*/
public static function process($css, $options = array())
{
$obj = new MinifyCSS($options);
return $obj->_process($css);
}
/**
* Minify a CSS string
*
* @param string $css
*
* @return string
*/
protected function _process($css)
{
$css = str_replace("\r\n", "\n", $css);
// preserve empty comment after '>'
// http://www.webdevout.net/css-hacks#in_css-selectors
$css = preg_replace('@>/\\*\\s*\\*/@', '>/*keep*/', $css);
// preserve empty comment between property and value
// http://css-discuss.incutio.com/?page=BoxModelHack
$css = preg_replace('@/\\*\\s*\\*/\\s*:@', '/*keep*/:', $css);
$css = preg_replace('@:\\s*/\\*\\s*\\*/@', ':/*keep*/', $css);
// apply callback to all valid comments (and strip out surrounding ws
$css = preg_replace_callback('@\\s*/\\*([\\s\\S]*?)\\*/\\s*@'
,array($this, '_commentCB'), $css);
// remove ws around { } and last semicolon in declaration block
$css = preg_replace('/\\s*{\\s*/', '{', $css);
$css = preg_replace('/;?\\s*}\\s*/', '}', $css);
// remove ws surrounding semicolons
$css = preg_replace('/\\s*;\\s*/', ';', $css);
// remove ws around urls
$css = preg_replace('/
url\\( # url(
\\s*
([^\\)]+?) # 1 = the URL (really just a bunch of non right parenthesis)
\\s*
\\) # )
/x', 'url($1)', $css);
// remove ws between rules and colons
$css = preg_replace('/
\\s*
([{;]) # 1 = beginning of block or rule separator
\\s*
([\\*_]?[\\w\\-]+) # 2 = property (and maybe IE filter)
\\s*
:
\\s*
(\\b|[#\'"-]) # 3 = first character of a value
/x', '$1$2:$3', $css);
// minimize hex colors
/*$css = preg_replace('/([^=])#([a-f\\d])\\2([a-f\\d])\\3([a-f\\d])\\4([\\s;\\}])/i'
, '$1#$2$3$4$5', $css);*/
// remove spaces between font families
$css = preg_replace_callback('/font-family:([^;}]+)([;}])/'
,array($this, '_fontFamilyCB'), $css);
$css = preg_replace('/@import\\s+url/', '@import url', $css);
// replace any ws involving newlines with a single newline
$css = preg_replace('/[ \\t]*\\n+\\s*/', "\n", $css);
// separate common descendent selectors w/ newlines (to limit line lengths)
$css = preg_replace('/([\\w#\\.\\*]+)\\s+([\\w#\\.\\*]+){/', "$1\n$2{", $css);
// Use newline after 1st numeric value (to limit line lengths).
$css = preg_replace('/
((?:padding|margin|border|outline):\\d+(?:px|em)?) # 1 = prop : 1st numeric value
\\s+
/x'
,"$1\n", $css);
// prevent triggering IE6 bug: http://www.crankygeek.com/ie6pebug/
$css = preg_replace('/:first-l(etter|ine)\\{/', ':first-l$1 {', $css);
return trim($css);
}
/**
* Replace what looks like a set of selectors
*
* @param array $m regex matches
*
* @return string
*/
protected function _selectorsCB($m)
{
// remove ws around the combinators
return preg_replace('/\\s*([,>+~])\\s*/', '$1', $m[0]);
}
/**
* Process a comment and return a replacement
*
* @param array $m regex matches
*
* @return string
*/
protected function _commentCB($m)
{
$hasSurroundingWs = (trim($m[0]) !== $m[1]);
$m = $m[1];
// $m is the comment content w/o the surrounding tokens,
// but the return value will replace the entire comment.
if ($m === 'keep') {
return '/**/';
}
if ($m === '" "') {
// component of http://tantek.com/CSS/Examples/midpass.html
return '/*" "*/';
}
if (preg_match('@";\\}\\s*\\}/\\*\\s+@', $m)) {
// component of http://tantek.com/CSS/Examples/midpass.html
return '/*";}}/* */';
}
if ($this->_inHack) {
// inversion: feeding only to one browser
if (preg_match('@
^/ # comment started like /*/
\\s*
(\\S[\\s\\S]+?) # has at least some non-ws content
\\s*
/\\* # ends like /*/ or /**/
@x', $m, $n)) {
// end hack mode after this comment, but preserve the hack and comment content
$this->_inHack = false;
return "/*/{$n[1]}/**/";
}
}
if (substr($m, -1) === '\\') { // comment ends like \*/
// begin hack mode and preserve hack
$this->_inHack = true;
return '/*\\*/';
}
if ($m !== '' && $m[0] === '/') { // comment looks like /*/ foo */
// begin hack mode and preserve hack
$this->_inHack = true;
return '/*/*/';
}
if ($this->_inHack) {
// a regular comment ends hack mode but should be preserved
$this->_inHack = false;
return '/**/';
}
// Issue 107: if there's any surrounding whitespace, it may be important, so
// replace the comment with a single space
return $hasSurroundingWs // remove all other comments
? ' '
: '';
}
/**
* Process a font-family listing and return a replacement
*
* @param array $m regex matches
*
* @return string
*/
protected function _fontFamilyCB($m)
{
// Issue 210: must not eliminate WS between words in unquoted families
$pieces = preg_split('/(\'[^\']+\'|"[^"]+")/', $m[1], null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
$out = 'font-family:';
while (null !== ($piece = array_shift($pieces))) {
if ($piece[0] !== '"' && $piece[0] !== "'") {
$piece = preg_replace('/\\s+/', ' ', $piece);
$piece = preg_replace('/\\s?,\\s?/', ',', $piece);
}
$out .= $piece;
}
return $out . $m[2];
}
}
================================================
FILE: libraries/Gelato/Minify/MinifyHTML.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class MinifyHTML
{
/**
* Minify html
*
*
* echo MinifyHTML::process($html);
*
*
* @param string $buffer html
* @return string
*/
public static function process($html)
{
// Remove HTML comments (not containing IE conditional comments).
$html = preg_replace_callback('//', 'MinifyHTML::_comments', $html);
// Trim each line.
$html = preg_replace('/^\\s+|\\s+$/m', '', $html);
// Return HTML
return $html;
}
protected static function _comments($m)
{
return (0 === strpos($m[1], '[') || false !== strpos($m[1], '
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class MinifyJS
{
/**
* Minify js
*
*
* echo MinifyJS::process($js);
*
*
* @param string $buffer html
* @return string
*/
public static function process($js)
{
// newlines > linefeed
$js = str_replace(array("\r\n", "\r", "\n"), "\n", $js);
// empty lines > collapse
$js = preg_replace('/^[ \t]*|[ \t]*$/m', '', $js);
$js = preg_replace('/\n+/m', "\n", $js);
$js = trim($js);
// redundant whitespace > remove
$js = preg_replace('/(?<=[{}\[\]\(\)=><&\|;:,\?!\+-])[ \t]*|[ \t]*(?=[{}\[\]\(\)=><&\|;:,\?!\+-])/i', '', $js);
$js = preg_replace('/[ \t]+/', ' ', $js);
// redundant semicolons (followed by another semicolon or closing curly bracket) > remove
$js = preg_replace('/;\s*(?=[;}])/s', '', $js);
// Return JS
return $js;
}
}
================================================
FILE: libraries/Gelato/Notification/Notification.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Notification
{
/**
* Notifications session key
*
* @var string
*/
const SESSION_KEY = 'notifications';
/**
* Notifications array
*
* @var array
*/
private static $notifications = array();
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Returns a specific variable from the Notifications array.
*
*
* echo Notification::get('success');
* echo Notification::get('errors');
*
*
* @param string $key Variable name
* @return mixed
*/
public static function get($key)
{
// Redefine arguments
$key = (string) $key;
// Return specific variable from the Notifications array
return isset(Notification::$notifications[$key]) ? Notification::$notifications[$key] : null;
}
/**
* Adds specific variable to the Notifications array.
*
*
* Notification::set('success', 'Data has been saved with success!');
* Notification::set('errors', 'Data not saved!');
*
*
* @param string $key Variable name
* @param mixed $value Variable value
*/
public static function set($key, $value)
{
// Redefine arguments
$key = (string) $key;
// Save specific variable to the Notifications array
$_SESSION[Notification::SESSION_KEY][$key] = $value;
}
/**
* Adds specific variable to the Notifications array for current page.
*
*
* Notification::setNow('success', 'Success!');
*
*
* @param string $var Variable name
* @param mixed $value Variable value
*/
public static function setNow($key, $value)
{
// Redefine arguments
$key = (string) $key;
// Save specific variable for current page only
Notification::$notifications[$key] = $value;
}
/**
* Clears the Notifications array.
*
*
* Notification::clean();
*
*
* Data that previous pages stored will not be deleted, just the data that
* this page stored itself.
*/
public static function clean()
{
$_SESSION[Notification::SESSION_KEY] = array();
}
/**
* Initializes the Notification service.
*
*
* Notification::init();
*
*
* This will read notification/flash data from the $_SESSION variable and load it into
* the $this->previous array.
*/
public static function init()
{
// Get notification/flash data...
if ( ! empty($_SESSION[Notification::SESSION_KEY]) && is_array($_SESSION[Notification::SESSION_KEY])) {
Notification::$notifications = $_SESSION[Notification::SESSION_KEY];
}
$_SESSION[Notification::SESSION_KEY] = array();
}
}
================================================
FILE: libraries/Gelato/Number/Number.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Number
{
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Convert bytes in 'KB','MB','GB','TiB','PiB'
*
*
* echo Number::byteFormat(10000);
*
*
* @param integer $size Data to convert
* @return string
*/
public static function byteFormat($size)
{
// Redefine vars
$size = (int) $size;
$unit = array('B', 'KB', 'MB', 'GB', 'TiB', 'PiB');
return @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[($i < 0 ? 0 : $i)];
}
/**
* Convert 'KB','MB','GB' in bytes
*
*
* echo Number::convertToBytes('10MB');
*
*
* @param string $num Number to convert
* @return int
*/
public static function convertToBytes( $num ) {
$num = strtolower( $num );
$bytes = (int) $num;
if ( strpos( $num, 'k' ) !== false )
$bytes = intval( $num ) * 1024;
elseif ( strpos( $num, 'm' ) !== false )
$bytes = intval($num) * 1024 * 1024;
elseif ( strpos( $num, 'g' ) !== false )
$bytes = intval( $num ) * 1024 * 1024 * 1024;
return $bytes;
}
/**
* Converts a number into a more readable human-type number.
*
*
* echo Number::quantity(7000); // 7K
* echo Number::quantity(7500); // 8K
* echo Number::quantity(7500, 1); // 7.5K
*
*
* @param integer $num Num to convert
* @param integer $decimals Decimals
* @return string
*/
public static function quantity($num, $decimals = 0)
{
// Redefine vars
$num = (int) $num;
$decimals = (int) $decimals;
if ($num >= 1000 && $num < 1000000) {
return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000)).'K';
} elseif ($num >= 1000000 && $num < 1000000000) {
return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000000)).'M';
} elseif ($num >= 1000000000) {
return sprintf('%01.'.$decimals.'f', (sprintf('%01.0f', $num) / 1000000000)).'B';
}
return $num;
}
/**
* Checks if the value is between the minimum and maximum (min & max included).
*
*
* if (Number::between(2, 10, 5)) {
* // do something...
* }
*
*
* @param float $minimum The minimum.
* @param float $maximum The maximum.
* @param float $value The value to validate.
* @return boolean
*/
public static function between($minimum, $maximum, $value)
{
return ((float) $value >= (float) $minimum && (float) $value <= (float) $maximum);
}
/**
* Checks the value for an even number.
*
*
* if (Number::even(2)) {
* // do something...
* }
*
*
* @param integer $value The value to validate.
* @return boolean
*/
public static function even($value)
{
return (((int) $value % 2) == 0);
}
/**
* Checks if the value is greather than a given minimum.
*
*
* if (Number::greaterThan(2, 10)) {
* // do something...
* }
*
*
* @param float $minimum The minimum as a float.
* @param float $value The value to validate.
* @return boolean
*/
public static function greaterThan($minimum, $value)
{
return ((float) $value > (float) $minimum);
}
/**
* Checks if the value is smaller than a given maximum.
*
*
* if (Number::smallerThan(2, 10)) {
* // do something...
* }
*
*
* @param integer $maximum The maximum.
* @param integer $value The value to validate.
* @return boolean
*/
public static function smallerThan($maximum, $value)
{
return ((int) $value < (int) $maximum);
}
/**
* Checks if the value is not greater than or equal a given maximum.
*
*
* if (Number::maximum(2, 10)) {
* // do something...
* }
*
*
* @param integer $maximum The maximum.
* @param integer $value The value to validate.
* @return boolean
*/
public static function maximum($maximum, $value)
{
return ((int) $value <= (int) $maximum);
}
/**
* Checks if the value is greater than or equal to a given minimum.
*
*
* if (Number::minimum(2, 10)) {
* // do something...
* }
*
*
* @param integer $minimum The minimum.
* @param integer $value The value to validate.
* @return boolean
*/
public static function minimum($minimum, $value)
{
return ((int) $value >= (int) $minimum);
}
/**
* Checks the value for an odd number.
*
*
* if (Number::odd(2)) {
* // do something...
* }
*
*
* @param integer $value The value to validate.
* @return boolean
*/
public static function odd($value)
{
return ! Number::even((int) $value);
}
}
================================================
FILE: libraries/Gelato/README.md
================================================
# Gelato Library
Gelato is a PHP5 library for kickass Web Applications.
## Links
- [Site](http://gelato.monstra.org)
- [Github Repository](https://github.com/MonstrLab/gelato)
Copyright (C) 2013 Romanenko Sergey / Awilum [awilum@msn.com]
================================================
FILE: libraries/Gelato/Registry/Registry.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Registry
{
/**
* Registry of variables
*
* @var array
*/
private static $registry = array();
/**
* Checks if an object with this name is in the registry.
*
*
* if (Registry::exists('var')) {
* // Do something...
* }
*
*
* @return bool
* @param string $name The name of the registry item to check for existence.
*/
public static function exists($name)
{
return isset(Registry::$registry[(string) $name]);
}
/**
* Registers a given value under a given name.
*
*
* Registry::set('var', 'value');
*
*
* @param string $name The name of the value to store.
* @param mixed[optional] $value The value that needs to be stored.
*/
public static function set($name, $value = null)
{
// redefine name
$name = (string) $name;
// delete item
if ($value === null) {
unset(Registry::$registry[$name]);
} else {
Registry::$registry[$name] = $value;
return Registry::get($name);
}
}
/**
* Fetch an item from the registry.
*
*
* $var = Registry::get('var', 'value');
*
*
* @return mixed
* @param string $name The name of the item to fetch.
*/
public static function get($name)
{
$name = (string) $name;
if ( ! isset(Registry::$registry[$name])) {
throw new RuntimeException('No item "' . $name . '" exists in the registry.');
}
return Registry::$registry[$name];
}
}
================================================
FILE: libraries/Gelato/Security/Token.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Token
{
/**
* Key name for token storage
*
* @var string
*/
protected static $token_name = 'security_token';
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Generate and store a unique token which can be used to help prevent
* [CSRF](http://wikipedia.org/wiki/Cross_Site_Request_Forgery) attacks.
*
*
* $token = Token::generate();
*
*
* You can insert this token into your forms as a hidden field:
*
*
* echo Form::hidden('csrf', Token::generate());
*
*
* This provides a basic, but effective, method of preventing CSRF attacks.
*
* @param boolean $new force a new token to be generated?. Default is false
* @return string
*/
public static function generate($new = false)
{
// Get the current token
$token = Session::get(Token::$token_name);
// Create a new unique token
if ($new === true or ! $token) {
// Generate a new unique token
$token = sha1(uniqid(mt_rand(), true));
// Store the new token
Session::set(Token::$token_name, $token);
}
// Return token
return $token;
}
/**
* Check that the given token matches the currently stored security token.
*
*
* if (Token::check($token)) {
* // Pass
* }
*
*
* @param string $token token to check
* @return boolean
*/
public static function check($token)
{
return Token::token() === $token;
}
}
================================================
FILE: libraries/Gelato/Session/Session.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Session
{
/**
* Starts the session.
*
*
* Session::start();
*
*
*/
public static function start()
{
// Is session already started?
if ( ! session_id()) {
// Start the session
return @session_start();
}
// If already started
return true;
}
/**
* Deletes one or more session variables.
*
*
* Session::delete('user');
*
*
*/
public static function delete()
{
// Loop all arguments
foreach (func_get_args() as $argument) {
// Array element
if (is_array($argument)) {
// Loop the keys
foreach ($argument as $key) {
// Unset session key
unset($_SESSION[(string) $key]);
}
} else {
// Remove from array
unset($_SESSION[(string) $argument]);
}
}
}
/**
* Destroys the session.
*
*
* Session::destroy();
*
*
*/
public static function destroy()
{
// Destroy
if (session_id()) {
session_unset();
session_destroy();
$_SESSION = array();
}
}
/**
* Checks if a session variable exists.
*
*
* if (Session::exists('user')) {
* // Do something...
* }
*
*
* @return boolean
*/
public static function exists()
{
// Start session if needed
if ( ! session_id()) Session::start();
// Loop all arguments
foreach (func_get_args() as $argument) {
// Array element
if (is_array($argument)) {
// Loop the keys
foreach ($argument as $key) {
// Does NOT exist
if ( ! isset($_SESSION[(string) $key])) return false;
}
} else {
// Does NOT exist
if ( ! isset($_SESSION[(string) $argument])) return false;
}
}
return true;
}
/**
* Gets a variable that was stored in the session.
*
*
* echo Session::get('user');
*
*
* @param string $key The key of the variable to get.
* @return mixed
*/
public static function get($key)
{
// Start session if needed
if ( ! session_id()) self::start();
// Redefine key
$key = (string) $key;
// Fetch key
if (Session::exists((string) $key)) return $_SESSION[(string) $key];
// Key doesn't exist
return null;
}
/**
* Returns the sessionID.
*
*
* echo Session::getSessionId();
*
*
* @return string
*/
public static function getSessionId()
{
if ( ! session_id()) Session::start();
return session_id();
}
/**
* Stores a variable in the session.
*
*
* Session::set('user', 'Awilum');
*
*
* @param string $key The key for the variable.
* @param mixed $value The value to store.
*/
public static function set($key, $value)
{
// Start session if needed
if ( ! session_id()) self::start();
// Set key
$_SESSION[(string) $key] = $value;
}
}
================================================
FILE: libraries/Gelato/Text/Text.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Text
{
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Translit function ua,ru => latin
*
*
* echo Text::translitIt('Привет');
*
*
* @param string $str [ua,ru] string
* @return string $str
*/
public static function translitIt($str)
{
// Redefine vars
$str = (string) $str;
$patern = array(
"А" => "A", "Б" => "B", "В" => "V", "Г" => "G",
"Д" => "D", "Е" => "E", "Ж" => "J", "З" => "Z",
"И" => "I", "Й" => "Y", "К" => "K", "Л" => "L",
"М" => "M", "Н" => "N", "О" => "O", "П" => "P",
"Р" => "R", "С" => "S", "Т" => "T", "У" => "U",
"Ф" => "F", "Х" => "H", "Ц" => "TS", "Ч" => "CH",
"Ш" => "SH", "Щ" => "SCH", "Ъ" => "", "Ы" => "YI",
"Ь" => "", "Э" => "E", "Ю" => "YU", "Я" => "YA",
"а" => "a", "б" => "b", "в" => "v", "г" => "g",
"д" => "d", "е" => "e", "ж" => "j", "з" => "z",
"и" => "i", "й" => "y", "к" => "k", "л" => "l",
"м" => "m", "н" => "n", "о" => "o","п" => "p",
"р" => "r", "с" => "s", "т" => "t", "у" => "u",
"ф" => "f", "х" => "h", "ц" => "ts", "ч" => "ch",
"ш" => "sh", "щ" => "sch", "ъ" => "y", "ї" => "i",
"Ї" => "Yi", "є" => "ie", "Є" => "Ye", "ы" => "yi",
"ь" => "", "э" => "e", "ю" => "yu", "я" => "ya", "ё" => "yo"
);
return strtr($str, $patern);
}
/**
* Removes any leading and traling slashes from a string
*
*
* echo Text::trimSlashes('some text here/');
*
*
* @param string $str String with slashes
* @return string
*/
public static function trimSlashes($str)
{
// Redefine vars
$str = (string) $str;
return trim($str, '/');
}
/**
* Removes slashes contained in a string or in an array
*
*
* echo Text::strpSlashes('some \ text \ here');
*
*
* @param mixed $str String or array of strings with slashes
* @return mixed
*/
public static function strpSlashes($str)
{
if (is_array($str)) {
foreach ($str as $key => $val) {
$result[$key] = stripslashes($val);
}
} else {
$result = stripslashes($str);
}
return $result;
}
/**
* Removes single and double quotes from a string
*
*
* echo Text::stripQuotes('some "text" here');
*
*
* @param string $str String with single and double quotes
* @return string
*/
public static function stripQuotes($str)
{
// Redefine vars
$str = (string) $str;
return str_replace(array('"', "'"), '', $str);
}
/**
* Convert single and double quotes to entities
*
*
* echo Text::quotesToEntities('some "text" here');
*
*
* @param string $str String with single and double quotes
* @return string
*/
public static function quotesToEntities($str)
{
// Redefine vars
$str = (string) $str;
return str_replace(array("\'", "\"", "'", '"'), array("'", """, "'", """), $str);
}
/**
* Creates a random string of characters
*
*
* echo Text::random();
*
*
* @param string $type The type of string. Default is 'alnum'
* @param integer $length The number of characters. Default is 16
* @return string
*/
public static function random($type = 'alnum', $length = 16)
{
// Redefine vars
$type = (string) $type;
$length = (int) $length;
switch ($type) {
case 'basic':
return mt_rand();
break;
default:
case 'alnum':
case 'numeric':
case 'nozero':
case 'alpha':
case 'distinct':
case 'hexdec':
switch ($type) {
case 'alpha':
$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
default:
case 'alnum':
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
case 'numeric':
$pool = '0123456789';
break;
case 'nozero':
$pool = '123456789';
break;
case 'distinct':
$pool = '2345679ACDEFHJKLMNPRSTUVWXYZ';
break;
case 'hexdec':
$pool = '0123456789abcdef';
break;
}
$str = '';
for ($i=0; $i < $length; $i++) {
$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
}
return $str;
break;
case 'unique':
return md5(uniqid(mt_rand()));
break;
case 'sha1' :
return sha1(uniqid(mt_rand(), true));
break;
}
}
/**
* Add's _1 to a string or increment the ending number to allow _2, _3, etc
*
*
* $str = Text::increment($str);
*
*
* @param string $str String to increment
* @param integer $first Start with
* @param string $separator Separator
* @return string
*/
public static function increment($str, $first = 1, $separator = '_')
{
preg_match('/(.+)'.$separator.'([0-9]+)$/', $str, $match);
return isset($match[2]) ? $match[1].$separator.($match[2] + 1) : $str.$separator.$first;
}
/**
* Cut string
*
*
* echo Text::cut('Some text here', 5);
*
*
* @param string $str Input string
* @param integer $length Length after cut
* @param string $cut_msg Message after cut string
* @return string
*/
public static function cut($str, $length, $cut_msg = null)
{
// Redefine vars
$str = (string) $str;
$length = (int) $length;
if (isset($cut_msg)) $msg = $cut_msg; else $msg = '...';
return function_exists('mb_substr') ? mb_substr($str, 0, $length, 'utf-8') . $msg : substr($str, 0, $length) . $msg;
}
/**
* Lowercase
*
*
* echo Text::lowercase('Some text here');
*
*
* @param string $str String
* @return string
*/
public static function lowercase($str)
{
// Redefine vars
$str = (string) $str;
return function_exists('mb_strtolower') ? mb_strtolower($str, 'utf-8') : strtolower($str);
}
/**
* Uppercase
*
*
* echo Text::uppercase('some text here');
*
*
* @param string $str String
* @return string
*/
public static function uppercase($str)
{
// Redefine vars
$str = (string) $str;
return function_exists('mb_strtoupper') ? mb_strtoupper($str, 'utf-8') : strtoupper($str);
}
/**
* Get length
*
*
* echo Text::length('Some text here');
*
*
* @param string $str String
* @return string
*/
public static function length($str)
{
// Redefine vars
$str = (string) $str;
return function_exists('mb_strlen') ? mb_strlen($str, 'utf-8') : strlen($str);
}
/**
* Create a lorem ipsum text
*
*
* echo Text::lorem(2);
*
*
* @param integer $num Count
* @return string
*/
public static function lorem($num = 1)
{
// Redefine vars
$num = (int) $num;
return str_repeat('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', (int) $num);
}
/**
* Extract the last `$num` characters from a string.
*
*
* echo Text::right('Some text here', 4);
*
*
* @param string $str The string to extract the characters from.
* @param integer $num The number of characters to extract.
* @return string
*/
public static function right($str, $num)
{
// Redefine vars
$str = (string) $str;
$num = (int) $num;
return substr($str, Text::length($str)-$num, $num);
}
/**
* Extract the first `$num` characters from a string.
*
*
* echo Text::left('Some text here', 4);
*
*
* @param string $str The string to extract the characters from.
* @param integer $num The number of characters to extract.
* @return string
*/
public static function left($str, $num)
{
// Redefine vars
$str = (string) $str;
$num = (int) $num;
return substr($str, 0, $num);
}
/**
* Replaces newline with
or
.
*
*
* echo Text::nl2br("Some \n text \n here");
*
*
* @param string $str The input string
* @param boolean $xhtml Xhtml or not
* @return string
*/
public static function nl2br($str, $xhtml = true)
{
// Redefine vars
$str = (string) $str;
$xhtml = (bool) $xhtml;
return str_replace(array("\r\n", "\n\r", "\n", "\r"), (($xhtml) ? '
' : '
'), $str);
}
/**
* Replaces
and
with newline.
*
*
* echo Text::br2nl("Some
text
here");
*
*
* @param string $str The input string
* @return string
*/
public static function br2nl($str)
{
// Redefine vars
$str = (string) $str;
return str_replace(array('
', '
', '
'), "\n", $str);
}
/**
* Converts & to &.
*
*
* echo Text::ampEncode("M&CMS");
*
*
* @param string $str The input string
* @return string
*/
public static function ampEncode($str)
{
// Redefine vars
$str = (string) $str;
return str_replace('&', '&', $str);
}
/**
* Converts & to &.
*
*
* echo Text::ampEncode("M&CMS");
*
*
* @param string $str The input string
* @return string
*/
public static function ampDecode($str)
{
// Redefine vars
$str = (string) $str;
return str_replace('&', '&', $str);
}
/**
* Convert plain text to html
*
*
* echo Text::toHtml('test');
*
*
* @param string $str String
* @return string
*/
public static function toHtml($str)
{
// Redefine vars
$str = (string) $str;
return html_entity_decode($str, ENT_QUOTES, 'utf-8');
}
}
================================================
FILE: libraries/Gelato/Url/Url.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Url
{
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Takes a long url and uses the TinyURL API to return a shortened version.
*
*
* echo Url::tiny('http:://sitename.com');
*
*
* @param string $url Long url
* @return string
*/
public static function tiny($url)
{
return file_get_contents('http://tinyurl.com/api-create.php?url='.(string) $url);
}
/**
* Check is url exists
*
*
* if (Url::exists('http:://sitename.com')) {
* // Do something...
* }
*
*
* @param string $url Url
* @return boolean
*/
public static function exists($url)
{
$a_url = parse_url($url);
if ( ! isset($a_url['port'])) $a_url['port'] = 80;
$errno = 0;
$errstr = '';
$timeout = 30;
if (isset($a_url['host']) && $a_url['host']!=gethostbyname($a_url['host'])) {
$fid = fsockopen($a_url['host'], $a_url['port'], $errno, $errstr, $timeout);
if ( ! $fid) return false;
$page = isset($a_url['path']) ? $a_url['path'] : '';
$page .= isset($a_url['query']) ? '?'.$a_url['query'] : '';
fputs($fid, 'HEAD '.$page.' HTTP/1.0'."\r\n".'Host: '.$a_url['host']."\r\n\r\n");
$head = fread($fid, 4096);
fclose($fid);
return preg_match('#^HTTP/.*\s+[200|302]+\s#i', $head);
} else {
return false;
}
}
/**
* Gets the base URL
*
*
* echo Url::base();
*
*
* @return string
*/
public static function base()
{
$https = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://';
return $https . rtrim(rtrim($_SERVER['HTTP_HOST'], '\\/') . dirname($_SERVER['PHP_SELF']), '\\/');
}
/**
* Gets current URL
*
*
* echo Url::current();
*
*
* @return string
*/
public static function current()
{
return (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
}
}
================================================
FILE: libraries/Gelato/Validation/Valid.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Valid
{
/**
* Protected constructor since this is a static class.
*
* @access protected
*/
protected function __construct()
{
// Nothing here
}
/**
* Check an email address for correct format.
*
*
* if (Valid::email('test@test.com')) {
* // Do something...
* }
*
*
* @param string $email email address
* @return boolean
*/
public static function email($email)
{
return (bool) filter_var((string) $email, FILTER_VALIDATE_EMAIL);
}
/**
* Check an ip address for correct format.
*
*
* if (Valid::ip('127.0.0.1') || Valid::ip('0:0:0:0:0:0:7f00:1')) {
* // Do something...
* }
*
*
* @param string $ip ip address
* @return boolean
*/
public static function ip($ip)
{
return (bool) filter_var((string) $ip, FILTER_VALIDATE_IP);
}
/**
* Check an credit card for correct format.
*
*
* if (Valid::creditCard(7711111111111111, 'Visa')) {
* // Do something...
* }
*
*
* @param integer $num Credit card num
* @param string $type Credit card type:
* American - American Express
* Dinners - Diner's Club
* Discover - Discover Card
* Master - Mastercard
* Visa - Visa
* @return boolean
*/
public static function creditCard($num, $type)
{
// Redefine vars
$num = (int) $num;
$type = (string) $type;
switch ($type) {
case "American": return (bool) preg_match("/^([34|37]{2})([0-9]{13})$/", $num);
case "Dinners": return (bool) preg_match("/^([30|36|38]{2})([0-9]{12})$/", $num);
case "Discover": return (bool) preg_match("/^([6011]{4})([0-9]{12})$/", $num);
case "Master": return (bool) preg_match("/^([51|52|53|54|55]{2})([0-9]{14})$/", $num);
case "Visa": return (bool) preg_match("/^([4]{1})([0-9]{12,15})$/", $num);
}
}
/**
* Check an phone number for correct format.
*
*
* if (Valid::phone(0661111117)) {
* // Do something...
* }
*
*
* @param string $num Phone number
* @return boolean
*/
public static function phone($num)
{
return (bool) preg_match("/^([0-9\(\)\/\+ \-]*)$/", (string) $num);
}
/**
* Check an url for correct format.
*
*
* if (Valid::url('http://site.com/')) {
* // Do something...
* }
*
*
* @param string $url Url
* @return boolean
*/
public static function url($url)
{
return (bool) filter_var((string) $url, FILTER_VALIDATE_URL);
}
/**
* Check an date for correct format.
*
*
* if (Valid::date('12/12/12')) {
* // Do something...
* }
*
*
* @param string $str Date
* @return boolean
*/
public static function date($str)
{
return (strtotime($str) !== false);
}
/**
* Checks whether a string consists of digits only (no dots or dashes).
*
*
* if (Valid::digit('12')) {
* // Do something...
* }
*
*
* @param string $str String
* @return boolean
*/
public static function digit($str)
{
return (bool) preg_match ("/[^0-9]/", $str);
}
/**
* Checks whether a string is a valid number (negative and decimal numbers allowed).
*
*
* if (Valid::numeric('3.14')) {
* // Do something...
* }
*
*
* Uses {@link http://www.php.net/manual/en/function.localeconv.php locale conversion}
* to allow decimal point to be locale specific.
*
* @param string $str String
* @return boolean
*/
public static function numeric($str)
{
$locale = localeconv();
return (bool) preg_match('/^-?[0-9'.$locale['decimal_point'].']++$/D', (string) $str);
}
/**
* Checks if the given regex statement is valid.
*
* @param string $regexp The value to validate.
* @return boolean
*/
public static function regexp($regexp)
{
// dummy string
$dummy = 'Gelato is a PHP5 library for kickass Web Applications.';
// validate
return (@preg_match((string) $regexp, $dummy) !== false);
}
}
================================================
FILE: libraries/Gelato/Zip/Zip.php
================================================
* @copyright 2012-2014 Romanenko Sergey / Awilum
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Zip
{
public $zipdata = '';
public $directory = '';
public $entries = 0;
public $file_num = 0;
public $offset = 0;
public $now;
private $_archive_info = array();
private $_zip_signature = "\x50\x4b\x03\x04";
private $_dir_signature = "\x50\x4b\x01\x02";
private $_central_signature_end = "\x50\x4b\x05\x06";
private $farc = null;
/**
* Constructor
*/
public function __construct()
{
$this->now = time();
}
/**
* Zip factory
*
*
* Zip::factory();
*
*
* @return Zip
*/
public static function factory()
{
return new Zip();
}
/**
* Add Directory
*
*
* Zip::factory()->addDir('test');
*
*
* @param mixed $directory The directory name. Can be string or array
*/
public function addDir($directory)
{
foreach ((array) $directory as $dir) {
if ( ! preg_match("|.+/$|", $dir)) {
$dir .= '/';
}
$dir_time = $this->_get_mod_time($dir);
$this->_add_dir($dir, $dir_time['file_mtime'], $dir_time['file_mdate']);
}
return $this;
}
/**
* Get file/directory modification time
*
* @param string $dir Full path to the dir
* @return array
*/
protected function _get_mod_time($dir)
{
// If this is a newly created file/dir, we will set the time to 'now'
$date = (@filemtime($dir)) ? filemtime($dir) : getdate($this->now);
$time['file_mtime'] = ($date['hours'] << 11) + ($date['minutes'] << 5) + $date['seconds'] / 2;
$time['file_mdate'] = (($date['year'] - 1980) << 9) + ($date['mon'] << 5) + $date['mday'];
return $time;
}
/**
* Add Directory
*
* @param string $dir The directory name
* @param integer $file_mtime File mtime
* @param integer $file_mdate File mdate
*/
private function _add_dir($dir, $file_mtime, $file_mdate)
{
$dir = str_replace("\\", "/", $dir);
$this->zipdata .=
"\x50\x4b\x03\x04\x0a\x00\x00\x00\x00\x00"
.pack('v', $file_mtime)
.pack('v', $file_mdate)
.pack('V', 0) // crc32
.pack('V', 0) // compressed filesize
.pack('V', 0) // uncompressed filesize
.pack('v', strlen($dir)) // length of pathname
.pack('v', 0) // extra field length
.$dir
// below is "data descriptor" segment
.pack('V', 0) // crc32
.pack('V', 0) // compressed filesize
.pack('V', 0); // uncompressed filesize
$this->directory .=
"\x50\x4b\x01\x02\x00\x00\x0a\x00\x00\x00\x00\x00"
.pack('v', $file_mtime)
.pack('v', $file_mdate)
.pack('V',0) // crc32
.pack('V',0) // compressed filesize
.pack('V',0) // uncompressed filesize
.pack('v', strlen($dir)) // length of pathname
.pack('v', 0) // extra field length
.pack('v', 0) // file comment length
.pack('v', 0) // disk number start
.pack('v', 0) // internal file attributes
.pack('V', 16) // external file attributes - 'directory' bit set
.pack('V', $this->offset) // relative offset of local header
.$dir;
$this->offset = strlen($this->zipdata);
$this->entries++;
}
/**
* Add Data to Zip
*
*
* Zip::factory()->addData('test.txt', 'Some test text here');
*
*
* Lets you add files to the archive. If the path is included
* in the filename it will be placed within a directory. Make
* sure you use add_dir() first to create the folder.
*
* @param mixed $filepath Full path to the file
* @param string $data Data
*/
public function addData($filepath, $data = null)
{
if (is_array($filepath)) {
foreach ($filepath as $path => $data) {
$file_data = $this->_get_mod_time($path);
$this->_add_data($path, $data, $file_data['file_mtime'], $file_data['file_mdate']);
}
} else {
$file_data = $this->_get_mod_time($filepath);
$this->_add_data($filepath, $data, $file_data['file_mtime'], $file_data['file_mdate']);
}
return $this;
}
/**
* Add Data to Zip
*
* @param string $filepath Full path to the file
* @param string $data The data to be encoded
* @param integer $file_mtime File mtime
* @param integer $file_mdate File mdate
*/
private function _add_data($filepath, $data, $file_mtime, $file_mdate)
{
$filepath = str_replace("\\", "/", $filepath);
$uncompressed_size = strlen($data);
$crc32 = crc32($data);
$gzdata = gzcompress($data);
$gzdata = substr($gzdata, 2, -4);
$compressed_size = strlen($gzdata);
$this->zipdata .=
"\x50\x4b\x03\x04\x14\x00\x00\x00\x08\x00"
.pack('v', $file_mtime)
.pack('v', $file_mdate)
.pack('V', $crc32)
.pack('V', $compressed_size)
.pack('V', $uncompressed_size)
.pack('v', strlen($filepath)) // length of filename
.pack('v', 0) // extra field length
.$filepath
.$gzdata; // "file data" segment
$this->directory .=
"\x50\x4b\x01\x02\x00\x00\x14\x00\x00\x00\x08\x00"
.pack('v', $file_mtime)
.pack('v', $file_mdate)
.pack('V', $crc32)
.pack('V', $compressed_size)
.pack('V', $uncompressed_size)
.pack('v', strlen($filepath)) // length of filename
.pack('v', 0) // extra field length
.pack('v', 0) // file comment length
.pack('v', 0) // disk number start
.pack('v', 0) // internal file attributes
.pack('V', 32) // external file attributes - 'archive' bit set
.pack('V', $this->offset) // relative offset of local header
.$filepath;
$this->offset = strlen($this->zipdata);
$this->entries++;
$this->file_num++;
}
/**
* Read the contents of a file and add it to the zip
*
*
* Zip::factory()->readFile('test.txt');
*
*
* @param string $path Path
* @param boolean $preserve_filepath Preserve filepath
* @return mixed
*/
public function readFile($path, $preserve_filepath = false)
{
if ( ! file_exists($path)) {
return false;
}
if (false !== ($data = file_get_contents($path))) {
$name = str_replace("\\", "/", $path);
if ($preserve_filepath === false) {
$name = preg_replace("|.*/(.+)|", "\\1", $name);
}
$this->addData($name, $data);
return $this;
}
return false;
}
/**
* Read a directory and add it to the zip.
*
*
* Zip::factory()->readDir('test/');
*
*
* This function recursively reads a folder and everything it contains (including
* sub-folders) and creates a zip based on it. Whatever directory structure
* is in the original file path will be recreated in the zip file.
*
* @param string $path Path to source
* @param boolean $preserve_filepath Preserve filepath
* @param string $root_path Root path
* @return mixed
*/
public function readDir($path, $preserve_filepath = true, $root_path = null, $exclude_files = array())
{
if ( ! $fp = @opendir($path)) {
return false;
}
// Set the original directory root for child dir's to use as relative
if ($root_path === null) {
$root_path = dirname($path) . '/';
}
while (false !== ($file = readdir($fp))) {
if (substr($file, 0, 1) == '.' || in_array($path.$file, $exclude_files)) {
continue;
}
if (@is_dir($path.$file)) {
$this->readDir($path.$file."/", $preserve_filepath, $root_path, $exclude_files);
} else {
if (false !== ($data = file_get_contents($path.$file))) {
$name = str_replace("\\", "/", $path);
if ($preserve_filepath === false) {
$name = str_replace($root_path, '', $name);
}
$this->addData($name.$file, $data);
}
}
}
return $this;
}
/**
* Get the Zip file
*
*
* Zip::factory()->getZip();
*
*
* @return string
*/
public function getZip()
{
// Is there any data to return?
if ($this->entries == 0) {
return false;
}
$zip_data = $this->zipdata;
$zip_data .= $this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00";
$zip_data .= pack('v', $this->entries); // total # of entries "on this disk"
$zip_data .= pack('v', $this->entries); // total # of entries overall
$zip_data .= pack('V', strlen($this->directory)); // size of central dir
$zip_data .= pack('V', strlen($this->zipdata)); // offset to start of central dir
$zip_data .= "\x00\x00"; // .zip file comment length
return $zip_data;
}
/**
* Write File to the specified directory
*
*
* Zip::factory()->readDir('test1/')->readDir('test2/')->archive('test.zip');
*
*
* @param string $filepath The file name
* @return boolean
*/
public function archive($filepath)
{
if ( ! ($fp = @fopen($filepath, "w"))) {
return false;
}
flock($fp, LOCK_EX);
fwrite($fp, $this->getZip());
flock($fp, LOCK_UN);
fclose($fp);
return true;
}
/**
* Initialize Data
*
*
* Zip::factory()->clearData();
*
*
* Lets you clear current zip data. Useful if you need to create
* multiple zips with different data.
*/
public function clearData()
{
$this->zipdata = '';
$this->directory = '';
$this->entries = 0;
$this->file_num = 0;
$this->offset = 0;
}
public function extract($zip_file, $target_dir = null)
{
$chmod = 0777;
$this->_archive_info = array();
$files = $this->_read_archive($zip_file);
if (!$files) {
return false;
}
$file_locations = array();
foreach ($files as $file => $trash) {
$dirname = pathinfo($file, PATHINFO_DIRNAME);
$folders = explode('/', $dirname);
$out_dn = $target_dir . '/' . $dirname;
if ( !is_dir($out_dn)) {
$str = '';
foreach ($folders as $folder) {
$str = $str ? $str . '/' . $folder : $folder;
if ( !is_dir($target_dir . '/' . $str)) {
if ( ! @mkdir($target_dir . '/' . $str)) {
return false;
}
chmod($target_dir . '/' . $str, $chmod);
}
}
}
if (substr($file, -1, 1) == '/') {
continue;
}
$file_locations[] = $file_location = $target_dir . '/' . $file;
$this->_extract_file($file, $file_location);
}
$this->_archive_info = array();
return $file_locations;
}
private function _read_archive($zip_file)
{
if (sizeof($this->_archive_info)) {
return $this->_archive_info;
}
$fh = fopen($zip_file, 'r');
$this->farc = &$fh;
if ( !$fh) {
return false;
}
if ( !$this->_read_file_list_by_eof($fh)) {
if ( !$this->_read_files_by_signatures($fh)) {
return false;
}
}
return $this->_archive_info;
}
private function _read_file_list_by_eof(&$fh)
{
for ($x = 0; $x < 1024; $x++) {
fseek($fh, -22 - $x, SEEK_END);
$signature = fread($fh, 4);
if ($signature == $this->_central_signature_end) {
$eodir['disk_number_this'] = unpack("v", fread($fh, 2));
$eodir['disk_number'] = unpack("v", fread($fh, 2));
$eodir['total_entries_this'] = unpack("v", fread($fh, 2));
$eodir['total_entries'] = unpack("v", fread($fh, 2));
$eodir['size_of_cd'] = unpack("V", fread($fh, 4));
$eodir['offset_start_cd'] = unpack("V", fread($fh, 4));
$zip_comment_lenght = unpack("v", fread($fh, 2));
$eodir['zipfile_comment'] = $zip_comment_lenght[1] ? fread($fh, $zip_comment_lenght[1]) : '';
fseek($fh, $eodir['offset_start_cd'][1]);
$signature = fread($fh, 4);
while ($signature == $this->_dir_signature) {
$dir['version_madeby'] = unpack("v", fread($fh, 2));
$dir['version_needed'] = unpack("v", fread($fh, 2));
$dir['general_bit_flag'] = unpack("v", fread($fh, 2));
$dir['compression_method'] = unpack("v", fread($fh, 2));
$dir['lastmod_time'] = unpack("v", fread($fh, 2));
$dir['lastmod_date'] = unpack("v", fread($fh, 2));
$dir['crc-32'] = fread($fh, 4);
$dir['compressed_size'] = unpack("V", fread($fh, 4));
$dir['uncompressed_size'] = unpack("V", fread($fh, 4));
$zip_file_length = unpack("v", fread($fh, 2));
$extra_field_length = unpack("v", fread($fh, 2));
$fileCommentLength = unpack("v", fread($fh, 2));
$dir['disk_number_start'] = unpack("v", fread($fh, 2));
$dir['internal_attributes'] = unpack("v", fread($fh, 2));
$dir['external_attributes1'] = unpack("v", fread($fh, 2));
$dir['external_attributes2'] = unpack("v", fread($fh, 2));
$dir['relative_offset'] = unpack("V", fread($fh, 4));
$dir['file_name'] = fread($fh, $zip_file_length[1]);
$dir['extra_field'] = $extra_field_length[1] ? fread($fh, $extra_field_length[1]) : '';
$dir['file_comment'] = $fileCommentLength[1] ? fread($fh, $fileCommentLength[1]) : '';
$binary_mod_date = str_pad(decbin($dir['lastmod_date'][1]), 16, '0', STR_PAD_LEFT);
$binary_mod_time = str_pad(decbin($dir['lastmod_time'][1]), 16, '0', STR_PAD_LEFT);
$last_mod_year = bindec(substr($binary_mod_date, 0, 7)) + 1980;
$last_mod_month = bindec(substr($binary_mod_date, 7, 4));
$last_mod_day = bindec(substr($binary_mod_date, 11, 5));
$last_mod_hour = bindec(substr($binary_mod_time, 0, 5));
$last_mod_minute = bindec(substr($binary_mod_time, 5, 6));
$last_mod_second = bindec(substr($binary_mod_time, 11, 5));
$central_dir_list[$dir['file_name']] = array(
'version_madeby' => $dir['version_madeby'][1],
'version_needed' => $dir['version_needed'][1],
'general_bit_flag' => str_pad(decbin($dir['general_bit_flag'][1]), 8, '0', STR_PAD_LEFT),
'compression_method' => $dir['compression_method'][1],
'lastmod_datetime' => mktime($last_mod_hour, $last_mod_minute, $last_mod_second, $last_mod_month, $last_mod_day, $last_mod_year),
'crc-32' => str_pad(dechex(ord($dir['crc-32'][3])), 2, '0', STR_PAD_LEFT) .
str_pad(dechex(ord($dir['crc-32'][2])), 2, '0', STR_PAD_LEFT) .
str_pad(dechex(ord($dir['crc-32'][1])), 2, '0', STR_PAD_LEFT) .
str_pad(dechex(ord($dir['crc-32'][0])), 2, '0', STR_PAD_LEFT),
'compressed_size' => $dir['compressed_size'][1],
'uncompressed_size' => $dir['uncompressed_size'][1],
'disk_number_start' => $dir['disk_number_start'][1],
'internal_attributes' => $dir['internal_attributes'][1],
'external_attributes1' => $dir['external_attributes1'][1],
'external_attributes2' => $dir['external_attributes2'][1],
'relative_offset' => $dir['relative_offset'][1],
'file_name' => $dir['file_name'],
'extra_field' => $dir['extra_field'],
'file_comment' => $dir['file_comment'],
);
$signature = fread($fh, 4);
}
if (isset($central_dir_list)) {
foreach ($central_dir_list as $filename => $details) {
$i = $this->_get_file_header($fh, $details['relative_offset']);
$this->_archive_info[$filename]['file_name'] = $filename;
$this->_archive_info[$filename]['compression_method'] = $details['compression_method'];
$this->_archive_info[$filename]['version_needed'] = $details['version_needed'];
$this->_archive_info[$filename]['lastmod_datetime'] = $details['lastmod_datetime'];
$this->_archive_info[$filename]['crc-32'] = $details['crc-32'];
$this->_archive_info[$filename]['compressed_size'] = $details['compressed_size'];
$this->_archive_info[$filename]['uncompressed_size'] = $details['uncompressed_size'];
$this->_archive_info[$filename]['lastmod_datetime'] = $details['lastmod_datetime'];
$this->_archive_info[$filename]['extra_field'] = $i['extra_field'];
$this->_archive_info[$filename]['contents_start_offset'] = $i['contents_start_offset'];
}
}
return true;
}
}
return true;
}
private function _read_files_by_signatures(&$fh)
{
fseek($fh, 0);
$return = false;
for (;;) {
$details = $this->_get_file_header($fh);
if ( !$details) {
fseek($fh, 12 - 4, SEEK_CUR);
$details = $this->_get_file_header($fh);
}
if ( !$details) {
break;
}
$filename = $details['file_name'];
$this->_archive_info[$filename] = $details;
$return = true;
}
return $return;
}
private function _get_file_header(&$fh, $start_offset = FALSE)
{
if ($start_offset !== false) {
fseek($fh, $start_offset);
}
$signature = fread($fh, 4);
if ($signature == $this->_zip_signature) {
$file['version_needed'] = unpack("v", fread($fh, 2));
$file['general_bit_flag'] = unpack("v", fread($fh, 2));
$file['compression_method'] = unpack("v", fread($fh, 2));
$file['lastmod_time'] = unpack("v", fread($fh, 2));
$file['lastmod_date'] = unpack("v", fread($fh, 2));
$file['crc-32'] = fread($fh, 4);
$file['compressed_size'] = unpack("V", fread($fh, 4));
$file['uncompressed_size'] = unpack("V", fread($fh, 4));
$zip_file_length = unpack("v", fread($fh, 2));
$extra_field_length = unpack("v", fread($fh, 2));
$file['file_name'] = fread($fh, $zip_file_length[1]);
$file['extra_field'] = $extra_field_length[1] ? fread($fh, $extra_field_length[1]) : '';
$file['contents_start_offset'] = ftell($fh);
fseek($fh, $file['compressed_size'][1], SEEK_CUR);
$binary_mod_date = str_pad(decbin($file['lastmod_date'][1]), 16, '0', STR_PAD_LEFT);
$binary_mod_time = str_pad(decbin($file['lastmod_time'][1]), 16, '0', STR_PAD_LEFT);
$last_mod_year = bindec(substr($binary_mod_date, 0, 7)) + 1980;
$last_mod_month = bindec(substr($binary_mod_date, 7, 4));
$last_mod_day = bindec(substr($binary_mod_date, 11, 5));
$last_mod_hour = bindec(substr($binary_mod_time, 0, 5));
$last_mod_minute = bindec(substr($binary_mod_time, 5, 6));
$last_mod_second = bindec(substr($binary_mod_time, 11, 5));
return array(
'file_name' => $file['file_name'],
'compression_method' => $file['compression_method'][1],
'version_needed' => $file['version_needed'][1],
'lastmod_datetime' => mktime($last_mod_hour, $last_mod_minute, $last_mod_second, $last_mod_month, $last_mod_day, $last_mod_year),
'crc-32' => str_pad(dechex(ord($file['crc-32'][3])), 2, '0', STR_PAD_LEFT) .
str_pad(dechex(ord($file['crc-32'][2])), 2, '0', STR_PAD_LEFT) .
str_pad(dechex(ord($file['crc-32'][1])), 2, '0', STR_PAD_LEFT) .
str_pad(dechex(ord($file['crc-32'][0])), 2, '0', STR_PAD_LEFT),
'compressed_size' => $file['compressed_size'][1],
'uncompressed_size' => $file['uncompressed_size'][1],
'extra_field' => $file['extra_field'],
'general_bit_flag' => str_pad(decbin($file['general_bit_flag'][1]), 8, '0', STR_PAD_LEFT),
'contents_start_offset' => $file['contents_start_offset']
);
}
return false;
}
private function _extract_file($compressed_file_name, $target_file_name = false)
{
if ( !sizeof($this->_archive_info)) {
return false;
}
$fdetails = &$this->_archive_info[$compressed_file_name];
if ( ! isset($this->_archive_info[$compressed_file_name])) {
return false;
}
if (substr($compressed_file_name, -1) == '/') {
return false;
}
if ( !$fdetails['uncompressed_size']) {
return $target_file_name ? file_put_contents($target_file_name, '') : '';
}
fseek($this->farc, $fdetails['contents_start_offset']);
$ret = $this->_uncompress(
fread($this->farc, $fdetails['compressed_size']),
$fdetails['compression_method'],
$fdetails['uncompressed_size'],
$target_file_name
);
if ($target_file_name) {
chmod($target_file_name, 0644);
}
return $ret;
}
private function _uncompress($content, $mode, $uncompressed_size, $target_file_name = false)
{
switch ($mode) {
case 0:
return $target_file_name ? file_put_contents($target_file_name, $content) : $content;
case 8:
return $target_file_name
? file_put_contents($target_file_name, gzinflate($content, $uncompressed_size))
: gzinflate($content, $uncompressed_size);
case 12:
return $target_file_name
? file_put_contents($target_file_name, bzdecompress($content)) : bzdecompress($content);
default:
return false;
}
}
}
================================================
FILE: libraries/Gelato/_logs/.empty
================================================
================================================
FILE: libraries/Gelato/changelog.txt
================================================
Gelato 1.0.3, 2013-04-03
------------------------
- Html Class: obfuscate() method added.
- Html Class: email() method added.
- Html Class: missing $macros var added.
Gelato 1.0.2, 2013-03-17
------------------------
- Added support for PHP 5.2.3
Gelato 1.0.1, 2013-03-05
------------------------
- New constant GELATO_CLASS_LOADER instead of GELATO_AUTOLOADER
- ErrorHanler Class Improvements.
- Log Class Improvements.
- ClassLoader: new method register() added.
- Define __DIR__ constant for PHP 5.2.x
Gelato 1.0.0, 2013-02-26
------------------------
- Initial release
================================================
FILE: libraries/Gelato/license.txt
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
�This License� refers to version 3 of the GNU General Public License.
�Copyright� also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
�The Program� refers to any copyrightable work licensed under this License. Each licensee is addressed as �you�. �Licensees� and �recipients� may be individuals or organizations.
To �modify� a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a �modified version� of the earlier work or a work �based on� the earlier work.
A �covered work� means either the unmodified Program or a work based on the Program.
To �propagate� a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To �convey� a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays �Appropriate Legal Notices� to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The �source code� for a work means the preferred form of the work for making modifications to it. �Object code� means any non-source form of a work.
A �Standard Interface� means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The �System Libraries� of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A �Major Component�, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The �Corresponding Source� for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to �keep intact all notices�.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an �aggregate� if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A �User Product� is either (1) a �consumer product�, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, �normally used� refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
�Installation Information� for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
�Additional permissions� are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered �further restrictions� within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An �entity transaction� is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A �contributor� is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's �contributor version�.
A contributor's �essential patent claims� are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, �control� includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a �patent license� is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To �grant� such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. �Knowingly relying� means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is �discriminatory� if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License �or any later version� applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM �AS IS� WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the �copyright� line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an �about box�.
You should also get your employer (if you work as a programmer) or school, if any, to sign a �copyright disclaimer� for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see .
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read .
================================================
FILE: libraries/Idiorm/ORM.php
================================================
'sqlite::memory:',
'id_column' => 'id',
'id_column_overrides' => array(),
'error_mode' => PDO::ERRMODE_EXCEPTION,
'username' => null,
'password' => null,
'driver_options' => null,
'identifier_quote_character' => null, // if this is null, will be autodetected
'limit_clause_style' => null, // if this is null, will be autodetected
'logging' => false,
'logger' => null,
'caching' => false,
'return_result_sets' => false,
);
// Map of configuration settings
protected static $_config = array();
// Map of database connections, instances of the PDO class
protected static $_db = array();
// Last query run, only populated if logging is enabled
protected static $_last_query;
// Log of all queries run, mapped by connection key, only populated if logging is enabled
protected static $_query_log = array();
// Query cache, only used if query caching is enabled
protected static $_query_cache = array();
// Reference to previously used PDOStatement object to enable low-level access, if needed
protected static $_last_statement = null;
// --------------------------- //
// --- INSTANCE PROPERTIES --- //
// --------------------------- //
// Key name of the connections in self::$_db used by this instance
protected $_connection_name;
// The name of the table the current ORM instance is associated with
protected $_table_name;
// Alias for the table to be used in SELECT queries
protected $_table_alias = null;
// Values to be bound to the query
protected $_values = array();
// Columns to select in the result
protected $_result_columns = array('*');
// Are we using the default result column or have these been manually changed?
protected $_using_default_result_columns = true;
// Join sources
protected $_join_sources = array();
// Should the query include a DISTINCT keyword?
protected $_distinct = false;
// Is this a raw query?
protected $_is_raw_query = false;
// The raw query
protected $_raw_query = '';
// The raw query parameters
protected $_raw_parameters = array();
// Array of WHERE clauses
protected $_where_conditions = array();
// LIMIT
protected $_limit = null;
// OFFSET
protected $_offset = null;
// ORDER BY
protected $_order_by = array();
// GROUP BY
protected $_group_by = array();
// HAVING
protected $_having_conditions = array();
// The data for a hydrated instance of the class
protected $_data = array();
// Fields that have been modified during the
// lifetime of the object
protected $_dirty_fields = array();
// Fields that are to be inserted in the DB raw
protected $_expr_fields = array();
// Is this a new object (has create() been called)?
protected $_is_new = false;
// Name of the column to use as the primary key for
// this instance only. Overrides the config settings.
protected $_instance_id_column = null;
// ---------------------- //
// --- STATIC METHODS --- //
// ---------------------- //
/**
* Pass configuration settings to the class in the form of
* key/value pairs. As a shortcut, if the second argument
* is omitted and the key is a string, the setting is
* assumed to be the DSN string used by PDO to connect
* to the database (often, this will be the only configuration
* required to use Idiorm). If you have more than one setting
* you wish to configure, another shortcut is to pass an array
* of settings (and omit the second argument).
* @param string $key
* @param mixed $value
* @param string $connection_name Which connection to use
*/
public static function configure($key, $value = null, $connection_name = self::DEFAULT_CONNECTION) {
self::_setup_db_config($connection_name); //ensures at least default config is set
if (is_array($key)) {
// Shortcut: If only one array argument is passed,
// assume it's an array of configuration settings
foreach ($key as $conf_key => $conf_value) {
self::configure($conf_key, $conf_value, $connection_name);
}
} else {
if (is_null($value)) {
// Shortcut: If only one string argument is passed,
// assume it's a connection string
$value = $key;
$key = 'connection_string';
}
self::$_config[$connection_name][$key] = $value;
}
}
/**
* Retrieve configuration options by key, or as whole array.
* @param string $key
* @param string $connection_name Which connection to use
*/
public static function get_config($key = null, $connection_name = self::DEFAULT_CONNECTION) {
if ($key) {
return self::$_config[$connection_name][$key];
} else {
return self::$_config[$connection_name];
}
}
/**
* Delete all configs in _config array.
*/
public static function reset_config() {
self::$_config = array();
}
/**
* Despite its slightly odd name, this is actually the factory
* method used to acquire instances of the class. It is named
* this way for the sake of a readable interface, ie
* ORM::for_table('table_name')->find_one()-> etc. As such,
* this will normally be the first method called in a chain.
* @param string $table_name
* @param string $connection_name Which connection to use
* @return ORM
*/
public static function for_table($table_name, $connection_name = self::DEFAULT_CONNECTION) {
self::_setup_db($connection_name);
return new self($table_name, array(), $connection_name);
}
/**
* Set up the database connection used by the class
* @param string $connection_name Which connection to use
*/
protected static function _setup_db($connection_name = self::DEFAULT_CONNECTION) {
if (!array_key_exists($connection_name, self::$_db) ||
!is_object(self::$_db[$connection_name])) {
self::_setup_db_config($connection_name);
$db = new PDO(
self::$_config[$connection_name]['connection_string'],
self::$_config[$connection_name]['username'],
self::$_config[$connection_name]['password'],
self::$_config[$connection_name]['driver_options']
);
$db->setAttribute(PDO::ATTR_ERRMODE, self::$_config[$connection_name]['error_mode']);
self::set_db($db, $connection_name);
}
}
/**
* Ensures configuration (mulitple connections) is at least set to default.
* @param string $connection_name Which connection to use
*/
protected static function _setup_db_config($connection_name) {
if (!array_key_exists($connection_name, self::$_config)) {
self::$_config[$connection_name] = self::$_default_config;
}
}
/**
* Set the PDO object used by Idiorm to communicate with the database.
* This is public in case the ORM should use a ready-instantiated
* PDO object as its database connection. Accepts an optional string key
* to identify the connection if multiple connections are used.
* @param PDO $db
* @param string $connection_name Which connection to use
*/
public static function set_db($db, $connection_name = self::DEFAULT_CONNECTION) {
self::_setup_db_config($connection_name);
self::$_db[$connection_name] = $db;
self::_setup_identifier_quote_character($connection_name);
self::_setup_limit_clause_style($connection_name);
}
/**
* Delete all registered PDO objects in _db array.
*/
public static function reset_db() {
self::$_db = array();
}
/**
* Detect and initialise the character used to quote identifiers
* (table names, column names etc). If this has been specified
* manually using ORM::configure('identifier_quote_character', 'some-char'),
* this will do nothing.
* @param string $connection_name Which connection to use
*/
protected static function _setup_identifier_quote_character($connection_name) {
if (is_null(self::$_config[$connection_name]['identifier_quote_character'])) {
self::$_config[$connection_name]['identifier_quote_character'] =
self::_detect_identifier_quote_character($connection_name);
}
}
/**
* Detect and initialise the limit clause style ("SELECT TOP 5" /
* "... LIMIT 5"). If this has been specified manually using
* ORM::configure('limit_clause_style', 'top'), this will do nothing.
* @param string $connection_name Which connection to use
*/
public static function _setup_limit_clause_style($connection_name) {
if (is_null(self::$_config[$connection_name]['limit_clause_style'])) {
self::$_config[$connection_name]['limit_clause_style'] =
self::_detect_limit_clause_style($connection_name);
}
}
/**
* Return the correct character used to quote identifiers (table
* names, column names etc) by looking at the driver being used by PDO.
* @param string $connection_name Which connection to use
* @return string
*/
protected static function _detect_identifier_quote_character($connection_name) {
switch(self::$_db[$connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME)) {
case 'pgsql':
case 'sqlsrv':
case 'dblib':
case 'mssql':
case 'sybase':
case 'firebird':
return '"';
case 'mysql':
case 'sqlite':
case 'sqlite2':
default:
return '`';
}
}
/**
* Returns a constant after determining the appropriate limit clause
* style
* @param string $connection_name Which connection to use
* @return string Limit clause style keyword/constant
*/
protected static function _detect_limit_clause_style($connection_name) {
switch(self::$_db[$connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME)) {
case 'sqlsrv':
case 'dblib':
case 'mssql':
return ORM::LIMIT_STYLE_TOP_N;
default:
return ORM::LIMIT_STYLE_LIMIT;
}
}
/**
* Returns the PDO instance used by the the ORM to communicate with
* the database. This can be called if any low-level DB access is
* required outside the class. If multiple connections are used,
* accepts an optional key name for the connection.
* @param string $connection_name Which connection to use
* @return PDO
*/
public static function get_db($connection_name = self::DEFAULT_CONNECTION) {
self::_setup_db($connection_name); // required in case this is called before Idiorm is instantiated
return self::$_db[$connection_name];
}
/**
* Executes a raw query as a wrapper for PDOStatement::execute.
* Useful for queries that can't be accomplished through Idiorm,
* particularly those using engine-specific features.
* @example raw_execute('SELECT `name`, AVG(`order`) FROM `customer` GROUP BY `name` HAVING AVG(`order`) > 10')
* @example raw_execute('INSERT OR REPLACE INTO `widget` (`id`, `name`) SELECT `id`, `name` FROM `other_table`')
* @param string $query The raw SQL query
* @param array $parameters Optional bound parameters
* @param string $connection_name Which connection to use
* @return bool Success
*/
public static function raw_execute($query, $parameters = array(), $connection_name = self::DEFAULT_CONNECTION) {
self::_setup_db($connection_name);
return self::_execute($query, $parameters, $connection_name);
}
/**
* Returns the PDOStatement instance last used by any connection wrapped by the ORM.
* Useful for access to PDOStatement::rowCount() or error information
* @return PDOStatement
*/
public static function get_last_statement() {
return self::$_last_statement;
}
/**
* Internal helper method for executing statments. Logs queries, and
* stores statement object in ::_last_statment, accessible publicly
* through ::get_last_statement()
* @param string $query
* @param array $parameters An array of parameters to be bound in to the query
* @param string $connection_name Which connection to use
* @return bool Response of PDOStatement::execute()
*/
protected static function _execute($query, $parameters = array(), $connection_name = self::DEFAULT_CONNECTION) {
self::_log_query($query, $parameters, $connection_name);
$statement = self::$_db[$connection_name]->prepare($query);
self::$_last_statement = $statement;
return $statement->execute($parameters);
}
/**
* Add a query to the internal query log. Only works if the
* 'logging' config option is set to true.
*
* This works by manually binding the parameters to the query - the
* query isn't executed like this (PDO normally passes the query and
* parameters to the database which takes care of the binding) but
* doing it this way makes the logged queries more readable.
* @param string $query
* @param array $parameters An array of parameters to be bound in to the query
* @param string $connection_name Which connection to use
* @return bool
*/
protected static function _log_query($query, $parameters, $connection_name) {
// If logging is not enabled, do nothing
if (!self::$_config[$connection_name]['logging']) {
return false;
}
if (!isset(self::$_query_log[$connection_name])) {
self::$_query_log[$connection_name] = array();
}
if (count($parameters) > 0) {
// Escape the parameters
$parameters = array_map(array(self::$_db[$connection_name], 'quote'), $parameters);
// Avoid %format collision for vsprintf
$query = str_replace("%", "%%", $query);
// Replace placeholders in the query for vsprintf
if(false !== strpos($query, "'") || false !== strpos($query, '"')) {
$query = IdiormString::str_replace_outside_quotes("?", "%s", $query);
} else {
$query = str_replace("?", "%s", $query);
}
// Replace the question marks in the query with the parameters
$bound_query = vsprintf($query, $parameters);
} else {
$bound_query = $query;
}
self::$_last_query = $bound_query;
self::$_query_log[$connection_name][] = $bound_query;
if(is_callable(self::$_config[$connection_name]['logger'])){
$logger = self::$_config[$connection_name]['logger'];
$logger($bound_query);
}
return true;
}
/**
* Get the last query executed. Only works if the
* 'logging' config option is set to true. Otherwise
* this will return null. Returns last query from all connections if
* no connection_name is specified
* @param null|string $connection_name Which connection to use
* @return string
*/
public static function get_last_query($connection_name = null) {
if ($connection_name === null) {
return self::$_last_query;
}
if (!isset(self::$_query_log[$connection_name])) {
return '';
}
return end(self::$_query_log[$connection_name]);
}
/**
* Get an array containing all the queries run on a
* specified connection up to now.
* Only works if the 'logging' config option is
* set to true. Otherwise, returned array will be empty.
* @param string $connection_name Which connection to use
*/
public static function get_query_log($connection_name = self::DEFAULT_CONNECTION) {
if (isset(self::$_query_log[$connection_name])) {
return self::$_query_log[$connection_name];
}
return array();
}
/**
* Get a list of the available connection names
* @return array
*/
public static function get_connection_names() {
return array_keys(self::$_db);
}
// ------------------------ //
// --- INSTANCE METHODS --- //
// ------------------------ //
/**
* "Private" constructor; shouldn't be called directly.
* Use the ORM::for_table factory method instead.
*/
protected function __construct($table_name, $data = array(), $connection_name = self::DEFAULT_CONNECTION) {
$this->_table_name = $table_name;
$this->_data = $data;
$this->_connection_name = $connection_name;
self::_setup_db_config($connection_name);
}
/**
* Create a new, empty instance of the class. Used
* to add a new row to your database. May optionally
* be passed an associative array of data to populate
* the instance. If so, all fields will be flagged as
* dirty so all will be saved to the database when
* save() is called.
*/
public function create($data=null) {
$this->_is_new = true;
if (!is_null($data)) {
return $this->hydrate($data)->force_all_dirty();
}
return $this;
}
/**
* Specify the ID column to use for this instance or array of instances only.
* This overrides the id_column and id_column_overrides settings.
*
* This is mostly useful for libraries built on top of Idiorm, and will
* not normally be used in manually built queries. If you don't know why
* you would want to use this, you should probably just ignore it.
*/
public function use_id_column($id_column) {
$this->_instance_id_column = $id_column;
return $this;
}
/**
* Create an ORM instance from the given row (an associative
* array of data fetched from the database)
*/
protected function _create_instance_from_row($row) {
$instance = self::for_table($this->_table_name, $this->_connection_name);
$instance->use_id_column($this->_instance_id_column);
$instance->hydrate($row);
return $instance;
}
/**
* Tell the ORM that you are expecting a single result
* back from your query, and execute it. Will return
* a single instance of the ORM class, or false if no
* rows were returned.
* As a shortcut, you may supply an ID as a parameter
* to this method. This will perform a primary key
* lookup on the table.
*/
public function find_one($id=null) {
if (!is_null($id)) {
$this->where_id_is($id);
}
$this->limit(1);
$rows = $this->_run();
if (empty($rows)) {
return false;
}
return $this->_create_instance_from_row($rows[0]);
}
/**
* Tell the ORM that you are expecting multiple results
* from your query, and execute it. Will return an array
* of instances of the ORM class, or an empty array if
* no rows were returned.
* @return array|\IdiormResultSet
*/
public function find_many() {
if(self::$_config[$this->_connection_name]['return_result_sets']) {
return $this->find_result_set();
}
return $this->_find_many();
}
/**
* Tell the ORM that you are expecting multiple results
* from your query, and execute it. Will return an array
* of instances of the ORM class, or an empty array if
* no rows were returned.
* @return array
*/
protected function _find_many() {
$rows = $this->_run();
return array_map(array($this, '_create_instance_from_row'), $rows);
}
/**
* Tell the ORM that you are expecting multiple results
* from your query, and execute it. Will return a result set object
* containing instances of the ORM class.
* @return \IdiormResultSet
*/
public function find_result_set() {
return new IdiormResultSet($this->_find_many());
}
/**
* Tell the ORM that you are expecting multiple results
* from your query, and execute it. Will return an array,
* or an empty array if no rows were returned.
* @return array
*/
public function find_array() {
return $this->_run();
}
/**
* Tell the ORM that you wish to execute a COUNT query.
* Will return an integer representing the number of
* rows returned.
*/
public function count($column = '*') {
return $this->_call_aggregate_db_function(__FUNCTION__, $column);
}
/**
* Tell the ORM that you wish to execute a MAX query.
* Will return the max value of the choosen column.
*/
public function max($column) {
return $this->_call_aggregate_db_function(__FUNCTION__, $column);
}
/**
* Tell the ORM that you wish to execute a MIN query.
* Will return the min value of the choosen column.
*/
public function min($column) {
return $this->_call_aggregate_db_function(__FUNCTION__, $column);
}
/**
* Tell the ORM that you wish to execute a AVG query.
* Will return the average value of the choosen column.
*/
public function avg($column) {
return $this->_call_aggregate_db_function(__FUNCTION__, $column);
}
/**
* Tell the ORM that you wish to execute a SUM query.
* Will return the sum of the choosen column.
*/
public function sum($column) {
return $this->_call_aggregate_db_function(__FUNCTION__, $column);
}
/**
* Execute an aggregate query on the current connection.
* @param string $sql_function The aggregate function to call eg. MIN, COUNT, etc
* @param string $column The column to execute the aggregate query against
* @return int
*/
protected function _call_aggregate_db_function($sql_function, $column) {
$alias = strtolower($sql_function);
$sql_function = strtoupper($sql_function);
if('*' != $column) {
$column = $this->_quote_identifier($column);
}
$result_columns = $this->_result_columns;
$this->_result_columns = array();
$this->select_expr("$sql_function($column)", $alias);
$result = $this->find_one();
$this->_result_columns = $result_columns;
$return_value = 0;
if($result !== false && isset($result->$alias)) {
if((int) $result->$alias == (float) $result->$alias) {
$return_value = (int) $result->$alias;
} else {
$return_value = (float) $result->$alias;
}
}
return $return_value;
}
/**
* This method can be called to hydrate (populate) this
* instance of the class from an associative array of data.
* This will usually be called only from inside the class,
* but it's public in case you need to call it directly.
*/
public function hydrate($data=array()) {
$this->_data = $data;
return $this;
}
/**
* Force the ORM to flag all the fields in the $data array
* as "dirty" and therefore update them when save() is called.
*/
public function force_all_dirty() {
$this->_dirty_fields = $this->_data;
return $this;
}
/**
* Perform a raw query. The query can contain placeholders in
* either named or question mark style. If placeholders are
* used, the parameters should be an array of values which will
* be bound to the placeholders in the query. If this method
* is called, all other query building methods will be ignored.
*/
public function raw_query($query, $parameters = array()) {
$this->_is_raw_query = true;
$this->_raw_query = $query;
$this->_raw_parameters = $parameters;
return $this;
}
/**
* Add an alias for the main table to be used in SELECT queries
*/
public function table_alias($alias) {
$this->_table_alias = $alias;
return $this;
}
/**
* Internal method to add an unquoted expression to the set
* of columns returned by the SELECT query. The second optional
* argument is the alias to return the expression as.
*/
protected function _add_result_column($expr, $alias=null) {
if (!is_null($alias)) {
$expr .= " AS " . $this->_quote_identifier($alias);
}
if ($this->_using_default_result_columns) {
$this->_result_columns = array($expr);
$this->_using_default_result_columns = false;
} else {
$this->_result_columns[] = $expr;
}
return $this;
}
/**
* Add a column to the list of columns returned by the SELECT
* query. This defaults to '*'. The second optional argument is
* the alias to return the column as.
*/
public function select($column, $alias=null) {
$column = $this->_quote_identifier($column);
return $this->_add_result_column($column, $alias);
}
/**
* Add an unquoted expression to the list of columns returned
* by the SELECT query. The second optional argument is
* the alias to return the column as.
*/
public function select_expr($expr, $alias=null) {
return $this->_add_result_column($expr, $alias);
}
/**
* Add columns to the list of columns returned by the SELECT
* query. This defaults to '*'. Many columns can be supplied
* as either an array or as a list of parameters to the method.
*
* Note that the alias must not be numeric - if you want a
* numeric alias then prepend it with some alpha chars. eg. a1
*
* @example select_many(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5');
* @example select_many('column', 'column2', 'column3');
* @example select_many(array('column', 'column2', 'column3'), 'column4', 'column5');
*
* @return \ORM
*/
public function select_many() {
$columns = func_get_args();
if(!empty($columns)) {
$columns = $this->_normalise_select_many_columns($columns);
foreach($columns as $alias => $column) {
if(is_numeric($alias)) {
$alias = null;
}
$this->select($column, $alias);
}
}
return $this;
}
/**
* Add an unquoted expression to the list of columns returned
* by the SELECT query. Many columns can be supplied as either
* an array or as a list of parameters to the method.
*
* Note that the alias must not be numeric - if you want a
* numeric alias then prepend it with some alpha chars. eg. a1
*
* @example select_many_expr(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5')
* @example select_many_expr('column', 'column2', 'column3')
* @example select_many_expr(array('column', 'column2', 'column3'), 'column4', 'column5')
*
* @return \ORM
*/
public function select_many_expr() {
$columns = func_get_args();
if(!empty($columns)) {
$columns = $this->_normalise_select_many_columns($columns);
foreach($columns as $alias => $column) {
if(is_numeric($alias)) {
$alias = null;
}
$this->select_expr($column, $alias);
}
}
return $this;
}
/**
* Take a column specification for the select many methods and convert it
* into a normalised array of columns and aliases.
*
* It is designed to turn the following styles into a normalised array:
*
* array(array('alias' => 'column', 'column2', 'alias2' => 'column3'), 'column4', 'column5'))
*
* @param array $columns
* @return array
*/
protected function _normalise_select_many_columns($columns) {
$return = array();
foreach($columns as $column) {
if(is_array($column)) {
foreach($column as $key => $value) {
if(!is_numeric($key)) {
$return[$key] = $value;
} else {
$return[] = $value;
}
}
} else {
$return[] = $column;
}
}
return $return;
}
/**
* Add a DISTINCT keyword before the list of columns in the SELECT query
*/
public function distinct() {
$this->_distinct = true;
return $this;
}
/**
* Internal method to add a JOIN source to the query.
*
* The join_operator should be one of INNER, LEFT OUTER, CROSS etc - this
* will be prepended to JOIN.
*
* The table should be the name of the table to join to.
*
* The constraint may be either a string or an array with three elements. If it
* is a string, it will be compiled into the query as-is, with no escaping. The
* recommended way to supply the constraint is as an array with three elements:
*
* first_column, operator, second_column
*
* Example: array('user.id', '=', 'profile.user_id')
*
* will compile to
*
* ON `user`.`id` = `profile`.`user_id`
*
* The final (optional) argument specifies an alias for the joined table.
*/
protected function _add_join_source($join_operator, $table, $constraint, $table_alias=null) {
$join_operator = trim("{$join_operator} JOIN");
$table = $this->_quote_identifier($table);
// Add table alias if present
if (!is_null($table_alias)) {
$table_alias = $this->_quote_identifier($table_alias);
$table .= " {$table_alias}";
}
// Build the constraint
if (is_array($constraint)) {
list($first_column, $operator, $second_column) = $constraint;
$first_column = $this->_quote_identifier($first_column);
$second_column = $this->_quote_identifier($second_column);
$constraint = "{$first_column} {$operator} {$second_column}";
}
$this->_join_sources[] = "{$join_operator} {$table} ON {$constraint}";
return $this;
}
/**
* Add a simple JOIN source to the query
*/
public function join($table, $constraint, $table_alias=null) {
return $this->_add_join_source("", $table, $constraint, $table_alias);
}
/**
* Add an INNER JOIN souce to the query
*/
public function inner_join($table, $constraint, $table_alias=null) {
return $this->_add_join_source("INNER", $table, $constraint, $table_alias);
}
/**
* Add a LEFT OUTER JOIN souce to the query
*/
public function left_outer_join($table, $constraint, $table_alias=null) {
return $this->_add_join_source("LEFT OUTER", $table, $constraint, $table_alias);
}
/**
* Add an RIGHT OUTER JOIN souce to the query
*/
public function right_outer_join($table, $constraint, $table_alias=null) {
return $this->_add_join_source("RIGHT OUTER", $table, $constraint, $table_alias);
}
/**
* Add an FULL OUTER JOIN souce to the query
*/
public function full_outer_join($table, $constraint, $table_alias=null) {
return $this->_add_join_source("FULL OUTER", $table, $constraint, $table_alias);
}
/**
* Internal method to add a HAVING condition to the query
*/
protected function _add_having($fragment, $values=array()) {
return $this->_add_condition('having', $fragment, $values);
}
/**
* Internal method to add a HAVING condition to the query
*/
protected function _add_simple_having($column_name, $separator, $value) {
return $this->_add_simple_condition('having', $column_name, $separator, $value);
}
/**
* Internal method to add a WHERE condition to the query
*/
protected function _add_where($fragment, $values=array()) {
return $this->_add_condition('where', $fragment, $values);
}
/**
* Internal method to add a WHERE condition to the query
*/
protected function _add_simple_where($column_name, $separator, $value) {
return $this->_add_simple_condition('where', $column_name, $separator, $value);
}
/**
* Internal method to add a HAVING or WHERE condition to the query
*/
protected function _add_condition($type, $fragment, $values=array()) {
$conditions_class_property_name = "_{$type}_conditions";
if (!is_array($values)) {
$values = array($values);
}
array_push($this->$conditions_class_property_name, array(
self::CONDITION_FRAGMENT => $fragment,
self::CONDITION_VALUES => $values,
));
return $this;
}
/**
* Helper method to compile a simple COLUMN SEPARATOR VALUE
* style HAVING or WHERE condition into a string and value ready to
* be passed to the _add_condition method. Avoids duplication
* of the call to _quote_identifier
*/
protected function _add_simple_condition($type, $column_name, $separator, $value) {
// Add the table name in case of ambiguous columns
if (count($this->_join_sources) > 0 && strpos($column_name, '.') === false) {
$table = $this->_table_name;
if (!is_null($this->_table_alias)) {
$table = $this->_table_alias;
}
$column_name = "{$table}.{$column_name}";
}
$column_name = $this->_quote_identifier($column_name);
return $this->_add_condition($type, "{$column_name} {$separator} ?", $value);
}
/**
* Return a string containing the given number of question marks,
* separated by commas. Eg "?, ?, ?"
*/
protected function _create_placeholders($fields) {
if(!empty($fields)) {
$db_fields = array();
foreach($fields as $key => $value) {
// Process expression fields directly into the query
if(array_key_exists($key, $this->_expr_fields)) {
$db_fields[] = $value;
} else {
$db_fields[] = '?';
}
}
return implode(', ', $db_fields);
}
}
/**
* Add a WHERE column = value clause to your query. Each time
* this is called in the chain, an additional WHERE will be
* added, and these will be ANDed together when the final query
* is built.
*/
public function where($column_name, $value) {
return $this->where_equal($column_name, $value);
}
/**
* More explicitly named version of for the where() method.
* Can be used if preferred.
*/
public function where_equal($column_name, $value) {
return $this->_add_simple_where($column_name, '=', $value);
}
/**
* Add a WHERE column != value clause to your query.
*/
public function where_not_equal($column_name, $value) {
return $this->_add_simple_where($column_name, '!=', $value);
}
/**
* Special method to query the table by its primary key
*/
public function where_id_is($id) {
return $this->where($this->_get_id_column_name(), $id);
}
/**
* Add a WHERE ... LIKE clause to your query.
*/
public function where_like($column_name, $value) {
return $this->_add_simple_where($column_name, 'LIKE', $value);
}
/**
* Add where WHERE ... NOT LIKE clause to your query.
*/
public function where_not_like($column_name, $value) {
return $this->_add_simple_where($column_name, 'NOT LIKE', $value);
}
/**
* Add a WHERE ... > clause to your query
*/
public function where_gt($column_name, $value) {
return $this->_add_simple_where($column_name, '>', $value);
}
/**
* Add a WHERE ... < clause to your query
*/
public function where_lt($column_name, $value) {
return $this->_add_simple_where($column_name, '<', $value);
}
/**
* Add a WHERE ... >= clause to your query
*/
public function where_gte($column_name, $value) {
return $this->_add_simple_where($column_name, '>=', $value);
}
/**
* Add a WHERE ... <= clause to your query
*/
public function where_lte($column_name, $value) {
return $this->_add_simple_where($column_name, '<=', $value);
}
/**
* Add a WHERE ... IN clause to your query
*/
public function where_in($column_name, $values) {
$column_name = $this->_quote_identifier($column_name);
$placeholders = $this->_create_placeholders($values);
return $this->_add_where("{$column_name} IN ({$placeholders})", $values);
}
/**
* Add a WHERE ... NOT IN clause to your query
*/
public function where_not_in($column_name, $values) {
$column_name = $this->_quote_identifier($column_name);
$placeholders = $this->_create_placeholders($values);
return $this->_add_where("{$column_name} NOT IN ({$placeholders})", $values);
}
/**
* Add a WHERE column IS NULL clause to your query
*/
public function where_null($column_name) {
$column_name = $this->_quote_identifier($column_name);
return $this->_add_where("{$column_name} IS NULL");
}
/**
* Add a WHERE column IS NOT NULL clause to your query
*/
public function where_not_null($column_name) {
$column_name = $this->_quote_identifier($column_name);
return $this->_add_where("{$column_name} IS NOT NULL");
}
/**
* Add a raw WHERE clause to the query. The clause should
* contain question mark placeholders, which will be bound
* to the parameters supplied in the second argument.
*/
public function where_raw($clause, $parameters=array()) {
return $this->_add_where($clause, $parameters);
}
/**
* Add a LIMIT to the query
*/
public function limit($limit) {
$this->_limit = $limit;
return $this;
}
/**
* Add an OFFSET to the query
*/
public function offset($offset) {
$this->_offset = $offset;
return $this;
}
/**
* Add an ORDER BY clause to the query
*/
protected function _add_order_by($column_name, $ordering) {
$column_name = $this->_quote_identifier($column_name);
$this->_order_by[] = "{$column_name} {$ordering}";
return $this;
}
/**
* Add an ORDER BY column DESC clause
*/
public function order_by_desc($column_name) {
return $this->_add_order_by($column_name, 'DESC');
}
/**
* Add an ORDER BY column ASC clause
*/
public function order_by_asc($column_name) {
return $this->_add_order_by($column_name, 'ASC');
}
/**
* Add an unquoted expression as an ORDER BY clause
*/
public function order_by_expr($clause) {
$this->_order_by[] = $clause;
return $this;
}
/**
* Add a column to the list of columns to GROUP BY
*/
public function group_by($column_name) {
$column_name = $this->_quote_identifier($column_name);
$this->_group_by[] = $column_name;
return $this;
}
/**
* Add an unquoted expression to the list of columns to GROUP BY
*/
public function group_by_expr($expr) {
$this->_group_by[] = $expr;
return $this;
}
/**
* Add a HAVING column = value clause to your query. Each time
* this is called in the chain, an additional HAVING will be
* added, and these will be ANDed together when the final query
* is built.
*/
public function having($column_name, $value) {
return $this->having_equal($column_name, $value);
}
/**
* More explicitly named version of for the having() method.
* Can be used if preferred.
*/
public function having_equal($column_name, $value) {
return $this->_add_simple_having($column_name, '=', $value);
}
/**
* Add a HAVING column != value clause to your query.
*/
public function having_not_equal($column_name, $value) {
return $this->_add_simple_having($column_name, '!=', $value);
}
/**
* Special method to query the table by its primary key
*/
public function having_id_is($id) {
return $this->having($this->_get_id_column_name(), $id);
}
/**
* Add a HAVING ... LIKE clause to your query.
*/
public function having_like($column_name, $value) {
return $this->_add_simple_having($column_name, 'LIKE', $value);
}
/**
* Add where HAVING ... NOT LIKE clause to your query.
*/
public function having_not_like($column_name, $value) {
return $this->_add_simple_having($column_name, 'NOT LIKE', $value);
}
/**
* Add a HAVING ... > clause to your query
*/
public function having_gt($column_name, $value) {
return $this->_add_simple_having($column_name, '>', $value);
}
/**
* Add a HAVING ... < clause to your query
*/
public function having_lt($column_name, $value) {
return $this->_add_simple_having($column_name, '<', $value);
}
/**
* Add a HAVING ... >= clause to your query
*/
public function having_gte($column_name, $value) {
return $this->_add_simple_having($column_name, '>=', $value);
}
/**
* Add a HAVING ... <= clause to your query
*/
public function having_lte($column_name, $value) {
return $this->_add_simple_having($column_name, '<=', $value);
}
/**
* Add a HAVING ... IN clause to your query
*/
public function having_in($column_name, $values) {
$column_name = $this->_quote_identifier($column_name);
$placeholders = $this->_create_placeholders($values);
return $this->_add_having("{$column_name} IN ({$placeholders})", $values);
}
/**
* Add a HAVING ... NOT IN clause to your query
*/
public function having_not_in($column_name, $values) {
$column_name = $this->_quote_identifier($column_name);
$placeholders = $this->_create_placeholders($values);
return $this->_add_having("{$column_name} NOT IN ({$placeholders})", $values);
}
/**
* Add a HAVING column IS NULL clause to your query
*/
public function having_null($column_name) {
$column_name = $this->_quote_identifier($column_name);
return $this->_add_having("{$column_name} IS NULL");
}
/**
* Add a HAVING column IS NOT NULL clause to your query
*/
public function having_not_null($column_name) {
$column_name = $this->_quote_identifier($column_name);
return $this->_add_having("{$column_name} IS NOT NULL");
}
/**
* Add a raw HAVING clause to the query. The clause should
* contain question mark placeholders, which will be bound
* to the parameters supplied in the second argument.
*/
public function having_raw($clause, $parameters=array()) {
return $this->_add_having($clause, $parameters);
}
/**
* Build a SELECT statement based on the clauses that have
* been passed to this instance by chaining method calls.
*/
protected function _build_select() {
// If the query is raw, just set the $this->_values to be
// the raw query parameters and return the raw query
if ($this->_is_raw_query) {
$this->_values = $this->_raw_parameters;
return $this->_raw_query;
}
// Build and return the full SELECT statement by concatenating
// the results of calling each separate builder method.
return $this->_join_if_not_empty(" ", array(
$this->_build_select_start(),
$this->_build_join(),
$this->_build_where(),
$this->_build_group_by(),
$this->_build_having(),
$this->_build_order_by(),
$this->_build_limit(),
$this->_build_offset(),
));
}
/**
* Build the start of the SELECT statement
*/
protected function _build_select_start() {
$fragment = 'SELECT ';
$result_columns = join(', ', $this->_result_columns);
if (!is_null($this->_limit) &&
self::$_config[$this->_connection_name]['limit_clause_style'] === ORM::LIMIT_STYLE_TOP_N) {
$fragment .= "TOP {$this->_limit} ";
}
if ($this->_distinct) {
$result_columns = 'DISTINCT ' . $result_columns;
}
$fragment .= "{$result_columns} FROM " . $this->_quote_identifier($this->_table_name);
if (!is_null($this->_table_alias)) {
$fragment .= " " . $this->_quote_identifier($this->_table_alias);
}
return $fragment;
}
/**
* Build the JOIN sources
*/
protected function _build_join() {
if (count($this->_join_sources) === 0) {
return '';
}
return join(" ", $this->_join_sources);
}
/**
* Build the WHERE clause(s)
*/
protected function _build_where() {
return $this->_build_conditions('where');
}
/**
* Build the HAVING clause(s)
*/
protected function _build_having() {
return $this->_build_conditions('having');
}
/**
* Build GROUP BY
*/
protected function _build_group_by() {
if (count($this->_group_by) === 0) {
return '';
}
return "GROUP BY " . join(", ", $this->_group_by);
}
/**
* Build a WHERE or HAVING clause
* @param string $type
* @return string
*/
protected function _build_conditions($type) {
$conditions_class_property_name = "_{$type}_conditions";
// If there are no clauses, return empty string
if (count($this->$conditions_class_property_name) === 0) {
return '';
}
$conditions = array();
foreach ($this->$conditions_class_property_name as $condition) {
$conditions[] = $condition[self::CONDITION_FRAGMENT];
$this->_values = array_merge($this->_values, $condition[self::CONDITION_VALUES]);
}
return strtoupper($type) . " " . join(" AND ", $conditions);
}
/**
* Build ORDER BY
*/
protected function _build_order_by() {
if (count($this->_order_by) === 0) {
return '';
}
return "ORDER BY " . join(", ", $this->_order_by);
}
/**
* Build LIMIT
*/
protected function _build_limit() {
$fragment = '';
if (!is_null($this->_limit) &&
self::$_config[$this->_connection_name]['limit_clause_style'] == ORM::LIMIT_STYLE_LIMIT) {
if (self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') {
$fragment = 'ROWS';
} else {
$fragment = 'LIMIT';
}
$fragment .= " {$this->_limit}";
}
return $fragment;
}
/**
* Build OFFSET
*/
protected function _build_offset() {
if (!is_null($this->_offset)) {
$clause = 'OFFSET';
if (self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') {
$clause = 'TO';
}
return "$clause " . $this->_offset;
}
return '';
}
/**
* Wrapper around PHP's join function which
* only adds the pieces if they are not empty.
*/
protected function _join_if_not_empty($glue, $pieces) {
$filtered_pieces = array();
foreach ($pieces as $piece) {
if (is_string($piece)) {
$piece = trim($piece);
}
if (!empty($piece)) {
$filtered_pieces[] = $piece;
}
}
return join($glue, $filtered_pieces);
}
/**
* Quote a string that is used as an identifier
* (table names, column names etc). This method can
* also deal with dot-separated identifiers eg table.column
*/
protected function _quote_identifier($identifier) {
$parts = explode('.', $identifier);
$parts = array_map(array($this, '_quote_identifier_part'), $parts);
return join('.', $parts);
}
/**
* This method performs the actual quoting of a single
* part of an identifier, using the identifier quote
* character specified in the config (or autodetected).
*/
protected function _quote_identifier_part($part) {
if ($part === '*') {
return $part;
}
$quote_character = self::$_config[$this->_connection_name]['identifier_quote_character'];
// double up any identifier quotes to escape them
return $quote_character .
str_replace($quote_character,
$quote_character . $quote_character,
$part
) . $quote_character;
}
/**
* Create a cache key for the given query and parameters.
*/
protected static function _create_cache_key($query, $parameters) {
$parameter_string = join(',', $parameters);
$key = $query . ':' . $parameter_string;
return sha1($key);
}
/**
* Check the query cache for the given cache key. If a value
* is cached for the key, return the value. Otherwise, return false.
*/
protected static function _check_query_cache($cache_key, $connection_name = self::DEFAULT_CONNECTION) {
if (isset(self::$_query_cache[$connection_name][$cache_key])) {
return self::$_query_cache[$connection_name][$cache_key];
}
return false;
}
/**
* Clear the query cache
*/
public static function clear_cache() {
self::$_query_cache = array();
}
/**
* Add the given value to the query cache.
*/
protected static function _cache_query_result($cache_key, $value, $connection_name = self::DEFAULT_CONNECTION) {
if (!isset(self::$_query_cache[$connection_name])) {
self::$_query_cache[$connection_name] = array();
}
self::$_query_cache[$connection_name][$cache_key] = $value;
}
/**
* Execute the SELECT query that has been built up by chaining methods
* on this class. Return an array of rows as associative arrays.
*/
protected function _run() {
$query = $this->_build_select();
$caching_enabled = self::$_config[$this->_connection_name]['caching'];
if ($caching_enabled) {
$cache_key = self::_create_cache_key($query, $this->_values);
$cached_result = self::_check_query_cache($cache_key, $this->_connection_name);
if ($cached_result !== false) {
return $cached_result;
}
}
self::_execute($query, $this->_values, $this->_connection_name);
$statement = self::get_last_statement();
$rows = array();
while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
$rows[] = $row;
}
if ($caching_enabled) {
self::_cache_query_result($cache_key, $rows, $this->_connection_name);
}
// reset Idiorm after executing the query
$this->_values = array();
$this->_result_columns = array('*');
$this->_using_default_result_columns = true;
return $rows;
}
/**
* Return the raw data wrapped by this ORM
* instance as an associative array. Column
* names may optionally be supplied as arguments,
* if so, only those keys will be returned.
*/
public function as_array() {
if (func_num_args() === 0) {
return $this->_data;
}
$args = func_get_args();
return array_intersect_key($this->_data, array_flip($args));
}
/**
* Return the value of a property of this object (database row)
* or null if not present.
*/
public function get($key) {
return isset($this->_data[$key]) ? $this->_data[$key] : null;
}
/**
* Return the name of the column in the database table which contains
* the primary key ID of the row.
*/
protected function _get_id_column_name() {
if (!is_null($this->_instance_id_column)) {
return $this->_instance_id_column;
}
if (isset(self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name])) {
return self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name];
}
return self::$_config[$this->_connection_name]['id_column'];
}
/**
* Get the primary key ID of this object.
*/
public function id() {
return $this->get($this->_get_id_column_name());
}
/**
* Set a property to a particular value on this object.
* To set multiple properties at once, pass an associative array
* as the first parameter and leave out the second parameter.
* Flags the properties as 'dirty' so they will be saved to the
* database when save() is called.
*/
public function set($key, $value = null) {
return $this->_set_orm_property($key, $value);
}
/**
* Set a property to a particular value on this object.
* To set multiple properties at once, pass an associative array
* as the first parameter and leave out the second parameter.
* Flags the properties as 'dirty' so they will be saved to the
* database when save() is called.
* @param string|array $key
* @param string|null $value
*/
public function set_expr($key, $value = null) {
return $this->_set_orm_property($key, $value, true);
}
/**
* Set a property on the ORM object.
* @param string|array $key
* @param string|null $value
* @param bool $raw Whether this value should be treated as raw or not
*/
protected function _set_orm_property($key, $value = null, $expr = false) {
if (!is_array($key)) {
$key = array($key => $value);
}
foreach ($key as $field => $value) {
$this->_data[$field] = $value;
$this->_dirty_fields[$field] = $value;
if (false === $expr and isset($this->_expr_fields[$field])) {
unset($this->_expr_fields[$field]);
} else if (true === $expr) {
$this->_expr_fields[$field] = true;
}
}
return $this;
}
/**
* Check whether the given field has been changed since this
* object was saved.
*/
public function is_dirty($key) {
return isset($this->_dirty_fields[$key]);
}
/**
* Check whether the model was the result of a call to create() or not
* @return bool
*/
public function is_new() {
return $this->_is_new;
}
/**
* Save any fields which have been modified on this object
* to the database.
*/
public function save() {
$query = array();
// remove any expression fields as they are already baked into the query
$values = array_values(array_diff_key($this->_dirty_fields, $this->_expr_fields));
if (!$this->_is_new) { // UPDATE
// If there are no dirty values, do nothing
if (empty($values) && empty($this->_expr_fields)) {
return true;
}
$query = $this->_build_update();
$values[] = $this->id();
} else { // INSERT
$query = $this->_build_insert();
}
$success = self::_execute($query, $values, $this->_connection_name);
// If we've just inserted a new record, set the ID of this object
if ($this->_is_new) {
$this->_is_new = false;
if (is_null($this->id())) {
if(self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') {
$this->_data[$this->_get_id_column_name()] = self::get_last_statement()->fetchColumn();
} else {
$this->_data[$this->_get_id_column_name()] = self::$_db[$this->_connection_name]->lastInsertId();
}
}
}
$this->_dirty_fields = $this->_expr_fields = array();
return $success;
}
/**
* Build an UPDATE query
*/
protected function _build_update() {
$query = array();
$query[] = "UPDATE {$this->_quote_identifier($this->_table_name)} SET";
$field_list = array();
foreach ($this->_dirty_fields as $key => $value) {
if(!array_key_exists($key, $this->_expr_fields)) {
$value = '?';
}
$field_list[] = "{$this->_quote_identifier($key)} = $value";
}
$query[] = join(", ", $field_list);
$query[] = "WHERE";
$query[] = $this->_quote_identifier($this->_get_id_column_name());
$query[] = "= ?";
return join(" ", $query);
}
/**
* Build an INSERT query
*/
protected function _build_insert() {
$query[] = "INSERT INTO";
$query[] = $this->_quote_identifier($this->_table_name);
$field_list = array_map(array($this, '_quote_identifier'), array_keys($this->_dirty_fields));
$query[] = "(" . join(", ", $field_list) . ")";
$query[] = "VALUES";
$placeholders = $this->_create_placeholders($this->_dirty_fields);
$query[] = "({$placeholders})";
if (self::$_db[$this->_connection_name]->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') {
$query[] = 'RETURNING ' . $this->_quote_identifier($this->_get_id_column_name());
}
return join(" ", $query);
}
/**
* Delete this record from the database
*/
public function delete() {
$query = join(" ", array(
"DELETE FROM",
$this->_quote_identifier($this->_table_name),
"WHERE",
$this->_quote_identifier($this->_get_id_column_name()),
"= ?",
));
return self::_execute($query, array($this->id()), $this->_connection_name);
}
/**
* Delete many records from the database
*/
public function delete_many() {
// Build and return the full DELETE statement by concatenating
// the results of calling each separate builder method.
$query = $this->_join_if_not_empty(" ", array(
"DELETE FROM",
$this->_quote_identifier($this->_table_name),
$this->_build_where(),
));
return self::_execute($query, $this->_values, $this->_connection_name);
}
// --------------------- //
// --- ArrayAccess --- //
// --------------------- //
public function offsetExists($key) {
return isset($this->_data[$key]);
}
public function offsetGet($key) {
return $this->get($key);
}
public function offsetSet($key, $value) {
if(is_null($key)) {
throw new InvalidArgumentException('You must specify a key/array index.');
}
$this->set($key, $value);
}
public function offsetUnset($key) {
unset($this->_data[$key]);
unset($this->_dirty_fields[$key]);
}
// --------------------- //
// --- MAGIC METHODS --- //
// --------------------- //
public function __get($key) {
return $this->offsetGet($key);
}
public function __set($key, $value) {
$this->offsetSet($key, $value);
}
public function __unset($key) {
$this->offsetUnset($key);
}
public function __isset($key) {
return $this->offsetExists($key);
}
/**
* Magic method to capture calls to undefined class methods.
* In this case we are attempting to convert camel case formatted
* methods into underscore formatted methods.
*
* This allows us to call ORM methods using camel case and remain
* backwards compatible.
*
* @param string $name
* @param array $arguments
* @return ORM
*/
public function __call($name, $arguments)
{
$method = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));
return call_user_func_array(array($this, $method), $arguments);
}
/**
* Magic method to capture calls to undefined static class methods.
* In this case we are attempting to convert camel case formatted
* methods into underscore formatted methods.
*
* This allows us to call ORM methods using camel case and remain
* backwards compatible.
*
* @param string $name
* @param array $arguments
* @return ORM
*/
public static function __callStatic($name, $arguments)
{
$method = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));
return call_user_func_array(array('ORM', $method), $arguments);
}
}
/**
* A class to handle str_replace operations that involve quoted strings
* @example IdiormString::str_replace_outside_quotes('?', '%s', 'columnA = "Hello?" AND columnB = ?');
* @example IdiormString::value('columnA = "Hello?" AND columnB = ?')->replace_outside_quotes('?', '%s');
* @author Jeff Roberson
* @author Simon Holywell
* @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer
*/
class IdiormString {
protected $subject;
protected $search;
protected $replace;
/**
* Get an easy to use instance of the class
* @param string $subject
* @return \self
*/
public static function value($subject) {
return new self($subject);
}
/**
* Shortcut method: Replace all occurrences of the search string with the replacement
* string where they appear outside quotes.
* @param string $search
* @param string $replace
* @param string $subject
* @return string
*/
public static function str_replace_outside_quotes($search, $replace, $subject) {
return self::value($subject)->replace_outside_quotes($search, $replace);
}
/**
* Set the base string object
* @param string $subject
*/
public function __construct($subject) {
$this->subject = (string) $subject;
}
/**
* Replace all occurrences of the search string with the replacement
* string where they appear outside quotes
* @param string $search
* @param string $replace
* @return string
*/
public function replace_outside_quotes($search, $replace) {
$this->search = $search;
$this->replace = $replace;
return $this->_str_replace_outside_quotes();
}
/**
* Validate an input string and perform a replace on all ocurrences
* of $this->search with $this->replace
* @author Jeff Roberson
* @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer
* @return string
*/
protected function _str_replace_outside_quotes(){
$re_valid = '/
# Validate string having embedded quoted substrings.
^ # Anchor to start of string.
(?: # Zero or more string chunks.
"[^"\\\\]*(?:\\\\.[^"\\\\]*)*" # Either a double quoted chunk,
| \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' # or a single quoted chunk,
| [^\'"\\\\]+ # or an unquoted chunk (no escapes).
)* # Zero or more string chunks.
\z # Anchor to end of string.
/sx';
if (!preg_match($re_valid, $this->subject)) {
throw new IdiormStringException("Subject string is not valid in the replace_outside_quotes context.");
}
$re_parse = '/
# Match one chunk of a valid string having embedded quoted substrings.
( # Either $1: Quoted chunk.
"[^"\\\\]*(?:\\\\.[^"\\\\]*)*" # Either a double quoted chunk,
| \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' # or a single quoted chunk.
) # End $1: Quoted chunk.
| ([^\'"\\\\]+) # or $2: an unquoted chunk (no escapes).
/sx';
return preg_replace_callback($re_parse, array($this, '_str_replace_outside_quotes_cb'), $this->subject);
}
/**
* Process each matching chunk from preg_replace_callback replacing
* each occurrence of $this->search with $this->replace
* @author Jeff Roberson
* @link http://stackoverflow.com/a/13370709/461813 StackOverflow answer
* @param array $matches
* @return string
*/
protected function _str_replace_outside_quotes_cb($matches) {
// Return quoted string chunks (in group $1) unaltered.
if ($matches[1]) return $matches[1];
// Process only unquoted chunks (in group $2).
return preg_replace('/'. preg_quote($this->search, '/') .'/',
$this->replace, $matches[2]);
}
}
/**
* A result set class for working with collections of model instances
* @author Simon Holywell
*/
class IdiormResultSet implements Countable, IteratorAggregate, ArrayAccess, Serializable {
/**
* The current result set as an array
* @var array
*/
protected $_results = array();
/**
* Optionally set the contents of the result set by passing in array
* @param array $results
*/
public function __construct(array $results = array()) {
$this->set_results($results);
}
/**
* Set the contents of the result set by passing in array
* @param array $results
*/
public function set_results(array $results) {
$this->_results = $results;
}
/**
* Get the current result set as an array
* @return array
*/
public function get_results() {
return $this->_results;
}
/**
* Get the current result set as an array
* @return array
*/
public function as_array() {
return $this->get_results();
}
/**
* Get the number of records in the result set
* @return int
*/
public function count() {
return count($this->_results);
}
/**
* Get an iterator for this object. In this case it supports foreaching
* over the result set.
* @return \ArrayIterator
*/
public function getIterator() {
return new ArrayIterator($this->_results);
}
/**
* ArrayAccess
* @param int|string $offset
* @return bool
*/
public function offsetExists($offset) {
return isset($this->_results[$offset]);
}
/**
* ArrayAccess
* @param int|string $offset
* @return mixed
*/
public function offsetGet($offset) {
return $this->_results[$offset];
}
/**
* ArrayAccess
* @param int|string $offset
* @param mixed $value
*/
public function offsetSet($offset, $value) {
$this->_results[$offset] = $value;
}
/**
* ArrayAccess
* @param int|string $offset
*/
public function offsetUnset($offset) {
unset($this->_results[$offset]);
}
/**
* Serializable
* @return string
*/
public function serialize() {
return serialize($this->_results);
}
/**
* Serializable
* @param string $serialized
* @return array
*/
public function unserialize($serialized) {
return unserialize($serialized);
}
/**
* Call a method on all models in a result set. This allows for method
* chaining such as setting a property on all models in a result set or
* any other batch operation across models.
* @example ORM::for_table('Widget')->find_many()->set('field', 'value')->save();
* @param string $method
* @param array $params
* @return \IdiormResultSet
*/
public function __call($method, $params = array()) {
foreach($this->_results as $model) {
call_user_func_array(array($model, $method), $params);
}
return $this;
}
}
/**
* A placeholder for exceptions eminating from the IdiormString class
*/
class IdiormStringException extends Exception {}
================================================
FILE: libraries/PHPMailer/PHPMailer.php
================================================
UseSendmailOptions) ) {
$rt = @mail($to, $this->EncodeHeader($this->SecureHeader($subject)), $body, $header);
} else {
$rt = @mail($to, $this->EncodeHeader($this->SecureHeader($subject)), $body, $header, $params);
}
return $rt;
}
/**
* Outputs debugging info via user-defined method
* @param string $str
*/
private function edebug($str)
{
if ($this->Debugoutput == "error_log") {
error_log($str);
} else {
echo $str;
}
}
/**
* Constructor
* @param boolean $exceptions Should we throw external exceptions?
*/
public function __construct($exceptions = false)
{
$this->exceptions = ($exceptions == true);
}
/**
* Sets message type to HTML.
* @param bool $ishtml
* @return void
*/
public function IsHTML($ishtml = true)
{
if ($ishtml) {
$this->ContentType = 'text/html';
} else {
$this->ContentType = 'text/plain';
}
}
/**
* Sets Mailer to send message using SMTP.
* @return void
*/
public function IsSMTP()
{
$this->Mailer = 'smtp';
}
/**
* Sets Mailer to send message using PHP mail() function.
* @return void
*/
public function IsMail()
{
$this->Mailer = 'mail';
}
/**
* Sets Mailer to send message using the $Sendmail program.
* @return void
*/
public function IsSendmail()
{
if (!stristr(ini_get('sendmail_path'), 'sendmail')) {
$this->Sendmail = '/var/qmail/bin/sendmail';
}
$this->Mailer = 'sendmail';
}
/**
* Sets Mailer to send message using the qmail MTA.
* @return void
*/
public function IsQmail()
{
if (stristr(ini_get('sendmail_path'), 'qmail')) {
$this->Sendmail = '/var/qmail/bin/sendmail';
}
$this->Mailer = 'sendmail';
}
/////////////////////////////////////////////////
// METHODS, RECIPIENTS
/////////////////////////////////////////////////
/**
* Adds a "To" address.
* @param string $address
* @param string $name
* @return boolean true on success, false if address already used
*/
public function AddAddress($address, $name = '')
{
return $this->AddAnAddress('to', $address, $name);
}
/**
* Adds a "Cc" address.
* Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
* @param string $address
* @param string $name
* @return boolean true on success, false if address already used
*/
public function AddCC($address, $name = '')
{
return $this->AddAnAddress('cc', $address, $name);
}
/**
* Adds a "Bcc" address.
* Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
* @param string $address
* @param string $name
* @return boolean true on success, false if address already used
*/
public function AddBCC($address, $name = '')
{
return $this->AddAnAddress('bcc', $address, $name);
}
/**
* Adds a "Reply-to" address.
* @param string $address
* @param string $name
* @return boolean
*/
public function AddReplyTo($address, $name = '')
{
return $this->AddAnAddress('Reply-To', $address, $name);
}
/**
* Adds an address to one of the recipient arrays
* Addresses that have been added already return false, but do not throw exceptions
* @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo'
* @param string $address The email address to send to
* @param string $name
* @throws phpmailerException
* @return boolean true on success, false if address already used or invalid in some way
* @access protected
*/
protected function AddAnAddress($kind, $address, $name = '')
{
if (!preg_match('/^(to|cc|bcc|Reply-To)$/', $kind)) {
$this->SetError($this->Lang('Invalid recipient array').': '.$kind);
if ($this->exceptions) {
throw new phpmailerException('Invalid recipient array: ' . $kind);
}
if ($this->SMTPDebug) {
$this->edebug($this->Lang('Invalid recipient array').': '.$kind);
}
return false;
}
$address = trim($address);
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
if (!$this->ValidateAddress($address)) {
$this->SetError($this->Lang('invalid_address').': '. $address);
if ($this->exceptions) {
throw new phpmailerException($this->Lang('invalid_address').': '.$address);
}
if ($this->SMTPDebug) {
$this->edebug($this->Lang('invalid_address').': '.$address);
}
return false;
}
if ($kind != 'Reply-To') {
if (!isset($this->all_recipients[strtolower($address)])) {
array_push($this->$kind, array($address, $name));
$this->all_recipients[strtolower($address)] = true;
return true;
}
} else {
if (!array_key_exists(strtolower($address), $this->ReplyTo)) {
$this->ReplyTo[strtolower($address)] = array($address, $name);
return true;
}
}
return false;
}
/**
* Set the From and FromName properties
* @param string $address
* @param string $name
* @param int $auto Also set Reply-To and Sender
* @throws phpmailerException
* @return boolean
*/
public function SetFrom($address, $name = '', $auto = 1)
{
$address = trim($address);
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
if (!$this->ValidateAddress($address)) {
$this->SetError($this->Lang('invalid_address').': '. $address);
if ($this->exceptions) {
throw new phpmailerException($this->Lang('invalid_address').': '.$address);
}
if ($this->SMTPDebug) {
$this->edebug($this->Lang('invalid_address').': '.$address);
}
return false;
}
$this->From = $address;
$this->FromName = $name;
if ($auto) {
if (empty($this->ReplyTo)) {
$this->AddAnAddress('Reply-To', $address, $name);
}
if (empty($this->Sender)) {
$this->Sender = $address;
}
}
return true;
}
/**
* Check that a string looks roughly like an email address should
* Static so it can be used without instantiation, public so people can overload
* Conforms to RFC5322: Uses *correct* regex on which FILTER_VALIDATE_EMAIL is
* based; So why not use FILTER_VALIDATE_EMAIL? Because it was broken to
* not allow a@b type valid addresses :(
* Some Versions of PHP break on the regex though, likely due to PCRE, so use
* the older validation method for those users. (http://php.net/manual/en/pcre.installation.php)
* @link http://squiloople.com/2009/12/20/email-address-validation/
* @copyright regex Copyright Michael Rushton 2009-10 | http://squiloople.com/ | Feel free to use and redistribute this code. But please keep this copyright notice.
* @param string $address The email address to check
* @return boolean
* @static
* @access public
*/
public static function ValidateAddress($address)
{
if ((defined('PCRE_VERSION')) && (version_compare(PCRE_VERSION, '8.0') >= 0)) {
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);
} elseif (function_exists('filter_var')) { //Introduced in PHP 5.2
if (filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) {
return false;
} else {
return true;
}
} else {
return preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/', $address);
}
}
/////////////////////////////////////////////////
// METHODS, MAIL SENDING
/////////////////////////////////////////////////
/**
* Creates message and assigns Mailer. If the message is
* not sent successfully then it returns false. Use the ErrorInfo
* variable to view description of the error.
* @throws phpmailerException
* @return bool
*/
public function Send()
{
try {
if(!$this->PreSend()) return false;
return $this->PostSend();
} catch (phpmailerException $e) {
$this->mailHeader = '';
$this->SetError($e->getMessage());
if ($this->exceptions) {
throw $e;
}
return false;
}
}
/**
* Prep mail by constructing all message entities
* @throws phpmailerException
* @return bool
*/
public function PreSend()
{
try {
$this->mailHeader = "";
if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) {
throw new phpmailerException($this->Lang('provide_address'), self::STOP_CRITICAL);
}
// Set whether the message is multipart/alternative
if (!empty($this->AltBody)) {
$this->ContentType = 'multipart/alternative';
}
$this->error_count = 0; // reset errors
$this->SetMessageType();
//Refuse to send an empty message
if (empty($this->Body)) {
throw new phpmailerException($this->Lang('empty_message'), self::STOP_CRITICAL);
}
$this->MIMEHeader = $this->CreateHeader();
$this->MIMEBody = $this->CreateBody();
// To capture the complete message when using mail(), create
// an extra header list which CreateHeader() doesn't fold in
if ($this->Mailer == 'mail') {
if (count($this->to) > 0) {
$this->mailHeader .= $this->AddrAppend("To", $this->to);
} else {
$this->mailHeader .= $this->HeaderLine("To", "undisclosed-recipients:;");
}
$this->mailHeader .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader(trim($this->Subject))));
// if (count($this->cc) > 0) {
// $this->mailHeader .= $this->AddrAppend("Cc", $this->cc);
// }
}
// digitally sign with DKIM if enabled
if (!empty($this->DKIM_domain) && !empty($this->DKIM_private) && !empty($this->DKIM_selector) && !empty($this->DKIM_domain) && file_exists($this->DKIM_private)) {
$header_dkim = $this->DKIM_Add($this->MIMEHeader, $this->EncodeHeader($this->SecureHeader($this->Subject)), $this->MIMEBody);
$this->MIMEHeader = str_replace("\r\n", "\n", $header_dkim) . $this->MIMEHeader;
}
return true;
} catch (phpmailerException $e) {
$this->SetError($e->getMessage());
if ($this->exceptions) {
throw $e;
}
return false;
}
}
/**
* Actual Email transport function
* Send the email via the selected mechanism
* @throws phpmailerException
* @return bool
*/
public function PostSend()
{
try {
// Choose the mailer and send through it
switch ($this->Mailer) {
case 'sendmail':
return $this->SendmailSend($this->MIMEHeader, $this->MIMEBody);
case 'smtp':
return $this->SmtpSend($this->MIMEHeader, $this->MIMEBody);
case 'mail':
return $this->MailSend($this->MIMEHeader, $this->MIMEBody);
default:
return $this->MailSend($this->MIMEHeader, $this->MIMEBody);
}
} catch (phpmailerException $e) {
$this->SetError($e->getMessage());
if ($this->exceptions) {
throw $e;
}
if ($this->SMTPDebug) {
$this->edebug($e->getMessage()."\n");
}
}
return false;
}
/**
* Sends mail using the $Sendmail program.
* @param string $header The message headers
* @param string $body The message body
* @throws phpmailerException
* @access protected
* @return bool
*/
protected function SendmailSend($header, $body)
{
if ($this->Sender != '') {
$sendmail = sprintf("%s -oi -f%s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
} else {
$sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail));
}
if ($this->SingleTo === true) {
foreach ($this->SingleToArray as $val) {
if (!@$mail = popen($sendmail, 'w')) {
throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
}
fputs($mail, "To: " . $val . "\n");
fputs($mail, $header);
fputs($mail, $body);
$result = pclose($mail);
// implement call back function if it exists
$isSent = ($result == 0) ? 1 : 0;
$this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body);
if ($result != 0) {
throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
}
}
} else {
if (!@$mail = popen($sendmail, 'w')) {
throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
}
fputs($mail, $header);
fputs($mail, $body);
$result = pclose($mail);
// implement call back function if it exists
$isSent = ($result == 0) ? 1 : 0;
$this->doCallback($isSent, $this->to, $this->cc, $this->bcc, $this->Subject, $body);
if ($result != 0) {
throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
}
}
return true;
}
/**
* Sends mail using the PHP mail() function.
* @param string $header The message headers
* @param string $body The message body
* @throws phpmailerException
* @access protected
* @return bool
*/
protected function MailSend($header, $body)
{
$toArr = array();
foreach ($this->to as $t) {
$toArr[] = $this->AddrFormat($t);
}
$to = implode(', ', $toArr);
if (empty($this->Sender)) {
$params = "-oi ";
} else {
$params = sprintf("-oi -f%s", $this->Sender);
}
if ($this->Sender != '' and !ini_get('safe_mode')) {
$old_from = ini_get('sendmail_from');
ini_set('sendmail_from', $this->Sender);
}
$rt = false;
if ($this->SingleTo === true && count($toArr) > 1) {
foreach ($toArr as $val) {
$rt = $this->mail_passthru($val, $this->Subject, $body, $header, $params);
// implement call back function if it exists
$isSent = ($rt == 1) ? 1 : 0;
$this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body);
}
} else {
$rt = $this->mail_passthru($to, $this->Subject, $body, $header, $params);
// implement call back function if it exists
$isSent = ($rt == 1) ? 1 : 0;
$this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body);
}
if (isset($old_from)) {
ini_set('sendmail_from', $old_from);
}
if (!$rt) {
throw new phpmailerException($this->Lang('instantiate'), self::STOP_CRITICAL);
}
return true;
}
/**
* Sends mail via SMTP using PhpSMTP
* Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
* @param string $header The message headers
* @param string $body The message body
* @throws phpmailerException
* @uses SMTP
* @access protected
* @return bool
*/
protected function SmtpSend($header, $body)
{
require_once $this->PluginDir . 'class.smtp.php';
$bad_rcpt = array();
if (!$this->SmtpConnect()) {
throw new phpmailerException($this->Lang('smtp_connect_failed'), self::STOP_CRITICAL);
}
$smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;
if (!$this->smtp->Mail($smtp_from)) {
$this->SetError($this->Lang('from_failed') . $smtp_from . " : " . implode(",",$this->smtp->getError())) ;
throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL);
}
// Attempt to send attach all recipients
foreach ($this->to as $to) {
if (!$this->smtp->Recipient($to[0])) {
$bad_rcpt[] = $to[0];
// implement call back function if it exists
$isSent = 0;
$this->doCallback($isSent, $to[0], '', '', $this->Subject, $body);
} else {
// implement call back function if it exists
$isSent = 1;
$this->doCallback($isSent, $to[0], '', '', $this->Subject, $body);
}
}
foreach ($this->cc as $cc) {
if (!$this->smtp->Recipient($cc[0])) {
$bad_rcpt[] = $cc[0];
// implement call back function if it exists
$isSent = 0;
$this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body);
} else {
// implement call back function if it exists
$isSent = 1;
$this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body);
}
}
foreach ($this->bcc as $bcc) {
if (!$this->smtp->Recipient($bcc[0])) {
$bad_rcpt[] = $bcc[0];
// implement call back function if it exists
$isSent = 0;
$this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body);
} else {
// implement call back function if it exists
$isSent = 1;
$this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body);
}
}
if (count($bad_rcpt) > 0 ) { //Create error message for any bad addresses
$badaddresses = implode(', ', $bad_rcpt);
throw new phpmailerException($this->Lang('recipients_failed') . $badaddresses);
}
if (!$this->smtp->Data($header . $body)) {
throw new phpmailerException($this->Lang('data_not_accepted'), self::STOP_CRITICAL);
}
if ($this->SMTPKeepAlive == true) {
$this->smtp->Reset();
} else {
$this->smtp->Quit();
$this->smtp->Close();
}
return true;
}
/**
* Initiates a connection to an SMTP server.
* Returns false if the operation failed.
* @uses SMTP
* @access public
* @throws phpmailerException
* @return bool
*/
public function SmtpConnect()
{
if (is_null($this->smtp)) {
$this->smtp = new SMTP;
}
$this->smtp->Timeout = $this->Timeout;
$this->smtp->do_debug = $this->SMTPDebug;
$hosts = explode(';', $this->Host);
$index = 0;
$connection = $this->smtp->Connected();
// Retry while there is no connection
try {
while ($index < count($hosts) && !$connection) {
$hostinfo = array();
if (preg_match('/^(.+):([0-9]+)$/', $hosts[$index], $hostinfo)) {
$host = $hostinfo[1];
$port = $hostinfo[2];
} else {
$host = $hosts[$index];
$port = $this->Port;
}
$tls = ($this->SMTPSecure == 'tls');
$ssl = ($this->SMTPSecure == 'ssl');
if ($this->smtp->Connect(($ssl ? 'ssl://':'').$host, $port, $this->Timeout)) {
$hello = ($this->Helo != '' ? $this->Helo : $this->ServerHostname());
$this->smtp->Hello($hello);
if ($tls) {
if (!$this->smtp->StartTLS()) {
throw new phpmailerException($this->Lang('connect_host'));
}
//We must resend HELO after tls negotiation
$this->smtp->Hello($hello);
}
$connection = true;
if ($this->SMTPAuth) {
if (!$this->smtp->Authenticate($this->Username, $this->Password, $this->AuthType,
$this->Realm, $this->Workstation)) {
throw new phpmailerException($this->Lang('authenticate'));
}
}
}
$index++;
if (!$connection) {
throw new phpmailerException($this->Lang('connect_host'));
}
}
} catch (phpmailerException $e) {
$this->smtp->Reset();
if ($this->exceptions) {
throw $e;
}
}
return true;
}
/**
* Closes the active SMTP session if one exists.
* @return void
*/
public function SmtpClose()
{
if ($this->smtp !== null) {
if ($this->smtp->Connected()) {
$this->smtp->Quit();
$this->smtp->Close();
}
}
}
/**
* Sets the language for all class error messages.
* Returns false if it cannot load the language file. The default language is English.
* @param string $langcode ISO 639-1 2-character language code (e.g. Portuguese: "br")
* @param string $lang_path Path to the language file directory
* @return bool
* @access public
*/
public function SetLanguage($langcode = 'en', $lang_path = 'language/')
{
//Define full set of translatable strings
$PHPMAILER_LANG = array(
'authenticate' => 'SMTP Error: Could not authenticate.',
'connect_host' => 'SMTP Error: Could not connect to SMTP host.',
'data_not_accepted' => 'SMTP Error: Data not accepted.',
'empty_message' => 'Message body empty',
'encoding' => 'Unknown encoding: ',
'execute' => 'Could not execute: ',
'file_access' => 'Could not access file: ',
'file_open' => 'File Error: Could not open file: ',
'from_failed' => 'The following From address failed: ',
'instantiate' => 'Could not instantiate mail function.',
'invalid_address' => 'Invalid address',
'mailer_not_supported' => ' mailer is not supported.',
'provide_address' => 'You must provide at least one recipient email address.',
'recipients_failed' => 'SMTP Error: The following recipients failed: ',
'signing' => 'Signing Error: ',
'smtp_connect_failed' => 'SMTP Connect() failed.',
'smtp_error' => 'SMTP server error: ',
'variable_set' => 'Cannot set or reset variable: '
);
//Overwrite language-specific strings. This way we'll never have missing translations - no more "language string failed to load"!
$l = true;
if ($langcode != 'en') { //There is no English translation file
$l = @include $lang_path.'phpmailer.lang-'.$langcode.'.php';
}
$this->language = $PHPMAILER_LANG;
return ($l == true); //Returns false if language not found
}
/**
* Return the current array of language strings
* @return array
*/
public function GetTranslations()
{
return $this->language;
}
/////////////////////////////////////////////////
// METHODS, MESSAGE CREATION
/////////////////////////////////////////////////
/**
* Creates recipient headers.
* @access public
* @param string $type
* @param array $addr
* @return string
*/
public function AddrAppend($type, $addr)
{
$addr_str = $type . ': ';
$addresses = array();
foreach ($addr as $a) {
$addresses[] = $this->AddrFormat($a);
}
$addr_str .= implode(', ', $addresses);
$addr_str .= $this->LE;
return $addr_str;
}
/**
* Formats an address correctly.
* @access public
* @param string $addr
* @return string
*/
public function AddrFormat($addr)
{
if (empty($addr[1])) {
return $this->SecureHeader($addr[0]);
} else {
return $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . " <" . $this->SecureHeader($addr[0]) . ">";
}
}
/**
* Wraps message for use with mailers that do not
* automatically perform wrapping and for quoted-printable.
* Original written by philippe.
* @param string $message The message to wrap
* @param integer $length The line length to wrap to
* @param boolean $qp_mode Whether to run in Quoted-Printable mode
* @access public
* @return string
*/
public function WrapText($message, $length, $qp_mode = false)
{
$soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE;
// If utf-8 encoding is used, we will need to make sure we don't
// split multibyte characters when we wrap
$is_utf8 = (strtolower($this->CharSet) == "utf-8");
$lelen = strlen($this->LE);
$crlflen = strlen(self::CRLF);
$message = $this->FixEOL($message);
if (substr($message, -$lelen) == $this->LE) {
$message = substr($message, 0, -$lelen);
}
$line = explode($this->LE, $message); // Magic. We know FixEOL uses $LE
$message = '';
for ($i = 0 ;$i < count($line); $i++) {
$line_part = explode(' ', $line[$i]);
$buf = '';
for ($e = 0; $e $length)) {
$space_left = $length - strlen($buf) - $crlflen;
if ($e != 0) {
if ($space_left > 20) {
$len = $space_left;
if ($is_utf8) {
$len = $this->UTF8CharBoundary($word, $len);
} elseif (substr($word, $len - 1, 1) == "=") {
$len--;
} elseif (substr($word, $len - 2, 1) == "=") {
$len -= 2;
}
$part = substr($word, 0, $len);
$word = substr($word, $len);
$buf .= ' ' . $part;
$message .= $buf . sprintf("=%s", self::CRLF);
} else {
$message .= $buf . $soft_break;
}
$buf = '';
}
while (strlen($word) > 0) {
$len = $length;
if ($is_utf8) {
$len = $this->UTF8CharBoundary($word, $len);
} elseif (substr($word, $len - 1, 1) == "=") {
$len--;
} elseif (substr($word, $len - 2, 1) == "=") {
$len -= 2;
}
$part = substr($word, 0, $len);
$word = substr($word, $len);
if (strlen($word) > 0) {
$message .= $part . sprintf("=%s", self::CRLF);
} else {
$buf = $part;
}
}
} else {
$buf_o = $buf;
$buf .= ($e == 0) ? $word : (' ' . $word);
if (strlen($buf) > $length and $buf_o != '') {
$message .= $buf_o . $soft_break;
$buf = $word;
}
}
}
$message .= $buf . self::CRLF;
}
return $message;
}
/**
* Finds last character boundary prior to maxLength in a utf-8
* quoted (printable) encoded string.
* Original written by Colin Brown.
* @access public
* @param string $encodedText utf-8 QP text
* @param int $maxLength find last character boundary prior to this length
* @return int
*/
public function UTF8CharBoundary($encodedText, $maxLength)
{
$foundSplitPos = false;
$lookBack = 3;
while (!$foundSplitPos) {
$lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack);
$encodedCharPos = strpos($lastChunk, "=");
if ($encodedCharPos !== false) {
// Found start of encoded character byte within $lookBack block.
// Check the encoded byte value (the 2 chars after the '=')
$hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2);
$dec = hexdec($hex);
if ($dec < 128) { // Single byte character.
// If the encoded char was found at pos 0, it will fit
// otherwise reduce maxLength to start of the encoded char
$maxLength = ($encodedCharPos == 0) ? $maxLength :
$maxLength - ($lookBack - $encodedCharPos);
$foundSplitPos = true;
} elseif ($dec >= 192) { // First byte of a multi byte character
// Reduce maxLength to split at start of character
$maxLength = $maxLength - ($lookBack - $encodedCharPos);
$foundSplitPos = true;
} elseif ($dec < 192) { // Middle byte of a multi byte character, look further back
$lookBack += 3;
}
} else {
// No encoded character found
$foundSplitPos = true;
}
}
return $maxLength;
}
/**
* Set the body wrapping.
* @access public
* @return void
*/
public function SetWordWrap()
{
if ($this->WordWrap < 1) {
return;
}
switch ($this->message_type) {
case 'alt':
case 'alt_inline':
case 'alt_attach':
case 'alt_inline_attach':
$this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap);
break;
default:
$this->Body = $this->WrapText($this->Body, $this->WordWrap);
break;
}
}
/**
* Assembles message header.
* @access public
* @return string The assembled header
*/
public function CreateHeader()
{
$result = '';
// Set the boundaries
$uniq_id = md5(uniqid(time()));
$this->boundary[1] = 'b1_' . $uniq_id;
$this->boundary[2] = 'b2_' . $uniq_id;
$this->boundary[3] = 'b3_' . $uniq_id;
if ($this->MessageDate == '') {
$result .= $this->HeaderLine('Date', self::RFCDate());
} else {
$result .= $this->HeaderLine('Date', $this->MessageDate);
}
if ($this->ReturnPath) {
$result .= $this->HeaderLine('Return-Path', trim($this->ReturnPath));
} elseif ($this->Sender == '') {
$result .= $this->HeaderLine('Return-Path', trim($this->From));
} else {
$result .= $this->HeaderLine('Return-Path', trim($this->Sender));
}
// To be created automatically by mail()
if ($this->Mailer != 'mail') {
if ($this->SingleTo === true) {
foreach ($this->to as $t) {
$this->SingleToArray[] = $this->AddrFormat($t);
}
} else {
if (count($this->to) > 0) {
$result .= $this->AddrAppend('To', $this->to);
} elseif (count($this->cc) == 0) {
$result .= $this->HeaderLine('To', 'undisclosed-recipients:;');
}
}
}
$from = array();
$from[0][0] = trim($this->From);
$from[0][1] = $this->FromName;
$result .= $this->AddrAppend('From', $from);
// sendmail and mail() extract Cc from the header before sending
if (count($this->cc) > 0) {
$result .= $this->AddrAppend('Cc', $this->cc);
}
// sendmail and mail() extract Bcc from the header before sending
if ((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->bcc) > 0)) {
$result .= $this->AddrAppend('Bcc', $this->bcc);
}
if (count($this->ReplyTo) > 0) {
$result .= $this->AddrAppend('Reply-To', $this->ReplyTo);
}
// mail() sets the subject itself
if ($this->Mailer != 'mail') {
$result .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject)));
}
if ($this->MessageID != '') {
$result .= $this->HeaderLine('Message-ID', $this->MessageID);
} else {
$result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE);
}
$result .= $this->HeaderLine('X-Priority', $this->Priority);
if ($this->XMailer == '') {
$result .= $this->HeaderLine('X-Mailer', 'PHPMailer '.$this->Version.' (http://code.google.com/a/apache-extras.org/p/phpmailer/)');
} else {
$myXmailer = trim($this->XMailer);
if ($myXmailer) {
$result .= $this->HeaderLine('X-Mailer', $myXmailer);
}
}
if ($this->ConfirmReadingTo != '') {
$result .= $this->HeaderLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>');
}
// Add custom headers
for ($index = 0; $index < count($this->CustomHeader); $index++) {
$result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1])));
}
if (!$this->sign_key_file) {
$result .= $this->HeaderLine('MIME-Version', '1.0');
$result .= $this->GetMailMIME();
}
return $result;
}
/**
* Returns the message MIME.
* @access public
* @return string
*/
public function GetMailMIME()
{
$result = '';
switch ($this->message_type) {
case 'inline':
$result .= $this->HeaderLine('Content-Type', 'multipart/related;');
$result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
break;
case 'attach':
case 'inline_attach':
case 'alt_attach':
case 'alt_inline_attach':
$result .= $this->HeaderLine('Content-Type', 'multipart/mixed;');
$result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
break;
case 'alt':
case 'alt_inline':
$result .= $this->HeaderLine('Content-Type', 'multipart/alternative;');
$result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
break;
default:
// Catches case 'plain': and case '':
$result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding);
$result .= $this->TextLine('Content-Type: '.$this->ContentType.'; charset='.$this->CharSet);
break;
}
if ($this->Mailer != 'mail') {
$result .= $this->LE;
}
return $result;
}
/**
* Returns the MIME message (headers and body). Only really valid post PreSend().
* @access public
* @return string
*/
public function GetSentMIMEMessage()
{
return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody;
}
/**
* Assembles the message body. Returns an empty string on failure.
* @access public
* @throws phpmailerException
* @return string The assembled message body
*/
public function CreateBody()
{
$body = '';
if ($this->sign_key_file) {
$body .= $this->GetMailMIME().$this->LE;
}
$this->SetWordWrap();
switch ($this->message_type) {
case 'inline':
$body .= $this->GetBoundary($this->boundary[1], '', '', '');
$body .= $this->EncodeString($this->Body, $this->Encoding);
$body .= $this->LE.$this->LE;
$body .= $this->AttachAll("inline", $this->boundary[1]);
break;
case 'attach':
$body .= $this->GetBoundary($this->boundary[1], '', '', '');
$body .= $this->EncodeString($this->Body, $this->Encoding);
$body .= $this->LE.$this->LE;
$body .= $this->AttachAll("attachment", $this->boundary[1]);
break;
case 'inline_attach':
$body .= $this->TextLine("--" . $this->boundary[1]);
$body .= $this->HeaderLine('Content-Type', 'multipart/related;');
$body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"');
$body .= $this->LE;
$body .= $this->GetBoundary($this->boundary[2], '', '', '');
$body .= $this->EncodeString($this->Body, $this->Encoding);
$body .= $this->LE.$this->LE;
$body .= $this->AttachAll("inline", $this->boundary[2]);
$body .= $this->LE;
$body .= $this->AttachAll("attachment", $this->boundary[1]);
break;
case 'alt':
$body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', '');
$body .= $this->EncodeString($this->AltBody, $this->Encoding);
$body .= $this->LE.$this->LE;
$body .= $this->GetBoundary($this->boundary[1], '', 'text/html', '');
$body .= $this->EncodeString($this->Body, $this->Encoding);
$body .= $this->LE.$this->LE;
$body .= $this->EndBoundary($this->boundary[1]);
break;
case 'alt_inline':
$body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', '');
$body .= $this->EncodeString($this->AltBody, $this->Encoding);
$body .= $this->LE.$this->LE;
$body .= $this->TextLine("--" . $this->boundary[1]);
$body .= $this->HeaderLine('Content-Type', 'multipart/related;');
$body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"');
$body .= $this->LE;
$body .= $this->GetBoundary($this->boundary[2], '', 'text/html', '');
$body .= $this->EncodeString($this->Body, $this->Encoding);
$body .= $this->LE.$this->LE;
$body .= $this->AttachAll("inline", $this->boundary[2]);
$body .= $this->LE;
$body .= $this->EndBoundary($this->boundary[1]);
break;
case 'alt_attach':
$body .= $this->TextLine("--" . $this->boundary[1]);
$body .= $this->HeaderLine('Content-Type', 'multipart/alternative;');
$body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"');
$body .= $this->LE;
$body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', '');
$body .= $this->EncodeString($this->AltBody, $this->Encoding);
$body .= $this->LE.$this->LE;
$body .= $this->GetBoundary($this->boundary[2], '', 'text/html', '');
$body .= $this->EncodeString($this->Body, $this->Encoding);
$body .= $this->LE.$this->LE;
$body .= $this->EndBoundary($this->boundary[2]);
$body .= $this->LE;
$body .= $this->AttachAll("attachment", $this->boundary[1]);
break;
case 'alt_inline_attach':
$body .= $this->TextLine("--" . $this->boundary[1]);
$body .= $this->HeaderLine('Content-Type', 'multipart/alternative;');
$body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"');
$body .= $this->LE;
$body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', '');
$body .= $this->EncodeString($this->AltBody, $this->Encoding);
$body .= $this->LE.$this->LE;
$body .= $this->TextLine("--" . $this->boundary[2]);
$body .= $this->HeaderLine('Content-Type', 'multipart/related;');
$body .= $this->TextLine("\tboundary=\"" . $this->boundary[3] . '"');
$body .= $this->LE;
$body .= $this->GetBoundary($this->boundary[3], '', 'text/html', '');
$body .= $this->EncodeString($this->Body, $this->Encoding);
$body .= $this->LE.$this->LE;
$body .= $this->AttachAll("inline", $this->boundary[3]);
$body .= $this->LE;
$body .= $this->EndBoundary($this->boundary[2]);
$body .= $this->LE;
$body .= $this->AttachAll("attachment", $this->boundary[1]);
break;
default:
// catch case 'plain' and case ''
$body .= $this->EncodeString($this->Body, $this->Encoding);
break;
}
if ($this->IsError()) {
$body = '';
} elseif ($this->sign_key_file) {
try {
$file = tempnam('', 'mail');
file_put_contents($file, $body); //TODO check this worked
$signed = tempnam("", "signed");
if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file, array("file://".$this->sign_key_file, $this->sign_key_pass), NULL)) {
@unlink($file);
$body = file_get_contents($signed);
@unlink($signed);
} else {
@unlink($file);
@unlink($signed);
throw new phpmailerException($this->Lang("signing").openssl_error_string());
}
} catch (phpmailerException $e) {
$body = '';
if ($this->exceptions) {
throw $e;
}
}
}
return $body;
}
/**
* Returns the start of a message boundary.
* @access protected
* @param string $boundary
* @param string $charSet
* @param string $contentType
* @param string $encoding
* @return string
*/
protected function GetBoundary($boundary, $charSet, $contentType, $encoding)
{
$result = '';
if ($charSet == '') {
$charSet = $this->CharSet;
}
if ($contentType == '') {
$contentType = $this->ContentType;
}
if ($encoding == '') {
$encoding = $this->Encoding;
}
$result .= $this->TextLine('--' . $boundary);
$result .= sprintf("Content-Type: %s; charset=%s", $contentType, $charSet);
$result .= $this->LE;
$result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding);
$result .= $this->LE;
return $result;
}
/**
* Returns the end of a message boundary.
* @access protected
* @param string $boundary
* @return string
*/
protected function EndBoundary($boundary)
{
return $this->LE . '--' . $boundary . '--' . $this->LE;
}
/**
* Sets the message type.
* @access protected
* @return void
*/
protected function SetMessageType()
{
$this->message_type = array();
if($this->AlternativeExists()) $this->message_type[] = "alt";
if($this->InlineImageExists()) $this->message_type[] = "inline";
if($this->AttachmentExists()) $this->message_type[] = "attach";
$this->message_type = implode("_", $this->message_type);
if($this->message_type == "") $this->message_type = "plain";
}
/**
* Returns a formatted header line.
* @access public
* @param string $name
* @param string $value
* @return string
*/
public function HeaderLine($name, $value)
{
return $name . ': ' . $value . $this->LE;
}
/**
* Returns a formatted mail line.
* @access public
* @param string $value
* @return string
*/
public function TextLine($value)
{
return $value . $this->LE;
}
/////////////////////////////////////////////////
// CLASS METHODS, ATTACHMENTS
/////////////////////////////////////////////////
/**
* Adds an attachment from a path on the filesystem.
* Returns false if the file could not be found
* or accessed.
* @param string $path Path to the attachment.
* @param string $name Overrides the attachment name.
* @param string $encoding File encoding (see $Encoding).
* @param string $type File extension (MIME) type.
* @throws phpmailerException
* @return bool
*/
public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream')
{
try {
if ( !@is_file($path) ) {
throw new phpmailerException($this->Lang('file_access') . $path, self::STOP_CONTINUE);
}
$filename = basename($path);
if ($name == '') {
$name = $filename;
}
$this->attachment[] = array(
0 => $path,
1 => $filename,
2 => $name,
3 => $encoding,
4 => $type,
5 => false, // isStringAttachment
6 => 'attachment',
7 => 0
);
} catch (phpmailerException $e) {
$this->SetError($e->getMessage());
if ($this->exceptions) {
throw $e;
}
if ($this->SMTPDebug) {
$this->edebug($e->getMessage()."\n");
}
if ( $e->getCode() == self::STOP_CRITICAL ) {
return false;
}
}
return true;
}
/**
* Return the current array of attachments
* @return array
*/
public function GetAttachments()
{
return $this->attachment;
}
/**
* Attaches all fs, string, and binary attachments to the message.
* Returns an empty string on failure.
* @access protected
* @param string $disposition_type
* @param string $boundary
* @return string
*/
protected function AttachAll($disposition_type, $boundary)
{
// Return text of body
$mime = array();
$cidUniq = array();
$incl = array();
// Add all attachments
foreach ($this->attachment as $attachment) {
// CHECK IF IT IS A VALID DISPOSITION_FILTER
if ($attachment[6] == $disposition_type) {
// Check for string attachment
$string = '';
$path = '';
$bString = $attachment[5];
if ($bString) {
$string = $attachment[0];
} else {
$path = $attachment[0];
}
$inclhash = md5(serialize($attachment));
if (in_array($inclhash, $incl)) { continue; }
$incl[] = $inclhash;
$filename = $attachment[1];
$name = $attachment[2];
$encoding = $attachment[3];
$type = $attachment[4];
$disposition = $attachment[6];
$cid = $attachment[7];
if ( $disposition == 'inline' && isset($cidUniq[$cid]) ) { continue; }
$cidUniq[$cid] = true;
$mime[] = sprintf("--%s%s", $boundary, $this->LE);
$mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE);
$mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE);
if ($disposition == 'inline') {
$mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE);
}
$mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE);
// Encode as string attachment
if ($bString) {
$mime[] = $this->EncodeString($string, $encoding);
if ($this->IsError()) {
return '';
}
$mime[] = $this->LE.$this->LE;
} else {
$mime[] = $this->EncodeFile($path, $encoding);
if ($this->IsError()) {
return '';
}
$mime[] = $this->LE.$this->LE;
}
}
}
$mime[] = sprintf("--%s--%s", $boundary, $this->LE);
return implode("", $mime);
}
/**
* Encodes attachment in requested format.
* Returns an empty string on failure.
* @param string $path The full path to the file
* @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
* @throws phpmailerException
* @see EncodeFile()
* @access protected
* @return string
*/
protected function EncodeFile($path, $encoding = 'base64')
{
try {
if (!is_readable($path)) {
throw new phpmailerException($this->Lang('file_open') . $path, self::STOP_CONTINUE);
}
// if (!function_exists('get_magic_quotes')) {
// function get_magic_quotes() {
// return false;
// }
// }
$magic_quotes = get_magic_quotes_runtime();
if ($magic_quotes) {
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
set_magic_quotes_runtime(0);
} else {
ini_set('magic_quotes_runtime', 0);
}
}
$file_buffer = file_get_contents($path);
$file_buffer = $this->EncodeString($file_buffer, $encoding);
if ($magic_quotes) {
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
set_magic_quotes_runtime($magic_quotes);
} else {
ini_set('magic_quotes_runtime', $magic_quotes);
}
}
return $file_buffer;
} catch (Exception $e) {
$this->SetError($e->getMessage());
return '';
}
}
/**
* Encodes string to requested format.
* Returns an empty string on failure.
* @param string $str The text to encode
* @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
* @access public
* @return string
*/
public function EncodeString($str, $encoding = 'base64')
{
$encoded = '';
switch (strtolower($encoding)) {
case 'base64':
$encoded = chunk_split(base64_encode($str), 76, $this->LE);
break;
case '7bit':
case '8bit':
$encoded = $this->FixEOL($str);
//Make sure it ends with a line break
if (substr($encoded, -(strlen($this->LE))) != $this->LE)
$encoded .= $this->LE;
break;
case 'binary':
$encoded = $str;
break;
case 'quoted-printable':
$encoded = $this->EncodeQP($str);
break;
default:
$this->SetError($this->Lang('encoding') . $encoding);
break;
}
return $encoded;
}
/**
* Encode a header string to best (shortest) of Q, B, quoted or none.
* @access public
* @param string $str
* @param string $position
* @return string
*/
public function EncodeHeader($str, $position = 'text')
{
$x = 0;
switch (strtolower($position)) {
case 'phrase':
if (!preg_match('/[\200-\377]/', $str)) {
// Can't use addslashes as we don't know what value has magic_quotes_sybase
$encoded = addcslashes($str, "\0..\37\177\\\"");
if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) {
return ($encoded);
} else {
return ("\"$encoded\"");
}
}
$x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches);
break;
case 'comment':
$x = preg_match_all('/[()"]/', $str, $matches);
// Fall-through
case 'text':
default:
$x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches);
break;
}
if ($x == 0) {
return ($str);
}
$maxlen = 75 - 7 - strlen($this->CharSet);
// Try to select the encoding which should produce the shortest output
if (strlen($str)/3 < $x) {
$encoding = 'B';
if (function_exists('mb_strlen') && $this->HasMultiBytes($str)) {
// Use a custom function which correctly encodes and wraps long
// multibyte strings without breaking lines within a character
$encoded = $this->Base64EncodeWrapMB($str, "\n");
} else {
$encoded = base64_encode($str);
$maxlen -= $maxlen % 4;
$encoded = trim(chunk_split($encoded, $maxlen, "\n"));
}
} else {
$encoding = 'Q';
$encoded = $this->EncodeQ($str, $position);
$encoded = $this->WrapText($encoded, $maxlen, true);
$encoded = str_replace('='.self::CRLF, "\n", trim($encoded));
}
$encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded);
$encoded = trim(str_replace("\n", $this->LE, $encoded));
return $encoded;
}
/**
* Checks if a string contains multibyte characters.
* @access public
* @param string $str multi-byte text to wrap encode
* @return bool
*/
public function HasMultiBytes($str)
{
if (function_exists('mb_strlen')) {
return (strlen($str) > mb_strlen($str, $this->CharSet));
} else { // Assume no multibytes (we can't handle without mbstring functions anyway)
return false;
}
}
/**
* Correctly encodes and wraps long multibyte strings for mail headers
* without breaking lines within a character.
* Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php
* @access public
* @param string $str multi-byte text to wrap encode
* @param string $lf string to use as linefeed/end-of-line
* @return string
*/
public function Base64EncodeWrapMB($str, $lf=null)
{
$start = "=?".$this->CharSet."?B?";
$end = "?=";
$encoded = "";
if ($lf === null) {
$lf = $this->LE;
}
$mb_length = mb_strlen($str, $this->CharSet);
// Each line must have length <= 75, including $start and $end
$length = 75 - strlen($start) - strlen($end);
// Average multi-byte ratio
$ratio = $mb_length / strlen($str);
// Base64 has a 4:3 ratio
$offset = $avgLength = floor($length * $ratio * .75);
for ($i = 0; $i < $mb_length; $i += $offset) {
$lookBack = 0;
do {
$offset = $avgLength - $lookBack;
$chunk = mb_substr($str, $i, $offset, $this->CharSet);
$chunk = base64_encode($chunk);
$lookBack++;
} while (strlen($chunk) > $length);
$encoded .= $chunk . $lf;
}
// Chomp the last linefeed
$encoded = substr($encoded, 0, -strlen($lf));
return $encoded;
}
/**
* Encode string to quoted-printable.
* Only uses standard PHP, slow, but will always work
* @access public
* @param string $input
* @param integer $line_max Number of chars allowed on a line before wrapping
* @param bool $space_conv
* @internal param string $string the text to encode
* @return string
*/
public function EncodeQPphp( $input = '', $line_max = 76, $space_conv = false)
{
$hex = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
$lines = preg_split('/(?:\r\n|\r|\n)/', $input);
$eol = "\r\n";
$escape = '=';
$output = '';
while ( list(, $line) = each($lines) ) {
$linlen = strlen($line);
$newline = '';
for ($i = 0; $i < $linlen; $i++) {
$c = substr( $line, $i, 1 );
$dec = ord( $c );
if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E
$c = '=2E';
}
if ($dec == 32) {
if ( $i == ( $linlen - 1 ) ) { // convert space at eol only
$c = '=20';
} elseif ($space_conv) {
$c = '=20';
}
} elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required
$h2 = (integer) floor($dec/16);
$h1 = (integer) floor($dec%16);
$c = $escape.$hex[$h2].$hex[$h1];
}
if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted
$output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay
$newline = '';
// check if newline first character will be point or not
if ($dec == 46) {
$c = '=2E';
}
}
$newline .= $c;
} // end of for
$output .= $newline.$eol;
} // end of while
return $output;
}
/**
* Encode string to RFC2045 (6.7) quoted-printable format
* Uses a PHP5 stream filter to do the encoding about 64x faster than the old version
* Also results in same content as you started with after decoding
* @see EncodeQPphp()
* @access public
* @param string $string the text to encode
* @param integer $line_max Number of chars allowed on a line before wrapping
* @param boolean $space_conv Dummy param for compatibility with existing EncodeQP function
* @return string
* @author Marcus Bointon
*/
public function EncodeQP($string, $line_max = 76, $space_conv = false)
{
if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3)
return quoted_printable_encode($string);
}
$filters = stream_get_filters();
if (!in_array('convert.*', $filters)) { //Got convert stream filter?
return $this->EncodeQPphp($string, $line_max, $space_conv); //Fall back to old implementation
}
$fp = fopen('php://temp/', 'r+');
$string = preg_replace('/\r\n?/', $this->LE, $string); //Normalise line breaks
$params = array('line-length' => $line_max, 'line-break-chars' => $this->LE);
$s = stream_filter_append($fp, 'convert.quoted-printable-encode', STREAM_FILTER_READ, $params);
fputs($fp, $string);
rewind($fp);
$out = stream_get_contents($fp);
stream_filter_remove($s);
$out = preg_replace('/^\./m', '=2E', $out); //Encode . if it is first char on a line, workaround for bug in Exchange
fclose($fp);
return $out;
}
/**
* Encode string to q encoding.
* @link http://tools.ietf.org/html/rfc2047
* @param string $str the text to encode
* @param string $position Where the text is going to be used, see the RFC for what that means
* @access public
* @return string
*/
public function EncodeQ($str, $position = 'text')
{
//There should not be any EOL in the string
$pattern="";
$encoded = str_replace(array("\r", "\n"), '', $str);
switch (strtolower($position)) {
case 'phrase':
$pattern = '^A-Za-z0-9!*+\/ -';
break;
case 'comment':
$pattern = '\(\)"';
//note that we dont break here!
//for this reason we build the $pattern withoud including delimiters and []
case 'text':
default:
//Replace every high ascii, control =, ? and _ characters
//We put \075 (=) as first value to make sure it's the first one in being converted, preventing double encode
$pattern = '\075\000-\011\013\014\016-\037\077\137\177-\377' . $pattern;
break;
}
if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) {
foreach (array_unique($matches[0]) as $char) {
$encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded);
}
}
//Replace every spaces to _ (more readable than =20)
return str_replace(' ', '_', $encoded);
}
/**
* Adds a string or binary attachment (non-filesystem) to the list.
* This method can be used to attach ascii or binary data,
* such as a BLOB record from a database.
* @param string $string String attachment data.
* @param string $filename Name of the attachment.
* @param string $encoding File encoding (see $Encoding).
* @param string $type File extension (MIME) type.
* @return void
*/
public function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream')
{
// Append to $attachment array
$this->attachment[] = array(
0 => $string,
1 => $filename,
2 => basename($filename),
3 => $encoding,
4 => $type,
5 => true, // isStringAttachment
6 => 'attachment',
7 => 0
);
}
/**
* Adds an embedded attachment. This can include images, sounds, and
* just about any other document. Make sure to set the $type to an
* image type. For JPEG images use "image/jpeg" and for GIF images
* use "image/gif".
* @param string $path Path to the attachment.
* @param string $cid Content ID of the attachment. Use this to identify
* the Id for accessing the image in an HTML form.
* @param string $name Overrides the attachment name.
* @param string $encoding File encoding (see $Encoding).
* @param string $type File extension (MIME) type.
* @return bool
*/
public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream')
{
if ( !@is_file($path) ) {
$this->SetError($this->Lang('file_access') . $path);
return false;
}
$filename = basename($path);
if ($name == '') {
$name = $filename;
}
// Append to $attachment array
$this->attachment[] = array(
0 => $path,
1 => $filename,
2 => $name,
3 => $encoding,
4 => $type,
5 => false, // isStringAttachment
6 => 'inline',
7 => $cid
);
return true;
}
/**
* Adds an embedded stringified attachment. This can include images, sounds, and
* just about any other document. Make sure to set the $type to an
* image type. For JPEG images use "image/jpeg" and for GIF images
* use "image/gif".
* @param string $string The attachment.
* @param string $cid Content ID of the attachment. Use this to identify
* the Id for accessing the image in an HTML form.
* @param string $name Overrides the attachment name.
* @param string $encoding File encoding (see $Encoding).
* @param string $type File extension (MIME) type.
* @return bool
*/
public function AddStringEmbeddedImage($string, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream')
{
// Append to $attachment array
$this->attachment[] = array(
0 => $string,
1 => $name,
2 => $name,
3 => $encoding,
4 => $type,
5 => true, // isStringAttachment
6 => 'inline',
7 => $cid
);
}
/**
* Returns true if an inline attachment is present.
* @access public
* @return bool
*/
public function InlineImageExists()
{
foreach ($this->attachment as $attachment) {
if ($attachment[6] == 'inline') {
return true;
}
}
return false;
}
/**
* Returns true if an attachment (non-inline) is present.
* @return bool
*/
public function AttachmentExists()
{
foreach ($this->attachment as $attachment) {
if ($attachment[6] == 'attachment') {
return true;
}
}
return false;
}
/**
* Does this message have an alternative body set?
* @return bool
*/
public function AlternativeExists()
{
return !empty($this->AltBody);
}
/////////////////////////////////////////////////
// CLASS METHODS, MESSAGE RESET
/////////////////////////////////////////////////
/**
* Clears all recipients assigned in the TO array. Returns void.
* @return void
*/
public function ClearAddresses()
{
foreach ($this->to as $to) {
unset($this->all_recipients[strtolower($to[0])]);
}
$this->to = array();
}
/**
* Clears all recipients assigned in the CC array. Returns void.
* @return void
*/
public function ClearCCs()
{
foreach ($this->cc as $cc) {
unset($this->all_recipients[strtolower($cc[0])]);
}
$this->cc = array();
}
/**
* Clears all recipients assigned in the BCC array. Returns void.
* @return void
*/
public function ClearBCCs()
{
foreach ($this->bcc as $bcc) {
unset($this->all_recipients[strtolower($bcc[0])]);
}
$this->bcc = array();
}
/**
* Clears all recipients assigned in the ReplyTo array. Returns void.
* @return void
*/
public function ClearReplyTos()
{
$this->ReplyTo = array();
}
/**
* Clears all recipients assigned in the TO, CC and BCC
* array. Returns void.
* @return void
*/
public function ClearAllRecipients()
{
$this->to = array();
$this->cc = array();
$this->bcc = array();
$this->all_recipients = array();
}
/**
* Clears all previously set filesystem, string, and binary
* attachments. Returns void.
* @return void
*/
public function ClearAttachments()
{
$this->attachment = array();
}
/**
* Clears all custom headers. Returns void.
* @return void
*/
public function ClearCustomHeaders()
{
$this->CustomHeader = array();
}
/////////////////////////////////////////////////
// CLASS METHODS, MISCELLANEOUS
/////////////////////////////////////////////////
/**
* Adds the error message to the error container.
* @access protected
* @param string $msg
* @return void
*/
protected function SetError($msg)
{
$this->error_count++;
if ($this->Mailer == 'smtp' and !is_null($this->smtp)) {
$lasterror = $this->smtp->getError();
if (!empty($lasterror) and array_key_exists('smtp_msg', $lasterror)) {
$msg .= '' . $this->Lang('smtp_error') . $lasterror['smtp_msg'] . "
\n";
}
}
$this->ErrorInfo = $msg;
}
/**
* Returns the proper RFC 822 formatted date.
* @access public
* @return string
* @static
*/
public static function RFCDate()
{
$tz = date('Z');
$tzs = ($tz < 0) ? '-' : '+';
$tz = abs($tz);
$tz = (int) ($tz/3600)*100 + ($tz%3600)/60;
$result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz);
return $result;
}
/**
* Returns the server hostname or 'localhost.localdomain' if unknown.
* @access protected
* @return string
*/
protected function ServerHostname()
{
if (!empty($this->Hostname)) {
$result = $this->Hostname;
} elseif (isset($_SERVER['SERVER_NAME'])) {
$result = $_SERVER['SERVER_NAME'];
} else {
$result = 'localhost.localdomain';
}
return $result;
}
/**
* Returns a message in the appropriate language.
* @access protected
* @param string $key
* @return string
*/
protected function Lang($key)
{
if (count($this->language) < 1) {
$this->SetLanguage('en'); // set the default language
}
if (isset($this->language[$key])) {
return $this->language[$key];
} else {
return 'Language string failed to load: ' . $key;
}
}
/**
* Returns true if an error occurred.
* @access public
* @return bool
*/
public function IsError()
{
return ($this->error_count > 0);
}
/**
* Changes every end of line from CRLF, CR or LF to $this->LE.
* @access public
* @param string $str String to FixEOL
* @return string
*/
public function FixEOL($str)
{
// condense down to \n
$nstr = str_replace(array("\r\n", "\r"), "\n", $str);
// Now convert LE as needed
if ($this->LE !== "\n") {
$nstr = str_replace("\n", $this->LE, $nstr);
}
return $nstr;
}
/**
* Adds a custom header. $name value can be overloaded to contain
* both header name and value (name:value)
* @access public
* @param string $name custom header name
* @param string $value header value
* @return void
*/
public function AddCustomHeader($name, $value=null)
{
if ($value === null) {
// Value passed in as name:value
$this->CustomHeader[] = explode(':', $name, 2);
} else {
$this->CustomHeader[] = array($name, $value);
}
}
/**
* Evaluates the message and returns modifications for inline images and backgrounds
* @access public
* @param string $message Text to be HTML modified
* @param string $basedir baseline directory for path
* @return string $message
*/
public function MsgHTML($message, $basedir = '')
{
preg_match_all("/(src|background)=[\"'](.*)[\"']/Ui", $message, $images);
if (isset($images[2])) {
foreach ($images[2] as $i => $url) {
// do not change urls for absolute images (thanks to corvuscorax)
if (!preg_match('#^[A-z]+://#', $url)) {
$filename = basename($url);
$directory = dirname($url);
if ($directory == '.') {
$directory = '';
}
$cid = 'cid:' . md5($url);
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$mimeType = self::_mime_types($ext);
if ( strlen($basedir) > 1 && substr($basedir, -1) != '/') { $basedir .= '/'; }
if ( strlen($directory) > 1 && substr($directory, -1) != '/') { $directory .= '/'; }
if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($url), $filename, 'base64', $mimeType) ) {
$message = preg_replace("/".$images[1][$i]."=[\"']".preg_quote($url, '/')."[\"']/Ui", $images[1][$i]."=\"".$cid."\"", $message);
}
}
}
}
$this->IsHTML(true);
$this->Body = $message;
if (empty($this->AltBody)) {
$textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s', '', $message)));
if (!empty($textMsg)) {
$this->AltBody = html_entity_decode($textMsg, ENT_QUOTES, $this->CharSet);
}
}
if (empty($this->AltBody)) {
$this->AltBody = 'To view this email message, open it in a program that understands HTML!' . "\n\n";
}
return $message;
}
/**
* Gets the MIME type of the embedded or inline image
* @param string $ext File extension
* @access public
* @return string MIME type of ext
* @static
*/
public static function _mime_types($ext = '')
{
$mimes = array(
'xl' => 'application/excel',
'hqx' => 'application/mac-binhex40',
'cpt' => 'application/mac-compactpro',
'bin' => 'application/macbinary',
'doc' => 'application/msword',
'word' => 'application/msword',
'class' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'dms' => 'application/octet-stream',
'exe' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'psd' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'so' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => 'application/pdf',
'ai' => 'application/postscript',
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => 'application/vnd.ms-excel',
'ppt' => 'application/vnd.ms-powerpoint',
'wbxml' => 'application/vnd.wap.wbxml',
'wmlc' => 'application/vnd.wap.wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'php3' => 'application/x-httpd-php',
'php4' => 'application/x-httpd-php',
'php' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => 'application/x-javascript',
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => 'application/x-tar',
'xht' => 'application/xhtml+xml',
'xhtml' => 'application/xhtml+xml',
'zip' => 'application/zip',
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mp2' => 'audio/mpeg',
'mp3' => 'audio/mpeg',
'mpga' => 'audio/mpeg',
'aif' => 'audio/x-aiff',
'aifc' => 'audio/x-aiff',
'aiff' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'wav' => 'audio/x-wav',
'bmp' => 'image/bmp',
'gif' => 'image/gif',
'jpeg' => 'image/jpeg',
'jpe' => 'image/jpeg',
'jpg' => 'image/jpeg',
'png' => 'image/png',
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'eml' => 'message/rfc822',
'css' => 'text/css',
'html' => 'text/html',
'htm' => 'text/html',
'shtml' => 'text/html',
'log' => 'text/plain',
'text' => 'text/plain',
'txt' => 'text/plain',
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => 'text/xml',
'xsl' => 'text/xml',
'mpeg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mov' => 'video/quicktime',
'qt' => 'video/quicktime',
'rv' => 'video/vnd.rn-realvideo',
'avi' => 'video/x-msvideo',
'movie' => 'video/x-sgi-movie'
);
return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];
}
/**
* Set (or reset) Class Objects (variables)
*
* Usage Example:
* $page->set('X-Priority', '3');
*
* @access public
* @param string $name Parameter Name
* @param mixed $value Parameter Value
* NOTE: will not work with arrays, there are no arrays to set/reset
* @throws phpmailerException
* @return bool
* @todo Should this not be using __set() magic function?
*/
public function set($name, $value = '')
{
try {
if (isset($this->$name) ) {
$this->$name = $value;
} else {
throw new phpmailerException($this->Lang('variable_set') . $name, self::STOP_CRITICAL);
}
} catch (Exception $e) {
$this->SetError($e->getMessage());
if ($e->getCode() == self::STOP_CRITICAL) {
return false;
}
}
return true;
}
/**
* Strips newlines to prevent header injection.
* @access public
* @param string $str String
* @return string
*/
public function SecureHeader($str)
{
return trim(str_replace(array("\r", "\n"), '', $str));
}
/**
* Set the private key file and password to sign the message.
*
* @access public
* @param $cert_filename
* @param string $key_filename Parameter File Name
* @param string $key_pass Password for private key
*/
public function Sign($cert_filename, $key_filename, $key_pass)
{
$this->sign_cert_file = $cert_filename;
$this->sign_key_file = $key_filename;
$this->sign_key_pass = $key_pass;
}
/**
* Set the private key file and password to sign the message.
*
* @access public
* @param string $txt
* @return string
*/
public function DKIM_QP($txt)
{
$line = '';
for ($i = 0; $i < strlen($txt); $i++) {
$ord = ord($txt[$i]);
if ( ((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E)) ) {
$line .= $txt[$i];
} else {
$line .= "=".sprintf("%02X", $ord);
}
}
return $line;
}
/**
* Generate DKIM signature
*
* @access public
* @param string $s Header
* @return string
*/
public function DKIM_Sign($s)
{
$privKeyStr = file_get_contents($this->DKIM_private);
if ($this->DKIM_passphrase != '') {
$privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
} else {
$privKey = $privKeyStr;
}
if (openssl_sign($s, $signature, $privKey)) {
return base64_encode($signature);
}
return '';
}
/**
* Generate DKIM Canonicalization Header
*
* @access public
* @param string $s Header
* @return string
*/
public function DKIM_HeaderC($s)
{
$s = preg_replace("/\r\n\s+/", " ", $s);
$lines = explode("\r\n", $s);
foreach ($lines as $key => $line) {
list($heading, $value) = explode(":", $line, 2);
$heading = strtolower($heading);
$value = preg_replace("/\s+/", " ", $value) ; // Compress useless spaces
$lines[$key] = $heading.":".trim($value) ; // Don't forget to remove WSP around the value
}
$s = implode("\r\n", $lines);
return $s;
}
/**
* Generate DKIM Canonicalization Body
*
* @access public
* @param string $body Message Body
* @return string
*/
public function DKIM_BodyC($body)
{
if ($body == '') return "\r\n";
// stabilize line endings
$body = str_replace("\r\n", "\n", $body);
$body = str_replace("\n", "\r\n", $body);
// END stabilize line endings
while (substr($body, strlen($body) - 4, 4) == "\r\n\r\n") {
$body = substr($body, 0, strlen($body) - 2);
}
return $body;
}
/**
* Create the DKIM header, body, as new header
*
* @access public
* @param string $headers_line Header lines
* @param string $subject Subject
* @param string $body Body
* @return string
*/
public function DKIM_Add($headers_line, $subject, $body)
{
$DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms
$DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body
$DKIMquery = 'dns/txt'; // Query method
$DKIMtime = time() ; // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone)
$subject_header = "Subject: $subject";
$headers = explode($this->LE, $headers_line);
$from_header = "";
$to_header = "";
foreach ($headers as $header) {
if (strpos($header, 'From:') === 0) {
$from_header = $header;
} elseif (strpos($header, 'To:') === 0) {
$to_header = $header;
}
}
$from = str_replace('|', '=7C', $this->DKIM_QP($from_header));
$to = str_replace('|', '=7C', $this->DKIM_QP($to_header));
$subject = str_replace('|', '=7C', $this->DKIM_QP($subject_header)) ; // Copied header fields (dkim-quoted-printable
$body = $this->DKIM_BodyC($body);
$DKIMlen = strlen($body) ; // Length of body
$DKIMb64 = base64_encode(pack("H*", sha1($body))) ; // Base64 of packed binary SHA-1 hash of body
$ident = ($this->DKIM_identity == '')? '' : " i=" . $this->DKIM_identity . ";";
$dkimhdrs = "DKIM-Signature: v=1; a=" . $DKIMsignatureType . "; q=" . $DKIMquery . "; l=" . $DKIMlen . "; s=" . $this->DKIM_selector . ";\r\n".
"\tt=" . $DKIMtime . "; c=" . $DKIMcanonicalization . ";\r\n".
"\th=From:To:Subject;\r\n".
"\td=" . $this->DKIM_domain . ";" . $ident . "\r\n".
"\tz=$from\r\n".
"\t|$to\r\n".
"\t|$subject;\r\n".
"\tbh=" . $DKIMb64 . ";\r\n".
"\tb=";
$toSign = $this->DKIM_HeaderC($from_header . "\r\n" . $to_header . "\r\n" . $subject_header . "\r\n" . $dkimhdrs);
$signed = $this->DKIM_Sign($toSign);
return "X-PHPMAILER-DKIM: code.google.com/a/apache-extras.org/p/phpmailer/\r\n".$dkimhdrs.$signed."\r\n";
}
/**
* Perform callback
* @param boolean $isSent
* @param string $to
* @param string $cc
* @param string $bcc
* @param string $subject
* @param string $body
* @param string $from
*/
protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from=null)
{
if (!empty($this->action_function) && is_callable($this->action_function)) {
$params = array($isSent, $to, $cc, $bcc, $subject, $body, $from);
call_user_func_array($this->action_function, $params);
}
}
}
/**
* Exception handler for PHPMailer
* @package PHPMailer
*/
class phpmailerException extends Exception
{
/**
* Prettify error message output
* @return string
*/
public function errorMessage()
{
$errorMsg = '' . $this->getMessage() . "
\n";
return $errorMsg;
}
}
================================================
FILE: plugins/box/backup/backup.admin.php
================================================
readDir(STORAGE . DS, false);
// Add public folder
$zip->readDir(ROOT . DS . 'public' . DS, false);
// Add plugins folder
$zip->readDir(PLUGINS . DS, false, null, array(PLUGINS . DS . 'box'));
if ($zip->archive($backups_path . DS . Date::format(time(), "Y-m-d-H-i-s").'.zip')) {
Notification::set('success', __('Backup was created', 'backup'));
} else {
Notification::set('error', __('Backup was not created', 'backup'));
}
Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Delete backup
// -------------------------------------
if (Request::get('id') == 'backup' && Request::get('delete_file')) {
if (Security::check(Request::get('token'))) {
if (File::delete($backups_path . DS . Request::get('delete_file'))) {
Notification::set('success', __('Backup was deleted', 'backup'));
} else {
Notification::set('error', __('Backup was not deleted', 'backup'));
}
Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Download backup
// -------------------------------------
if (Request::get('download')) {
if (Security::check(Request::get('token'))) {
File::download($backups_path . DS . Request::get('download'));
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Restore backup
// -------------------------------------
if (Request::get('restore')) {
if (Security::check(Request::get('token'))) {
$tmp_dir = ROOT . DS . 'tmp' . DS . uniqid('backup_');
if (Dir::create($tmp_dir)) {
$file_locations = Zip::factory()->extract($backups_path . DS . Request::get('restore'), $tmp_dir);
if (!empty($file_locations)) {
Dir::copy($tmp_dir, ROOT . DS);
Notification::set('success', __('Backup was restored', 'backup'));
} else {
Notification::set('error', __('Unzip error', 'backup'));
}
} else {
Notification::set('error', __('Backup was not restored', 'backup'));
}
Request::redirect(Option::get('siteurl').'/admin/index.php?id=backup');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Display view
View::factory('box/backup/views/backend/index')
->assign('backups_list', File::scan($backups_path, '.zip'))
->display();
}
}
================================================
FILE: plugins/box/backup/backup.plugin.php
================================================
plugins/box/backup/backup.plugin.php
active
8
Backup
Backup plugin
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/backup/languages/cs.lang.php
================================================
array(
'Backups' => 'Zálohy',
'Backup' => 'Zálohy',
'Create Backup' => 'Vytvořit zálohu',
'Delete' => 'Vymazat',
'storage' => 'Storage/Obsah diskového místa',
'public' => 'Veřejné',
'plugins' => 'Pluginy',
'Size' => 'Velikost',
'Actions' => 'Akce',
'Delete backup: :backup' => 'Vymazat zálohu: :backup',
'Creating...' => 'Vytvářím...',
)
);
================================================
FILE: plugins/box/backup/languages/de.lang.php
================================================
array(
'Backups' => 'Backups',
'Backup' => 'Backup',
'Create Backup' => 'Erstelle Backup',
'Delete' => 'Löschen',
'storage' => 'Speicher',
'public' => 'Öffentliche',
'plugins' => 'Plugins',
'Size' => 'Größe',
'Actions' => 'Aktionen',
'Delete backup: :backup' => 'Lösche Backup: :backup',
'Creating...' => 'Erstellen...',
)
);
================================================
FILE: plugins/box/backup/languages/en.lang.php
================================================
array(
'Backups' => 'Backups',
'Backup' => 'Backup',
'Backup Date' => 'Backup Date',
'Create Backup' => 'Create Backup',
'Restore' => 'Restore',
'Delete' => 'Delete',
'storage' => 'storage',
'public' => 'public',
'plugins' => 'plugins',
'Size' => 'Size',
'Actions' => 'Actions',
'Delete backup: :backup' => 'Delete backup: :backup',
'Creating...' => 'Creating...',
'Backup was created' => 'Backup was created',
'Backup was not created' => 'Backup was not created',
'Backup was deleted' => 'Backup was deleted',
'Backup was not deleted' => 'Backup was not deleted',
'Backup was restored' => 'Backup was restored',
'Unzip error' => 'Unzip error',
'Backup was not restored' => 'Backup was not restored',
)
);
================================================
FILE: plugins/box/backup/languages/es.lang.php
================================================
array(
'Backups' => 'Backups',
'Backup' => 'Backup',
'Backup Date' => 'Fecha del backup',
'Create Backup' => 'Crear backup',
'Restore' => 'Restaurar',
'Delete' => 'Eliminar',
'storage' => 'Almacenamiento',
'public' => 'público',
'plugins' => 'plugins',
'Size' => 'Tamaño',
'Actions' => 'Acciones',
'Delete backup: :backup' => 'Eliminar backup: :backup',
'Creating...' => 'Creando...',
'Backup was created' => 'El backup fue creado',
'Backup was not created' => 'El backup no fue creado',
'Backup was deleted' => 'El backup fue eliminado',
'Backup was not deleted' => 'El backup no fue eliminado',
'Backup was restored' => 'El backup fue restaurado',
'Unzip error' => 'Error de descompresión',
'Backup was not restored' => 'El backup no fue restaurado',
)
);
================================================
FILE: plugins/box/backup/languages/fa.lang.php
================================================
array(
'Backups' => 'پشتیبان گیری',
'Backup Date' => 'تاریخ پشتیبان گیری',
'Create Backup' => 'ایجاد نسخه پشتیبان',
'Delete' => 'حذف',
'storage' => 'ذخیره سازی',
'public' => 'عمومی',
'plugins' => 'پلاگین',
'Size' => 'اندازه',
'Actions' => 'عملیات',
'Delete backup: :backup' => 'حذف نسخه پشتیبان: :backup',
'Creating...' => 'ایجاد...',
)
);
================================================
FILE: plugins/box/backup/languages/fr.lang.php
================================================
array(
'Backups' => 'Sauvegardes',
'Backup date' => 'Date de la sauvegarde',
'Create backup' => 'Créer une sauvegarde',
'Delete' => 'Supprimer',
'storage' => 'stockage',
'public' => 'public',
'plugins' => 'plugins',
'Size' => 'Taille',
'Actions' => 'Actions',
'Delete backup: :backup' => 'Supprimer la sauvegarde: :backup',
'Creating...' => 'Création...',
)
);
================================================
FILE: plugins/box/backup/languages/hu.lang.php
================================================
array(
'Backups' => 'Biztonsági mentések',
'Backup date' => 'Biztonsági mentés dátuma',
'Create Backup' => 'Biztonsági mentés készítése',
'Delete' => 'Töröl',
'storage' => 'tárol',
'public' => 'nyilvános',
'plugins' => 'pluginok',
'Size' => 'Méret',
'Actions' => 'Műveletek',
'Delete backup: :backup' => 'Biztonsági mentés törlése: :backup',
'Creating...' => 'Készítés...',
)
);
================================================
FILE: plugins/box/backup/languages/id.lang.php
================================================
array(
'Backups' => 'Cadangan',
'Backup date' => 'Tanggal Cadangan',
'Create Backup' => 'Buat Cadangan',
'Delete' => 'Hapus',
'storage' => 'Penyimpanan',
'public' => 'Umum',
'plugins' => 'Plugins',
'Size' => 'Ukuran',
'Actions' => 'Tindakan',
'Delete backup: :backup' => 'Hapus Cadangan: :backup',
'Creating...' => 'Dibuat...',
)
);
================================================
FILE: plugins/box/backup/languages/it.lang.php
================================================
array(
'Backups' => 'Backup',
'Backup' => 'Backup',
'Create Backup' => 'Crea Backup',
'Delete' => 'Elimina',
'storage' => 'dati',
'public' => 'pubblica',
'plugins' => 'plugin',
'Size' => 'Dimensione',
'Actions' => 'Azioni',
'Delete backup: :backup' => 'Elimina backup: :backup',
'Creating...' => 'Creazione...',
)
);
================================================
FILE: plugins/box/backup/languages/ja.lang.php
================================================
array(
'Backups' => 'バックアップ',
'Backup Date' => 'バックアップ日',
'Create Backup' => 'バックアップの作成',
'Delete' => '削除',
'storage' => 'ストレージ',
'public' => '公開',
'plugins' => 'プラグイン',
'Size' => 'サイズ',
'Actions' => 'アクション',
'Delete backup: :backup' => 'バックアップの削除: :backup',
'Creating...' => '作成中...',
)
);
================================================
FILE: plugins/box/backup/languages/lt.lang.php
================================================
array(
'Backups' => 'Atsarginės kopijos',
'Backup' => 'Atsarginės kopijos data',
'Create Backup' => 'Sukurti atsarginę kopiją',
'Delete' => 'Ištrinti',
'storage' => 'storage',
'public' => 'public',
'plugins' => 'plugins',
'Size' => 'Dydis',
'Actions' => 'Veiksmai',
'Delete backup: :backup' => 'Ištrinti: :backup',
'Creating...' => 'Kuriama...',
)
);
================================================
FILE: plugins/box/backup/languages/nl.lang.php
================================================
array(
'Backups' => 'Backups',
'Backup' => 'Backup',
'Create Backup' => 'Maak backup',
'Delete' => 'Verwijderen',
'storage' => 'Opslag',
'public' => 'Publiek',
'plugins' => 'Plugins',
'Size' => 'Grootte',
'Actions' => 'Acties',
'Delete backup: :backup' => 'Verwijder backup: :backup',
'Creating...' => 'Backup wordt gemaakt...',
)
);
================================================
FILE: plugins/box/backup/languages/pl.lang.php
================================================
array(
'Backups' => 'Kopie zapasowe',
'Backup Date' => 'Data kopii zapasowej',
'Create Backup' => 'Utwórz kopię zapasową',
'Delete' => 'Usuń',
'storage' => 'magazyn',
'public' => 'publiczny',
'plugins' => 'wtyczki',
'Size' => 'Rozmiar',
'Actions' => 'Akcje',
'Delete backup: :backup' => 'Czy napewno usunąć kopię zapasową: :backup',
'Creating...' => 'Tworzenie kopii zapasowej...',
)
);
================================================
FILE: plugins/box/backup/languages/pt-br.lang.php
================================================
array(
'Backups' => 'Backups',
'Backup' => 'Backup',
'Create Backup' => 'Criar Backup',
'Delete' => 'Deletar',
'storage' => 'storage',
'public' => 'public',
'plugins' => 'plugins',
'Size' => 'Tamanho',
'Actions' => 'Ações',
'Delete backup: :backup' => 'Deletar o backup: :backup',
'Creating...' => 'Criando backup...',
)
);
================================================
FILE: plugins/box/backup/languages/ru.lang.php
================================================
array(
'Backups' => 'Бекапы',
'Backup' => 'Бекап',
'Create Backup' => 'Сделать бекап',
'Delete' => 'Удалить',
'storage' => 'данные',
'public' => 'публичная',
'plugins' => 'плагины',
'Size' => 'Размер',
'Actions' => 'Действия',
'Delete backup: :backup' => 'Удалить бекап: :backup',
'Creating...' => 'Создание...',
'Backup was deleted' => 'Бекап не был создан',
'Backup was created' => 'Бекап был создан',
'Backup was not restored' => 'Бекап не был восстановлен',
'Backup was restored' => 'Бекап был восстановлен',
)
);
================================================
FILE: plugins/box/backup/languages/sk.lang.php
================================================
array(
'Backups' => 'Zálohy',
'Backup' => 'Zálohy',
'Create Backup' => 'Vytvoriť Zálohu',
'Delete' => 'Vymazať',
'storage' => 'Storage/Obsah diskového miesta',
'public' => 'Verejné',
'plugins' => 'Pluginy',
'Size' => 'Veľkosť',
'Actions' => 'Akcie',
'Delete backup: :backup' => 'Vymazať zálohu: :backup',
'Creating...' => 'Vytváram...',
)
);
================================================
FILE: plugins/box/backup/languages/sr.lang.php
================================================
array(
'Backups' => 'Bekapovi',
'Backup' => 'Backap',
'Create Backup' => 'Kreiraj Bekap',
'Delete' => 'Obriši',
'storage' => 'lokacija arhive',
'public' => 'Javno',
'plugins' => 'Dodaci',
'Size' => 'Veličina',
'Actions' => 'Akcija',
'Delete backup: :backup' => 'Obriši bekap: :backup',
'Creating...' => 'Kreiranje...',
)
);
================================================
FILE: plugins/box/backup/languages/tr.lang.php
================================================
array(
'Backups' => 'Yedekler',
'Backup' => 'Yedek',
'Backup Date' => 'Yedekleme Tarihi',
'Create Backup' => 'Yedek Al',
'Delete' => 'Sil',
'Restore' => 'Geri Yükle',
'storage' => 'depo',
'public' => 'genel',
'plugins' => 'eklentiler',
'Size' => 'Boyut',
'Actions' => 'Eylemler',
'Delete backup: :backup' => ':backup adlı yedek silinsin mi',
'Creating...' => 'Oluşturuluyor...',
'Backup was created' => 'Yedek oluşturuldu',
'Backup was not created' => 'Yedek oluşturulmadı',
'Backup was deleted' => 'Yedek silindi',
'Backup was not deleted' => 'Yedek silinmedi',
'Backup was restored' => 'Yedek geri yüklendi',
'Unzip error' => 'Sıkıştırılmış yedeği açma (unzip) hatası',
'Backup was not restored' => 'Yedek geri yüklenmedi',
)
);
================================================
FILE: plugins/box/backup/languages/uk.lang.php
================================================
array(
'Backups' => 'Бекапи',
'Backup' => 'Бекап',
'Create Backup' => 'Створити бекап',
'Delete' => 'Видалити',
'storage' => 'дані',
'public' => 'публічна',
'plugins' => 'плагіни',
'Size' => 'Розмір',
'Actions' => 'Дії',
'Delete backup: :backup' => 'Видалити бекап: :backup',
'Creating...' => 'Створення...',
'Backup was deleted' => 'Бекап не був створений',
'Backup was created' => 'Бекап був створений',
'Backup was not restored' => 'Бекап не був відновлений',
'Backup was restored' => 'Бекап був відновлений',
)
);
================================================
FILE: plugins/box/backup/languages/zh-cn.lang.php
================================================
array(
'Backups' => '备份',
'Backup Date' => '备份日期',
'Create Backup' => '创建备份',
'Delete' => '删除',
'storage' => '存储',
'public' => '公开',
'plugins' => '插件',
'Size' => '大小',
'Actions' => '操作',
'Delete backup: :backup' => '删除备份: :backup',
'Creating...' => '正在创建...',
)
);
================================================
FILE: plugins/box/backup/views/backend/index.view.php
================================================
'form-inline')) .
Form::hidden('csrf', Security::token()).
Form::submit('create_backup', __('Create Backup', 'backup'), array('class' => 'btn btn-phone btn-primary', 'data-loading-text' => __('Creating...', 'backup'))).
Form::close()
);
?>
0) rsort($backups_list); foreach ($backups_list as $backup) { ?>
'btn btn-primary'));
}
?>
'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete backup: :backup', 'backup', array(':backup' => Date::format($name, 'F jS, Y - g:i A')))."')"));
?>
================================================
FILE: plugins/box/blocks/blocks.admin.php
================================================
:name have been saved.', 'blocks', array(':name' => Security::safeName(Request::post('name')))));
if (Request::post('add_blocks_and_exit')) {
Request::redirect('index.php?id=blocks');
} else {
Request::redirect('index.php?id=blocks&action=edit_block&filename='.Security::safeName(Request::post('name')));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Save fields
if (Request::post('name')) $name = Request::post('name'); else $name = '';
if (Request::post('editor')) $content = Request::post('editor'); else $content = '';
// Display view
View::factory('box/blocks/views/backend/add')
->assign('content', $content)
->assign('name', $name)
->assign('errors', $errors)
->display();
break;
// Edit Block
// -------------------------------------
case "edit_block":
// Save current block action
if (Request::post('edit_blocks') || Request::post('edit_blocks_and_exit') ) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('name')) == '') $errors['blocks_empty_name'] = __('Required field', 'blocks');
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');
// Save fields
if (Request::post('editor')) $content = Request::post('editor'); else $content = '';
if (count($errors) == 0) {
$block_old_filename = $blocks_path.Request::post('blocks_old_name').'.block.html';
$block_new_filename = $blocks_path.Security::safeName(Request::post('name')).'.block.html';
if ( ! empty($block_old_filename)) {
if ($block_old_filename !== $block_new_filename) {
rename($block_old_filename, $block_new_filename);
$save_filename = $block_new_filename;
} else {
$save_filename = $block_new_filename;
}
} else {
$save_filename = $block_new_filename;
}
// Save block
File::setContent($save_filename, XML::safe(Request::post('editor')));
Notification::set('success', __('Your changes to the block :name have been saved.', 'blocks', array(':name' => basename($save_filename, '.block.html'))));
if (Request::post('edit_blocks_and_exit')) {
Request::redirect('index.php?id=blocks');
} else {
Request::redirect('index.php?id=blocks&action=edit_block&filename='.Security::safeName(Request::post('name')));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));
if (Request::post('editor')) $content = Request::post('editor'); else $content = File::getContent($blocks_path.Request::get('filename').'.block.html');
// Display view
View::factory('box/blocks/views/backend/edit')
->assign('content', Text::toHtml($content))
->assign('name', $name)
->assign('errors', $errors)
->display();
break;
case "delete_block":
if (Security::check(Request::get('token'))) {
File::delete($blocks_path.Request::get('filename').'.block.html');
Notification::set('success', __('Block :name deleted', 'blocks', array(':name' => File::name(Request::get('filename')))));
Request::redirect('index.php?id=blocks');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
break;
}
} else {
// Get blocks
$blocks_list = File::scan($blocks_path, '.block.html');
// Display view
View::factory('box/blocks/views/backend/index')
->assign('blocks_list', $blocks_list)
->display();
}
}
}
================================================
FILE: plugins/box/blocks/blocks.plugin.php
================================================
(string) $content,
);
}
}
/**
* Draw Inline Block
*/
public static function _inlineBlock($attributes)
{
if (isset($attributes['name']) && isset(Block::$inline_blocks[$attributes['name']])) {
$content = Filter::apply('content', Text::toHtml(Block::$inline_blocks[$attributes['name']]['content']));
return $content;
} else {
return '';
}
}
/**
* Get block
*
* @param string $name Block file name
*/
public static function get($name)
{
return Block::_content(array('get' => $name));
}
/**
* Returns block content for shortcode {block get="blockname"}
*
* @param array $attributes block filename
*/
public static function _content($attributes)
{
if (isset($attributes['get'])) $name = (string) $attributes['get']; else $name = '';
$block_path = STORAGE . DS . 'blocks' . DS . $name . '.block.html';
if (File::exists($block_path)) {
ob_start();
include $block_path;
$block_contents = ob_get_contents();
ob_end_clean();
return Filter::apply('content', Text::toHtml($block_contents));
} else {
if (Session::exists('admin') && Session::get('admin') == true) {
return __('Block :name is not found!', 'blocks', array(':name' => $name));
}
}
}
}
================================================
FILE: plugins/box/blocks/install/blocks.manifest.xml
================================================
plugins/box/blocks/blocks.plugin.php
active
6
Blocks
Blocks manager plugin
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/blocks/js/.htaccess
================================================
Options -Indexes
Allow from all
================================================
FILE: plugins/box/blocks/js/blocks.js
================================================
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.blocks = {
init: function() { },
showEmbedCodes: function(name) {
$('#shortcode').html('{block get="'+name+'"}');
$('#phpcode').html('<?php echo Block::get("'+name+'"); ?>');
$('#embedCodes').modal();
}
};
$(document).ready(function(){
$.monstra.blocks.init();
});
================================================
FILE: plugins/box/blocks/languages/cs.lang.php
================================================
array(
'Blocks' => 'Bloky',
'Blocks manager' => 'Správce bloků',
'Delete' => 'Vymazat',
'Edit' => 'Editovat',
'Name' => 'Názov',
'Create New Block' => 'Vytvořit nový blok',
'New Block' => 'Nový blok',
'Edit Block' => 'Editovat blok',
'Save' => 'Uložit',
'Save and Exit' => 'Uložit a ukončit',
'Actions' => 'Akce',
'Required field' => 'Povinné políčko',
'This block already exists' => 'Tento blok již existuje',
'This block does not exist' => 'Tento blok neexistuje',
'Delete block: :block' => 'Vymazat blok: :block',
'Block content' => 'Obsah bloku',
'Block :name deleted' => 'Blok :name byl vymazaný',
'Your changes to the block :name have been saved.' => 'Vaše změny v bloku :name byly uloženy.',
'Delete block: :block' => 'Vymazat blok: :block',
'View Embed Code' => 'Zobrazit vložený kód',
'Embed Code' => 'Vložený kód',
'Shortcode' => 'Zkrácený kód',
'PHP Code' => 'PHP kód',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/blocks/languages/de.lang.php
================================================
array(
'Blocks' => 'Blöcke',
'Blocks manager' => 'Block-Manager',
'Delete' => 'Löschen',
'Edit' => 'Bearbeiten',
'Name' => 'Name',
'Create New Block' => 'Erstelle einen neuen Block',
'New Block' => 'Neuer Block',
'Edit Block' => 'Bearbeite Block',
'Save' => 'Speichern',
'Save and Exit' => 'Speichern und Schließen',
'Actions' => 'Aktionen',
'Required field' => 'Erforderliches Feld',
'This block already exists' => 'Dieser Block existiert bereits',
'This block does not exist' => 'Dieser Block existiert nicht',
'Delete block: :block' => 'Lösche Block: :block',
'Block content' => 'Block-Inhalt',
'Block :name deleted' => 'Block :name gelöscht',
'Your changes to the block :name have been saved.' => 'Deine Änderungen für den Block :name wurden gespeichert.',
'Delete block: :block' => 'Lösche Block: :block',
'View Embed Code' => 'Zeige Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Abbrechen',
)
);
================================================
FILE: plugins/box/blocks/languages/en.lang.php
================================================
array(
'Blocks' => 'Blocks',
'Blocks manager' => 'Blocks manager',
'Delete' => 'Delete',
'Edit' => 'Edit',
'Name' => 'Name',
'Create New Block' => 'Create New Block',
'New Block' => 'New Block',
'Edit Block' => 'Edit Block',
'Save' => 'Save',
'Save and Exit' => 'Save and Exit',
'Actions' => 'Actions',
'Required field' => 'Required field',
'This block already exists' => 'This block already exists',
'This block does not exist' => 'This block does not exist',
'Delete block: :block' => 'Delete block: :block',
'Block content' => 'Block content',
'Block :name deleted' => 'Block :name deleted',
'Your changes to the block :name have been saved.' => 'Your changes to the block :name have been saved.',
'Delete block: :block' => 'Delete block: :block',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/blocks/languages/es.lang.php
================================================
array(
'Blocks' => 'Bloques',
'Blocks manager' => 'Administrador de bloques',
'Delete' => 'Eliminar',
'Edit' => 'Editar',
'Name' => 'Nombre',
'Create New Block' => 'Crear nuevo bloque',
'New Block' => 'Nuevo bloque',
'Edit Block' => 'Editar bloque',
'Save' => 'Guardar',
'Save and Exit' => 'Guardar y salir',
'Actions' => 'Acciones',
'Required field' => 'Dato requerido',
'This block already exists' => 'Este bloque ya existe',
'This block does not exist' => 'Este bloque no existe',
'Delete block: :block' => 'Eliminar bloque: :block',
'Block content' => 'Contenido del bloque',
'Block :name deleted' => 'Bloque :name eliminado',
'Your changes to the block :name have been saved.' => 'Tus cambios en el bloque :name han sido guardados.',
'Delete block: :block' => 'Eliminar bloque: :block',
'View Embed Code' => 'Ver código incrustado',
'Embed Code' => 'Incrustar código',
'Shortcode' => 'Código corto',
'PHP Code' => 'Código PHP',
'Cancel' => 'Cancelar',
)
);
================================================
FILE: plugins/box/blocks/languages/fa.lang.php
================================================
array(
'Blocks' => 'بلوک',
'Blocks manager' => 'مدیریت بلوک',
'Delete' => 'حذف',
'Edit' => 'ویرایش',
'Name' => 'نام',
'Create New Block' => 'ایجاد بلوک جدید',
'New Block' => 'بلوک جدید',
'Edit Block' => 'ویرایش بلوک',
'Save' => 'ذخیره',
'Save and Exit' => 'ذخیره و خروج',
'Actions' => 'عملیات',
'Required field' => 'کادر الزامی',
'This block already exists' => 'این بلوک در حال حاضر وجود دارد',
'This block does not exist' => 'این بلوک وجود ندارد',
'Delete block: :block' => 'Delete block: :block',
'Block content' => 'حذف بلوک: :block',
'Block :name deleted' => 'بلوک :name حذف شد',
'Your changes to the block :name have been saved.' => 'تغییرات شما بر روی بلوک :name ذخیره شد.',
'Delete block: :block' => 'حذف بلوک: :block',
'View Embed Code' => 'نمایش کد درج شده',
'Embed Code' => 'کد درج شده',
'Shortcode' => 'کدکوتاه',
'PHP Code' => 'کد PHP',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/blocks/languages/fr.lang.php
================================================
array(
'Blocks' => 'Blocs',
'Blocks manager' => 'Gestionnaire des blocs',
'Delete' => 'Supprimer',
'Edit' => 'Editer',
'Name' => 'Nom',
'Create new block' => 'Créer un nouveau bloc',
'New block' => 'Nouveau bloc',
'Edit block' => 'Editer le bloc',
'Save' => 'Enregistrer',
'Save and exit' => 'Enregistrer et sortir',
'Actions' => 'Actions',
'Required field' => 'Champ requis',
'This block already exists' => 'Ce bloc existe déjà',
'This block does not exist' => 'Ce bloc n\'existe pas',
'Delete block: :block' => 'Supprimer le bloc: :block',
'Block content' => 'Contenu du bloc',
'Block :name deleted' => 'Bloc :name supprimé',
'Your changes to the block :name have been saved.' => 'Vos changements pour le bloc :name ont été sauvegardés.',
'Delete block: :block' => 'Supprimer le bloc: :block',
'View Embed Code' => 'Voir le code intégré',
'Embed Code' => 'Code intégré',
'Shortcode' => 'Code court',
'PHP Code' => 'Code PHP',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/blocks/languages/hu.lang.php
================================================
array(
'Blocks' => 'Blokkok',
'Blocks manager' => 'Blokk-kezelő',
'Delete' => 'Törlés',
'Edit' => 'Szerkesztés',
'Name' => 'Név',
'Create New Block' => 'Új blokk készítése',
'New Block' => 'Új blokk',
'Edit Block' => 'Blokk szerkesztése',
'Save' => 'Mentés',
'Save and Exit' => 'Mentés és Kilépés',
'Actions' => 'Műveletek',
'Required field' => 'Kötelező mező',
'This block already exists' => 'Ez a blokk már létezik',
'This block does not exist' => 'Ez a blokk nem létezik',
'Delete block: :block' => 'Blokk törlése: :block',
'Block content' => 'Blokk tartalma',
'Block :name deleted' => 'A :name blokk törölve',
'Your changes to the block :name have been saved.' => 'A :name blokk változtatásai elmentve.',
'Delete block: :block' => 'Blokk törlése: :block',
'View Embed Code' => 'Beágyazott kód mutatása',
'Embed Code' => 'Beágyazott kód',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/blocks/languages/id.lang.php
================================================
array(
'Blocks' => 'Block',
'Blocks manager' => 'Pengelolaan Block',
'Delete' => 'Hapus',
'Edit' => 'Perbaiki',
'Name' => 'Nama',
'Create New Block' => 'Buat Block Baru',
'New Block' => 'Block Baru',
'Edit Block' => 'Edit Block',
'Save' => 'Simpan',
'Save and Exit' => 'Simpan dan Keluar',
'Actions' => 'Tindakan',
'Required field' => 'Isian yang Dibutuhkan',
'This block already exists' => 'Block ini sudah ada',
'This block does not exist' => 'Block ini belum ada',
'Delete block: :block' => 'Hapus Block: :block',
'Block content' => 'Isi Block',
'Block :name deleted' => 'Block :nama dihapus',
'Your changes to the block :name have been saved.' => 'Perubahan pada block :nama telah disimpan.',
'Delete block: :block' => 'Hapus Block: :block',
'View Embed Code' => 'Lihat Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);
================================================
FILE: plugins/box/blocks/languages/it.lang.php
================================================
array(
'Blocks' => 'Blocchi',
'Blocks manager' => 'Gestione blocchi',
'Delete' => 'Elimina',
'Edit' => 'Modifica',
'New Block' => 'Nuovo blocco',
'Create New Block' => 'Crea nuovo blocco',
'Name' => 'Nome',
'Edit Block' => 'Modifica blocco',
'Save' => 'Salva',
'Actions' => 'Azioni',
'Save and Exit' => 'Salva ed esci',
'Required field' => 'Campo obbligatorio',
'This block already exists' => 'Tale blocco già esistente',
'This block does not exist' => 'Tale blocco non esiste',
'Delete block: :block' => 'Elimina blocco: :block',
'Block content' => 'Contenuto del blocco',
'Block :name deleted' => 'Snippet :name è stato eliminato',
'Your changes to the block :name have been saved.' => 'Le modifiche al blocco: nome i> sono state salvate.',
'Delete block: :block' => 'Elimina blocco: :block',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/blocks/languages/ja.lang.php
================================================
array(
'Blocks' => 'ブロック',
'Blocks manager' => 'ブロックの管理',
'Delete' => '削除',
'Edit' => '編集',
'Name' => '名前',
'Create New Block' => '新しいブロックを作成',
'New Block' => '新しいブロック',
'Edit Block' => 'ブロックを編集',
'Save' => '保存',
'Save and Exit' => '保存して終了',
'Actions' => 'アクション',
'Required field' => '必須項目',
'This block already exists' => 'このブロックはすでに存在しています',
'This block does not exist' => 'このブロックは存在していません',
'Delete block: :block' => 'ブロックの削除: :block',
'Block content' => 'ブロックの内容',
'Block :name deleted' => ':name ブロックが削除されました',
'Your changes to the block :name have been saved.' => ':name への変更は保存されました。',
'Delete block: :block' => 'ブロックの削除: :block',
'View Embed Code' => '埋め込みコードを表示',
'Embed Code' => '埋め込みコード',
'Shortcode' => 'ショートコード',
'PHP Code' => 'PHPコード',
)
);
================================================
FILE: plugins/box/blocks/languages/ka-ge.lang.php
================================================
array(
'Blocks' => 'ბლოკები',
'Blocks manager' => 'ბლოკების მენეჯერი',
'Delete' => 'წაშლა',
'Edit' => 'რედაქტირება',
'New Block' => 'ახალი ბლოკი',
'Create New Block' => 'ახალი ბლოკის შექმნა',
'Name' => 'სახელი',
'Edit Block' => 'ბლოკის რედაქტირება',
'Save' => 'შენახვა',
'Actions' => 'მოქმედება',
'Save and Exit' => 'შენახვა და შემდეგ გამოსვლა',
'Required field' => 'აუცილებელი ველი',
'This block already exists' => 'ასეთი ბლოკი უკვე არსებობს',
'This block does not exist' => 'ასეთი ბლოკი არ არსებობს',
'Delete block: :block' => 'ბლოკის წაშლა: :block',
'Block content' => 'ბლოკის შემადგენლობა',
'Block :name deleted' => 'ბლოკი :name წაშლილია',
'Your changes to the block :name have been saved.' => 'თქვენი ცვლილებები ბლოკში :name დამახსოვრებულია.',
'Delete block: :block' => 'ბლოკის წაშლა: :block',
'View Embed Code' => 'ჩასაწერი კოდი',
'Embed Code' => 'ჩასაწერი კოდი',
'Shortcode' => 'Shortcode-ი',
'PHP Code' => 'PHP კოდი',
'Cancel' => 'გაუქმება',
)
);
================================================
FILE: plugins/box/blocks/languages/lt.lang.php
================================================
array(
'Blocks' => 'Blokai',
'Blocks manager' => 'Blokų tvarkyklė',
'Delete' => 'Ištrinti',
'Edit' => 'Redaguoti',
'Name' => 'Pavadinimas',
'Create New Block' => 'Sukurti naują bloką',
'New Block' => 'Naujas blokas',
'Edit Block' => 'Redaguoti bloką',
'Save' => 'Išsaugoti',
'Save and Exit' => 'Išsaugoti ir išeiti',
'Actions' => 'Veiksmai',
'Required field' => 'Privalomas laukas',
'This block already exists' => 'Toks blokas jau yra',
'This block does not exist' => 'Tokio bloko nėra',
'Delete block: :block' => 'Ištrinti: :block',
'Block content' => 'Bloko turinys',
'Block :name deleted' => 'Blokas :name ištrintas',
'Your changes to the block :name have been saved.' => 'Bloko :name pakeitimai išsaugoti.',
'Delete block: :block' => 'Delete block: :block',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/blocks/languages/nl.lang.php
================================================
array(
'Blocks' => 'Blokken',
'Blocks manager' => 'Blokken beheer',
'Delete' => 'Verwijderen',
'Edit' => 'Bewerken',
'Name' => 'Naam',
'Create New Block' => 'Nieuw blok',
'New Block' => 'Nieuw blok',
'Edit Block' => 'Bewerk blok',
'Save' => 'Opslaan',
'Save and Exit' => 'Opslaan en Terug',
'Actions' => 'Acties',
'Required field' => 'Vereist veld',
'This block already exists' => 'Dit blok bestaat al',
'This block does not exist' => 'Dit blok bestaat niet',
'Delete block: :block' => 'Verwijder blok: :block',
'Block content' => 'Inhoud blok',
'Block :name deleted' => 'Blok :name verwijderd',
'Your changes to the block :name have been saved.' => 'De aanpassingen aan blok :name zijn opgeslagen.',
'Delete block: :block' => 'Verwijder blok: :block',
'View Embed Code' => 'Bekijk insluitcode',
'Embed Code' => 'Insluitcode',
'Shortcode' => 'Verkorte code',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/blocks/languages/pl.lang.php
================================================
array(
'Blocks' => 'Bloki',
'Blocks manager' => 'Zarządzaj blokami',
'Delete' => 'Usuń',
'Edit' => 'Edytuj',
'Name' => 'Nazwa',
'Create New Block' => 'Utwórz nowy blok',
'New Block' => 'Nowy blok',
'Edit Block' => 'Edytuj blok',
'Save' => 'Zapisz',
'Save and Exit' => 'Zapisz i wyjdź',
'Actions' => 'Akcje',
'Required field' => 'Pole wymagane',
'This block already exists' => 'Ten blok już istnieje',
'This block does not exist' => 'Ten blok nie istnieje',
'Delete block: :block' => 'Czy napewno usunąć blok: :block',
'Block content' => 'Zawartość bloku',
'Block :name deleted' => 'Blok :name został usunięty',
'Your changes to the block :name have been saved.' => 'Twoje zmiany dla bloku :name zostały zapisane.',
'Delete block: :block' => 'Czy napewno usunąć blok: :block',
'View Embed Code' => 'Pokaż osadzony kod',
'Embed Code' => 'Osadzony kod',
'Shortcode' => 'Krótki kod (shortcode)',
'PHP Code' => 'Kod PHP',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/blocks/languages/pt-br.lang.php
================================================
array(
'Blocks' => 'Blocos',
'Blocks manager' => 'Gerenciador de blocos',
'Delete' => 'Deletar',
'Edit' => 'Editar',
'Name' => 'Nome',
'Create New Block' => 'Criar novo bloco',
'New Block' => 'Novo bloco',
'Edit Block' => 'Editar bloco',
'Save' => 'Salvar',
'Save and Exit' => 'Salvar e sair',
'Actions' => 'Ações',
'Required field' => 'Campo requerido',
'This block already exists' => 'Este bloco já existe',
'This block does not exist' => 'Este bloco não existe',
'Delete block: :block' => 'Deletar o bloco: :block',
'Block content' => 'Conteúdo do bloco',
'Block :name deleted' => 'Bloco :name deletado',
'Your changes to the block :name have been saved.' => 'Suas mudanças no bloco :name foram salvas',
'Delete block: :block' => 'Delete block: :block',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/blocks/languages/ru.lang.php
================================================
array(
'Blocks' => 'Блоки',
'Blocks manager' => 'Менеджер блоков',
'Delete' => 'Удалить',
'Edit' => 'Редактировать',
'New Block' => 'Новый блок',
'Create New Block' => 'Создать новый блок',
'Name' => 'Название',
'Edit Block' => 'Редактирование блока',
'Save' => 'Сохранить',
'Actions' => 'Действия',
'Save and Exit' => 'Сохранить и выйти',
'Required field' => 'Обязательное поле',
'This block already exists' => 'Такой блок уже существует',
'This block does not exist' => 'Такого блока не существует',
'Delete block: :block' => 'Удалить блок: :block',
'Block content' => 'Содержимое блока',
'Block :name deleted' => 'Блок :name удален',
'Your changes to the block :name have been saved.' => 'Ваши изменения к блоку :name были сохранены.',
'Delete block: :block' => 'Удалить блок: :block',
'View Embed Code' => 'Код для вставки',
'Embed Code' => 'Код для вставки',
'Shortcode' => 'Шорткод',
'PHP Code' => 'PHP код',
'Cancel' => 'Отмена',
)
);
================================================
FILE: plugins/box/blocks/languages/sk.lang.php
================================================
array(
'Blocks' => 'Bloky',
'Blocks manager' => 'Manažér blokov',
'Delete' => 'Vymazať',
'Edit' => 'Editovať',
'Name' => 'Názov',
'Create New Block' => 'Vytvoriť nový blok',
'New Block' => 'Nový blok',
'Edit Block' => 'Editovať blok',
'Save' => 'Uložiť',
'Save and Exit' => 'Uložiť a ukončiť',
'Actions' => 'Akcie',
'Required field' => 'Povinné políčko',
'This block already exists' => 'Tento blok už existuje',
'This block does not exist' => 'Tento blok neexistuje',
'Delete block: :block' => 'Vymazať blok: :block',
'Block content' => 'Obsah bloku',
'Block :name deleted' => 'Blok :name bol vymazaný',
'Your changes to the block :name have been saved.' => 'Vaše zmeny v bloku :name boli uložené.',
'Delete block: :block' => 'Vymazať blok: :block',
'View Embed Code' => 'Pozrieť vložený kód',
'Embed Code' => 'Vložený kód',
'Shortcode' => 'Skrátený kód',
'PHP Code' => 'PHP kód',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/blocks/languages/sr.lang.php
================================================
array(
'Blocks' => 'Blokovi',
'Blocks manager' => 'Menadžer blokova',
'Delete' => 'Obriši',
'Edit' => 'Izmeni',
'Name' => 'Ime',
'Create new block' => 'Kreiraj novi blok',
'New block' => 'Novi blok',
'Edit block' => 'Izmeni blok',
'Save' => 'Sačuvaj',
'Save and exit' => 'Sačuvaj i izađi',
'Actions' => 'Akcije',
'Required field' => 'Potrebno polje',
'This block already exists' => 'Ovaj Blok već postoji',
'This block does not exist' => 'Ovaj blok ne postoji',
'Delete block: :block' => 'Obriši blok: :block',
'Block content' => 'Sadržaj bloka',
'Block :name deleted' => 'Blok :name je obrisan',
'Your changes to the block :name have been saved.' => 'Tvoje promene na bloku :name su sačuvane.',
'Delete block: :block' => 'Obriši blok: :block',
'View Embed Code' => 'Vidi embed kod',
'Embed Code' => 'Embed Kod',
'Shortcode' => 'Kratak kod',
'PHP Code' => 'PHP kod',
'Cancel' => 'Otkaži',
)
);
================================================
FILE: plugins/box/blocks/languages/tr.lang.php
================================================
array(
'Blocks' => 'Bloklar',
'Blocks manager' => 'Blok yöneticisi',
'Delete' => 'Sil',
'Edit' => 'Düzenle',
'Name' => 'Ad',
'Create New Block' => 'Yeni Blok Oluştur',
'New Block' => 'Yeni Blok',
'Edit Block' => 'Bloğu Düzenle',
'Save' => 'Kaydet',
'Save and Exit' => 'Kaydet ve Çık',
'Actions' => 'İşlemler',
'Required field' => 'Zorunlu alan',
'This block already exists' => 'Bu blok zaten var.',
'This block does not exist' => 'Blok bulunamadı.',
'Delete block: :block' => ':block adlı blok silinsin mi',
'Block content' => 'Blok içeriği',
'Block :name deleted' => ':name adlı blok silindi.',
'Your changes to the block :name have been saved.' => 'Değişiklikler :name bloğuna kaydedildi.',
'Delete block: :block' => ':block adlı blok silinsin mi',
'View Embed Code' => 'Gömülür Kodu Görüntüle',
'Embed Code' => 'Gömülür Kodu',
'Shortcode' => 'Kısa Kod',
'PHP Code' => 'PHP Kodu',
'Cancel' => 'Vazgeç',
)
);
================================================
FILE: plugins/box/blocks/languages/uk.lang.php
================================================
array(
'Blocks' => 'Блоки',
'Blocks manager' => 'Менеджер блоків',
'Delete' => 'Видалити',
'Edit' => 'Редагувати',
'New Block' => 'Новий блок',
'Create New Block' => 'Створити новий блок',
'Name' => 'Назва',
'Edit Block' => 'Редагувати блок',
'Save' => 'Зберегти',
'Actions' => 'Дії',
'Save and Exit' => 'Зберегти та вийти',
'Required field' => 'Обов′язкове поле',
'This block already exists' => 'Такий блок вже існує',
'This block does not exist' => 'Такий блок не існує',
'Delete block: :block' => 'Видалити блок: :block',
'Block content' => 'Вміст блоку',
'Block :name deleted' => 'Сніпет :name вилучено',
'Your changes to the block :name have been saved.' => 'Ваші зміни до блоку :name були збережені.',
'Delete block: :block' => 'Видалити блок: :block',
'View Embed Code' => 'Код для вставки',
'Embed Code' => 'Код для вставки',
'Shortcode' => 'Шорткод',
'PHP Code' => 'PHP код',
'Cancel' => 'Відмінити',
)
);
================================================
FILE: plugins/box/blocks/languages/zh-cn.lang.php
================================================
array(
'Blocks' => '版块',
'Blocks manager' => '版块管理',
'Delete' => '删除',
'Edit' => '编辑',
'Name' => '名称',
'Create New Block' => '创建新版块',
'New Block' => '新版块',
'Edit Block' => '编辑版块',
'Save' => '保存',
'Save and Exit' => '保存并退出',
'Actions' => '操作',
'Required field' => '必填字段',
'This block already exists' => '此版块已存在',
'This block does not exist' => '此版块不存在',
'Delete block: :block' => '删除版块: :block',
'Block content' => '版块内容',
'Block :name deleted' => '版块 :name 已删除',
'Your changes to the block :name have been saved.' => '您修改的版块 :name 已保存。',
'Delete block: :block' => '删除版块: :block',
'View Embed Code' => '查看嵌入代码',
'Embed Code' => '嵌入代码',
'Shortcode' => '短代码',
'PHP Code' => 'PHP 代码',
)
);
================================================
FILE: plugins/box/blocks/views/backend/add.view.php
================================================
(isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'form-control error-field' : 'form-control'))); ?>
'.$errors['blocks_empty_name'].'';
if (isset($errors['blocks_exists'])) echo '';
?>
'btn btn-phone btn-primary')).Html::nbsp(2).
Form::submit('add_blocks', __('Save', 'blocks'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).
Html::anchor(__('Cancel', 'blocks'), 'index.php?id=blocks', array('title' => __('Cancel', 'blocks'), 'class' => 'btn btn-phone btn-default')).
Form::close()
);
?>
================================================
FILE: plugins/box/blocks/views/backend/edit.view.php
================================================
(isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'form-control error-field' : 'form-control'))); ?>
'.$errors['blocks_empty_name'].'';
if (isset($errors['blocks_exists'])) echo '';
?>
'btn btn-phone btn-primary')).Html::nbsp(2).
Form::submit('edit_blocks', __('Save', 'blocks'), array('class' => 'btn btn-phone btn-primary')). Html::nbsp(2).
Html::anchor(__('Cancel', 'blocks'), 'index.php?id=blocks', array('title' => __('Cancel', 'blocks'), 'class' => 'btn btn-phone btn-default')).
Form::close()
);
} else {
echo '';
}
?>
================================================
FILE: plugins/box/blocks/views/backend/index.view.php
================================================
__('Create New Block', 'blocks'), 'class' => 'btn btn-phone btn-primary'))
);
?>
'btn btn-primary')); ?>
'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')"));
?>
================================================
FILE: plugins/box/dashboard/dashboard.admin.php
================================================
display();
}
}
/**
* Dashboard
*/
class Dashboard
{
/**
* Items
*
* @var array
*/
public static $items = array();
/**
*
*/
public static function addNewItem($id, $title, $url, $priority = 1)
{
Dashboard::$items[] = array(
'id' => (string) $id,
'title' => (string) $title,
'url' => (string) $url,
'priority' => (int) $priority,
);
}
/**
*
*/
public static function drawItems()
{
// Sort items by priority
$items = Arr::subvalSort(Dashboard::$items, 'priority');
foreach ($items as $item) {
echo '';
echo Html::anchor($item['title'], $item['url'], array('title' => $item['title']));
echo ' ';
}
}
}
================================================
FILE: plugins/box/dashboard/dashboard.plugin.php
================================================
plugins/dashboard/dashboard.plugin.php
active
15
Dashboard
Dashboard plugin for Monstra
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/dashboard/js/.htaccess
================================================
Options -Indexes
Allow from all
================================================
FILE: plugins/box/dashboard/js/ganalytics.js
================================================
if (typeof $.monstra == 'undefined') $.monstra = {};
function glibOnloadHandle(){$.monstra.ganalytics.libOnloadHandle();}
$.monstra.ganalytics = {
conf: {
clientId: '',
apiKey: '',
viewId: '',
authScopes: 'https://www.googleapis.com/auth/analytics.readonly'
},
_gaAreas: '#authOk,#authFail,#gaSettings,#gaLoading,#reauthError,#gaHelpLink',
_startDate: moment().subtract('days', 29),
_endDate: moment(),
init: function(data){
$.extend(this.conf, data);
$('.gaSettingsLink').click(function(){
$.monstra.ganalytics.show('#gaSettings,#gaHelpLink');
$('.gaSettingsLink').hide();
});
},
initDateRangePicker: function(){
$('#reportRange').daterangepicker({
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
'Last 7 Days': [moment().subtract('days', 6), moment()],
'Last 30 Days': [moment().subtract('days', 29), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
},
startDate: $.monstra.ganalytics._startDate,
endDate: $.monstra.ganalytics._endDate
},function(start, end) {
$.monstra.ganalytics.getAnalyticsInfo(start._d, end._d);
}
);
$.monstra.ganalytics.getAnalyticsInfo($.monstra.ganalytics._startDate._d, $.monstra.ganalytics._endDate._d);
},
libOnloadHandle: function(){
if ($.monstra.ganalytics.conf.clientId == ''
|| $.monstra.ganalytics.conf.apiKey == ''
|| $.monstra.ganalytics.conf.viewId == ''
) {
$.monstra.ganalytics.show('#gaSettings,#gaHelpLink');
$('.gaSettingsLink').hide();
return false;
}
gapi.client.setApiKey(this.conf.apiKey);
window.setTimeout(function(){
$.monstra.ganalytics.checkAuth(true);
},1);
},
checkAuth: function(immediate){
gapi.auth.authorize({
client_id: $.monstra.ganalytics.conf.clientId,
scope: $.monstra.ganalytics.conf.authScopes,
immediate: immediate
}, $.monstra.ganalytics.handleAuthResult);
return immediate;
},
handleAuthResult: function(authResult){
if (authResult && !authResult.error) {
$.monstra.ganalytics.show('#authOk');
$.monstra.ganalytics.initDateRangePicker();
} else {
$.monstra.ganalytics.show('#authFail');
if (authResult && typeof authResult.error != 'undefined') {
$.monstra.ganalytics.showError(authResult.error.message);
}
$('#authorizeButton').on('click', function(e){
$.monstra.ganalytics.checkAuth(false);
});
}
},
getAnalyticsInfo: function(startDate, endDate) {
gapi.client.load('analytics', 'v3', function(){
gapi.client.analytics.data.ga.get({
'ids': 'ga:'+ $.monstra.ganalytics.conf.viewId,
'start-date': $.monstra.ganalytics.formatDate(startDate),
'end-date': $.monstra.ganalytics.formatDate(endDate),
'metrics': 'ga:visits,ga:pageviews,ga:visitors',
'dimensions': 'ga:date'
}).execute($.monstra.ganalytics.gaReportingResults);
});
},
gaReportingResults: function(res){
if (typeof res.error != 'undefined' && typeof res.error.message != 'undefined') {
$.monstra.ganalytics.showError(res.error.message, res.error.code);
return;
}
// build chart data
var dataArr = [['Date', 'Visits']];
for (r in res.rows) {
var tmpr = [];
for (h in res.columnHeaders) {
if (res.columnHeaders[h].name == 'ga:visits') {
tmpr[1] = parseInt(res.rows[r][h]);
} else if (res.columnHeaders[h].name == 'ga:date') {
var parsed = res.rows[r][h].match(/([0-9]{4})([0-9]{2})([0-9]{2})/)
tmpr[0] = parsed[1] +'-'+ parsed[2] +'-'+ parsed[3];
}
if (res.rows.length == (parseInt(r)+1)) {
switch(res.columnHeaders[h].name) {
case 'ga:visits': $.monstra.ganalytics.setVisits(res.rows[r][h]); break;
case 'ga:pageviews': $.monstra.ganalytics.setPageviews(res.rows[r][h]); break;
case 'ga:visitors': $.monstra.ganalytics.setVisitors(res.rows[r][h]); break;
}
}
}
dataArr.push(tmpr);
}
var data = google.visualization.arrayToDataTable(dataArr);
var options = {
title: 'Visits',
hAxis: {title: 'Date', titleTextStyle: {color: '#333'}},
vAxis: {minValue: 0}
};
var chart = new google.visualization.AreaChart(document.getElementById('gaChart'));
chart.draw(data, options);
},
formatDate: function(dateObj){
var m = dateObj.getMonth()+1;
var d = dateObj.getDate();
m = m > 9 ? m : '0'+m;
d = d > 9 ? d : '0'+d;
return dateObj.getFullYear() +'-'+ m +'-'+ d;
},
show: function(selector){
$('.gaSettingsLink').show();
$('#gaAlerts').html('');
$($.monstra.ganalytics._gaAreas).addClass('hide');
$(selector).removeClass('hide').show();
},
showError: function(msg, errCode){
if (typeof errCode !== 'undefined' && errCode == 403) {
$.monstra.ganalytics.show('#reauthError,#gaHelpLink');
} else {
$.monstra.ganalytics.show('#gaHelpLink');
}
$('#gaAlerts').html(msg);
$('#authOk').addClass('hide');
},
setVisits: function(val){
$('#gaVisits').html(val);
},
setVisitors: function(val){
$('#gaVisitors').html(val);
},
setPageviews: function(val){
$('#gaPageviews').html(val);
}
};
$(document).ready(function(){
$val_gaInitData = $('#gaInitData').val();
if ($val_gaInitData !== undefined) {
$.monstra.ganalytics.init($.parseJSON($val_gaInitData));
}
});
================================================
FILE: plugins/box/dashboard/languages/cs.lang.php
================================================
array(
'Dashboard' => 'Dashboard',
'Dashboard plugin for Monstra' => 'Dashboard plugin pro Monstra',
'Welcome back' => 'Vítejte zpět',
'Create New' => 'Vytvořit nový',
'Upload File' => 'Nahrát soubor',
)
);
================================================
FILE: plugins/box/dashboard/languages/de.lang.php
================================================
array(
'Dashboard' => 'Dashboard',
'Dashboard plugin for Monstra' => 'Dashboard plugin für Monstra',
'Welcome back' => 'Willkommen zurück',
'Create New' => 'Erstelle neue',
'Upload File' => 'Datei hochladen',
)
);
================================================
FILE: plugins/box/dashboard/languages/en.lang.php
================================================
array(
'Dashboard' => 'Dashboard',
'Dashboard plugin for Monstra' => 'Dashboard plugin for Monstra',
'Welcome back' => 'Welcome back',
'Create New' => 'Create New',
'Upload File' => 'Upload File',
)
);
================================================
FILE: plugins/box/dashboard/languages/es.lang.php
================================================
array(
'Dashboard' => 'Escritorio',
'Dashboard plugin for Monstra' => 'Dashboard plugin for Monstra',
'Welcome back' => 'Bienvenido nuevamente',
'Create New' => 'Crear nuevo',
'Upload File' => 'Subir archivo',
)
);
================================================
FILE: plugins/box/dashboard/languages/ka-ge.lang.php
================================================
array(
'Dashboard' => 'პანელი',
'Dashboard plugin for Monstra' => 'პანელი Monstra-თვის',
'Welcome back' => 'მოგესალმებით',
'Create New' => 'დამატება',
'Upload File' => 'ფაილის ატვირთვა',
)
);
================================================
FILE: plugins/box/dashboard/languages/pl.lang.php
================================================
array(
'Dashboard' => 'Kokpit',
'Dashboard plugin for Monstra' => 'Wtyczka kokpitu dla systemu Monstra',
'Welcome back' => 'Witam ponownie',
'Create New' => 'Utwórz nowy',
'Upload File' => 'Prześlij plik',
)
);
================================================
FILE: plugins/box/dashboard/languages/ru.lang.php
================================================
array(
'Dashboard' => 'Панель',
'Dashboard plugin for Monstra' => 'Панель для Monstra',
'Welcome back' => 'Добро пожаловать',
'Create New' => 'Добавить',
'Upload File' => 'Загрузить Файл',
)
);
================================================
FILE: plugins/box/dashboard/languages/sr.lang.php
================================================
array(
'Dashboard' => 'Komandna tabla',
'Dashboard plugin for Monstra' => 'Komandna tabla dodatak za Monstra',
'Welcome back' => 'Dobrodošli natrag',
'Create New' => 'Kreiraj novo',
'Upload File' => 'Otpremi fajl',
)
);
================================================
FILE: plugins/box/dashboard/languages/tr.lang.php
================================================
array(
'Dashboard' => 'Pano',
'Dashboard plugin for Monstra' => 'Monstra için pano eklentisi',
'Welcome back' => 'Merhaba',
'Create New' => 'Yeni Oluştur',
'Upload File' => 'Dosya Yükle',
)
);
================================================
FILE: plugins/box/dashboard/languages/uk.lang.php
================================================
array(
'Dashboard' => 'Панель',
'Dashboard plugin for Monstra' => 'Панель для Monstra',
'Welcome back' => 'Ласкаво просимо',
'Create New' => 'Додати',
'Upload File' => 'Завантажити файл',
)
);
================================================
FILE: plugins/box/dashboard/views/backend/ga.view.php
================================================
Option::get('ga_client_id'),
'apiKey' => Option::get('ga_api_key'),
'viewId' => Option::get('ga_view_id')
)); ?>' />
================================================
FILE: plugins/box/dashboard/views/backend/index.view.php
================================================
__('Upload File', 'filesmanager'), 'class' => 'btn btn-primary'))); ?>
================================================
FILE: plugins/box/editor/editor.plugin.php
================================================
');
}
}
================================================
FILE: plugins/box/editor/install/editor.manifest.xml
================================================
plugins/box/editor/editor.plugin.php
active
1
Editor
Editor plugin
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/editor/languages/cs.lang.php
================================================
array(
'Editor' => 'Editor',
'Editor plugin' => 'Editor plugin',
)
);
================================================
FILE: plugins/box/editor/languages/de.lang.php
================================================
array(
'Editor' => 'Editor',
'Editor plugin' => 'Editor Plugin',
)
);
================================================
FILE: plugins/box/editor/languages/en.lang.php
================================================
array(
'Editor' => 'Editor',
'Editor plugin' => 'Editor plugin',
)
);
================================================
FILE: plugins/box/editor/languages/es.lang.php
================================================
array(
'Editor' => 'Editor',
'Editor plugin' => 'Editor plugin',
)
);
================================================
FILE: plugins/box/editor/languages/fa.lang.php
================================================
array(
'Editor' => 'ویرایشگر',
'Editor plugin' => 'پلاگین ویرایشگر',
)
);
================================================
FILE: plugins/box/editor/languages/fr.lang.php
================================================
array(
'Editor' => 'Editeur',
'Editor plugin' => 'Plugin éditeur',
)
);
================================================
FILE: plugins/box/editor/languages/hu.lang.php
================================================
array(
'Editor' => 'Szerkesztő',
'Editor plugin' => 'Szerkesztő bővítmény',
)
);
================================================
FILE: plugins/box/editor/languages/it.lang.php
================================================
array(
'Editor' => 'Editor',
'Editor plugin' => 'Editor plugin',
)
);
================================================
FILE: plugins/box/editor/languages/ja.lang.php
================================================
array(
'Editor' => 'GfB^',
'Editor plugin' => 'GfB^vOC',
)
);
================================================
FILE: plugins/box/editor/languages/ka-ge.lang.php
================================================
array(
'Editor' => 'რედაქტორი',
'Editor plugin' => 'პლაგინი რედაქტორი',
)
);
================================================
FILE: plugins/box/editor/languages/lt.lang.php
================================================
array(
'Editor' => 'Redaktorius',
'Editor plugin' => 'Redaktoriaus papildinys',
)
);
================================================
FILE: plugins/box/editor/languages/nl.lang.php
================================================
array(
'Editor' => 'Editor',
'Editor plugin' => 'Editor Plugin',
)
);
================================================
FILE: plugins/box/editor/languages/pl.lang.php
================================================
array(
'Editor' => 'Edytor',
'Editor plugin' => 'Wtyczka edytora',
)
);
================================================
FILE: plugins/box/editor/languages/pt-br.lang.php
================================================
array(
'Editor' => 'Editor',
'Editor plugin' => 'Plugin do editor',
)
);
================================================
FILE: plugins/box/editor/languages/ru.lang.php
================================================
array(
'Editor' => 'Редактор',
'Editor plugin' => 'Редактор плагин',
)
);
================================================
FILE: plugins/box/editor/languages/sk.lang.php
================================================
array(
'Editor' => 'Editor',
'Editor plugin' => 'Editor plugin',
)
);
================================================
FILE: plugins/box/editor/languages/sr.lang.php
================================================
array(
'Editor' => 'Editor',
'Editor plugin' => 'Editor dodatak',
)
);
================================================
FILE: plugins/box/editor/languages/tr.lang.php
================================================
array(
'Editor' => 'Düzenleyici',
'Editor plugin' => 'Düzenleyici eklentisi',
)
);
================================================
FILE: plugins/box/editor/languages/uk.lang.php
================================================
array(
'Editor' => 'Редактор',
'Editor plugin' => 'Редактор плагіну',
)
);
================================================
FILE: plugins/box/editor/languages/zh-cn.lang.php
================================================
array(
'Editor' => '编辑器',
'Editor plugin' => '编辑器插件',
)
);
================================================
FILE: plugins/box/emails/css/.htaccess
================================================
Options -Indexes
Allow from all
================================================
FILE: plugins/box/emails/css/inc.css
================================================
/**********************************************
* Ink v1.0.5 - Copyright 2013 ZURB Inc *
**********************************************/
/* Client-specific Styles & Reset */
#outlook a {
padding:0;
}
body{
width:100% !important;
min-width: 100%;
-webkit-text-size-adjust:100%;
-ms-text-size-adjust:100%;
margin:0;
padding:0;
}
.ExternalClass {
width:100%;
}
.ExternalClass,
.ExternalClass p,
.ExternalClass span,
.ExternalClass font,
.ExternalClass td,
.ExternalClass div {
line-height: 100%;
}
#backgroundTable {
margin:0;
padding:0;
width:100% !important;
line-height: 100% !important;
}
img {
outline:none;
text-decoration:none;
-ms-interpolation-mode: bicubic;
width: auto;
max-width: 100%;
float: left;
clear: both;
display: block;
}
center {
width: 100%;
min-width: 580px;
}
a img {
border: none;
}
p {
margin: 0 0 0 10px;
}
table {
border-spacing: 0;
border-collapse: collapse;
}
td {
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
border-collapse: collapse !important;
}
table, tr, td {
padding: 0;
vertical-align: top;
text-align: left;
}
hr {
color: #d9d9d9;
background-color: #d9d9d9;
height: 1px;
border: none;
}
/* Responsive Grid */
table.body {
height: 100%;
width: 100%;
}
table.container {
width: 580px;
margin: 0 auto;
text-align: inherit;
}
table.row {
padding: 0px;
width: 100%;
position: relative;
}
table.container table.row {
display: block;
}
td.wrapper {
padding: 10px 20px 0px 0px;
position: relative;
}
table.columns,
table.column {
margin: 0 auto;
}
table.columns td,
table.column td {
padding: 0px 0px 10px;
}
table.columns td.sub-columns,
table.column td.sub-columns,
table.columns td.sub-column,
table.column td.sub-column {
padding-right: 10px;
}
td.sub-column, td.sub-columns {
min-width: 0px;
}
table.row td.last,
table.container td.last {
padding-right: 0px;
}
table.one { width: 30px; }
table.two { width: 80px; }
table.three { width: 130px; }
table.four { width: 180px; }
table.five { width: 230px; }
table.six { width: 280px; }
table.seven { width: 330px; }
table.eight { width: 380px; }
table.nine { width: 430px; }
table.ten { width: 480px; }
table.eleven { width: 530px; }
table.twelve { width: 580px; }
table.one center { min-width: 30px; }
table.two center { min-width: 80px; }
table.three center { min-width: 130px; }
table.four center { min-width: 180px; }
table.five center { min-width: 230px; }
table.six center { min-width: 280px; }
table.seven center { min-width: 330px; }
table.eight center { min-width: 380px; }
table.nine center { min-width: 430px; }
table.ten center { min-width: 480px; }
table.eleven center { min-width: 530px; }
table.twelve center { min-width: 580px; }
table.one .panel center { min-width: 10px; }
table.two .panel center { min-width: 60px; }
table.three .panel center { min-width: 110px; }
table.four .panel center { min-width: 160px; }
table.five .panel center { min-width: 210px; }
table.six .panel center { min-width: 260px; }
table.seven .panel center { min-width: 310px; }
table.eight .panel center { min-width: 360px; }
table.nine .panel center { min-width: 410px; }
table.ten .panel center { min-width: 460px; }
table.eleven .panel center { min-width: 510px; }
table.twelve .panel center { min-width: 560px; }
.body .columns td.one,
.body .column td.one { width: 8.333333%; }
.body .columns td.two,
.body .column td.two { width: 16.666666%; }
.body .columns td.three,
.body .column td.three { width: 25%; }
.body .columns td.four,
.body .column td.four { width: 33.333333%; }
.body .columns td.five,
.body .column td.five { width: 41.666666%; }
.body .columns td.six,
.body .column td.six { width: 50%; }
.body .columns td.seven,
.body .column td.seven { width: 58.333333%; }
.body .columns td.eight,
.body .column td.eight { width: 66.666666%; }
.body .columns td.nine,
.body .column td.nine { width: 75%; }
.body .columns td.ten,
.body .column td.ten { width: 83.333333%; }
.body .columns td.eleven,
.body .column td.eleven { width: 91.666666%; }
.body .columns td.twelve,
.body .column td.twelve { width: 100%; }
td.offset-by-one { padding-left: 50px; }
td.offset-by-two { padding-left: 100px; }
td.offset-by-three { padding-left: 150px; }
td.offset-by-four { padding-left: 200px; }
td.offset-by-five { padding-left: 250px; }
td.offset-by-six { padding-left: 300px; }
td.offset-by-seven { padding-left: 350px; }
td.offset-by-eight { padding-left: 400px; }
td.offset-by-nine { padding-left: 450px; }
td.offset-by-ten { padding-left: 500px; }
td.offset-by-eleven { padding-left: 550px; }
td.expander {
visibility: hidden;
width: 0px;
padding: 0 !important;
}
table.columns .text-pad,
table.column .text-pad {
padding-left: 10px;
padding-right: 10px;
}
table.columns .left-text-pad,
table.columns .text-pad-left,
table.column .left-text-pad,
table.column .text-pad-left {
padding-left: 10px;
}
table.columns .right-text-pad,
table.columns .text-pad-right,
table.column .right-text-pad,
table.column .text-pad-right {
padding-right: 10px;
}
/* Block Grid */
.block-grid {
width: 100%;
max-width: 580px;
}
.block-grid td {
display: inline-block;
padding:10px;
}
.two-up td {
width:270px;
}
.three-up td {
width:173px;
}
.four-up td {
width:125px;
}
.five-up td {
width:96px;
}
.six-up td {
width:76px;
}
.seven-up td {
width:62px;
}
.eight-up td {
width:52px;
}
/* Alignment & Visibility Classes */
table.center, td.center {
text-align: center;
}
h1.center,
h2.center,
h3.center,
h4.center,
h5.center,
h6.center {
text-align: center;
}
span.center {
display: block;
width: 100%;
text-align: center;
}
img.center {
margin: 0 auto;
float: none;
}
.show-for-small,
.hide-for-desktop {
display: none;
}
/* Typography */
body, table.body, h1, h2, h3, h4, h5, h6, p, td {
color: #222222;
font-family: "Helvetica", "Arial", sans-serif;
font-weight: normal;
padding:0;
margin: 0;
text-align: left;
line-height: 1.3;
}
h1, h2, h3, h4, h5, h6 {
word-break: normal;
}
h1 {font-size: 40px;}
h2 {font-size: 36px;}
h3 {font-size: 32px;}
h4 {font-size: 28px;}
h5 {font-size: 24px;}
h6 {font-size: 20px;}
body, table.body, p, td {font-size: 14px;line-height:19px;}
p.lead, p.lede, p.leed {
font-size: 18px;
line-height:21px;
}
p {
margin-bottom: 10px;
}
small {
font-size: 10px;
}
a {
color: #2ba6cb;
text-decoration: none;
}
a:hover {
color: #2795b6 !important;
}
a:active {
color: #2795b6 !important;
}
a:visited {
color: #2ba6cb !important;
}
h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
color: #2ba6cb;
}
h1 a:active,
h2 a:active,
h3 a:active,
h4 a:active,
h5 a:active,
h6 a:active {
color: #2ba6cb !important;
}
h1 a:visited,
h2 a:visited,
h3 a:visited,
h4 a:visited,
h5 a:visited,
h6 a:visited {
color: #2ba6cb !important;
}
/* Panels */
.panel {
background: #f2f2f2;
border: 1px solid #d9d9d9;
padding: 10px !important;
}
.sub-grid table {
width: 100%;
}
.sub-grid td.sub-columns {
padding-bottom: 0;
}
/* Buttons */
table.button,
table.tiny-button,
table.small-button,
table.medium-button,
table.large-button {
width: 100%;
overflow: hidden;
}
table.button td,
table.tiny-button td,
table.small-button td,
table.medium-button td,
table.large-button td {
display: block;
width: auto !important;
text-align: center;
background: #2ba6cb;
border: 1px solid #2284a1;
color: #ffffff;
padding: 8px 0;
}
table.tiny-button td {
padding: 5px 0 4px;
}
table.small-button td {
padding: 8px 0 7px;
}
table.medium-button td {
padding: 12px 0 10px;
}
table.large-button td {
padding: 21px 0 18px;
}
table.button td a,
table.tiny-button td a,
table.small-button td a,
table.medium-button td a,
table.large-button td a {
font-weight: bold;
text-decoration: none;
font-family: Helvetica, Arial, sans-serif;
color: #ffffff;
font-size: 16px;
}
table.tiny-button td a {
font-size: 12px;
font-weight: normal;
}
table.small-button td a {
font-size: 16px;
}
table.medium-button td a {
font-size: 20px;
}
table.large-button td a {
font-size: 24px;
}
table.button:hover td,
table.button:visited td,
table.button:active td {
background: #2795b6 !important;
}
table.button:hover td a,
table.button:visited td a,
table.button:active td a {
color: #fff !important;
}
table.button:hover td,
table.tiny-button:hover td,
table.small-button:hover td,
table.medium-button:hover td,
table.large-button:hover td {
background: #2795b6 !important;
}
table.button:hover td a,
table.button:active td a,
table.button td a:visited,
table.tiny-button:hover td a,
table.tiny-button:active td a,
table.tiny-button td a:visited,
table.small-button:hover td a,
table.small-button:active td a,
table.small-button td a:visited,
table.medium-button:hover td a,
table.medium-button:active td a,
table.medium-button td a:visited,
table.large-button:hover td a,
table.large-button:active td a,
table.large-button td a:visited {
color: #ffffff !important;
}
table.secondary td {
background: #e9e9e9;
border-color: #d0d0d0;
color: #555;
}
table.secondary td a {
color: #555;
}
table.secondary:hover td {
background: #d0d0d0 !important;
color: #555;
}
table.secondary:hover td a,
table.secondary td a:visited,
table.secondary:active td a {
color: #555 !important;
}
table.success td {
background: #5da423;
border-color: #457a1a;
}
table.success:hover td {
background: #457a1a !important;
}
table.alert td {
background: #c60f13;
border-color: #970b0e;
}
table.alert:hover td {
background: #970b0e !important;
}
table.radius td {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
table.round td {
-webkit-border-radius: 500px;
-moz-border-radius: 500px;
border-radius: 500px;
}
/* Outlook First */
body.outlook p {
display: inline !important;
}
/* Media Queries */
@media only screen and (max-width: 600px) {
table[class="body"] img {
width: auto !important;
height: auto !important;
}
table[class="body"] center {
min-width: 0 !important;
}
table[class="body"] .container {
width: 95% !important;
}
table[class="body"] .row {
width: 100% !important;
display: block !important;
}
table[class="body"] .wrapper {
display: block !important;
padding-right: 0 !important;
}
table[class="body"] .columns,
table[class="body"] .column {
table-layout: fixed !important;
float: none !important;
width: 100% !important;
padding-right: 0px !important;
padding-left: 0px !important;
display: block !important;
}
table[class="body"] .wrapper.first .columns,
table[class="body"] .wrapper.first .column {
display: table !important;
}
table[class="body"] table.columns td,
table[class="body"] table.column td {
width: 100% !important;
}
table[class="body"] .columns td.one,
table[class="body"] .column td.one { width: 8.333333% !important; }
table[class="body"] .columns td.two,
table[class="body"] .column td.two { width: 16.666666% !important; }
table[class="body"] .columns td.three,
table[class="body"] .column td.three { width: 25% !important; }
table[class="body"] .columns td.four,
table[class="body"] .column td.four { width: 33.333333% !important; }
table[class="body"] .columns td.five,
table[class="body"] .column td.five { width: 41.666666% !important; }
table[class="body"] .columns td.six,
table[class="body"] .column td.six { width: 50% !important; }
table[class="body"] .columns td.seven,
table[class="body"] .column td.seven { width: 58.333333% !important; }
table[class="body"] .columns td.eight,
table[class="body"] .column td.eight { width: 66.666666% !important; }
table[class="body"] .columns td.nine,
table[class="body"] .column td.nine { width: 75% !important; }
table[class="body"] .columns td.ten,
table[class="body"] .column td.ten { width: 83.333333% !important; }
table[class="body"] .columns td.eleven,
table[class="body"] .column td.eleven { width: 91.666666% !important; }
table[class="body"] .columns td.twelve,
table[class="body"] .column td.twelve { width: 100% !important; }
table[class="body"] td.offset-by-one,
table[class="body"] td.offset-by-two,
table[class="body"] td.offset-by-three,
table[class="body"] td.offset-by-four,
table[class="body"] td.offset-by-five,
table[class="body"] td.offset-by-six,
table[class="body"] td.offset-by-seven,
table[class="body"] td.offset-by-eight,
table[class="body"] td.offset-by-nine,
table[class="body"] td.offset-by-ten,
table[class="body"] td.offset-by-eleven {
padding-left: 0 !important;
}
table[class="body"] table.columns td.expander {
width: 1px !important;
}
table[class="body"] .right-text-pad,
table[class="body"] .text-pad-right {
padding-left: 10px !important;
}
table[class="body"] .left-text-pad,
table[class="body"] .text-pad-left {
padding-right: 10px !important;
}
table[class="body"] .hide-for-small,
table[class="body"] .show-for-desktop {
display: none !important;
}
table[class="body"] .show-for-small,
table[class="body"] .hide-for-desktop {
display: inherit !important;
}
}
================================================
FILE: plugins/box/emails/emails.admin.php
================================================
:name have been saved.', 'emails', array(':name' => Request::post('email_template_name'))));
if (Request::post('edit_email_template_and_exit')) {
Request::redirect('index.php?id=emails');
} else {
Request::redirect('index.php?id=emails&action=edit_email_template&filename='.Request::post('email_template_name'));
}
}
}
$content = File::getContent($email_templates_path.Request::get('filename').'.email.php');
// Display view
View::factory('box/emails/views/backend/edit')
->assign('content', $content)
->display();
break;
}
} else {
// Get email templates
$email_templates_list = File::scan($email_templates_path, '.email.php');
// Display view
View::factory('box/emails/views/backend/index')
->assign('email_templates_list', $email_templates_list)
->display();
}
}
}
================================================
FILE: plugins/box/emails/emails.plugin.php
================================================
plugins/box/emails/emails.plugin.php
active
15
Emails
Emails plugin for Monstra
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/emails/languages/cs.lang.php
================================================
array(
'Emails' => 'Emaily',
'Emails plugin for Monstra' => 'Email plugin pro Monstra',
'Edit Layout' => 'Upravit layout',
'Email templates' => 'Vzory emailů',
'Edit' => 'Upravit',
'Edit Email Template' => 'Upravit vzory emailů',
'Name' => 'Název',
'Email template content' => 'Obsah vzoru emailu',
'Save and Exit' => 'Uložit a ukončit',
'Save' => 'Uložit',
'Cancel' => 'Zrušit',
'This email template does not exist' => 'Tento vzor emailu neexistuje',
'Your changes to the email template :name have been saved.' => 'Vaše změny vzoru emailu :name byly uloženy.',
)
);
================================================
FILE: plugins/box/emails/languages/de.lang.php
================================================
array(
'Emails' => 'Emails',
'Emails plugin for Monstra' => 'Email Plugin für Monstra',
'Edit Layout' => 'Bearbeite Layout',
'Email templates' => 'Email Templates',
'Edit' => 'Bearbeiten',
'Edit Email Template' => 'Bearbeite Email Template',
'Name' => 'Name',
'Email template content' => 'Email Template Inhalt',
'Save and Exit' => 'Speichern und Beenden',
'Save' => 'Speichern',
'Cancel' => 'Abbrechen',
'This email template does not exist' => 'Dieses Email Template existiert nicht',
'Your changes to the email template :name have been saved.' => 'Deine Änderung am Email Template :name wurden gespeichert.',
)
);
================================================
FILE: plugins/box/emails/languages/en.lang.php
================================================
array(
'Emails' => 'Emails',
'Emails plugin for Monstra' => 'Emails plugin for Monstra',
'Edit Layout' => 'Edit Layout',
'Email templates' => 'Email templates',
'Edit' => 'Edit',
'Edit Email Template' => 'Edit Email Template',
'Name' => 'Name',
'Email template content' => 'Email template content',
'Save and Exit' => 'Save and Exit',
'Save' => 'Save',
'Cancel' => 'Cancel',
'This email template does not exist' => 'This email template does not exist',
'Your changes to the email template :name have been saved.' => 'Your changes to the email template :name have been saved.',
)
);
================================================
FILE: plugins/box/emails/languages/es.lang.php
================================================
array(
'Emails' => 'Emails',
'Emails plugin for Monstra' => 'Emails plugin for Monstra',
'Edit Layout' => 'Editar diseño',
'Email templates' => 'Plantillas de email',
'Edit' => 'Editar',
'Edit Email Template' => 'Editar plantilla de email',
'Name' => 'Nombre',
'Email template content' => 'Contenido de la plantilla de email',
'Save and Exit' => 'Guardar y salir',
'Save' => 'Guardar',
'Cancel' => 'Cancelar',
'This email template does not exist' => 'Esta plantilla de email no existe',
'Your changes to the email template :name have been saved.' => 'Tus cambios en la plantilla de email :name han sido guardados.',
)
);
================================================
FILE: plugins/box/emails/languages/ka-ge.lang.php
================================================
array(
'Emails' => 'ელ-ფოსტები',
'Emails plugin for Monstra' => 'პლაგინი ელ-ფოსტები Monstra-თვის',
'Edit Layout' => 'ნიმუშის რედაქტირება',
'Email templates' => 'წერილების ნიმუში',
'Edit' => 'რედაქტირება',
'Edit Email Template' => 'ელ-ფოსტების ნიმუშის რედაქტირება',
'Name' => 'სახელი',
'Email template content' => 'ელ-ფოსტის კონტენტის ნიმუში',
'Save and Exit' => 'შენახვა და შემდეგ გამოსვლა',
'Save' => 'შენახვა',
'Cancel' => 'გაუქმება',
'This email template does not exist' => 'ასეთი ელ-ფოსტის ნიმუში არ არსებობს',
'Your changes to the email template :name have been saved.' => 'ელ-ფოსტის ნიმუშის ცვლილებები :name დამახსოვრებულია.',
)
);
================================================
FILE: plugins/box/emails/languages/pl.lang.php
================================================
array(
'Emails' => 'Wiadomości e-mail',
'Emails plugin for Monstra' => 'Wtyczka wiadomości e-mail dla systemu Monstra',
'Edit Layout' => 'Edit Layout',
'Email templates' => 'Email templates',
'Edit' => 'Edit',
'Edit Email Template' => 'Edit Email Template',
'Name' => 'Name',
'Email template content' => 'Email template content',
'Save and Exit' => 'Save and Exit',
'Save' => 'Save',
'Cancel' => 'Cancel',
'This email template does not exist' => 'This email template does not exist',
'Your changes to the email template :name have been saved.' => 'Your changes to the email template :name have been saved.',
)
);
================================================
FILE: plugins/box/emails/languages/ru.lang.php
================================================
array(
'Emails' => 'Письма',
'Emails plugin for Monstra' => 'Плагин emails для Monstra',
'Edit Layout' => 'Редактировать Шаблон',
'Email templates' => 'Шаблоны Писем',
'Edit' => 'Редактировать',
'Edit Email Template' => 'Редактировать Шаблоны Письма',
'Name' => 'Название',
'Email template content' => 'Конент Шаблона Письма',
'Save and Exit' => 'Сохранить и выйты',
'Save' => 'Сохранить',
'Cancel' => 'Отменить',
'This email template does not exist' => 'Этот емейл шаблон отсутствует',
'Your changes to the email template :name have been saved.' => 'Ваши изменения к емейл шаблону :name были сохранены.',
)
);
================================================
FILE: plugins/box/emails/languages/sr.lang.php
================================================
array(
'Emails' => 'Email',
'Emails plugin for Monstra' => 'Email dodatak za Monstra',
'Edit Layout' => 'Izmeni izgled',
'Email templates' => 'Email šabloni',
'Edit' => 'Izmeni',
'Edit Email Template' => 'Izmeni izgled šablonu',
'Name' => 'Ime',
'Email template content' => 'Email sadržaj šablona',
'Save and Exit' => 'Sačuvaj i izađi',
'Save' => 'Sačuvaj',
'Cancel' => 'Otkaži',
'This email template does not exist' => 'Ovaj šablon ne postoji',
'Your changes to the email template :name have been saved.' => 'Tvoje promene na šablonu :name su uspešno sačuvane.',
)
);
================================================
FILE: plugins/box/emails/languages/tr.lang.php
================================================
array(
'Emails' => 'E-postalar',
'Emails plugin for Monstra' => 'Monstra için e-posta eklentisi',
'Edit Layout' => 'Mizanpajı Düzenle',
'Email templates' => 'E-posta şablonları',
'Edit' => 'Düzenle',
'Edit Email Template' => 'E-posta Şablonunu Düzenle',
'Name' => 'Ad',
'Email template content' => 'E-posta şablonu içeriği',
'Save and Exit' => 'Kaydet ve Çık',
'Save' => 'Kaydet',
'Cancel' => 'Vazgeç',
'This email template does not exist' => 'Bu e-posta şablonu bulunamadı',
'Your changes to the email template :name have been saved.' => 'Değişiklikleriniz :name adlı e-posta şablonuna kaydedildi.',
)
);
================================================
FILE: plugins/box/emails/languages/uk.lang.php
================================================
array(
'Emails' => 'Листи',
'Emails plugin for Monstra' => 'Плагін emails для Monstra',
'Edit Layout' => 'Редагувати Шаблон',
'Email templates' => 'Шаблони Листів',
'Edit' => 'Редагувати',
'Edit Email Template' => 'Редагувати Шаблони Листа',
'Name' => 'Назва',
'Email template content' => 'Вміст Шаблону Листа',
'Save and Exit' => 'Зберегти і вийти',
'Save' => 'Зберегти',
'Cancel' => 'Відмінити',
'This email template does not exist' => 'Цей email шаблон відсутній',
'Your changes to the email template :name have been saved.' => 'Ваші зміни до email шаблону :name були збережені.',
)
);
================================================
FILE: plugins/box/emails/views/backend/edit.view.php
================================================
'form-control'))); ?>.email.php
'width:100%;height:400px;', 'class' => 'source-editor form-control'))
);
?>
'btn btn-phone btn-primary')).Html::nbsp(2).
Form::submit('edit_email_template', __('Save', 'emails'), array('class' => 'btn btn-phone btn-primary')). Html::nbsp(2).
Html::anchor(__('Cancel', 'emails'), 'index.php?id=emails', array('title' => __('Cancel', 'emails'), 'class' => 'btn btn-phone btn-default')).
Form::close()
);
} else {
echo '';
}
?>
================================================
FILE: plugins/box/emails/views/backend/index.view.php
================================================
__('Edit Layout', 'emails'), 'class' => 'btn btn-phone btn-primary'))
);
?>
'btn btn-primary')); ?>
================================================
FILE: plugins/box/emails/views/emails/email_layout.view.php
================================================
================================================
FILE: plugins/box/filesmanager/css/.htaccess
================================================
Options -Indexes
Allow from all
================================================
FILE: plugins/box/filesmanager/css/style.css
================================================
.upload-area {
border:2px dashed #DEDEDE;
width:200px;
color:#DEDEDE;
text-align: center;
height: 34px;
display: inline-block;
float:left;
margin-left: 10px;
}
.upload-area-dragenter {
border: 2px dashed #428bca !important;
}
.upload-area-drop {
border: 2px dashed #428bca;
}
.upload-progress {
height: 100%;
width: 0;
background-color: #428bca;
position: relative;
float: left;
max-width: 100%;
color: #ffffff;
}
.upload-file-info {
display: inline-block;
float: left;
}
.fileupload-controls {
float: left;
}
.upload-file-pholder {
padding-top: 5px;
}
.file-size-max-upload {
color: #ccc;
text-decoration: none;
}
.file-size-max-upload:hover {
color: #ccc;
cursor: default;
text-decoration: none;
}
@media (max-width: 320px) {
.create-new-dir {
float:left!important;
}
}
================================================
FILE: plugins/box/filesmanager/filesmanager.admin.php
================================================
assign('path', $path)
->assign('current', $current)
->assign('files_list', $files_list)
->assign('dir_list', $dir_list)
->assign('forbidden_types', $forbidden_types)
->assign('image_types', $image_types)
->assign('site_url', $site_url)
->assign('upload_max_filesize', FilesmanagerAdmin::uploadSize())
->assign('files_path', $files_path)
->assign('fileuploader', array(
'uploadUrl' => $site_url.'/admin/index.php?id=filesmanager&path='.$path,
'csrf' => Security::token(),
'errorMsg' => __('Upload server error', 'filesmanager')
))->display();
}
/**
* Get directories and files in current path
*/
protected static function fdir($dir, $type = null)
{
$files = array();
$c = 0;
$_dir = $dir;
if (is_dir($dir)) {
$dir = opendir ($dir);
while (false !== ($file = readdir($dir))) {
if (($file !=".") && ($file !="..")) {
$c++;
if (is_dir($_dir.$file)) {
$files['dirs'][$c] = $file;
} else {
$files['files'][$c] = $file;
}
}
}
closedir($dir);
return $files;
} else {
return false;
}
}
/**
* Get Upload Size
*/
public static function uploadSize()
{
return Number::byteFormat(min(Number::convertToBytes(ini_get('upload_max_filesize')),
Number::convertToBytes(ini_get('post_max_size'))));
}
}
================================================
FILE: plugins/box/filesmanager/filesmanager.plugin.php
================================================
plugins/box/filesmanager/filesmanager.plugin.php
active
2
FilesManager
Simple file manger for Monstra
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/filesmanager/js/.htaccess
================================================
Options -Indexes
Allow from all
================================================
FILE: plugins/box/filesmanager/js/filesmanager.js
================================================
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.filesmanager = {
init: function(){
$('#filesDirsList').on('click', '.js-rename-dir', function(e){
$.monstra.filesmanager.showRenameDialog(
'dir',
$(e.currentTarget).attr('data-dirname'),
$(e.currentTarget).attr('data-path')
);
});
$('#filesDirsList').on('click', '.js-rename-file', function(e){
$.monstra.filesmanager.showRenameDialog(
'file',
$(e.currentTarget).attr('data-filename'),
$(e.currentTarget).attr('data-path')
);
});
$('#filesDirsList').on('click', '.js-file-info', function(e, el){
$.monstra.filesmanager.showInfoDialog(e.currentTarget);
});
},
showRenameDialog: function(type, renameFrom, path){
var dialog = $('#renameDialog');
dialog.find('input[name="rename_type"]').val(type);
dialog.find('input[name="rename_from"]').val(renameFrom);
dialog.find('input[name="path"]').val(path);
dialog.find('#renameToHolder').text(renameFrom);
dialog.find('[id$="RenameType"]').hide();
dialog.find('#'+ type +'RenameType').show();
dialog.modal('show');
},
showInfoDialog: function(btnEl){
var dialog = $('#fileInfoDialog');
dialog.find('.js-dimension-blck').hide();
dialog.find('.js-filename').html($(btnEl).attr('data-filename'));
dialog.find('.js-filetype').html($(btnEl).attr('data-filetype'));
dialog.find('.js-filesize').html($(btnEl).attr('data-filesize'));
dialog.find('.js-link').html($(btnEl).attr('data-link'));
var dimension = $(btnEl).attr('data-dimension').trim();
if (dimension) {
dialog.find('.js-dimension').html(dimension);
dialog.find('.js-dimension-blck').show();
}
dialog.modal('show');
}
};
$(document).ready(function(){
$.monstra.filesmanager.init();
});
================================================
FILE: plugins/box/filesmanager/js/fileuploader.js
================================================
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.fileuploader = {
conf: {
uploadUrl: '',
csrf: '',
errorMsg: '',
uploaderId: ''
},
_uploaderObj: null,
init: function(conf){
if (!conf.uploaderId) {
throw 'uploaderId not specified';
}
$.extend(this.conf, conf);
this._uploaderObj = $('#'+ this.conf.uploaderId);
var area = this._uploaderObj.find('.upload-area');
area.off('dragenter.fuploader').on('dragenter.fuploader', function(e){
e.stopPropagation();
e.preventDefault();
$(this).addClass('upload-area-dragenter');
});
area.off('dragover.fuploader').on('dragover.fuploader', function(e){
e.stopPropagation();
e.preventDefault();
});
area.off('drop.fuploader').on('drop.fuploader', function(e){
$(this).removeClass('upload-area-dragenter').removeClass('upload-area-dragover').addClass('upload-area-drop');
e.preventDefault();
var files = e.originalEvent.dataTransfer.files;
$.monstra.fileuploader.uploadFileHandle(files, area);
});
$(document).off('dragover.fuploader').on('dragover.fuploader', function(e){
e.stopPropagation();
e.preventDefault();
area.removeClass('upload-area-dragenter').removeClass('upload-area-drop').addClass('upload-area-dragover');
});
$(document).off('dragenter.fuploader').on('dragenter.fuploader', function(e){
e.stopPropagation();
e.preventDefault();
});
$(document).off('drop.fuploader').on('drop.fuploader', function(e){
e.stopPropagation();
e.preventDefault();
});
},
uploadFileHandle: function(files, area){
for (var i = 0; i < files.length; i++){
var fd = new FormData();
fd.append('file', files[i]);
fd.append('upload_file', 'upload_file');
fd.append('dragndrop', '1');
fd.append('csrf', $.monstra.fileuploader.conf.csrf);
//this.setFileNameSize(files[i].name, files[i].size);
this.uploadFile(fd, status);
}
},
uploadFile: function(formData, status){
var jqXHR = $.ajax({
url: $.monstra.fileuploader.conf.uploadUrl,
type: 'POST',
contentType: false,
processData: false,
cache: false,
data: formData,
xhr: function() {
var xhrobj = $.ajaxSettings.xhr();
if (xhrobj.upload) {
xhrobj.upload.addEventListener('progress', function(event) {
var percent = 0;
var position = event.loaded || event.position;
var total = event.total;
if (event.lengthComputable) {
percent = Math.ceil(position / total * 100);
}
$.monstra.fileuploader.setProgress(percent);
}, false);
}
return xhrobj;
},
success: function(data){
$.monstra.fileuploader.setProgress(100);
$.event.trigger('uploaded.fuploader');
},
error: function(){
Messenger().post({
type: 'error',
message : $.monstra.fileuploader.conf.errorMsg,
hideAfter: 3
});
this._uploaderObj.find('.upload-progress').animate({ width: 0 }, 1);
this._uploaderObj.find('.upload-file-pholder').show();
}
});
},
setProgress: function(progress){
if (parseInt(progress) > 0) {
this._uploaderObj.find('.upload-file-pholder').hide();
}
var progressBarWidth = progress * this._uploaderObj.find('.upload-area').width() / 100;
this._uploaderObj.find('.upload-progress').animate({ width: progressBarWidth }, 10);
},
setFileNameSize: function(fname, fsize){
var sizeStr = '';
var sizeKB = fsize / 1024;
if(parseInt(sizeKB) > 1024){
var sizeMB = sizeKB/1024;
sizeStr = sizeMB.toFixed(2)+' MB';
} else {
sizeStr = sizeKB.toFixed(2)+' KB';
}
this._uploaderObj.find('.upload-file-info').html(fname +' '+ sizeStr);
}
};
================================================
FILE: plugins/box/filesmanager/languages/cs.lang.php
================================================
array(
'Files' => 'Soubory',
'Files manager' => 'Správce souborů',
'Name' => 'Název',
'Actions' => 'Akce',
'Delete' => 'Vymazat',
'Upload' => 'Nahrat',
'Drop File Here' => 'Sem vložte soubory',
'Maximum upload file size: :upload_max_filesize' => 'Maximální velikost souboru: :upload_max_filesize',
'Rename' => 'Přejmenovat',
'Renamed successfully' => 'Přejmenováno',
'Failure' => 'Chyba',
'Forbidden file type' => 'Nepovolený typ souboru',
'Upload server error' => 'Chyba při nahrávání',
'Can not be empty' => 'Nesmí být prázdné',
'Create New Directory' => 'Vytvořit nový adresář',
'Directory Name' => 'Název adresáře',
'Directory:' => 'Adresář:',
'Directory was not created' => 'Adresář nebyl vytvořen',
'Directory was created' => 'Adresář byl vytvořen',
'Directory was deleted' => 'Adresář byl odstraněn',
'Directory was not deleted' => 'Adresář nebyl odstraněn',
'Directory exists' => 'Adresář existuje',
'File:' => 'Soubor:',
'File was uploaded' => 'Soubor nebyl vytvořen',
'File was not uploaded' => 'Soubor byl vytvořen',
'File was deleted' => 'Soubor byl odstraněn',
'File was not deleted' => 'Soubor nebyl odstraněn',
'File exists' => 'Soubor existuje',
'Cancel' => 'Zrušit',
'Create' => 'Vytvořit',
'directory' => 'adresář',
'Delete directory: :dir' => 'Vymazat adresář: :dir',
'Delete file: :file' => 'Vymazat soubor :file',
'Extension' => 'Přípona',
'Size' => 'Velikost',
'Select file' => 'Vybrat soubor',
)
);
================================================
FILE: plugins/box/filesmanager/languages/de.lang.php
================================================
array(
'Files' => 'Dateien',
'Files manager' => 'Datei-Manager',
'Name' => 'Name',
'Actions' => 'Aktionen',
'Delete' => 'Löschen',
'Upload' => 'Hochladen',
'directory' => 'Ordner',
'Delete directory: :dir' => 'Lösche Ordner: :dir',
'Delete file: :file' => 'Lösche Datei: file',
'Extension' => 'Dateiendung',
'Size' => 'Größe',
'Select file' => 'Datei wählen',
'Change' => 'Ändern',
)
);
================================================
FILE: plugins/box/filesmanager/languages/en.lang.php
================================================
array(
'Files' => 'Files',
'Files manager' => 'Files manager',
'Name' => 'Name',
'Actions' => 'Actions',
'Delete' => 'Delete',
'Upload' => 'Upload',
'Create New Directory' => 'Create New Directory',
'directory' => 'directory',
'Delete directory: :dir' => 'Delete directory: :dir',
'Delete file: :file' => 'Delete file :file',
'Extension' => 'Extension',
'Size' => 'Size',
'Select file' => 'Select file',
'Change' => 'Change',
'Rename' => 'Rename',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Can not be empty' => 'Can not be empty',
'Directory exists' => 'Directory exists',
'File exists' => 'File exists',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'File was uploaded' => 'File was uploaded',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Upload server error' => 'Upload server error',
'Directory:' => 'Directory:',
'File:' => 'File:',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
)
);
================================================
FILE: plugins/box/filesmanager/languages/es.lang.php
================================================
array(
'Files' => 'Archivos',
'Files manager' => 'Administrador de archivos',
'Name' => 'Nombre',
'Actions' => 'Acciones',
'Delete' => 'Eliminar',
'Upload' => 'Subir',
'Drop File Here' => 'Arrastrar archivo aquí',
'Maximum upload file size: :upload_max_filesize' => 'Tamaño máximo de subida: :upload_max_filesize',
'Rename' => 'Renombrar',
'Renamed successfully' => 'Renombrado exitoso',
'Failure' => 'Fracaso',
'Forbidden file type' => 'Tipo de archivo prohibido',
'Upload server error' => 'Error de subida del servidor',
'Can not be empty' => 'No puede estar vacío',
'Create New Directory' => 'Crear nuevo directorio',
'Directory Name' => 'Nombre del directorio',
'Directory:' => 'Directorio:',
'Directory was not created' => 'El directorio no fue creado',
'Directory was created' => 'El directorio fue creado',
'Directory was deleted' => 'El directorio fue eliminado',
'Directory was not deleted' => 'El directorio no fue eliminado',
'Directory exists' => 'El directorio ya existe',
'File:' => 'Archivo:',
'File was uploaded' => 'El archivo fue subido',
'File was not uploaded' => 'El archivo no fue subido',
'File was deleted' => 'El archivo fue eliminado',
'File was not deleted' => 'El archivo no fue eliminado',
'File exists' => 'El archivo ya existe',
'Cancel' => 'Cancelar',
'Create' => 'Crear',
'directory' => 'directorio',
'Delete directory: :dir' => 'Eliminar directorio: :dir',
'Delete file: :file' => 'Eliminar archivo: :file',
'Extension' => 'Extensión',
'Size' => 'Tamaño',
'Select file' => 'Seleccionar archivo',
'Change' => 'Cambiar',
)
);
================================================
FILE: plugins/box/filesmanager/languages/fa.lang.php
================================================
array(
'Files' => 'فایلها',
'Files manager' => 'مدیریت فایلها',
'Name' => 'نام',
'Actions' => 'عملیات',
'Delete' => 'حذف',
'Upload' => 'آپلود',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
'Rename' => 'Rename',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'Forbidden file type' => 'Forbidden file type',
'Upload server error' => 'Upload server error',
'Can not be empty' => 'Can not be empty',
'Create New Directory' => 'Create New Directory',
'Directory Name' => 'Directory Name',
'Directory:' => 'Directory:',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Directory exists' => 'Directory exists',
'File:' => 'File:',
'File was uploaded' => 'File was uploaded',
'File was not uploaded' => 'File was not uploaded',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'File exists' => 'File exists',
'Cancel' => 'Cancel',
'Create' => 'Create',
'directory' => 'شاخه',
'Delete directory: :dir' => 'حذف شاخه: :dir',
'Delete file: :file' => 'حذف فایل :file',
'Extension' => 'پسوند',
'Size' => 'اندازه',
'Select file' => 'Select file',
'Change' => 'Change',
)
);
================================================
FILE: plugins/box/filesmanager/languages/fr.lang.php
================================================
array(
'Files' => 'Fichiers',
'Files manager' => 'Gestionnaire de fichiers',
'Name' => 'Nom',
'Actions' => 'Actions',
'Delete' => 'Supprimer',
'Upload' => 'Upload',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
'Rename' => 'Rename',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'Forbidden file type' => 'Forbidden file type',
'Upload server error' => 'Upload server error',
'Can not be empty' => 'Can not be empty',
'Create New Directory' => 'Create New Directory',
'Directory Name' => 'Directory Name',
'Directory:' => 'Directory:',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Directory exists' => 'Directory exists',
'File:' => 'File:',
'File was uploaded' => 'File was uploaded',
'File was not uploaded' => 'File was not uploaded',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'File exists' => 'File exists',
'Cancel' => 'Cancel',
'Create' => 'Create',
'directory' => 'Répertoire',
'Delete directory: :dir' => 'Supprimer le répertoire: :dir',
'Delete file: :file' => 'Supprimer le fichier :file',
'Extension' => 'Extension',
'Size' => 'Taille',
'Select file' => 'Select file',
'Change' => 'Change',
)
);
================================================
FILE: plugins/box/filesmanager/languages/hu.lang.php
================================================
array(
'Files' => 'Fájlok',
'Files manager' => 'Fájlkezelő',
'Name' => 'Név',
'Actions' => 'Műveletek',
'Delete' => 'Törlés',
'Upload' => 'Feltöltés',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
'Rename' => 'Rename',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'Forbidden file type' => 'Forbidden file type',
'Upload server error' => 'Upload server error',
'Can not be empty' => 'Can not be empty',
'Create New Directory' => 'Create New Directory',
'Directory Name' => 'Directory Name',
'Directory:' => 'Directory:',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Directory exists' => 'Directory exists',
'File:' => 'File:',
'File was uploaded' => 'File was uploaded',
'File was not uploaded' => 'File was not uploaded',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'File exists' => 'File exists',
'Cancel' => 'Cancel',
'Create' => 'Create',
'directory' => 'directory',
'Delete directory: :dir' => 'Directory törlése: :dir',
'Delete file: :file' => 'Fájl törlése :file',
'Extension' => 'Bővítmény',
'Size' => 'Méret',
'Select file' => 'Select file',
'Change' => 'Change',
)
);
================================================
FILE: plugins/box/filesmanager/languages/id.lang.php
================================================
array(
'Files' => 'File',
'Files manager' => 'Pengaturan File',
'Name' => 'Nama',
'Actions' => 'Tindakan',
'Delete' => 'Hapus',
'Upload' => 'Unduh',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
'Rename' => 'Rename',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'Forbidden file type' => 'Forbidden file type',
'Upload server error' => 'Upload server error',
'Can not be empty' => 'Can not be empty',
'Create New Directory' => 'Create New Directory',
'Directory Name' => 'Directory Name',
'Directory:' => 'Directory:',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Directory exists' => 'Directory exists',
'File:' => 'File:',
'File was uploaded' => 'File was uploaded',
'File was not uploaded' => 'File was not uploaded',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'File exists' => 'File exists',
'Cancel' => 'Cancel',
'Create' => 'Create',
'directory' => 'Direktori',
'Delete directory: :dir' => 'Hapus Direktori: :dir',
'Delete file: :file' => 'Hapus File: :file',
'Extension' => 'Tambahan',
'Size' => 'Ukuran',
'Select file' => 'Pilih File',
'Change' => 'Ubah',
)
);
================================================
FILE: plugins/box/filesmanager/languages/it.lang.php
================================================
array(
'Files' => 'File',
'Files manager' => 'Gestione file',
'Name' => 'Nome',
'Actions' => 'Azioni',
'Delete' => 'Elimina',
'Upload' => 'Carica',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
'Rename' => 'Rename',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'Forbidden file type' => 'Forbidden file type',
'Upload server error' => 'Upload server error',
'Can not be empty' => 'Can not be empty',
'Create New Directory' => 'Create New Directory',
'Directory Name' => 'Directory Name',
'Directory:' => 'Directory:',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Directory exists' => 'Directory exists',
'File:' => 'File:',
'File was uploaded' => 'File was uploaded',
'File was not uploaded' => 'File was not uploaded',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'File exists' => 'File exists',
'Cancel' => 'Cancel',
'Create' => 'Create',
'directory' => 'cartella',
'Delete directory: :dir' => 'Elimina cartella: :dir',
'Delete file: :file' => 'Elimina file :file',
'Extension' => 'Estensione',
'Size' => 'Dimensione',
'Select file' => 'Select file',
'Change' => 'Change',
)
);
================================================
FILE: plugins/box/filesmanager/languages/ja.lang.php
================================================
array(
'Files' => 'ファイル',
'Files manager' => 'ファイルの管理',
'Name' => '名前',
'Actions' => '操作',
'Delete' => '削除',
'Upload' => 'アップロード',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
'Rename' => 'Rename',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'Forbidden file type' => 'Forbidden file type',
'Upload server error' => 'Upload server error',
'Can not be empty' => 'Can not be empty',
'Create New Directory' => 'Create New Directory',
'Directory Name' => 'Directory Name',
'Directory:' => 'Directory:',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Directory exists' => 'Directory exists',
'File:' => 'File:',
'File was uploaded' => 'File was uploaded',
'File was not uploaded' => 'File was not uploaded',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'File exists' => 'File exists',
'Cancel' => 'Cancel',
'Create' => 'Create',
'directory' => 'ディレクトリ',
'Delete directory: :dir' => 'ディレクトリの削除: :dir',
'Delete file: :file' => 'ファイルの削除 :file',
'Extension' => '拡張子',
'Size' => 'サイズ',
'Select file' => 'ファイルの選択',
'Change' => '変更',
)
);
================================================
FILE: plugins/box/filesmanager/languages/ka-ge.lang.php
================================================
array(
'Files' => 'ფაილები',
'Files manager' => 'ფაილების მენეჯერი',
'Name' => 'სახელი',
'Actions' => 'მოქმედება',
'Delete' => 'წაშლა',
'Upload' => 'ატვირთვა',
'Drop File Here' => 'გადაიტანეთ ფაილი აქ',
'Maximum upload file size: :upload_max_filesize' => 'ფაილის მაქსიმალური ზომა: :upload_max_filesize',
'Rename' => 'გადარქმევა',
'Renamed successfully' => 'წარმატებით გადაირქვა',
'Failure' => 'ვერ მოხერხდა',
'Forbidden file type' => 'ფაილის აკრძალული ტიპი',
'Upload server error' => 'სერვერის შეცდომა ატვირთვის დროს',
'Can not be empty' => 'არ შეიძლება ცარიელი იყოს',
'Create New Directory' => 'ახალი დირექტორიის შექმნა',
'Directory Name' => 'დირექტორიის სახელი',
'Directory:' => 'დირექტორია:',
'Directory was not created' => 'დირექტორია ვერ შეიქმნა',
'Directory was created' => 'დირექტორია შეიქმნა',
'Directory was deleted' => 'დირექტორია წაშლილია',
'Directory was not deleted' => 'დირექტორია ვერ წაიშალა',
'Directory exists' => 'დირექტორია უკვე არსებობს',
'File:' => 'ფაილი:',
'File was uploaded' => 'ფაილი აიტვირთა',
'File was not uploaded' => 'ფაილი ვერ აიტვირთა',
'File was deleted' => 'ფაილი წაშლილია',
'File was not deleted' => 'ფაილი ვერ წაიშალა',
'File exists' => 'ფაილი უკვე არსებობს',
'Cancel' => 'გაუქმება',
'Create' => 'შექმნა',
'directory' => 'დირექტორია',
'Delete directory: :dir' => 'დირექტორიის წაშლა: :dir',
'Delete file: :file' => 'ფაილის წაშლა:file',
'Extension' => 'გაფართოება',
'Size' => 'ფაილი',
'Select file' => 'ფაილის ამორჩევა',
'Change' => 'შეცვლა',
'Info' => 'ინფო',
'File Information' => 'ინფორმაცია ფაილზე',
'Filename' => 'ფაილის სახელწოდება',
'Filetype' => 'ფაილის ტიპი',
'Filesize' => 'ფაილის ზომა',
'Dimension' => 'სიდიდე',
'Link' => 'ბმული',
)
);
================================================
FILE: plugins/box/filesmanager/languages/lt.lang.php
================================================
array(
'Files' => 'Bylos',
'Files manager' => 'Bylų tvarkyklė',
'Name' => 'Pavadinimas',
'Actions' => 'Veiksmai',
'Delete' => 'Ištrinti',
'Upload' => 'Įkelti',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
'Rename' => 'Rename',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'Forbidden file type' => 'Forbidden file type',
'Upload server error' => 'Upload server error',
'Can not be empty' => 'Can not be empty',
'Create New Directory' => 'Create New Directory',
'Directory Name' => 'Directory Name',
'Directory:' => 'Directory:',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Directory exists' => 'Directory exists',
'File:' => 'File:',
'File was uploaded' => 'File was uploaded',
'File was not uploaded' => 'File was not uploaded',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'File exists' => 'File exists',
'Cancel' => 'Cancel',
'Create' => 'Create',
'directory' => 'aplankas',
'Delete directory: :dir' => 'Ištrinti aplanką: :dir',
'Delete file: :file' => 'Ištrinti bylą :file',
'Extension' => 'Plėtinys',
'Size' => 'Dydis',
'Select file' => 'Select file',
'Change' => 'Change',
)
);
================================================
FILE: plugins/box/filesmanager/languages/nl.lang.php
================================================
array(
'Files' => 'Bestanden',
'Files manager' => 'Bestandsbeheer',
'Name' => 'Naam',
'Actions' => 'Acties',
'Delete' => 'Verwijderen',
'Upload' => 'Uploaden',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
'Rename' => 'Rename',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'Forbidden file type' => 'Forbidden file type',
'Upload server error' => 'Upload server error',
'Can not be empty' => 'Can not be empty',
'Create New Directory' => 'Create New Directory',
'Directory Name' => 'Directory Name',
'Directory:' => 'Directory:',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Directory exists' => 'Directory exists',
'File:' => 'File:',
'File was uploaded' => 'File was uploaded',
'File was not uploaded' => 'File was not uploaded',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'File exists' => 'File exists',
'Cancel' => 'Cancel',
'Create' => 'Create',
'directory' => 'Map',
'Delete directory: :dir' => 'Verwijder map: :dir',
'Delete file: :file' => 'Verwijder bestand: :file',
'Extension' => 'Type',
'Size' => 'Grootte',
'Select file' => 'Select file',
'Change' => 'Change',
)
);
================================================
FILE: plugins/box/filesmanager/languages/pl.lang.php
================================================
array(
'Files' => 'Pliki',
'Files manager' => 'Zarządzaj plikami',
'Name' => 'Nazwa',
'Actions' => 'Akcje',
'Delete' => 'Usuń',
'Upload' => 'Prześlij',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
'Rename' => 'Rename',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'Forbidden file type' => 'Forbidden file type',
'Upload server error' => 'Upload server error',
'Can not be empty' => 'Can not be empty',
'Create New Directory' => 'Create New Directory',
'Directory Name' => 'Directory Name',
'Directory:' => 'Directory:',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Directory exists' => 'Directory exists',
'File:' => 'File:',
'File was uploaded' => 'File was uploaded',
'File was not uploaded' => 'File was not uploaded',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'File exists' => 'File exists',
'Cancel' => 'Cancel',
'Create' => 'Create',
'directory' => 'katalog',
'Delete directory: :dir' => 'Czy napewno usunąć katalog: :dir',
'Delete file: :file' => 'Czy napewno usunąć plik :file',
'Extension' => 'Rozszerzenie',
'Size' => 'Rozmiar',
'Select file' => 'Select file',
'Change' => 'Change',
)
);
================================================
FILE: plugins/box/filesmanager/languages/pt-br.lang.php
================================================
array(
'Files' => 'Arquivos',
'Files manager' => 'Gerenciador de arquivos',
'Name' => 'Nome',
'Actions' => 'Ações',
'Delete' => 'Deletar',
'Upload' => 'Upload',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
'Rename' => 'Rename',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'Forbidden file type' => 'Forbidden file type',
'Upload server error' => 'Upload server error',
'Can not be empty' => 'Can not be empty',
'Create New Directory' => 'Create New Directory',
'Directory Name' => 'Directory Name',
'Directory:' => 'Directory:',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Directory exists' => 'Directory exists',
'File:' => 'File:',
'File was uploaded' => 'File was uploaded',
'File was not uploaded' => 'File was not uploaded',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'File exists' => 'File exists',
'Cancel' => 'Cancel',
'Create' => 'Create',
'directory' => 'directory',
'Delete directory: :dir' => 'Deletar o diretório: :dir',
'Delete file: :file' => 'Deletar o arquivo :file',
'Extension' => 'Extensão',
'Size' => 'Tamanho',
'Select file' => 'Select file',
)
);
================================================
FILE: plugins/box/filesmanager/languages/ru.lang.php
================================================
array(
'Files' => 'Файлы',
'Files manager' => 'Менеджер файлов',
'Name' => 'Название',
'Actions' => 'Действия',
'Delete' => 'Удалить',
'Upload' => 'Загрузить',
'Drop File Here' => 'Перетащите файл сюда',
'Maximum upload file size: :upload_max_filesize' => 'Максимальный размер файла: :upload_max_filesize',
'Rename' => 'Переименовать',
'Renamed successfully' => 'Успешно переименован',
'Failure' => 'Провал',
'Forbidden file type' => 'Запрещенный тип файла',
'Upload server error' => 'Ошибка сервера при загрузке',
'Can not be empty' => 'Не может быть пустым',
'Create New Directory' => 'Создать новую директорию',
'Directory Name' => 'Название директории',
'Directory:' => 'Директория:',
'Directory was not created' => 'Директория не была создана',
'Directory was created' => 'Директория была создана',
'Directory was deleted' => 'Директория была удалена',
'Directory was not deleted' => 'Директория не была удалена',
'Directory exists' => 'Директория уже существует',
'File:' => 'Файл:',
'File was uploaded' => 'Файл был загружен',
'File was not uploaded' => 'Файл не был загружен',
'File was deleted' => 'Файл был удален',
'File was not deleted' => 'Файл не был удален',
'File exists' => 'Файл существует',
'Cancel' => 'Отменить',
'Create' => 'Создать',
'directory' => 'директория',
'Delete directory: :dir' => 'Удалить директорию: :dir',
'Delete file: :file' => 'Удалить файл :file',
'Extension' => 'Расширение',
'Size' => 'Размер',
'Select file' => 'Выбрать файл',
'Change' => 'Изменить',
'Info' => 'Инфо',
'File Information' => 'Информация о файле',
'Filename' => 'Название файла',
'Filetype' => 'Тип файла',
'Filesize' => 'Размер файла',
'Dimension' => 'Разрешение',
'Link' => 'Ссылка',
)
);
================================================
FILE: plugins/box/filesmanager/languages/sk.lang.php
================================================
array(
'Files' => 'Súbory',
'Files manager' => 'Manažér súborov',
'Name' => 'Názov',
'Actions' => 'Akcie',
'Delete' => 'Vymazať',
'Upload' => 'Nahrať',
'Drop File Here' => 'Drop File Here',
'Maximum upload file size: :upload_max_filesize' => 'Maximum upload file size: :upload_max_filesize',
'Rename' => 'Rename',
'Renamed successfully' => 'Renamed successfully',
'Failure' => 'Failure',
'Forbidden file type' => 'Forbidden file type',
'Upload server error' => 'Upload server error',
'Can not be empty' => 'Can not be empty',
'Create New Directory' => 'Create New Directory',
'Directory Name' => 'Directory Name',
'Directory:' => 'Directory:',
'Directory was not created' => 'Directory was not created',
'Directory was created' => 'Directory was created',
'Directory was deleted' => 'Directory was deleted',
'Directory was not deleted' => 'Directory was not deleted',
'Directory exists' => 'Directory exists',
'File:' => 'File:',
'File was uploaded' => 'File was uploaded',
'File was not uploaded' => 'File was not uploaded',
'File was deleted' => 'File was deleted',
'File was not deleted' => 'File was not deleted',
'File exists' => 'File exists',
'Cancel' => 'Cancel',
'Create' => 'Create',
'directory' => 'priečinok',
'Delete directory: :dir' => 'Vymazať priečinok: :dir',
'Delete file: :file' => 'Vymazať súbor :file',
'Extension' => 'Rozšírenie',
'Size' => 'Veľkosť',
'Select file' => 'Select file',
)
);
================================================
FILE: plugins/box/filesmanager/languages/sr.lang.php
================================================
array(
'Files' => 'Fajlovi',
'Files manager' => 'Menadžer fajlova',
'Name' => 'Ime',
'Actions' => 'Akcije',
'Delete' => 'Obriši',
'Upload' => 'Dodaj',
'Drop File Here' => 'Ostavi fajl ovde',
'Maximum upload file size: :upload_max_filesize' => 'Maksimum veličina fajla za dodavanje: :upload_max_filesize',
'Rename' => 'Promeni ime',
'Renamed successfully' => 'Ime uspešno promenjeno',
'Failure' => 'Dogodila se greška',
'Forbidden file type' => 'Zabranjena ekstenzija fajla',
'Upload server error' => 'Greška prilikom dodavanja servera',
'Can not be empty' => 'Ne može biti prazno',
'Create New Directory' => 'Napravi novi direktorijum',
'Directory Name' => 'Ime direktorijuma',
'Directory:' => 'Direktorijum:',
'Directory was not created' => 'Direktorijum nije kreiran',
'Directory was created' => 'Diektorijum je kreiran',
'Directory was deleted' => 'Direktorijum je obrisan',
'Directory was not deleted' => 'Direktorijum nije obrisan',
'Directory exists' => 'Direktorijum već postoji',
'File:' => 'Fajl:',
'File was uploaded' => 'Fajl je dodat',
'File was not uploaded' => 'Fajl nije dodat',
'File was deleted' => 'Fajl je obrisan',
'File was not deleted' => 'Fajl nije obrisan',
'File exists' => 'Fajl već postoji',
'Cancel' => 'Otkaži',
'Create' => 'Kreiraj',
'directory' => 'Direktorijum',
'Delete directory: :dir' => 'Obriši direktorijum: :dir',
'Delete file: :file' => 'Obriši fajl :file',
'Extension' => 'Extenzija',
'Size' => 'Veličina',
'Select file' => 'Odaberi fajl',
)
);
================================================
FILE: plugins/box/filesmanager/languages/tr.lang.php
================================================
array(
'Files' => 'Dosyalar',
'Files manager' => 'Dosya yöneticisi',
'Name' => 'Ad',
'Actions' => 'İşlemler',
'Delete' => 'Sil',
'Upload' => 'Yükle',
'Create New Directory' => 'Yeni Dizin Oluştur',
'directory' => 'dizin',
'Delete directory: :dir' => ':dir dizini silinsin mi',
'Delete file: :file' => ':file dosyası silinsin mi',
'Extension' => 'Uzantı',
'Size' => 'Boyut',
'Directory Name' => 'Dizin Adı',
'Select file' => 'Dosya seç',
'Cancel' => 'Vazgeç',
'Create' => 'Oluştur',
'Rename' => 'Yeniden Adlandır',
'File was deleted' => 'Dosya silindi',
'File was not deleted' => 'Dosya silinmedi',
'Directory was deleted' => 'Dizin silindi',
'Directory was not deleted' => 'Dizin silinmedi',
'Can not be empty' => 'Boş olamaz',
'Directory exists' => 'Dizin zaten var',
'File exists' => 'Dosya zaten var',
'Renamed successfully' => 'Başarıyla yeniden adlandırıldı',
'Failure' => 'Başarısız',
'File was uploaded' => 'Dosya yüklendi',
'Directory was not created' => 'Dizin oluşturulmadı',
'Directory was created' => 'Dizin oluşturuldu',
'Upload server error' => 'Yükleme sunucusunda hata',
'Directory:' => 'Dizin:',
'File:' => 'Dosya:',
'Drop File Here' => 'Dosyayı Buraya Bırakınız',
'Maximum upload file size: :upload_max_filesize' => 'Dosya büyüklüğü üst sınırı: :upload_max_filesize',
)
);
================================================
FILE: plugins/box/filesmanager/languages/uk.lang.php
================================================
array(
'Files' => 'Файли',
'Files manager' => 'Менеджер файлів',
'Name' => 'Назва',
'Actions' => 'Дії',
'Delete' => 'Видалити',
'Upload' => 'Завантажити',
'Drop File Here' => 'Вкиньте файл сюди',
'Maximum upload file size: :upload_max_filesize' => 'Максимальний розмір файлу: :upload_max_filesize',
'Rename' => 'Перейменувати',
'Renamed successfully' => 'Успішно перейменований',
'Failure' => 'Помилка',
'Forbidden file type' => 'Заборонений тип файлу',
'Upload server error' => 'Помилка сервера при завантаженні',
'Can not be empty' => 'Не може бути порожнім',
'Create New Directory' => 'Створити нову теку',
'Directory Name' => 'Назва теки',
'Directory:' => 'Тека:',
'Directory was not created' => 'Тека не була створена',
'Directory was created' => 'Тека була створена',
'Directory was deleted' => 'Тека була видалена',
'Directory was not deleted' => 'Тека не була видалена',
'Directory exists' => 'Тека існує',
'File:' => 'Файл:',
'File was uploaded' => 'Файл був завантажений',
'File was not uploaded' => 'Файл не був завантажений',
'File was deleted' => 'Файл був видалений',
'File was not deleted' => 'Файл не був видалений',
'File exists' => 'Файл існує',
'Cancel' => 'Відмінити',
'Create' => 'Створити',
'directory' => 'тека',
'Delete directory: :dir' => 'Видалити теку: :dir',
'Delete file: :file' => 'Видалити файл: :file',
'Extension' => 'Розширення',
'Size' => 'Розмір',
'Select file' => 'Вибрати файл',
'Change' => 'Змінити',
'Info' => 'Інфо',
'File Information' => 'Інформація про файл',
'Filename' => 'Назва файлу',
'Filetype' => 'Тип файлу',
'Filesize' => 'Размір файлу',
'Dimension' => 'Вирішення',
'Link' => 'Лінк',
)
);
================================================
FILE: plugins/box/filesmanager/languages/zh-cn.lang.php
================================================
array(
'Files' => '文件',
'Files manager' => '文件管理',
'Name' => '名称',
'Actions' => '操作',
'Delete' => '删除',
'Upload' => '上传',
'directory' => '目录',
'Delete directory: :dir' => '删除目录: :dir',
'Delete file: :file' => '删除文件 :file',
'Extension' => '扩展名',
'Size' => '尺寸',
'Select file' => '选择文件',
'Change' => '更改',
)
);
================================================
FILE: plugins/box/filesmanager/views/backend/index.view.php
================================================
'multipart/form-data', 'class' => 'form-inline')).
Form::hidden('csrf', Security::token())
);
?>
'btn btn-primary')).
Form::close()
)
?>
×
'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete directory: :dir', 'filesmanager', array(':dir' => $dir))."')"));
?>
>
$site_url.'/public/' . $path.$file, 'class' => 'chocolat', 'data-toggle' => 'lightbox'));?>
'_blank'));?>
'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete file: :file', 'filesmanager', array(':file' => $file))."')"));
?>
================================================
FILE: plugins/box/information/information.admin.php
================================================
assign('php_modules', $php_modules)
->display();
}
}
================================================
FILE: plugins/box/information/information.plugin.php
================================================
plugins/box/information/information.plugin.php
active
7
Information
Information plugin
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/information/languages/cs.lang.php
================================================
array(
'Information' => 'Informace',
'Debugging' => 'Ladění',
'Name' => 'Název',
'Value' => 'Hodnota',
'Security' => 'Bezpečnost',
'System' => 'System',
'on' => 'zapnuto',
'off'=> 'vypnuto',
'Server' => 'Server',
'PHP version' => 'Verze PHP',
'SimpleXML module' => 'Modul SimpleXML',
'DOM module' => 'Modul DOM',
'Installed' => 'Nainstalované',
'Not Installed' => 'Nenainstalované',
'Security check results' => 'Výsledky bezpečnostní kontroly',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'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',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'Základní adresář Monstra (":path") a/anebo soubory jsou zapisovatelné. Doporučujeme Vám odstranit oprávnění jakéhokoliv zápisu.
Na Unix systémech provedete opravu příkazem: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstra .htaccess jsoubor je zapisovatelný. Doporučujeme Vám odstranit oprávnění jakéhokoliv zápisu.
Na Unix systémech provedete opravu příkazem: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstra index.php jsoubor je zapisovatelný. Doporučujeme Vám odstranit oprávnění jakéhokoliv zápisu.
Na Unix systémech provedete opravu příkazem: chmod a-w :path',
'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.' =>
'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.',
'Monstra version' => 'Verze Monstra',
'Directory Permissions' => 'Práva adresáře',
'Directory' => 'Adresář',
'Writable' => 'Zapisovatelný',
'Unwritable' => 'Nezapisovatelný',
'Status' => 'Status',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);
================================================
FILE: plugins/box/information/languages/de.lang.php
================================================
array(
'Information' => 'Informationen',
'Debuging' => 'Debugging',
'Name' => 'Name',
'Value' => 'Wert',
'Security' => 'Sicherheit',
'System' => 'System',
'on' => 'An',
'off'=> 'Aus',
'Server' => 'Server',
'PHP version' => 'PHP Version',
'SimpleXML module' => 'SimpleXML Modul',
'DOM module' => 'DOM Modul',
'Installed' => 'Installiert',
'Not Installed' => 'Nicht Installiert',
'Security check results' => 'Sicherheits-Check Ergebnisse',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Die Konfigurationsdatei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte für defines.php auf Produktionssystemen zu entfernen.',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Die Monstra .htaccess Datei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte zu entfernen.
Du kannst dies auf Unix-Systemen ganz einfach mit: chmod a-w :path erledigen.',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Die Monstra index.php Datei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte zu entfernen.
Du kannst dies auf Unix-Systemen ganz einfach mit: chmod a-w :path erledigen.',
'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.' =>
'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.',
'Monstra version' => 'Monstra version',
'Directory Permissions' => 'Directory Berechtigungen',
'Directory' => 'Verzeichnis',
'Writable' => 'Beschreibbar',
'Unwritable' => 'Nicht beschreibbar',
'Status' => 'Status',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);
================================================
FILE: plugins/box/information/languages/en.lang.php
================================================
array(
'Information' => 'Information',
'Debugging' => 'Debugging',
'Name' => 'Name',
'Value' => 'Value',
'Security' => 'Security',
'System' => 'System',
'on' => 'on',
'off'=> 'off',
'Server' => 'Server',
'PHP version' => 'PHP version',
'SimpleXML module' => 'SimpleXML module',
'DOM module' => 'DOM module',
'Installed' => 'Installed',
'Not Installed' => 'Not Installed',
'Security check results' => 'Security check results',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'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.
You can do this on unix systems with: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path',
'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.' =>
'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.',
'Monstra version' => 'Monstra version',
'Directory Permissions' => 'Directory Permissions',
'Directory' => 'Directory',
'Writable' => 'Writable',
'Unwritable' => 'Unwritable',
'Status' => 'Status',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);
================================================
FILE: plugins/box/information/languages/es.lang.php
================================================
array(
'Information' => 'Información',
'Debugging' => 'Depuración',
'Name' => 'Nombre',
'Value' => 'Valor',
'Security' => 'Seguridad',
'System' => 'Sistema',
'on' => 'Activado',
'off'=> 'Desactivado',
'Server' => 'Servidor',
'PHP version' => 'Versión PHP',
'SimpleXML module' => 'Módulo SimpleXML',
'DOM module' => 'Módulo DOM',
'Installed' => 'Instalado',
'Not Installed' => 'No instalado',
'Security check results' => 'Resultados del control de seguridad',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'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.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'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.
Puedes hacer esto en sistemas Unix con: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'El archivo .htaccess de Monstra se ha encontrado ser accesible. Te recomendamos quitar todos los permisos de escritura.
Puedes hacer esto en sistemas Unix con: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'El archivo index.php de Monstra se ha encontrado ser accesible. Te recomendamos quitar todos los permisos de escritura.
Puedes hacer esto en sistemas Unix con: chmod a-w :path',
'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.' =>
'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.',
'Monstra version' => 'Versión Monstra',
'Directory Permissions' => 'Permisos de directorio',
'Directory' => 'Directorio',
'Writable' => 'Accesible',
'Unwritable' => 'No accesible',
'Status' => 'Estado',
'PHP Built On' => 'PHP construido en',
'Web Server' => 'Servidor web',
'WebServer to PHP Interface' => 'Servidor web para interfaz PHP',
)
);
================================================
FILE: plugins/box/information/languages/fa.lang.php
================================================
array(
'Information' => 'اطلاعات',
'Debugging' => 'اشکال زدایی',
'Name' => 'نام',
'Value' => 'مقدار',
'Security' => 'امنیت',
'System' => 'سیستم',
'on' => 'روشن',
'off'=> 'خاموش',
'Server' => 'سرور',
'PHP version' => 'نسخه PHP',
'SimpleXML module' => 'ماژول SimpleXML',
'DOM module' => 'ماژول DOM',
'Installed' => 'نصب شده',
'Not Installed' => 'نصب نشده',
'Security check results' => 'نتایج بررسیهای امنیتی',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'فایل پیکربندی قابل نوشتن میباشد . توصیه میکنیم همه مجوزهای نوشتن را در define.php سیستمهای تولیدی حذف کنید.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'شاخه هسته مونسترا (":path") و/ یا فایلهایی درون آن قابل نوشتن میباشند . توصیه میکنیم همه مجوزهای نوشتن را حذف کنید.
در سیستمهای یونیکس میتوانید با دستور : chmod -R a-w :path انجام دهید',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'فایل .htaccess مونسترا قابل نوشتن میباشند . توصیه میکنیم همه مجوزهای نوشتن را حذف کنید.
در سیستمهای یونیکس میتوانید با دستور : chmod -R a-w :path انجام دهید',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'فایل index.php مونسترا قابل نوشتن میباشند . توصیه میکنیم همه مجوزهای نوشتن را حذف کنید.
در سیستمهای یونیکس میتوانید با دستور : chmod -R a-w :path انجام دهید',
'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.' =>
'با توجه به نوع و مقدار اطلاعات ممکن است هنگام Core::$environment = Core::DEVELOPMENT خطایی رخ بدهد ، ما شدیداً Core::PRODUCTION را د رسیستم تولید توصیه میکنیم ',
'Monstra version' => 'نسخه مونسترا',
'Directory Permissions' => 'مجوزهای شاخه',
'Directory' => 'شاخه',
'Writable' => 'قابل نوشتن',
'Unwritable' => 'غیرقابل نوشتن',
'Status' => 'وضعیت',
'PHP Built On' => 'ساخته شده باPHP',
'Web Server' => 'وب سرور',
'WebServer to PHP Interface' => 'وب سرور به رابط PHP',
)
);
================================================
FILE: plugins/box/information/languages/fr.lang.php
================================================
array(
'Information' => 'Information',
'Debugging' => 'Débogage',
'Name' => 'Nom',
'Value' => 'Valeur',
'Security' => 'Sécurité',
'System' => 'Système',
'on' => 'on',
'off'=> 'off',
'Server' => 'Serveur',
'PHP version' => 'Version PHP',
'SimpleXML module' => 'Module SimpleXML',
'DOM module' => 'Module DOM',
'Installed' => 'Installé',
'Not Installed' => 'Non installé',
'Security check results' => 'Résultats du contrôle de sécurité',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'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.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'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.
Vous pouvez le faire sur les systèmes Unix avec: chmod-R a-w :chemin ',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Le fichier ". Htaccess" a été trouvé accessible en écriture. Nous vous conseillons de supprimer toutes les permissions d\'écriture.
Vous pouvez le faire sur les systèmes Unix avec: chmod a-w :chemin code>',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Le fichier index.php de Monstra a été trouvé pour être accessible en écriture. Nous vous conseillons de supprimer toutes les permissions d\'écriture.
Vous pouvez le faire sur les systèmes Unix avec: chmod a-w :chemin ',
'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.' =>
'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.',
'Monstra version' => 'Monstra version',
'Directory Permissions' => 'Directory Permissions',
'Directory' => 'Répertoire',
'Writable' => 'Accessible en écriture',
'Unwritable' => 'Pas accessible en écriture',
'Status' => 'Statut',
'PHP Built On' => 'PHP construit sur',
'Web Server' => 'Serveur Web',
'WebServer to PHP Interface' => 'Interface PHP du serveur web',
)
);
================================================
FILE: plugins/box/information/languages/hu.lang.php
================================================
array(
'Information' => 'Információk',
'Debugging' => 'Hibakeresés',
'Name' => 'Név',
'Value' => 'Érték',
'Security' => 'Biztonság',
'System' => 'Rendszer',
'on' => 'be',
'off'=> 'ki',
'Server' => 'Szerver',
'PHP version' => 'PHP verzió',
'SimpleXML module' => 'SimpleXML modul',
'DOM module' => 'DOM modul',
'Installed' => 'Telepítve',
'Not Installed' => 'Nincs Telepítve',
'Security check results' => 'Biztonsági ellenőrzés eredményei',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'A konfigurációs fájl írható. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot itt: defines.php.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'A Monstra core directory (":path") és/vagy fájlok írhatók. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot.
Unix rendszeren: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'A Monstra .htaccess fájl írható. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot.
Unix rendszeren: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'A Monstra index.php fájl írható. Azt javasoljuk, hogy távolítsa el az összes írási jogosultságot.
Unix rendszeren: chmod a-w :path',
'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.' =>
'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.',
'Monstra version' => 'Monstra verzió',
'Directory Permissions' => 'Kategória Jogosultságok',
'Directory' => 'Kategória',
'Writable' => 'Írható',
'Unwritable' => 'Nem Írható',
'Status' => 'Státusz',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Szerver',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);
================================================
FILE: plugins/box/information/languages/id.lang.php
================================================
array(
'Information' => 'Informasi',
'Debuging' => 'Debugging',
'Name' => 'Nama',
'Value' => 'Value',
'Security' => 'Keamanan',
'System' => 'Sistem',
'on' => 'Nyala',
'off'=> 'Mati',
'Server' => 'Server',
'PHP version' => 'Versi PHP',
'SimpleXML module' => 'Modul SimpleXML',
'DOM module' => 'Modul DOM',
'Installed' => 'Sudah terpasang',
'Not Installed' => 'Belum terpasang',
'Security check results' => 'Hasil Cek Keamanan',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'File Konfigurasi ditemukan writable . Disarankan untuk menghilangkan semua izin write pada defines.php di sistem produksi.',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'File .htaccess Monstra ditemukan writable. Disarankan untuk menghilangkan semua izin write.
Anda bisa melakukannya pada sistem unix dengan: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'File index.php Monstra ditemukan writable. Disarankan untuk menghilangkan semua izin write.
Anda bisa melakukannya pada sistem unix dengan: chmod a-w :path',
'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.' =>
'Dikarenakan jenis dan jumlah informasi ada potensial kerusakan saat Monstra::$environment = Monstra::DEVELOPMENT, disarankan untuk melakukan pengaturan Monstra::PRODUCTION pada sistem produksi.',
'Monstra version' => 'Versi Monstra',
'Directory Permissions' => 'Direktori Perizinan',
'Directory' => 'Direktori',
'Writable' => 'Beschreibbar',
'Unwritable' => 'Nicht beschreibbar',
'Status' => 'Status',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer ke PHP Interface',
)
);
================================================
FILE: plugins/box/information/languages/it.lang.php
================================================
array(
'Information' => 'Informazioni',
'Debugging' => 'Debugging',
'Name' => 'Nome',
'Value' => 'Valore',
'Security' => 'Sicurezza',
'System' => 'Sistema',
'on' => 'on',
'off'=> 'off',
'Server' => 'Server',
'PHP version' => 'Versione PHP',
'SimpleXML module' => 'Modulo SimpleXML',
'DOM module' => 'Modulo DOM',
'Installed' => 'Installato',
'Not Installed' => 'Non installato',
'Security check results' => 'Risultato del controllo di sicurezza',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Il file di configurazione è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per defines.php file sul sito funzionante.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'Directory Monstra (":path") è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per la directory (":path") sul sito funzionante.
È possibile eseguire questa operazione su sistemi UNIX così: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Principale file .htaccess è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per il file principale .htaccess.
È possibile eseguire questa operazione su sistemi UNIX così: chmod -R a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Principale file index.php è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per il file principale index.php.
È possibile eseguire questa operazione su sistemi UNIX così: chmod -R a-w :path',
'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.' =>
'Il sistema opera con lo stato Monstra::DEVELOPMENT Si consiglia di impostare lo stato Monstra::PRODUCTION sul sito funzionante.',
'Monstra version' => 'Monstra versione',
'Directory Permissions' => 'Directory Autorizzazioni',
'Directory' => 'Directory',
'Writable' => 'Scrivibile',
'Unwritable' => 'Non scrivibile',
'Status' => 'Stato',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);
================================================
FILE: plugins/box/information/languages/ja.lang.php
================================================
array(
'Information' => '情報',
'Debugging' => 'デバッグモード',
'Name' => '名前',
'Value' => '値',
'Security' => 'セキュリティ',
'System' => 'システム',
'on' => 'オン',
'off'=> 'オフ',
'Server' => 'サーバー',
'PHP version' => 'PHPバージョン',
'SimpleXML module' => 'SimpleXMLモジュール',
'DOM module' => 'DOMモジュール',
'Installed' => 'インストール済み',
'Not Installed' => '未インストール',
'Security check results' => 'セキュリティチェックの結果',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'設定ファイルが書き込み可能になっています。システムを公開する場合はすべての defines.php から書き込み権限を除去することをおすすめします。',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'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.
You can do this on unix systems with: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstraの .htaccess ファイルが書き込み可能になっています。書き込み権限を除去することをおすすめします。
Linuxシステムでは次のように除去できます: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstraの index.php ファイルが書き込み可能になっています。書き込み権限を除去することをおすすめします。
Linuxシステムでは次のように除去できます: chmod a-w :path',
'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.' =>
'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.',
'Monstra version' => 'Monstraのバージョン',
'Directory Permissions' => 'ディレクトリの権限',
'Directory' => 'ディレクトリ',
'Writable' => '書き込み可能',
'Unwritable' => '書き込み不可能',
'Status' => 'ステータス',
'PHP Built On' => 'PHP構成システム',
'Web Server' => 'Webサーバ',
'WebServer to PHP Interface' => 'Webサーバの提供するPHPインターフェイス',
)
);
================================================
FILE: plugins/box/information/languages/ka-ge.lang.php
================================================
array(
'Information' => 'ინფორმაცია',
'Debugging' => 'Debugging-ი',
'Name' => 'სახელი',
'Value' => 'მნიშვნელობა',
'Security' => 'უსაფრთხოება',
'System' => 'სისტემა',
'on' => 'ჩართულია',
'off'=> 'გამორთულია',
'Server' => 'სერვერი',
'PHP version' => 'PHP-ის ვერსია',
'SimpleXML module' => 'SimpleXML მოდული',
'DOM module' => 'DOM მოდული',
'Installed' => 'დაყენებულია',
'Not Installed' => 'არ არის დაყენებული',
'Security check results' => 'უსაფრთხოების შემოწმების შედეგები',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'კონფიგურაციის ფაილის ჩაწერა შესაძლებელია. გირჩევთ წაშალოთ ფაილის (defines.php) ჩაწერის უფლებები.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'Monstra-ს დირექტორია (":path") ჩასაწერად ხელმისაწვდომია. გირჩევთ წაშალოთ ჩაწერის უფლებები დირექტორიაზე (":path") .
ამის გაკეთება UNIX სისტემებზე ასე შეგიძლიათ: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'მთავარი .htaccess ფაილი ჩასაწერად ხელმისაწვდომია. გირჩევთ წაშალოთ ჩაწერის უფლებები მთავარ .htaccess ფაილზე.
ამის გაკეთება UNIX სისტემებზე ასე შეგიძლიათ: chmod -R a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'მთავარი index.php ფაილი ჩასაწერად ხელმისაწვდომია. გირჩევთ წაშალოთ ჩაწერის უფლებები მთავარ index.php ფაილზე.
ამის გაკეთება UNIX სისტემებზე ასე შეგიძლიათ: chmod -R a-w :path',
'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.' =>
'სისტემა მუშაობს Monstra::DEVELOPMENT რეჟიმზა, გირჩევთ Monstra::PRODUCTION რეჟიმის დაყენებას.',
'Monstra version' => 'Monstra-ს ვერსია',
'Directory Permissions' => 'დაშვების უფლებები',
'Directory' => 'კატალოგი',
'Writable' => 'ჩასაწერად ხელმისაწვდომია',
'Unwritable' => 'ჩასაწერად არ არის ხელმისაწვდომია',
'Status' => 'სტატუსი',
'PHP Built On' => 'PHP აგებულია',
'Web Server' => 'Web სერვერი',
'WebServer to PHP Interface' => 'Web სერვერი PHP ინტერფეისისთვის',
)
);
================================================
FILE: plugins/box/information/languages/lt.lang.php
================================================
array(
'Information' => 'Informacija',
'Debuging' => 'Derinimas',
'Name' => 'Pavadinimas',
'Value' => 'Reikšmė',
'Security' => 'Saugumas',
'System' => 'Systema',
'on' => 'Įjungta',
'off'=> 'Išjungta',
'Server' => 'Serveris',
'PHP version' => 'PHP versija',
'SimpleXML module' => 'SimpleXML modulis',
'DOM module' => 'DOM modulis',
'Installed' => 'Įdiegta',
'Not Installed' => 'Neįdiegta',
'Security check results' => 'Saugumo patikrinimo rezultatai',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Leidžiama perrašyti nustatymų bylą. Siūlome pašalinti visus rašymo leidimus sistemos bylai defines.php.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'Monstra pagrindinį aplanką (":path") ir/arba jo bylas leidžiama perrašyti. Siūlome pašalinti visus rašymo leidimus.
Tai galite padaryti Unix sistemoje su: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstra .htaccess bylą galima perrašyti. Siūlome pašalinti visus rašymo leidimus.
Tai galite padaryti Unix sistemoje su: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstra index.php bylą galima perrašyti. Siūlome pašalinti visus rašymo leidimus.
Tai galite padaryti Unix sistemoje su: chmod a-w :path',
'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.' =>
'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.',
'Monstra version' => 'Monstra versija',
'Directory Permissions' => 'Katalogo teisės',
'Directory' => 'Katalogas',
'Writable' => 'Rašomas',
'Unwritable' => 'Nerašomas',
'Status' => 'Būsena',
'PHP Built On' => 'PHP veikia su',
'Web Server' => 'Serverio prog. įranga',
'WebServer to PHP Interface' => 'PHP naudoja šį SAPI',
)
);
================================================
FILE: plugins/box/information/languages/nl.lang.php
================================================
array(
'Information' => 'Informatie',
'Debuging' => 'Debuggen',
'Name' => 'Naam',
'Value' => 'Waarde',
'Security' => 'Beveiliging',
'System' => 'Systeem',
'on' => 'Aan',
'off'=> 'Uit',
'Server' => 'Server',
'PHP version' => 'PHP Versie',
'SimpleXML module' => 'SimpleXML Module',
'DOM module' => 'DOM Module',
'Installed' => 'Geinstalleerd',
'Not Installed' => 'Niet geinstalleerd',
'Security check results' => 'Resultaten beveiligings-check',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Het configuratiebestand is schrijfbaar. We adviseren u om alle schrijfrechten op defines.php te verwijderen op productiewebsites.',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Het Monstra .htaccess bestand is schrijfbaar. We adviseren u om alle schrijfrechten voor dit bestand te verwijderen.
Op unix-systemen doet u dit als volgt: chmod a-w :path.',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Het Monstra index.php bestand is schrijfbaar. We adviseren u alle schrijfrechten voor dit bestand te verwijderen.
Op Unix-systemen doet u dit als volgt: chmod a-w :path.',
'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.' =>
'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.',
'Monstra version' => 'Monstra versie',
'Directory Permissions' => 'Map-rechten',
'Directory' => 'Map',
'Writable' => 'Schrijfbaar',
'Unwritable' => 'Niet schrijfbaar',
'Status' => 'Status',
'PHP Built On' => 'Systeem',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer PHP Interface',
)
);
================================================
FILE: plugins/box/information/languages/pl.lang.php
================================================
array(
'Information' => 'Informacja',
'Debugging' => 'Odpluskwianie',
'Name' => 'Nazwa',
'Value' => 'Wartość',
'Security' => 'Bezpieczeństwo',
'System' => 'System',
'on' => 'włączone',
'off'=> 'wyłączone',
'Server' => 'Serwer',
'PHP version' => 'Wersja PHP',
'SimpleXML module' => 'Moduł SimpleXML',
'DOM module' => 'Moduł DOM',
'Installed' => 'Zainstalowane',
'Not Installed' => 'Nie zainstalowane',
'Security check results' => 'Wyniki sprawdzenia bezpieczeństwa',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Plik konfiguracyjny ma możliwość zapisu. Radzimy, aby w systemach produkcyjnych usunąć wszystkie uprawnienia zapisu dla pliku defines.php.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'Katalog główny systemu Monstra (":path") i/lub pliki w nim zawarte mają możliwość zapisu. Radzimy, aby usunąć wszystkie uprawnienia zapisu.
Na systemach UNIX możesz to zrobić za pomocą: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Plik .htaccess systemu Monstra ma możliwość zapisu. Radzimy, aby usunąć wszystkie uprawnienia zapisu.
Na systemach UNIX możesz to zrobić za pomocą: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Plik index.php systemu Monstra ma możliwość zapisu. Radzimy, aby usunąć wszystkie uprawnienia zapisu.
Na systemach UNIX możesz to zrobić za pomocą: chmod a-w :path',
'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.' =>
'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.',
'Monstra version' => 'Wersja systemu Monstra',
'Directory Permissions' => 'Uprawnienia katalogu',
'Directory' => 'Katalog',
'Writable' => 'Możliwość zapisu',
'Unwritable' => 'Brak możliwości zapisu',
'Status' => 'Status',
'PHP Built On' => 'Oparty na systemie',
'Web Server' => 'Serwer WWW',
'WebServer to PHP Interface' => 'Serwerowy interfejs PHP',
)
);
================================================
FILE: plugins/box/information/languages/pt-br.lang.php
================================================
array(
'Information' => 'Informações',
'Debugging' => 'Debug',
'Name' => 'Nome',
'Value' => 'Valor',
'Security' => 'Segurança',
'System' => 'Sistema',
'on' => 'on',
'off'=> 'off',
'Server' => 'Servidor',
'PHP version' => 'Versão do PHP',
'SimpleXML module' => 'Módulo SimpleXML',
'DOM module' => 'Módulo DOM',
'Installed' => 'Instalado',
'Not Installed' => 'Não instalado',
'Security check results' => 'Resultados da verificação de segurança',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'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.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'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.
Você pode fazer isso em sistemas UNIX com: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'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.
Você pode fazer isso em sistemas UNIX com: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'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.
Vocês pode fazer isso em sistemas UNIX com: chmod a-w :path',
'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.' =>
'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.',
'Monstra version' => 'Monstra versão',
'Directory Permissions' => 'Permissões de Diretório',
'Directory' => 'Diretório',
'Writable' => 'Gravável',
'Unwritable' => 'Unwritable',
'Status' => 'Estado',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);
================================================
FILE: plugins/box/information/languages/ru.lang.php
================================================
array(
'Information' => 'Информация',
'Debugging' => 'Дебаггинг',
'Name' => 'Название',
'Value' => 'Значение',
'Security' => 'Безопасность',
'System' => 'Система',
'on' => 'включен',
'off'=> 'выключен',
'Server' => 'Сервер',
'PHP version' => 'Версия PHP',
'SimpleXML module' => 'SimpleXML модуль',
'DOM module' => 'DOM модуль',
'Installed' => 'Установлен',
'Not Installed' => 'Не установлен',
'Security check results' => 'Результаты проверки безопасности',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Конфигурационный файл доступен для записи. Мы рекомендуем вам удалить права записи на файл defines.php на живом сайте.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'Директория Monstra (":path") доступна для записи. Мы рекомендуем вам удалить права записи на директорию (":path") на живом сайте.
Вы можете сделать это на UNIX системах так: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Главный .htaccess доступен для записи. Мы рекомендуем вам удалить права записи на главный .htaccess файл.
Вы можете сделать это на UNIX системах так: chmod -R a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Главный index.php файл доступен для записи. Мы рекомендуем вам удалить права записи на главный index.php файл.
Вы можете сделать это на UNIX системах так: chmod -R a-w :path',
'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.' =>
'Система работает в режиме Monstra::DEVELOPMENT Мы рекомендуем вам установить режим Monstra::PRODUCTION на живом сайте.',
'Monstra version' => 'Monstra Версия',
'Directory Permissions' => 'Права доступа',
'Directory' => 'Каталог',
'Writable' => 'Доступна для записи',
'Unwritable' => 'Недоступна для записи',
'Status' => 'Статус',
'PHP Built On' => 'PHP построен на',
'Web Server' => 'Веб сервер',
'WebServer to PHP Interface' => 'Веб сервер для PHP интерфейса',
)
);
================================================
FILE: plugins/box/information/languages/sk.lang.php
================================================
array(
'Information' => 'Informácie',
'Debugging' => 'Ladenie',
'Name' => 'Názov',
'Value' => 'Hodnota',
'Security' => 'Bezpečnosť',
'System' => 'System',
'on' => 'zapnuté',
'off'=> 'vypnuté',
'Server' => 'Server',
'PHP version' => 'Verzia PHP',
'SimpleXML module' => 'Modul SimpleXML',
'DOM module' => 'Modul DOM',
'Installed' => 'Nainštalované',
'Not Installed' => 'Nenainštalované',
'Security check results' => 'Výsledky bezpečnostnej kontroly',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'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.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'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.
Na Unix systémoch prevediete opravu príkazom: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstra .htaccess súbor je zapisovateľný. Odporúčame Vám odstrániť oprávnenie akéhokoľvek zápisu.
Na Unix systémoch prevediete opravu príkazom: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstra index.php súbor je zapisovateľný. Odporúčame Vám odstrániť oprávnenie akéhokoľvek zápisu.
Na Unix systémoch prevediete opravu príkazom: chmod a-w :path',
'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.' =>
'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.',
'Monstra version' => 'Verzia Monstra',
'Directory Permissions' => 'Práva priečinkov',
'Directory' => 'Priečinok',
'Writable' => 'Zapisovateľný',
'Unwritable' => 'Nezapisovateľný',
'Status' => 'Status',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);
================================================
FILE: plugins/box/information/languages/sr.lang.php
================================================
array(
'Information' => 'Informacije',
'Debugging' => 'Debugging',
'Name' => 'Ime',
'Value' => 'Vrednost',
'Security' => 'Sigurnost',
'System' => 'Sistem',
'on' => 'uključeno',
'off'=> 'isključeno',
'Server' => 'Server',
'PHP version' => 'PHP Verzija',
'SimpleXML module' => 'SimpleXML modul',
'DOM module' => 'DOM modul',
'Installed' => 'Instalirano',
'Not Installed' => 'Nije instalirano',
'Security check results' => 'Sigurnosna provera rezultata',
'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.',
'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.
You can do this on unix systems with: chmod -R a-w :path' => 'Monstra direktorijum je (":path") i/ili fajlovi unutar toga su nadjeni da mogu biti zapisani. Mi vas savetujemo da uklonite te dozvole zapisivanja.
Na unix sistemima možete to uraditi sa: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' => 'Monstra je .htaccess fajlu našla mogućnost upisivanja. Mi vas savetujemo da promenite te dozvole.
Na unix sistemima možete to uraditi sa: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' => 'Monstra je pronašla index.php fajl da može da se upisuje. Mi vas savetujemo da promenite dozvole upisivanja.
Na unix sistemima možete to uraditi sa: chmod a-w :path',
'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.',
'Monstra version' => 'Monstra verzija',
'Directory Permissions' => 'Dozvole direktorijuma',
'Directory' => 'Direktorijum',
'Writable' => 'Dozvoljen ua pisanje',
'Unwritable' => 'Zabranjen za pisanje',
'Status' => 'Status',
'PHP Built On' => 'PHP građen na',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);
================================================
FILE: plugins/box/information/languages/tr.lang.php
================================================
array(
'Information' => 'Bilgi',
'Debugging' => 'Hata Ayıklama',
'Name' => 'Ad',
'Value' => 'Değer',
'Security' => 'Güvenlik',
'System' => 'Sistem',
'on' => 'açık',
'off'=> 'kapalı',
'Server' => 'Sunucu',
'PHP version' => 'PHP sürümü',
'SimpleXML module' => 'SimpleXML modülü',
'DOM module' => 'DOM modülü',
'Installed' => 'Yüklü',
'Not Installed' => 'Yüklü Değil',
'Security check results' => 'Güvenlik denetlemesi sonuçları',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Konfigürasyon dosyası yazma iznine sahip. Yayındayken defines.php üzerindeki bütün yazma izinlerini kaldırmanızı öneririz.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'Monstra dizini (":path") ve/ya da altındaki dosyalar yazma iznine sahipler. Bütün yazma izinlerini kaldırmanızı öneririz.
Unix sistemlerde, bunu, chmod -R a-w :path ile gerçekleştirebilirsiniz.',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstra .htaccess dosyası yazma iznine sahip. Bütün yazma izinlerini kaldırmanızı öneririz.
Unix sistemlerde, bunu, chmod -R a-w :path ile gerçekleştirebilirsiniz.',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstra index.php dosyası yazma iznine sahip. Bütün yazma izinlerini kaldırmanızı öneririz.
Unix sistemlerde, bunu, chmod -R a-w :path ile gerçekleştirebilirsiniz.',
'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.' =>
'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.',
'Monstra version' => 'Monstra sürümü',
'Directory Permissions' => 'Dizin İzinleri',
'Directory' => 'Dizin',
'Writable' => 'Yazılabilir',
'Unwritable' => 'Yazılamaz',
'Status' => 'Durum',
'PHP Built On' => 'PHP\'nin Derlendiği Ortam',
'Web Server' => 'Web Sunucusu',
'WebServer to PHP Interface' => 'PHP Arayüzü',
)
);
================================================
FILE: plugins/box/information/languages/uk.lang.php
================================================
array(
'Information' => 'Інформація',
'Debugging' => 'Дебаггінг',
'Name' => 'Назва',
'Value' => 'Значення',
'Security' => 'Безпека',
'System' => 'Система',
'on' => 'увімкнено',
'off'=> 'вимкнено',
'Server' => 'Сервер',
'PHP version' => 'Версія PHP',
'SimpleXML module' => 'SimpleXML модуль',
'DOM module' => 'DOM модуль',
'Installed' => 'Встановлено',
'Not Installed' => 'Не встановлено',
'Security check results' => 'Результати перевірки безпеки',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Конфігураційний файл доступний для запису. Ми рекомендуємо вам видалити права запису на файл defines.php на живому сайті.',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'Директорія Monstra (":path") доступна для запису. Ми рекомендуємо вам видалити права запису на теку (":path") на живому сайті.
Ви можете зробити це на UNIX системах так: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Головний .htaccess доступний для запису. Ми рекомендуємо вам видалити права запису на головний .htaccess файл.
Ви можете зробити це на UNIX системах так: chmod -R a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Головний index.php файл доступний для запису. Ми рекомендуємо вам видалити права запису на головний index.php файл.
Ви можете зробити це на UNIX системах так: chmod -R a-w :path',
'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.' =>
'Система працює в режимі Monstra::DEVELOPMENT Ми рекомендуємо вам встановити режим Monstra::PRODUCTION на живому сайті.',
'Monstra version' => 'Monstra Версія',
'Directory Permissions' => 'Права Доступу',
'Directory' => 'Тека',
'Writable' => 'Доступна для запису',
'Unwritable' => 'Недоступна для запису',
'Status' => 'Статус',
'PHP Built On' => 'PHP побудовано на',
'Web Server' => 'Веб сервер',
'WebServer to PHP Interface' => 'Веб сервер для PHP інтерфейсу', )
);
================================================
FILE: plugins/box/information/languages/zh-cn.lang.php
================================================
array(
'Information' => '信息',
'Debugging' => '调试',
'Name' => '名称',
'Value' => '值',
'Security' => '安全',
'System' => '系统',
'on' => '开',
'off'=> '关',
'Server' => '服务器',
'PHP version' => 'PHP 版本',
'SimpleXML module' => 'SimpleXML 模块',
'DOM module' => 'DOM 模块',
'Installed' => '已安装',
'Not Installed' => '未安装',
'Security check results' => '安全检查结果',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Monstra 系统发现配置文件是可写的。我们建议您删除 defines.php 文件的所有可写权限。',
'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.
You can do this on unix systems with: chmod -R a-w :path' =>
'发现 Monstra 核心目录 (":path") 和下级文件是可写的。我们建议您删除所有的可写权限。
您可以在 UNIX 系统上设置: chmod -R a-w :path',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstra 系统发现 .htaccess 文件是可写的。我们建议您删除所有的可写权限。
您可以在 UNIX 系统上设置: chmod a-w :path',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
You can do this on unix systems with: chmod a-w :path' =>
'Monstra 系统发现 index.php 文件可写。我们建议您删除所有的可写权限。
您可以在 UNIX 系统上设置: chmod a-w :path',
'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.' =>
'Due to the type and amount of information an error might give intruders when Monstra::$environment = Monstra::DEVELOPMENT, 我们强烈建议设置 Monstra::PRODUCTION in production systems.',
'Monstra version' => 'Monstra 版本',
'Directory Permissions' => '目录权限',
'Directory' => '目录',
'Writable' => '可写',
'Unwritable' => '不可写',
'Status' => '状态',
'PHP Built On' => 'PHP 建立在',
'Web Server' => 'Web 服务器',
'WebServer to PHP Interface' => '服务器到 PHP 接口',
)
);
================================================
FILE: plugins/box/information/views/backend/index.view.php
================================================
'.__('Apache Mod Rewrite', 'information').' '.__('Not Installed', 'information').' ';
} else {
echo ''.__('Apache Mod Rewrite', 'information').' '.__('Installed', 'information').' ';
}
} else {
echo ''.__('Apache Mod Rewrite', 'information').' '.__('Installed', 'information').' ';
}
?>
!
You can do this on unix systems with: chmod a-w :path', 'information', array(':path' => ROOT . DS . '.htaccess')); ?>
!
You can do this on unix systems with: chmod a-w :path', 'information', array(':path' => ROOT . DS . 'index.php')); ?>
!
================================================
FILE: plugins/box/menu/install/menu.manifest.xml
================================================
plugins/box/menu/menu.plugin.php
active
4
Menu
Menu managment plugin
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/menu/js/.htaccess
================================================
Options -Indexes
Allow from all
================================================
FILE: plugins/box/menu/js/menu.js
================================================
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.menu = {
init: function() { },
selectPage: function (slug, title) {
$('input[name=menu_item_link]').val(slug);
$('input[name=menu_item_name]').val(title);
$('#selectPageModal').modal('hide');
},
selectCategory: function (name) {
$('input[name=menu_item_category]').val(name);
$('#selectCategoryModal').modal('hide');
}
};
$(document).ready(function(){
$.monstra.menu.init();
});
================================================
FILE: plugins/box/menu/languages/cs.lang.php
================================================
array(
'Menu' => 'Menu',
'Menu manager' => 'Manažer menu',
'Edit' => 'Editovat',
'Name' => 'Název',
'Delete' => 'Vymazat',
'Order' => 'Pořadí',
'Actions' => 'Akce',
'Create New Item' => 'Vytvořit novou položku',
'New item' => 'Nová položka',
'Item name' => 'Název položky',
'Item order' => 'Pořadí položky',
'Item target' => 'Cíl položky',
'Item link' => 'Odkaz položky',
'Item category' => 'Kategorie položky',
'Save' => 'Uložit',
'Edit item' => 'Editovat položku',
'Delete item :name' => 'Vymazat položku :name',
'Select page' => 'Vybrat stránku',
'Category' => 'Kategorie',
'Select category' => 'Vybrat kategorii',
'Required field' => 'Povinné políčko',
'Cancel' => 'Zrušit',
)
);
================================================
FILE: plugins/box/menu/languages/de.lang.php
================================================
array(
'Menu' => 'Menü',
'Menu manager' => 'Menü Manager',
'Edit' => 'Bearbeiten',
'Name' => 'Name',
'Delete' => 'Löschen',
'Order' => 'Reihenfolge',
'Actions' => 'Aktionen',
'Create New Item' => 'Erstelle neuen Eintrag',
'New item' => 'Neuer Eintrag',
'Item name' => 'Eintrags Name',
'Item order' => 'Eintrags Reihenfolge',
'Item target' => 'Eintrags Ziel',
'Item link' => 'Eintrags Link',
'Item category' => 'Eintrags Kategorie',
'Save' => 'Speichern',
'Edit item' => 'Bearbeite Eintrag',
'Delete item :name' => 'Lösche Eintrag :name',
'Select page' => 'Seite auswählen',
'Category' => 'Kategorie',
'Select category' => 'Kategorie auswählen',
'Required field' => 'Pflichtfeld',
'Cancel' => 'Abbrechen',
)
);
================================================
FILE: plugins/box/menu/languages/en.lang.php
================================================
array(
'Menu' => 'Menu',
'Menu manager' => 'Menu manager',
'Edit' => 'Edit',
'Name' => 'Name',
'Delete' => 'Delete',
'Order' => 'Order',
'Actions' => 'Actions',
'Create New Item' => 'Create new item',
'New item' => 'New item',
'Item name' => 'Item name',
'Item order' => 'Item order',
'Item target' => 'Item target',
'Item link' => 'Item link',
'Item category' => 'Item category',
'Save' => 'Save',
'Edit item' => 'Edit item',
'Delete item :name' => 'Delete item :name',
'Select page' => 'Select page',
'Category' => 'Category',
'Select category' => 'Select category',
'Required field' => 'Required field',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/menu/languages/es.lang.php
================================================
array(
'Menu' => 'Menús',
'Menu Manager' => 'Administrador de menús',
'Edit' => 'Editar',
'Name' => 'Nombre',
'Delete' => 'Eliminar',
'Order' => 'Orden',
'Actions' => 'Acciones',
'Create New Item' => 'Crear nuevo item',
'New item' => 'Nuevo item',
'Item name' => 'Nombre del item',
'Item order' => 'Orden del item',
'Item target' => 'Target del item',
'Item link' => 'Enlace del item',
'Item category' => 'Categoría del item',
'Save' => 'Guardar',
'Edit item' => 'Editar item',
'Delete item :name' => 'Eliminar item: :name',
'Select page' => 'Seleccionar página',
'Category' => 'Categoría',
'Select category' => 'Seleccionar categoría',
'Required Field' => 'Dato requerido',
'Cancel' => 'Cancelar',
)
);
================================================
FILE: plugins/box/menu/languages/fa.lang.php
================================================
array(
'Menu' => 'منو',
'Menu manager' => 'مدیریت منو',
'Edit' => 'ویرایش',
'Name' => 'نام',
'Delete' => 'حذف',
'Order' => 'ترتیب',
'Actions' => 'عملیات',
'Create New Item' => 'ایجاد آیتم جدید',
'New item' => 'آیتم جدید',
'Item name' => 'نام آیتم',
'Item order' => 'ترتیب آیتم',
'Item target' => 'هدف آیتم',
'Item link' => 'لینک آیتم',
'Item category' => 'مجموعه آیتم',
'Save' => 'ذخیره',
'Edit item' => 'ویرایش آیتم',
'Delete item :name' => 'حذف آیتم :name',
'Select page' => 'انتخاب صفحه',
'Category' => 'مجموعه',
'Select category' => 'انتخاب مجموعه',
'Required field' => 'کادر الزامی',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/menu/languages/fr.lang.php
================================================
array(
'Menu' => 'Menu',
'Menu manager' => 'Gestionnaire du menu',
'Edit' => 'Editer',
'Name' => 'Nom',
'Delete' => 'Supprimer',
'Order' => 'Ordre',
'Actions' => 'Actions',
'Create new item' => 'Créer un nouvel item',
'New item' => 'Nouveau item',
'Item name' => 'Nom de l\'item',
'Item order' => 'Ordre de l\'item',
'Item target' => 'Cible de l\'item',
'Item link' => 'Lien de l\'item',
'Item category' => 'Catégorie de l\'item',
'Save' => 'Enregistrer',
'Edit item' => 'Editer l\'item',
'Delete item :name' => 'Supprimer l\'item :name',
'Select page' => 'Sélectionner la page',
'Category' => 'Catégorie',
'Select category' => 'Sélectionner une catégorie',
'Required field' => 'Champ requis',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/menu/languages/hu.lang.php
================================================
array(
'Menu' => 'Menü',
'Menu manager' => 'Menükezelő',
'Edit' => 'Szerkeszt',
'Name' => 'Név',
'Delete' => 'Töröl',
'Order' => 'Rendezés',
'Actions' => 'Műveletek',
'Create New Item' => 'Új menü készítése',
'New item' => 'Új menü',
'Item name' => 'Menü neve',
'Item order' => 'Menü rendezés',
'Item target' => 'Menü célpont',
'Item link' => 'Menü link',
'Item category' => 'Menü kategória',
'Save' => 'Mentés',
'Edit item' => 'Menü szerkesztése',
'Delete item :name' => 'Menü törlése :name',
'Select page' => 'Válassza ki az oldalt',
'Category' => 'Kategória',
'Select category' => 'Válassza ki a kategóriát',
'Required field' => 'Kötelező mező',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/menu/languages/id.lang.php
================================================
array(
'Menu' => 'Menu',
'Menu manager' => 'Pengelolaan Menu',
'Edit' => 'Perbaiki',
'Name' => 'Nama',
'Delete' => 'Hapus',
'Order' => 'Urutan',
'Actions' => 'Tindakan',
'Create New Item' => 'Buat Perihal Baru',
'New item' => 'Perihal Baru',
'Item name' => 'Nama Perihal',
'Item order' => 'Urutan Perihal',
'Item target' => 'Target Perihal',
'Item link' => 'Link Perihal',
'Item category' => 'Kategori Perihal',
'Save' => 'Simpan',
'Edit item' => 'Perbaiki Perihal',
'Delete item :name' => 'Hapus perihal :nama',
'Select page' => 'Pilih Halaman',
'Category' => 'Kategori',
'Select category' => 'Pilih Kategori',
'Required field' => 'Isian yang Dibutuhkan',
)
);
================================================
FILE: plugins/box/menu/languages/it.lang.php
================================================
array(
'Menu' => 'Menu',
'Menu manager' => 'Gestione menu',
'Edit' => 'Modifica',
'Name' => 'Nome',
'Delete' => 'Elimina',
'Order' => 'Ordine',
'Actions' => 'Azioni',
'Create New Item' => 'Crea nuova voce',
'New item' => 'Nuova voce',
'Item name' => 'Nome',
'Item order' => 'Ordine',
'Item target' => 'Target',
'Item link' => 'Collegamento',
'Item category' => 'Categoria',
'Save' => 'Salva',
'Edit item' => 'Modifica voce menu',
'Delete item :name' => 'Elimina voce menu :name',
'Select page' => 'Scegli pagina',
'Category' => 'Categoria',
'Select category' => 'Scegli categoria',
'Required field' => 'Campo obbligatorio',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/menu/languages/ja.lang.php
================================================
array(
'Menu' => 'メニュー',
'Menu manager' => 'メニューの管理',
'Edit' => '編集',
'Name' => '名前',
'Delete' => '削除',
'Order' => '順序',
'Actions' => '操作',
'Create New Item' => '新規アイテムを作成',
'New item' => '新規アイテム',
'Item name' => 'アイテムの名前',
'Item order' => 'アイテムの順序',
'Item target' => 'アイテムのターゲット',
'Item link' => 'アイテムのリンク先',
'Item category' => 'アイテムのカテゴリ',
'Save' => '保存',
'Edit item' => 'アイテムの編集',
'Delete item :name' => 'アイテムの削除 :name',
'Select page' => 'ページの選択',
'Category' => 'カテゴリ',
'Select category' => 'カテゴリの選択',
'Required field' => '必須項目',
)
);
================================================
FILE: plugins/box/menu/languages/ka-ge.lang.php
================================================
array(
'Menu' => 'მენიუ',
'Menu manager' => 'მენიუს მენეჯერი',
'Edit' => 'რედაქტირება',
'Name' => 'სახელწოდება',
'Delete' => 'წაშლა',
'Order' => 'რიგი',
'Actions' => 'მოქმედება',
'Create New Item' => 'მენიუს ახალი პუნქტის შექმნა',
'New item' => 'მენიუს ახალი პუნქტი',
'Item name' => 'სახელი',
'Item order' => 'რიგი',
'Item target' => 'მიზანი',
'Item link' => 'ბმული',
'Item category' => 'კატეგორია',
'Save' => 'შენახვა',
'Edit item' => 'მენიუს პუნქტის რედაქტირება',
'Delete item :name' => 'მენიუს პუქტის წაშლა :name',
'Select page' => 'გვერდის არჩევა',
'Category' => 'კატეგორია',
'Select category' => 'კატეგორიის არჩევა',
'Required field' => 'აუცილებელი ველი',
'Cancel' => 'გაუქმება',
)
);
================================================
FILE: plugins/box/menu/languages/lt.lang.php
================================================
array(
'Menu' => 'Meniu',
'Menu manager' => 'Meniu tvarkyklė',
'Edit' => 'Redaguoti',
'Name' => 'Pavadinimas',
'Delete' => 'Trinti',
'Order' => 'Eiliškumas',
'Actions' => 'Veiksmai',
'Create New Item' => 'Sukurti naują nuorodą',
'New item' => 'Nauja nuoroda',
'Item name' => 'Pavadinimas',
'Item order' => 'Eiliškumas',
'Item target' => 'Nuorodos atidarymo būdas',
'Item link' => 'Nuoroda',
'Item category' => 'Kategorija',
'Save' => 'Išsaugoti',
'Edit item' => 'Redaguoti nuorodą',
'Delete item :name' => 'Ištrinti nuorodą :name',
'Add page' => 'Pridėti puslapį',
'Select page' => 'Pasirinkti puslapį',
'Category' => 'Kategorija',
'Select category' => 'Pasirinkti kategoriją',
'Required field' => 'Privalomas laukas',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/menu/languages/nl.lang.php
================================================
array(
'Menu' => 'Menu',
'Menu manager' => 'Menu beheer',
'Edit' => 'Bewerken',
'Name' => 'Naam',
'Delete' => 'Verwijderen',
'Order' => 'Volgorde',
'Actions' => 'Acties',
'Create New Item' => 'Nieuw menu',
'New item' => 'Nieuw menu',
'Item name' => 'Menu naam',
'Item order' => 'Menu volgorde',
'Item target' => 'Menu doel',
'Item link' => 'Menu link',
'Item category' => 'Menu categorie',
'Save' => 'Opslaan',
'Edit item' => 'Bewerk menu',
'Delete item :name' => 'Verwijder menu: :name',
'Select page' => 'Selecteer pagina',
'Category' => 'Categorie',
'Select category' => 'Selecteer categorie',
'Required field' => 'Vereist veld',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/menu/languages/pl.lang.php
================================================
array(
'Menu' => 'Menu',
'Menu manager' => 'Zarządzaj menu',
'Edit' => 'Edytuj',
'Name' => 'Nazwa',
'Delete' => 'Usuń',
'Order' => 'Kolejność',
'Actions' => 'Akcje',
'Create New Item' => 'Utwórz nową pozycję',
'New item' => 'Nowa pozycja',
'Item name' => 'Nazwa pozycji',
'Item order' => 'Kolejność pozycji',
'Item target' => 'Cel pozycji',
'Item link' => 'Łącze pozycji',
'Item category' => 'Kategoria pozycji',
'Save' => 'Zapisz',
'Edit item' => 'Edytuj pozycję',
'Delete item :name' => 'Czy napewno usunąć pozycję :name',
'Select page' => 'Wybierz stronę',
'Category' => 'Kategoria',
'Select category' => 'Wybierz kategorię',
'Required field' => 'Pole wymagane',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/menu/languages/pt-br.lang.php
================================================
array(
'Menu' => 'Menu',
'Menu manager' => 'Gerenciador do menu',
'Edit' => 'Editar',
'Name' => 'Nome',
'Delete' => 'Deletar',
'Order' => 'Ordem',
'Actions' => 'Ações',
'Create New Item' => 'Criar novo item',
'New item' => 'Novo item',
'Item name' => 'Nome do item',
'Item order' => 'ordem do item',
'Item target' => 'Target do item (atributo HTML)',
'Item link' => 'Link do item',
'Item category' => 'Categoria do item',
'Save' => 'Salvar',
'Edit item' => 'Editar item',
'Delete item :name' => 'Deletar o item :name',
'Select page' => 'Selecionar página',
'Category' => 'Categoria',
'Select category' => 'Selecionar categoria',
'Required field' => 'Campo requerido',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/menu/languages/ru.lang.php
================================================
array(
'Menu' => 'Меню',
'Menu manager' => 'Менеджер меню',
'Edit' => 'Редактировать',
'Name' => 'Название',
'Delete' => 'Удалить',
'Order' => 'Порядок',
'Actions' => 'Действия',
'Create New Item' => 'Создать новый пункт меню',
'New item' => 'Новый пункт меню',
'Item name' => 'Название',
'Item order' => 'Порядок',
'Item target' => 'Цель',
'Item link' => 'Ссылка',
'Item category' => 'Категория',
'Save' => 'Сохранить',
'Edit item' => 'Редактирование пункта меню',
'Delete item :name' => 'Удалить пункт меню :name',
'Select page' => 'Выбрать страницу',
'Category' => 'Категория',
'Select category' => 'Выбрать категорию',
'Required field' => 'Обязательное поле',
'Cancel' => 'Отмена',
)
);
================================================
FILE: plugins/box/menu/languages/sk.lang.php
================================================
array(
'Menu' => 'Menu',
'Menu manager' => 'Manažér menu',
'Edit' => 'Editovať',
'Name' => 'Názov',
'Delete' => 'Vymazať',
'Order' => 'Poradie',
'Actions' => 'Akcie',
'Create New Item' => 'Vytvoriť novú položku',
'New item' => 'Nová položka',
'Item name' => 'Názov položky',
'Item order' => 'Poradie položky',
'Item target' => 'Cieľ položky',
'Item link' => 'Odkaz položky',
'Item category' => 'Kategória položky',
'Save' => 'Uložiť',
'Edit item' => 'Editovať položku',
'Delete item :name' => 'Vymazať položku :name',
'Select page' => 'Vybrať stránku',
'Category' => 'Kategória',
'Select category' => 'Vybrať kategóriu',
'Required field' => 'Povinné políčko',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/menu/languages/sr.lang.php
================================================
array(
'Menu' => 'Menu',
'Menu manager' => 'Menu menadžer',
'Edit' => 'Izmeni',
'Name' => 'Ime',
'Delete' => 'Obriši',
'Order' => 'Poređenje',
'Actions' => 'Akcije',
'Create new item' => 'Kreiraj novu stavku',
'New item' => 'Nova stavka',
'Item name' => 'Ime',
'Item order' => 'Poredjenje',
'Item target' => 'Otvaranje stranice',
'Item link' => 'Link',
'Item category' => 'Kategorija',
'Save' => 'Sačuvaj',
'Edit item' => 'Izmeni',
'Delete item :name' => 'Obriši stavku :name',
'Select page' => 'Odaberi stranicu',
'Category' => 'Kategorija',
'Select category' => 'Odaberi kategoriju',
'Required field' => 'Polje je potrebno',
'Cancel' => 'Otkaži',
)
);
================================================
FILE: plugins/box/menu/languages/tr.lang.php
================================================
array(
'Menu' => 'Menü',
'Menu manager' => 'Menü Yöneticisi',
'Edit' => 'Düzenle',
'Name' => 'Ad',
'Delete' => 'Sil',
'Order' => 'Sıra',
'Actions' => 'İşlemler',
'Create New Item' => 'Yeni Bağlantı Oluştur',
'New item' => 'Yeni bağlantı',
'Item name' => 'Bağlantı adı',
'Item order' => 'Bağlantı sırası',
'Item target' => 'Bağlantı hedefi',
'Item link' => 'Bağlantı yolu',
'Item category' => 'Bağlantı kategorisi',
'Save' => 'Kaydet',
'Edit item' => 'Bağlantıyı düzenle',
'Delete item :name' => ':name adlı bağlantıyı sil',
'Select page' => 'Sayfa seç',
'Category' => 'Kategori',
'Select category' => 'Kategori seç',
'Required field' => 'Zorunlu alan',
'Cancel' => 'Vazgeç',
)
);
================================================
FILE: plugins/box/menu/languages/uk.lang.php
================================================
array(
'Menu' => 'Меню',
'Menu manager' => 'Менеджер меню',
'Edit' => 'Редагувати',
'Name' => 'Назва',
'Delete' => 'Видалити',
'Order' => 'Порядок',
'Actions' => 'Дії',
'Create New Item' => 'Створити новий пункт меню',
'New item' => 'Новий пункт меню',
'Item name' => 'Назва',
'Item order' => 'Порядок',
'Item target' => 'Ціль',
'Item link' => 'Лінк',
'Item category' => 'Категорія',
'Save' => 'Зберегти',
'Edit item' => 'Редагувати пункт меню',
'Delete item :name' => 'Видалити пункт меню :name',
'Select page' => 'Вибрати сторінку',
'Category' => 'Категорія',
'Select category' => 'Вибрати категорію',
'Required field' => 'Обов’язкове поле',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/menu/languages/zh-cn.lang.php
================================================
array(
'Menu' => '菜单',
'Menu manager' => '菜单管理',
'Edit' => '编辑',
'Name' => '名称',
'Delete' => '删除',
'Order' => '顺序',
'Actions' => '操作',
'Create New Item' => '创建新项目',
'New item' => '新项目',
'Item name' => '项目名称',
'Item order' => '项目顺序',
'Item target' => '项目目标',
'Item link' => '项目链接',
'Item category' => '项目类别',
'Save' => '保存',
'Edit item' => '布局项目',
'Delete item :name' => '删除项目 :name',
'Select page' => '选择页面',
'Category' => '类别',
'Select category' => '选择类别',
'Required field' => '必填字段',
)
);
================================================
FILE: plugins/box/menu/menu.admin.php
================================================
'',
'_blank' => '_blank',
'_parent' => '_parent',
'_top' => '_top');
// Create order array
$menu_item_order_array = range(0, 40);
// Check for get actions
// ---------------------------------------------
if (Request::get('action')) {
// Switch actions
// -----------------------------------------
switch (Request::get('action')) {
// Edit menu item
// -----------------------------------------
case "edit":
// Select item
$item = MenuAdmin::$menu->select('[id="'.Request::get('item_id').'"]', null);
$menu_item_name = $item['name'];
$menu_item_link = $item['link'];
$menu_item_category = $item['category'];
$menu_item_target = $item['target'];
$menu_item_order = $item['order'];
$errors = array();
// Edit current menu item
if (Request::post('menu_add_item')) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('menu_item_name')) == '') {
if (Request::post('menu_item_name')) $menu_item_name = Request::post('menu_item_name'); else $menu_item_name = $item['name'];
if (Request::post('menu_item_link')) $menu_item_link = Request::post('menu_item_link'); else $menu_item_link = $item['link'];
if (Request::post('menu_item_category')) $menu_item_category = Request::post('menu_item_category'); else $menu_item_category = $item['category'];
if (Request::post('menu_item_target')) $menu_item_target = Request::post('menu_item_target'); else $menu_item_target = $item['target'];
if (Request::post('menu_item_order')) $menu_item_order = Request::post('menu_item_order'); else $menu_item_order = $item['order'];
$errors['menu_item_name_empty'] = __('Required field', 'menu');
}
// Update menu item
if (count($errors) == 0) {
MenuAdmin::$menu->update(Request::get('item_id'),
array('name' => Request::post('menu_item_name'),
'link' => Request::post('menu_item_link'),
'category' => Security::safeName(Request::post('menu_item_category'), '-', true),
'target' => Request::post('menu_item_target'),
'order' => Request::post('menu_item_order')));
Request::redirect('index.php?id=menu');
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Display view
View::factory('box/menu/views/backend/edit')
->assign('menu_item_name', $menu_item_name)
->assign('menu_item_link', $menu_item_link)
->assign('menu_item_category', $menu_item_category)
->assign('menu_item_target', $menu_item_target)
->assign('menu_item_order', $menu_item_order)
->assign('menu_item_target_array', $menu_item_target_array)
->assign('menu_item_order_array', $menu_item_order_array)
->assign('errors', $errors)
->assign('categories', MenuAdmin::getCategories())
->assign('pages_list', MenuAdmin::getPages())
->assign('components_list', MenuAdmin::getComponents())
->display();
break;
// Add menu item
// -----------------------------------------
case "add":
$menu_item_name = '';
$menu_item_link = '';
$menu_item_category = '';
$menu_item_target = '';
$menu_item_order = '';
$errors = array();
// Get current category
$menu_item_category = $current_category = (Request::get('category')) ? Request::get('category') : '' ;
// Add new menu item
if (Request::post('menu_add_item')) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('menu_item_name')) == '') {
if (Request::post('menu_item_name')) $menu_item_name = Request::post('menu_item_name'); else $menu_item_name = '';
if (Request::post('menu_item_link')) $menu_item_link = Request::post('menu_item_link'); else $menu_item_link = '';
if (Request::post('menu_item_category')) $menu_item_category = Request::post('menu_item_category'); else $menu_item_category = $current_category;
if (Request::post('menu_item_target')) $menu_item_target = Request::post('menu_item_target'); else $menu_item_target = '';
if (Request::post('menu_item_order')) $menu_item_order = Request::post('menu_item_order'); else $menu_item_order = '';
$errors['menu_item_name_empty'] = __('Required field', 'menu');
}
// Insert new menu item
if (count($errors) == 0) {
MenuAdmin::$menu->insert(array('name' => Request::post('menu_item_name'),
'link' => Request::post('menu_item_link'),
'category' => Security::safeName(Request::post('menu_item_category'), '-', true),
'target' => Request::post('menu_item_target'),
'order' => Request::post('menu_item_order')));
Request::redirect('index.php?id=menu');
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Display view
View::factory('box/menu/views/backend/add')
->assign('menu_item_name', $menu_item_name)
->assign('menu_item_link', $menu_item_link)
->assign('menu_item_category', $menu_item_category)
->assign('menu_item_target', $menu_item_target)
->assign('menu_item_order', $menu_item_order)
->assign('menu_item_target_array', $menu_item_target_array)
->assign('menu_item_order_array', $menu_item_order_array)
->assign('errors', $errors)
->assign('categories', MenuAdmin::getCategories())
->assign('pages_list', MenuAdmin::getPages())
->assign('components_list', MenuAdmin::getComponents())
->display();
break;
}
} else {
// Delete menu item
if (Request::get('delete_item')) {
MenuAdmin::$menu->delete((int) Request::get('delete_item'));
}
// Display view
View::factory('box/menu/views/backend/index')
->assign('categories', MenuAdmin::getCategories())
->assign('menu', MenuAdmin::$menu)
->display();
}
}
/**
* Get categories
*/
public static function getCategories()
{
$categories = array();
$_categories = MenuAdmin::$menu->select(null, 'all', null, array('category'));
foreach ($_categories as $category) {
$categories[] = $category['category'];
}
return array_unique($categories);
}
/**
* Get pages
*/
protected static function getPages()
{
// Init vars
$pages_array = array();
$count = 0;
// Get pages table
$pages = new Table('pages');
// Get Pages List
$pages_list = $pages->select('[slug!="error404" and status="published"]');
foreach ($pages_list as $page) {
$pages_array[$count]['title'] = Html::toText($page['title']);
$pages_array[$count]['parent'] = $page['parent'];
$pages_array[$count]['date'] = $page['date'];
$pages_array[$count]['author'] = $page['author'];
$pages_array[$count]['slug'] = ($page['slug'] == Option::get('defaultpage')) ? '' : $page['slug'] ;
if (isset($page['parent'])) {
$c_p = $page['parent'];
} else {
$c_p = '';
}
if ($c_p != '') {
$_page = $pages->select('[slug="'.$page['parent'].'"]', null);
if (isset($_page['title'])) {
$_title = $_page['title'];
} else {
$_title = '';
}
$pages_array[$count]['sort'] = $_title . ' ' . $page['title'];
} else {
$pages_array[$count]['sort'] = $page['title'];
}
$_title = '';
$count++;
}
// Sort pages
$_pages_list = Arr::subvalSort($pages_array, 'sort');
// return
return $_pages_list;
}
/**
* Get components
*/
protected static function getComponents()
{
$components = array();
if (count(Plugin::$components) > 0) {
foreach (Plugin::$components as $component) {
if ($component !== 'pages' && $component !== 'sitemap') $components[] = Text::lowercase($component);
}
}
return $components;
}
}
================================================
FILE: plugins/box/menu/menu.plugin.php
================================================
assign('items', $menu->select('[category="'.$category.'"]', 'all', null, array('id', 'name', 'link', 'target', 'order', 'category'), 'order', 'ASC'))
->assign('uri', Uri::segments())
->assign('defpage', Option::get('defaultpage'))
->display();
}
}
================================================
FILE: plugins/box/menu/views/backend/add.view.php
================================================
(isset($errors['menu_item_name_empty']) || isset($errors['menu_item_name_empty'])) ? 'form-control error-field' : 'form-control'));
if (isset($errors['menu_item_name_empty'])) echo '';
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'btn btn-phone btn-primary')).Html::nbsp(2).
Html::anchor(__('Cancel', 'menu'), 'index.php?id=menu', array('title' => __('Cancel', 'menu'), 'class' => 'btn btn-phone btn-default')).
Form::close()
);
?>
================================================
FILE: plugins/box/menu/views/backend/edit.view.php
================================================
(isset($errors['menu_item_name_empty']) || isset($errors['menu_item_name_empty'])) ? 'form-control error-field' : 'form-control'));
?>
'.$errors['menu_item_name_empty'].'';
echo (
Form::label('menu_item_link', __('Item link', 'menu')).
Form::input('menu_item_link', $menu_item_link, array('class' => 'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'btn btn-phone btn-primary')).Html::nbsp(2).
Html::anchor(__('Cancel', 'menu'), 'index.php?id=menu', array('title' => __('Cancel', 'menu'), 'class' => 'btn btn-phone btn-default')).
Form::close()
);
?>
================================================
FILE: plugins/box/menu/views/backend/index.view.php
================================================
count() == 0) { ?>
:
__('Create New Item', 'menu'), 'class' => 'btn btn-phone btn-primary'))
);
?>
select('[category="'.$category.'"]', 'all', null, array('id', 'name', 'link', 'target', 'order', 'category'), 'order', 'ASC');
$category_to_add = ($category == '') ? '' : '&category='.$category;
?>
:
__('Create New Item', 'menu'), 'class' => 'btn btn-phone btn-primary'))
);
?>
'btn btn-primary')); ?>
'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete item :name', 'menu', array(':name' => $item['name']))."')"));
?>
================================================
FILE: plugins/box/menu/views/frontend/index.view.php
================================================
0) {
foreach ($items as $item) {
$item['link'] = Html::toText($item['link']);
$item['name'] = Html::toText($item['name']);
$pos = strpos($item['link'], 'http://');
if ($pos === false) {
$link = Option::get('siteurl').'/'.$item['link'];
} else {
$link = $item['link'];
}
if (isset($uri[1])) {
$child_link = explode("/",$item['link']);
if (isset($child_link[1])) {
if (in_array($child_link[1], $uri)) {
$anchor_active = ' class="current" ';
$li_active = ' class="active"';
}
}
}
if (isset($uri[0]) && $uri[0] !== '') {
if (in_array($item['link'], $uri)) {
$anchor_active = ' class="current" ';
$li_active = ' class="active"';
}
} else {
if ($defpage == trim($item['link'])) {
$anchor_active = ' class="current" ';
$li_active = ' class="active"';
}
}
if (trim($item['target']) !== '') {
$target = ' target="'.$item['target'].'" ';
}
echo ''.''.$item['name'].''.' ';
$anchor_active = '';
$li_active = '';
$target = '';
}
}
================================================
FILE: plugins/box/pages/install/pages.manifest.xml
================================================
plugins/box/pages/pages.plugin.php
active
1
Pages
Pages managment plugin
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/pages/js/.htaccess
================================================
Options -Indexes
Allow from all
================================================
FILE: plugins/box/pages/js/pages.js
================================================
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.pages = {
init: function() {
this.pagesExpandProcess();
},
pageExpand: function(slug, expand, token) {
$.ajax({
type:"post",
data:"page_slug="+slug+"&page_expand="+expand+"&token="+token,
url: $('form input[name="url"]').val()
});
},
pagesExpandProcess: function() {
$(".parent").click(function() {
if ($(this).html() == "-") {
$('[rel="children_' + $(this).attr('rel')+'"]').hide();
$(this).html("+");
$.monstra.pages.pageExpand($(this).attr("rel"), "1", $(this).attr("token"));
} else {
$('[rel="children_' + $(this).attr('rel')+'"]').show();
$(this).html("-");
$.monstra.pages.pageExpand($(this).attr("rel"), "0", $(this).attr("token"));
}
});
}
};
$(document).ready(function(){
$.monstra.pages.init();
});
================================================
FILE: plugins/box/pages/languages/cs.lang.php
================================================
array(
'Pages' => 'Stránky',
'Pages manager' => 'Manažer stránek',
'Content' => 'Obsah',
'Create new page' => 'Vytvořit novou stránku',
'New page' => 'Nová stránka',
'Edit page' => 'Editovat stránku',
'Date' => 'Datum',
'Clone' => 'Klonovat',
'Edit' => 'Editovat',
'Delete' => 'Vymazat',
'Delete page: :page' => 'Vymazat stránku: :page',
'Title' => 'Titulka',
'Name' => 'Název',
'Author' => 'Autor',
'Name (slug)' => 'Název (slug)',
'Description' => 'Popis',
'Keywords' => 'Klíčová slová',
'Parent' => 'Rodič - Nadřazená stránka',
'Template' => 'Téma',
'Year' => 'Rok',
'Day' => 'Den',
'Month' => 'Měsíc',
'Hour' => 'Hodina',
'Minute' => 'Minuta',
'Second' => 'Sekunda',
'This field should not be empty' => 'Toto políčko nesmí být prázdné',
'This page already exists' => 'Tato stránka již existuje',
'Extra' => 'Extra',
'Save' => 'Uložit',
'Save and Exit' => 'Uložit a ukončit',
'Your changes to the page :page have been saved.' => 'Vaše změny na stránce :page byly uloženy.',
'The page :page cloned.' => 'Stránka :page byla klonována.',
'Status' => 'Status',
'Actions' => 'Akcie',
'Add' => 'Přidat',
'Published' => 'Zveřejněné',
'Draft' => 'Rozpísané',
'Published on' => 'Zveřejněné dne',
'Edit 404 Page' => 'Editovat stránku 404',
'Page :page deleted' => 'Vymazat stránku: :page',
'Search Engines Robots' => 'Vyhledávací roboti',
'Page' => 'Stránka',
'Metadata' => 'Metadata',
'Settings' => 'Nastavení',
'Required field' => 'Povinné políčko',
'Access' => 'Přístup',
'Public' => 'Veřejný',
'Registered' => 'Po přihlášení',
'Cancel' => 'Zrušit',
)
);
================================================
FILE: plugins/box/pages/languages/de.lang.php
================================================
array(
'Pages' => 'Seiten',
'Pages manager' => 'Seiten Manager',
'Content' => 'Inhalt',
'Create New Page' => 'Neue Seite erstellen',
'New Page' => 'Neue Seite',
'Edit Page' => 'Seite bearbeiten',
'Date' => 'Datum',
'Clone' => 'Klonen',
'Edit' => 'Bearbeiten',
'Delete' => 'Löschen',
'Delete page: :page' => 'Lösche Seite: :page',
'Title' => 'Titel',
'Name' => 'Name',
'Author' => 'Author',
'Name (slug)' => 'Name (slug)',
'Description' => 'Beschreibung',
'Keywords' => 'Schlagwörter',
'Parent' => 'Übergeordnete',
'Template' => 'Vorlage',
'Year' => 'Jahr',
'Day' => 'Tag',
'Month' => 'Monat',
'Hour' => 'Stunde',
'Minute' => 'Minute',
'Second' => 'Sekunde',
'This field should not be empty' => 'Dieses Feld darf nicht leer sein',
'This page already exists' => 'Diese Seite existiert bereits',
'Extra' => 'Extra',
'Save' => 'Speichern',
'Save and Exit' => 'Speichern und Beenden',
'Your changes to the page :page have been saved.' => 'Deine Änderungen an der Seite :page wurden gespeichert.',
'The page :page cloned.' => 'Die Seite :page wurde gekloned.',
'Status' => 'Status',
'Actions' => 'Aktionen',
'Add' => 'Hinzufügen',
'Published' => 'Veröffentlicht',
'Draft' => 'Entwurf',
'Published on' => 'Veröffentlicht am',
'Edit 404 Page' => 'Bearbeite 404-Fehler Seite',
'Page :page deleted' => 'Seite :page wurde gelöscht',
'Search Engines Robots' => 'Suchmaschinen-Roboter',
'Page' => 'Seite',
'Metadata' => 'Metadata',
'Settings' => 'Einstellungen',
'Required field' => 'Pflichtfeld',
'Access' => 'Zugriff',
'Public' => 'Öffentlich',
'Registered' => 'Angemeldet',
'Cancel' => 'Abbrechen',
)
);
================================================
FILE: plugins/box/pages/languages/en.lang.php
================================================
array(
'Pages' => 'Pages',
'Pages manager' => 'Pages manager',
'Content' => 'Content',
'Create New Page' => 'Create New Page',
'New Page' => 'New Page',
'Edit Page' => 'Edit Page',
'Date' => 'Date',
'Clone' => 'Clone',
'Edit' => 'Edit',
'Delete' => 'Delete',
'Delete page: :page' => 'Delete page: :page',
'Title' => 'Title',
'Name' => 'Name',
'Author' => 'Author',
'Name (slug)' => 'Name (slug)', // check whether in use or not
'Slug (url)' => 'Slug (url)',
'Description' => 'Description',
'Keywords' => 'Keywords',
'Parent' => 'Parent',
'Template' => 'Template',
'Year' => 'Year',
'Day' => 'day',
'Month' => 'Month',
'Hour' => 'Hour',
'Minute' => 'Minute',
'Second' => 'Second',
'This field should not be empty' => 'This field should not be empty',
'This page already exists' => 'This page already exists',
'Extra' => 'Extra',
'Save' => 'Save',
'Save and Exit' => 'Save and Exit',
'Your changes to the page :page have been saved.' => 'Your changes to the page :page have been saved.',
'The page :page cloned.' => 'The page :page cloned.',
'Status' => 'Status',
'Actions' => 'Actions',
'Add' => 'Add',
'Published' => 'Published',
'Draft' => 'Draft',
'Published on' => 'Published on',
'Edit 404 Page' => 'Edit 404 Page',
'Page :page deleted' => 'Page :page deleted',
'Search Engines Robots' => 'Search Engines Robots',
'Page' => 'Page',
'Metadata' => 'Metadata',
'Settings' => 'Settings',
'Required field' => 'Required field',
'Access' => 'Access',
'Public' => 'Public',
'Registered' => 'Registered',
'Cancel' => 'Cancel',
'Tags' => 'Tags',
)
);
================================================
FILE: plugins/box/pages/languages/es.lang.php
================================================
array(
'Pages' => 'Páginas',
'Pages manager' => 'Administrador de páginas',
'Content' => 'Contenido',
'Create New Page' => 'Crear nueva página',
'New Page' => 'Nueva página',
'Edit Page' => 'Editar página',
'Date' => 'Fecha',
'Clone' => 'Clonar',
'Edit' => 'Editar',
'Delete' => 'Eliminar',
'Delete page: :page' => 'Eliminar página: :page',
'Title' => 'Título',
'Name' => 'Nombre',
'Author' => 'Autor',
'Name (slug)' => 'Nombre (slug)',
'Description' => 'Descripción',
'Keywords' => 'Palabras claves',
'Parent' => 'Página padre',
'Template' => 'Plantilla',
'Year' => 'Año',
'Day' => 'Día',
'Month' => 'Mes',
'Hour' => 'Hora',
'Minute' => 'Minuto',
'Second' => 'Segundo',
'This field should not be empty' => 'Este campo no puede quedar vacío',
'This page already exists' => 'Esta página ya existe',
'Extra' => 'Extra',
'Save' => 'Guardar',
'Save and Exit' => 'Guardar y salir',
'Your changes to the page :page have been saved.' => 'Tus cambios realizados en la página :page han sido guardados.',
'The page :page cloned.' => 'La página :page ha sido clonada.',
'Status' => 'Estado',
'Actions' => 'Acciones',
'Add' => 'Añadir',
'Published' => 'Publicada',
'Draft' => 'Borrador',
'Published on' => 'Publicada',
'Edit 404 Page' => 'Editar página 404',
'Page :page deleted' => 'Página :page eliminada',
'Search Engines Robots' => 'Motores de búsqueda robots',
'Page' => 'Página',
'Metadata' => 'Metadatos',
'Settings' => 'Ajustes',
'Required field' => 'Dato requerido',
'Access' => 'Acceso',
'Public' => 'Público',
'Registered' => 'Registrado',
'Cancel' => 'Cancelar',
)
);
================================================
FILE: plugins/box/pages/languages/fa.lang.php
================================================
array(
'Pages' => 'صفحه',
'Pages manager' => 'مدیریت صفحه',
'Content' => 'محتوی',
'Create New Page' => 'ایجاد صفحه جدید',
'New Page' => 'صفحه جدید',
'Edit Page' => 'ویرایش صفحه',
'Date' => 'تاریخ',
'Clone' => 'کپی برداری',
'Edit' => 'ویرایش',
'Delete' => 'حذف',
'Delete page: :page' => 'حذف صفحه: :page',
'Title' => 'عنوان',
'Name' => 'نام',
'Author' => 'نویسنده',
'Name (slug)' => 'نام (برچسب)',
'Description' => 'توضیحات',
'Keywords' => 'کلمات کلیدی',
'Parent' => 'والد',
'Template' => 'قالب',
'Year' => 'سال',
'Day' => 'روز',
'Month' => 'ماه',
'Hour' => 'ساعت',
'Minute' => 'دقیقه',
'Second' => 'ثانیه',
'This field should not be empty' => 'این کادر نباید خالی باشد',
'This page already exists' => 'این صفحه در حال حاضر وجود دارد',
'Extra' => 'اضافی',
'Save' => 'ذخیره',
'Save and Exit' => 'ذخیره و خروج',
'Your changes to the page :page have been saved.' => 'تغییرات شما بر روی صفحه :page ذخیره شد.',
'The page :page cloned.' => 'صفحه :page کپی برداری شد.',
'Status' => 'وضعیت',
'Actions' => 'عملیات',
'Add' => 'افزودن',
'Published' => 'منتشر شده',
'Draft' => 'پیش نویس',
'Published on' => 'منتشر شده در',
'Edit 404 Page' => 'ویرایش صفحه 404',
'Page :page deleted' => 'صفحه :page حذف شد',
'Search Engines Robots' => 'روباتهای موتور جستجوگر',
'Page' => 'صفحه',
'Metadata' => 'فراداده',
'Settings' => 'تنظیمات',
'Required field' => 'کادر الزامی',
'Access' => 'دسترسی',
'Public' => 'عمومی',
'Registered' => 'اعضاء',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/pages/languages/fr.lang.php
================================================
array(
'Pages' => 'Pages',
'Pages manager' => 'Gestionnaire des pages',
'Content' => 'Contenu',
'Create new page' => 'Créer une nouvelle page',
'New page' => 'Nouvelle page',
'Edit page' => 'Editer la page',
'Date' => 'Date',
'Clone' => 'Cloner',
'Edit' => 'Editer',
'Delete' => 'Supprimer',
'Delete page: :page' => 'Supprimer la page: :page',
'Title' => 'Titre',
'Name' => 'Nom',
'Author' => 'Auteur',
'Name (slug)' => 'Nom (Permalien)',
'Description' => 'Description',
'Keywords' => 'Mots clés',
'Parent' => 'Parent',
'Template' => 'Modèle',
'Year' => 'Année',
'Day' => 'Jour',
'Month' => 'Mois',
'Hour' => 'Heure',
'Minute' => 'Minute',
'Second' => 'Seconde',
'This field should not be empty' => 'Ce champ ne doit pas être vide',
'This page already exists' => 'Cette page existe déjà',
'Extra' => 'Extra',
'Save' => 'Enregistrer',
'Save and exit' => 'Enregistrer et sortir',
'Your changes to the page :page have been saved.' => 'Vos changements sur la page :page ont été sauvegardés.',
'The page :page cloned.' => 'La page :page est cloné.',
'Status' => 'Statut',
'Actions' => 'Actions',
'Add' => 'Ajouter',
'Published' => 'Publiée',
'Draft' => 'Brouillon',
'Published on' => 'Publiée le',
'Edit 404 Page' => 'Editer la page 404',
'Page :page deleted' => 'Page :page supprimé',
'Search Engines Robots' => 'Robots des moteurs de recherche',
'Page' => 'Page',
'Metadata' => 'Métadonnées',
'Settings' => 'Paramètres',
'Required field' => 'Champ requis',
'Access' => 'Accès',
'Public' => 'Public',
'Registered' => 'Inscrit',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/pages/languages/hu.lang.php
================================================
array(
'Pages' => 'Oldalak',
'Pages manager' => 'Oldalkezelő',
'Content' => 'Tartalom',
'Create New Page' => 'Új oldal létrehozása',
'New Page' => 'Új oldal',
'Edit page' => 'Oldal szerkesztése',
'Date' => 'Dátum',
'Clone' => 'Klón',
'Edit' => 'Szerkeszt',
'Delete' => 'Töröl',
'Delete page: :page' => 'Oldal törlése: :page',
'Title' => 'Cím',
'Name' => 'Név',
'Author' => 'Szerző',
'Name (slug)' => 'Név (slug)',
'Description' => 'Leírás',
'Keywords' => 'Kulcsszavak',
'Parent' => 'Szülő',
'Template' => 'Sablon',
'Year' => 'Év',
'Day' => 'Nap',
'Month' => 'Hónap',
'Hour' => 'Óra',
'Minute' => 'Perc',
'Second' => 'Másodperc',
'This field should not be empty' => 'Ez a mező nem lehet üres',
'This page already exists' => 'Ez az oldal már létezik',
'Extra' => 'Extra',
'Save' => 'Mentés',
'Save and Exit' => 'Mentés és Kilépés',
'Your changes to the page :page have been saved.' => 'A módosításoksok az oldalra :page mentve.',
'The page :page cloned.' => 'A(z) :page oldal kónozva.',
'Status' => 'Állapot',
'Actions' => 'Műveletek',
'Add' => 'Hozzáad',
'Published' => 'Közzétett',
'Draft' => 'Vázlat',
'Published on' => 'Publikálva',
'Edit 404 Page' => 'A 404-es oldal szerkesztése',
'Page :page deleted' => 'A(z) :page oldal törölve',
'Search Engines Robots' => 'Keresőrobotok',
'Page' => 'Oldal',
'Metadata' => 'Metaadat',
'Settings' => 'Beállítások',
'Required field' => 'Kötelező mező',
'Access' => 'Hozzáférés',
'Public' => 'Nyilvános',
'Registered' => 'Regisztrált',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/pages/languages/id.lang.php
================================================
array(
'Pages' => 'Halaman',
'Pages manager' => 'Pengelolaan Halaman',
'Content' => 'Isi',
'Create New Page' => 'Buat Halaman Baru',
'New Page' => 'Halaman Baru',
'Edit Page' => 'Perbaiki Halaman',
'Date' => 'Tanggal',
'Clone' => 'Duplikasi',
'Edit' => 'Perbaiki',
'Delete' => 'Hapus',
'Delete page: :page' => 'Hapus Halaman: :page',
'Title' => 'Judul',
'Name' => 'Nama',
'Author' => 'Penulis',
'Name (slug)' => 'Nama (slug)',
'Description' => 'Deskripsi',
'Keywords' => 'Kata Kunci',
'Parent' => 'Induk',
'Template' => 'Contoh',
'Year' => 'Tahun',
'Day' => 'Hari',
'Month' => 'Bulan',
'Hour' => 'Jam',
'Minute' => 'Menit',
'Second' => 'Detik',
'This field should not be empty' => 'Isian ini tidak boleh kosong',
'This page already exists' => 'Halaman ini sudah ada',
'Extra' => 'Extra',
'Save' => 'Simpan',
'Save and Exit' => 'Simpan dan Keluar',
'Your changes to the page :page have been saved.' => 'Perubahan pada halaman :page telah disimpan.',
'The page :page cloned.' => 'Halaman ini :page telah diduplikasi.',
'Status' => 'Status',
'Actions' => 'Tindakan',
'Add' => 'Tambah',
'Published' => 'Dimuat',
'Draft' => 'Konsep',
'Published on' => 'Dimuat pada',
'Edit 404 Page' => 'Perbaiki Halaman 404',
'Page :page deleted' => 'Halaman :page dihapus',
'Search Engines Robots' => 'Mesin Pencari Otomatis',
'Page' => 'Halaman',
'Metadata' => 'Metadata',
'Settings' => 'Pengaturan',
'Required field' => 'Isian yang Diperlukan',
'Access' => 'Akses',
'Public' => 'Umum',
'Registered' => 'Terdaftar',
)
);
================================================
FILE: plugins/box/pages/languages/it.lang.php
================================================
array(
'Pages' => 'Pagine',
'Pages manager' => 'Gestione pagine',
'Content' => 'Contenuto',
'Create New Page' => 'Crea Nuova Pagina',
'New Page' => 'Nuova Pagina',
'Edit Page' => 'Modifica Pagina',
'Date' => 'Data',
'Clone' => 'Clona',
'Edit' => 'Modifica',
'Delete' => 'Elimina',
'Delete page: :page' => 'Elimina pagina: :page',
'Title' => 'Titolo',
'Name' => 'Nome',
'Author' => 'Autore',
'Name (slug)' => 'Nome (slug)',
'Description' => 'Descrizione',
'Keywords' => 'Parole chiavi',
'Parent' => 'Parente',
'Template' => 'Modello',
'Year' => 'Anno',
'Day' => 'Giorno',
'Month' => 'Mese',
'Hours' => 'Ora',
'Minute' => 'Minuto',
'Second' => 'Secondo',
'This field should not be empty' => 'Campo obbligatorio',
'This page already exists' => 'Tale pagina già esistente',
'Extra' => 'Extra',
'Save' => 'Salva',
'Save and Exit' => 'Salva ed Esci',
'Your changes to the page :page have been saved.' => 'Le modifiche alla pagina :page sono state salvate.',
'The page :page cloned.' => 'Pagina :page è stata clonata.',
'Status' => 'Stato',
'Actions' => 'Azioni',
'Add' => 'Aggiungi',
'Published' => 'Pubblicato',
'Draft' => 'Bozza',
'Published on' => 'Pubblicato il',
'Edit 404 Page' => 'Modifica Pagina 404',
'Page :page deleted' => 'Pagina :page è stata cancellata',
'Search Engines Robots' => 'Robot dei motori di ricerca',
'Page' => 'Pagina',
'Metadata' => 'Metadata',
'Settings' => 'Impostazioni',
'Required field' => 'Campo obbligatorio',
'Access' => 'Accesso',
'Public' => 'Pubblico',
'Registered' => 'Registrato',
'Cancel' => 'Cancel',
),
);
================================================
FILE: plugins/box/pages/languages/ja.lang.php
================================================
array(
'Pages' => 'ページ',
'Pages manager' => 'ページの管理',
'Content' => '内容',
'Create New Page' => '新規ページの作成',
'New Page' => '新規ページ',
'Edit Page' => 'ページの編集',
'Date' => '日付',
'Clone' => '複製',
'Edit' => '編集',
'Delete' => '削除',
'Delete page: :page' => 'ページの削除: :page',
'Title' => 'タイトル',
'Name' => '名前',
'Author' => '作成者',
'Name (slug)' => '名前 (スラッグ)',
'Description' => '説明',
'Keywords' => 'キーワード',
'Parent' => '親',
'Template' => 'テンプレート',
'Year' => '年',
'Day' => '日',
'Month' => '月',
'Hour' => '時',
'Minute' => '分',
'Second' => '秒',
'This field should not be empty' => 'この項目は空白にできません',
'This page already exists' => 'このページはすでに存在しています',
'Extra' => '拡張',
'Save' => '保存',
'Save and Exit' => '保存して終了',
'Your changes to the page :page have been saved.' => ' :page への変更は保存されました。',
'The page :page cloned.' => ':page が複製されました。',
'Status' => 'ステータス',
'Actions' => '操作',
'Add' => '追加',
'Published' => '公開済み',
'Draft' => '下書き',
'Published on' => '公開日',
'Edit 404 Page' => '404 ページの編集',
'Page :page deleted' => ':page は削除されました。',
'Search Engines Robots' => 'サーチエンジンロボットへの通知',
'Page' => 'ページ',
'Metadata' => 'メタデータ',
'Settings' => '設定',
'Required field' => '必須項目',
'Access' => 'アクセス許可',
'Public' => '一般公開',
'Registered' => '登録者のみ',
)
);
================================================
FILE: plugins/box/pages/languages/ka-ge.lang.php
================================================
array(
'Pages' => 'გვერდები',
'Pages manager' => 'გვერდების მენეჯერი',
'Content' => 'კონტენტი',
'Create New Page' => 'ახალი გვერდის შექმნა',
'New Page' => 'ახალი გვერდი',
'Edit Page' => 'გვერდის რედაქტირება',
'Date' => 'თარიღი',
'Clone' => 'კლონირება',
'Edit' => 'რედაქტირება',
'Delete' => 'წაშლა',
'Delete page: :page' => 'გვერდის წაშლა: :page',
'Title' => 'სათაური',
'Name' => 'სახელწოდება',
'Author' => 'ავტორი',
'Slug (url)' => 'ბმული (url)',
'Tags' => 'Tag-ევი',
'Description' => 'აღწერა',
'Keywords' => 'საკვანძო სიტყვები',
'Parent' => 'მშობელი',
'Template' => 'Template-ი',
'Year' => 'წელი',
'Day' => 'დღე',
'Month' => 'თვე',
'Hours' => 'საათი',
'Minute' => 'წუთი',
'Second' => 'წამი',
'This field should not be empty' => 'ეს ველი არ უნდა იყოს ცარიელი',
'This page already exists' => 'ასეთი გვერდი უკვე არსებობს',
'Extra' => 'დამატებით',
'Save' => 'შენახვა',
'Save and Exit' => 'დამახსოვრება და შემდეგ გაოსვლა',
'Your changes to the page :page have been saved.' => 'თქვენი ცვლილებები გვერდი :page მიმართ შენახულია.',
'The page :page cloned.' => 'გვერდი :page კლონირებულია.',
'Status' => 'სტატუსი',
'Actions' => 'მოქმედება',
'Add' => 'დამატება',
'Published' => 'გამოქვეყნებულია',
'Draft' => 'ესკიზი',
'Published on' => 'გამოქვეყნებულია',
'Edit 404 Page' => '404 გვერდის რედაქტირება',
'Page :page deleted' => 'გვერდი :page წაშლილია',
'Search Engines Robots' => 'საძიებო რობოტები',
'Page' => 'გვერდები',
'Metadata' => 'Metadata',
'Settings' => 'პარამეტრები',
'Required field' => 'აუცილებელი ველი',
'Access' => 'მისაწვდომობა',
'Public' => 'საჯარო',
'Registered' => 'დარეგისტრირებულთათვის',
'Cancel' => 'გაუქმება',
),
);
================================================
FILE: plugins/box/pages/languages/lt.lang.php
================================================
array(
'Pages' => 'Puslapiai',
'Pages manager' => 'Puslapių tvarkyklė',
'Content' => 'Turinys',
'Create New Page' => 'Sukurti Naują Puslapį',
'New Page' => 'Naujas Puslapis',
'Edit Page' => 'Redaguoti Puslapį',
'Date' => 'Data',
'Clone' => 'Klonuoti',
'Edit' => 'Redaguoti',
'Delete' => 'Ištrinti',
'Delete page: :page' => 'Ištrinti puslapį :page',
'Title' => 'Antraštė',
'Name' => 'Pavadinimas',
'Author' => 'Autorius',
'Name (slug)' => 'Nuoroda (slug)',
'Description' => 'Aprašymas',
'Keywords' => 'Raktažodžiai',
'Parent' => 'Pirminis puslapis',
'Template' => 'Šablonas',
'Year' => 'Metai',
'Day' => 'Diena',
'Month' => 'Mėnesis',
'Hour' => 'Valanda',
'Minute' => 'Minutė',
'Second' => 'Sekundė',
'This field should not be empty' => 'Šis laukas negali būti tuščias',
'This page already exists' => 'Toks puslapis jau yra',
'Extra' => 'Papildoma',
'Save' => 'Išsaugoti',
'Save and Exit' => 'Išsaugoti ir Išeiti',
'Your changes to the page :page have been saved.' => 'Puslapio :page pakeitimai išsaugoti.',
'The page :page cloned.' => 'Puslapis :page klonuotas.',
'Status' => 'Būklė',
'Actions' => 'Veiksmai',
'Add' => 'Pridėti',
'Published' => 'Publikuotas',
'Draft' => 'Juodraštis',
'Published on' => 'Publikuota',
'Edit 404 Page' => 'Redaguoti 404 puslapį',
'Page :page deleted' => 'Puslapis :page ištrintas',
'Search Engines Robots' => 'Paieškos variklių robotai',
'Page' => 'Puslapis',
'Metadata' => 'Metadata',
'Settings' => 'Nustatymai',
'Required field' => 'Privalomas laukas',
'Access' => 'Prieiga',
'Public' => 'Viešas',
'Registered' => 'Registruotas',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/pages/languages/nl.lang.php
================================================
array(
'Pages' => 'Pagina\'s',
'Pages manager' => 'Pagina beheer',
'Content' => 'Inhoud',
'Create New Page' => 'Nieuwe pagina',
'New Page' => 'Nieuwe pagina',
'Edit Page' => 'Bewerk pagina',
'Date' => 'Datum',
'Clone' => 'Kopieren',
'Edit' => 'Bewerken',
'Delete' => 'Verwijderen',
'Delete page: :page' => 'Verwijder pagina: :page',
'Title' => 'Titel',
'Name' => 'Naam',
'Author' => 'Auteur',
'Name (slug)' => 'Naam (alias)',
'Description' => 'Beschrijving',
'Keywords' => 'Trefwoorden',
'Parent' => 'Root',
'Template' => 'Template',
'Year' => 'Jaar',
'Day' => 'Dag',
'Month' => 'Maand',
'Hour' => 'Uur',
'Minute' => 'Minuut',
'Second' => 'Seconde',
'This field should not be empty' => 'Dit veld mag niet leeg zijn',
'This page already exists' => 'Deze pagina bestaat al',
'Extra' => 'Extra',
'Save' => 'Opslaan',
'Save and Exit' => 'Opslaan en Terug',
'Your changes to the page :page have been saved.' => 'De wijzigingen aan :page zijn opgeslagen.',
'The page :page cloned.' => 'De pagina :page is gekopieerd.',
'Status' => 'Status',
'Actions' => 'Acties',
'Add' => 'Toevoegen',
'Published' => 'Gepubliceerd',
'Draft' => 'Concept',
'Published on' => 'Gepubliceerd op',
'Edit 404 Page' => 'Bewerk 404 pagina',
'Page :page deleted' => 'Pagina :page is verwijderd',
'Search Engines Robots' => 'Zoekmachine Robots ',
'Page' => 'Pagina',
'Metadata' => 'Metadata',
'Settings' => 'Instellingen',
'Required field' => 'Vereist veld',
'Access' => 'Toegang',
'Public' => 'Publiek',
'Registered' => 'Geregistreerd',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/pages/languages/pl.lang.php
================================================
array(
'Pages' => 'Strony',
'Pages manager' => 'Zarządzaj stronami',
'Content' => 'Zawartość',
'Create New Page' => 'Utwórz nową stronę',
'New Page' => 'Nowa strona',
'Edit Page' => 'Edytuj stronę',
'Date' => 'Data',
'Clone' => 'Skopiuj',
'Edit' => 'Edytuj',
'Delete' => 'Usuń',
'Delete page: :page' => 'Czy napewno usunąć stronę: :page',
'Title' => 'Tytuł',
'Name' => 'Nazwa',
'Author' => 'Autor',
'Name (slug)' => 'Krótka nazwa (slug)',
'Description' => 'Opis',
'Keywords' => 'Słowa kluczowe',
'Parent' => 'Rodzic',
'Template' => 'Szablon',
'Year' => 'rok',
'Day' => 'dzień',
'Month' => 'miesiąc',
'Hour' => 'godzina',
'Minute' => 'minuta',
'Second' => 'sekunda',
'This field should not be empty' => 'To pole nie może być puste',
'This page already exists' => 'Ta strona już istnieje',
'Extra' => 'Ekstra',
'Save' => 'Zapisz',
'Save and Exit' => 'Zapisz i wyjdź',
'Your changes to the page :page have been saved.' => 'Twoje zmiany na stronie :page zostały zapisane.',
'The page :page cloned.' => 'Strona :page została skopiowana.',
'Status' => 'Status',
'Actions' => 'Akcje',
'Add' => 'Dodaj podstronę',
'Published' => 'Opublikowana',
'Draft' => 'Projekt',
'Published on' => 'Opublikowane',
'Edit 404 Page' => 'Edytuj stronę błędu 404',
'Page :page deleted' => 'Strona :page została usunięta',
'Search Engines Robots' => 'Roboty wyszukiwarek',
'Page' => 'Strona',
'Metadata' => 'Metadane',
'Settings' => 'Ustawienia',
'Required field' => 'Pole wymagane',
'Access' => 'Dostęp',
'Public' => 'Dla wszystkich',
'Registered' => 'Dla zarejestrowanych',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/pages/languages/pt-br.lang.php
================================================
array(
'Pages' => 'Páginas',
'Pages manager' => 'Gerenciador de páginas',
'Content' => 'Conteúdo',
'Create new page' => 'Criar nova página',
'New page' => 'Nova página',
'Edit page' => 'Editar página',
'Date' => 'Data',
'Clone' => 'Clonar',
'Edit' => 'Editar',
'Delete' => 'Deletar',
'Delete page: :page' => 'Deletar a página: :page',
'Title' => 'Título',
'Name' => 'Nome',
'Author' => 'Autor',
'Name (slug)' => 'Nome (slug)',
'Description' => 'Descrição',
'Keywords' => 'Keywords',
'Parent' => 'Parente',
'Template' => 'Template',
'Year' => 'Ano',
'Day' => 'Dia',
'Month' => 'Mês',
'Hour' => 'Hora',
'Minute' => 'Minuto',
'Second' => 'Segundo',
'This field should not be empty' => 'Este arquivo não deve ser vazio',
'This page already exists' => 'Esta página já existe',
'Extra' => 'Extra',
'Save' => 'Salvar',
'Save and Exit' => 'Salvar e sair',
'Your changes to the page :page have been saved.' => 'Suas alterações na página :page foram salvas.',
'The page :page cloned.' => 'Página :page clonada.',
'Status' => 'Status',
'Actions' => 'Ações',
'Add' => 'Adicionar',
'Published' => 'Publicado',
'Draft' => 'Rascunho',
'Published on' => 'Publicada em',
'Edit 404 Page' => 'Editar página de erro 404',
'Page :page deleted' => 'Página :page deletada',
'Search Engines Robots' => 'Crawlers de sistemas de buscas.',
'Page' => 'Página',
'Metadata' => 'Metadata',
'Settings' => 'Configurações',
'Required field' => 'Campo requerido',
'Access' => 'Acesso',
'Public' => 'Público',
'Registered' => 'Registrado',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/pages/languages/ru.lang.php
================================================
array(
'Pages' => 'Страницы',
'Pages manager' => 'Менеджер страниц',
'Content' => 'Контент',
'Create New Page' => 'Создать новую страницу',
'New Page' => 'Новая страница',
'Edit Page' => 'Редактирование страницы',
'Date' => 'Дата',
'Clone' => 'Клонировать',
'Edit' => 'Редактировать',
'Delete' => 'Удалить',
'Delete page: :page' => 'Удалить страницу: :page',
'Title' => 'Заголовок',
'Name' => 'Название',
'Author' => 'Автор',
'Slug (url)' => 'Ссылка (url)',
'Tags' => 'Теги',
'Description' => 'Описание',
'Keywords' => 'Ключевые слова',
'Parent' => 'Родитель',
'Template' => 'Шаблон',
'Year' => 'Год',
'Day' => 'День',
'Month' => 'Месяц',
'Hours' => 'Час',
'Minute' => 'Минута',
'Second' => 'Секунда',
'This field should not be empty' => 'Это поле не должно быть пустым',
'This page already exists' => 'Такая страница уже существует',
'Extra' => 'Дополнительно',
'Save' => 'Сохранить',
'Save and Exit' => 'Сохранить и выйти',
'Your changes to the page :page have been saved.' => 'Ваши изменения к странице :page были сохранены.',
'The page :page cloned.' => 'Страница :page клонирована.',
'Status' => 'Статус',
'Actions' => 'Действия',
'Add' => 'Добавить',
'Published' => 'Опубликовано',
'Draft' => 'Черновик',
'Published on' => 'Опубликовано',
'Edit 404 Page' => 'Редактировать страницу 404',
'Page :page deleted' => 'Страница :page удалена',
'Search Engines Robots' => 'Поисковые роботы',
'Page' => 'Страница',
'Metadata' => 'Метаданные',
'Settings' => 'Настройки',
'Required field' => 'Обязательное поле',
'Access' => 'Доступ',
'Public' => 'Публичный',
'Registered' => 'Зарегистрированным',
'Cancel' => 'Отмена',
),
);
================================================
FILE: plugins/box/pages/languages/sk.lang.php
================================================
array(
'Pages' => 'Stránky',
'Pages manager' => 'Manažér stránok',
'Content' => 'Obsah',
'Create new page' => 'Vytvoriť novú stránku',
'New page' => 'Nová stránka',
'Edit page' => 'Editovať stránku',
'Date' => 'Dátum',
'Clone' => 'Klonovať',
'Edit' => 'Editovať',
'Delete' => 'Vymazať',
'Delete page: :page' => 'Vymazať stránku: :page',
'Title' => 'Titulka',
'Name' => 'Názov',
'Author' => 'Autor',
'Name (slug)' => 'Názov (slug)',
'Description' => 'Popis',
'Keywords' => 'Kľúčové slová',
'Parent' => 'Rodič - Nadradená stránka',
'Template' => 'Téma',
'Year' => 'Rok',
'Day' => 'Deň',
'Month' => 'Mesiac',
'Hour' => 'Hodina',
'Minute' => 'Minúta',
'Second' => 'Sekunda',
'This field should not be empty' => 'Toto políčko nesmie byť prázdne',
'This page already exists' => 'Táto stránka už existuje',
'Extra' => 'Extra',
'Save' => 'Uložiť',
'Save and Exit' => 'Uložiť a ukončiť',
'Your changes to the page :page have been saved.' => 'Vaše zmeny na stránke :page boli uložené.',
'The page :page cloned.' => 'The page :page cloned.',
'Status' => 'Status',
'Actions' => 'Akcie',
'Add' => 'Pridať',
'Published' => 'Zverejnené',
'Draft' => 'Rozpísané',
'Published on' => 'Zverejnené dňa',
'Edit 404 Page' => 'Editovať stránku 404',
'Page :page deleted' => 'Vymazať stránku: :page',
'Search Engines Robots' => 'Vyhľadávacie roboty',
'Page' => 'Stránka',
'Metadata' => 'Metadata',
'Settings' => 'Nastavenia',
'Required field' => 'Povinné políčko',
'Access' => 'Prístup',
'Public' => 'Verejný',
'Registered' => 'Po prihlásení',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/pages/languages/sr.lang.php
================================================
array(
'Pages' => 'Strane',
'Pages manager' => 'Menadžer strana',
'Content' => 'Sadržaj',
'Create new page' => 'Kreiraj novu stranu',
'New page' => 'Nova strana',
'Edit page' => 'Izemni stranu',
'Date' => 'Datum',
'Clone' => 'Kloniraj',
'Edit' => 'Izmeni',
'Delete' => 'Obriši',
'Delete page: :page' => 'Obriši stranu: :page',
'Title' => 'Naslov',
'Name' => 'Ime',
'Author' => 'Autor',
'Name (slug)' => 'Ime (SEO)',
'Description' => 'Opis',
'Keywords' => 'Ključne reči',
'Parent' => 'Roditelj',
'Template' => 'Šablon',
'Year' => 'Godina',
'Day' => 'dan',
'Month' => 'mesec',
'Hour' => 'Sat',
'Minute' => 'Minut',
'Second' => 'Sekunda',
'This field should not be empty' => 'Ovo polje ne sme biti prazno',
'This page already exists' => 'Ova strana već postoji',
'Extra' => 'Dodatno polje',
'Save' => 'Sačuvaj',
'Save and exit' => 'Sačuvaj i izadji',
'Your changes to the page :page have been saved.' => 'Vaše promene na stranici :page su sačuvane.',
'The page :page cloned.' => 'Strana :page je klonirana.',
'Status' => 'Status',
'Actions' => 'Akcija',
'Add' => 'Dodaj',
'Published' => 'Objavljeno',
'Draft' => 'Nacrt',
'Published on' => 'Objavljeno od',
'Edit 404 Page' => 'Izmeni 404 stranu',
'Page :page deleted' => 'Strana :page je obrisana',
'Search Engines Robots' => 'Roboti pretrage',
'Page' => 'Strana',
'Metadata' => 'Metadata',
'Settings' => 'Podešavanja',
'Required field' => 'Potrebno',
'Access' => 'Pristup',
'Public' => 'Javno',
'Registered' => 'Registrovani',
'Cancel' => 'Otkaži',
)
);
================================================
FILE: plugins/box/pages/languages/tr.lang.php
================================================
array(
'Pages' => 'Sayfalar',
'Pages manager' => 'Sayfa Yöneticisi',
'Content' => 'İçerik',
'Create New Page' => 'Yeni Sayfa Oluştur',
'New Page' => 'Yeni Sayfa',
'Edit Page' => 'Sayfayı Düzenle',
'Date' => 'Tarih',
'Clone' => 'Klonla',
'Edit' => 'Düzenle',
'Delete' => 'Sil',
'Delete page: :page' => ':page adlı sayfa silinsin mi',
'Title' => 'Başlık',
'Name' => 'Ad',
'Author' => 'Yazar',
'Name (slug)' => 'Ad (makine adı)', // check whether in use or not
'Slug (url)' => 'Url Adı (Makine Adı)',
'Description' => 'Açıklama',
'Keywords' => 'Anahtar Sözcükler',
'Parent' => 'Üst Sayfa',
'Template' => 'Şablon',
'Year' => 'Yıl',
'Day' => 'Gün',
'Month' => 'Ay',
'Hour' => 'Saat',
'Minute' => 'Dakika',
'Second' => 'Saniye',
'This field should not be empty' => 'Bu alan boş olmamalı!',
'This page already exists' => 'Sayfa zaten var',
'Extra' => 'Ek',
'Save' => 'Kaydet',
'Save and Exit' => 'Kaydet ve Çık',
'Your changes to the page :page have been saved.' => 'Değişiklikleriniz :page sayfasına kaydedildi.',
'The page :page cloned.' => ':page adlı sayfa klonlandı.',
'Status' => 'Durum',
'Actions' => 'İşlemler',
'Add' => 'Ekle',
'Published' => 'Yayında',
'Draft' => 'Taslak',
'Published on' => 'Yayınlanma Tarihi:',
'Edit 404 Page' => '404 Sayfasını Düzenle',
'Page :page deleted' => ':page adlı sayfa silindi',
'Search Engines Robots' => 'Arama Motoru Robotları',
'Page' => 'Sayfa',
'Metadata' => 'Metadata',
'Settings' => 'Ayarlar',
'Required field' => 'Zorunlu alan',
'Access' => 'Erişim',
'Public' => 'Herkese Açık',
'Registered' => 'Yalnızca Üyelere Açık',
'Cancel' => 'Vazgeç',
'Tags' => 'Etiketler',
)
);
================================================
FILE: plugins/box/pages/languages/uk.lang.php
================================================
array(
'Pages' => 'Сторінки',
'Pages manager' => 'Менеджер сторінок',
'Content' => 'Контент',
'Create New Page' => 'Створити нову сторінку',
'New Page' => 'Нова сторінка',
'Edit Page' => 'Редагування сторінки',
'Date' => 'Дата',
'Clone' => 'Клонувати',
'Edit' => 'Редагувати',
'Delete' => 'Видалити',
'Delete page: :page' => 'Видалити сторінку: :page',
'Title' => 'Заголовок',
'Name' => 'Назва',
'Author' => 'Автор',
'Slug (url)' => 'Лінк (url)',
'Tags' => 'Теги',
'Description' => 'Опис',
'Keywords' => 'Ключові слова',
'Parent' => 'Батько',
'Template' => 'Шаблон',
'Year' => 'Рік',
'Day' => 'День',
'Month' => 'Місяц',
'Hours' => 'Час',
'Minute' => 'Хвилина',
'Second' => 'Секунда',
'This field should not be empty' => 'Це поле не може бути порожнім',
'This page already exists' => 'Така сторінка вже існує',
'Extra' => 'Додатково',
'Save' => 'Зберегти',
'Save and Exit' => 'Зберегти і вийти',
'Your changes to the page :page have been saved.' => 'Ваші зміни до сторінки :page були збережені.',
'The page :page cloned.' => 'Сторінка :page клонована.',
'Status' => 'Статус',
'Actions' => 'Дії',
'Add' => 'Додати',
'Published' => 'Опубліковано',
'Draft' => 'Чернетка',
'Published on' => 'Опубліковано',
'Edit 404 Page' => 'Редагувати сторінку 404',
'Page :page deleted' => 'Сторінка :page видалена',
'Search Engines Robots' => 'Пошукові роботи',
'Page' => 'Сторінка',
'Metadata' => 'Метадані',
'Settings' => 'Налаштування',
'Required field' => 'Обов’язкове поле',
'Access' => 'Доступ',
'Public' => 'Публічний',
'Registered' => 'Зареєстрованим',
'Cancel' => 'Відмінити',
),
);
================================================
FILE: plugins/box/pages/languages/zh-cn.lang.php
================================================
array(
'Pages' => '页面',
'Pages manager' => '页面管理',
'Content' => '内容管理',
'Create New Page' => '创建新页面',
'New Page' => '新建页面',
'Edit Page' => '布局页面',
'Date' => '日期',
'Clone' => '克隆',
'Edit' => '编辑',
'Delete' => '删除',
'Delete page: :page' => '删除页面: :page',
'Title' => '标题',
'Name' => '名称',
'Author' => '作者',
'Name (slug)' => '名称 (slug)',
'Description' => '描述',
'Keywords' => '关键词',
'Parent' => '父级',
'Template' => '模板',
'Year' => '年',
'Day' => '日',
'Month' => '月',
'Hour' => '时',
'Minute' => '分',
'Second' => '秒',
'This field should not be empty' => '此字段不能为空',
'This page already exists' => '此页面已存在',
'Extra' => '附加',
'Save' => '保存',
'Save and Exit' => '保存并退出',
'Your changes to the page :page have been saved.' => '您修改的页面 :page 已保存。',
'The page :page cloned.' => '此页面 :page 已克隆。',
'Status' => '状态',
'Actions' => '操作',
'Add' => '添加',
'Published' => '发布',
'Draft' => '草案',
'Published on' => '发布于',
'Edit 404 Page' => '编辑 404 页面',
'Page :page deleted' => '页面 :page 已删除。',
'Search Engines Robots' => '搜索引擎机器人',
'Page' => '页面',
'Metadata' => 'Meta 数据',
'Settings' => '设置',
'Required field' => '必填字段',
'Access' => '访问',
'Public' => '公开',
'Registered' => '注册用户',
)
);
================================================
FILE: plugins/box/pages/pages.admin.php
================================================
updateWhere('[slug="'.Request::post('page_slug').'"]', array('expand' => Request::post('page_expand')));
Request::shutdown();
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
}
/**
* Pages admin function
*/
public static function main()
{
$current_theme = Option::get('theme_site_name');
$site_url = Option::get('siteurl');
$templates_path = THEMES_SITE;
$errors = array();
$pages = new Table('pages');
PagesAdmin::$pages = $pages;
$users = new Table('users');
$user = $users->select('[id='.Session::get('user_id').']', null);
// Page author
if ( ! empty($user['firstname'])) {
$author = (empty($user['lastname'])) ? $user['firstname'] : $user['firstname'].' '.$user['lastname'];
} else {
$author = Session::get('user_login');
}
$author = Html::toText($author);
// Status array
$status_array = array('published' => __('Published', 'pages'),
'draft' => __('Draft', 'pages'));
// Access array
$access_array = array('public' => __('Public', 'pages'),
'registered' => __('Registered', 'pages'));
// Check for get actions
// ---------------------------------------------
if (Request::get('action')) {
// Switch actions
// -----------------------------------------
switch (Request::get('action')) {
// Clone page
// -------------------------------------
case "clone_page":
if (Security::check(Request::get('token'))) {
// Generate rand page name
$rand_page_name = Request::get('name').'_clone_'.date("Ymd_His");
// Get original page
$orig_page = $pages->select('[slug="'.Request::get('name').'"]', null);
// Generate rand page title
$rand_page_title = $orig_page['title'].' [copy]';
// Clone page
if ($pages->insert(array('slug' => $rand_page_name,
'template' => $orig_page['template'],
'parent' => $orig_page['parent'],
'robots_index' => $orig_page['robots_index'],
'robots_follow'=> $orig_page['robots_follow'],
'status' => $orig_page['status'],
'access' => (isset($orig_page['access'])) ? $orig_page['access'] : 'public',
'expand' => (isset($orig_page['expand'])) ? $orig_page['expand'] : '0',
'title' => $rand_page_title,
'meta_title' => $orig_page['meta_title'],
'description' => $orig_page['description'],
'keywords' => $orig_page['keywords'],
'tags' => $orig_page['tags'],
'date' => $orig_page['date'],
'author' => $orig_page['author']))) {
// Get cloned page ID
$last_id = $pages->lastId();
// Save cloned page content
File::setContent(STORAGE . DS . 'pages' . DS . $last_id . '.page.txt',
File::getContent(STORAGE . DS . 'pages' . DS . $orig_page['id'] . '.page.txt'));
// Send notification
Notification::set('success', __('The page :page cloned.', 'pages', array(':page' => Security::safeName(Request::get('name'), '-', true))));
}
// Run add extra actions
Action::run('admin_pages_action_clone');
// Redirect
Request::redirect('index.php?id=pages');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
break;
// Add page
// -------------------------------------
case "add_page":
// Add page
if (Request::post('add_page') || Request::post('add_page_and_exit')) {
if (Security::check(Request::post('csrf'))) {
// Get parent page
if (Request::post('pages') == '0') {
$parent_page = '';
} else {
$parent_page = Request::post('pages');
}
// Validate
//--------------
if (trim(Request::post('page_name')) == '') $errors['pages_empty_name'] = __('Required field', 'pages');
if (trim(Request::post('page_title')) == '') $errors['pages_empty_title'] = __('Required field', 'pages');
if (count($pages->select('[slug="'.Security::safeName(Request::post('page_name'), '-', true).'"]')) != 0) $errors['pages_exists'] = __('This page already exists', 'pages');
// Prepare date
if (Valid::date(Request::post('page_date'))) {
$date = strtotime(Request::post('page_date'));
} else {
$date = time();
}
if (Request::post('robots_index')) $robots_index = 'noindex'; else $robots_index = 'index';
if (Request::post('robots_follow')) $robots_follow = 'nofollow'; else $robots_follow = 'follow';
// If no errors then try to save
if (count($errors) == 0) {
// Insert new page
if ($pages->insert(array('slug' => Security::safeName(Request::post('page_name'), '-', true),
'template' => Request::post('templates'),
'parent' => $parent_page,
'status' => Request::post('status'),
'access' => Request::post('access'),
'expand' => '0',
'robots_index' => $robots_index,
'robots_follow'=> $robots_follow,
'title' => Request::post('page_title'),
'meta_title' => Request::post('page_meta_title'),
'description' => Request::post('page_description'),
'keywords' => Request::post('page_keywords'),
'tags' => Request::post('page_tags'),
'date' => $date,
'author' => $author))) {
// Get inserted page ID
$last_id = $pages->lastId();
// Save content
File::setContent(STORAGE . DS . 'pages' . DS . $last_id . '.page.txt', XML::safe(Request::post('editor')));
// Send notification
Notification::set('success', __('Your changes to the page :page have been saved.', 'pages', array(':page' => Security::safeName(Request::post('page_title'), '-', true))));
}
// Run add extra actions
Action::run('admin_pages_action_add');
// Redirect
if (Request::post('add_page_and_exit')) {
Request::redirect('index.php?id=pages');
} else {
Request::redirect('index.php?id=pages&action=edit_page&name='.Security::safeName(Request::post('page_name'), '-', true));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Get all pages
$pages_list = $pages->select('[slug!="error404" and parent=""]');
$pages_array[] = '-none-';
foreach ($pages_list as $page) {
$pages_array[$page['slug']] = $page['title'];
}
// Get all templates
$templates_list = File::scan($templates_path, '.template.php');
foreach ($templates_list as $file) {
$templates_array[basename($file, '.template.php')] = basename($file, '.template.php');
}
// Save fields
if (Request::post('page_name')) $post_name = Request::post('page_name'); else $post_name = '';
if (Request::post('page_title')) $post_title = Request::post('page_title'); else $post_title = '';
if (Request::post('page_meta_title')) $post_meta_title = Request::post('page_meta_title'); else $post_meta_title = '';
if (Request::post('page_keywords')) $post_keywords = Request::post('page_keywords'); else $post_keywords = '';
if (Request::post('page_description')) $post_description = Request::post('page_description'); else $post_description = '';
if (Request::post('page_tags')) $post_tags = Request::post('page_tags'); else $post_tags = '';
if (Request::post('editor')) $post_content = Request::post('editor'); else $post_content = '';
if (Request::post('templates')) $post_template = Request::post('templates'); else $post_template = 'index';
if (Request::post('status')) $post_status = Request::post('status'); else $post_status = 'published';
if (Request::post('access')) $post_access = Request::post('access'); else $post_access = 'public';
if (Request::post('pages')) $parent_page = Request::post('pages'); else if(Request::get('parent_page')) $parent_page = Request::get('parent_page'); else $parent_page = '';
if (Request::post('robots_index')) $post_robots_index = true; else $post_robots_index = false;
if (Request::post('robots_follow')) $post_robots_follow = true; else $post_robots_follow = false;
//--------------
// Generate date
$date = Date::format(time(), 'Y-m-d H:i:s');
// Set Tabs State - page
Notification::setNow('page', 'page');
// Display view
View::factory('box/pages/views/backend/add')
->assign('post_name', $post_name)
->assign('post_title', $post_title)
->assign('post_meta_title', $post_meta_title)
->assign('post_description', $post_description)
->assign('post_keywords', $post_keywords)
->assign('post_tags', $post_tags)
->assign('post_content', $post_content)
->assign('pages_array', $pages_array)
->assign('parent_page', $parent_page)
->assign('templates_array', $templates_array)
->assign('post_template', $post_template)
->assign('post_status', $post_status)
->assign('post_access', $post_access)
->assign('status_array', $status_array)
->assign('access_array', $access_array)
->assign('date', $date)
->assign('post_robots_index', $post_robots_index)
->assign('post_robots_follow', $post_robots_follow)
->assign('errors', $errors)
->display();
break;
// Edit page
// -------------------------------------
case "edit_page":
if (Request::post('edit_page') || Request::post('edit_page_and_exit')) {
if (Security::check(Request::post('csrf'))) {
// Get pages parent
if (Request::post('pages') == '0') {
$parent_page = '';
} else {
$parent_page = Request::post('pages');
}
// Save field
$post_parent = Request::post('pages');
// Validate
//--------------
if (trim(Request::post('page_name')) == '') $errors['pages_empty_name'] = __('Required field', 'pages');
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');
if (trim(Request::post('page_title')) == '') $errors['pages_empty_title'] = __('Required field', 'pages');
// Save fields
if (Request::post('page_name')) $post_name = Request::post('page_name'); else $post_name = '';
if (Request::post('page_title')) $post_title = Request::post('page_title'); else $post_title = '';
if (Request::post('page_meta_title')) $post_meta_title = Request::post('page_meta_title'); else $post_meta_title = '';
if (Request::post('page_keywords')) $post_keywords = Request::post('page_keywords'); else $post_keywords = '';
if (Request::post('page_description')) $post_description = Request::post('page_description'); else $post_description = '';
if (Request::post('page_tags')) $post_tags = Request::post('page_tags'); else $post_tags = '';
if (Request::post('editor')) $post_content = Request::post('editor'); else $post_content = '';
if (Request::post('templates')) $post_template = Request::post('templates'); else $post_template = 'index';
if (Request::post('status')) $post_status = Request::post('status'); else $post_status = 'published';
if (Request::post('access')) $post_access = Request::post('access'); else $post_access = 'public';
if (Request::post('robots_index')) $post_robots_index = true; else $post_robots_index = false;
if (Request::post('robots_follow')) $post_robots_follow = true; else $post_robots_follow = false;
//--------------
// Prepare date
if (Valid::date(Request::post('page_date'))) {
$date = strtotime(Request::post('page_date'));
} else {
$date = time();
}
if (Request::post('robots_index')) $robots_index = 'noindex'; else $robots_index = 'index';
if (Request::post('robots_follow')) $robots_follow = 'nofollow'; else $robots_follow = 'follow';
if (count($errors) == 0) {
// Update parents in all childrens
if ((Security::safeName(Request::post('page_name'), '-', true)) !== (Security::safeName(Request::post('page_old_name'), '-', true)) and (Request::post('old_parent') == '')) {
$_pages = $pages->select('[parent="'.Text::translitIt(trim(Request::post('page_old_name'))).'"]');
if ( ! empty($_pages)) {
foreach ($_pages as $_page) {
$pages->updateWhere('[parent="'.$_page['parent'].'"]', array('parent' => Security::safeName(Request::post('page_name'), '-', true)));
}
}
if ($pages->updateWhere('[slug="'.Request::get('name').'"]',
array('slug' => Security::safeName(Request::post('page_name'), '-', true),
'template' => Request::post('templates'),
'parent' => $parent_page,
'title' => Request::post('page_title'),
'meta_title' => Request::post('page_meta_title'),
'description' => Request::post('page_description'),
'keywords' => Request::post('page_keywords'),
'tags' => Request::post('page_tags'),
'robots_index' => $robots_index,
'robots_follow'=> $robots_follow,
'status' => Request::post('status'),
'access' => Request::post('access'),
'date' => $date,
'author' => $author))) {
File::setContent(STORAGE . DS . 'pages' . DS . Request::post('page_id') . '.page.txt', XML::safe(Request::post('editor')));
Notification::set('success', __('Your changes to the page :page have been saved.', 'pages', array(':page' => Security::safeName(Request::post('page_title'), '-', true))));
}
// Run edit extra actions
Action::run('admin_pages_action_edit');
} else {
if ($pages->updateWhere('[slug="'.Request::get('name').'"]',
array('slug' => Security::safeName(Request::post('page_name'), '-', true),
'template' => Request::post('templates'),
'parent' => $parent_page,
'title' => Request::post('page_title'),
'meta_title' => Request::post('page_meta_title'),
'description' => Request::post('page_description'),
'keywords' => Request::post('page_keywords'),
'tags' => Request::post('page_tags'),
'robots_index' => $robots_index,
'robots_follow'=> $robots_follow,
'status' => Request::post('status'),
'access' => Request::post('access'),
'date' => $date,
'author' => $author))) {
File::setContent(STORAGE . DS . 'pages' . DS . Request::post('page_id') . '.page.txt', XML::safe(Request::post('editor')));
Notification::set('success', __('Your changes to the page :page have been saved.', 'pages', array(':page' => Security::safeName(Request::post('page_title'), '-', true))));
}
// Run edit extra actions
Action::run('admin_pages_action_edit');
}
// Redirect
if (Request::post('edit_page_and_exit')) {
Request::redirect('index.php?id=pages');
} else {
Request::redirect('index.php?id=pages&action=edit_page&name='.Security::safeName(Request::post('page_name'), '-', true));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Get all pages
$pages_list = $pages->select();
$pages_array[] = '-none-';
// Foreach pages find page whithout parent
foreach ($pages_list as $page) {
if (isset($page['parent'])) {
$c_p = $page['parent'];
} else {
$c_p = '';
}
if ($c_p == '') {
// error404 is system "constant" and no child for it
if ($page['slug'] !== 'error404' && $page['slug'] !== Request::get('name')) {
$pages_array[$page['slug']] = $page['title'];
}
}
}
// Get all templates
$templates_list = File::scan($templates_path,'.template.php');
foreach ($templates_list as $file) {
$templates_array[basename($file,'.template.php')] = basename($file, '.template.php');
}
$page = $pages->select('[slug="'.Request::get('name').'"]', null);
if ($page) {
$page_content = File::getContent(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt');
// Safe fields or load fields
if (Request::post('page_name')) $slug_to_edit = Request::post('page_name'); else $slug_to_edit = $page['slug'];
if (Request::post('page_title')) $title_to_edit = Request::post('page_title'); else $title_to_edit = $page['title'];
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'] : '';
if (Request::post('page_description')) $description_to_edit = Request::post('page_description'); else $description_to_edit = $page['description'];
if (Request::post('page_keywords')) $keywords_to_edit = Request::post('page_keywords'); else $keywords_to_edit = $page['keywords'];
if (Request::post('page_tags')) $tags_to_edit = Request::post('page_tags'); else $tags_to_edit = isset($page['tags']) ? $page['tags'] : '';;
if (Request::post('editor')) $to_edit = Request::post('editor'); else $to_edit = Text::toHtml($page_content);
if (Request::post('robots_index')) $post_robots_index = true; else if ($page['robots_index'] == 'noindex') $post_robots_index = true; else $post_robots_index = false;
if (Request::post('robots_follow')) $post_robots_follow = true; else if ($page['robots_follow'] == 'nofollow') $post_robots_follow = true; else $post_robots_follow = false;
if (Request::post('pages')) {
// Get pages parent
if (Request::post('pages') == '-none-') {
$parent_page = '';
} else {
$parent_page = Request::post('pages');
}
// Save field
$parent_page = Request::post('pages');
} else {
$parent_page = $page['parent'];
}
if (Request::post('templates')) $template = Request::post('templates'); else $template = $page['template'];
if (Request::post('status')) $status = Request::post('status'); else $status = $page['status'];
if (Request::post('access')) $access = Request::post('access'); else $access = (isset($page['access'])) ? $page['access'] : 'public';
// Generate date
$date = Request::post('date') ? Request::post('date') : Date::format($page['date'], 'Y-m-d H:i:s');
Notification::setNow('page', 'page');
// Display view
View::factory('box/pages/views/backend/edit')
->assign('slug_to_edit', $slug_to_edit)
->assign('title_to_edit', $title_to_edit)
->assign('meta_title_to_edit', $meta_title_to_edit)
->assign('description_to_edit', $description_to_edit)
->assign('keywords_to_edit', $keywords_to_edit)
->assign('tags_to_edit', $tags_to_edit)
->assign('page', $page)
->assign('to_edit', $to_edit)
->assign('pages_array', $pages_array)
->assign('parent_page', $parent_page)
->assign('templates_array', $templates_array)
->assign('template', $template)
->assign('status_array', $status_array)
->assign('access_array', $access_array)
->assign('status', $status)
->assign('access', $access)
->assign('date', $date)
->assign('post_robots_index', $post_robots_index)
->assign('post_robots_follow', $post_robots_follow)
->assign('errors', $errors)
->display();
}
break;
// Delete page
// -------------------------------------
case "delete_page":
// Error 404 page can not be removed
if (Request::get('slug') !== 'error404') {
if (Security::check(Request::get('token'))) {
// Get specific page
$page = $pages->select('[slug="'.Request::get('name').'"]', null);
// Delete page and update fields
if ($pages->deleteWhere('[slug="'.$page['slug'].'" ]')) {
$_pages = $pages->select('[parent="'.$page['slug'].'"]');
if ( ! empty($_pages)) {
foreach ($_pages as $_page) {
$pages->updateWhere('[slug="'.$_page['slug'].'"]', array('parent' => ''));
}
}
File::delete(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt');
Notification::set('success', __('Page :page deleted', 'pages', array(':page' => Html::toText($page['title']))));
}
// Run delete extra actions
Action::run('admin_pages_action_delete');
// Redirect
Request::redirect('index.php?id=pages');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
break;
// Update page access
// -------------------------------------
case "update_access":
if (Request::get('slug') !== 'error404') {
if (Security::check(Request::get('token'))) {
$pages->updateWhere('[slug="'.Request::get('slug').'"]', array('access' => Request::get('access')));
// Run delete extra actions
Action::run('admin_pages_action_update_access');
// Send notification
Notification::set('success', __('Your changes to the page :page have been saved.', 'pages', array(':page' => Request::get('slug'))));
// Redirect
Request::redirect('index.php?id=pages');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
break;
// Update page status
// -------------------------------------
case "update_status":
if (Request::get('name') !== 'error404') {
if (Security::check(Request::get('token'))) {
$pages->updateWhere('[slug="'.Request::get('slug').'"]', array('status' => Request::get('status')));
// Run delete extra actions
Action::run('admin_pages_action_update_status');
// Send notification
Notification::set('success', __('Your changes to the page :page have been saved.', 'pages', array(':page' => Request::get('slug'))));
// Redirect
Request::redirect('index.php?id=pages');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
break;
}
// Its mean that you can add your own actions for this plugin
Action::run('admin_pages_extra_actions');
} else {
// Index action
// -------------------------------------
// Init vars
$pages_array = array();
$count = 0;
// Get pages
$pages_list = $pages->select(null, 'all', null, array('slug', 'title', 'status', 'date', 'author', 'expand', 'access', 'parent', 'template', 'tags'));
// Loop
foreach ($pages_list as $page) {
$pages_array[$count]['title'] = $page['title'];
$pages_array[$count]['meta_title'] = isset($page['meta_title']) ? $page['meta_title'] : '';
$pages_array[$count]['parent'] = $page['parent'];
$pages_array[$count]['_status'] = $page['status'];
$pages_array[$count]['_access'] = $page['access'];
$pages_array[$count]['status'] = $status_array[$page['status']];
$pages_array[$count]['access'] = isset($access_array[$page['access']]) ? $access_array[$page['access']] : $access_array['public']; // hack for old Monstra Versions
$pages_array[$count]['date'] = $page['date'];
$pages_array[$count]['author'] = $page['author'];
$pages_array[$count]['expand'] = $page['expand'];
$pages_array[$count]['slug'] = $page['slug'];
$pages_array[$count]['tags'] = $page['tags'];
$pages_array[$count]['template']= $page['template'];
if (isset($page['parent'])) {
$c_p = $page['parent'];
} else {
$c_p = '';
}
if ($c_p != '') {
$_page = $pages->select('[slug="'.$page['parent'].'"]', null);
if (isset($_page['title'])) {
$_title = $_page['title'];
} else {
$_title = '';
}
$pages_array[$count]['sort'] = $_title . ' ' . $page['title'];
} else {
$pages_array[$count]['sort'] = $page['title'];
}
$_title = '';
$count++;
}
// Sort pages
$pages = Arr::subvalSort($pages_array, 'sort');
// Display view
View::factory('box/pages/views/backend/index')
->assign('pages', $pages)
->assign('site_url', $site_url)
->display();
}
}
}
================================================
FILE: plugins/box/pages/pages.plugin.php
================================================
select('[slug="'.$requested_page.'"]', null);
}
/**
* Load current page
*
* @global string $defpage default page
* @param array $data uri
* @return string
*/
public static function lowLoader($data)
{
$defpage = Option::get('defaultpage');
// If data count 2 then it has Parent/Child
if (count($data) >= 2) {
// If exists parent file
if (count(Pages::$pages->select('[slug="'.$data[0].'"]')) !== 0) {
// Get child file and get parent page name
$child_page = Pages::$pages->select('[slug="'.$data[1].'"]', null);
// If child page parent is not empty then get his parent
if (count($child_page) == 0) {
$c_p = '';
} else {
if ($child_page['parent'] != '') {
$c_p = $child_page['parent'];
} else {
$c_p = '';
}
}
// Hack For old Monstra
$child_page['access'] = (isset($child_page['access'])) ? $child_page['access'] : 'public' ;
// Check is child_parent -> request parent
if ($c_p == $data[0]) {
if (count($data) < 3) { // Checking only for the parent and one child, the remaining issue 404
if ((($child_page['status'] == 'published') or
(Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and
($child_page['access'] == 'public')) {
$id = $data[1];
} elseif (($child_page['access'] == 'registered') and
(Session::exists('user_id')) and
($child_page['status'] == 'published')) {
$id = $data[1];
} else {
$id = 'error404';
Response::status(404);
}
} else {
$id = 'error404';
Response::status(404);
}
} else {
$id = 'error404';
Response::status(404);
}
} else {
$id = 'error404';
Response::status(404);
}
} else { // Only parent page come
if (empty($data[0])) {
$id = $defpage;
} else {
// Get current page
$current_page = Pages::$pages->select('[slug="'.$data[0].'"]', null);
// Hack For old Monstra
$current_page['access'] = (isset($current_page['access'])) ? $current_page['access'] : 'public' ;
if (count($current_page) != 0) {
if ( ! empty($current_page['parent'])) {
$c_p = $current_page['parent'];
} else {
$c_p = '';
}
} else {
$c_p = '';
}
// Check if this page has parent
if ($c_p !== '') {
if ($c_p == $data[0]) {
if (count(Pages::$pages->select('[slug="'.$data[0].'"]', null)) != 0) {
if ((($current_page['status'] == 'published') or
(Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and
($current_page['access'] == 'public')) {
$id = $data[0];
} elseif (($current_page['access'] == 'registered') and
(Session::exists('user_id')) and
($current_page['status'] == 'published')) {
$id = $data[0];
} else {
$id = 'error404';
Response::status(404);
}
} else {
$id = 'error404';
Response::status(404);
}
} else {
$id = 'error404';
Response::status(404);
}
} else {
if (count(Pages::$pages->select('[slug="'.$data[0].'"]', null)) != 0) {
if ((($current_page['status'] == 'published') or
(Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and
($current_page['access'] == 'public')) {
$id = $data[0];
} elseif (($current_page['access'] == 'registered') and
(Session::exists('user_id')) and
($current_page['status'] == 'published')) {
$id = $data[0];
} else {
$id = 'error404';
Response::status(404);
}
} else {
$id = 'error404';
Response::status(404);
}
}
}
}
// Return page name/id to load
return $id;
}
/**
* Get pages template
*
* @return string
*/
public static function template()
{
if (Pages::$page['template'] == '') return 'index'; else return Pages::$page['template'];
}
/**
* Get pages contents
*
* @return string
*/
public static function content($slug = '')
{
if ( ! empty($slug)) {
$page = Table::factory('pages')->select('[slug="'.$slug.'"]', null);
if ( ! empty($page)) {
$content = Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt'));
$content = Filter::apply('content', $content);
return $content;
} else {
return '';
}
} else {
return Text::toHtml(File::getContent(STORAGE . DS . 'pages' . DS . Pages::$page['id'] . '.page.txt'));
}
}
/**
* Get pages title
*
*
* echo Page::title();
*
*
* @return string
*/
public static function title()
{
return !empty(Pages::$page['meta_title']) ? Pages::$page['meta_title'] : Pages::$page['title'];
}
/**
* Get pages Description
*
*
* echo Page::description();
*
*
* @return string
*/
public static function description()
{
return Pages::$page['description'];
}
/**
* Get pages Keywords
*
*
* echo Page::keywords();
*
*
* @return string
*/
public static function keywords()
{
return Pages::$page['keywords'];
}
/**
* Get pages
*/
public static function getPages()
{
// Init vars
$pages_array = array();
$count = 0;
// Get pages table
$pages = new Table('pages');
// Get Pages List
$pages_list = $pages->select('[slug!="error404" and status="published"]');
foreach ($pages_list as $page) {
$pages_array[$count]['title'] = Html::toText($page['title']);
$pages_array[$count]['meta_title'] = !empty($page['meta_title']) ? Html::toText($page['meta_title']) : $page['title'];
$pages_array[$count]['parent'] = $page['parent'];
$pages_array[$count]['date'] = $page['date'];
$pages_array[$count]['author'] = $page['author'];
$pages_array[$count]['slug'] = ($page['slug'] == Option::get('defaultpage')) ? '' : $page['slug'] ;
if (isset($page['parent'])) {
$c_p = $page['parent'];
} else {
$c_p = '';
}
if ($c_p != '') {
$_page = $pages->select('[slug="'.$page['parent'].'"]', null);
if (isset($_page['title'])) {
$_title = $_page['title'];
} else {
$_title = '';
}
$pages_array[$count]['sort'] = $_title . ' ' . $page['title'];
} else {
$pages_array[$count]['sort'] = $page['title'];
}
$_title = '';
$count++;
}
// Sort pages
$_pages_list = Arr::subvalSort($pages_array, 'sort');
// return
return $_pages_list;
}
}
/**
* Page class
*/
class Page extends Pages
{
/**
* Get date of current page
*
*
* echo Page::date();
*
*
* @param string $format Date format
* @return string
*/
public static function date($format = 'Y-m-d')
{
return Date::format(Pages::$page['date'], $format);
}
/**
* Get author of current page
*
*
* echo Page::author();
*
*
* @return string
*/
public static function author()
{
return Pages::$page['author'];
}
/**
* Get children pages for a specific parent page
*
*
* $pages = Page::children('page');
*
*
* @param string $parent Parent page
* @return array
*/
public static function children($parent)
{
return Pages::$pages->select('[parent="'.(string) $parent.'"]', 'all');
}
/**
* Get the available children pages for requested page.
*
*
* echo Page::available();
*
*
*/
public static function available()
{
$pages = Pages::$pages->select('[parent="'.Pages::$requested_page.'"]', 'all');
// Display view
View::factory('box/pages/views/frontend/available_pages')
->assign('pages', $pages)
->display();
}
/**
* Get page breadcrumbs
*
*
* echo Page::breadcrumbs();
*
*
*/
public static function breadcrumbs()
{
if (Uri::command() == 'pages') {
$current_page = Pages::$requested_page;
$parent_page = '';
if ($current_page !== 'error404') {
$page = Pages::$pages->select('[slug="'.$current_page.'"]', null);
if (trim($page['parent']) !== '') {
$parent = true;
$parent_page = Pages::$pages->select('[slug="'.$page['parent'].'"]', null);
} else {
$parent = false;
}
// Display view
View::factory('box/pages/views/frontend/breadcrumbs')
->assign('current_page', $current_page)
->assign('page', $page)
->assign('parent', $parent)
->assign('parent_page', $parent_page)
->display();
}
}
}
/**
* Get page url
*
*
* echo Page::url();
*
*
*/
public static function url()
{
return Option::get('siteurl').'/'.Pages::$page['slug'];
}
/**
* Get page slug
*
*
* echo Page::slug();
*
*
*/
public static function slug()
{
return Pages::$page['slug'];
}
/**
* Get page meta robots
*
*
* echo Page::robots();
*
*
*/
public static function robots()
{
if (Pages::$page !== null) {
$_index = (isset(Pages::$page['robots_index'])) ? Pages::$page['robots_index'] : '';
$_follow = (isset(Pages::$page['robots_follow'])) ? Pages::$page['robots_follow'] : '';
$robots = ( ! empty($_index) && ! empty($_follow)) ? $_index.', '.$_follow : '';
} else {
$robots = '';
}
return $robots;
}
public static function _date($attributes)
{
return Page::date((isset($attributes['format'])) ? $attributes['format'] : 'Y-m-d');
}
public static function _content($attributes)
{
return Pages::content((isset($attributes['name']) ? $attributes['name'] : ''));
}
}
/**
* Add new shortcodes {page_author} {page_slug} {page_url} {page_date} {page_content}
*/
Shortcode::add('page_author', 'Page::author');
Shortcode::add('page_slug', 'Page::slug');
Shortcode::add('page_url', 'Page::url');
Shortcode::add('page_content', 'Page::_content');
Shortcode::add('page_date', 'Page::_date');
================================================
FILE: plugins/box/pages/views/backend/add.view.php
================================================
(isset($errors['pages_empty_title'])) ? 'form-control error-field' : 'form-control'))
);
if (isset($errors['pages_empty_title'])) echo Html::nbsp(3).'';
?>
(isset($errors['pages_empty_name'])) ? 'form-control error-field' : 'form-control'))
);
if (isset($errors['pages_exists'])) echo '';
if (isset($errors['pages_empty_name'])) echo '';
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'btn btn-phone btn-primary')).Html::nbsp(2).
Form::submit('add_page', __('Save', 'pages'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).
Html::anchor(__('Cancel', 'pages'), 'index.php?id=pages', array('title' => __('Cancel', 'pages'), 'class' => 'btn btn-phone btn-default'))
);
?>
'form-control')); ?>
================================================
FILE: plugins/box/pages/views/backend/edit.view.php
================================================
(isset($errors['pages_empty_title'])) ? 'form-control error-field' : 'form-control'))
);
if (isset($errors['pages_empty_title'])) echo '';
?>
(isset($errors['pages_empty_name'])) ? 'form-control error-field' : 'form-control'))
);
}
if (isset($errors['pages_empty_name'])) echo '';
if (isset($errors['pages_exists'])) echo '';
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'btn btn-phone btn-primary')).Html::nbsp(2).
Form::submit('edit_page', __('Save', 'pages'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).
Html::anchor(__('Cancel', 'pages'), 'index.php?id=pages', array('title' => __('Cancel', 'pages'), 'class' => 'btn btn-phone btn-default'))
);
?>
'form-control')); ?>
================================================
FILE: plugins/box/pages/views/backend/index.view.php
================================================
__('Create New Page', 'pages'), 'class' => 'btn btn-phone btn-primary')). Html::nbsp(3).
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'))
);
?>
select('[slug="'.(string) $page['parent'].'"]', null);
if ($page['parent'] !== '' && isset($expand['expand']) && $expand['expand'] == '1') { $visibility = 'style="display:none;"'; } else { $visibility = ''; }
?>
rel="children_" >
select('[parent="'.(string) $page['slug'].'"]', 'all')) > 0) {
if (isset($page['expand']) && $page['expand'] == '1') {
echo '+';
} else {
echo '-';
}
}
?>
'_blank', 'rel' => 'children_'.$_parent));
?>
'btn btn-primary')); ?>
'btn btn-danger btn-actions btn-actions-default', 'onclick' => "return confirmDelete('".__("Delete page: :page", 'pages', array(':page' => Html::toText($page['title'])))."')"));
?>
================================================
FILE: plugins/box/pages/views/frontend/available_pages.view.php
================================================
================================================
FILE: plugins/box/pages/views/frontend/breadcrumbs.view.php
================================================
→
plugins/box/plugins/plugins.plugin.php
active
2
Plugins
Plugins manager plugin
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/plugins/js/.htaccess
================================================
Options -Indexes
Allow from all
================================================
FILE: plugins/box/plugins/js/plugins.js
================================================
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.plugins = {
init: function(){
if (window.location.hash && $('a[href="'+ window.location.hash +'"]')) {
$('a[href="'+ window.location.hash +'"]').click();
}
}
};
$(document).ready(function(){
$.monstra.plugins.init();
});
================================================
FILE: plugins/box/plugins/languages/cs.lang.php
================================================
array(
'Plugins' => 'Pluginy',
'Name' => 'Název',
'Actions' => 'Akce',
'Description' => 'Popis',
'Installed' => 'Nainstalované',
'Install New' => 'Instalovat nový',
'Delete' => 'Vymazat',
'Delete plugin :plugin' => 'Vymazat plugin :plugin',
'This plugin does not exist' => 'Tento plugin neexistuje',
'Version' => 'Verze',
'Author' => 'Autor',
'Get More Plugins' => 'Získat víc pluginů',
'Install' => 'Instalovat',
'Uninstall' => 'Odinstalovat',
'README.md not found' => 'README.md nenalezeno',
)
);
================================================
FILE: plugins/box/plugins/languages/de.lang.php
================================================
array(
'Plugins' => 'Plugins',
'Name' => 'Name',
'Actions' => 'Aktionen',
'Description' => 'Beschreibung',
'Installed' => 'Installiert',
'Install New' => 'Installiere Neue',
'Delete' => 'Löschen',
'Delete plugin :plugin' => 'Lösche Plugin :plugin',
'This plugins does not exist' => 'Diese Plugins existieren nicht',
'Version' => 'Version',
'Author' => 'Author',
'Get More Plugins' => 'Hole weitere Plugins',
'Install' => 'Installieren',
'Uninstall' => 'Deinstallieren',
'README.md not found' => 'README.md nicht gefunden',
)
);
================================================
FILE: plugins/box/plugins/languages/en.lang.php
================================================
array(
'Plugins' => 'Plugins',
'Name' => 'Name',
'Actions' => 'Actions',
'Description' => 'Description',
'Installed' => 'Installed',
'Install New' => 'Install New',
'Delete' => 'Delete',
'Delete plugin :plugin' => 'Delete plugin :plugin',
'This plugin does not exist' => 'This plugin does not exist',
'Version' => 'Version',
'Author' => 'Author',
'Get More Plugins' => 'Get More Plugins',
'Install' => 'Install',
'Uninstall' => 'Uninstall',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/es.lang.php
================================================
array(
'Plugins' => 'Plugins',
'Name' => 'Nombre',
'Actions' => 'Acciones',
'Description' => 'Descripción',
'Installed' => 'Instalado',
'Install New' => 'Instalar nuevo',
'Delete' => 'Eliminar',
'Delete plugin :plugin' => 'Eliminar plugin: :plugin',
'This plugin does not exist' => 'Este plugin no existe',
'Version' => 'Versión',
'Author' => 'Autor',
'Get More Plugins' => 'Obtener más plugins',
'Install' => 'Instalar',
'Uninstall' => 'Desinstalar',
'README.md not found' => 'README.md no encontrado',
)
);
================================================
FILE: plugins/box/plugins/languages/fa.lang.php
================================================
array(
'Plugins' => 'افزونه ها',
'Name' => 'نام',
'Actions' => 'عملیات',
'Description' => 'توضیحات',
'Installed' => 'نصب شده',
'Install New' => 'نصب جدید',
'Delete' => 'حذف',
'Delete plugin :plugin' => 'حذف افزونه :plugin',
'This plugin does not exist' => 'این افزونه وجود ندارد',
'Version' => 'نسخه',
'Author' => 'مولف',
'Get More Plugins' => 'دریافت افزونه های بیشتر',
'Install' => 'نصب',
'Uninstall' => 'حذف',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/fr.lang.php
================================================
array(
'Plugins' => 'Plugins',
'Name' => 'Nom',
'Actions' => 'Actions',
'Description' => 'Description',
'Installed' => 'Installé',
'Install New' => 'Installer un nouveau',
'Delete' => 'Supprimer',
'Delete plugin :plugin' => 'Supprimer le plugin :plugin',
'This plugin does not exist' => 'Ce plugin n\\\'existe pas',
'Version' => 'Version',
'Author' => 'Auteur',
'Get More Plugins' => 'Obtenez plus de plugins',
'Install' => 'Installer',
'Uninstall' => 'Désinstaller',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/hu.lang.php
================================================
array(
'Plugins' => 'Pluginok',
'Name' => 'Név',
'Actions' => 'Műveletek',
'Description' => 'Leírás',
'Installed' => 'Telepítve',
'Install New' => 'Új Telepítése',
'Delete' => 'Törlés',
'Delete plugin :plugin' => 'Plugin törlése :plugin',
'This plugin does not exist' => 'Ez a plugin nem létezik',
'Version' => 'Verzió',
'Author' => 'Szerző',
'Get More Plugins' => 'Még több Plugin',
'Install' => 'Telepít',
'Uninstall' => 'Töröl',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/id.lang.php
================================================
array(
'Plugins' => 'Plugins',
'Name' => 'Nama',
'Actions' => 'Tindakan',
'Description' => 'Deskripsi',
'Installed' => 'Terpasang',
'Install New' => 'Pemasangan Baru',
'Delete' => 'Hapus',
'Delete plugin :plugin' => 'Hapus Plugin :plugin',
'This plugins does not exist' => 'Plugin ini tidak ada',
'Version' => 'Versi',
'Author' => 'Penulis',
'Get More Plugins' => 'Cari Plugins Baru',
'Install' => 'Memasangkan',
'Uninstall' => 'Menghapus Program',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/it.lang.php
================================================
array(
'Plugins' => 'Plugin',
'Installed' => 'Installati',
'Install New' => 'Installa nuovi',
'Actions' => 'Azioni',
'Name' => 'Nome',
'Description' => 'Descrizione',
'Delete' => 'Elimina',
'Delete plugin :plugin' => 'Elimina plugin :plugin',
'This plugin does not exist' => 'Tale plugin non esiste',
'Version' => 'Versione',
'Author' => 'Autore',
'Get More Plugins' => 'Scarica altri plugin',
'Install' => 'Installa',
'Uninstall' => 'Disinstalla',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/ja.lang.php
================================================
array(
'Plugins' => 'プラグイン',
'Name' => '名前',
'Actions' => '操作',
'Description' => '説明',
'Installed' => 'インストール済み',
'Install New' => 'インストール可能',
'Delete' => '削除',
'Delete plugin :plugin' => 'プラグインの削除: :plugin',
'This plugin does not exist' => 'プラグインが存在しません。',
'Version' => 'バージョン',
'Author' => '作成者',
'Get More Plugins' => 'さらにプラグインを取得',
'Install' => 'インストール',
'Uninstall' => '停止',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/ka-ge.lang.php
================================================
array(
'Plugins' => 'პლაგინები',
'Installed' => 'დაყენებული',
'Install New' => 'ახალის დაყენება',
'Actions' => 'მოქმედება',
'Name' => 'სახელწოდება',
'Description' => 'აღწერა',
'Delete' => 'წაშლა',
'Delete plugin :plugin' => ':plugin პლაგინის წაშლა',
'This plugin does not exist' => 'ასეთი პლაგინი არ არსებობს',
'Version' => 'ვერსია',
'Author' => 'ავტორი',
'Get More Plugins' => 'სხვა პლაგინების გადმოწერა',
'Install' => 'დაყენება',
'Uninstall' => 'წაშლა',
'README.md not found' => 'README.md არ არის ნაპოვნი',
'Info' => 'ინფო',
'Upload' => 'ატვირთვა',
'Drop File Here' => 'გადაიტანეთ ფაილი აქ',
)
);
================================================
FILE: plugins/box/plugins/languages/lt.lang.php
================================================
array(
'Plugins' => 'Papildiniai',
'Name' => 'Pavadinimas',
'Actions' => 'Veiksmai',
'Description' => 'Aprašymas',
'Installed' => 'Įdiegti',
'Install New' => 'Įdiegti naują',
'Delete' => 'Ištrinti',
'Delete plugin :plugin' => 'Ištrinti papildinį :plugin',
'This plugins does not exist' => 'Tokio papildinio nėra',
'Version' => 'Versija',
'Author' => 'Autorius',
'Get More Plugins' => 'Gauti daugiau papildinių',
'Install' => 'Įdiegti',
'Uninstall' => 'Išdiegti',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/nl.lang.php
================================================
array(
'Plugins' => 'Plugins',
'Name' => 'Naam',
'Actions' => 'Acties',
'Description' => 'Beschrijving',
'Installed' => 'Geinstalleerd',
'Install New' => 'Installeer nieuwe plugin',
'Delete' => 'Verwijderen',
'Delete plugin :plugin' => 'Verwijder plugin: :plugin',
'This plugins does not exist' => 'Deze plugin bestaat niet',
'Version' => 'Versie',
'Author' => 'Auteur',
'Get More Plugins' => 'Vind meer plugins',
'Install' => 'Installeren',
'Uninstall' => 'Deinstalleren',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/pl.lang.php
================================================
array(
'Plugins' => 'Wtyczki',
'Name' => 'Nazwa',
'Actions' => 'Akcje',
'Description' => 'Opis',
'Installed' => 'Zainstalowane',
'Install New' => 'Zainstaluj nową',
'Delete' => 'Usuń',
'Delete plugin :plugin' => 'Czy napewno usunąć wtyczkę :plugin',
'This plugin does not exist' => 'Ta wtyczka nie istnieje',
'Version' => 'Wersja',
'Author' => 'Autor',
'Get More Plugins' => 'Pobierz więcej wtyczek',
'Install' => 'Instaluj',
'Uninstall' => 'Odinstaluj',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/pt-br.lang.php
================================================
array(
'Plugins' => 'Plugins',
'Name' => 'Nome',
'Actions' => 'Ações',
'Description' => 'Descrição',
'Installed' => 'Instalado',
'Install New' => 'Instalar novo',
'Delete' => 'Deletar',
'Delete plugin :plugin' => 'Deletar o plugin :plugin',
'This plugins does not exist' => 'Estes plugins não existem',
'Version' => 'Versão',
'Author' => 'Autor',
'Get More Plugins' => 'Ver mais plugins',
'Install' => 'Instalar',
'Uninstall' => 'Desinstalar',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/ru.lang.php
================================================
array(
'Plugins' => 'Плагины',
'Installed' => 'Установленные',
'Install New' => 'Установить новые',
'Actions' => 'Действия',
'Name' => 'Название',
'Description' => 'Описание',
'Delete' => 'Удалить',
'Delete plugin :plugin' => 'Удалить плагин :plugin',
'This plugin does not exist' => 'Такого плагина не существует',
'Version' => 'Версия',
'Author' => 'Автор',
'Get More Plugins' => 'Скачать другие плагины',
'Install' => 'Установить',
'Uninstall' => 'Удалить',
'README.md not found' => 'README.md не найден',
'Info' => 'Инфо',
'Upload' => 'Загрузить',
'Drop File Here' => 'Перетащите файл сюда',
)
);
================================================
FILE: plugins/box/plugins/languages/sk.lang.php
================================================
array(
'Plugins' => 'Pluginy',
'Name' => 'Názov',
'Actions' => 'Akcie',
'Description' => 'Popis',
'Installed' => 'Nainštalované',
'Install New' => 'Inštalovať nový',
'Delete' => 'Vymazať',
'Delete plugin :plugin' => 'Vymazať plugin :plugin',
'This plugin does not exist' => 'Tento plugin neexistuje',
'Version' => 'Verzia',
'Author' => 'Autor',
'Get More Plugins' => 'Získať viacej pluginov',
'Install' => 'Inštalovať',
'Uninstall' => 'Odinštalovať',
'README.md not found' => 'README.md not found',
)
);
================================================
FILE: plugins/box/plugins/languages/sr.lang.php
================================================
array(
'Plugins' => 'Dodaci',
'Name' => 'Ime',
'Actions' => 'Akcije',
'Description' => 'Opis',
'Installed' => 'Instalirani',
'Install New' => 'Instaliraj novi',
'Delete' => 'Obriši',
'Delete plugin :plugin' => 'Obriši dodatak :plugin',
'This plugin does not exist' => 'Ovaj dodatak ne postoji',
'Version' => 'Verzija',
'Author' => 'Autor',
'Get More Plugins' => 'Dodaj još dodataka',
'Install' => 'Instaliraj',
'Uninstall' => 'Deinstaliraj',
'README.md not found' => 'README.md Nije nađeno',
)
);
================================================
FILE: plugins/box/plugins/languages/tr.lang.php
================================================
array(
'Plugins' => 'Eklentiler',
'Name' => 'Ad',
'Actions' => 'İşlemler',
'Description' => 'Açıklama',
'Installed' => 'Yüklenenler',
'Install New' => 'Yeni Yükle',
'Delete' => 'Sil',
'Delete plugin :plugin' => ':plugin adlı eklenti silinsin mi',
'This plugin does not exist' => 'Eklenti bulunamadı',
'Version' => 'Sürüm',
'Author' => 'Yazar',
'Get More Plugins' => 'Daha Fazla Eklenti',
'Install' => 'Yükle',
'Uninstall' => 'Kaldır',
)
);
================================================
FILE: plugins/box/plugins/languages/uk.lang.php
================================================
array(
'Plugins' => 'Плагіни',
'Installed' => 'Встановлені',
'Install New' => 'Встановити нові',
'Actions' => 'Дії',
'Name' => 'Назва',
'Description' => 'Опис',
'Delete' => 'Видалити',
'Delete plugin :plugin' => 'Видалити плагін :plugin',
'This plugin does not exist' => 'Такий плагін не існує',
'Version' => 'Версія',
'Author' => 'Автор',
'Get More Plugins' => 'Завантажити інші плагіни',
'Install' => 'Встановити',
'Uninstall' => 'Видалити',
'README.md not found' => 'README.md не знайдено',
'Info' => 'Інфо',
'Upload' => 'Завантажити',
'Drop File Here' => 'Перенесіть файл сюди',
)
);
================================================
FILE: plugins/box/plugins/languages/zh-cn.lang.php
================================================
array(
'Plugins' => '插件',
'Name' => '名称',
'Actions' => '操作',
'Description' => '描述',
'Installed' => '已安装',
'Install New' => '安装新插件',
'Delete' => '删除',
'Delete plugin :plugin' => '删除插件 :plugin',
'This plugin does not exist' => '此插件不存在',
'Version' => '版本',
'Author' => '作者',
'Get More Plugins' => '获取更多插件',
'Install' => '安装',
'Uninstall' => '卸载',
)
);
================================================
FILE: plugins/box/plugins/plugins.admin.php
================================================
deleteWhere('[name="'.Request::get('delete_plugin').'"]');
// Redirect
Request::redirect('index.php?id=plugins');
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Install new plugin
// -------------------------------------
if (Request::get('install')) {
if (Security::check(Request::get('token'))) {
// Load plugin install xml file
$plugin_xml = XML::loadFile(PLUGINS . DS . basename(Text::lowercase(Request::get('install')), '.manifest.xml') . DS . 'install' . DS . Request::get('install'));
// Add plugin to plugins table
$plugins->insert(array('name' => basename(Request::get('install'), '.manifest.xml'),
'location' => (string) $plugin_xml->plugin_location,
'status' => (string) $plugin_xml->plugin_status,
'priority' => (int) $plugin_xml->plugin_priority));
// Clean Monstra TMP folder.
Monstra::cleanTmp();
Stylesheet::stylesVersionIncrement();
Javascript::javascriptVersionIncrement();
// Run plugin installer file
$plugin_name = str_replace(array("Plugin", ".manifest.xml"), "", Request::get('install'));
if (File::exists(PLUGINS . DS .basename(Text::lowercase(Request::get('install')), '.manifest.xml') . DS . 'install' . DS . $plugin_name . '.install.php')) {
include PLUGINS . DS . basename(Text::lowercase(Request::get('install')), '.manifest.xml') . DS . 'install' . DS . $plugin_name . '.install.php';
}
Request::redirect('index.php?id=plugins');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Delete plugin from server
// -------------------------------------
if (Request::get('delete_plugin_from_server')) {
if (Security::check(Request::get('token'))) {
// Clean Monstra TMP folder.
Monstra::cleanTmp();
Stylesheet::stylesVersionIncrement();
Javascript::javascriptVersionIncrement();
Dir::delete(PLUGINS . DS . basename(Request::get('delete_plugin_from_server'), '.manifest.xml'));
Request::redirect('index.php?id=plugins');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Upload & extract plugin archive
// -------------------------------------
if (Request::post('upload_file')) {
if (Security::check(Request::post('csrf'))) {
if ($_FILES['file']) {
if (in_array(File::ext($_FILES['file']['name']), array('zip'))) {
$tmp_dir = ROOT . DS .'tmp'. DS . uniqid('plugin_');
$error = 'Plugin was not uploaded';
if (Dir::create($tmp_dir)) {
$file_locations = Zip::factory()->extract($_FILES['file']['tmp_name'], $tmp_dir);
if (!empty($file_locations)) {
$manifest = '';
foreach ($file_locations as $filepath) {
if (substr($filepath, -strlen('.manifest.xml')) === '.manifest.xml') {
$manifest = $filepath;
break;
}
}
if (!empty($manifest) && basename(dirname($manifest)) === 'install') {
$manifest_file = pathinfo($manifest, PATHINFO_BASENAME);
$plugin_name = str_replace('.manifest.xml', '', $manifest_file);
if (Dir::create(PLUGINS . DS . $plugin_name)) {
$tmp_plugin_dir = dirname(dirname($manifest));
Dir::copy($tmp_plugin_dir, PLUGINS . DS . $plugin_name);
Notification::set('success', __('Plugin was uploaded', 'plugins'));
$error = false;
}
}
}
} else {
$error = 'System error';
}
} else {
$error = 'Forbidden plugin file type';
}
} else {
$error = 'Plugin was not uploaded';
}
if ($error) {
Notification::set('error', __($error, 'plugins'));
}
if (Request::post('dragndrop')) {
Request::shutdown();
} else {
Request::redirect($site_url.'/admin/index.php?id=plugins#installnew');
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Installed plugins
$plugins_installed = array();
// New plugins
$plugins_new = array();
// Plugins to install
$plugins_to_intall = array();
// Scan plugins directory for .manifest.xml
$plugins_new = File::scan(PLUGINS, '.manifest.xml');
// Get installed plugins from plugins table
$plugins_installed = $plugins->select(null, 'all', null, array('location', 'priority'), 'priority', 'ASC');
// Update $plugins_installed array. extract plugins names
foreach ($plugins_installed as $plg) {
$_plg[] = basename($plg['location'], 'plugin.php').'manifest.xml';
}
// Diff
$plugins_to_install = array_diff($plugins_new, $_plg);
// Create array of plugins to install
$count = 0;
foreach ($plugins_to_install as $plugin) {
$plg_path = PLUGINS . DS . Text::lowercase(basename($plugin, '.manifest.xml')) . DS . 'install' . DS . $plugin;
if (file_exists($plg_path)) {
$plugins_to_intall[$count]['path'] = $plg_path;
$plugins_to_intall[$count]['plugin'] = $plugin;
$count++;
}
}
// Draw template
View::factory('box/plugins/views/backend/index')
->assign('installed_plugins', $installed_plugins)
->assign('plugins_to_intall', $plugins_to_intall)
->assign('_users_plugins', $_users_plugins)
->assign('fileuploader', array(
'uploadUrl' => $site_url.'/admin/index.php?id=plugins',
'csrf' => Security::token(),
'errorMsg' => __('Upload server error', 'filesmanager')
))
->display();
}
/**
* _readmeLoadAjax
*/
public static function _readmeLoadAjax() {
if (Request::post('readme_plugin')) {
if (File::exists($file = PLUGINS . DS . Request::post('readme_plugin') . DS . 'README.md')) {
echo Text::toHtml(markdown(Html::toText(File::getContent($file))));
} else {
echo __('README.md not found', 'plugins');
}
Request::shutdown();
}
}
}
================================================
FILE: plugins/box/plugins/plugins.plugin.php
================================================
plugin_name; ?>
plugin_description; ?>
plugin_author; ?>
plugin_version; ?>
'btn btn-info readme_plugin', 'data-toggle' => 'modal', 'data-target' => '#readme', 'readme_plugin' => basename($plug['plugin'], '.manifest.xml')));
?>
'btn btn-primary')); ?>
'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete plugin :plugin', 'plugins', array(':plugin' => $plugin_xml->plugin_name))."')"));
?>
'multipart/form-data', 'class' => 'form-inline')).
Form::hidden('csrf', Security::token())
);
?>
'btn btn-primary')).
Form::close()
);
?>
================================================
FILE: plugins/box/sitemap/install/sitemap.manifest.xml
================================================
plugins/box/sitemap/sitemap.plugin.php
active
10
Sitemap
Show sitemap
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/sitemap/languages/cs.lang.php
================================================
array(
'Sitemap' => 'Mapa webu',
)
);
================================================
FILE: plugins/box/sitemap/languages/de.lang.php
================================================
array(
'Sitemap' => 'Sitemap',
)
);
================================================
FILE: plugins/box/sitemap/languages/en.lang.php
================================================
array(
'Sitemap' => 'Sitemap',
)
);
================================================
FILE: plugins/box/sitemap/languages/es.lang.php
================================================
array(
'Sitemap' => 'Mapa del sitio',
)
);
================================================
FILE: plugins/box/sitemap/languages/fa.lang.php
================================================
array(
'Sitemap' => 'نقشه سایت',
)
);
================================================
FILE: plugins/box/sitemap/languages/fr.lang.php
================================================
array(
'Sitemap' => 'Plan du site',
)
);
================================================
FILE: plugins/box/sitemap/languages/hu.lang.php
================================================
array(
'Sitemap' => 'Oldaltérkép',
)
);
================================================
FILE: plugins/box/sitemap/languages/it.lang.php
================================================
array(
'Sitemap' => 'Sitemap',
)
);
================================================
FILE: plugins/box/sitemap/languages/ja.lang.php
================================================
array(
'Sitemap' => 'サイトマップ',
)
);
================================================
FILE: plugins/box/sitemap/languages/ka-ge.lang.php
================================================
array(
'Sitemap' => 'საიტის რუქა',
)
);
================================================
FILE: plugins/box/sitemap/languages/lt.lang.php
================================================
array(
'Sitemap' => 'Sitemap',
)
);
================================================
FILE: plugins/box/sitemap/languages/nl.lang.php
================================================
array(
'Sitemap' => 'Sitemap',
)
);
================================================
FILE: plugins/box/sitemap/languages/pl.lang.php
================================================
array(
'Sitemap' => 'Mapa witryny',
)
);
================================================
FILE: plugins/box/sitemap/languages/pt-br.lang.php
================================================
array(
'Sitemap' => 'Mapa do site',
)
);
================================================
FILE: plugins/box/sitemap/languages/ru.lang.php
================================================
array(
'Sitemap' => 'Карта сайта',
)
);
================================================
FILE: plugins/box/sitemap/languages/sk.lang.php
================================================
array(
'Sitemap' => 'Mapa webstánky',
)
);
================================================
FILE: plugins/box/sitemap/languages/sr.lang.php
================================================
array(
'Sitemap' => 'Mapa sajta',
)
);
================================================
FILE: plugins/box/sitemap/languages/tr.lang.php
================================================
array(
'Sitemap' => 'Site Haritası',
)
);
================================================
FILE: plugins/box/sitemap/languages/uk.lang.php
================================================
array(
'Sitemap' => 'Мапа сайту',
)
);
================================================
FILE: plugins/box/sitemap/languages/zh-cn.lang.php
================================================
array(
'Sitemap' => '网站地图',
)
);
================================================
FILE: plugins/box/sitemap/sitemap.plugin.php
================================================
assign('pages_list', Pages::getPages())
->assign('components', Sitemap::getComponents())
->render();
}
/**
* Create sitemap
*/
public static function create()
{
// Get pages list
$pages_list = Pages::getPages();
// Create sitemap content
$map = ''."\n";
$map .= ''."\n";
foreach ($pages_list as $page) {
if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '0.5'; } else { $parent = ''; $priority = '1.0'; }
$map .= "\t".''."\n\t\t".''.Option::get('siteurl').'/'.$parent.$page['slug'].' '."\n\t\t".''.date("Y-m-d", (int) $page['date']).' '."\n\t\t".'weekly '."\n\t\t".''.$priority.' '."\n\t".' '."\n";
}
// Get list of components
$components = Sitemap::getComponents();
// Add components to sitemap
if (count($components) > 0) {
foreach ($components as $component) {
$map .= "\t".''."\n\t\t".''.Option::get('siteurl').'/'.Text::lowercase($component).' '."\n\t\t".''.date("Y-m-d", time()).' '."\n\t\t".'weekly '."\n\t\t".'1.0 '."\n\t".' '."\n";
}
}
// Close sitemap
$map .= ' ';
// Save sitemap
return File::setContent(ROOT . DS . 'sitemap.xml', $map);
}
/**
* Get components
*/
protected static function getComponents()
{
$components = array();
if (count(Plugin::$components) > 0) {
foreach (Plugin::$components as $component) {
if ( ! in_array($component, Sitemap::$forbidden_components)) $components[] = Text::lowercase($component);
}
}
return $components;
}
}
================================================
FILE: plugins/box/sitemap/views/frontend/index.view.php
================================================
0) {
$children_started = false;
$first = true;
foreach ($pages_list as $page) {
if (trim($page['parent']) === '' && $children_started) {
$children_started = false;
$sitemap_html .= "
\n";
} elseif(!$first && (trim($page['parent']) !== '' && $children_started || trim($page['parent']) === '')) {
$sitemap_html .= "\n";
}
if (trim($page['parent']) !== '') $parent = $page['parent'].'/'; else $parent = '';
if (trim($page['parent']) !== '' && !$children_started) {
$children_started = true;
$sitemap_html .= "\n";
}
$sitemap_html .= '- '.$page['title'].'';
$first = false;
}
if (trim($page['parent']) === '' && $children_started) {
$sitemap_html .= "
\n";
} else {
$sitemap_html .= "\n";
}
}
// Display components
if (count($components) > 0) {
foreach ($components as $component) {
$sitemap_html .= ''.__(ucfirst($component), $component).' '."\n";
}
}
echo $sitemap_html;
?>
================================================
FILE: plugins/box/snippets/install/snippets.manifest.xml
================================================
plugins/box/snippets/snippets.plugin.php
active
6
Snippets
Snippets manager plugin
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/snippets/js/.htaccess
================================================
Options -Indexes
Allow from all
================================================
FILE: plugins/box/snippets/js/snippets.js
================================================
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.snippets = {
init: function() { },
showEmbedCodes: function(name) {
$('#shortcode').html('{snippet get="'+name+'"}');
$('#phpcode').html('<?php echo Snippet::get("'+name+'"); ?>');
$('#embedCodes').modal();
}
};
$(document).ready(function(){
$.monstra.snippets.init();
});
================================================
FILE: plugins/box/snippets/languages/cs.lang.php
================================================
array(
'Snippets' => 'Snippets / doplňky',
'Snippets manager' => 'Manažer Snippets',
'Actions' => 'Akce',
'Delete' => 'Vymazat',
'Edit' => 'Editovat',
'Name' => 'Název',
'Create New Snippet' => 'Vytvořit nový snippet',
'New Snippet' => 'Nový snippet',
'Edit Snippet' => 'Editovat snippet',
'Save' => 'Uložit',
'Save and Exit' => 'Uložit a ukončit',
'This snippet already exists' => 'Tento snippet už existuje',
'This snippet does not exist' => 'Tento snippet neexistuje',
'Delete snippet: :snippet' => 'Vymazat snippet: :snippet',
'Snippet content' => 'Obsah snippetu',
'Snippet :name deleted' => 'Snippet :name byl vymazaný',
'Your changes to the snippet :name have been saved.' => 'Vaše změny ve snippetu :name byly uložené.',
'Delete snippet: :snippet' => 'Vymazat snippet: :snippet',
'Required field' => 'Povinné políčko',
'View Embed Code' => 'Zobrazit vložený kód',
'Embed Code' => 'Vložený Kód',
'Shortcode' => 'Zkrácený kód',
'PHP Code' => 'PHP Kód',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/snippets/languages/de.lang.php
================================================
array(
'Snippets' => 'Snippets',
'Snippets manager' => 'Snippet Manager',
'Actions' => 'Aktionen',
'Delete' => 'Löschen',
'Edit' => 'Bearbeiten',
'Name' => 'Name',
'Create New Snippet' => 'Erstelle neues Snippet',
'New Snippet' => 'Neues Snippet',
'Edit Snippet' => 'Bearbeite Snippet',
'Save' => 'Speichern',
'Save and Exit' => 'Speichern und Schließen',
'This field should not be empty' => 'Dieses Feld darf nicht leer sein',
'This snippet already exists' => 'Dieses Snippet existiert bereits',
'This snippet does not exist' => 'Dieses Snippet existiert nicht',
'Delete snippet: :snippet' => 'Lösche Snippet: :snippet',
'Snippet content' => 'Snippet Inhalt',
'Snippet :name deleted' => 'Snippet :name wurde gelöscht',
'Your changes to the snippet :name have been saved.' => 'Deine Änderungen für das Snippet :name wurden gespeichert.',
'Delete snippet: :snippet' => 'Lösche Snippet: :snippet',
'Required field' => 'Pflichtfeld',
'View Embed Code' => 'Zeige Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Abbrechen',
)
);
================================================
FILE: plugins/box/snippets/languages/en.lang.php
================================================
array(
'Snippets' => 'Snippets',
'Snippets manager' => 'Snippets manager',
'Actions' => 'Actions',
'Delete' => 'Delete',
'Edit' => 'Edit',
'Name' => 'Name',
'Create New Snippet' => 'Create New Snippet',
'New Snippet' => 'New Snippet',
'Edit Snippet' => 'Edit Snippet',
'Save' => 'Save',
'Save and Exit' => 'Save and Exit',
'This snippet already exists' => 'This snippet already exists',
'This snippet does not exist' => 'This snippet does not exist',
'Delete snippet: :snippet' => 'Delete snippet: :snippet',
'Snippet content' => 'Snippet content',
'Snippet :name deleted' => 'Snippet :name deleted',
'Your changes to the snippet :name have been saved.' => 'Your changes to the snippet :name have been saved.',
'Delete snippet: :snippet' => 'Delete snippet: :snippet',
'Required field' => 'Required field',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/snippets/languages/es.lang.php
================================================
array(
'Snippets' => 'Snippets',
'Snippets manager' => 'Administrador de snippets',
'Actions' => 'Acciones',
'Delete' => 'Eliminar',
'Edit' => 'Editar',
'Name' => 'Nombre',
'Create New Snippet' => 'Crear nuevo snippet',
'New Snippet' => 'Nuevo snippet',
'Edit Snippet' => 'Editar snippet',
'Save' => 'Guardar',
'Save and Exit' => 'Guardar y salir',
'This snippet already exists' => 'Este snippet ya existe',
'This snippet does not exist' => 'Este snippet no existe',
'Delete snippet: :snippet' => 'Eliminar snippet: :snippet',
'Snippet content' => 'Contenido del snippet',
'Snippet :name deleted' => 'Snippet :name eliminado',
'Your changes to the snippet :name have been saved.' => 'Tus cambios realizados en el snippet :name han sido guardados.',
'Delete snippet: :snippet' => 'Eliminar snippet: :snippet',
'Required field' => 'Dato requerido',
'View Embed Code' => 'Ver código incrustado',
'Embed Code' => 'Código incrustado',
'Shortcode' => 'Código corto',
'PHP Code' => 'Código PHP',
'Cancel' => 'Cancelar',
)
);
================================================
FILE: plugins/box/snippets/languages/fa.lang.php
================================================
array(
'Snippets' => 'کدآماده',
'Snippets manager' => 'مدیریت کدآماده',
'Actions' => 'عملیات',
'Delete' => 'حذف',
'Edit' => 'ویرایش',
'Name' => 'نام',
'Create New Snippet' => 'ایجاد کد آماده جدید',
'New Snippet' => 'کدآماده جدید',
'Edit Snippet' => 'ویرایش کدآماده',
'Save' => 'ذخیره',
'Save and Exit' => 'ذخیره و خروج',
'This snippet already exists' => 'این کدآماده از قبل موجود است',
'This snippet does not exist' => 'این کدآماده وجود ندارد',
'Delete snippet: :snippet' => 'حذف کدآماده: :snippet',
'Snippet content' => 'محتوی کدآماده',
'Snippet :name deleted' => 'کدآماده :name حذف شد',
'Your changes to the snippet :name have been saved.' => 'تغییرات شما بر روی کدآماده :name ذخیره شد.',
'Delete snippet: :snippet' => 'حذف کدآماده: :snippet',
'Required field' => 'کادر الزامی',
'View Embed Code' => 'مشاهده کد درج شده',
'Embed Code' => 'کد درج شده',
'Shortcode' => 'کدکوتاه',
'PHP Code' => 'کد PHP',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/snippets/languages/fr.lang.php
================================================
array(
'Snippets' => 'Snippets',
'Snippets manager' => 'Gestionnaire de snippets',
'Actions' => 'Actions',
'Delete' => 'Supprimer',
'Edit' => 'Editer',
'Name' => 'Nom',
'Create new snippet' => 'Créer un nouveau snippet',
'New snippet' => 'Nouveau snippet',
'Edit snippet' => 'Editer le snippet',
'Save' => 'Enregistrer',
'Save and exit' => 'Enregistrer et sortir',
'This snippet already exists' => 'Ce snippet existe déjà',
'This snippet does not exist' => 'Ce snippet n\\\'existe pas',
'Delete snippet: :snippet' => 'Supprimer le snippet: :snippet',
'Snippet content' => 'Contenu du snippet',
'Snippet :name deleted' => 'Snippet :name supprimé',
'Your changes to the snippet :name have been saved.' => 'Vos changements pour le snippet :name ont été enregistrés.',
'Delete snippet: :snippet' => 'Supprimer le snippet: :snippet',
'Required field' => 'Champs requis',
'View Embed Code' => 'Voir le code intégré',
'Embed Code' => 'Code intégré',
'Shortcode' => 'Code court',
'PHP Code' => 'Code PHP',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/snippets/languages/hu.lang.php
================================================
array(
'Snippets' => 'Snippets',
'Snippets manager' => 'Snippets manager',
'Actions' => 'Műveletek',
'Delete' => 'Töröl',
'Edit' => 'Szerkeszt',
'Name' => 'Név',
'Create New Snippet' => 'Új Snippet készítése',
'New Snippet' => 'Új Snippet',
'Edit Snippet' => 'Snippet szerkesztése',
'Save' => 'Mentés',
'Save and Exit' => 'Mentés és Kilépés',
'This snippet already exists' => 'Ez a snippet már létezik',
'This snippet does not exist' => 'Ez a snippet nem létezik',
'Delete snippet: :snippet' => 'Snippet törlés: :snippet',
'Snippet content' => 'Snippet tartalom',
'Snippet :name deleted' => 'A :name Snippet törölve',
'Your changes to the snippet :name have been saved.' => 'YA változtatások :name elmentve.',
'Delete snippet: :snippet' => 'Snippet törlés: :snippet',
'Required field' => 'Kötelező mező',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/snippets/languages/id.lang.php
================================================
array(
'Snippets' => 'Snippets',
'Snippets manager' => 'Pengelolaan Snippets',
'Actions' => 'Tindakan',
'Delete' => 'Hapus',
'Edit' => 'Perbaiki',
'Name' => 'Nama',
'Create New Snippet' => 'Buat Snippet Baru',
'New Snippet' => 'Snippet Baru',
'Edit snippet' => 'Perbaiki Snippet',
'Save' => 'Simpan',
'Save and Exit' => 'Simpan dan Keluar',
'This snippet already exists' => 'Snippet ini sudah ada',
'This snippet does not exist' => 'Snippet ini belum ada',
'Delete snippet: :snippet' => 'Hapus snippet: :snippet',
'Snippet content' => 'Isi snippet',
'Snippet :name deleted' => 'Snippet :name dihapus',
'Your changes to the snippet :name have been saved.' => 'Perubahan pada snippet :name telah disimpan.',
'Delete snippet: :snippet' => 'Hapus snippet: :snippet',
'Required field' => 'Isian yang Diperlukan',
'View Embed Code' => 'Lihat Kodingan yang Disisipkan',
'Embed Code' => 'Kode Sisipan',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);
================================================
FILE: plugins/box/snippets/languages/it.lang.php
================================================
array(
'Snippets' => 'Snippet',
'Snippets manager' => 'Gestione snippet',
'Actions' => 'Azioni',
'Delete' => 'Elimina',
'Edit' => 'Modifica',
'New Snippet' => 'Nuovo snippet',
'Create New Snippet' => 'Crea nuovo snippet',
'Name' => 'Nome',
'Edit Snippet' => 'Modifica snippet',
'Save' => 'Salva',
'Save and Exit' => 'Salva ed esci',
'This snippet already exists' => 'Tale snippet già esistente',
'This snippet does not exist' => 'Tale snippet non esiste',
'Delete snippet: :block' => 'Elimina snippet: :snippet',
'Snippet content' => 'Contenuto del snippet',
'Snippet :name deleted' => 'Snippet :name eliminato',
'Your changes to the snippet :name have been saved.' => 'Le modifiche al snippet :name sono state salvate.',
'Delete snippet: :snippet' => 'Elimina snippet: :snippet',
'Required field' => 'Campo obbligatorio',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/snippets/languages/ja.lang.php
================================================
array(
'Snippets' => 'スニペット',
'Snippets manager' => 'スニペットの管理',
'Actions' => '操作',
'Delete' => '削除',
'Edit' => '編集',
'Name' => '名前',
'Create New Snippet' => '新規スニペットの作成',
'New Snippet' => '新規スニペット',
'Edit Snippet' => 'スニペットの編集',
'Save' => '保存',
'Save and Exit' => '保存して終了',
'This snippet already exists' => 'スニペットはすでに存在しています',
'This snippet does not exist' => 'スニペットは存在しません',
'Delete snippet: :snippet' => 'スニペットの削除: :snippet',
'Snippet content' => 'スニペットの内容',
'Snippet :name deleted' => ':name スニペットは削除されました。',
'Your changes to the snippet :name have been saved.' => ':name スニペットへの変更は保存されました。',
'Delete snippet: :snippet' => 'スニペットの削除: :snippet',
'Required field' => '必須項目',
'View Embed Code' => '埋め込みコードを表示',
'Embed Code' => '埋め込みコード',
'Shortcode' => 'ショートコード',
'PHP Code' => 'PHPコード',
)
);
================================================
FILE: plugins/box/snippets/languages/ka-ge.lang.php
================================================
array(
'Snippets' => 'Snippet-ები',
'Snippets manager' => 'Snippet-ების მენეჯერი',
'Actions' => 'მოქმედება',
'Delete' => 'წაშლა',
'Edit' => 'რედაქტირება',
'New Snippet' => 'ახალი Snippet-ი',
'Create New Snippet' => 'ახალი Snippet-ის შექმნა',
'Name' => 'სახელწოდება',
'Edit Snippet' => 'Snippet-ის რედაქტირება',
'Save' => 'შენახვა',
'Save and Exit' => 'შენახვა და შემდეგ გამოსვლა',
'This snippet already exists' => 'ასეთი Snippet-ი უკვე არსებობს',
'This snippet does not exist' => 'ასეთი Snippet-ი არ არსებობს',
'Delete snippet: :block' => 'Snippet-ის წაშლა: :snippet',
'Snippet content' => 'Snippet-ის შედგენილობა',
'Snippet :name deleted' => 'Snippet-ი :name წაშლილია',
'Your changes to the snippet :name have been saved.' => 'თქვენი ცვლილებები Snippet-ის მიმართ :name შენახულია.',
'Delete snippet: :snippet' => 'Snippet-ის წაშლა: :snippet',
'Required field' => 'აუცილებელი ველი',
'View Embed Code' => 'ჩასაწერი კოდი',
'Embed Code' => 'ჩასაწერი კოდი',
'Shortcode' => 'Shortcode-ი',
'PHP Code' => 'PHP კოდი',
'Cancel' => 'გაუქმება',
)
);
================================================
FILE: plugins/box/snippets/languages/lt.lang.php
================================================
array(
'Snippets' => 'Fragmentai',
'Snippets manager' => 'Fragmentų tvarkyklė',
'Actions' => 'Veiksmai',
'Delete' => 'Ištrinti',
'Edit' => 'Redaguoti',
'Name' => 'Pavadinimas',
'Create New Snippet' => 'Kurti naują fragmentą',
'New Snippet' => 'Naujas fragmentas',
'Edit Snippet' => 'Redaguoti fragmentą',
'Save' => 'Išsaugoti',
'Save and Exit' => 'Išsaugoti ir išeiti',
'Required field' => 'Privalomas laukas',
'This snippet already exists' => 'Toks fragmentas jau yra',
'This snippet does not exist' => 'Tokio fragmento nėra',
'Delete snippet: :snippet' => 'Ištrinti fragmentą :snippet',
'Snippet content' => 'Fragmento turinys',
'Snippet :name deleted' => 'Fragmentas :name ištrintas',
'Your changes to the snippet :name have been saved.' => 'Fragmento :name pakeitimai išsaugoti.',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/snippets/languages/nl.lang.php
================================================
array(
'Snippets' => 'Snippets',
'Snippets manager' => 'Snippet Beheer',
'Actions' => 'Acties',
'Delete' => 'Verwijderen',
'Edit' => 'Bewerken',
'Name' => 'Naam',
'Create New Snippet' => 'Nieuwe Snippet',
'New Snippet' => 'Nieuwe snippet',
'Edit Snippet' => 'Bewerk snippet',
'Save' => 'Opslaan',
'Save and Exit' => 'Opslaan en Terug',
'This field should not be empty' => 'Dit veld mag niet leeg zijn',
'This snippet already exists' => 'Deze snippet bestaat al',
'This snippet does not exist' => 'Deze snippet bestaat niet',
'Delete snippet: :snippet' => 'Verwijder snippet: :snippet',
'Snippet content' => 'Snippet inhoud',
'Snippet :name deleted' => 'Snippet :name is verwijderd',
'Your changes to the snippet :name have been saved.' => 'De wijzigingen aan snippet :name zijn opgeslagen.',
'Delete snippet: :snippet' => 'Verwijder snippet: :snippet',
'Required field' => 'Vereist veld',
'View Embed Code' => 'Bekijk Insluitcode',
'Embed Code' => 'Insluitcode',
'Shortcode' => 'Korte code',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/snippets/languages/pl.lang.php
================================================
array(
'Snippets' => 'Skrawki (snippets)',
'Snippets manager' => 'Zarządzaj skrawkami',
'Actions' => 'Akcje',
'Delete' => 'Usuń',
'Edit' => 'Edytuj',
'Name' => 'Nazwa',
'Create New Snippet' => 'Utwórz nowy skrawek',
'New Snippet' => 'Nowy skrawek',
'Edit Snippet' => 'Edytuj skrawek',
'Save' => 'Zapisz',
'Save and Exit' => 'Zapisz i wyjdź',
'This snippet already exists' => 'Ten skrawek już istnieje',
'This snippet does not exist' => 'Ten skrawek nie istnieje',
'Delete snippet: :snippet' => 'Czy napewno usunąć skrawek: :snippet',
'Snippet content' => 'Zawartość skrawka',
'Snippet :name deleted' => 'Skrawek :name został usunięty',
'Your changes to the snippet :name have been saved.' => 'Twoje zmiany dla skrawka :name zostały zapisane.',
'Delete snippet: :snippet' => 'Czy napewno usunąć skrawek: :snippet',
'Required field' => 'Pole wymagane',
'View Embed Code' => 'Pokaż osadzony kod',
'Embed Code' => 'Osadzony kod',
'Shortcode' => 'Krótki kod (shortcode)',
'PHP Code' => 'Kod PHP',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/snippets/languages/pt-br.lang.php
================================================
array(
'Snippets' => 'Códigos',
'Snippets manager' => 'Gerenciador de códigos',
'Actions' => 'Ações',
'Delete' => 'Deletar',
'Edit' => 'Editar',
'Name' => 'Nome',
'Create New Snippet' => 'Criar novo código',
'New Snippet' => 'Novo código',
'Edit Snippet' => 'Editar código',
'Save' => 'Salvar',
'Save and Exit' => 'Salvar e sair',
'This field should not be empty' => 'Este campo não pode estar vazio',
'This snippet already exists' => 'Este código já existe',
'This snippet does not exist' => 'Este código não existe',
'Delete snippet: :snippet' => 'Deletar o código: :snippet',
'Snippet content' => 'Conteúdo do código',
'Snippet :name deleted' => 'Código :name deletado',
'Your changes to the snippet :name have been saved.' => 'Suas alterações no código :name foram salvas',
'Delete snippet: :snippet' => 'Deletar o código: :snippet',
'Required field' => 'Campo requerido',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/snippets/languages/ru.lang.php
================================================
array(
'Snippets' => 'Сниппеты',
'Snippets manager' => 'Менеджер сниппетов',
'Actions' => 'Действия',
'Delete' => 'Удалить',
'Edit' => 'Редактировать',
'New Snippet' => 'Новый сниппет',
'Create New Snippet' => 'Создать новый сниппет',
'Name' => 'Название',
'Edit Snippet' => 'Редактирование сниппета',
'Save' => 'Сохранить',
'Save and Exit' => 'Сохранить и выйти',
'This snippet already exists' => 'Такой сниппет уже существует',
'This snippet does not exist' => 'Такого сниппета не существует',
'Delete snippet: :block' => 'Удалить сниппет: :snippet',
'Snippet content' => 'Содержимое сниппета',
'Snippet :name deleted' => 'Сниппет :name удален',
'Your changes to the snippet :name have been saved.' => 'Ваши изменения к сниппету :name были сохранены.',
'Delete snippet: :snippet' => 'Удалить сниппет: :snippet',
'Required field' => 'Обязательное поле',
'View Embed Code' => 'Код для вставки',
'Embed Code' => 'Код для вставки',
'Shortcode' => 'Шорткод',
'PHP Code' => 'PHP код',
'Cancel' => 'Отмена',
)
);
================================================
FILE: plugins/box/snippets/languages/sk.lang.php
================================================
array(
'Snippets' => 'Snippets / Doplnky',
'Snippets manager' => 'Manažér Snippets',
'Actions' => 'Akcie',
'Delete' => 'Vymazať',
'Edit' => 'Editovať',
'Name' => 'Názov',
'Create New Snippet' => 'Vytvoriť nový snippet',
'New Snippet' => 'Nový snippet',
'Edit Snippet' => 'Editovať snippet',
'Save' => 'Uložiť',
'Save and Exit' => 'Uložiť a ukončiť',
'This snippet already exists' => 'Tento snippet už existuje',
'This snippet does not exist' => 'Tento snippet neexistuje',
'Delete snippet: :snippet' => 'Vymazať snippet: :snippet',
'Snippet content' => 'Obsah snippet',
'Snippet :name deleted' => 'Snippet :name bol vymazaný',
'Your changes to the snippet :name have been saved.' => 'Vaše zmeny v snippet :name boli uložené.',
'Delete snippet: :snippet' => 'Vymazať snippet: :snippet',
'Required field' => 'Povinné políčko',
'View Embed Code' => 'Pozrieť vložený kód',
'Embed Code' => 'Vložený Kód',
'Shortcode' => 'Skrátený kód',
'PHP Code' => 'PHP Kód',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/snippets/languages/sr.lang.php
================================================
array(
'Snippets' => 'Klipovi',
'Snippets manager' => 'Menadžer klipova',
'Actions' => 'Akcije',
'Delete' => 'Obriši',
'Edit' => 'Izmeni',
'Name' => 'Ime',
'Create new snippet' => 'Kreiraj novi klip',
'New snippet' => 'Novi klip',
'Edit snippet' => 'Izmeni klip',
'Save' => 'Sačuvaj',
'Save and exit' => 'Sačuvaj i izađi',
'This snippet already exists' => 'Ovaj klip već postoji',
'This snippet does not exist' => 'Ovaj klip ne postoji',
'Delete snippet: :snippet' => 'Obriši klip: :snippet',
'Snippet content' => 'Sadržaj klipa',
'Snippet :name deleted' => 'Klip :name je uspešno obrisan',
'Your changes to the snippet :name have been saved.' => 'Promene na klipu :name su uspešno sačuvane.',
'Delete snippet: :snippet' => 'Obriši klipove: :snippet',
'Required field' => 'Potrebno polje',
'View Embed Code' => 'Pogledaj Embed Kod',
'Embed Code' => 'Embed kod',
'Shortcode' => 'Kratak kod',
'PHP Code' => 'PHP kod',
'Cancel' => 'Otkaži',
)
);
================================================
FILE: plugins/box/snippets/languages/tr.lang.php
================================================
array(
'Snippets' => 'Betikler',
'Snippets manager' => 'Betik Yöneticisi',
'Actions' => 'İşlemler',
'Delete' => 'Sil',
'Edit' => 'Düzenle',
'Name' => 'Ad',
'Create New Snippet' => 'Yeni Betik Oluştur',
'New Snippet' => 'Yeni Betik',
'Edit Snippet' => 'Betiği Düzenle',
'Save' => 'Kaydet',
'Save and Exit' => 'Kaydet ve Çık',
'This snippet already exists' => 'Bu betik zaten var',
'This snippet does not exist' => 'Betik bulunamadı',
'Delete snippet: :snippet' => ':snippet adlı betik silinsin mi',
'Snippet content' => 'Betik içeriği',
'Snippet :name deleted' => ':name adlı betik silindi',
'Your changes to the snippet :name have been saved.' => 'Değişiklikleriniz :name adlı betiğe kaydedildi.',
'Required field' => 'Zorunlu alan',
'View Embed Code' => 'Gömülü Kodu Görüntüle',
'Embed Code' => 'Gömülü Kod',
'Shortcode' => 'Kısa Kod',
'PHP Code' => 'PHP Kodu',
'Cancel' => 'Vazgeç',
)
);
================================================
FILE: plugins/box/snippets/languages/uk.lang.php
================================================
array(
'Snippets' => 'Сніпети',
'Snippets manager' => 'Менеджер сніпетів',
'Actions' => 'Дії',
'Delete' => 'Видалити',
'Edit' => 'Редагувати',
'New Snippet' => 'Новий сніпет',
'Create New Snippet' => 'Створити новий сніпет',
'Name' => 'Назва',
'Edit Snippet' => 'Редагування сніпета',
'Save' => 'Зберегти',
'Save and Exit' => 'Зберегти та вийти',
'This snippet already exists' => 'Такий сніпет вже існує',
'This snippet does not exist' => 'Такий сніпет не існує',
'Delete snippet: :block' => 'Видалити сніпет: :snippet',
'Snippet content' => 'Вміст сніпета',
'Snippet :name deleted' => 'Сніпет :name видалено',
'Your changes to the snippet :name have been saved.' => 'Ваші зміни до сніпету :name були збережені.',
'Delete snippet: :snippet' => 'Видалити сніпет: :snippet',
'Required field' => 'Обов’язкове поле',
'View Embed Code' => 'Код для вставки',
'Embed Code' => 'Код для вставки',
'Shortcode' => 'Шорткод',
'PHP Code' => 'PHP код',
'Cancel' => 'Відмінити',
)
);
================================================
FILE: plugins/box/snippets/languages/zh-cn.lang.php
================================================
array(
'Snippets' => '片段',
'Snippets manager' => '片段管理',
'Actions' => '操作',
'Delete' => '删除',
'Edit' => '编辑',
'Name' => '名称',
'Create New Snippet' => '创建新片段',
'New Snippet' => '新建片段',
'Edit Snippet' => '编辑片段',
'Save' => '保存',
'Save and Exit' => '保存并退出',
'This snippet already exists' => '此片段已存在',
'This snippet does not exist' => '此片段不存在',
'Delete snippet: :snippet' => '删除片段: :snippet',
'Snippet content' => '片段内容',
'Snippet :name deleted' => '片段 :name 已删除',
'Your changes to the snippet :name have been saved.' => 'Y您修改的片段 :name 已保存。',
'Delete snippet: :snippet' => '删除片段: :snippet',
'Required field' => '必填字段',
'View Embed Code' => '查看嵌入代码',
'Embed Code' => '嵌入代码',
'Shortcode' => '短代码',
'PHP Code' => 'PHP 代码',
)
);
================================================
FILE: plugins/box/snippets/snippets.admin.php
================================================
:name have been saved.', 'snippets', array(':name' => Security::safeName(Request::post('name')))));
if (Request::post('add_snippets_and_exit')) {
Request::redirect('index.php?id=snippets');
} else {
Request::redirect('index.php?id=snippets&action=edit_snippet&filename='.Security::safeName(Request::post('name')));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Save fields
if (Request::post('name')) $name = Request::post('name'); else $name = '';
if (Request::post('content')) $content = Request::post('content'); else $content = '';
// Display view
View::factory('box/snippets/views/backend/add')
->assign('content', $content)
->assign('name', $name)
->assign('errors', $errors)
->display();
break;
// Edit snippet
// -------------------------------------
case "edit_snippet":
// Save current snippet action
if (Request::post('edit_snippets') || Request::post('edit_snippets_and_exit') ) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('name')) == '') $errors['snippets_empty_name'] = __('Required field', 'snippets');
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');
// Save fields
if (Request::post('content')) $content = Request::post('content'); else $content = '';
if (count($errors) == 0) {
$snippet_old_filename = $snippets_path.Request::post('snippets_old_name').'.snippet.php';
$snippet_new_filename = $snippets_path.Security::safeName(Request::post('name')).'.snippet.php';
if ( ! empty($snippet_old_filename)) {
if ($snippet_old_filename !== $snippet_new_filename) {
rename($snippet_old_filename, $snippet_new_filename);
$save_filename = $snippet_new_filename;
} else {
$save_filename = $snippet_new_filename;
}
} else {
$save_filename = $snippet_new_filename;
}
// Save snippet
File::setContent($save_filename, Request::post('content'));
Notification::set('success', __('Your changes to the snippet :name have been saved.', 'snippets', array(':name' => basename($save_filename, '.snippet.php'))));
if (Request::post('edit_snippets_and_exit')) {
Request::redirect('index.php?id=snippets');
} else {
Request::redirect('index.php?id=snippets&action=edit_snippet&filename='.Security::safeName(Request::post('name')));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));
$content = File::getContent($snippets_path.Request::get('filename').'.snippet.php');
// Display view
View::factory('box/snippets/views/backend/edit')
->assign('content', $content)
->assign('name', $name)
->assign('errors', $errors)
->display();
break;
case "delete_snippet":
if (Security::check(Request::get('token'))) {
File::delete($snippets_path.Request::get('filename').'.snippet.php');
Notification::set('success', __('Snippet :name deleted', 'snippets', array(':name' => File::name(Request::get('filename')))));
Request::redirect('index.php?id=snippets');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
break;
}
} else {
// Get snippets
$snippets_list = File::scan($snippets_path, '.snippet.php');
// Display view
View::factory('box/snippets/views/backend/index')
->assign('snippets_list', $snippets_list)
->display();
}
}
}
================================================
FILE: plugins/box/snippets/snippets.plugin.php
================================================
* echo Snippet::get('snippetname');
* echo Snippet::get('snippetname', array('message' => 'Hello World'));
*
*
* @param string $name Snippet file name
* @param string $vars Vars
* @return string
*/
public static function get($name, $vars = array())
{
$vars['get'] = $name;
return Snippet::_content($vars);
}
/**
* Returns snippet content for shortcode {snippet get="snippetname"}
*
*
* {snippet get="snippetname"}
* {snippet get="snippetname" message="Hello World"}
*
*
* @param array $attributes Array of attributes
* @return string
*/
public static function _content($attributes)
{
// Extracst attributes
extract($attributes);
// Get snippet name
$name = (isset($get)) ? (string) $get : '';
// Get snippet path
$snippet_path = STORAGE . DS . 'snippets' . DS . $name . '.snippet.php';
// Get snippet content
if (File::exists($snippet_path)) {
// Turn on output buffering
ob_start();
// Include view file
include $snippet_path;
// Output...
return ob_get_clean();
} else {
if (Session::exists('admin') && Session::get('admin') == true) {
return __('Snippet :name is not found!', 'snippets', array(':name' => $name));
}
}
}
}
================================================
FILE: plugins/box/snippets/views/backend/add.view.php
================================================
'form-horizontal'))); ?>
(isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'form-control error-field' : 'form-control'))); ?>.snippet.php
'.$errors['snippets_empty_name'].'';
if (isset($errors['snippets_exists'])) echo '';
?>
'width:100%;height:400px;', 'class'=>'source-editor form-control'))
);
?>
'btn btn-phone btn-primary')).Html::nbsp(2).
Form::submit('add_snippets', __('Save', 'snippets'), array('class' => 'btn btn-phone btn-primary')).Html::nbsp(2).
Html::anchor(__('Cancel', 'snippets'), 'index.php?id=snippets', array('title' => __('Cancel', 'snippets'), 'class' => 'btn btn-phone btn-default')).
Form::close()
);
?>
================================================
FILE: plugins/box/snippets/views/backend/edit.view.php
================================================
'form-horizontal')));
echo (Form::hidden('csrf', Security::token()));
echo (Form::hidden('snippets_old_name', Request::get('filename')));
?>
(isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'form-control error-field' : 'form-control'))); ?>.snippet.php
'.$errors['snippets_empty_name'].'';
if (isset($errors['snippets_exists'])) echo '';
?>
'width:100%;height:400px;', 'class' => 'source-editor form-control'))
);
?>
'btn btn-phone btn-primary')).Html::nbsp(2).
Form::submit('edit_snippets', __('Save', 'snippets'), array('class' => 'btn btn-phone btn-primary')). Html::nbsp(2).
Html::anchor(__('Cancel', 'snippets'), 'index.php?id=snippets', array('title' => __('Cancel', 'snippets'), 'class' => 'btn btn-phone btn-default')).
Form::close()
);
} else {
echo '';
}
?>
================================================
FILE: plugins/box/snippets/views/backend/index.view.php
================================================
__('Create New Snippet', 'snippets'), 'class' => 'btn btn-phone btn-primary'))
);
?>
'btn btn-primary')); ?>
'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete snippet: :snippet', 'snippets', array(':snippet' => basename($snippet, '.snippet.php')))."')"));
?>
================================================
FILE: plugins/box/system/install/system.manifest.xml
================================================
plugins/box/system/system.plugin.php
active
4
System
Monstra System plugin
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/system/languages/cs.lang.php
================================================
array(
'System' => 'Systém',
'Published a new version of the :monstra' => 'Byla vydaná nová verze :monstra',
'Sitemap Created' => 'Mapa webu byla vytvořená',
'Create Sitemap' => 'Vytvořit mapu webu',
'on' => 'Zapnout',
'off'=> 'Vypnout',
'Site url' => 'URL webu',
'Maintenance Mode' => 'Údržba webu',
'Maintenance Mode On' => 'Zapnout údržbu webu',
'Maintenance Mode Off' => 'Vypnout údržbu webu',
'Site Settings' => 'Nastavení webu',
'System Settings' => 'Nastavení systému',
'Site Name' => 'Název webu',
'Site Description' => 'Popis webu',
'Site Keywords' => 'Klíčová slova webu',
'Site Slogan' => 'Slogan webu',
'Default Page' => 'Úvodní stránka',
'Time zone' => 'Časové pásmo',
'Language' => 'Jazyk',
'Email' => 'Email',
'Save' => 'Uložit',
'System version' => 'Verze systému',
'System version ID' => 'ID verze systému',
'GZIP' => 'GZIP',
'Debugging' => 'Ladění',
'Plugin API' => 'Plugin API',
'Plugins active' => 'Aktivní pluginy',
'Actions registered' => 'Registrované akce',
'Filters registered' => 'Registrované filtry',
'Core' => 'Jádro',
'Delete Temporary Files' => 'Vymazat dočasné soubory',
'Download the latest version' => 'Stáhnout nejnovější verzi',
'Powered by' => 'Beží na',
'Administration' => 'Administrace',
'Settings' => 'Nastavení',
'Temporary files deleted' => 'Dočasné soubory byly odstraněny',
'Extends' => 'Rozšírení',
'View Site' => 'Zobrazit web',
'Welcome, :username' => 'Vítej, :username',
'Reset Password' => 'Obnovit heslo',
'Back to Website' => 'Zpět na web',
'Forgot your password ?' => 'Zapomněli jste heslo?',
'Administration' => 'Administrace',
'Send New Password' => 'Zaslat nové heslo',
'This user does not exist' => 'Tento uživatel neexistuje',
'Version' => 'Verze',
'Plugin does not exist' => 'Plugin neexistuje',
'Install script writable' => 'Instalační skript je zapisovatelný',
'Install script not writable' => 'Instalační skript není zapisovatelný',
'Directory: :dir writable' => 'Adresář: :dir je zapisovatelný',
'Directory: :dir not writable' => 'Adresář: :dir není zapisovatelný',
'PHP Version' => 'Verze PHP',
'Module DOM is installed' => 'Modul DOM je nainstalovaný',
'Module DOM is required' => 'Modul DOM je vyžadovaný',
'Module Mod Rewrite is installed' => 'Modul Apache Rewrite je nainstalovaný',
'Module SimpleXML is installed' => 'Modul SimpleXML je nainstalovaný',
'PHP 5.2 or greater is required' => 'PHP 5.2 alebo vyšší je vyžadovaný',
'Apache Mod Rewrite is required' => 'Modul Apache Rewrite je vyžadovaný',
'SimpleXML module is required' => 'SimpleXML modul je vyžadovaný',
'Field "Site name" is empty' => 'Políčko "Název webu" je prázdné',
'Field "Email" is empty' => 'Políčko "Email" je prázdné',
'Field "Username" is empty' => 'Políčko "Používateľ" je prázdné',
'Field "Password" is empty' => 'Políčko "Heslo" je prázdné',
'Field "Site url" is empty' => 'Políčko "URL webu" je prázdné',
'Email not valid' => 'Email není ve správném tvaru',
'Install' => 'Instalovat',
'...Monstra says...' => '...Monstra říká...',
'Sitemap file writable' => 'Soubor sitemap je zapisovatelný',
'Sitemap file not writable' => 'Soubor sitemap není zapisovatelný',
'Main .htaccess file writable' => 'Hlavní soubor .htaccess je zapisovatelný',
'Main .htaccess file not writable' => 'Hlavní soubor .htaccess není zapisovatelný',
'Official Support Forum' => 'Oficiální podpora - Fórum',
'Documentation' => 'Dokumentace',
)
);
================================================
FILE: plugins/box/system/languages/de.lang.php
================================================
array(
'System' => 'System',
'Published a new version of the :monstra' => 'Veröffentlicht eine neue Version von :monstra',
'Sitemap created' => 'Sitemap wurde erstellt',
'Create Sitemap' => 'Erstelle Sitemap',
'on' => 'An',
'off'=> 'Aus',
'Site Url' => 'Seiten-URL',
'Maintenance Mode' => 'Wartungsmodus',
'Maintenance Mode On' => 'Wartungsmodus An',
'Maintenance Mode Off' => 'Wartungsmodus Aus',
'Site Settings' => 'Seiteneinstellungen',
'System Settings' => 'Systemeinstellungen',
'Site Name' => 'Seiten-Name',
'Site Description' => 'Seiten-Beschreibung',
'Site Keywords' => 'Seiten-Schlagwörter',
'Site Slogan' => 'Seiten-Slogan',
'Default Page' => 'Standardseite',
'Time zone' => 'Zeitzone',
'Language' => 'Sprache',
'Email' => 'Email',
'Save' => 'Speichern',
'Site' => 'Seite',
'System version' => 'Systemversion',
'System version ID' => 'Systemversions ID',
'GZIP' => 'GZIP',
'Debugging' => 'Fehlerbeseitigung',
'Plugin API' => 'Plugin API',
'Plugins active' => 'Plugins aktiv',
'Actions registered' => 'Aktionen registriert',
'Filters registered' => 'Filter registriert',
'Log Out' => 'Log Out',
'Site' => 'Seite',
'Delete Temporary Files' => 'Temporäre Dateien löschen',
'Download the latest version' => 'Lade die letzte Version herunter',
'Powered by' => 'Powered by',
'Administration' => 'Administration',
'Settings' => 'Einstellungen',
'Temporary files deleted' => 'Temporäre Dateien wurden gelöscht',
'Extends' => 'Erweitert',
'View Site' => 'Seite ansehen',
'Welcome, :username' => 'Willkommen, :username',
'Reset Password' => 'Password zurücksetzen',
'Back to Website' => 'Zurück zur Webseite',
'Forgot your password ?' => 'Passwort vergessen ?',
'Administration' => 'Administration',
'Send New Password' => 'Neues Passwort zusenden',
'This user does not exist' => 'Dieser Benutzer existiert nicht',
'Version' => 'Version',
'Install script writable' => 'Installationsskript beschreibbar',
'Install script not writable' => 'Installationsskript nicht beschreibbar',
'Directory: :dir writable' => 'Ordner: :dir beschreibbar',
'Directory: :dir not writable' => 'Ordner: :dir nicht beschreibbar',
'PHP Version' => 'PHP Version',
'Module DOM is installed' => 'Modul DOM ist installiert',
'Module DOM is required' => 'Modul DOM ist erforderlich',
'Module Mod Rewrite is installed' => 'Modul Mod Rewrite ist installiert',
'Module SimpleXML is installed' => 'Modul SimpleXML ist installiert',
'PHP 5.2 or greater is required' => 'PHP 5.2 oder höher erforderlich',
'Apache Mod Rewrite is required' => 'Apache Mod Rewrite ist erforderlich',
'SimpleXML module is required' => 'SimpleXML-Modul ist erforderlich',
'Field "Site name" is empty' => 'Feld "Seiten-Name" ist leer',
'Field "Email" is empty' => 'Feld "Email" ist leer',
'Field "Username" is empty' => 'Feld "Benutzername" ist leer',
'Field "Password" is empty' => 'Feld "Passwort" ist leer',
'Field "Site url" is empty' => 'Feld "Seiten-URL" ist leer',
'Email not valid' => 'E-Mail ist ungültig',
'Install' => 'Installieren',
'...Monstra says...' => '...Monstra sagt...',
'Sitemap file writable' => 'Sitemap-Datei beschreibbar',
'Sitemap file not writable' => 'Sitemap-Datei ist nicht beschreibbar',
'Main .htaccess file writable' => 'Haupt .htaccess-Datei ist beschreibbar',
'Main .htaccess file not writable' => 'Haupt .htaccess-Datei ist nicht beschreibbar',
'Official Support Forum' => 'Offizielles Support Forum',
'Documentation' => 'Dokumentation',
'Your changes have been saved.' => 'Änderungen wurden gespeichert.',
)
);
================================================
FILE: plugins/box/system/languages/en.lang.php
================================================
array(
'System' => 'System',
'Published a new version of the :monstra' => 'Published a new version of the :monstra',
'Sitemap created' => 'Sitemap created',
'Create Sitemap' => 'Create Sitemap',
'on' => 'on',
'off'=> 'off',
'Site Url' => 'Site Url',
'Maintenance Mode' => 'Maintenance Mode',
'Maintenance Mode On' => 'Maintenance Mode On',
'Maintenance Mode Off' => 'Maintenance Mode Off',
'Site Settings' => 'Site Settings',
'System Settings' => 'System Settings',
'Site Name' => 'Site Name',
'Site Description' => 'Site Description',
'Site Keywords' => 'Site Keywords',
'Site Slogan' => 'Site Slogan',
'Default Page' => 'Default Page',
'Time zone' => 'Time zone',
'Language' => 'Language',
'Email' => 'Email',
'Save' => 'Save',
'Site' => 'Site',
'System version' => 'System version',
'System version ID' => 'System version ID',
'GZIP' => 'GZIP',
'Debugging' => 'Debugging',
'Plugin API' => 'Plugin API',
'Plugins active' => 'Plugins active',
'Actions registered' => 'Actions registered',
'Filters registered' => 'Filters registered',
'Delete Temporary Files' => 'Delete Temporary Files',
'Download the latest version' => 'Download the latest version',
'Powered by' => 'Powered by',
'Administration' => 'Administration',
'Settings' => 'Settings',
'Temporary files deleted' => 'Temporary files deleted',
'Extends' => 'Extends',
'View Site' => 'View Site',
'Welcome, :username' => 'Welcome, :username',
'Reset Password' => 'Reset Password',
'< Back to Website' => '< Back to Website',
'Forgot your password? >' => 'Forgot your password? >',
'Administration >' => 'Administration >',
'Send New Password' => 'Send New Password',
'This user does not exist' => 'This user does not exist',
'Version' => 'Version',
'Plugin does not exist' => 'Plugin does not exist',
'Help' => 'Help',
'Install script writable' => 'Install script writable',
'Install script not writable' => 'Install script not writable',
'Directory: :dir writable' => 'Directory: :dir writable',
'Directory: :dir not writable' => 'Directory: :dir not writable',
'PHP Version' => 'PHP Version',
'Module DOM is installed' => 'Module DOM is installed',
'Module DOM is required' => 'Module DOM is required',
'Module Mod Rewrite is installed' => 'Module Mod Rewrite is installed',
'Module SimpleXML is installed' => 'Module SimpleXML is installed',
'PHP 5.2 or greater is required' => 'PHP 5.2 or greater is required',
'Apache Mod Rewrite is required' => 'Apache Mod Rewrite is required',
'SimpleXML module is required' => 'SimpleXML module is required',
'Field "Site name" is empty' => 'Field "Site name" is empty',
'Field "Email" is empty' => 'Field "Email" is empty',
'Field "Username" is empty' => 'Field "Username" is empty',
'Field "Password" is empty' => 'Field "Password" is empty',
'Field "Site url" is empty' => 'Field "Site url" is empty',
'Email not valid' => 'Email not valid',
'Continue' => 'Continue',
'Install' => 'Install',
'...Monstra says...' => '...Monstra says...',
'Sitemap file writable' => 'Sitemap file writable',
'Sitemap file not writable' => 'Sitemap file not writable',
'Main .htaccess file writable' => 'Main .htaccess file writable',
'Main .htaccess file not writable' => 'Main .htaccess file not writable',
'Official Support Forum' => 'Official Support Forum',
'Documentation' => 'Documentation',
'Your changes have been saved.' => 'Your changes have been saved.',
)
);
================================================
FILE: plugins/box/system/languages/es.lang.php
================================================
array(
'System' => 'Sistema',
'Published a new version of the :monstra' => 'Publicada una nueva versión de :monstra',
'Sitemap created' => 'Mapa del sitio creado',
'Create Sitemap' => 'Crear mapa del sitio',
'on' => 'Activar',
'off'=> 'Desactivar',
'Site Url' => 'URL del sitio',
'Maintenance Mode' => 'Modo mantenimiento',
'Maintenance Mode On' => 'Activar modo mantenimiento',
'Maintenance Mode Off' => 'Desactivar modo mantenimiento',
'Site Settings' => 'Configuración del sitio',
'System Settings' => 'Configuración del sistema',
'Site Name' => 'Nombre del sitio',
'Site Description' => 'Descripción del sitio',
'Site Keywords' => 'Palabras claves del sitio',
'Site Slogan' => 'Lema del sitio',
'Default Page' => 'Página por defecto',
'Time zone' => 'Zona horaria',
'Language' => 'Lenguaje',
'Email' => 'Correo electrónico',
'Save' => 'Guardar',
'Site' => 'Sitio',
'System Version' => 'Versión del sistema',
'System Version ID' => 'ID de versión web',
'GZIP' => 'GZIP',
'Debugging' => 'Depuración',
'Plugin API' => 'Plugin API',
'Plugins active' => 'Plugins activos',
'Actions registered' => 'Acciones registradas',
'Filters registered' => 'Filtros registrados',
'Delete Temporary Files' => 'Eliminar archivos temporales',
'Download the latest version' => 'Descargar versión más reciente',
'Powered by' => 'Powered by',
'Administration' => 'Administración',
'Settings' => 'Configuración',
'Temporary files deleted' => 'Archivos temporales eliminados',
'Extends' => 'Extensiones',
'View Site' => 'Ver sitio web',
'Welcome, :username' => 'Bienvenido, :username',
'Reset Password' => 'Restablecer Contraseña',
'Back to Website' => 'Regresar al sitio web',
'Forgot your password ?' => '¿Olvidaste tu contraseña?',
'Administration >' => 'Administración',
'Send New Password' => 'Enviar nueva contraseña',
'This user does not exist' => 'Este usuario no existe',
'Version' => 'Versión',
'Plugin does not exist' => 'El plugin no existe',
'Help' => 'Ayuda',
'Install script writable' => 'Instalación de scripts accesible',
'Install script not writable' => 'Instalación de scripts no accesible',
'Directory: :dir writable' => 'Directorio: :dir accesible',
'Directory: :dir not writable' => 'Directorio: :dir no accesible',
'PHP Version' => 'Versión PHP',
'Module DOM is installed' => 'El módulo DOM está instalado',
'Module DOM is required' => 'El módulo DOM es requerido',
'Module Mod Rewrite is installed' => 'El módulo Mod Rewrite está instalado',
'Module SimpleXML is installed' => 'El módulo SimpleXML está instalado',
'PHP 5.2 or greater is required' => 'PHP 5.2 o superior es requerido',
'Apache Mod Rewrite is required' => 'Apache Mod Rewrite es requerido',
'SimpleXML module is required' => 'El Módulo SimpleXML es requerido',
'Field "Site name" is empty' => 'El campo "Nombre del sitio" está vacío',
'Field "Email" is empty' => 'El campo "Correo electrónico" está vacío',
'Field "Username" is empty' => 'El campo "Nombre de usuario" está vacío',
'Field "Password" is empty' => 'El campo "Contraseña" está vacío',
'Field "Site url" is empty' => 'El campo "URL del sitio" está vacío',
'Email not valid' => 'El correo electrónico es inválido',
'Continue' => 'Continuar',
'Install' => 'Instalar',
'...Monstra says...' => '...Monstra dice...',
'Sitemap file writable' => 'El archivo del mapa del sitio es accesible',
'Sitemap file not writable' => 'El archivo del mapa del sitio no es accesible',
'Main .htaccess file writable' => 'El archivo principal .htaccess es accesible',
'Main .htaccess file not writable' => 'El archivo principal .htaccess no es accesible',
'Official Support Forum' => 'Foro de Soporte Oficial',
'Documentation' => 'Documentación',
'Your changes have been saved.' => 'Tus cambios han sido guardados.',
)
);
================================================
FILE: plugins/box/system/languages/fa.lang.php
================================================
array(
'System' => 'سیستم',
'Published a new version of the :monstra' => 'نسخه جدید :monstra منتشر شده',
'Sitemap created' => 'نقشه سایت ایجاد شد',
'Create Sitemap' => 'ایجاد نقشه سایت',
'on' => 'روشن',
'off'=> 'خاموش',
'Site Url' => 'آدرس سایت',
'Maintenance Mode' => 'حالت تعمیر و نگهداری',
'Maintenance Mode On' => 'حالت تعمیر و نگهداری روشن',
'Maintenance Mode Off' => 'حالت تعمیر و نگهداری خاموش',
'Site Settings' => 'تنظیمات سایت',
'System Settings' => 'تنظیمات سیستم',
'Site Name' => 'نام سایت',
'Site Description' => 'توضیحات سایت',
'Site Keywords' => 'کلمات کلیدی سایت',
'Site Slogan' => 'شعار سایت',
'Default Page' => 'صفحه پیشفرض',
'Time zone' => 'منطقه زمانی',
'Language' => 'زبان',
'Save' => 'ذخیره',
'Site' => 'سایت',
'System version' => 'نسخه سیستم',
'System version ID' => 'شناسه نسخه سیستم',
'GZIP' => 'GZIP',
'Debugging' => 'اشکال زدائی',
'Plugin API' => 'API پلاگین',
'Plugins active' => 'پلاگینهای فعال',
'Actions registered' => 'عملیات ثبت شده',
'Filters registered' => 'فیلترهای ثبت شده',
'Delete Temporary Files' => 'حذف فایلهای موقت',
'Download the latest version' => 'دانلود جدیدترین نسخه',
'Powered by' => 'قدرت گرفته از',
'Administration' => 'مدیریت',
'Settings' => 'تنظیمات',
'Temporary files deleted' => 'فایلهای موقت حذف شدند',
'Extends' => 'گسترش',
'View site' => 'نمایش سایت',
'Welcome, :username' => 'خوش آمدید ، :username',
'Reset Password' => 'تنظیم مجدد پسورد',
'< Back to Website' => '< بازگشت به وبسایت',
'Forgot your password? >' => 'پسورد خود را فراموش کرده اید؟ >',
'Administration >' => 'مدیریت >',
'Send New Password' => 'ارسال پسورد جدید',
'This user does not exist' => 'این کاربر وجود ندارد',
'Version' => 'نسخه',
'Plugin does not exist' => 'پلاگین وجود ندارد',
'Install script writable' => 'اسکریپت نصب قابل نوشتن میباشد',
'Install script not writable' => 'اسکریپت نصب غیرقابل نوشتن میباشد',
'Directory: :dir writable' => 'شاخه: :dir قابل نوشتن میباشد',
'Directory: :dir not writable' => 'شاخه: :dir غیرقابل نوشتن میباشد',
'PHP Version' => 'نسخه PHP',
'Module DOM is installed' => 'ماژول DOM نصب شده است',
'Module DOM is required' => 'ماژول DOM مورد نیاز است',
'Module Mod Rewrite is installed' => 'ماژول Mod Rewrite نصب شده است',
'Module SimpleXML is installed' => 'ماژول SimpleXML نصب شده است',
'PHP 5.2 or greater is required' => 'PHP 5.2 یا بالاتر مورد نیاز است',
'Apache Mod Rewrite is required' => 'Mod Rewrite آپاچی مورد نیاز است',
'SimpleXML module is required' => 'ماژول SimpleXML مورد نیاز است',
'Field "Site name" is empty' => 'کادر "نام سایت" خالی است',
'Field "Email" is empty' => 'کادر "ایمیل" خالی است',
'Field "Username" is empty' => 'کادر "نام کاربری" خالی است',
'Field "Password" is empty' => 'کادر "پسورد" خالی است',
'Field "Site url" is empty' => 'کادر "آدرس سایت" خالی است',
'Email not valid' => 'ایمیل معتبر نیست',
'Install' => 'نصب',
'...Monstra says...' => '...مونسترا میگوید...',
'Sitemap file writable' => 'فایل نقشه سایت قابل نوشتن میباشد',
'Sitemap file not writable' => 'فایل نقشه سایت غیرقابل نوشتن میباشد',
'Main .htaccess file writable' => 'فایل اصلی .htaccess قابل نوشتن میباشد',
'Main .htaccess file not writable' => 'فایل اصلی .htaccess غیرقابل نوشتن میباشد',
'Official Support Forum' => 'انجمن پشتیبانی',
'Documentation' => 'مستندات',
)
);
================================================
FILE: plugins/box/system/languages/fr.lang.php
================================================
array(
'System' => 'Système',
'Published a new version of the :monstra' => 'Publication d\'une nouvelle version de :monstra',
'Sitemap created' => 'Plan du site créé',
'Create sitemap' => 'Créer un plan du site',
'on' => 'on',
'off'=> 'off',
'Site url' => 'Url du site',
'Maintenance Mode' => 'Mode de maintenance',
'Maintenance Mode On' => 'Mode de maintenance On',
'Maintenance Mode Off' => 'Mode de maintenance Off',
'Site settings' => 'Paramètres du site',
'System settings' => 'Paramètres du système',
'Site name' => 'Nom du site',
'Site description' => 'Description du site',
'Site keywords' => 'Mots clés du site',
'Site slogan' => 'Slogan du site',
'Default page' => 'Page par défaut',
'Time zone' => 'Fuseau horaire',
'Language' => 'Langue',
'Email' => 'Email',
'Save' => 'Enregistrer',
'Site' => 'Site',
'System version' => 'Version du système',
'System version ID' => 'ID de la version du système',
'GZIP' => 'GZIP',
'Debugging' => 'Débogage',
'Plugin API' => 'Plugin API',
'Plugins active' => 'Plugins actifs',
'Actions registered' => 'Actions enregistrées',
'Filters registered' => 'Filtres enregistrées',
'logout' => 'déconnexion',
'site' => 'site',
'Core' => 'Noyau',
'Delete temporary files' => 'Supprimer les fichiers temporaires',
'Download the latest version' => 'Télécharger la dernière version',
'Powered by' => 'Propulsé par',
'Administration' => 'Administration',
'Settings' => 'Paramètres',
'Temporary files deleted' => 'Les fichiers temporaires ont été supprimés',
'Extends' => 'Extensions',
'View site' => 'Voir le site',
'Welcome, :username' => 'Bienvenue, :username',
'Reset Password' => 'Réinitialiser le mot de passe',
'Back to Website' => '< Retour au site',
'Forgot your password ?' => 'Mot de passe oublié ?',
'Administration >' => 'Administration >',
'Send New Password' => 'Envoyer un nouveau mot de passe',
'This user does not exist' => 'Cet utilisateur n\'existe pas',
'Version' => 'Version',
'Plugin does not exist' => 'Ce plugin n\'existe pas',
'Install script writable' => 'Le script d\'installation est accessible en écriture', // pour ' = ’ (a voir)
'Install script not writable' => 'Le script d\'installation n\' est pas accessible en écriture',
'Directory: :dir writable' => 'Répertoire: :dir writable',
'Directory: :dir not writable' => 'Répertoire: :dir pas accessible en écriture',
'PHP Version' => 'Version de PHP',
'Module DOM is installed' => 'Module DOM est installé',
'Module DOM is required' => 'Module DOM est requis',
'Module Mod Rewrite is installed' => 'Module Mod Rewrite est installé',
'Module SimpleXML is installed' => 'Module SimpleXML est installé',
'PHP 5.2 or greater is required' => 'PHP 5.2 ou supérieur est requis',
'Apache Mod Rewrite is required' => 'Apache Mod Rewrite est requis',
'SimpleXML module is required' => 'Le module SimpleXML est requis',
'Field "Site name" is empty' => 'Le champ "Nom du site" est vide',
'Field "Email" is empty' => 'Le champ "Email" est vide',
'Field "Username" is empty' => 'Le champ "Nom d\'utilisateur" est vide',
'Field "Password" is empty' => 'Le champ "Mot de Passe" est vide',
'Field "Site url" is empty' => 'Le champ "Url du site" est vide',
'Email not valid' => 'Email non valide',
'Install' => 'Installer',
'...Monstra says...' => '...Monstra dit...',
'Sitemap file writable' => 'Fichier Sitemap accessible en écriture',
'Sitemap file not writable' => 'Fcihier Sitemap non accessible en écriture',
'Main .htaccess file writable' => 'Fichier .htaccess pricipale accessible en écriture',
'Main .htaccess file not writable' => 'Fichier .htaccess pricipale non accessible en écriture',
'Official Support Forum' => 'Forum Support Officiel',
'Documentation' => 'Documentation',
)
);
================================================
FILE: plugins/box/system/languages/hu.lang.php
================================================
array(
'System' => 'Rendszer',
'Published a new version of the :monstra' => 'Megjelent egy új Monstra változat',
'Sitemap created' => 'Oldaltérkép elkészült',
'Create Sitemap' => 'Oldaltérkép készítése',
'on' => 'be',
'off'=> 'ki',
'Site Url' => 'Weboldal címe (url)',
'Maintenance Mode' => 'Karbantartási mód',
'Maintenance Mode On' => 'Karbantartási mód Be',
'Maintenance Mode Off' => 'Karbantartási mód Ki',
'Site Settings' => 'Weboldal beállítások',
'System Settings' => 'Rendszer beállítások',
'Site Name' => 'Weboldal neve',
'Site Description' => 'Weboldal leírása',
'Site Keywords' => 'Weboldal kulcsszavak',
'Site Slogan' => 'Weboldal szlogen',
'Default Page' => 'Alapértelmezett kezdőoldal',
'Time zone' => 'Időzóna',
'Language' => 'Nyelv',
'Email' => 'Email',
'Save' => 'Mentés',
'Site' => 'Weboldal',
'System version' => 'Rendszer verzió',
'System version ID' => 'Rendszer verziószám',
'GZIP' => 'GZIP',
'Debugging' => 'Hibakeresés',
'Plugin API' => 'Plugin API',
'Plugins active' => 'A Pluginok aktívak',
'Actions registered' => 'Actions registered',
'Filters registered' => 'Filters registered',
'logout' => 'Kilépés',
'site' => 'oldal',
'Core' => 'Core',
'Delete Temporary Files' => 'Az ideiglenes fájlok törlése',
'Download the latest version' => 'Töltse le a legújabb verziót',
'Powered by' => 'Powered by',
'Administration' => 'Adminisztráció',
'Settings' => 'Beállítások',
'Temporary files deleted' => 'Ideiglenes fájlok törölve',
'Extends' => 'Bővítmények',
'View Site' => 'Oldal megtekintése',
'Welcome, :username' => 'Üdvözöllek :username',
'Reset Password' => 'Jelszó Törlése',
'Back to Website' => 'Vissza a weboldalra',
'Forgot your password ?' => 'Elfelejtette a jelszavát ?',
'Administration >' => 'Adminisztráció >',
'Send New Password' => 'Új Jelszó Küldése',
'This user does not exist' => 'Ez a felhasználó nem létezik',
'Version' => 'Verzió',
'Plugin does not exist' => 'Plugin nem létezik',
'Install script writable' => 'Install script írható',
'Install script not writable' => 'Install script nem írható',
'Directory: :dir writable' => 'Directory: :dir írható',
'Directory: :dir not writable' => 'Directory: :dir nem írható',
'PHP Version' => 'PHP Verzió',
'Module DOM is installed' => 'DOM modul telepítve van',
'Module DOM is required' => 'DOM modul szükséges',
'Module Mod Rewrite is installed' => 'Mod Rewrite modul telepítve van',
'Module SimpleXML is installed' => 'SimpleXML modul telepítve van',
'PHP 5.2 or greater is required' => 'PHP 5.2 vagy újabb szükséges',
'Apache Mod Rewrite is required' => 'Apache Mod Rewrite szükséges',
'SimpleXML module is required' => 'SimpleXML modul szükséges',
'Field "Site name" is empty' => 'Mező "Weboldal neve" üres',
'Field "Email" is empty' => 'Mező "Email" üres',
'Field "Username" is empty' => 'Mező "Felhasználónév" üres',
'Field "Password" is empty' => 'Mező "Jelszó" üres',
'Field "Site url" is empty' => 'Mező "Weboldal címe (url)" üres',
'Email not valid' => 'E-mail nem érvényes',
'Install' => 'Telepítés',
'...Monstra says...' => '... Monstra mondja ...',
'Sitemap file writable' => 'Sitemap fájl írható',
'Sitemap file not writable' => 'Sitemap fájl nem írható',
'Main .htaccess file writable' => 'Main .htaccess fájl írható',
'Main .htaccess file not writable' => 'Main .htaccess fájl nem írható',
'Official Support Forum' => 'Hivatalos Fórum',
'Documentation' => 'Dokumentáció',
)
);
================================================
FILE: plugins/box/system/languages/id.lang.php
================================================
array(
'System' => 'System',
'Published a new version of the :monstra' => 'Memuat versi baru dari :monstra',
'Sitemap created' => 'Sitemap dibuat',
'Create Sitemap' => 'Buat Sitemap',
'on' => 'Nyala',
'off'=> 'Mati',
'Site Url' => 'URL Situs',
'Maintenance Mode' => 'Mode Perbaikan',
'Maintenance Mode On' => 'Nyalakan Mode Perbaikan',
'Maintenance Mode Off' => 'Matikan Mode Perbaikan',
'Site Settings' => 'Pengaturan Situs',
'System Settings' => 'Pengaturan Situs',
'Site Name' => 'Nama Situs',
'Site Description' => 'Deskripsi Situs',
'Site Keywords' => 'Kata Kunci Situs',
'Site Slogan' => 'Slogan Situs',
'Default Page' => 'Halaman Standart',
'Time zone' => 'Zona Waktu',
'Language' => 'Bahasa',
'Email' => 'Email',
'Save' => 'Simpan',
'Site' => 'Situs',
'System version' => 'Versi Sistem',
'System version ID' => 'ID Versi Sistem',
'GZIP' => 'GZIP',
'Debugging' => 'Debugging',
'Plugin API' => 'Plugin API',
'Plugins active' => 'Plugins aktif',
'Actions registered' => 'Tindakan telah terdaftar',
'Filters registered' => 'Filter telah terdaftar',
'Log Out' => 'Keluar',
'Site' => 'Situs',
'Delete Temporary Files' => 'Hapus File Sementara',
'Download the latest version' => 'Unduh Versi Terbaru',
'Powered by' => 'Didukung oleh',
'Administration' => 'Administrasi',
'Settings' => 'Pengaturan',
'Temporary files deleted' => 'Hapus File Sementara',
'Extends' => 'Ekstensi',
'View Site' => 'Lihat Situs',
'Welcome, :username' => 'Selamat datang, :username',
'Reset Password' => 'Reset Password',
'Back to Website' => '< Kembali ke Situs Web',
'Forgot your password ?' => 'Lupa Password ?',
'Administration' => 'Administrasi',
'Send New Password' => 'Kirim Password Baru',
'This user does not exist' => 'Pengguna ini tidak terdaftar',
'Version' => 'Versi',
'Install script writable' => 'Skrip Instalasi writable',
'Install script not writable' => 'Skrip Instalasi tidak writable',
'Directory: :dir writable' => 'Direktori: :dir writable',
'Directory: :dir not writable' => 'Direktori: :dir tidak writable',
'PHP Version' => 'Versi PHP',
'Module DOM is installed' => 'Modul DOM telah terpasang',
'Module DOM is required' => 'diperlukan Modul DOM',
'Module Mod Rewrite is installed' => 'Modul Mod Rewrite telah terpasang',
'Module SimpleXML is installed' => 'Modul SimpleXML telah terpasang',
'PHP 5.2 or greater is required' => 'diperlukan PHP 5.2 atau yang lebih baru',
'Apache Mod Rewrite is required' => 'diperlukan Apache Mod Rewrite',
'SimpleXML module is required' => 'diperlukan Modul simpleXML',
'Field "Site name" is empty' => 'Isian "Nama Situs" kosong',
'Field "Email" is empty' => 'Isian "Email" kosong',
'Field "Username" is empty' => 'Isian "Nama Pengguna" kosong',
'Field "Password" is empty' => 'Isian "Password" kosong',
'Field "Site url" is empty' => 'Isian "Situs URL" kosong',
'Email not valid' => 'E-Mail tidak cocok',
'Install' => 'Memasangkan',
'...Monstra says...' => '...Katanya Monstra...',
'Sitemap file writable' => 'File sitemap writable',
'Sitemap file not writable' => 'File sitemap tidak writable',
'Main .htaccess file writable' => 'File .htaccess-Datei writable',
'Main .htaccess file not writable' => 'File .htaccess tidak writable',
'Official Support Forum' => 'Forum Support Resmi',
'Documentation' => 'Dokumentasi',
'Your changes have been saved.' => 'Perubahan Telah Disimpan.',
)
);
================================================
FILE: plugins/box/system/languages/it.lang.php
================================================
array(
'System' => 'Sistema',
'Published a new version of the :monstra' => 'È disponibile una nuova versione :monstra',
'Sitemap created' => 'Sitemap è stata creata',
'Create Sitemap' => 'Crea Sitemap',
'on' => 'on',
'off'=> 'off',
'Site Url' => 'URL del sito',
'Maintenance Mode' => 'Modalità manutenzione',
'Maintenance Mode On' => 'Abilita modalità manutenzione',
'Maintenance Mode Off' => 'Disabilita modalità manutenzione',
'Site Settings' => 'Impostazioni del sito',
'System Settings' => 'Impostazioni di sistema',
'Site Name' => 'Nome del sito',
'Site Description' => 'Descrizione',
'Site Keywords' => 'Parole chiavi',
'Site Slogan' => 'Slogan',
'Default Page' => 'Pagina Predefinita',
'Time zone' => 'Fuso orario',
'Language' => 'Lingua',
'Email' => 'Email',
'Save' => 'Salva',
'System version' => 'Versione del sistema',
'System version ID' => 'ID del sistema',
'GZIP' => 'Compressione GZIP',
'Debugging' => 'Debugging',
'Plugin API' => 'Plugin API',
'Plugins active' => 'Plugin attivi',
'Actions registered' => 'Azioni registrati',
'Filters registered' => 'Filtri registrati',
'Delete Temporary Files' => 'Cancella i file temporanei',
'Download the latest version' => 'Scarica l’ultima versione',
'Powered by' => 'Powered by',
'Administration' => 'Amministrazione',
'Settings' => 'Impostazioni',
'Temporary files deleted' => 'File temporanei eliminati',
'Extends' => 'Estensioni',
'View site' => 'Visita sito',
'Welcome, :username' => 'Benvenuto, :username',
'Reset Password' => 'Resetta la password',
'Back to Website' => 'Vai al sito',
'Forgot your password ?' => 'Dimenticato la password ?',
'Administration >' => 'Amministrazione >',
'Send New Password' => 'Invia la nuova password',
'This user does not exist' => 'Tale utente non esiste',
'Version' => 'Versione',
'Install script writable' => 'Script d’installazione è scrivibile',
'Install script not writable' => 'Script d’installazione non è scrivibile',
'Directory: :dir writable' => 'Directory :dir è scrivibile',
'Directory: :dir not writable' => 'Directory :dir non è scrivibile',
'PHP Version' => 'Versione PHP',
'Module DOM is installed' => 'Modulo DOM installato',
'Module DOM is required' => 'Modulo DOM è richiesto',
'Module Mod Rewrite is installed' => 'Modulo Mod Rewrite installato',
'Module SimpleXML is installed' => 'Modulo SimpleXML installato',
'PHP 5.2 or greater is required' => 'PHP 5.2 o superiore',
'Apache Mod Rewrite is required' => 'Apache Mod Rewrite è richiesto',
'SimpleXML module is required' => 'Modulo SimpleXML è richiesto',
'Field "Site name" is empty' => 'Campo "Nome del sito" è vuoto',
'Field "Email" is empty' => 'Campo "E-mail" è vuoto',
'Field "Username" is empty' => 'Campo "Nome utente" è vuoto',
'Field "Password" is empty' => 'Campo "Password" è vuoto',
'Field "Site url" is empty' => 'Campo "URL del sito" è vuoto',
'Email not valid' => 'E-mail non valido',
'Install' => 'Installa',
'...Monstra says...' => '...Monstra dice...',
'Sitemap file writable' => 'Sitemap file è scrivibile',
'Sitemap file not writable' => 'Sitemap file non è scrivibile',
'Main .htaccess file writable' => 'Principale file .htaccess è scrivibile',
'Main .htaccess file not writable' => 'Principale file .htaccess non è scrivibile',
'Official Support Forum' => 'Official Support Forum',
'Documentation' => 'Documentation',
)
);
================================================
FILE: plugins/box/system/languages/ja.lang.php
================================================
array(
'System' => 'システム',
'Published a new version of the :monstra' => '新しいバージョンの:monstraが公開されています',
'Sitemap created' => 'サイトマップを作成しました',
'Create Sitemap' => 'サイトマップの作成',
'on' => 'オン',
'off'=> 'オフ',
'Site Url' => 'サイトのURL',
'Maintenance Mode' => 'メンテナンスモード',
'Maintenance Mode On' => 'メンテナンスモード On',
'Maintenance Mode Off' => 'メンテナンスモード Off',
'Site Settings' => 'サイトの設定',
'System Settings' => 'システム設定',
'Site Name' => 'サイト名',
'Site Description' => 'サイトの説明',
'Site Keywords' => 'サイトのキーワード',
'Site Slogan' => 'サイトのスローガン',
'Default Page' => 'デフォルトのページ',
'Time zone' => 'タイムゾーン',
'Language' => '言語',
'Email' => 'Eメール',
'Save' => '保存',
'Site' => 'サイト',
'System version' => 'システムバージョン',
'System version ID' => 'システムバージョンID',
'GZIP' => 'GZIP',
'Debugging' => 'デバッグ',
'Plugin API' => 'プラグインAPI',
'Plugins active' => 'Plugins active',
'Actions registered' => 'アクションが登録されました',
'Filters registered' => 'フィルタが登録されました',
'Delete Temporary Files' => 'テンポラリファイルを削除',
'Download the latest version' => '最新バージョンをダウンロード',
'Powered by' => 'Powered by',
'Administration' => '管理者モード',
'Settings' => '設定',
'Temporary files deleted' => 'テンポラリファイルを削除しました',
'Extends' => '拡張',
'View Site' => 'サイトを見る',
'Welcome, :username' => ':usernameさん、ようこそ',
'Reset Password' => 'パスワードのリセット',
'Back to Website' => '< Webサイトに戻る',
'Forgot your password ?' => 'パスワードを忘れましたか? >',
'Administration' => '管理者 >',
'Send New Password' => '新しいパスワードを送信',
'This user does not exist' => 'このユーザーは存在しません',
'Version' => 'バージョン',
'Plugin does not exist' => 'プラグインが存在しません',
'Install script writable' => 'インストールスクリプトは書き込み可能です',
'Install script not writable' => 'インストールスクリプトは書き込み不可能です',
'Directory: :dir writable' => 'ディレクトリ: :dir は書き込み可能です',
'Directory: :dir not writable' => 'ディレクトリ: :dir は書き込み不可能です',
'PHP Version' => 'PHPバージョン',
'Module DOM is installed' => 'DOMモジュールはインストールされています',
'Module DOM is required' => 'DOMモジュールが必要です',
'Module Mod Rewrite is installed' => 'Mod Rewriteモジュールはインストールされています',
'Module SimpleXML is installed' => 'SimpleXMLモジュールはインストールされています',
'PHP 5.2 or greater is required' => 'PHP 5.2以上が必要です',
'Apache Mod Rewrite is required' => 'ApacheのMod Rewriteが必要です',
'SimpleXML module is required' => 'SimpleXMLモジュールが必要です',
'Field "Site name" is empty' => '"サイト名"フィールドが空です',
'Field "Email" is empty' => '"Eメール"フィールドが空です',
'Field "Username" is empty' => '"ユーザー名"フィールドが空です',
'Field "Password" is empty' => '"パスワード"フィールドが空です',
'Field "Site url" is empty' => '"サイトURL"フィールドが空です',
'Email not valid' => '有効なEメールアドレスではありません',
'Install' => 'インストール',
'...Monstra says...' => '...Monstraより...',
'Sitemap file writable' => 'サイトマップファイルは書き込み可能です',
'Sitemap file not writable' => 'サイトマップファイルは書き込み不可能で',
'Main .htaccess file writable' => 'メイン .htaccess ファイルは書き込み可能です',
'Main .htaccess file not writable' => 'メイン .htaccess ファイルは書き込み不可能です',
'Official Support Forum' => 'オフィシャルサポートフォーラム',
'Documentation' => 'ドキュメント',
'Your changes have been saved.' => '変更された設定は保存されました。',
)
);
================================================
FILE: plugins/box/system/languages/ka-ge.lang.php
================================================
array(
'System' => 'სისტემა',
'Published a new version of the :monstra' => 'გამოქვეყნდა ახალი ვერსია :monstra',
'Sitemap created' => 'საიტის რუქა შეიქმნა',
'Create Sitemap' => 'საიტის რუქის შექმნა',
'on' => 'ჩართულია',
'off'=> 'გამორთულია',
'Site Url' => 'საიტის ადრესი',
'Maintenance Mode' => 'ტექნიკური სამუშაოები',
'Maintenance Mode On' => 'ტექნიკური სამუშაობების ჩართვა',
'Maintenance Mode Off' => 'ტექნიკური სამუშაობების. გამორთვა',
'Site Settings' => 'საიტის პარამეტრები',
'System Settings' => 'სისტემის პარამეტრები',
'Site Name' => 'საიტის სახელწოდება',
'Site Description' => 'საიტის აღწერა',
'Site Keywords' => 'საიტის საკვანძო სიტყვები',
'Site Slogan' => 'საიტის სლოგანი',
'Default Page' => 'მთავარი გვერდი',
'Time zone' => 'დროის სარტყელი',
'Language' => 'ენა',
'Email' => 'ელ-ფოსტა',
'Save' => 'დამახსოვრება',
'System version' => 'სისტემის ვერსია',
'System version ID' => 'სისტემის ვერსიის ID',
'GZIP' => 'GZIP',
'Debugging' => 'Debugging',
'Plugin API' => 'პლაგინი API',
'Plugins active' => 'შეერთებული პლაგინები',
'Actions registered' => 'დარეგისტრირებული მოქმედებები',
'Filters registered' => 'დარეგისტრირებული ფილტრები',
'Delete Temporary Files' => 'დროებითი ფაილების წაშლა',
'Download the latest version' => 'ბოლო ვერსიის გადმოწერა',
'Powered by' => 'Powered by',
'Administration' => 'ადმინისტრირება',
'Settings' => 'პარამეტრები',
'Temporary files deleted' => 'დროებითი ფაილები წაშლილია',
'Extends' => 'extend-ები',
'View Site' => 'საიტის ნახვა',
'Welcome, :username' => 'მოგესალმებით, :username',
'Reset Password' => 'პაროლის Reset-ი',
'Back to Website' => 'ვებ გვერდზე დაბრუნება',
'Forgot your password ?' => 'დაგავიწყდათ პაროლი?',
'Administration' => 'ადმინისტრირება',
'Send New Password' => 'ახალი პაროლის გაგზავნა',
'This user does not exist' => 'ესეთი მომხმარებელი არ არსებობს',
'Version' => 'ვერსია',
'Plugin does not exist' => 'პლაგინი არ არსებობს',
'Help' => 'დახმარება',
'Continue' => 'გაგრძელება',
'Install script writable' => 'დასაყენი script-ის წაკითხვა შესაძლებელია',
'Install script not writable' => 'დასაყენი script-ის წაკითხვა შეუძლებელია',
'Directory: :dir writable' => 'დირეკტორია :dir ჩაწერისთვის ხელმისაწვდომია',
'Directory: :dir not writable' => 'დირეკტორია :dir ჩაწერისთვის არ არის ხელმისაწვდომი',
'PHP Version' => 'PHP-ის ვერსია',
'Module DOM is installed' => 'DOM მოდული დაყენებულია',
'Module DOM is required' => 'საჭიროა DOM მოდული',
'Module Mod Rewrite is installed' => 'მოდული Mod Rewrite დაყენებულია',
'Module SimpleXML is installed' => 'მოდული SimpleXML დაყენებულია',
'PHP 5.2 or greater is required' => 'საჭიროა PHP 5.2 ან უფრო ახალი',
'Apache Mod Rewrite is required' => 'საჭიროა Apache Mod Rewrite',
'SimpleXML module is required' => 'საჭიროა SimpleXML მოდული',
'Field "Site name" is empty' => '"საიტის სახელის" ველი არ არის შევსებული',
'Field "Email" is empty' => '"ელ-ფოსტის" ველი არ არის შევსებული',
'Field "Username" is empty' => '"მომხმარებლის სახელის" ველი არ არის შევსებული',
'Field "Password" is empty' => '"პაროლის" ველი არ არის შევსებული',
'Field "Site url" is empty' => '"საიტის ადრესის" ველი არ არის შევსებული',
'Email not valid' => 'ელ-ფოსტა არასწორია',
'Install' => 'დაყენება',
'...Monstra says...' => '...Monstra ამბობს...',
'Sitemap file writable' => 'საიტის რუქის ჩაწერა შესაძლებელია',
'Sitemap file not writable' => 'საიტის რუქის ჩაწერა შეუძლებელია',
'Main .htaccess file writable' => 'მთავარი .htaccess ფაილის ჩაწერა შესაძლებელია',
'Main .htaccess file not writable' => 'მთავარი .htaccess ფაილის ჩაწერა შეუძლებელია',
'Official Support Forum' => 'ოფიციალური დახმარების ფორუმი',
'Documentation' => 'დოკუმენტაცია',
'Your changes have been saved.' => 'თქვენი ცვლილებები შენახულია.',
)
);
================================================
FILE: plugins/box/system/languages/lt.lang.php
================================================
array(
'System' => 'Sistema',
'Published a new version of the :monstra' => 'Išleista nauja :monstra versija',
'Sitemap created' => 'Sitemap sukurtas',
'Create Sitemap' => 'Sukurti sitemap',
'on' => 'įjungti',
'off'=> 'išjungti',
'Site Url' => 'Tinklapio adresas (url)',
'Maintenance Mode' => 'Remonto režimas',
'Maintenance Mode On' => 'Įjungti remonto režimą',
'Maintenance Mode Off' => 'Išjungti remonto režimą',
'Site Settings' => 'Tinklapio nustatymai',
'System Settings' => 'Sistemos nustatymai',
'Site Name' => 'Tinklapio pavadinimas',
'Site Description' => 'Tinklapio aprašymas',
'Site Keywords' => 'Tinklapio raktažodžiai',
'Site Slogan' => 'Tinklapio šūkis',
'Default Page' => 'Pagrindinis puslapis',
'Time zone' => 'Laiko zona',
'Language' => 'Kalba',
'Email' => 'El. paštas',
'Save' => 'Išsaugoti',
'Site' => 'Tinklapis',
'System version' => 'Sistemos versija',
'System version ID' => 'Sistemos versijos ID',
'GZIP' => 'GZIP',
'Debugging' => 'Derinimas',
'Plugin API' => 'Įskiepių API',
'Plugins active' => 'Aktyvūs įskiepiai',
'Actions registered' => 'Veiksmai užregistruoti',
'Filters registered' => 'Filtrai užregistruoti',
'Delete Temporary Files' => 'Trinti laikinas bylas',
'Download the latest version' => 'Atsisiųsti naujausią versiją',
'Powered by' => 'Veikia su',
'Administration' => 'Administravimas',
'Settings' => 'Nustatymai',
'Temporary files deleted' => 'Laikinos bylos ištrintos',
'Extends' => 'Išplėtimas',
'View Site' => 'Peržiūrėti tinklapį',
'Welcome, :username' => 'Sveiki, :username',
'Reset Password' => 'Gauti naują slaptažodį',
'Back to Website' => 'Grįžti į tinklapį',
'Forgot your password ?' => 'Pamišote slaptažodį ?',
'Administration' => 'Administravimas',
'Send New Password' => 'Siųsti naują slaptažodį',
'This user does not exist' => 'Tokio naudotojo nėra',
'Version' => 'Versija',
'Plugin does not exist' => 'Papildinio nėra',
'Install script writable' => 'Galima rašyti į diegimo scenarijų',
'Install script not writable' => 'Negalima rašyti į diegimo scenarijų',
'Directory: :dir writable' => 'Aplankas: galima rašyti į :dir ',
'Directory: :dir not writable' => 'Aplankas: negalima rašyti į :dir ',
'PHP Version' => 'PHP versija',
'Module DOM is installed' => 'DOM modulis yra įdiegtas',
'Module DOM is required' => 'Reikalingas DOM modulis',
'Module Mod Rewrite is installed' => 'Apache Mod Rewrite yra įdiegtas',
'Module SimpleXML is installed' => 'SimpleXML modulis yra įdiegtas',
'PHP 5.2 or greater is required' => 'Reikalingas PHP 5.2 ar naujesnis',
'Apache Mod Rewrite is required' => 'Reikalingas Apache Mod Rewrite',
'SimpleXML module is required' => 'Reikalingas SimpleXML modulis',
'Field "Site name" is empty' => 'Laukas „Tinklapio pavadimas“ yra tuščias',
'Field "Email" is empty' => 'Laukas „El. paštas“ yra tuščias',
'Field "Username" is empty' => 'Laukas „Prisijungimo vardas“ yra tuščias',
'Field "Password" is empty' => 'Laukas „Slaptažodis“ yra tuščias',
'Field "Site url" is empty' => 'Laukas „Tinklapio adresas (url)“ yra tuščias',
'Email not valid' => 'Neteisingas el. pašto adresas',
'Install' => 'Įdiegti',
'...Monstra says...' => '...Monstra sako...',
'Sitemap file writable' => 'Galima rašyti į sitemap bylą',
'Sitemap file not writable' => 'Negalima rašyti į sitemap bylą',
'Main .htaccess file writable' => 'Galima rašyti į pagrindinę .htaccess bylą',
'Main .htaccess file not writable' => 'Negalima rašyti į pagrindinę .htaccess bylą',
'Official Support Forum' => 'Pagalbos forumas',
'Documentation' => 'Dokumentacija',
)
);
================================================
FILE: plugins/box/system/languages/nl.lang.php
================================================
array(
'System' => 'Systeem',
'Published a new version of the :monstra' => 'Een nieuwe versie van :monstra is gepubliceerd',
'Sitemap created' => 'Sitemap is aangemaakt',
'Create Sitemap' => 'Maak sitemap aan',
'on' => 'Aan',
'off'=> 'Uit',
'Site Url' => 'Website URL',
'Maintenance Mode' => 'Onderhoudsmodus',
'Maintenance Mode On' => 'Onderhoudsmodus Aan',
'Maintenance Mode Off' => 'Onderhoudsmodus Uit',
'Site Settings' => 'Website Instellingen',
'System Settings' => 'Systeem Instellingen',
'Site Name' => 'Website Naam',
'Site Description' => 'Website Beschrijving',
'Site Keywords' => 'Website Trefwoorden',
'Site Slogan' => 'Website Slogan',
'Default Page' => 'Standaard Pagina',
'Time zone' => 'Tijdzone',
'Language' => 'Taal',
'Email' => 'Email',
'Save' => 'Opslaan',
'Site' => 'Website',
'System version' => 'Systeemversie',
'System version ID' => 'Systeemversie ID',
'GZIP' => 'GZIP',
'Debugging' => 'Debuggen',
'Plugin API' => 'Plugin API',
'Plugins active' => 'Plugins aktief',
'Actions registered' => 'Acties opgeslagen',
'Filters registered' => 'Filters opgeslagen',
'Log Out' => 'Log uit',
'Site' => 'Website',
'Delete Temporary Files' => 'Verwijder tijdelijke bestanden',
'Download the latest version' => 'Download de laatste versie',
'Powered by' => 'Mogelijk gemaakt door',
'Administration' => 'Beheer',
'Settings' => 'Instellingen',
'Temporary files deleted' => 'Tijdelijke bestanden verwijderd',
'Extends' => 'Uitbreidingen',
'View Site' => 'Bekijk website',
'Welcome, :username' => 'Welkom, :username',
'Reset Password' => 'Wachtwoord opnieuw instellen',
'Back to Website' => 'Terug naar website',
'Forgot your password ?' => 'Wachtwoord vergeten ?',
'Administration' => 'Beheer',
'Send New Password' => 'Verstuur nieuw wachtwoord',
'This user does not exist' => 'Deze gebruiker bestaat niet',
'Version' => 'Versie',
'Install script writable' => 'Installatiescript schrijfbaar',
'Install script not writable' => 'Installatiescript niet schrijfbaar',
'Directory: :dir writable' => 'Map: :dir schrijfbaar',
'Directory: :dir not writable' => 'Map: :dir niet schrijfbaar',
'PHP Version' => 'PHP Versie',
'Module DOM is installed' => 'Modul DOM is geinstalleerd',
'Module DOM is required' => 'Modul DOM is vereist',
'Module Mod Rewrite is installed' => 'Modul Mod Rewrite is geinstalleerd',
'Module SimpleXML is installed' => 'Modul SimpleXML is geinstalleerd',
'PHP 5.2 or greater is required' => 'PHP 5.2 of nieuwer is vereist',
'Apache Mod Rewrite is required' => 'Apache Mod Rewrite is vereist',
'SimpleXML module is required' => 'SimpleXML-Modul is vereist',
'Field "Site name" is empty' => 'Veld "Website naam" is leeg',
'Field "Email" is empty' => 'Veld "Email" is leeg',
'Field "Username" is empty' => 'Veld "Gebruikersnaam" is leeg',
'Field "Password" is empty' => 'Veld "Wachtwoord" is leeg',
'Field "Site url" is empty' => 'Veld "Website-URL" is leeg',
'Email not valid' => 'E-Mail is niet geldig',
'Install' => 'Installeren',
'...Monstra says...' => '...Monstra zegt...',
'Sitemap file writable' => 'Sitemap-bestand schrijfbaar',
'Sitemap file not writable' => 'Sitemap-bestand niet schrijfbaar',
'Main .htaccess file writable' => 'Hoofd .htaccess-bestand schrijfbaar',
'Main .htaccess file not writable' => 'Hoofd .htaccess-bestand niet schrijfbaar',
'Official Support Forum' => 'Officeel ondersteuningsforum',
'Documentation' => 'Documentatie',
)
);
================================================
FILE: plugins/box/system/languages/pl.lang.php
================================================
array(
'System' => 'System',
'Published a new version of the :monstra' => 'Opublikowano nową wersję systemu :monstra',
'Sitemap created' => 'Utworzono mapę witryny',
'Create Sitemap' => 'Utwórz mapę witryny',
'on' => 'włączone',
'off'=> 'wyłączone',
'Site Url' => 'Adres URL witryny',
'Maintenance Mode' => 'Tryb konserwacji',
'Maintenance Mode On' => 'Włącz tryb konserwacji',
'Maintenance Mode Off' => 'Wyłącz tryb konserwacji',
'Site Settings' => 'Ustawienia witryny',
'System Settings' => 'Ustawienia systemu',
'Site Name' => 'Nazwa witryny',
'Site Description' => 'Opis witryny',
'Site Keywords' => 'Słowa kluczowe dla witryny',
'Site Slogan' => 'Dewiza witryny',
'Default Page' => 'Strona domyślna',
'Time zone' => 'Strefa czasowa',
'Language' => 'Język',
'Email' => 'Email',
'Save' => 'Zapisz',
'Site' => 'Witryna',
'System version' => 'Wersja systemu',
'System version ID' => 'Id wersji systemu',
'GZIP' => 'GZIP',
'Debugging' => 'Odpluskwianie',
'Plugin API' => 'API wtyczek',
'Plugins active' => 'Aktywne wtyczki',
'Actions registered' => 'Zarejestrowane akcje',
'Filters registered' => 'Zarejestrowane filtry',
'Delete Temporary Files' => 'Usuń pliki tymczasowe',
'Download the latest version' => 'Pobierz najnowszą wersję',
'Powered by' => 'Napędzane przez',
'Administration' => 'Administracja',
'Settings' => 'Ustawienia',
'Temporary files deleted' => 'Usunięto pliki tymczasowe',
'Extends' => 'Rozszerzenia',
'View Site' => 'Pokaż witrynę',
'Welcome, :username' => 'Witaj, :username',
'Reset Password' => 'Resetuj hasło',
'Back to Website' => 'Wróć do witryny internetowej',
'Forgot your password ?' => 'Nie pamiętasz swojego hasła ?',
'Administration' => 'Administracja',
'Send New Password' => 'Wyślij nowe hasło',
'This user does not exist' => 'Ten użytkownik nie istnieje',
'Version' => 'Wersja',
'Plugin does not exist' => 'Wtyczka nie istnieje',
'Help' => 'Pomoc',
'Install script writable' => 'Skrypt instalacyjny ma możliwość zapisu',
'Install script not writable' => 'Skrypt instalacyjny nie ma możliwości zapisu',
'Directory: :dir writable' => 'Katalog: :dir z możliwością zapisu',
'Directory: :dir not writable' => 'Katalog: :dir bez możliwości zapisu',
'PHP Version' => 'Wersja PHP',
'Module DOM is installed' => 'Moduł DOM jest zainstalowany',
'Module DOM is required' => 'Moduł DOM jest wymagany',
'Module Mod Rewrite is installed' => 'Moduł Mod Rewrite jest zainstalowany',
'Module SimpleXML is installed' => 'Moduł SimpleXML jest zainstalowany',
'PHP 5.2 or greater is required' => 'Wymagane jest PHP 5.2 lub nowsze',
'Apache Mod Rewrite is required' => 'Apache Mod Rewrite jest wymagany',
'SimpleXML module is required' => 'Moduł SimpleXML jest wymagany',
'Field "Site name" is empty' => 'Pole "Nazwa witryny" jest puste',
'Field "Email" is empty' => 'Pole "Email" jest puste',
'Field "Username" is empty' => 'Pole "Nazwa użytkownika" jest puste',
'Field "Password" is empty' => 'Pole "Hasło" jest puste',
'Field "Site url" is empty' => 'Pole "URL witryny" jest puste',
'Email not valid' => 'Email jest nieprawidłowy',
'Continue' => 'Kontynuuj',
'Install' => 'Instaluj',
'...Monstra says...' => '...Monstra mówi...',
'Sitemap file writable' => 'Plik mapy witryny ma możliwość zapisu',
'Sitemap file not writable' => 'Plik mapy witryny nie ma możliwości zapisu',
'Main .htaccess file writable' => 'Główny plik .htaccess ma możliwość zapisu',
'Main .htaccess file not writable' => 'Główny plik .htaccess nie ma możliwości zapisu',
'Official Support Forum' => 'Wsparcie oficjalnego forum',
'Documentation' => 'Dokumentacja',
'Your changes have been saved.' => 'Twoje zmiany zostały zapisane.',
)
);
================================================
FILE: plugins/box/system/languages/pt-br.lang.php
================================================
array(
'System' => 'Sistema',
'Published a new version of the :monstra' => 'Foi publicada uma nova versão do :monstra',
'Sitemap created' => 'Mapa do site criado',
'Create Sitemap' => 'Criar mapa do site',
'on' => 'on',
'off'=> 'off',
'Site url' => 'URL do site',
'Maintenance Mode' => 'Modo de manutenção',
'Maintenance Mode On' => 'Modo de manutenção online',
'Maintenance Mode Off' => 'Modo de manutenção offline',
'Site Settings' => 'Configurações do site',
'System Settings' => 'Configurações do sistema',
'Site Name' => 'Nome do site',
'Site Description' => 'Descrição do site',
'Site Keywords' => 'Keywords do site',
'Site Slogan' => 'Slogan do site',
'Default Page' => 'Página padrão',
'Time zone' => 'Timezone padrão',
'Language' => 'Linguagem',
'Email' => 'Email',
'Save' => 'Salvar',
'System version' => 'Versão do sistema',
'System version ID' => 'ID (longo) da versão do sistema',
'GZIP' => 'GZIP',
'Debugging' => 'Debugando',
'Plugin API' => 'API do Plugin',
'Plugins active' => 'Plugins ativos',
'Actions registered' => 'Ações registradas',
'Filters registered' => 'Filtros registrados',
'Delete Temporary Files' => 'Deletar arquivo temporário',
'Download the latest version' => 'Baixar a última versão',
'Powered by' => 'Feito com',
'Administration' => 'Administração',
'Settings' => 'Configurações',
'Temporary files deleted' => 'Arquivos temporários deletados',
'Extends' => 'Extender',
'View Site' => 'Ver Site',
'Welcome, :username' => 'Olá, :username',
'Reset Password' => 'Resetar senha',
'Back to Website' => 'Voltar para o site',
'Forgot your password ?' => 'Esqueceu sua senha ?',
'Administration' => 'Administração',
'Send New Password' => 'Enviar nova senha',
'This user does not exist' => 'Este usuário não existe',
'Version' => 'Versão',
'Install script writable' => 'Script de instalação com permissões de escrita',
'Install script not writable' => 'Script de instalação sem permissões de escrita',
'Directory: :dir writable' => 'Diretório: :dir com permissões de escrita',
'Directory: :dir not writable' => 'Diretório: :dir sem permissões de escrita',
'PHP Version' => 'Versão do PHP',
'Module DOM is installed' => 'O módulo DOM está instalado',
'Module DOM is required' => 'O módulo DOM é necessário',
'Module Mod Rewrite is installed' => 'O módulo mod_rewrite está instalado',
'Module SimpleXML is installed' => 'O module SimpleXML está instalado',
'PHP 5.2 or greater is required' => 'A versão do PHP precisa ser acima da 5.2.*',
'Apache Mod Rewrite is required' => 'O módulo mod_rewrite do apache é requerido',
'SimpleXML module is required' => 'o módulo SimpleXML é requerido',
'Field "Site name" is empty' => 'O campo "Nome do site" está vazio',
'Field "Email" is empty' => 'O campo "Email" está vazio',
'Field "Username" is empty' => 'O campo "Usuário" está vazio',
'Field "Password" is empty' => 'O campo "Senha" está vazio',
'Field "Site url" is empty' => 'O campo "URL do site" está vazio',
'Email not valid' => 'Email inválido',
'Install' => 'Instalar',
'...Monstra says...' => '... O Monstra diz ...',
'Sitemap file writable' => 'O arquivo \'sitemap.xml\' tem permissões de escrita',
'Sitemap file not writable' => 'O arquivo \'sitemap.xml\' não tem permissões de escrita',
'Main .htaccess file writable' => 'O arquivo .htaccess principal tem permissões de escrita',
'Main .htaccess file not writable' => 'O arquivo .htacces principal não tem permissões de escrita',
'Official Support Forum' => 'Official Support Forum',
'Documentation' => 'Documentation',
)
);
================================================
FILE: plugins/box/system/languages/ru.lang.php
================================================
array(
'System' => 'Система',
'Published a new version of the :monstra' => 'Опубликована новая версия :monstra',
'Sitemap created' => 'Карта сайта создана',
'Create Sitemap' => 'Создать карту сайта',
'on' => 'включен',
'off'=> 'выключен',
'Site Url' => 'Адрес сайта',
'Maintenance Mode' => 'Тех. обслуживание',
'Maintenance Mode On' => 'Включить тех. обслуживание',
'Maintenance Mode Off' => 'Выключить тех. обслуживание',
'Site Settings' => 'Настройки сайта',
'System Settings' => 'Настройки системы',
'Site Name' => 'Название сайта',
'Site Description' => 'Описание сайта',
'Site Keywords' => 'Ключевые слова',
'Site Slogan' => 'Слоган',
'Default Page' => 'Страница по умолчанию',
'Time zone' => 'Временная зона',
'Language' => 'Язык',
'Email' => 'Эл. почта',
'Save' => 'Сохранить',
'System version' => 'Версия системы',
'System version ID' => 'Версия системы ID',
'GZIP' => 'Cжатие GZIP',
'Debugging' => 'Дебаггинг',
'Plugin API' => 'Plugin API',
'Plugins active' => 'Подключенные плагины',
'Actions registered' => 'Зарегистрированные экшны',
'Filters registered' => 'Зарегистрированные фильтры',
'Delete Temporary Files' => 'Удалить временные файлы',
'Download the latest version' => 'Скачать последнюю версию',
'Powered by' => 'Работает на',
'Administration' => 'Администрирование',
'Settings' => 'Настройки',
'Temporary files deleted' => 'Временные файлы удалены',
'Extends' => 'Расширения',
'View Site' => 'Сайт',
'Welcome, :username' => 'Добро пожаловать, :username',
'Reset Password' => 'Сброс пароля',
'Back to Website' => 'Вернуться на сайт',
'Forgot your password ?' => 'Забыли пароль ?',
'Administration' => 'Администрирование',
'Send New Password' => 'Отправить новый пароль',
'This user does not exist' => 'Такого пользователя не существует',
'Version' => 'Версия',
'Plugin does not exist' => 'Такого плагина не существует',
'Help' => 'Помощь',
'Continue' => 'Продолжить',
'Install script writable' => 'Установочный скрипт доступен для записи',
'Install script not writable' => 'Установочный скрипт не доступен для записи',
'Directory: :dir writable' => 'Директория :dir доступна для записи',
'Directory: :dir not writable' => 'Директория :dir не доступна для записи',
'PHP Version' => 'Версия PHP',
'Module DOM is installed' => 'Модуль DOM установлен',
'Module DOM is required' => 'Требуется DOM модуль',
'Module Mod Rewrite is installed' => 'Модуль Mod Rewrite установлен',
'Module SimpleXML is installed' => 'Модуль SimpleXML установлен',
'PHP 5.2 or greater is required' => 'PHP 5.2 или высше',
'Apache Mod Rewrite is required' => 'Требуется Apache Mod Rewrite',
'SimpleXML module is required' => 'Требуется SimpleXML модуль',
'Field "Site name" is empty' => 'Поле "Название сайта" не заполнено',
'Field "Email" is empty' => 'Поле "Эл. почта" не заполнено',
'Field "Username" is empty' => 'Поле "Имя пользователя" не заполнено',
'Field "Password" is empty' => 'Поле "Пароль" не заполнено',
'Field "Site url" is empty' => 'Поле "Адрес сайта" не заполнено',
'Email not valid' => 'Эл. почта недействительна',
'Install' => 'Установить',
'...Monstra says...' => '...Monstra говорит...',
'Sitemap file writable' => 'Карта сайта доступна для записи',
'Sitemap file not writable' => 'Карта сайта не доступна для записи',
'Main .htaccess file writable' => 'Главный .htaccess файл доступен для записи',
'Main .htaccess file not writable' => 'Главный .htaccess файл не доступен для записи',
'Official Support Forum' => 'Официальный Форум Поддержки',
'Documentation' => 'Документация',
'Your changes have been saved.' => 'Ваши изменения сохранены.',
)
);
================================================
FILE: plugins/box/system/languages/sk.lang.php
================================================
array(
'System' => 'Systém',
'Published a new version of the :monstra' => 'Bola vydaná nová verzia :monstra',
'Sitemap Created' => 'Mapa webstránky bola vytvorená',
'Create Sitemap' => 'Vytvoriť mapu webstránky',
'on' => 'Zapnúť',
'off'=> 'Vypnúť',
'Site url' => 'URL Webstránky',
'Maintenance Mode' => 'Údržba webstránky',
'Maintenance Mode On' => 'Zapnúť údržbu webstránky',
'Maintenance Mode Off' => 'Vypnúť údržbu webstránky',
'Site Settings' => 'Nastavenia webstránky',
'System Settings' => 'Nastavenia systému',
'Site Name' => 'Názov webstránky',
'Site Description' => 'Popis webstránky',
'Site Keywords' => 'Kľúčové slová webstránky',
'Site Slogan' => 'Slogan webstránky',
'Default Page' => 'Základná stránka - Default page',
'Time zone' => 'Časové pásmo',
'Language' => 'Jazyk',
'Email' => 'Email',
'Save' => 'Uložiť',
'System version' => 'Verzia systému',
'System version ID' => 'ID verzie systému',
'GZIP' => 'GZIP',
'Debugging' => 'Ladenie',
'Plugin API' => 'Plugin API',
'Plugins active' => 'Aktívne pluginy',
'Actions registered' => 'Registrované akcie',
'Filters registered' => 'Registrované filtre',
'Core' => 'Jadro',
'Delete Temporary Files' => 'Vymazať dočasné súbory',
'Download the latest version' => 'Stiahnuť najnovšiu verziu',
'Powered by' => 'Beží na',
'Administration' => 'Administrácia',
'Settings' => 'Nastavenia',
'Temporary files deleted' => 'Dočasné súbory boli vymazané',
'Extends' => 'Rozšírenia',
'View Site' => 'Zobraziť webstránku',
'Welcome, :username' => 'Vitaj, :username',
'Reset Password' => 'Obnoviť heslo',
'Back to Website' => 'Späť na webstránku',
'Forgot your password ?' => 'Zabudli ste heslo ?',
'Administration' => 'Administrácia',
'Send New Password' => 'Zaslať nové heslo',
'This user does not exist' => 'Tento používateľ neexistuje',
'Version' => 'Verzia',
'Plugin does not exist' => 'Plugin neexistuje',
'Install script writable' => 'Inštalačný skript je zapisovateľný',
'Install script not writable' => 'Inštalačný skript nie je zapisovateľný',
'Directory: :dir writable' => 'Priečinok: :dir je zapisovateľný',
'Directory: :dir not writable' => 'Priečinok: :dir nie je zapisovateľný',
'PHP Version' => 'Verzia PHP',
'Module DOM is installed' => 'Modul DOM je nainštalovaný',
'Module DOM is required' => 'Modul DOM je požadovaný',
'Module Mod Rewrite is installed' => 'Modul Apache Rewrite je nainštalovaný',
'Module SimpleXML is installed' => 'Modul SimpleXML je nainštalovaný',
'PHP 5.2 or greater is required' => 'PHP 5.2 alebo vyšší je požadovaný',
'Apache Mod Rewrite is required' => 'Modul Apache Rewrite je požadovaný',
'SimpleXML module is required' => 'SimpleXML modul je požadovaný',
'Field "Site name" is empty' => 'Políčko "Názov webstránky" je prázdne',
'Field "Email" is empty' => 'Políčko "Email" je prázdne',
'Field "Username" is empty' => 'Políčko "Používateľ" je prázdne',
'Field "Password" is empty' => 'Políčko "Heslo" je prázdne',
'Field "Site url" is empty' => 'Políčko "URL webstránky" je prázdne',
'Email not valid' => 'Email nie je v správnom tvare',
'Install' => 'Inštalovať',
'...Monstra says...' => '...Monstra hovorí...',
'Sitemap file writable' => 'Súbor sitemap je zapisovateľný',
'Sitemap file not writable' => 'Súbor sitemap nie je zapisovateľný',
'Main .htaccess file writable' => 'Hlavný súbor .htaccess je zapisovateľný',
'Main .htaccess file not writable' => 'Hlavný súbor .htaccess nie je zapisovateľný',
'Official Support Forum' => 'Oficiálna podpora - Fórum',
'Documentation' => 'Dokumentácia',
)
);
================================================
FILE: plugins/box/system/languages/sr.lang.php
================================================
array(
'System' => 'Sistem',
'Published a new version of the :monstra' => 'Objavili smo novu verziju :monstr-e',
'Sitemap created' => 'Mapa sajta je Kreirana!!!',
'Create sitemap' => 'Kreiraj Mapu sajta',
'on' => 'uključeno',
'off'=> 'isključeno',
'Site url' => 'URL sajta',
'Maintenance Mode' => 'Mod Održavanja',
'Maintenance Mode On' => 'Uključi Mod Održavanja',
'Maintenance Mode Off' => 'Isključi Mod Održavanja',
'Site settings' => 'Podešavanja sajta',
'System settings' => 'Podešavanja sistema',
'Site name' => 'Ime sajta',
'Site description' => 'Opis sajta',
'Site keywords' => 'Ključne reči sajta',
'Site slogan' => 'Slogan sajta',
'Default page' => 'Početna stranica',
'Time zone' => 'Vremenska zona',
'Language' => 'Jezik',
'Email' => 'Email',
'Save' => 'Sačuvaj',
'Site' => 'Sajt',
'System version' => 'Sistemska verzija',
'System version ID' => 'ID sistemske verzije',
'GZIP' => 'GZIP',
'Debugging' => 'Odklanjanje grešaka',
'Plugin API' => 'Dodatak API',
'Plugins active' => 'Aktivni Dodaci',
'Actions registered' => 'Akcije su registrovane',
'Filters registered' => 'Filteri su registrovani',
'logout' => 'Izloguj se',
'site' => 'Sajt',
'Core' => 'Sistem',
'Delete temporary files' => 'Obriši privremene datoteke',
'Download the latest version' => 'Preuzmi poslednju verziju',
'Powered by' => 'Pokreće',
'Administration' => 'Administracija',
'Settings' => 'Podesavanja',
'Temporary files deleted' => 'Privremeni fajlovi obrisani',
'Extends' => 'Proširenja',
'View site' => 'Pogledaj sajt',
'Welcome, :username' => 'Dobrodošao, :username',
'Reset Password' => 'Resetuj šifru',
'Back to Website' => 'Nazad da websajt',
'Forgot your password ?' => 'Zaboravio si svoju šifru ?',
'Administration' => 'Administracija',
'Send New Password' => 'Pošalji novu šifru',
'This user does not exist' => 'Ovaj korisnik ne postoji',
'Version' => 'Verzija',
'Plugin does not exist' => 'Ovaj Dodatak ne postoji',
'Install script writable' => 'Instaliranje skripte',
'Install script not writable' => 'Nemoguće je instalirati skriptu',
'Directory: :dir writable' => 'Direktorijum: :dir dozvoljen za pisanje',
'Directory: :dir not writable' => 'Direktorijum: :dir nije dozvoljen za posanje',
'PHP Version' => 'PHP Verzija',
'Module DOM is installed' => 'Modul DOM je instaliran',
'Module DOM is required' => 'Modul DOM je Potreban',
'Module Mod Rewrite is installed' => 'Modul Mod Rewrite je instaliran',
'Module SimpleXML is installed' => 'Modul SimpleXML je instaliran',
'PHP 5.2 or greater is required' => 'PHP 5.2 ili noviji je potreban',
'Apache Mod Rewrite is required' => 'Apache Mod Rewrite je potreban',
'SimpleXML module is required' => 'SimpleXML modul je potreban',
'Field "Site name" is empty' => 'Polje "Site name" je prazno',
'Field "Email" is empty' => 'Polje "Email" je prazno',
'Field "Username" is empty' => 'Polje "Username" je prazno',
'Field "Password" is empty' => 'Polje "Password" je prazno',
'Field "Site url" is empty' => 'Polje "Site url" je prazno',
'Email not valid' => 'Email nije validan',
'Install' => 'Instaliraj',
'...Monstra says...' => '...Monstra kaže...',
'Sitemap file writable' => 'Sitemap Fajl je dozvoljen za pisanje',
'Sitemap file not writable' => 'Sitemap Fajl nije dozvoljen za pisanje',
'Main .htaccess file writable' => 'Glavni .htaccess je dozvoljen za pisanje',
'Main .htaccess file not writable' => 'Glavni .htaccess nije dozvoljen za pisanje',
'Official Support Forum' => 'Zvaničan forum podrške',
'Documentation' => 'Dokumentacija',
)
);
================================================
FILE: plugins/box/system/languages/tr.lang.php
================================================
array(
'System' => 'Sistem',
'Published a new version of the :monstra' => ':monstra için yeni bir sürüm yayınlandı.',
'Sitemap created' => 'Site haritası oluşturuldu.',
'Create Sitemap' => 'Site Haritası Oluştur',
'on' => 'açık',
'off'=> 'kapalı',
'Site Url' => 'Site Url\'si',
'Maintenance Mode' => 'Bakım Modu',
'Maintenance Mode On' => 'Bakım Modunu Aç',
'Maintenance Mode Off' => 'Bakım Modunu Kapat',
'Site Settings' => 'Site Ayarları',
'System Settings' => 'Sistem Ayarları',
'Site Name' => 'Site Adı',
'Site Description' => 'Site Açıklaması',
'Site Keywords' => 'Site Anahtar Sözcükleri',
'Site Slogan' => 'Site Sloganı',
'Default Page' => 'Açılış Sayfası',
'Time zone' => 'Zaman Dilimi',
'Language' => 'Dil',
'Email' => 'E-posta',
'Save' => 'Kaydet',
'Site' => 'Site',
'System version' => 'Sistem sürümü',
'System version ID' => 'Sistem sürüm ID',
'GZIP' => 'GZIP',
'Debugging' => 'Hata Ayıklama',
'Plugin API' => 'Eklenti API\'si',
'Plugins active' => 'Etkin eklentiler',
'Actions registered' => 'Kayıtlı eylemler',
'Filters registered' => 'Kayıtlı filtreler',
'Delete Temporary Files' => 'Geçici Dosyaları Sil',
'Download the latest version' => 'En güncel sürümü indir',
'Powered by' => 'Geliştiren:',
'Administration' => 'Yönetim',
'Settings' => 'Ayarlar',
'Temporary files deleted' => 'Geçici dosyalar silindi',
'Extends' => 'Uzantılar',
'View Site' => 'Siteyi Gör',
'Welcome, :username' => 'Hoş geldin, :username',
'Reset Password' => 'Parola Sıfırla',
'< Back to Website' => '< Siteye Dön',
'Forgot your password? >' => 'Parolanızı unuttunuz mu? >',
'Administration >' => 'Yönetim >',
'Send New Password' => 'Yeni Parola Gönder',
'This user does not exist' => 'Bu kullanıcı bulunamadı',
'Version' => 'Sürüm',
'Plugin does not exist' => 'Eklenti bulunamadı',
'Help' => 'Yardım',
'Install script writable' => 'Kurulum betiği, yazma izinlerine sahip',
'Install script not writable' => 'Kurulum betiği, yazma izinlerine sahip değil',
'Directory: :dir writable' => ' :dir dizini, yazma izinlerine sahip',
'Directory: :dir not writable' => ' :dir dizini, yazma izinlerine sahip değil',
'PHP Version' => 'PHP Sürümü',
'Module DOM is installed' => 'DOM modülü kurulu',
'Module DOM is required' => 'DOM modülü gerekiyor',
'Module Mod Rewrite is installed' => 'Mod Rewrite modülü kurulu',
'Module SimpleXML is installed' => 'SimpleXML modülü kurulu',
'PHP 5.2 or greater is required' => 'PHP 5.2 ya da sonrası gerekiyor',
'Apache Mod Rewrite is required' => 'Apache Mod Rewrite gerekiyor',
'SimpleXML module is required' => 'SimpleXML modülü gerekiyor',
'Field "Site name" is empty' => '"Site Adı" alanı boş',
'Field "Email" is empty' => '"E-posta" alanı boş',
'Field "Username" is empty' => '"Kullanıcı Adı" alanı boş',
'Field "Password" is empty' => '"Parola" alanı boş',
'Field "Site url" is empty' => '"Site Url\'si" alanı boş',
'Email not valid' => 'E-posta adresi geçersiz',
'Continue' => 'Devam et',
'Install' => 'Yükle',
'...Monstra says...' => '...Monstra diyor ki...',
'Sitemap file writable' => 'Site haritası dosyası, yazma izinlerine sahip',
'Sitemap file not writable' => 'Site haritası dosyası, yazma izinlerine sahip değil',
'Main .htaccess file writable' => 'Ana dizindeki .htaccess dosyası, yazma izinlerine sahip',
'Main .htaccess file not writable' => 'Ana dizindeki .htaccess dosyası, yazma izinlerine sahip değil',
'Official Support Forum' => 'Resmi Destek Forumu',
'Documentation' => 'Belgeler',
'Your changes have been saved.' => 'Değişiklikleriniz kaydedildi.',
)
);
================================================
FILE: plugins/box/system/languages/uk.lang.php
================================================
array(
'System' => 'Система',
'Published a new version of the :monstra' => 'Опублікована нова версія :monstra',
'Sitemap created' => 'Мапа сайту створена',
'Create Sitemap' => 'Створити мапу сайту',
'on' => 'увімкнено',
'off'=> 'вимкнено',
'Site Url' => 'Адреса сайту',
'Maintenance Mode' => 'Технічне обслуговування',
'Maintenance Mode On' => 'Увімкнути технічне обслуговування',
'Maintenance Mode Off' => 'Вимкнути технічне обслуговування',
'Site Settings' => 'Налаштування сайту',
'System Settings' => 'Налаштування системи',
'Site Name' => 'Назва сайту',
'Site Description' => 'Опис сайту',
'Site Keywords' => 'Ключові слова',
'Site Slogan' => 'Слоган (гасло)',
'Default Page' => 'Сторінка за замовчуванням',
'Time zone' => 'Часовий пояс',
'Language' => 'Мова',
'Email' => 'Електронна пошта (Email)',
'Save' => 'Зберегти',
'Site' => 'Сайт',
'System version' => 'Версія системи',
'System version ID' => 'Версія системи ID',
'GZIP' => 'Стиснення GZIP',
'Debugging' => 'Дебаггінг',
'Plugin API' => 'Плагін API',
'Plugins active' => 'Підключені плагіни',
'Actions registered' => 'Зареєстровані дії',
'Filters registered' => 'Зареєстровані фільтри',
'Delete Temporary Files' => 'Видалити тимчасові файли',
'Download the latest version' => 'Завантажити останню версію',
'Powered by' => 'Працює на',
'Administration' => 'Адміністрування',
'Settings' => 'Налаштування',
'Temporary files deleted' => 'Тимчасові файли видалені',
'Extends' => 'Розширення',
'View Site' => 'Сайт',
'Welcome, :username' => 'Ласкаво просимо, :username',
'Reset Password' => 'Скидання пароля',
'Back to Website' => 'Повернутися на сайт',
'Forgot your password ?' => 'Не пам’ятаєте пароль ?',
'Administration' => 'Адміністрування',
'Send New Password' => 'Надіслати новий пароль',
'This user does not exist' => 'Такого користувача не існує',
'Version' => 'Версія',
'Plugin does not exist' => 'Такий плагін не існує',
'Help' => 'Довідка',
'Install script writable' => 'Інсталяційний скрипт доступний для запису',
'Install script not writable' => 'Інсталяційний скрипт не доступний для запису',
'Directory: :dir writable' => 'Директорія :dir доступна для запису',
'Directory: :dir not writable' => 'Директорія :dir не доступна для запису',
'PHP Version' => 'Версія PHP',
'Module DOM is installed' => 'Модуль DOM встановлено',
'Module DOM is required' => 'Потрібен DOM модуль',
'Module Mod Rewrite is installed' => 'Модуль Mod Rewrite встановлено',
'Module SimpleXML is installed' => 'Модуль SimpleXML встановлено',
'PHP 5.2 or greater is required' => 'PHP 5.2 або вище',
'Apache Mod Rewrite is required' => 'Потрібен Apache Mod Rewrite',
'SimpleXML module is required' => 'Потрібен SimpleXML модуль',
'Field "Site name" is empty' => 'Поле "Назва сайту" не заповнено',
'Field "Email" is empty' => 'Поле "Ел. пошта" не заповнено',
'Field "Username" is empty' => 'Поле "Ім’я користувача" не заповнено',
'Field "Password" is empty' => 'Поле "Пароль" не заповнено',
'Field "Site url" is empty' => 'Поле "Адреса сайту" не заповнено',
'Email not valid' => 'Ел. пошта не дійсна',
'Continue' => 'Продовжити',
'Install' => 'Інсталювати',
'...Monstra says...' => '... Monstra каже ...',
'Sitemap file writable' => 'Карта сайту доступна для запису',
'Sitemap file not writable' => 'Карта сайту не доступна для запису',
'Main .htaccess file writable' => 'Головний .htaccess файл - доступний для запису',
'Main .htaccess file not writable' => 'Головний .htaccess файл - не доступний для запису',
'Official Support Forum' => 'Офіційний Форум Підтримки',
'Documentation' => 'Документація',
'Your changes have been saved.' => 'Ваші зміни були збережені.',
)
);
================================================
FILE: plugins/box/system/languages/zh-cn.lang.php
================================================
array(
'System' => '系统管理',
'Published a new version of the :monstra' => '发布一个新版本 :monstra',
'Sitemap created' => '网站地图已创建',
'Create Sitemap' => '创建网站地图',
'on' => '开',
'off'=> '关',
'Site Url' => '网站 Url',
'Maintenance Mode' => '维护模式',
'Maintenance Mode On' => '维护模式开',
'Maintenance Mode Off' => '维护模式关',
'Site Settings' => '网站设置',
'System Settings' => '系统设置',
'Site Name' => '网站名称',
'Site Description' => '网站描述',
'Site Keywords' => '文章关键词',
'Site Slogan' => '网站口号',
'Default Page' => '默认页面',
'Time zone' => '时区',
'Language' => '语言',
'Email' => '邮箱',
'Save' => '保存',
'Site' => '网站',
'System version' => '系统版本',
'System version ID' => '系统版本 ID',
'GZIP' => 'GZIP',
'Debugging' => '调试',
'Plugin API' => '插件 API',
'Plugins active' => '插件激活',
'Actions registered' => '注册操作',
'Filters registered' => '注册过滤',
'Delete Temporary Files' => '删除临时文件',
'Download the latest version' => '下载最新的版本',
'Powered by' => '技术支持',
'Administration' => '后台管理',
'Settings' => '设置',
'Temporary files deleted' => '临时文件已删除',
'Extends' => '扩展管理',
'View Site' => '查看网站',
'Welcome, :username' => '欢迎, :username',
'Reset Password' => '重设密码',
'Back to Website' => '返回网站',
'Forgot your password ?' => '忘记密码 ?',
'Administration' => '管理',
'Send New Password' => '发送新密码',
'This user does not exist' => '此用户不存在',
'Version' => '版本',
'Plugin does not exist' => '插件不存在',
'Install script writable' => '安装脚本可写',
'Install script not writable' => '安装脚本不可写',
'Directory: :dir writable' => '目录: :dir 可写',
'Directory: :dir not writable' => '目录: :dir 不可写',
'PHP Version' => 'PHP 版本',
'Module DOM is installed' => '模块 DOM 已安装',
'Module DOM is required' => '模块 DOM 是必需的',
'Module Mod Rewrite is installed' => '模块 Mod Rewrite 已安装',
'Module SimpleXML is installed' => '模块 SimpleXML 已安装',
'PHP 5.2 or greater is required' => '必须是 PHP 5.2 或更高版本',
'Apache Mod Rewrite is required' => '必须开启 Apache Mod Rewrite',
'SimpleXML module is required' => '必须开启 SimpleXML 模块',
'Field "Site name" is empty' => '"网站名称" 字段为空',
'Field "Email" is empty' => '"邮箱地址" 字段为空',
'Field "Username" is empty' => '"用户名" 字段为空',
'Field "Password" is empty' => '"密码" 字段为空',
'Field "Site url" is empty' => '"网站 url" 字段为空',
'Email not valid' => '邮箱地址无效',
'Install' => '安装',
'...Monstra says...' => '...Monstra 提示...',
'Sitemap file writable' => '网站地图文件可写',
'Sitemap file not writable' => '网站地图文件不可写',
'Main .htaccess file writable' => '主要 .htaccess 文件可写',
'Main .htaccess file not writable' => '主要 .htaccess 文件不可写',
'Official Support Forum' => '官方支持论坛',
'Documentation' => '文档',
'Your changes have been saved.' => '您的更改已保存。',
)
);
================================================
FILE: plugins/box/system/system.admin.php
================================================
$.getJSON("http://monstra.org/api/version.php?jsoncallback=?",
function(data){
var current_monstra_version = "'.Monstra::VERSION.'";
var stable_monstra_version = data.version;
if (current_monstra_version < stable_monstra_version) {
$("#update-monstra").addClass("alert alert-info").html("'.__("Published a new version of the :monstra", "system", array(":monstra" => "Monstra")).'");
}
}
);
');
}
/**
* System Admin
*/
class SystemAdmin extends Backend
{
/**
* System plugin admin
*/
public static function main()
{
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
$filters = Filter::$filters;
$plugins = Plugin::$plugins;
$components = Plugin::$components;
$actions = Action::$actions;
// Get pages table
$pages = new Table('pages');
// Get system timezone
$system_timezone = Option::get('timezone');
// Get languages files
$language_files = File::scan(PLUGINS_BOX . DS . 'system' . DS . 'languages' . DS, '.lang.php');
foreach ($language_files as $language) {
$parts = explode('.', $language);
$languages_array[$parts[0]] = I18n::$locales[$parts[0]];
}
// Get all pages
$pages_array = array();
$pages_list = $pages->select('[slug!="error404" and parent="" and status="published"]');
foreach ($pages_list as $page) {
$pages_array[$page['slug']] = Html::toText($page['title']);
}
// Create Sitemap
// -------------------------------------
if (Request::get('sitemap') == 'create') {
if (Security::check(Request::get('token'))) {
Notification::set('success', __('Sitemap created', 'system'));
Sitemap::create();
Request::redirect('index.php?id=system');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Delete temporary files
// -------------------------------------
if (Request::get('temporary_files') == 'delete') {
if (Security::check(Request::get('token'))) {
Monstra::cleanTmp();
if (count(File::scan(MINIFY, array('css', 'js', 'php'))) == 0 && count(Dir::scan(CACHE)) == 0) {
Notification::set('success', __('Temporary files deleted', 'system'));
Request::redirect('index.php?id=system');
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Set maintenance state on or off
// -------------------------------------
if (Request::get('maintenance')) {
if (Security::check(Request::get('token'))) {
if ('on' == Request::get('maintenance')) {
Option::update('maintenance_status', 'on');
Request::redirect('index.php?id=system');
}
if ('off' == Request::get('maintenance')) {
Option::update('maintenance_status', 'off');
Request::redirect('index.php?id=system');
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Edit settings
// -------------------------------------
if (Request::post('edit_settings')) {
if (Security::check(Request::post('csrf'))) {
// Add trailing slashes
$_site_url = Request::post('system_url');
Option::update(array('sitename' => Request::post('site_name'),
'keywords' => Request::post('site_keywords'),
'description' => Request::post('site_description'),
'slogan' => Request::post('site_slogan'),
'defaultpage' => Request::post('site_default_page'),
'siteurl' => $_site_url,
'timezone' => Request::post('system_timezone'),
'system_email' => Request::post('system_email'),
'language' => Request::post('system_language'),
'maintenance_message' => Request::post('site_maintenance_message')));
Notification::set('success', __('Your changes have been saved.', 'system'));
Request::redirect('index.php?id=system');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Its mean that you can add your own actions for this plugin
Action::run('admin_system_extra_actions');
// Display view
View::factory('box/system/views/backend/index')
->assign('pages_array', $pages_array)
->assign('languages_array', $languages_array)
->display();
} else {
Request::redirect('index.php?id=users&action=edit&user_id='.Session::get('user_id'));
}
}
}
================================================
FILE: plugins/box/system/system.plugin.php
================================================
Session::get('user_login'))), 'top', 'users&action=edit&user_id='.Session::get('user_id'), 1, Navigation::TOP, false);
Navigation::add(__('View Site', 'system'), 'top', Option::get('siteurl'), 2, Navigation::TOP, true);
Navigation::add(__('Log Out', 'users'), 'top', '&logout=do', 3, Navigation::TOP, false);
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
Navigation::add(__('Settings', 'system'), 'system', 'system', 1);
}
}
Plugin::Admin('system', 'box');
================================================
FILE: plugins/box/system/views/backend/index.view.php
================================================
'btn btn-phone btn-default')).Html::nbsp(2); ?>
'btn btn-phone btn-default')).Html::nbsp(2); ?>
'btn btn-phone btn-default')); ?>
'btn btn-phone btn-danger')); ?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control', 'style' => 'height:160px;'))
);
?>
'btn btn-phone btn-primary')).
Form::close()
);
?>
================================================
FILE: plugins/box/themes/install/themes.manifest.xml
================================================
plugins/box/themes/themes.plugin.php
active
3
Themes
Themes managment plugin
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/themes/languages/cs.lang.php
================================================
array(
'Themes' => 'Témata',
'Themes manager' => 'Manažer témat',
'Select Theme' => 'Vybrat téma',
'Save' => 'Uložit',
'Save and Exit' => 'Uložit a ukončit',
'Name' => 'Název',
'Create New Template' => 'Vytvořit nové téma',
'New Template' => 'Nová téma',
'Delete template: :name' => 'Vymazat téma: :name',
'Delete chunk: :name' => 'Vymazat sekci: :name',
'Delete styles: :name' => 'Vymazat CSS styl: :name',
'Templates' => 'Témy',
'Clone' => 'Klonovat',
'Edit' => 'Editovat',
'Delete' => 'Vymazat',
'Actions' => 'Akcie',
'Create New Chunk' => 'Vytvořit novou sekci',
'New Chunk' => 'Nová sekce',
'Chunks' => 'Sekce',
'Create New Styles' => 'Vytvořit nový CSS styl',
'New Styles' => 'Nový CSS styl',
'Styles' => 'CSS styly',
'Template content' => 'Obsah tématu',
'Styles content' => 'Obsah CSS stylu',
'Chunk content' => 'Obsah sekce',
'Edit Template' => 'Editovat téma',
'Edit Chunk' => 'Editovat sekci',
'Edit Styles' => 'Editovat CSS styl',
'Current Site Theme' => 'Aktuální téma webu',
'Current admin theme' => 'Aktuální téma administrace',
'This template already exists' => 'Toto téma již existuje',
'This chunk already exists' => 'Tato sekce již existuje',
'This styles already exist' => 'Tento CSS styl již existuje',
'Components templates' => 'Téma komponentů',
'Your changes to the chunk :name have been saved.' => 'Vaše změny v sekci :name byly uloženy.',
'Your changes to the styles :name have been saved.' => 'Vaše změny v CSS stylu :name byly uloženy.',
'Your changes to the template :name have been saved.' => 'Vaše změny v tématu :name byly uloženy.',
'Chunk :name deleted' => 'Sekce :name odstraněna',
'Required field' => 'Povinné políčko',
'Scripts' => 'Skripty',
'Site Theme' => 'Téma webu',
'Admin Theme' => 'Téma administrace',
'Create New Script' => 'Vytvořit nový skript',
'Script content' => 'Obsah skriptu',
'New Script' => 'Nový skript',
'Edit Script' => 'Editovat skript',
)
);
================================================
FILE: plugins/box/themes/languages/de.lang.php
================================================
array(
'Themes' => 'Themes',
'Themes manager' => 'Themes Manager',
'Select Theme' => 'Wähle Theme',
'Save' => 'Speichern',
'Save and Exit' => 'Speichern und Schließen',
'Name' => 'Name',
'Create New Template' => 'Erstelle neues Template',
'New Template' => 'Neues Template',
'Admin Theme' => 'Admin Theme',
'Delete template: :name' => 'Lösche Template: :name',
'Delete chunk: :name' => 'Lösche Chunk: :name',
'Delete styles: :name' => 'Lösche Styles: :name',
'Templates' => 'Templates',
'Clone' => 'Klonen',
'Edit' => 'Bearbeiten',
'Delete' => 'Löschen',
'Actions' => 'Aktionen',
'Create New Chunk' => 'Erstelle neuen chunk',
'New Chunk' => 'Neuer Chunk',
'Chunks' => 'Chunks',
'Create New Styles' => 'Erstelle neue Styles',
'New Styles' => 'Neue Styles',
'Styles' => 'Styles',
'Template content' => 'Template Inhalt',
'Styles content' => 'Styles Inhalt',
'Chunk content' => 'Chunk Inhalt',
'Edit Template' => 'Bearbeite Template',
'Edit Chunk' => 'Bearbeite Chunk',
'Edit Styles' => 'Bearbeite Styles',
'Current Site Theme' => 'Aktuelles Seiten Template',
'Current admin theme' => 'Aktuelles Admin Template',
'This template already exists' => 'Dieses Template existiert bereits',
'This chunk already exists' => 'Dieser Chunk exisitert bereits',
'This styles already exists' => 'Diese Styles existieren bereits',
'Components templates' => 'Komponenten Templates',
'Your changes to the chunk :name have been saved.' => 'Deine Änderungen für das Chunk :name wurden gespeichert.',
'Your changes to the styles :name have been saved.' => 'Deine Änderungen für die Styles :name wurden gespeichert.',
'Your changes to the template :name have been saved.' => 'Deine Änderungen für das Template :name wurden gespeichert.',
'Chunk :name deleted' => 'Chunk :name deleted',
'This field should not be empty' => 'Dieses Feld darf nicht leer sein.',
'Scripts' => 'Scripts',
'Create New Script' => 'Erstelle neues Script',
'Script content' => 'Script Inhalt',
'New Script' => 'Neues Script',
'Edit Script' => 'Bearbeite Script',
'Site Theme' => 'Seiten Theme',
)
);
================================================
FILE: plugins/box/themes/languages/en.lang.php
================================================
array(
'Themes' => 'Themes',
'Themes manager' => 'Themes manager',
'Select Theme' => 'Select Theme',
'Save' => 'Save',
'Save and Exit' => 'Save and Exit',
'Name' => 'Name',
'Create New Template' => 'Create New Template',
'New Template' => 'New Template',
'Delete template: :name' => 'Delete template: :name',
'Delete chunk: :name' => 'Delete chunk: :name',
'Delete styles: :name' => 'Delete styles: :name',
'Templates' => 'Templates',
'Clone' => 'Clone',
'Edit' => 'Edit',
'Delete' => 'Delete',
'Actions' => 'Actions',
'Admin Theme' => 'Admin Theme',
'Create New Chunk' => 'Create New Chunk',
'New Chunk' => 'New Chunk',
'Chunks' => 'Chunks',
'Create New Styles' => 'Create New Styles',
'New Styles' => 'New Styles',
'Styles' => 'Styles',
'Template content' => 'Template content',
'Styles content' => 'Styles content',
'Chunk content' => 'Chunk content',
'Edit Template' => 'Edit Template',
'Edit Chunk' => 'Edit Chunk',
'Edit Styles' => 'Edit Styles',
'Current Site Theme' => 'Current Site Theme',
'Current admin theme' => 'Current admin theme',
'This template already exists' => 'This template already exists',
'This chunk already exists' => 'This chunk already exists',
'This styles already exist' => 'This styles already exists',
'Components templates' => 'Components templates',
'Your changes to the chunk :name have been saved.' => 'Your changes to the chunk :name have been saved.',
'Your changes to the styles :name have been saved.' => 'Your changes to the styles :name have been saved.',
'Your changes to the template :name have been saved.' => 'Your changes to the template :name have been saved.',
'Chunk :name deleted' => 'Chunk :name deleted',
'Required field' => 'Required field',
'Scripts' => 'Scripts',
'Create New Script' => 'Create New Script',
'Script content' => 'Script content',
'New Script' => 'New Script',
'Edit Script' => 'Edit Script',
'Site Theme' => 'Site Theme',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/themes/languages/es.lang.php
================================================
array(
'Themes' => 'Temas',
'Themes manager' => 'Administrador de temas',
'Select Theme' => 'Seleccionar tema',
'Save' => 'Guardar',
'Save and Exit' => 'Guardar y salir',
'Name' => 'Nombre',
'Create New Template' => 'Crear nueva plantilla',
'New Template' => 'Nueva plantilla',
'Delete template: :name' => 'Eliminar plantilla: :name',
'Delete chunk: :name' => 'Eliminar chunk: :name',
'Delete styles: :name' => 'Eliminar estilo: :name',
'Templates' => 'Plantillas',
'Clone' => 'Clonar',
'Edit' => 'Editar',
'Delete' => 'Eliminar',
'Actions' => 'Acciones',
'Create New Chunk' => 'Crear nuevo chunk',
'New Chunk' => 'Nuevo chunk',
'Chunks' => 'Chunks',
'Create New Styles' => 'Crear nuevo estilo',
'New Styles' => 'Nuevo estilo',
'Styles' => 'Estilos',
'Template content' => 'Contenido de la plantilla',
'Styles content' => 'Contenido del estilo',
'Chunk content' => 'Contenido del chunk',
'Edit Template' => 'Editar plantilla',
'Edit Chunk' => 'Editar chunk',
'Edit Styles' => 'Editar estilo',
'Site Theme' => 'Tema del sitio',
'Admin Theme' => 'Tema del backend',
'Current Site Theme' => 'Tema actual del sitio',
'Current admin theme' => 'Tema actual de administración',
'This template already exists' => 'Esta plantilla ya existe',
'This chunk already exists' => 'Este chunk ya existe',
'This styles already exist' => 'Este estilo ya existe',
'Components templates' => 'Componentes de plantillas',
'Your changes to the chunk :name have been saved.' => 'Tus cambios realizados en el chunk :name han sido guardados.',
'Your changes to the styles :name have been saved.' => 'Tus cambios realizados en el estilo :name han sido guardados.',
'Your changes to the template :name have been saved.' => 'Tus cambios realizados en la plantilla :name han sido guardados.',
'Chunk :name deleted' => 'Chunk :name eliminado',
'Template :name deleted' => 'Plantilla :name eliminada',
'Styles :name deleted' => 'Estilo :name eliminado',
'Required field' => 'Dato requerido',
'Scripts' => 'Scripts',
'Create New Script' => 'Crear nuevo script',
'Script content' => 'Contenido del script',
'New Script' => 'Nuevo script',
'Edit Script' => 'Editar script',
'Site Theme' => 'Tema del sitio',
'Cancel' => 'Cancelar',
)
);
================================================
FILE: plugins/box/themes/languages/fa.lang.php
================================================
array(
'Themes' => 'پوسته',
'Themes manager' => 'مدیریت پوسته',
'Select Theme' => 'انتخاب پوسته',
'Save' => 'ذخیره',
'Save and Exit' => 'ذخیره و خروج',
'Name' => 'نام',
'Create New Template' => 'ایجاد قالب جدید',
'New Template' => 'قالب جدید',
'Delete template: :name' => 'حذف قالب: :name',
'Delete chunk: :name' => 'حذف قسمت: :name',
'Delete styles: :name' => 'حذف استایل: :name',
'Templates' => 'قالب ها',
'Clone' => 'کپی برداری',
'Edit' => 'ویرایش',
'Delete' => 'حذف',
'Actions' => 'عملیات',
'Admin Theme' => 'قالب مدیریت',
'Create New Chunk' => 'ایجاد قسمت جدید',
'New Chunk' => 'قسمت جدید',
'Chunks' => 'قسمتها',
'Create New Styles' => 'ایجاد استایل جدید',
'New Styles' => 'استایل جدید',
'Styles' => 'استایل',
'Template content' => 'محتوی قالب',
'Styles content' => 'محتوی استایل',
'Chunk content' => 'محتوی قسمت',
'Edit Template' => 'ویرایش قالب',
'Edit Chunk' => 'ویرایش قسمت',
'Edit Styles' => 'ویرایش استایل',
'Current site theme' => 'پوسته فعلی سایت',
'Current admin theme' => 'پوسته فعلی مدیریت',
'This template already exists' => 'این قالب هم اکنون موجود است',
'This chunk already exists' => 'این قسمت هم اکنون موجود است',
'This styles already exist' => 'این استایل هم اکنون موجود است',
'Components templates' => 'قالب کامپوننت',
'Your changes to the chunk :name have been saved.' => 'تغییرات شما بر روی قسمت :name ذخیره شد.',
'Your changes to the styles :name have been saved.' => 'تغییرات شما بر روی استایل :name ذخیره شد.',
'Your changes to the template :name have been saved.' => 'تغییرات شما بر روی قالب :name ذخیره شد.',
'Chunk :name deleted' => 'Chunk :name deleted',
'Required field' => 'کادرهای الزامی',
'Scripts' => 'اسکریپت ها',
'Create New Script' => 'ایجاد اسکریپت جدید',
'Script content' => 'اسکریپت محتوا',
'New Script' => 'اسکریپت جدید',
'Edit Script' => 'ویرایش اسکریپت',
)
);
================================================
FILE: plugins/box/themes/languages/fr.lang.php
================================================
array(
'Themes' => 'Thèmes',
'Themes manager' => 'Gestionnaire de thèmes',
'Select theme' => 'Sélectionner un thème',
'Save' => 'Enregistrer',
'Save and exit' => 'Enregistrer et sortir',
'Name' => 'Nom',
'Create new template' => 'Créer un nouveau modèle',
'New template' => 'Nouveau modèle',
'Delete template: :name' => 'Supprimer le modèle :name',
'Delete chunk: :name' => 'Supprimer le chunk: :name', // pièce ou composants
'Delete styles: :name' => 'Supprimer les styles: :name',
'Templates' => 'Mdèles',
'Clone' => 'Clone',
'Edit' => 'Editer',
'Delete' => 'Supprimer',
'Actions' => 'Actions',
'Create new chunk' => 'Créer un nouveau chunk',
'New chunk' => 'Nouveau chunk',
'Chunks' => 'Chunks',
'Create new styles' => 'Créer de nouveaux styles',
'New styles' => 'Nouveaux styles',
'Styles' => 'Styles',
'Template content' => 'Contenu du modèle',
'Styles content' => 'Contenu des styles',
'Chunk content' => 'Contenu du chunk',
'Edit template' => 'Editer le modèle',
'Edit chunk' => 'Editer le chunk',
'Edit styles' => 'Editer les styles',
'Current site theme' => 'Thème actuel du site',
'Current admin theme' => 'Thème actuel de l\'admin',
'This template already exists' => 'Ce modèle existe déjà',
'This chunk already exists' => 'Ce chunk existe déjà',
'This styles already exist' => 'Ce style existe déjà',
'Components templates' => 'modèles de composants',
'Your changes to the chunk :name have been saved.' => 'Les modifications apportées au chunk :name ont été enregistrées.',
'Your changes to the styles :name have been saved.' => 'Les modifications apportées au styles :name ont été enregistrées.',
'Your changes to the template :name have been saved.' => 'Les modifications apportées au modèle :name ont été enregistrées.',
'Chunk :name deleted' => 'Chunk :name deleted',
'Required field' => 'Champs requis',
'Scripts' => 'Scripts',
'Create new script' => 'Créer un nouveau script',
'Script content' => 'contenu du script',
'New script' => 'Nouveau script',
'Edit script' => 'Editer le script',
)
);
================================================
FILE: plugins/box/themes/languages/hu.lang.php
================================================
array(
'Themes' => 'Sablonok',
'Themes manager' => 'Sablonkezelő',
'Select Theme' => 'Sablon választás',
'Save' => 'Mentés',
'Save and Exit' => 'Mentés és Kilépés',
'Name' => 'Név',
'Create New Template' => 'Új Sablon Készítése',
'New Template' => 'Új Sablon',
'Delete template: :name' => 'Sablon törölve: :name',
'Delete chunk: :name' => 'Chunk törölve: :name',
'Delete styles: :name' => 'Styles törölve: :name',
'Templates' => 'Sablonok',
'Clone' => 'Klón',
'Edit' => 'Szerkeszt',
'Delete' => 'Törlés',
'Actions' => 'Műveletek',
'Admin Theme' => 'Admin Sablon',
'Create New Chunk' => 'Új Chunk készítése',
'New Chunk' => 'Új Chunk',
'Chunks' => 'Chunks',
'Create New Styles' => 'Új Styles készítése',
'New Styles' => 'Új Styles',
'Styles' => 'Styles',
'Template content' => 'Sablon tartalma',
'Styles content' => 'Styles tartalma',
'Chunk content' => 'Chunk tartalma',
'Edit Template' => 'Sablon szerkesztése',
'Edit Chunk' => 'Chunk szerkesztése',
'Edit Styles' => 'Styles szerkesztése',
'Current Site Theme' => 'Jelenlegi Oldal Sablon',
'Current admin theme' => 'Jelenlegi admin Sablon',
'This template already exists' => 'Ez a sablon már létezik',
'This chunk already exists' => 'Ez a chunk már létezik',
'This styles already exist' => 'Ez a styles már létezik',
'Components templates' => 'Components sablonok',
'Your changes to the chunk :name have been saved.' => 'A chunk :name változtatásai mentve.',
'Your changes to the styles :name have been saved.' => 'A styles :name változtatásai mentve.',
'Your changes to the template :name have been saved.' => 'A sablon :name változtatásai mentve.',
'Chunk :name deleted' => 'Chunk :name deleted',
'Required field' => 'Kötelező mező',
'Scripts' => 'Szkriptek',
'Create New Script' => 'Új Szkript Készítése',
'Script content' => 'Szkript tartalma',
'New Script' => 'Új Szkript',
'Edit Script' => 'Szkript Szerkesztése',
)
);
================================================
FILE: plugins/box/themes/languages/id.lang.php
================================================
array(
'Themes' => 'Tema',
'Themes manager' => 'Pengelolaan Tema',
'Select Theme' => 'Pilih Tema',
'Save' => 'Simpan',
'Save and Exit' => 'Simpan dan Keluar',
'Name' => 'Nama',
'Create New Template' => 'Buat Template Baru',
'New Template' => 'Template Baru',
'Delete template: :name' => 'Hapus Template: :name',
'Delete chunk: :name' => 'Hapus chunk: :name',
'Delete styles: :name' => 'Hapus model: :name',
'Templates' => 'Template',
'Clone' => 'Duplikasi',
'Edit' => 'Perbaiki',
'Delete' => 'Hapus',
'Actions' => 'Tindakan',
'Create New Chunk' => 'Buat Chunk Baru',
'New chunk' => 'Chunk Baru',
'Chunks' => 'chunks',
'Create New Styles' => 'Buat Model Baru',
'New Styles' => 'Model Baru',
'Styles' => 'Model',
'Template Content' => 'Isi Template',
'Styles Content' => 'Model Template',
'Chunk content' => 'Isi Chunk',
'Edit Cemplate' => 'Perbaiki Template',
'Edit Chunk' => 'Perbaiki Chunk',
'Edit Styles' => 'Perbaiki Model',
'Site Theme' => 'Tema Situs',
'Admin Theme' => 'Tema Admin',
'Current Site Theme' => 'Tema Situs Sekarang',
'Current Admin Theme' => 'Tema Admin Sekarang',
'This template already exists' => 'Template ini sudah ada',
'This chunk already exists' => 'Chunk ini sudah ada',
'This styles already exist' => 'Model ini sudah ada',
'Components Templates' => 'Komponen template',
'Your changes to the chunk :name have been saved.' => 'Perubahan pada chunk :name telah disimpan.',
'Your changes to the styles :name have been saved.' => 'Perubahan pada model :name telah disimpan.',
'Your changes to the template :name have been saved.' => 'Perubahan pada template :name telah disimpan.',
'Chunk :name deleted' => 'Chunk :name deleted',
'Required field' => 'Isian yang Diperlukan',
'Scripts' => 'Skrip',
'Create New Script' => 'Buat Skrip Baru',
'Script Content' => 'Isi Skrip',
'New Script' => 'Skrip Baru',
'Edit Script' => 'Perbaiki Skrip',
)
);
================================================
FILE: plugins/box/themes/languages/it.lang.php
================================================
array(
'Themes' => 'Temi',
'Themes manager' => 'Gestione temi',
'Select Theme' => 'Scegli tema',
'Save' => 'Salva',
'Name' => 'Nome',
'Save and Exit' => 'Salva ed esci',
'Create New Template' => 'Crea nuovo modello',
'New Template' => 'Nuovo modello',
'Delete template: :name' => 'Elimina modello: :name',
'Delete chunk: :name' => 'Elimina chunk: :name',
'Delete styles: :name' => 'Elimina stili: :name',
'Templates' => 'Templates',
'Clone' => 'Duplica',
'Edit' => 'Modifica',
'Delete' => 'Elimina',
'Actions' => 'Azioni',
'Create New Chunk' => 'Crea nuovo chunk',
'New Chunk' => 'Nuovo chunk',
'Chunks' => 'Chunks',
'Create New Styles' => 'Crea nuovi stili',
'New Styles' => 'Nuovi stili',
'Styles' => 'Stili',
'Template content' => 'Contenuto del modello',
'Styles content' => 'Contenuto dei stili',
'Chunk content' => 'Contenuto del chunk',
'Edit Template' => 'Modifica modello',
'Edit Chunk' => 'Modifica chunk',
'Edit Styles' => 'Modifica stili',
'Site Theme' => 'Tema del sito',
'Admin Theme' => 'Tema del backend',
'Current Site Theme' => 'Tema corrente del sito',
'Current admin theme' => 'Tema corrente del backend',
'This template already exists' => 'Tale modello già esistente',
'This chunk already exists' => 'Tale chunk già esistente',
'This styles already exist' => 'Tale stili già esistenti',
'Components templates' => 'Modello dei componenti',
'Your changes to the chunk :name have been saved.' => 'Le modifiche al chunk :name sono state salvate',
'Your changes to the styles :name have been saved.' => 'Le modifiche ai stili :name sono state salvate',
'Your changes to the template :name have been saved.' => 'Le modifiche al modello :name sono state salvate',
'Chunk :name deleted' => 'Chunk :name deleted',
'Required field' => 'Campo obbligatorio',
'Scripts' => 'Script',
'Create New Script' => 'Crea nuovo script',
'Script content' => 'Contenuto dello script',
'New Script' => 'Nuovo script',
'Edit Script' => 'Modifica script',
)
);
================================================
FILE: plugins/box/themes/languages/ja.lang.php
================================================
array(
'Themes' => 'テーマ',
'Themes manager' => 'テーマの管理',
'Select Theme' => 'テーマの選択',
'Save' => '保存',
'Save and Exit' => '保存して終了',
'Name' => '名前',
'Create New Template' => '新規テンプレートの作成',
'New Template' => '新規テンプレート',
'Delete template: :name' => 'テンプレートの削除: :name',
'Delete chunk: :name' => 'チャンクの削除: :name',
'Delete styles: :name' => 'スタイルの削除: :name',
'Templates' => 'テンプレート',
'Clone' => '複製',
'Edit' => '編集',
'Delete' => '削除',
'Actions' => '操作',
'Admin Theme' => '管理者テーマ',
'Create New Chunk' => '新規チャンクの作成',
'New Chunk' => '新規チャンク',
'Chunks' => 'チャンク',
'Create New Styles' => '新規スタイルの作成',
'New Styles' => '新規スタイル',
'Styles' => 'スタイル',
'Template content' => '内容のテンプレート',
'Styles content' => 'スタイルの内容',
'Chunk content' => 'チャンクの内容',
'Edit Template' => 'テンプレートの編集',
'Edit Chunk' => 'チャンクの編集',
'Edit Styles' => 'スタイルの編集',
'Current Site Theme' => '現在のサイトテーマ',
'Current admin theme' => '現在の管理者のテーマ',
'This template already exists' => 'テンプレートはすでに存在しています',
'This chunk already exists' => 'チャンクはすでに存在しています',
'This styles already exist' => 'スタイルはすでに存在しています',
'Components templates' => 'コンポーネントのテンプレート',
'Your changes to the chunk :name have been saved.' => ':name チャンクへの変更は保存されました。',
'Your changes to the styles :name have been saved.' => ' :name スタイルへの変更は保存されました。',
'Your changes to the template :name have been saved.' => ':name テンプレートへの変更は保存されました。',
'Chunk :name deleted' => 'Chunk :name deleted',
'Required field' => '必須項目',
'Scripts' => 'スクリプト',
'Create New Script' => '新規スクリプトの作成',
'Script content' => 'スクリプトの内容',
'New Script' => '新規スクリプト',
'Edit Script' => 'スクリプトの編集',
)
);
================================================
FILE: plugins/box/themes/languages/ka-ge.lang.php
================================================
array(
'Themes' => 'თემები',
'Themes manager' => 'თემების მენეჯერი',
'Select Theme' => 'თემის არჩევა',
'Save' => 'შენახვა',
'Name' => 'სახელწოდება',
'Save and Exit' => 'შენახვა და შემდეგ გომოსვლა',
'Create New Template' => 'ახალი Template-ის შექმნა',
'New Template' => 'ახალი Template-ი',
'Delete template: :name' => 'Template-ის წაშლა: :name',
'Delete chunk: :name' => 'chunk-ის წაშლა: :name',
'Delete styles: :name' => 'სტილის წაშლა: :name',
'Templates' => 'Template-ები',
'Clone' => 'კლონირება',
'Edit' => 'რედაქტირება',
'Delete' => 'წაშლა',
'Actions' => 'მოქმედება',
'Admin Theme' => 'თემა',
'Create New Chunk' => 'ახალი Chunk-ის შექმნა',
'New Chunk' => 'ახალი Chunk-ი',
'Chunks' => 'Chunk-ები',
'Create New Styles' => 'ახალი სტილის შექმნა',
'New Styles' => 'ახალი სტილები',
'Styles' => 'სტილები',
'Template content' => 'Template-ის შემადგენლობა',
'Styles content' => 'სტილების შემადგენლობა',
'Chunk content' => 'Chunk-ის შემადგენლობა',
'Edit Template' => 'Template-ის რედაქტირება',
'Edit Chunk' => 'Chunk-ის რედაქტირება',
'Edit Styles' => 'სტილების რედაქტირება',
'Site Theme' => 'საიტის თემა',
'Admin Theme' => 'ადმინის პანელის თემა',
'Current Site Theme' => 'საიტის მიმდინარე თემა',
'Current admin theme' => 'ადმინის პანელის მიმდინარე თემა',
'This template already exists' => 'ეს Template-ი უკვე არსებობს',
'This chunk already exists' => 'ეს Chunk-ი უკვე არსებობს',
'This styles already exist' => 'ეს სტილები უკვე არსებობენ',
'Components templates' => 'კომპონენტების Template-ები',
'Your changes to the chunk :name have been saved.' => 'თქვენი ცვლილებები chunk-ის მიმართ :name შენახულია',
'Your changes to the styles :name have been saved.' => 'თქვენი ცვლილებები სტილების მიმართ :name შენახულია',
'Your changes to the template :name have been saved.' => 'თქვენი ცვლილებები Template-ის მიმართ :name შენახულია',
'Chunk :name deleted' => 'Chunk-ი :name წაშლილია',
'Required field' => 'აუცილებელი ველი',
'Scripts' => 'Script-ები',
'Create New Script' => 'ახალი Script-ის შექმნა',
'Script content' => 'Script-ის შემადგენლობა',
'New Script' => 'ახალი Script-ი',
'Edit Script' => 'Script-ის რედაქტირება',
'Cancel' => 'გაუქმება',
)
);
================================================
FILE: plugins/box/themes/languages/lt.lang.php
================================================
array(
'Themes' => 'Išvaizda',
'Themes manager' => 'Išvaizdos tvarkyklė',
'Select Theme' => 'Pasirinkti išvaizdą',
'Save' => 'Išsaugoti',
'Save and Exit' => 'Išsaugoti ir išeiti',
'Name' => 'Pavadinimas',
'Create New Template' => 'Sukurti naują šabloną',
'New Template' => 'Naujas šablonas',
'Delete template: :name' => 'Trinti šabloną :name',
'Delete chunk: :name' => 'Trinti šablono dalį :name',
'Delete styles: :name' => 'Trinti stiliaus aprašą :name',
'Templates' => 'Šablonai',
'Clone' => 'Klonuoti',
'Edit' => 'Redaguoti',
'Delete' => 'Ištrinti',
'Actions' => 'Veiksmai',
'Admin Theme' => 'Admin Theme',
'Site Theme' => 'Site Theme',
'Create New Chunk' => 'Sukurti naują šablono dalį',
'New Chunk' => 'Nauja šablono dalis',
'Chunks' => 'Šablono dalys',
'Create New Styles' => 'Sukurti naują stiliaus aprašą',
'New Styles' => 'Naujas stiliaus aprašas',
'Styles' => 'Stiliaus aprašai',
'Template content' => 'Šablono turinys',
'Styles content' => 'Stiliaus aprašo turinys',
'Chunk content' => 'Šablono dalies turinys',
'Edit Template' => 'Redaguoti šabloną',
'Edit Chunk' => 'Redaguoti šablono dalį',
'Edit Styles' => 'Redaguoti stiliaus aprašą',
'Current Site Theme' => 'Dabartinė tema',
'Current admin theme' => 'Dabartinė administravimo tema',
'This template already exists' => 'Toks šablonas jau yra',
'This chunk already exists' => 'Tokia šablono dalis jau yra',
'This styles already exists' => 'Toks stiliaus aprašas jau yra',
'Components templates' => 'Šablonų komponentai',
'Your changes to the chunk :name have been saved.' => 'Šablono dalies :name pakeitimai išsaugoti.',
'Your changes to the styles :name have been saved.' => 'Stiliaus aprašo :name pakeitimai išsaugoti.',
'Your changes to the template :name have been saved.' => 'Šablono :name pakeitimai išsaugoti.',
'Chunk :name deleted' => 'Chunk :name deleted',
'This field should not be empty' => 'Šis laukas negali būti tuščias',
'Scripts' => 'Skriptai',
'Create New Script' => 'Sukurti naują skriptą',
'Script content' => 'Skripto turinys',
'New Script' => 'Naujas skriptas',
'Edit Script' => 'Redaguoti skriptą',
)
);
================================================
FILE: plugins/box/themes/languages/nl.lang.php
================================================
array(
'Themes' => 'Thema\'s',
'Themes manager' => 'Thema beheer',
'Select Theme' => 'Selecteer thema',
'Save' => 'Opslaan',
'Save and Exit' => 'Opslaan en Terug',
'Name' => 'Naam',
'Create New Template' => 'Nieuwe Template',
'New Template' => 'Nieuwe template',
'Admin Theme' => 'Admin thema',
'Delete template: :name' => 'Verwijder thema: :name',
'Delete chunk: :name' => 'Verwijder onderdeel: :name',
'Delete styles: :name' => 'Verwijder stijl: :name',
'Templates' => 'Templates',
'Clone' => 'Kopieren',
'Edit' => 'Bewerken',
'Delete' => 'Verwijderen',
'Actions' => 'Acties',
'Create New Chunk' => 'Nieuw Onderdeel',
'New Chunk' => 'Nieuwe onderdeel',
'Chunks' => 'Onderdelen',
'Create New Styles' => 'Nieuwe Stijl',
'New Styles' => 'Nieuwe stijl',
'Styles' => 'Stijlen',
'Template content' => 'Template inhoud',
'Styles content' => 'Inhoud stijlen',
'Chunk content' => 'Inhoud onderdeel',
'Edit Template' => 'Bewerk Template',
'Edit Chunk' => 'Bewerk Onderdeel',
'Edit Styles' => 'Bewerk stijlen',
'Current Site Theme' => 'Huidige Website Thema',
'Current admin theme' => 'Huidige Admin Template',
'This template already exists' => 'Deze template bestaat al',
'This chunk already exists' => 'Dit onderdeel bestaat al',
'This styles already exists' => 'Deze stijl bestaat al',
'Components templates' => 'Componenten templates',
'Your changes to the chunk :name have been saved.' => 'Uw wijzigingen aan onderdeel :name zijn opgeslagen.',
'Your changes to the styles :name have been saved.' => 'Uw wijzigingen aan stijl :name zijn opgeslagen.',
'Your changes to the template :name have been saved.' => 'Uw wijzigingen aan template :name zijn opgeslagen.',
'Chunk :name deleted' => 'Chunk :name deleted',
'This field should not be empty' => 'Dit veld mag niet leeg zijn.',
'Scripts' => 'Scripts',
'Create New Script' => 'Nieuw Script',
'Script content' => 'Inhoud script',
'New Script' => 'Nieuw Script',
'Edit Script' => 'Bewerk Script',
)
);
================================================
FILE: plugins/box/themes/languages/pl.lang.php
================================================
array(
'Themes' => 'Motywy',
'Themes manager' => 'Zarządzaj motywami',
'Select Theme' => 'Wybierz motyw',
'Save' => 'Zapisz',
'Save and Exit' => 'Zapisz i wyjdź',
'Name' => 'Nazwa',
'Create New Template' => 'Utwórz nowy szablon',
'New Template' => 'Nowy szablon',
'Delete template: :name' => 'Czy napewno usunąć szablon: :name',
'Delete chunk: :name' => 'Czy napewno usunąć cegiełkę: :name',
'Delete styles: :name' => 'Czy napewno usunąć style: :name',
'Templates' => 'Szablony',
'Clone' => 'Skopiuj',
'Edit' => 'Edytuj',
'Delete' => 'Usuń',
'Actions' => 'Akcje',
'Admin Theme' => 'Motyw administracji',
'Create New Chunk' => 'Utwórz nową cegiełkę',
'New Chunk' => 'Nowa cegiełka',
'Chunks' => 'Cegiełki',
'Create New Styles' => 'Utwórz nowe style',
'New Styles' => 'Nowe style',
'Styles' => 'Style',
'Template content' => 'Zawartość szablonu',
'Styles content' => 'Zawartość stylów',
'Chunk content' => 'Zawartość cegiełki',
'Edit Template' => 'Edytuj szablon',
'Edit Chunk' => 'Edytuj cegiełkę',
'Edit Styles' => 'Edytuj style',
'Current Site Theme' => 'Bieżący motyw strony',
'Current admin theme' => 'Bieżący motyw administracji',
'This template already exists' => 'Ten szablon już istnieje',
'This chunk already exists' => 'Ta cegiełka już istnieje',
'This styles already exist' => 'Te style już istnieją',
'Components templates' => 'Części składowe szablonów',
'Your changes to the chunk :name have been saved.' => 'Twoje zmiany dla cegiełki :name zostały zapisane.',
'Your changes to the styles :name have been saved.' => 'Twoje zmiany dla stylów :name zostały zapisane.',
'Your changes to the template :name have been saved.' => 'Twoje zmiany dla szablonu :name zostały zapisane.',
'Chunk :name deleted' => 'Chunk :name deleted',
'Required field' => 'Pole wymagane',
'Scripts' => 'Skrypty',
'Create New Script' => 'Utwórz nowy skrypt',
'Script content' => 'Zawartość skryptu',
'New Script' => 'Nowy skrypt',
'Edit Script' => 'Edytuj skrypt',
'Site Theme' => 'Motyw strony',
)
);
================================================
FILE: plugins/box/themes/languages/pt-br.lang.php
================================================
array(
'Themes' => 'Temas',
'Themes manager' => 'Gerenciador de temas',
'Select Theme' => 'Selecionar tema',
'Save' => 'Salvar',
'Save and Exit' => 'Salvar e sair',
'Name' => 'Nome',
'Create New Template' => 'Criar novo template',
'New Template' => 'Novo template',
'Delete template: :name' => 'Deletar o template: :name',
'Delete chunk: :name' => 'Deletar o pedaço: :name',
'Delete styles: :name' => 'Deletar o estilo :name',
'Templates' => 'Templates',
'Clone' => 'Clonar',
'Edit' => 'Editar',
'Delete' => 'Deletar',
'Actions' => 'Ações',
'Admin Theme' => 'Admin Theme',
'Site Theme' => 'Site Theme',
'Create New Chunk' => 'Criar novo pedaço',
'New Chunk' => 'Novo pedaço',
'Chunks' => 'Pedaços',
'Create New Styles' => 'Criar novo estilo',
'New Styles' => 'Novo estilo',
'Styles' => 'Estilos',
'Template content' => 'Conteúdo do template',
'Styles content' => 'Conteúdo do estilo',
'Chunk content' => 'Conteúdo do pedaço',
'Edit Template' => 'Editar template',
'Edit Chunk' => 'Editar pedaço',
'Edit Styles' => 'Editar estilo',
'Current Site Theme' => 'Tema atual do site',
'Current admin theme' => 'Tema atual da administração',
'This template already exists' => 'Este template já existe',
'This chunk already exists' => 'Este pedaço já existe',
'This styles already exists' => 'Este estilo já existe',
'Components templates' => 'Componentes do template',
'Your changes to the chunk :name have been saved.' => 'Suas alterações no pedaço :name foram salvas',
'Your changes to the styles :name have been saved.' => 'Suas alterações no estilo :name foram salvas.',
'Your changes to the template :name have been saved.' => 'Suas alterações no template :name foram salvas.',
'Chunk :name deleted' => 'Chunk :name deleted',
'This field should not be empty' => 'Este campo não pode estar vazio',
'Scripts' => 'Scripts',
'Create New Script' => 'Criar novo script',
'Script content' => 'Conteúdo do script',
'New Script' => 'Novo script',
'Edit Script' => 'Editar script',
)
);
================================================
FILE: plugins/box/themes/languages/ru.lang.php
================================================
array(
'Themes' => 'Темы',
'Themes manager' => 'Менеджер тем',
'Select Theme' => 'Выбрать тему',
'Save' => 'Сохранить',
'Name' => 'Название',
'Save and Exit' => 'Сохранить и выйти',
'Create New Template' => 'Создать новый шаблон',
'New Template' => 'Новый шаблон',
'Delete template: :name' => 'Удалить шаблон: :name',
'Delete chunk: :name' => 'Удалить чанк: :name',
'Delete styles: :name' => 'Удалить стили: :name',
'Templates' => 'Шаблоны',
'Clone' => 'Клонировать',
'Edit' => 'Редактировать',
'Delete' => 'Удалить',
'Actions' => 'Действия',
'Admin Theme' => 'Тема ',
'Create New Chunk' => 'Создать новый чанк',
'New Chunk' => 'Новый чанк',
'Chunks' => 'Чанки',
'Create New Styles' => 'Создать новые стили',
'New Styles' => 'Новые стили',
'Styles' => 'Стили',
'Template content' => 'Содержимое шаблона',
'Styles content' => 'Содержимое стилей',
'Chunk content' => 'Содержимое чанка',
'Edit Template' => 'Редактирование шаблона',
'Edit Chunk' => 'Редактирование чанка',
'Edit Styles' => 'Редкатирование стилей',
'Site Theme' => 'Тема сайта',
'Admin Theme' => 'Тема админки',
'Current Site Theme' => 'Текущая тема сайта',
'Current admin theme' => 'Текущая тема админки',
'This template already exists' => 'Этот шаблон уже существует',
'This chunk already exists' => 'Этот чанк уже существует',
'This styles already exist' => 'Эти стили уже существуют',
'Components templates' => 'Шаблоны компонентов',
'Your changes to the chunk :name have been saved.' => 'Ваши изменения к чанку :name были сохранены',
'Your changes to the styles :name have been saved.' => 'Ваши изменения к стилям :name были сохранены',
'Your changes to the template :name have been saved.' => 'Ваши изменения к шаблону :name были сохранены',
'Chunk :name deleted' => 'Чанк :name удален',
'Required field' => 'Обязательное поле',
'Scripts' => 'Скрипты',
'Create New Script' => 'Создать новый скрипт',
'Script content' => 'Содержимое скрипта',
'New Script' => 'Новый скрипт',
'Edit Script' => 'Редактирование скрипта',
'Cancel' => 'Отмена',
)
);
================================================
FILE: plugins/box/themes/languages/sk.lang.php
================================================
array(
'Themes' => 'Témy',
'Themes manager' => 'Manažér tém',
'Select Theme' => 'Vybrať tému',
'Save' => 'Uložiť',
'Save and Exit' => 'Uložiť a ukončiť',
'Name' => 'Názov',
'Create New Template' => 'Vytvoriť novú tému',
'New Template' => 'Nová téma',
'Delete template: :name' => 'Vymazať tému: :name',
'Delete chunk: :name' => 'Vymazať sekciu: :name',
'Delete styles: :name' => 'Vymazať CSS štýl: :name',
'Templates' => 'Témy',
'Clone' => 'Klonovať',
'Edit' => 'Editovať',
'Delete' => 'Vymazať',
'Actions' => 'Akcie',
'Create New Chunk' => 'Vytvoriť novú sekciu',
'New Chunk' => 'Nová sekcia',
'Chunks' => 'Sekcie',
'Create New Styles' => 'Vytvoriť nový CSS štýl',
'New Styles' => 'Nový CSS štýl',
'Styles' => 'CSS štýly',
'Template content' => 'Obsah témy',
'Styles content' => 'Obsah CSS štýlu',
'Chunk content' => 'Obsah sekcie',
'Edit Template' => 'Editovať tému',
'Edit Chunk' => 'Editovať sekciu',
'Edit Styles' => 'Editovať CSS štýl',
'Current Site Theme' => 'Aktuálna téma webstránky',
'Current admin theme' => 'Aktuálna téma administrácie',
'This template already exists' => 'Táto téma už existuje',
'This chunk already exists' => 'Táto sekcia už existuje',
'This styles already exist' => 'Tento CSS štýl už existuje',
'Components templates' => 'Témy komponentov',
'Your changes to the chunk :name have been saved.' => 'Vaše zmeny v sekcii :name boli uložené.',
'Your changes to the styles :name have been saved.' => 'Vaše zmeny v CSS štýle :name boli uložené.',
'Your changes to the template :name have been saved.' => 'Vaše zmeny v téme :name boli uložené.',
'Chunk :name deleted' => 'Chunk :name deleted',
'Required field' => 'Povinné políčko',
'Scripts' => 'Skripty',
'Site Theme' => 'Site Theme',
'Admin Theme' => 'Admin Theme',
'Create New Script' => 'Vytvoriť nový skript',
'Script content' => 'Obsah skriptu',
'New Script' => 'Nový skript',
'Edit Script' => 'Editovať skript',
)
);
================================================
FILE: plugins/box/themes/languages/sr.lang.php
================================================
array(
'Themes' => 'Šabloni',
'Themes manager' => 'Menadžer šablona',
'Select theme' => 'Odaberi temu',
'Save' => 'Sačuvaj',
'Save and exit' => 'Sačuvaj i izađi',
'Name' => 'Ime',
'Create new template' => 'Kreiraj novi šablon',
'New template' => 'Novi šablon',
'Delete template: :name' => 'Obriši šablon: :name',
'Delete chunk: :name' => 'Obriši komade: :name',
'Delete styles: :name' => 'Obriši stilove: :name',
'Templates' => 'Šabloni',
'Clone' => 'Kloniraj',
'Edit' => 'Izmeni',
'Delete' => 'Obriši',
'Actions' => 'Akcije',
'Create new chunk' => 'Napravi novi parče',
'New chunk' => 'Novo parče',
'Chunks' => 'Parčići',
'Create new styles' => 'Kreiraj novi stil',
'New styles' => 'Novi stil',
'Styles' => 'Stilovi',
'Template content' => 'Sadržaj šablona',
'Styles content' => 'Stil sadržaja',
'Chunk content' => 'Sadržaj komada',
'Edit template' => 'Izmeni šablon',
'Edit chunk' => 'Izmeni komad',
'Edit styles' => 'Izmeni stil',
'Current site theme' => 'Trenutni šablon sajta',
'Current admin theme' => 'Trenutni administratorski šablon',
'This template already exists' => 'Ovaj šablon već postoji',
'This chunk already exists' => 'Ovaj komad već postoji',
'This styles already exist' => 'Ovaj stil već postoji',
'Components templates' => 'Komponente šablona',
'Your changes to the chunk :name have been saved.' => 'Vaše promene na komadićima :name su sačuvane.',
'Your changes to the styles :name have been saved.' => 'Promene na stilovima :name su sačuvane.',
'Your changes to the template :name have been saved.' => 'Promene na šablonu :name su sačuvane.',
'Chunk :name deleted' => 'Chunk :name deleted',
'Required field' => 'Potrebno polje',
'Scripts' => 'Skripte',
'Create new script' => 'Kreiraj novu skriptu',
'Script content' => 'Sadržaj skripte',
'New script' => 'Nova skripta',
'Edit script' => 'Izmeni skriptu',
)
);
================================================
FILE: plugins/box/themes/languages/tr.lang.php
================================================
array(
'Themes' => 'Temalar',
'Themes manager' => 'Tema Yöneticisi',
'Select Theme' => 'Tema Seç',
'Save' => 'Kaydet',
'Save and Exit' => 'Kaydet ve Çık',
'Name' => 'Ad',
'Create New Template' => 'Yeni Şablon Oluştur',
'New Template' => 'Yeni Şablon',
'Delete template: :name' => ':name adlı şablon silinsin mi',
'Delete chunk: :name' => ':name adlı yığın silinsin mi',
'Delete styles: :name' => ':name adlı stil silinsin mi',
'Templates' => 'Şablonlar',
'Clone' => 'Klonla',
'Edit' => 'Düzenle',
'Delete' => 'Sil',
'Actions' => 'İşlemler',
'Admin Theme' => 'Yönetim Teması',
'Create New Chunk' => 'Yeni Yığın Oluştur',
'New Chunk' => 'Yeni Yığın',
'Chunks' => 'Yığın',
'Create New Styles' => 'Yeni Stil Oluştur',
'New Styles' => 'Yeni Stil',
'Styles' => 'Stil',
'Template content' => 'Şablon İçeriği',
'Styles content' => 'Stil İçeriği',
'Chunk content' => 'Yığın İçeriği',
'Edit Template' => 'Şablonu Düzenle',
'Edit Chunk' => 'Yığını Düzenle',
'Edit Styles' => 'Stili Düzenle',
'Current Site Theme' => 'Kullanılan site teması',
'Current admin theme' => 'Kullanılan yönetim teması',
'This template already exists' => 'Bu şablon zaten var',
'This chunk already exists' => 'Bu yığın zaten var',
'This styles already exist' => 'Bu stil zaten var',
'Components templates' => 'Eklenti şablonları',
'Your changes to the chunk :name have been saved.' => 'Değişiklikleriniz :name adlı yığına kaydedildi.',
'Your changes to the styles :name have been saved.' => 'Değişiklikleriniz :name adlı stile kaydedildi.',
'Your changes to the template :name have been saved.' => 'Değişiklikleriniz :name adlı şablona kaydedildi.',
'Chunk :name deleted' => ':name adlı yığın silindi',
'Required field' => 'Zorunlu alan',
'Scripts' => 'Betikler',
'Create New Script' => 'Yeni Betik Oluştur',
'Script content' => 'Betik içeriği',
'New Script' => 'Yeni Betik',
'Edit Script' => 'Betiği Düzenle',
'Site Theme' => 'Site Teması',
'Cancel' => 'Vazgeç',
)
);
================================================
FILE: plugins/box/themes/languages/uk.lang.php
================================================
array(
'Themes' => 'Теми',
'Themes manager' => 'Менеджер тем',
'Select Theme' => 'Вибрати тему',
'Save' => 'Зберегти',
'Name' => 'Назва',
'Save and Exit' => 'Зберегти та вийти',
'Create New Template' => 'Створити новий шаблон',
'New Template' => 'Новий шаблон',
'Delete template: :name' => 'Видалити шаблон: :name',
'Delete chunk: :name' => 'Видалити чанк: :name',
'Delete styles: :name' => 'Видалити стилі: :name',
'Templates' => 'Шаблони',
'Clone' => 'Клонувати',
'Edit' => 'Редагувати',
'Delete' => 'Видалити',
'Actions' => 'Дії',
'Admin Theme' => 'Тема ',
'Create New Chunk' => 'Створити новий чанк',
'New Chunk' => 'Новий чанк',
'Chunks' => 'Чанки',
'Create New Styles' => 'Створити нові стилі',
'New Styles' => 'Нові стилі',
'Styles' => 'Стилі',
'Template content' => 'Вміст шаблону',
'Styles content' => 'Вміст стилів',
'Chunk content' => 'Вміст чанка',
'Edit Template' => 'Редагування шаблону',
'Edit Chunk' => 'Редагування чанка',
'Edit Styles' => 'Редагування стилів',
'Site Theme' => 'Тема сайту',
'Admin Theme' => 'Тема адмінки',
'Current Site Theme' => 'Поточна тема сайтау',
'Current admin theme' => 'Поточна тема адмінки',
'This template already exists' => 'Цей шаблон вже існує',
'This chunk already exists' => 'Цей чанк вже існує',
'This styles already exist' => 'Цей стиль вже існує',
'Components templates' => 'Шаблони компонентів',
'Your changes to the chunk :name have been saved.' => 'Ваші зміни до чанку :name були збережені',
'Your changes to the styles :name have been saved.' => 'Ваші зміни до стиля :name були збережені',
'Your changes to the template :name have been saved.' => 'Ваші зміни до шаблону :name були збережені',
'Chunk :name deleted' => 'Чанк :name видалено',
'Required field' => 'Обов’язкове поле',
'Scripts' => 'Скрипти',
'Create New Script' => 'Створити новий скрипт',
'Script content' => 'Вміст скрипта',
'New Script' => 'Новий скрипт',
'Edit Script' => 'Редагування скрипту',
'Cancel' => 'Відмінити',
)
);
================================================
FILE: plugins/box/themes/languages/zh-cn.lang.php
================================================
array(
'Themes' => '主题',
'Themes manager' => '主题管理',
'Select Theme' => '选择主题',
'Save' => '保存',
'Save and Exit' => '保存并退出',
'Name' => '名称',
'Create New Template' => '创建新模板',
'New Template' => '新建模板',
'Delete template: :name' => '删除模板: :name',
'Delete chunk: :name' => '删除区块: :name',
'Delete styles: :name' => '删除样式: :name',
'Templates' => '模板',
'Clone' => '克隆',
'Edit' => '编辑',
'Delete' => '删除',
'Actions' => '操作',
'Admin Theme' => '后台主题',
'Create New Chunk' => '创建新区块',
'New Chunk' => '新建区块',
'Chunks' => '区块',
'Create New Styles' => '创建新样式',
'New Styles' => '新建样式',
'Styles' => '样式',
'Template content' => '模板内容',
'Styles content' => '样式内容',
'Chunk content' => '区块内容',
'Edit Template' => '编辑模板',
'Edit Chunk' => '编辑区块',
'Edit Styles' => '编辑样式',
'Current Site Theme' => '当前网站主题',
'Current admin theme' => '当前后台主题',
'This template already exists' => '此模板已存在',
'This chunk already exists' => '此区块已存在',
'This styles already exist' => '此样式已存在',
'Components templates' => '组件模板',
'Your changes to the chunk :name have been saved.' => '您修改的区块 :name 已保存。',
'Your changes to the styles :name have been saved.' => '您修改的样式 :name 已保存。',
'Your changes to the template :name have been saved.' => '您修改的模板 :name 已保存。',
'Chunk :name deleted' => 'Chunk :name deleted',
'Required field' => '必填字段',
'Scripts' => '脚本',
'Create New Script' => '创建新脚本',
'Script content' => '脚本内容',
'New Script' => '新建脚本',
'Edit Script' => '编辑脚本',
)
);
================================================
FILE: plugins/box/themes/themes.admin.php
================================================
:name have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false))));
if (Request::post('add_file_and_exit')) {
Request::redirect('index.php?id=themes');
} else {
Request::redirect('index.php?id=themes&action=edit_chunk&filename='.Security::safeName(Request::post('name'), null, false));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Save fields
if (Request::post('name')) $name = Request::post('name'); else $name = '';
if (Request::post('content')) $content = Request::post('content'); else $content = '';
// Display view
View::factory('box/themes/views/backend/add')
->assign('name', $name)
->assign('content', $content)
->assign('errors', $errors)
->assign('action', 'chunk')
->display();
break;
// Add template
// -------------------------------------
case "add_template":
if (Request::post('add_file') || Request::post('add_file_and_exit')) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');
if (file_exists($template_path.Security::safeName(Request::post('name'), null, false).'.template.php')) $errors['file_exists'] = __('This template already exists', 'themes');
if (count($errors) == 0) {
// Save chunk
File::setContent($template_path.Security::safeName(Request::post('name'), null, false).'.template.php', Request::post('content'));
Notification::set('success', __('Your changes to the chunk :name have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false))));
if (Request::post('add_file_and_exit')) {
Request::redirect('index.php?id=themes');
} else {
Request::redirect('index.php?id=themes&action=edit_template&filename='.Security::safeName(Request::post('name'), null, false));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Save fields
if (Request::post('name')) $name = Request::post('name'); else $name = '';
if (Request::post('content')) $content = Request::post('content'); else $content = '';
// Display view
View::factory('box/themes/views/backend/add')
->assign('name', $name)
->assign('content', $content)
->assign('errors', $errors)
->assign('action', 'template')
->display();
break;
// Add styles
// -------------------------------------
case "add_styles":
if (Request::post('add_file') || Request::post('add_file_and_exit')) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');
if (file_exists($style_path.Security::safeName(Request::post('name'), null, false).'.css')) $errors['file_exists'] = __('This styles already exists', 'themes');
if (count($errors) == 0) {
// Save chunk
File::setContent($style_path.Security::safeName(Request::post('name'), null, false).'.css', Request::post('content'));
Notification::set('success', __('Your changes to the styles :name have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false))));
// Clean Monstra TMP folder.
Monstra::cleanTmp();
// Increment Styles version
Stylesheet::stylesVersionIncrement();
if (Request::post('add_file_and_exit')) {
Request::redirect('index.php?id=themes');
} else {
Request::redirect('index.php?id=themes&action=edit_styles&filename='.Security::safeName(Request::post('name'), null, false));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Save fields
if (Request::post('name')) $name = Request::post('name'); else $name = '';
if (Request::post('content')) $content = Request::post('content'); else $content = '';
// Display view
View::factory('box/themes/views/backend/add')
->assign('name', $name)
->assign('content', $content)
->assign('errors', $errors)
->assign('action', 'styles')
->display();
break;
// Add script
// -------------------------------------
case "add_script":
if (Request::post('add_file') || Request::post('add_file_and_exit')) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');
if (file_exists($script_path.Security::safeName(Request::post('name'), null, false).'.js')) $errors['file_exists'] = __('This script already exists', 'themes');
if (count($errors) == 0) {
// Save chunk
File::setContent($script_path.Security::safeName(Request::post('name'), null, false).'.js', Request::post('content'));
Notification::set('success', __('Your changes to the script :name have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false))));
// Clean Monstra TMP folder.
Monstra::cleanTmp();
// Increment Javascript version
Javascript::javascriptVersionIncrement();
if (Request::post('add_file_and_exit')) {
Request::redirect('index.php?id=themes');
} else {
Request::redirect('index.php?id=themes&action=edit_script&filename='.Security::safeName(Request::post('name'), null, false));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Save fields
if (Request::post('name')) $name = Request::post('name'); else $name = '';
if (Request::post('content')) $content = Request::post('content'); else $content = '';
// Display view
View::factory('box/themes/views/backend/add')
->assign('name', $name)
->assign('content', $content)
->assign('errors', $errors)
->assign('action', 'script')
->display();
break;
// Edit chunk
// -------------------------------------
case "edit_chunk":
// Save current chunk action
if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');
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');
// Save fields
if (Request::post('content')) $content = Request::post('content'); else $content = '';
if (count($errors) == 0) {
$chunk_old_filename = $chunk_path.Request::post('chunk_old_name').'.chunk.php';
$chunk_new_filename = $chunk_path.Security::safeName(Request::post('name'), null, false).'.chunk.php';
if ( ! empty($chunk_old_filename)) {
if ($chunk_old_filename !== $chunk_new_filename) {
rename($chunk_old_filename, $chunk_new_filename);
$save_filename = $chunk_new_filename;
} else {
$save_filename = $chunk_new_filename;
}
} else {
$save_filename = $chunk_new_filename;
}
// Save chunk
File::setContent($save_filename, Request::post('content'));
Notification::set('success', __('Your changes to the chunk :name have been saved.', 'themes', array(':name' => basename($save_filename, '.chunk.php'))));
if (Request::post('edit_file_and_exit')) {
Request::redirect('index.php?id=themes');
} else {
Request::redirect('index.php?id=themes&action=edit_chunk&filename='.Security::safeName(Request::post('name'), null, false));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));
$content = File::getContent($chunk_path.Request::get('filename').'.chunk.php');
// Display view
View::factory('box/themes/views/backend/edit')
->assign('content', $content)
->assign('name', $name)
->assign('errors', $errors)
->assign('action', 'chunk')
->display();
break;
// Edit Template
// -------------------------------------
case "edit_template":
// Save current chunk action
if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');
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');
// Save fields
if (Request::post('content')) $content = Request::post('content'); else $content = '';
if (count($errors) == 0) {
$template_old_filename = $template_path.Request::post('template_old_name').'.template.php';
$template_new_filename = $template_path.Security::safeName(Request::post('name'), null, false).'.template.php';
if ( ! empty($template_old_filename)) {
if ($template_old_filename !== $template_new_filename) {
rename($template_old_filename, $template_new_filename);
$save_filename = $template_new_filename;
} else {
$save_filename = $template_new_filename;
}
} else {
$save_filename = $template_new_filename;
}
// Save chunk
File::setContent($save_filename, Request::post('content'));
Notification::set('success', __('Your changes to the template :name have been saved.', 'themes', array(':name' => basename($save_filename, '.template.php'))));
if (Request::post('edit_file_and_exit')) {
Request::redirect('index.php?id=themes');
} else {
Request::redirect('index.php?id=themes&action=edit_template&filename='.Security::safeName(Request::post('name'), null, false));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));
$content = File::getContent($chunk_path.Request::get('filename').'.template.php');
// Display view
View::factory('box/themes/views/backend/edit')
->assign('content', $content)
->assign('name', $name)
->assign('errors', $errors)
->assign('action', 'template')
->display();
break;
// Edit Styles
// -------------------------------------
case "edit_styles":
// Save current chunk action
if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');
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');
// Save fields
if (Request::post('content')) $content = Request::post('content'); else $content = '';
if (count($errors) == 0) {
$styles_old_filename = $style_path.Request::post('styles_old_name').'.css';
$styles_new_filename = $style_path.Security::safeName(Request::post('name'), null, false).'.css';
if ( ! empty($styles_old_filename)) {
if ($styles_old_filename !== $styles_new_filename) {
rename($styles_old_filename, $styles_new_filename);
$save_filename = $styles_new_filename;
} else {
$save_filename = $styles_new_filename;
}
} else {
$save_filename = $styles_new_filename;
}
// Save chunk
File::setContent($save_filename, Request::post('content'));
Notification::set('success', __('Your changes to the styles :name have been saved.', 'themes', array(':name' => basename($save_filename, '.css'))));
// Clean Monstra TMP folder.
Monstra::cleanTmp();
// Increment Styles version
Stylesheet::stylesVersionIncrement();
if (Request::post('edit_file_and_exit')) {
Request::redirect('index.php?id=themes');
} else {
Request::redirect('index.php?id=themes&action=edit_styles&filename='.Security::safeName(Request::post('name'), null, false));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));
$content = File::getContent($style_path.Request::get('filename').'.css');
// Display view
View::factory('box/themes/views/backend/edit')
->assign('content', $content)
->assign('name', $name)
->assign('errors', $errors)
->assign('action', 'styles')
->display();
break;
// Edit Script
// -------------------------------------
case "edit_script":
// Save current chunk action
if (Request::post('edit_file') || Request::post('edit_file_and_exit') ) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes');
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');
// Save fields
if (Request::post('content')) $content = Request::post('content'); else $content = '';
if (count($errors) == 0) {
$script_old_filename = $script_path.Request::post('script_old_name').'.js';
$script_new_filename = $script_path.Security::safeName(Request::post('name'), null, false).'.js';
if ( ! empty($script_old_filename)) {
if ($script_old_filename !== $script_new_filename) {
rename($script_old_filename, $script_new_filename);
$save_filename = $script_new_filename;
} else {
$save_filename = $script_new_filename;
}
} else {
$save_filename = $script_new_filename;
}
// Save chunk
File::setContent($save_filename, Request::post('content'));
Notification::set('success', __('Your changes to the script :name have been saved.', 'themes', array(':name' => basename($save_filename, '.js'))));
// Clean Monstra TMP folder.
Monstra::cleanTmp();
// Increment Javascript version
Javascript::javascriptVersionIncrement();
if (Request::post('edit_file_and_exit')) {
Request::redirect('index.php?id=themes');
} else {
Request::redirect('index.php?id=themes&action=edit_script&filename='.Security::safeName(Request::post('name'), null, false));
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
if (Request::post('name')) $name = Request::post('name'); else $name = File::name(Request::get('filename'));
$content = File::getContent($script_path.Request::get('filename').'.js');
// Display view
View::factory('box/themes/views/backend/edit')
->assign('content', $content)
->assign('name', $name)
->assign('errors', $errors)
->assign('action', 'script')
->display();
break;
// Delete chunk
// -------------------------------------
case "delete_chunk":
if (Security::check(Request::get('token'))) {
File::delete($chunk_path.Request::get('filename').'.chunk.php');
Notification::set('success', __('Chunk :name deleted', 'themes', array(':name' => File::name(Request::get('filename')))));
Request::redirect('index.php?id=themes');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
break;
// Delete styles
// -------------------------------------
case "delete_styles":
if (Security::check(Request::get('token'))) {
File::delete($style_path.Request::get('filename').'.css');
Notification::set('success', __('Styles :name deleted', 'themes', array(':name' => File::name(Request::get('filename')))));
// Clean Monstra TMP folder.
Monstra::cleanTmp();
// Increment Styles version
Stylesheet::stylesVersionIncrement();
Request::redirect('index.php?id=themes');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
break;
// Delete script
// -------------------------------------
case "delete_script":
if (Security::check(Request::get('token'))) {
File::delete($script_path.Request::get('filename').'.js');
Notification::set('success', __('Script :name deleted', 'themes', array(':name' => File::name(Request::get('filename')))));
// Clean Monstra TMP folder.
Monstra::cleanTmp();
// Increment Javascript version
Javascript::javascriptVersionIncrement();
Request::redirect('index.php?id=themes');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
break;
// Delete template
// -------------------------------------
case "delete_template":
if (Security::check(Request::get('token'))) {
File::delete($template_path.Request::get('filename').'.template.php');
Notification::set('success', __('Template :name deleted', 'themes', array(':name' => File::name(Request::get('filename')))));
Request::redirect('index.php?id=themes');
}
break;
// Clone styles
// -------------------------------------
case "clone_styles":
if (Security::check(Request::get('token'))) {
File::setContent(THEMES_SITE . DS . $current_site_theme . DS . 'css' . DS . Request::get('filename') .'_clone_'.date("Ymd_His").'.css',
File::getContent(THEMES_SITE . DS . $current_site_theme . DS . 'css' . DS . Request::get('filename') . '.css'));
// Clean Monstra TMP folder.
Monstra::cleanTmp();
// Increment Styles version
Stylesheet::stylesVersionIncrement();
Request::redirect('index.php?id=themes');
}
break;
// Clone script
// -------------------------------------
case "clone_script":
if (Security::check(Request::get('token'))) {
File::setContent(THEMES_SITE . DS . $current_site_theme . DS . 'js' . DS . Request::get('filename') .'_clone_'.date("Ymd_His").'.js',
File::getContent(THEMES_SITE . DS . $current_site_theme . DS . 'js' . DS . Request::get('filename') . '.js'));
// Clean Monstra TMP folder.
Monstra::cleanTmp();
// Increment Javascript version
Javascript::javascriptVersionIncrement();
Request::redirect('index.php?id=themes');
}
break;
// Clone template
// -------------------------------------
case "clone_template":
if (Security::check(Request::get('token'))) {
File::setContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') .'_clone_'.date("Ymd_His").'.template.php',
File::getContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') . '.template.php'));
Request::redirect('index.php?id=themes');
}
break;
// Clone chunk
// -------------------------------------
case "clone_chunk":
if (Security::check(Request::get('token'))) {
File::setContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') .'_clone_'.date("Ymd_His").'.chunk.php',
File::getContent(THEMES_SITE . DS . $current_site_theme . DS . Request::get('filename') . '.chunk.php'));
Request::redirect('index.php?id=themes');
}
break;
}
} else {
// Display view
View::factory('box/themes/views/backend/index')
->assign('themes_site', $themes_site)
->assign('themes_admin', $themes_admin)
->assign('templates', $templates)
->assign('chunks', $chunks)
->assign('styles', $styles)
->assign('scripts', $scripts)
->assign('current_site_theme', $current_site_theme)
->assign('current_admin_theme', $current_admin_theme)
->display();
}
}
}
================================================
FILE: plugins/box/themes/themes.plugin.php
================================================
filemtime(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php')) {
file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php',
MinifyHTML::process(file_get_contents(THEMES_SITE. DS . $current_theme . DS . $name .'.chunk.php')));
}
// Include chunk
include MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $name . '.chunk.php';
}
}
}
================================================
FILE: plugins/box/themes/views/backend/add.view.php
================================================
'form-horizontal'))); ?>
(isset($errors['file_empty_name']) || isset($errors['file_exists'])) ? 'form-control error-field' : 'form-control'))); ?>
.chunk.php
.template.php
.css
.js
'.$errors['file_empty_name'].'';
if (isset($errors['file_exists'])) echo '';
?>
'width:100%;height:400px;', 'class' => 'source-editor'));
?>
'btn btn-primary')).Html::nbsp(2).
Form::submit('add_file', __('Save', 'themes'), array('class' => 'btn btn-default')).Html::nbsp(2).
Html::anchor(__('Cancel', 'themes'), 'index.php?id=themes', array('title' => __('Cancel', 'themes'), 'class' => 'btn btn-default')).
Form::close()
);
?>
================================================
FILE: plugins/box/themes/views/backend/edit.view.php
================================================
'form-horizontal')));
echo (Form::hidden('csrf', Security::token()));
?>
(isset($errors['file_empty_name']) || isset($errors['file_exists'])) ? 'form-control error-field' : 'form-control'))); ?>
.chunk.php
.template.php
.css
.js
'.$errors['file_empty_name'].'';
if (isset($errors['file_exists'])) echo '';
?>
'width:100%;height:400px;', 'class' => 'source-editor'))
);
?>
'btn btn-primary')).Html::nbsp(2).
Form::submit('edit_file', __('Save', 'themes'), array('class' => 'btn btn-default')).Html::nbsp(2).
Html::anchor(__('Cancel', 'themes'), 'index.php?id=themes', array('title' => __('Cancel', 'themes'), 'class' => 'btn btn-default')).
Form::close()
);
} else {
if ($action == 'chunk') { echo ''; }
if ($action == 'template') { echo ''; }
if ($action == 'styles') { echo ''; }
if ($action == 'script') { echo ''; }
}
?>
================================================
FILE: plugins/box/themes/views/backend/index.view.php
================================================
'form-control')). Html::br().
Form::submit('save_site_theme', __('Save', 'themes'), array('class' => 'btn btn-primary')).
Form::close()
);
?>
'form-control')). Html::br().
Form::submit('save_admin_theme', __('Save', 'themes'), array('class' => 'btn btn-primary')).
Form::close()
);
?>
__('Create New Template'), 'class' => 'btn btn-default')).Html::br(2)); ?>
'btn btn-primary')); ?>
'btn btn-actions btn-danger btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete template: :name', 'themes', array(':name' => basename($template, '.template.php')))."')"));
?>
__('Create New Chunk', 'themes'), 'class' => 'btn btn-default')).Html::br(2)); ?>
'btn btn-primary')); ?>
'btn btn-actions btn-danger btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete chunk: :name', 'themes', array(':name' => basename($chunk, '.chunk.php')))."')"));
?>
__('Create New Style', 'themes'), 'class' => 'btn btn-default')).Html::br(2)); ?>
'btn btn-primary')); ?>
'btn btn-actions btn-danger btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete styles: :name', 'themes', array(':name' => basename($style, '.css')))."')"));
?>
__('Create New Script', 'themes'), 'class' => 'btn btn-default')).Html::br(2)); ?>
'btn btn-primary')); ?>
'btn btn-actions btn-danger btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete script: :name', 'themes', array(':name' => basename($script, '.js')))."')"));
?>
3) {
?>
================================================
FILE: plugins/box/users/install/users.manifest.xml
================================================
plugins/box/users/users.plugin.php
active
7
Users
Users plugin
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/box/users/js/.htaccess
================================================
Options -Indexes
Allow from all
================================================
FILE: plugins/box/users/js/users.js
================================================
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.users = {
init: function() {
this.usersFrontendRegistration();
},
usersFrontendRegistration: function() {
$('#users_frontend_registration').on('ifChanged', function(event){
$("form[name=users_frontend]").submit();
});
}
};
$(document).ready(function(){
$.monstra.users.init();
});
================================================
FILE: plugins/box/users/languages/cs.lang.php
================================================
array(
'Users' => 'Uživatelé',
'Login' => 'Přihlásit',
'Username' => 'Přihlašovací jméno',
'Password' => 'Heslo',
'Registered' => 'Registrovaný',
'Email' => 'Email',
'Role' => 'Úloha',
'Roles' => 'Úlohy',
'Edit' => 'Editovat',
'Actions' => 'Akce',
'Delete' => 'Vymazat',
'Log In' => 'Přihlásit',
'Log Out' => 'Odhlásit',
'Register New User' => 'Registrace Nového Uživatele',
'New User Registration' => 'Registrace nového uživatele',
'Delete user: :user' => 'Vymazat uživatele: :user',
'User :user have been deleted.' => 'Uživatel :user byl vymazán.',
'This user already exists' => 'Tento uživatel už existuje',
'This email already exists' => 'Tento email už existuje',
'Changes saved' => 'Uložit změny',
'Wrong old password' => 'Nesprávné staré heslo',
'Admin' => 'Administrátor',
'User' => 'Uživatel',
'Editor' => 'Editor',
'Register' => 'Registrovat',
'Edit profile' => 'Editovat profil',
'Save' => 'Uložit',
'Firstname' => 'Křestní jméno',
'Lastname' => 'Příjmení',
'Old password' => 'Staré heslo',
'New password' => 'Nové heslo',
'Welcome' => 'Vítejte',
'Wrong username or password' => 'Nesprávné uživatelské jméno nebo heslo',
'Your changes have been saved.' => 'Vaše změny byly uloženy.',
'New user have been registered.' => 'Nový uživatel byl zaregistrovaný.',
'Captcha' => 'Captcha',
'Registration' => 'Registrace',
'Username' => 'Uživatelské heslo',
'User email is invalid' => 'Uživatelský email není ve správném tvaru',
'Reset Password' => 'Obnovit heslo',
'Send New Password' => 'Poslat nové heslo',
'This user doesnt alredy exist' => 'Tento uživatel neexistuje',
'Users - Profile' => 'Uživatelé - Profil',
'Users - Edit Profile' => 'Uživatelé - Editovat Profil',
'Users - Log In' => 'Uživatelé - Přihlášení',
'Users - Registration' => 'Uživatelé - Registrace',
'Users - Password Recover' => 'Uživatelé - Obnova hesla',
'New Password' => 'Nové heslo',
'Forgot your password?' => 'Zapomněli jste heslo?',
'New password has been sent' => 'Nové heslo bylo zaslané',
'Monstra says: This is not your profile...' => 'Monstra říká: Toto není Váš profil...',
'User registration is closed.' => 'Registrace uživatelů je uzavřená.',
'Allow user registration' => 'Povolit registraci uživatelů',
'Required field' => 'Povinné políčko',
'This user doesnt exist' => 'Tento uživatel neexistuje',
'Captcha code is wrong' => 'Captcha kód není správný',
'Your login details for :site_name has been sent' => 'Váše přihlašovací údaje pro :site_name byly zaslané',
'Your new password for :site_name' => 'Vaše nové heslo pro :site_name',
'Your login details for :site_name' => 'Vaše přihlašovací údaje pro :site_name',
'About Me' => 'O mně',
'Profile' => 'Profil',
'You are banned for 10 minutes. Try again later' => 'Máte ban na 10 minut. Zkuste to znovu později',
'Cancel' => 'Zrušit',
)
);
================================================
FILE: plugins/box/users/languages/de.lang.php
================================================
array(
'Users' => 'Benutzer',
'Login' => 'Login',
'Username' => 'Benutzername',
'Password' => 'Passwort',
'Registered' => 'Registriert',
'Email' => 'Email',
'Role' => 'Funktion',
'Roles' => 'Funktionen',
'Edit' => 'Bearbeiten',
'Actions' => 'Aktionen',
'Delete' => 'Löschen',
'Log In' => 'Einloggen',
'Log Out' => 'Abmelden',
'Register New User' => 'Registriere Neuen Benutzer',
'New User Registration' => 'Neuen Benutzer registrieren',
'Delete user: :user' => 'Lösche Benutzer: :user',
'User :user have been deleted.' => 'Benutzer :user wurde gelöscht.',
'This field should not be empty' => 'Dieses Feld darf nicht leer sein',
'This user alredy exist' => 'Dieser Benutzer existiert bereits',
'Changes saved' => 'Änderungen gespeichert',
'Wrong old password' => 'Altes Passwort falsch',
'Admin' => 'Admin',
'User' => 'Benutzer',
'Editor' => 'Redakteur',
'Register' => 'Registrieren',
'Edit profile' => 'Profil bearbeiten',
'Save' => 'Speichern',
'Firstname' => 'Vorname',
'Lastname' => 'Nachname',
'Old password' => 'Altes Passwort',
'New password' => 'Neues Passwort',
'Welcome' => 'Willkommen',
'Wrong username or password' => 'Falscher Benutzername oder Passwort',
'Your changes have been saved.' => 'Deine Änderungen wurden gespeichert.',
'New user have been registered.' => 'Neuer Benutzer wurde registriert.',
'Captcha' => 'Captcha',
'Registration' => 'Registrierung',
'Username' => 'Benutzername',
'User email is invalid' => 'Benutzer-Email ist nicht gültig',
'Reset Password' => 'Passwort zurücksetzen',
'Send New Password' => 'Neues Passwort zusenden',
'This user doesnt alredy exist' => 'Dieser Benutzer ist nocht nicht vorhanden',
'Users - Profile' => 'Benutzer - Profil',
'Users - Edit Profile' => 'Benutzer - Profil Bearbeiten',
'Users - Log In' => 'Benutzer - Log In',
'Users - Registration' => 'Benutzer - Registration',
'Users - Password Recover' => 'Benutzer - Passwort wiederherstellen',
'New Password' => 'Neues Passwort',
'Forgot your password?' => 'Passwort vergessen?',
'New password has been sent' => 'Neues Passwort wurde versendet',
'Monstra says: This is not your profile...' => 'Monstra sagt: Das ist nicht dein Profil...',
'User registration is closed.' => 'Benutzer Registration ist geschloßen.',
'Allow user registration' => 'Erlaube Benutzer Registration',
'Required field' => 'Pflichtfeld',
'This user doesnt exist' => 'Dieser Benutzer existiert nicht',
'Captcha code is wrong' => 'Captcha Code ist falsch',
'Your login details for :site_name has been sent' => 'Deine Login-Daten für :site_name wurden versendet',
'Your new password for :site_name' => 'Dein neues Passwort für :site_name',
'Your login details for :site_name' => 'Deine Login-Daten für :site_name',
'About Me' => 'Über Mich',
'Profile' => 'Profil',
'You are banned for 10 minutes. Try again later' => 'Du wurdest für 10 Minuten blockiert. Bitte probier es später nochmal',
'Cancel' => 'Abbrechen',
)
);
================================================
FILE: plugins/box/users/languages/en.lang.php
================================================
array(
'Users' => 'Users',
'Login' => 'Login',
'Username' => 'Username',
'Password' => 'Password',
'Registered' => 'Registered',
'Email' => 'Email',
'Role' => 'Role',
'Roles' => 'Roles',
'Edit' => 'Edit',
'Actions' => 'Actions',
'Delete' => 'Delete',
'Log In' => 'Log In',
'Log Out' => 'Log Out',
'Register New User' => 'Register New User',
'New User Registration' => 'New User Registration',
'Delete user: :user' => 'Delete user: :user',
'User :user have been deleted.' => 'User :user have been deleted.',
'This user already exists' => 'This user already exists',
'This email already exists' => 'This email already exists',
'Changes saved' => 'Changes saved',
'Wrong old password' => 'Wrong old password',
'Admin' => 'Admin',
'User' => 'User',
'Editor' => 'Editor',
'Register' => 'Register',
'Edit profile' => 'Edit profile',
'Save' => 'Save',
'Firstname' => 'Firstname',
'Lastname' => 'Lastname',
'Old password' => 'Old password',
'New password' => 'New password',
'Welcome' => 'Welcome',
'Wrong username or password' => 'Wrong username or password',
'Your changes have been saved.' => 'Your changes have been saved.',
'New user have been registered.' => 'New user have been registered.',
'Captcha' => 'Captcha',
'Registration' => 'Registration',
'Username' => 'Username',
'User email is invalid' => 'User email is invalid',
'Reset Password' => 'Reset Password',
'Send New Password' => 'Send New Password',
'This user doesnt alredy exist' => 'This user doesnt alredy exist',
'Users - Profile' => 'Users - Profile',
'Users - Edit Profile' => 'Users - Edit Profile',
'Users - Log In' => 'Users - Log In',
'Users - Registration' => 'Users - Registration',
'Users - Password Recover' => 'Users - Password Recover',
'New Password' => 'New Password',
'Forgot your password?' => 'Forgot your password?',
'New password has been sent' => 'New password has been sent',
'Monstra says: This is not your profile...' => 'Monstra says: This is not your profile...',
'User registration is closed.' => 'User registration is closed.',
'Allow user registration' => 'Allow user registration',
'Required field' => 'Required field',
'This user doesnt exist' => 'This user doesnt exist',
'Captcha code is wrong' => 'Captcha code is wrong',
'Your login details for :site_name has been sent' => 'Your login details for :site_name has been sent',
'Your new password for :site_name' => 'Your new password for :site_name',
'Your login details for :site_name' => 'Your login details for :site_name',
'About Me' => 'About Me',
'Profile' => 'Profile',
'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/users/languages/es.lang.php
================================================
array(
'Users' => 'Usuarios',
'Login' => 'Iniciar sesión',
'Username' => 'Nombre de usuario',
'Password' => 'Contraseña',
'Registered' => 'Fecha de registro',
'Email' => 'Correo electrónico',
'Role' => 'Nivel',
'Roles' => 'Niveles',
'Edit' => 'Editar',
'Actions' => 'Acciones',
'Delete' => 'Eliminar',
'Log In' => 'Iniciar sesión',
'Log Out' => 'Cerrar sesión',
'Register New User' => 'Registrar nuevo usuario',
'New User Registration' => 'Registro de nuevo usuario',
'Delete user: :user' => 'Eliminar usuario: :user',
'User :user have been deleted.' => 'El usuario :user ha sido eliminado.',
'This user alredy exist' => 'Este usuario ya existe',
'This email alredy exist' => 'Este correo ya existe',
'Changes saved' => 'Cambios guardados',
'Wrong old password' => 'Contraseña antigua incorrecta',
'Admin' => 'Administrador',
'User' => 'Usuario',
'Editor' => 'Editor',
'Register' => 'Registrar',
'Edit profile' => 'Editar perfil',
'Save' => 'Guardar',
'Firstname' => 'Nombre',
'Lastname' => 'Apellido',
'Old password' => 'Contraseña antigua',
'New password' => 'Nueva contraseña',
'Welcome' => 'Bienvenido',
'Wrong username or password' => 'Nombre de usuario o contraseña incorrectos',
'Your changes have been saved.' => 'Tus cambios han sido guardados.',
'New user have been registered.' => 'El nuevo usuario ha sido registrado.',
'Captcha' => 'Captcha',
'Registration' => 'Registro',
'Username' => 'Nombre de usuario',
'User email is invalid' => 'El correo del usuario es inválido',
'Reset Password' => 'Restablecer contraseña',
'Send New Password' => 'Enviar nueva contraseña',
'This user doesnt alredy exist' => 'Este usuario no existe aún',
'Users - Profile' => 'Usuarios - Perfil',
'Users - Edit Profile' => 'Usuarios - Editar perfil',
'Users - Log In' => 'Usuarios - Iniciar sesión',
'Users - Registration' => 'Usuarios - Registro',
'Users - Password Recover' => 'Usuarios - Recuperar contraseña',
'New Password' => 'Nueva contraseña',
'Forgot your password?' => '¿Olvidaste tu contraseña?',
'New password has been sent' => 'Tu nueva contraseña ha sido enviada',
'Monstra says: This is not your profile...' => 'Monstra dice: Este es tu perfil...',
'User registration is closed.' => 'El registro de usuarios está cerrado.',
'Allow user registration' => 'Permitir registro',
'Required field' => 'Campo requerido',
'This user doesnt exist' => 'Este usuario no existe',
'Captcha code is wrong' => 'Código captcha incorrecto',
'Your login details for :site_name has been sent' => 'Tus detalles para iniciar sesión en :site_name han sido enviados',
'Your new password for :site_name' => 'Tu nueva contraseña para :site_name',
'Your login details for :site_name' => 'Tus detalles para iniciar sesión en :site_name',
'About Me' => 'Acerca de mí',
'Profile' => 'Perfil',
'You are banned for 10 minutes. Try again later' => 'Has sido baneado por 10 minutos. Inténtalo nuevamente más tarde',
'Cancel' => 'Cancelar',
)
);
================================================
FILE: plugins/box/users/languages/fa.lang.php
================================================
array(
'Users' => 'کاربران',
'Login' => 'ورود',
'Username' => 'نام کاربری',
'Password' => 'پسورد',
'Registered' => 'عضو',
'Email' => 'ایمیل',
'Role' => 'سمت',
'Roles' => 'سمت',
'Edit' => 'ویرایش',
'Actions' => 'عملیات',
'Delete' => 'حذف',
'Enter' => 'ورود',
'Logout' => 'خروج',
'Register New User' => 'ثبت نام کاربر جدید',
'New User Registration' => 'ثبت نام کاربر جدید',
'Delete user: :user' => 'حذف کاربر: :user',
'User :user have been deleted.' => 'کاربر :user حذف شد.',
'This user already exists' => 'این کاربر هم اکنون وجود دارد',
'This email already exists' => 'این ایمیل هم اکنون وجود دارد',
'Changes saved' => 'تغییرات ذخیره شد',
'Wrong old password' => 'پسورد قدیمی اشتباه است',
'Admin' => 'مدیر',
'User' => 'کاربر',
'Editor' => 'ویرایشگر',
'Register' => 'عضو',
'Edit profile' => 'ویرایش پروفایل',
'Save' => 'ذخیره',
'Firstname' => 'نام کوچک',
'Lastname' => 'نام خانوادگی',
'Old password' => 'پسورد قدیم',
'New password' => 'پسورد جدید',
'Welcome' => 'خوش آمدید',
'Wrong username or password' => 'نام کاربری و یا پسورد اشتباه است',
'Your changes have been saved.' => 'تغییرات شما ذخیره شدند.',
'New user have been registered.' => 'کاربر جدید ثبت نام شد.',
'Captcha' => 'کدامنیتی',
'Registration' => 'ثبت نام',
'Username' => 'نام کاربری',
'User email is invalid' => 'ایمیل کاربر معتبر نیست',
'Reset Password' => 'تنظیم مجدد پسورد',
'Send New Password' => 'ارسال پسورد جدید',
'This user doesnt alredy exist' => 'این کاربر وجود ندارد',
'Users - Profile' => 'کاربران - پروفایل',
'Users - Edit Profile' => 'کاربران - ویرایش پروفایل',
'Users - Login' => 'کاربران - ورود',
'Users - Registration' => 'کاربران - ثبت نام',
'Users - Password Recover' => 'کاربران - بازیابی پسورد',
'New Password' => 'پسورد جدید',
'Forgot your password?' => 'پسورد خود را فراموش کرده اید؟',
'New password has been sent' => 'پسورد جدید ارسال شد',
'Monstra says: This is not your profile...' => 'مونسترا میگوید: این پروفایل شما نیست ...',
'User registration is closed.' => 'ثبت نام کاربر بسته شده است.',
'Allow user registration' => 'اجازه ثبت نام کاربر',
'Required field' => 'کادر الزامی',
'This user doesnt exist' => 'این کاربر وجود ندارد',
'Captcha code is wrong' => 'کدامنیتی اشتباه است',
'Your login details for :site_name has been sent' => 'جزئیات ورود شما برای :site_name ارسال شد',
'Your new password for :site_name' => 'پسورد جدید شما برای :site_name',
'Your login details for :site_name' => 'جزئیات ورود شما برای :site_name',
'About Me' => 'درباره من',
'Profile' => 'پروفایل',
'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/users/languages/fr.lang.php
================================================
array(
'Users' => 'Utilisateurs',
'Login' => 'Identifiant',
'Username' => 'Nom d\'utilisateur',
'Password' => 'Mot de passe',
'Registered' => 'Enregistrer',
'Email' => 'Email',
'Role' => 'Role',
'Roles' => 'Roles',
'Edit' => 'Editer',
'Actions' => 'Actions',
'Delete' => 'Supprimer',
'Enter' => 'Entrer',
'Logout' => 'Déconnexion',
'Register new user' => 'Inscription d\'un nouvel utilisateur',
'New User Registration' => 'Nouveau utilisateur enregistrer',
'Delete user: :user' => 'Supprimer l\'utilisateur: :user',
'User :user have been deleted.' => 'L\'utilisateur :user a été supprimer.',
'This user already exists' => 'Cet utilisateur existe déjà',
'This email already exists' => 'Cet email existe déjà',
'Changes saved' => 'Changements enregistrer',
'Wrong old password' => 'Ancien mot de passe erroné',
'Admin' => 'Admin',
'User' => 'Utilisateur',
'Editor' => 'Editeur',
'Register' => 'Enregistrer',
'Edit profile' => 'Editer le profil',
'Save' => 'Enregistrer',
'Firstname' => 'Prénom',
'Lastname' => 'Nom',
'Old password' => 'Ancien mot de passe',
'New password' => 'Nouveau mot de passe',
'Welcome' => 'Bienvenue',
'Wrong username or password' => 'Mauvais nom d\'utilisateur ou mot de passe',
'Your changes have been saved.' => 'Vos changements ont été sauvegardés.',
'New user have been registered.' => 'Le nouvel utilisateura été enregistrer.',
'Captcha' => 'Captcha',
'Registration' => 'Inscription',
'Username' => 'Nom d\'utilisateur',
'User email is invalid' => 'Le mot de passe utilisateur est invalide',
'Reset Password' => 'Réinitialiser le mot de passe',
'Send New Password' => 'Envoyer un nouveau mot de passe',
'This user doesnt alredy exist' => 'Cet utilisateur n\'existe pas',
'Users - Profile' => 'Utilisateurs - Profil',
'Users - Edit Profile' => 'Utilisateurs - Editer le profile',
'Users - Login' => 'Utilisateurs - Identifiant',
'Users - Registration' => 'Utilisateurs - Inscription',
'Users - Password Recover' => 'Utilisateurs - Récupération du mot de passe',
'New Password' => 'Nouveau mot de passe',
'Forgot your password?' => 'Mot de passe oublié ?',
'New password has been sent' => 'Un nouveau mot de passe a été envoyé',
'Monstra says: This is not your profile...' => 'Monstra dit: Ce n\'est pas votre profil ...',
'User registration is closed.' => 'L\'enregistrement d\'utilisateur est fermé.',
'Allow user registration' => 'Permettre l\'enregistrement des utilisateurs',
'Required field' => 'Champ requis',
'This user doesnt exist' => 'Cet utilisateur n\'existe pas',
'Captcha code is wrong' => 'Le code Captcha est faux',
'Your login details for :site_name has been sent' => 'Vos informations de connexion pour :site_name ont étés envoyé',
'Your new password for :site_name' => 'Votre nouveau mot de passe pour :site_name',
'Your login details for :site_name' => 'Vos identifiants de connexion pour :site_name',
'About Me' => 'A propos de moi',
'Profile' => 'Profil',
'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/users/languages/hu.lang.php
================================================
array(
'Users' => 'Felhasználók',
'Log In' => 'Belépés',
'Username' => 'Felhasználónév',
'Password' => 'Jelszó',
'Registered' => 'Regisztrált',
'Email' => 'E-mail',
'Role' => 'Státusz',
'Roles' => 'Státuszok',
'Edit' => 'Szerkeszt',
'Actions' => 'Műveletek',
'Delete' => 'Töröl',
'Enter' => 'Belépés',
'Log Out' => 'Kilépés',
'Register New User' => 'Új felhasználó regisztrálása',
'New User Registration' => 'Új felhasználó regisztráció',
'Delete user: :user' => 'Felhasználó törlése: :user',
'User :user have been deleted.' => 'A :user nevű felhasználó törölve.',
'This user already exists' => 'Ez a felhasználónév már létezik',
'This email already exists' => 'Az e-mail már létezik',
'Changes saved' => 'Változtatások elmentve',
'Wrong old password' => 'Rossz a régi jelszó',
'Admin' => 'Admin',
'User' => 'Felhasználó',
'Editor' => 'Szerkesztő',
'Register' => 'Mehet',
'Edit profile' => 'Profil szerkesztése',
'Save' => 'Mentés',
'Firstname' => 'Keresztnév',
'Lastname' => 'Vezetéknév',
'Old password' => 'Régi jelszó',
'New password' => 'Új jelszó',
'Welcome' => 'Üdvözlünk',
'Wrong username or password' => 'Hibás username vagy password',
'Your changes have been saved.' => 'A módosítások mentése megtörtént.',
'New user have been registered.' => 'Új felhasználó regisztrálva.',
'Captcha' => 'Captcha',
'Registration' => 'Regisztráció',
'Username' => 'Felhasználónév',
'User email is invalid' => 'A felhasználó e-mail cím érvénytelen',
'Reset Password' => 'Jelszó törlése',
'Send New Password' => 'Új jelszó küldése',
'This user doesnt alredy exist' => 'Ez a felhasználó nem létezik',
'Users - Profile' => 'Felhasználók - Profil',
'Users - Edit Profile' => 'Felhasználók - Profil szerkesztése',
'Users - Login' => 'Felhasználók - Belépés',
'Users - Registration' => 'Felhasználók - Regisztráció',
'Users - Password Recover' => 'Felhasználók - Elfelejtett jelszó',
'New Password' => 'Új jelszó',
'Forgot your password?' => 'Elfelejtette a jelszavát?',
'New password has been sent' => 'Az új jelszót elküldtük',
'Monstra says: This is not your profile...' => 'Monstra mondja: Ez nem a Ön profilja ...',
'User registration is closed.' => 'Felhasználó regisztráció lezárult.',
'Allow user registration' => 'Felhasználó regisztráció engedélyezve',
'Required field' => 'Kötelező mező',
'This user doesnt exist' => 'Ez a felhasználó nem létezik',
'Captcha code is wrong' => 'Captcha kód hibás',
'Your login details for :site_name has been sent' => 'Elküldve a belépési adatai a(z) :site_name weboldalhoz',
'Your new password for :site_name' => 'Új jelszó a(z) :site_name weboldalhoz',
'Your login details for :site_name' => 'Belépési adatok a(z) :site_name weboldalhoz',
'About Me' => 'Rólam',
'Profile' => 'Profil',
'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/users/languages/id.lang.php
================================================
array(
'Users' => 'Pengguna',
'Login' => 'Masuk',
'Username' => 'Pengguna',
'Password' => 'Password',
'Registered' => 'Terdaftar',
'Email' => 'Email',
'Role' => 'Peran',
'Roles' => 'Peranan',
'Edit' => 'Perbaiki',
'Actions' => 'Tindakan',
'Delete' => 'Hapus',
'Enter' => 'Masukkan',
'Logout' => 'Keluar',
'Register New User' => 'Daftarkan Pengguna Baru',
'New User Registration' => 'Pendaftaran Pengguna Baru',
'Delete user: :user' => 'Hapus pengguna: :user',
'User :user have been deleted.' => 'Pengguna :user telah dihapus.',
'This user already exists' => 'Pengguna ini sudah terdaftar',
'This email already exists' => 'Email',
'Changes saved' => 'Perubahan disimpan',
'Wrong old password' => 'Password lama salah',
'Admin' => 'Admin',
'User' => 'Pengguna',
'Editor' => 'Editor',
'Register' => 'Daftar',
'Edit profile' => 'Perbaiki Profil',
'Save' => 'Simpan',
'Firstname' => 'Nama Pertama',
'Lastname' => 'Nama Terakhir',
'Old password' => 'Password Lama',
'New password' => 'Password Baru',
'Welcome' => 'Selamat Datang',
'Wrong username or password' => 'Kesalahan nama pengguna atau password',
'Your changes have been saved.' => 'Perubahan telah disimpan.',
'New user have been registered.' => 'Pengguna baru telah terdaftar.',
'Captcha' => 'Verifikasi',
'Registration' => 'Pendaftaran',
'Username' => 'Nama Pengguna',
'User email is invalid' => 'Email tidak cocok',
'Reset Password' => 'Mengganti Password',
'Send New Password' => 'Mengirim password baru',
'This user doesnt alredy exist' => 'Pengguna ini belum ada',
'Users - Profile' => 'Pengguna - Profil',
'Users - Edit Profile' => 'Pengguna - Perbaiki Profil',
'Users - Login' => 'Pengguna - Masuk',
'Users - Registration' => 'Pengguna - Pendaftaran',
'Users - Password Recover' => 'Pengguna - Mendapatkan Kembali Password',
'New Password' => 'Password Baru',
'Forgot your password?' => 'Lupa Password Anda?',
'New password has been sent' => 'Password baru telah dikirim',
'Monstra says: This is not your profile...' => 'Katanya Monstra: Ini bukan profil Anda ...',
'User registration is closed.' => 'Pendaftaran pengguna telah ditutup.',
'Allow user registration' => 'Izinkan pendaftaran pengguna',
'Required field' => 'Isian yang diperlukan',
'This user doesnt exist' => 'Pengguna ini tidak terdaftar',
'Captcha code is wrong' => 'Kode verifikasi salah',
'Your login details for :site_name has been sent' => 'Rincian data :site_name telah dikirim',
'Your new password for :site_name' => 'Password baru untuk :site_name',
'Your login details for :site_name' => 'Rincian data untuk :site_name',
'About Me' => 'Tentang Saya',
'Profile' => 'Profil',
'You are banned for 10 minutes. Try again later' => 'Anda dilarang masuk selama 10 menit. Silahkan dicoba lagi nanti',
)
);
================================================
FILE: plugins/box/users/languages/it.lang.php
================================================
array(
'Users' => 'Utenti',
'Login' => 'Login',
'Password' => 'Password',
'Email' => 'E-mail',
'Registered' => 'Registrato',
'Role' => 'Ruolo',
'Roles' => 'Ruoli',
'Actions' => 'Azioni',
'Edit' => 'Modifica',
'Delete' => 'Cancella',
'Log In' => 'Log In',
'Log Out' => 'Esci',
'Register New User' => 'Crea Un Account',
'Delete user: :user' => 'Elimina utente: :user',
'User :user have been deleted.' => 'Utente :user è stato eliminato.',
'This user already exists' => 'Tale utente è già esistente',
'This email already exists' => 'Tale ta email è già esistente',
'Changes saved' => 'Le modifiche sono state salvate',
'Wrong old password' => 'Vecchia password errata',
'Admin' => 'Amministratore',
'User' => 'Utente',
'Editor' => 'Editore',
'Register' => 'Registrazione',
'Edit profile' => 'Modifica profilo',
'Save' => 'Salva',
'Firstname' => 'Nome',
'Lastname' => 'Cognome',
'Old password' => 'Vecchia password',
'New password' => 'Nuova password',
'Welcome' => 'Benvenuto',
'Wrong username or password' => 'username o password errata',
'Your changes have been saved.' => 'Le modifiche sono state salvate.',
'New user have been registered.' => 'Nuovo utente è stato registrato.',
'Captcha' => 'Codice captcha',
'Registration' => 'Registrazione',
'Username' => 'Nome utente',
'User email is invalid' => 'E-mail non valido',
'Reset Password' => 'Resetta la password',
'Send New Password' => 'Invia la password',
'Users - Profile' => 'Utenti - Profilo',
'Users - Edit Profile' => 'Utenti - Modifica profilo',
'Users - Log In' => 'Utenti - Log In',
'Users - Registration' => 'Utenti - Registrazione',
'Users - Password Recover' => 'Utenti - Password Recovery',
'New Password' => 'Nuova password',
'Forgot your password?' => 'Password dimenticata?',
'New password has been sent' => 'Nuova password è stata inviata',
'Monstra says: This is not your profile...' => 'Monstra dice: Questo non è il tuo profilo.',
'User registration is closed.' => 'Registrazione utenti è chiusa.',
'Allow user registration' => 'Consenti registrazione utenti.',
'Required field' => 'Campo obbligatorio',
'This user doesnt exist' => 'Tale utente non esiste',
'Captcha code is wrong' => 'Codice captcha errato',
'Your login details for :site_name has been sent' => 'I tuoi dati di accesso :site_name sono stati inviati',
'Your new password for :site_name' => 'La tua nuova password per :site_name',
'Your login details for :site_name' => 'I tuoi dati di accesso per :site_name',
'About Me' => 'Su di me',
'Profile' => 'Profilo',
'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/users/languages/ja.lang.php
================================================
array(
'Users' => 'ユーザー',
'Login' => 'ログイン',
'Username' => 'ユーザー名',
'Password' => 'パスワード',
'Registered' => '登録日',
'Email' => 'メールアドレス',
'Role' => 'ロール',
'Roles' => 'ロール',
'Edit' => '編集',
'Actions' => '操作',
'Delete' => '削除',
'Log In' => 'ログイン',
'Log Out' => 'ログアウト',
'Register New user' => '新規ユーザー登録',
'New User Registration' => '新規ユーザーの登録',
'Delete user: :user' => 'ユーザーの削除: :user',
'User :user have been deleted.' => 'ユーザー :user は削除されました。',
'This user already exists' => 'ユーザーはすでに存在しています。',
'This email already exists' => 'このメールアドレスはすでに存在しています。',
'Changes saved' => '変更は保存されました',
'Wrong old password' => '古いパスワードが間違っています',
'Admin' => '管理者',
'User' => 'ユーザー',
'Editor' => '編集者',
'Register' => '登録',
'Edit profile' => 'プロフィールの編集',
'Save' => '保存',
'Firstname' => '名',
'Lastname' => '姓',
'Old password' => '古いパスワード',
'New password' => '新しいパスワード',
'Welcome' => 'ようこそ',
'Wrong username or password' => 'ユーザー名 または パスワード が不正です',
'Your changes have been saved.' => '変更は保存されました。',
'New user have been registered.' => '新規ユーザーが登録されました。',
'Captcha' => 'Captcha',
'Registration' => '登録',
'Username' => 'ユーザー名',
'User email is invalid' => 'ユーザーのメールアドレスが無効です',
'Reset Password' => 'パスワードをリセット',
'Send New Password' => '新しいパスワードを送信しました。',
'This user doesnt alredy exist' => 'このユーザーはすでに存在しています。',
'Users - Profile' => 'ユーザー - プロフィール',
'Users - Edit Profile' => 'ユーザー - プロフィールの編集',
'Users - Log In' => 'ユーザー - ログイン',
'Users - Registration' => 'ユーザー - 登録',
'Users - Password Recover' => 'ユーザー - パスワードの復帰',
'New Password' => '新しいパスワード',
'Forgot your password?' => 'パスワードを忘れましたか?',
'New password has been sent' => '新しいパスワードを送信しました。',
'Monstra says: This is not your profile...' => 'Monstraより: これはあなたのプロフィールではありません...',
'User registration is closed.' => '現在ユーザー登録はできません。',
'Allow user registration' => 'ユーザー登録可能',
'Required field' => '必須項目',
'This user doesnt exist' => 'ユーザーは存在しません',
'Captcha code is wrong' => 'Captchaコードが間違っています',
'Your login details for :site_name has been sent' => 'Your login details for :site_name has been sent',
'Your new password for :site_name' => 'Your new password for :site_name',
'Your login details for :site_name' => 'Your login details for :site_name',
'About Me' => 'ひとこと',
'Profile' => 'プロフィール',
'You are banned for 10 minutes. Try again later' => '10分間ログインができません。後ほどお試しください。',
)
);
================================================
FILE: plugins/box/users/languages/ka-ge.lang.php
================================================
array(
'Users' => 'მომხმარებლები',
'Login' => 'შესვლა',
'Password' => 'პაროლი',
'Email' => 'ელ-ფოსტა',
'Registered' => 'დარეგისტრირებული',
'Role' => 'როლი',
'Roles' => 'როლები',
'Actions' => 'მოქმედება',
'Edit' => 'რედაქტირება',
'Delete' => 'წაშლა',
'Log In' => 'შესვლა',
'Log Out' => 'გომოსვლა',
'Register New User' => 'ახალი მომხმარებლის რეგისტრაცია',
'New User Registration' => 'ახალი მომხმარებლის რეგისტრაცია',
'Delete user: :user' => 'მომხმარებლის წაშლა: :user',
'User :user have been deleted.' => 'მომხმარებელი :user წაშლილია.',
'This user already exists' => 'ეს მომხმარებელი უკვე არსებობს',
'This email already exists' => 'ეს ელ-ფოსტა უკვე არსებობს',
'Changes saved' => 'ცვლილებები შენახულია',
'Wrong old password' => 'არასწორი ძველი პაროლი',
'Admin' => 'ადმინისტრატორი',
'User' => 'მომხმარებელი',
'Editor' => 'რედაქტორი',
'Register' => 'რეგისტრაცია',
'Edit profile' => 'მომხმარებლის პროფილის რედაქტირება',
'Save' => 'შენახვა',
'Firstname' => 'სახელი',
'Lastname' => 'გვარი',
'Old password' => 'ძველი პაროლი',
'New password' => 'ახალი პაროლი',
'Welcome' => 'მოგესალმებით',
'Wrong username or password' => 'არასწორი ლოგინი ან პაროლი',
'Your changes have been saved.' => 'თქვენი ცვლილებები შენახულია.',
'New user have been registered.' => 'ახლი მომხმარებელი დარეგისტრირდა.',
'Captcha' => 'Captcha',
'Registration' => 'რეგისტრაცია',
'Username' => 'მომხმარებლის სახელი',
'User email is invalid' => 'ელ-ფოსტა არასწორია',
'Reset Password' => 'პაროლის რესეტი',
'Send New Password' => 'პაროლის გაგზავნა',
'Users - Profile' => 'მომხმარებლები - პროფილი',
'Users - Edit Profile' => 'მომხმარებლები - პროფილის რედაქტირება',
'Users - Log In' => 'მომხმარებლები - შესვლა',
'Users - Registration' => 'მომხმარებლები - რეგისტრაცია',
'Users - Password Recover' => 'მომხმარებლები - პაროლის აღდგენა',
'New Password' => 'ახალი პაროლი',
'Forgot your password?' => 'პაროლი დაგავიწყდათ?',
'New password has been sent' => 'ახალი პაროლი გაგზავნილია',
'Monstra says: This is not your profile...' => 'Monstra ამბობს: ეს არ არის შენი პროფილი...',
'User registration is closed.' => 'მომხმარებლების რეგისტრაცია დახურულია.',
'Allow user registration' => 'მომხმარებლების რეგისტრაციას ნების მიცემა.',
'Required field' => 'აუცილებელი ველი',
'This user doesnt exist' => 'ასეთი მომხმარებელი არ არსებობს',
'Captcha code is wrong' => 'Captcha-ზე პასუხი არასწორია!',
'Your login details for :site_name has been sent' => 'თქვენი მონაცემები :site_name -ის მისაწვდომად გაგზავნილია',
'Your new password for :site_name' => 'თქვენი ახალი პაროლი :site_name -თვის',
'Your login details for :site_name' => 'თქვენი მონაცემები :site_name -ის მისაწვდომად',
'About Me' => 'ჩემს შესახებ',
'Profile' => 'პროფილი',
'You are banned for 10 minutes. Try again later' => 'თქვენ 10 წუთით ხართ დაბლოკილი. სცადეთ მოგვიანებით',
'Cancel' => 'გაუქმება',
)
);
================================================
FILE: plugins/box/users/languages/lt.lang.php
================================================
array(
'Users' => 'Naudotojai',
'Login' => 'Prisijungti',
'Username' => 'Prisijungimo vardas',
'Password' => 'Slaptažodis',
'Registered' => 'Registruotis',
'Email' => 'El. paštas',
'Role' => 'Rolė',
'Roles' => 'Rolės',
'Edit' => 'Redaguoti',
'Actions' => 'Veiksmai',
'Delete' => 'Ištrinti',
'Log In' => 'Prisijungti',
'Log Out' => 'Atsijungti',
'Register New User' => 'Užregistruoti Naują Naudotoją',
'New User Registration' => 'Naujo naudotojo registracija',
'Delete user: :user' => 'Ištrinti naudotoją :user',
'User :user have been deleted.' => 'Naudotojas :user ištrintas.',
'This field should not be empty' => 'Šis laukas negali būti tuščias',
'This user alredy exist' => 'Toks naudotojas jau yra',
'Changes saved' => 'Pakeitimai išsaugoti',
'Wrong old password' => 'Neteisingas senas slaptažodis',
'Admin' => 'Administratorius',
'User' => 'Naudotojas',
'Editor' => 'Redaktorius',
'Register' => 'Užregistruoti',
'Edit profile' => 'Redaguoti profilį',
'Save' => 'Išsaugoti',
'Firstname' => 'Vardas',
'Lastname' => 'Pavardė',
'Old password' => 'Senas slaptažodis',
'New password' => 'Naujas slaptažodis',
'Welcome' => 'Sveiki',
'Wrong username or password' => 'Neteisingas prisijungimo vardas arba slaptažodis',
'Your changes have been saved.' => 'Pakeitimai išsaugoti.',
'New user have been registered.' => 'Nauja naudotojas užregistruotas.',
'Captcha' => 'Saugos kodas',
'Registration' => 'Registracija',
'User email is invalid' => 'Neteisingas naudotojo el. pašto adresas',
'Reset Password' => 'Atstatyti slaptažodį',
'Send New Password' => 'Išsiųsti naują slaptažodį',
'This user doesnt alredy exist' => 'Tokio naudoto nebėra',
'Users - Profile' => 'Naudotojai - Profilis',
'Users - Edit Profile' => 'Naudotojai - Redaguoti profilį',
'Users - Log In' => 'Naudotojai - Prisijungti',
'Users - Registration' => 'Naudotojai - Registracija',
'Users - Password Recover' => 'Naudotojai - Slaptažodžio priminimas',
'New Password' => 'Naujas slaptažodis',
'Forgot your password?' => 'Pamiršai slaptažodį?',
'New password has been sent' => 'Naujas slaptažodis išsiųstas',
'Monstra says: This is not your profile...' => 'Monstra sako: profilis ne tavo...',
'User registration is closed.' => 'Registracija uždaryta.',
'Allow user registration' => 'Leisti registruotis naudotojams',
'Required field' => 'Privalomas laukas',
'This user doesnt exist' => 'Tokio naudotojo nėra',
'Captcha code is wrong' => 'Saugos kodas neteisingas',
'Your login details for :site_name has been sent' => 'Prisijungimo duomenys prie :site_name išsiųsti',
'Your new password for :site_name' => 'Naujas :site_name slaptažodis',
'Your login details for :site_name' => 'Prisijungimo prie :site_name detalės',
'About Me' => 'Apie mane',
'Profile' => 'Profilis',
'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/users/languages/nl.lang.php
================================================
array(
'Users' => 'Gebruikers',
'Login' => 'Login',
'Username' => 'Gebruikersnaam',
'Password' => 'Wachtwoord',
'Registered' => 'Geregistreerd',
'Email' => 'Email',
'Role' => 'Type',
'Roles' => 'Types',
'Edit' => 'Bewerken',
'Actions' => 'Acties',
'Delete' => 'Verwijderen',
'Log In' => 'Log in',
'Log Out' => 'Uitloggen',
'Register New User' => 'Nieuwe gebruiker',
'New User Registration' => 'Registratie nieuwe gebruiker',
'Delete user: :user' => 'Verwijder gebruiker: :user',
'User :user have been deleted.' => 'Gebruiker :user is verwijderd.',
'This field should not be empty' => 'Dit veld mag niet leeg zijn',
'This user alredy exist' => 'Deze gebruiker bestaat al',
'Changes saved' => 'Wijzigingen opgeslagen',
'Wrong old password' => 'Foutief oud wachtwoord',
'Admin' => 'Admin',
'User' => 'Gebruiker',
'Editor' => 'Redacteur',
'Register' => 'Registreer',
'Edit profile' => 'Profiel bewerken',
'Save' => 'Opslaan',
'Firstname' => 'Voornaam',
'Lastname' => 'Achternaam',
'Old password' => 'Oude wachtwoord',
'New password' => 'Nieuw wachtwoord',
'Welcome' => 'Welkom',
'Wrong username or password' => 'Foutieve gebruikersnaam of wachtwoord',
'Your changes have been saved.' => 'De wijzigingen zijn opgeslagen.',
'New user have been registered.' => 'Nieuwe gebruiker is geregistreerd.',
'Captcha' => 'Captcha',
'Registration' => 'Registratie',
'Username' => 'Gebruikersnaam',
'User email is invalid' => 'Gebruikers email is ongeldig',
'Reset Password' => 'Wachtwoord Opnieuw Instellen',
'Send New Password' => 'Verzend nieuw wachtwoord',
'This user doesnt alredy exist' => 'Deze gebruiker bestaat nog niet',
'Users - Profile' => 'Gebruikers - Profiel',
'Users - Edit Profile' => 'Gebruikers - Bewerk profiel',
'Users - Log In' => 'Gebruikers - Log In',
'Users - Registration' => 'Gebruikers - Registratie',
'Users - Password Recover' => 'Gebruikers - Wachtwoord opnieuw instellen',
'New Password' => 'Nieuw wachtwoord',
'Forgot your password?' => 'Wachtwoord vergeten?',
'New password has been sent' => 'Nieuw wachtwoord is verzonden',
'Monstra says: This is not your profile...' => 'Monstra zegt: dit is niet uw profiel...',
'User registration is closed.' => 'Gebruikersregistratie is gesloten.',
'Allow user registration' => 'Sta gebruikersregistratie toe',
'Required field' => 'Vereist veld',
'This user doesnt exist' => 'Deze gebruiker bestaat niet',
'Captcha code is wrong' => 'Captcha Code is helaas foutief',
'Your login details for :site_name has been sent' => 'Uw login details voor :site_name worden verzonden',
'Your new password for :site_name' => 'Uw nieuwe wachtwoord voor :site_name',
'Your login details for :site_name' => 'Uw login details voor :site_name',
'About Me' => 'Over mij',
'Profile' => 'Profiel',
'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/users/languages/pl.lang.php
================================================
array(
'Users' => 'Użytkownicy',
'Login' => 'Login',
'Username' => 'Nazwa użytkownika',
'Password' => 'Hasło',
'Registered' => 'Zarejestrowany',
'Email' => 'Email',
'Role' => 'Rola',
'Roles' => 'Role',
'Edit' => 'Edytuj',
'Actions' => 'Akcje',
'Delete' => 'Usuń',
'Log In' => 'Zaloguj',
'Log Out' => 'Wyloguj',
'Register New user' => 'Zarejestruj nowego użytkownika',
'New User Registration' => 'Rejestracja nowego użytkownika',
'Delete user: :user' => 'Czy napewno usunąć użytkownika: :user',
'User :user have been deleted.' => 'Użytkownik :user został usunięty.',
'This user already exists' => 'Ten użytkownik już istnieje',
'This email already exists' => 'Ten email już istnieje',
'Changes saved' => 'Zmiany zostały zapisane',
'Wrong old password' => 'Stare hasło jest niewłaściwe',
'Admin' => 'Wydawca',
'User' => 'Użytkownik',
'Editor' => 'Redaktor',
'Register' => 'Zarejestruj',
'Edit profile' => 'Edytuj profil',
'Save' => 'Zapisz',
'Firstname' => 'Imię',
'Lastname' => 'Nazwisko',
'Old password' => 'Stare hasło',
'New password' => 'Nowe hasło',
'Welcome' => 'Witaj',
'Wrong username or password' => 'Niewłaściwa nazwa użytkownika lub hasło',
'Your changes have been saved.' => 'Twoje zmiany zostały zapisane.',
'New user have been registered.' => 'Nowy użytkownik został zarejestrowany.',
'Captcha' => 'Captcha',
'Registration' => 'Rejestracja',
'Username' => 'Nazwa użytkownika',
'User email is invalid' => 'Email użytkownika jest nieprawidłowy',
'Reset Password' => 'Resetuj hasło',
'Send New Password' => 'Wyślij nowe hasło',
'This user doesnt alredy exist' => 'Ten użytkownik już nie istnieje',
'Users - Profile' => 'Użytkownicy - Profil',
'Users - Edit Profile' => 'Użytkownicy - Edytuj profil',
'Users - Log In' => 'Użytkownicy - Zaloguj',
'Users - Registration' => 'Użytkownicy - Rejestracja',
'Users - Password Recover' => 'Użytkownicy - Odzyskaj hasło',
'New Password' => 'Nowe hasło',
'Forgot your password?' => 'Nie pamiętasz swojego hasła?',
'New password has been sent' => 'Nowe hasło zostało wysłane',
'Monstra says: This is not your profile...' => 'Monstra mówi: To nie jest Twój profil...',
'User registration is closed.' => 'Rejestracja użytkowników jest zamknięta.',
'Allow user registration' => 'Pozwól na rejestrację użytkowników',
'Required field' => 'Pole wymagane',
'This user doesnt exist' => 'Ten użytkownik nie istnieje',
'Captcha code is wrong' => 'Kod captcha jest niewłaściwy',
'Your login details for :site_name has been sent' => 'Twoje dane logowania dla :site_name zostały wysłane',
'Your new password for :site_name' => 'Twoje nowe hasło dla :site_name',
'Your login details for :site_name' => 'Twoje dane logowania dla :site_name',
'About Me' => 'O mnie',
'Profile' => 'Profil',
'You are banned for 10 minutes. Try again later' => 'Jesteś zbanowany na 10 minut. Spróbuj ponownie później',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/users/languages/pt-br.lang.php
================================================
array(
'Users' => 'Usuários',
'Login' => 'Login',
'Username' => 'Usuário',
'Password' => 'Senha',
'Registered' => 'Registrado',
'Email' => 'Email',
'Role' => 'Grupo',
'Roles' => 'Grupos',
'Edit' => 'Editar',
'Actions' => 'Ações',
'Delete' => 'Deletar',
'Log In' => 'Log In',
'Log Out' => 'Sair',
'Register New User' => 'Registrar Novo Usuário',
'New User Registration' => 'Novo usuário registrado',
'Delete user: :user' => 'Deletar o usuário: :user',
'User :user have been deleted.' => 'O usuário :user foi deletado.',
'This field should not be empty' => 'Este campo não pode estar vazio',
'This user alredy exist' => 'Este usuário já existe',
'Changes saved' => 'Alterações salvas',
'Wrong old password' => 'Senha antiga incorreta',
'Admin' => 'Admin',
'User' => 'Usuário',
'Editor' => 'Editor',
'Register' => 'Registrar',
'Edit profile' => 'Editar perfil',
'Save' => 'Salvar',
'Firstname' => 'Nome',
'Lastname' => 'Sobrenome',
'Old password' => 'Senha antiga',
'New password' => 'Senha nova',
'Welcome' => 'Bem vindo',
'Wrong username or password' => 'usuário ou senha incorretos',
'Your changes have been saved.' => 'Suas alterações foram salvas.',
'New user have been registered.' => 'Novo usuário registrado.',
'Captcha' => 'Captcha',
'Registration' => 'Registração',
'Username' => 'Nome de usuário',
'User email is invalid' => 'O email do usuário é inválido',
'Reset Password' => 'Resetar sebga',
'Send New Password' => 'Enviar nova senha',
'This user doesnt alredy exist' => 'Este usuário não existe ainda',
'Users - Profile' => 'Usuários - Perfil',
'Users - Edit Profile' => 'Usuários - Editar Perfil',
'Users - Log In' => 'Usuários - Log In',
'Users - Registration' => 'Usuários - Registração',
'Users - Password Recover' => 'Usuários - Lembrar Senha',
'New Password' => 'Nova senha',
'Forgot your password?' => 'Esqueceu sua senha?',
'New password has been sent' => 'A nova senha foi enviada',
'Monstra says: This is not your profile...' => 'Monstra diz: Este não é o seu perfil...',
'User registration is closed.' => 'O registro de usuários está desativado.',
'Allow user registration' => 'Permitir novos registros de usuários',
'Required field' => 'Campo requerido',
'This user doesnt exist' => 'Este usuário não existe',
'Captcha code is wrong' => 'O captcha está errado',
'Your login details for :site_name has been sent' => 'Seus dados de login para o site :site_name foram enviados',
'Your new password for :site_name' => 'Sua nova senha para o site :site_name',
'Your login details for :site_name' => 'Seu novo login para o site :site_name',
'About Me' => 'Sobre mim',
'Profile' => 'Perfil',
'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/users/languages/ru.lang.php
================================================
array(
'Users' => 'Пользователи',
'Login' => 'Вход',
'Password' => 'Пароль',
'Email' => 'Эл. почта',
'Registered' => 'Зарегистрирован',
'Role' => 'Роль',
'Roles' => 'Роли',
'Actions' => 'Действия',
'Edit' => 'Редактировать',
'Delete' => 'Удалить',
'Log In' => 'Вход',
'Log Out' => 'Выход',
'Register New User' => 'Регистрация нового пользователя',
'New User Registration' => 'Регистрация нового пользователя',
'Delete user: :user' => 'Удалить пользователя: :user',
'User :user have been deleted.' => 'Пользователь :user удален.',
'This user already exists' => 'Такой пользователь уже существует',
'This email already exists' => 'Такая эл. почта уже существует',
'Changes saved' => 'Изменения сохранены',
'Wrong old password' => 'Неправильный старый пароль',
'Admin' => 'Администратор',
'User' => 'Пользователь',
'Editor' => 'Редактор',
'Register' => 'Регистрация',
'Edit profile' => 'Редактирование профиля пользователя',
'Save' => 'Сохранить',
'Firstname' => 'Имя',
'Lastname' => 'Фамилия',
'Old password' => 'Старый пароль',
'New password' => 'Новый пароль',
'Welcome' => 'Добро пожаловать',
'Wrong username or password' => 'Неправильный логин или пароль',
'Your changes have been saved.' => 'Ваши изменения были сохранены.',
'New user have been registered.' => 'Новый пользователь был зарегистрирован.',
'Captcha' => 'Каптча',
'Registration' => 'Регистрация',
'Username' => 'Имя пользователя',
'User email is invalid' => 'Эл. почта является недействительной',
'Reset Password' => 'Сбросить пароль',
'Send New Password' => 'Отправить пароль',
'Users - Profile' => 'Пользователи - Профиль',
'Users - Edit Profile' => 'Пользователи - Редактирование профиля',
'Users - Log In' => 'Пользователи - Вход',
'Users - Registration' => 'Пользователи - Регистрация',
'Users - Password Recover' => 'Пользователи - Восстановление пароля',
'New Password' => 'Новый пароль',
'Forgot your password?' => 'Забыли пароль?',
'New password has been sent' => 'Новый пароль был отправлен',
'Monstra says: This is not your profile...' => 'Монстра говорит: Это не твой профиль...',
'User registration is closed.' => 'Регистрация пользователей закрыта.',
'Allow user registration' => 'Разрешить регистрацию пользователей.',
'Required field' => 'Обязательное поле',
'This user doesnt exist' => 'Такого пользователя не существует',
'Captcha code is wrong' => 'Неверный код каптча',
'Your login details for :site_name has been sent' => 'Ваши данные для доступа к :site_name были отправлены',
'Your new password for :site_name' => 'Ваш новый пароль для :site_name',
'Your login details for :site_name' => 'Ваши данные для доступа к :site_name',
'About Me' => 'Обо мне',
'Profile' => 'Профиль',
'You are banned for 10 minutes. Try again later' => 'Вы заблокированы на 10 минут. Попробуйте позже',
'Cancel' => 'Отмена',
)
);
================================================
FILE: plugins/box/users/languages/sk.lang.php
================================================
array(
'Users' => 'Používatelia',
'Login' => 'Prihlásiť',
'Username' => 'Prihlasovacie meno',
'Password' => 'Heslo',
'Registered' => 'Registrovaný',
'Email' => 'Email',
'Role' => 'Úloha',
'Roles' => 'Úlohy',
'Edit' => 'Editovať',
'Actions' => 'Akcie',
'Delete' => 'Vymazať',
'Log In' => 'Log In',
'Log Out' => 'Odhlásiť',
'Register New User' => 'Registrácia Nového Používateľa',
'New User Registration' => 'Registrácia nového používateľa',
'Delete user: :user' => 'Vymazať používateľa: :user',
'User :user have been deleted.' => 'Používateľ :user bol vymazaný.',
'This user already exists' => 'Tento používateľ už existuje',
'This email already exists' => 'Tento email už existuje',
'Changes saved' => 'Uložiť zmeny',
'Wrong old password' => 'Nesprávne staré heslo',
'Admin' => 'Administrátor',
'User' => 'Používateľ',
'Editor' => 'Editor',
'Register' => 'Registrovať',
'Edit profile' => 'Editovať profil',
'Save' => 'Uložiť',
'Firstname' => 'Krstné meno',
'Lastname' => 'Priezvisko',
'Old password' => 'Staré heslo',
'New password' => 'Nové heslo',
'Welcome' => 'Vitajte',
'Wrong username or password' => 'Nesprávne username or password',
'Your changes have been saved.' => 'Vaše zmeny boli uložené.',
'New user have been registered.' => 'Nový používateľ bol zaregistrovaný.',
'Captcha' => 'Captcha',
'Registration' => 'Registrácia',
'Username' => 'Používateľské heslo',
'User email is invalid' => 'Používateľský email nie je v správnom tvare',
'Reset Password' => 'Obnoviť heslo',
'Send New Password' => 'Poslať nové heslo',
'This user doesnt alredy exist' => 'Tento používateľ neexistuje',
'Users - Profile' => 'Používatelia - Profil',
'Users - Edit Profile' => 'Používatelia - Editovať Profil',
'Users - Log In' => 'Používatelia - Prihlásenie',
'Users - Registration' => 'Používatelia - Registrácia',
'Users - Password Recover' => 'Používatelia - Obnova hesla',
'New Password' => 'Nové heslo',
'Forgot your password?' => 'Zabudli ste heslo?',
'New password has been sent' => 'Nové heslo bolo zaslané',
'Monstra says: This is not your profile...' => 'Monstra hovorí: Toto nie je Váš profil...',
'User registration is closed.' => 'Registrácia používateľov je uzavretá.',
'Allow user registration' => 'Povoliť registráciu používateľov',
'Required field' => 'Povinné políčko',
'This user doesnt exist' => 'Tento používateľ neexistuje',
'Captcha code is wrong' => 'Captcha kód nie je správny',
'Your login details for :site_name has been sent' => 'Váše prihlasovacie detaily pre :site_name boli zaslané',
'Your new password for :site_name' => 'Vaše nové heslo pre :site_name',
'Your login details for :site_name' => 'Vaše prihlasovacie detaily pre :site_name',
'About Me' => 'O mne',
'Profile' => 'Profil',
'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',
'Cancel' => 'Cancel',
)
);
================================================
FILE: plugins/box/users/languages/sr.lang.php
================================================
array(
'Users' => 'Korisnici',
'Login' => 'Uloguj se',
'Username' => 'Korisničko ime',
'Password' => 'Šifra',
'Registered' => 'Registrovan',
'Email' => 'Email',
'Role' => 'Uloga',
'Roles' => 'Uloge',
'Edit' => 'Izmeni',
'Actions' => 'Akcije',
'Delete' => 'Obriši',
'Enter' => 'Udji',
'Logout' => 'Izloguj se',
'Register new user' => 'registruj novog korisnika',
'New User Registration' => 'registracija novog korisnika',
'Delete user: :user' => 'Obriši korisnika: :user',
'User :user have been deleted.' => 'Korisnik :user je uklonjen.',
'This user already exists' => 'Ovaj korisnik već postoji',
'This email already exists' => 'Ovaj email već postoji',
'Changes saved' => 'Promene su sačuvane',
'Wrong old password' => 'Pogrešan unos stare šifre',
'Admin' => 'Admin',
'User' => 'Korisnik',
'Editor' => 'Editor',
'Register' => 'Registrovan',
'Edit profile' => 'Izmeni profil',
'Save' => 'Sačuvaj',
'Firstname' => 'Prvo ime',
'Lastname' => 'Prezime',
'Old password' => 'Stara šifra',
'New password' => 'Nova šifra',
'Welcome' => 'Dobrodošli',
'Wrong username or password' => 'Pogrešno KOrisničko ime ili šifra ',
'Your changes have been saved.' => 'Vaša podešavanja su sačuvana.',
'New user have been registered.' => 'novi korisnik je registrovan.',
'Captcha' => 'Captcha',
'Registration' => 'Registracija',
'Username' => 'Korisničko ime',
'User email is invalid' => 'Korisnički mail je netačan',
'Reset Password' => 'Resetuj šifru',
'Send New Password' => 'Pošalji novu šifru',
'This user doesnt alredy exist' => 'Ovaj korisnik još uvek ne postoji',
'Users - Profile' => 'Korisnici -- profil',
'Users - Edit Profile' => 'Korisnici - Izmena profila',
'Users - Login' => 'Korisnici - Uloguj se.',
'Users - Registration' => 'Korisnici - registracija',
'Users - Password Recover' => 'Korisnici - Potsetnik šifre',
'New Password' => 'Nova šifra',
'Forgot your password?' => 'Zaboravljena šifra?',
'New password has been sent' => 'Nova šifra je poslata',
'Monstra says: This is not your profile...' => 'Monstra kaže: Ovo nije vaš profil...',
'User registration is closed.' => 'registracija novih korisnika je zatvorena.',
'Allow user registration' => 'Dozvoli registraciju korisnika',
'Required field' => 'Potrebna polja.',
'This user doesnt exist' => 'Ovaj korisnik ne postoji',
'Captcha code is wrong' => 'Captcha kod je pogrešan',
'Your login details for :site_name has been sent' => 'vaši detalji logovanja na sajtu :site_name su poslati',
'Your new password for :site_name' => 'Vaša šifra za :site_name',
'Your login details for :site_name' => 'Vaši podaci za logovanje na :site_name',
'About Me' => 'O meni',
'Profile' => 'Profil',
'You are banned for 10 minutes. Try again later' => 'Vi ste banovani na 10 minuta. Pokušajte kasnije',
'Cancel' => 'Otkaži',
)
);
================================================
FILE: plugins/box/users/languages/tr.lang.php
================================================
array(
'Users' => 'Kullanıcılar',
'Login' => 'Giriş',
'Username' => 'Kullanıcı Adı',
'Password' => 'Parola',
'Registered' => 'Kayıtlı',
'Email' => 'E-Posta',
'Role' => 'Rol',
'Roles' => 'Roller',
'Edit' => 'Düzenle',
'Actions' => 'İşlemler',
'Delete' => 'Sil',
'Log In' => 'Giriş',
'Log Out' => 'Çıkış',
'Register New User' => 'Yeni Üye Kaydet',
'New User Registration' => 'Yeni Üye Kaydı',
'Delete user: :user' => ':user kullanıcısı silinsin mi',
'User :user have been deleted.' => ':user kullanıcısı silindi.',
'This user already exists' => 'Bu kullanıcı zaten var',
'This email already exists' => 'Bu e-posta zaten kayıtlı',
'Changes saved' => 'Değişiklikler kaydedildi',
'Wrong old password' => 'Yanlış eski parola',
'Admin' => 'Yönetici',
'User' => 'Kullanıcı',
'Editor' => 'Editör',
'Register' => 'Kayıt',
'Edit profile' => 'Profil Düzenle',
'Save' => 'Kaydet',
'Firstname' => 'Ad',
'Lastname' => 'Soyad',
'Old password' => 'Eski Parola',
'New password' => 'Yeni Parola',
'Welcome' => 'Hoş geldin',
'Wrong username or password' => 'Hatalı kullanıcı adı ya da parola',
'Your changes have been saved.' => 'Değişiklikler kaydedildi.',
'New user have been registered.' => 'Yeni kullanıcı kaydedildi.',
'Captcha' => 'Doğrulama Kodu',
'Registration' => 'Kayıt',
'Username' => 'Kullanıcı Adı',
'User email is invalid' => 'E-posta geçersiz',
'Reset Password' => 'Parola Sıfırla',
'Send New Password' => 'Yeni Parola Gönder',
'This user doesnt alredy exist' => 'Kullanıcı bulunamadı',
'Users - Profile' => 'Kullanıcı - Profil',
'Users - Edit Profile' => 'Kullanıcı - Profil Düzenle',
'Users - Log In' => 'Kullanıcı - Giriş',
'Users - Registration' => 'Kullanıcı - Kayıt',
'Users - Password Recover' => 'Kullanıcı - Parola Sıfırlama',
'New Password' => 'Yeni Parola',
'Forgot your password?' => 'Parolanızı unuttunuz mu?',
'New password has been sent' => 'Yeni parola gönderildi',
'Monstra says: This is not your profile...' => 'Monstra: Bu profil size ait değil...',
'User registration is closed.' => 'Kullanıcı kaydı kapalı',
'Allow user registration' => 'Kullanıcı kaydını etkinleştir',
'Required field' => 'Zorunlu alan',
'This user doesnt exist' => 'Kullanıcı yok',
'Captcha code is wrong' => 'Doğrulama kodu hatalı',
'Your login details for :site_name has been sent' => ':site_name için giriş bilgileriniz gönderildi',
'Your new password for :site_name' => ':site_name için yeni parolanız',
'Your login details for :site_name' => ':site_name için giriş bilgileriniz',
'About Me' => 'Hakkımda',
'Profile' => 'Profil',
'Cancel' => 'Vazgeç',
)
);
================================================
FILE: plugins/box/users/languages/uk.lang.php
================================================
array(
'Users' => 'Користувачі',
'Login' => 'Вхід',
'Password' => 'Пароль',
'Email' => 'Ел. пошта',
'Registered' => 'Зареєстрований',
'Role' => 'Роль',
'Roles' => 'Ролі',
'Actions' => 'Дії',
'Edit' => 'Редагувати',
'Delete' => 'Видалити',
'Log In' => 'Вхід',
'Log Out' => 'Вихід',
'Register New User' => 'Реєстрація нового користувача',
'New User Registration' => 'Реєстрація нового користувача',
'Delete user: :user' => 'Видалити користувача: :user',
'User :user have been deleted.' => 'Користувача :user вилучено.',
'This user already exists' => 'Такий користувач вже існує',
'This email already exists' => 'Така ел. пошта вже існує',
'Changes saved' => 'Зміни збережені',
'Wrong old password' => 'Невірний старий пароль',
'Admin' => 'Адміністратор',
'User' => 'Користувач',
'Editor' => 'Редактор',
'Register' => 'Реєстрація',
'Edit profile' => 'Редагування профілю користувача',
'Save' => 'Зберегти',
'Firstname' => 'Ім’я',
'Lastname' => 'Прізвище',
'Old password' => 'Старий пароль',
'New password' => 'Новий пароль',
'Welcome' => 'Ласкаво просимо',
'Wrong username or password' => 'Неправильний логін або пароль',
'Your changes have been saved.' => 'Ваші зміни були збережені.',
'New user have been registered.' => 'Новий користувач був зареєстрований.',
'Captcha' => 'Каптча',
'Registration' => 'Реєстрація',
'Username' => 'Ім’я користувача',
'User email is invalid' => 'Ел. пошта є недійсною',
'Reset Password' => 'Скинути пароль',
'Send New Password' => 'Відправити пароль',
'Users - Profile' => 'Користувачі - Профіль',
'Users - Edit Profile' => 'Користувачі - Редагування профілю',
'Users - Log In' => 'Користувачі - Вхід',
'Users - Registration' => 'Користувачі - Реєстрація',
'Users - Password Recover' => 'Користувачі - Відновлення пароля',
'New Password' => 'Новий пароль',
'Forgot your password?' => 'Забули пароль?',
'New password has been sent' => 'Новий пароль було відправлено',
'Monstra says: This is not your profile...' => 'Монстра каже: Це не твій профіль...',
'User registration is closed.' => 'Реєстрація користувачів закрита.',
'Allow user registration' => 'Дозволити реєстрацію користувачів.',
'Required field' => 'Обов’язкове поле',
'This user doesnt exist' => 'Такого користувача не існує',
'Captcha code is wrong' => 'Невірний захисний код',
'Your login details for :site_name has been sent' => 'Ваші дані для доступу до :site_name були відправлені',
'Your new password for :site_name' => 'Ваш новий пароль до :site_name',
'Your login details for :site_name' => 'Ваші дані для доступу до :site_name',
'About Me' => 'Про мене',
'Profile' => 'Профіль',
'You are banned for 10 minutes. Try again later' => 'Ви заблоковані на 10 хвилин. Спробуйте пізніше',
'Cancel' => 'Відмінити',
)
);
================================================
FILE: plugins/box/users/languages/zh-cn.lang.php
================================================
array(
'Users' => '用户',
'Login' => '登录',
'Username' => '用户名',
'Password' => '密码',
'Registered' => '已注册',
'Email' => '邮箱',
'Role' => '角色',
'Roles' => '角色',
'Edit' => '编辑',
'Actions' => '操作',
'Delete' => '删除',
'Log In' => '登录',
'Log Out' => '退出',
'Register New user' => '注册新用户',
'New User Registration' => '新用户注册',
'Delete user: :user' => '删除用户: :user',
'User :user have been deleted.' => '用户 :user 已被删除。',
'This user already exists' => '此用户已存在',
'This email already exists' => '此邮箱已存在',
'Changes saved' => '更改已保存',
'Wrong old password' => '旧密码错误',
'Admin' => '管理员',
'User' => '用户',
'Editor' => '编辑者',
'Register' => '注册者',
'Edit profile' => '编辑资料',
'Save' => '保存',
'Firstname' => '名字',
'Lastname' => '姓氏',
'Old password' => '旧密码',
'New password' => '新密码',
'Welcome' => '欢迎',
'Wrong username or password' => '用户名 或 密码 错误',
'Your changes have been saved.' => '您的更改已保存。',
'New user have been registered.' => '新用户已注册。',
'Captcha' => '验证码',
'Registration' => '注册',
'Username' => '用户名',
'User email is invalid' => '用户邮箱无效',
'Reset Password' => '重置密码',
'Send New Password' => '发送新密码',
'This user doesnt alredy exist' => '此用户不存在',
'Users - Profile' => '用户 - 资料',
'Users - Edit Profile' => '用户 - 编辑资料',
'Users - Log In' => '用户 - 登录',
'Users - Registration' => '用户 - 注册',
'Users - Password Recover' => '用户 - 找回密码',
'New Password' => '新密码',
'Forgot your password?' => '忘记密码?',
'New password has been sent' => '新密码已发送',
'Monstra says: This is not your profile...' => 'Monstra 提示: 这不是您的个人资料...',
'User registration is closed.' => '用户注册已关闭。',
'Allow user registration' => '允许用户注册',
'Required field' => '必填字段',
'This user doesnt exist' => '此用户不存在',
'Captcha code is wrong' => '验证码错误',
'Your login details for :site_name has been sent' => '您在 :site_name 的登录信息为已发送',
'Your new password for :site_name' => '您在 :site_name 的新密码',
'Your login details for :site_name' => '您在 :site_name 的登录信息',
'About Me' => '关于我',
'Profile' => '个人资料',
'You are banned for 10 minutes. Try again later' => '你被禁止10分钟。请稍后再试',
)
);
================================================
FILE: plugins/box/users/users.admin.php
================================================
__('Admin', 'users'),
'editor' => __('Editor', 'users'),
'user' => __('User', 'users'));
// Get uses table
$users = new Table('users');
if (Option::get('users_frontend_registration') === 'true') {
$users_frontend_registration = true;
} else {
$users_frontend_registration = false;
}
if (Request::post('users_frontend_submit')) {
if (Security::check(Request::post('csrf'))) {
if (Request::post('users_frontend_registration')) $users_frontend_registration = 'true'; else $users_frontend_registration = 'false';
if (Option::update('users_frontend_registration', $users_frontend_registration)) {
Notification::set('success', __('Your changes have been saved.', 'users'));
} else {
Notification::set('error', __('Your changes was not saved.', 'users'));
}
Request::redirect('index.php?id=users');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Check for get actions
// ---------------------------------------------
if (Request::get('action')) {
// Switch actions
// -----------------------------------------
switch (Request::get('action')) {
// Add
// -------------------------------------
case "add":
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
// Errors
$errors = array();
if (Request::post('register')) {
if (Security::check(Request::post('csrf'))) {
$user_login = trim(Request::post('login'));
$user_password = trim(Request::post('password'));
$user_email = trim(Request::post('email'));
if ($user_login == '') $errors['users_empty_login'] = __('Required field', 'users');
if ($user_password == '') $errors['users_empty_password'] = __('Required field', 'users');
if ($user_email == '') $errors['users_empty_email'] = __('Required field', 'users');
if ($users->select("[login='".$user_login."']")) $errors['users_this_user_already_exists'] = __('This user already exists', 'users');
if ($users->select("[email='".$user_email."']")) $errors['users_this_email_already_exists'] = __('This email already exists', 'users');
if (count($errors) == 0) {
if ($users->insert(array('login' => Security::safeName($user_login),
'password' => Security::encryptPassword(Request::post('password')),
'email' => Request::post('email'),
'hash' => Text::random('alnum', 12),
'date_registered' => time(),
'role' => Request::post('role')))) {
Notification::set('success', __('New user have been registered.', 'users'));
} else {
Notification::set('error', __('New user was not registered.', 'users'));
}
Request::redirect('index.php?id=users');
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Display view
View::factory('box/users/views/backend/add')
->assign('roles', $roles)
->assign('errors', $errors)
->display();
} else {
Request::redirect('index.php?id=users&action=edit&user_id='.Session::get('user_id'));
}
break;
// Edit
// -------------------------------------
case "edit":
// Get current user record
$user = $users->select("[id='".(int) Request::get('user_id')."']", null);
if (isset($user['firstname'])) $user_firstname = $user['firstname']; else $user_firstname = '';
if (isset($user['lastname'])) $user_lastname = $user['lastname']; else $user_lastname = '';
if (isset($user['email'])) $user_email = $user['email']; else $user_email = '';
if (isset($user['twitter'])) $user_twitter = $user['twitter']; else $user_twitter = '';
if (isset($user['skype'])) $user_skype = $user['skype']; else $user_skype = '';
if (isset($user['about_me'])) $user_about_me = $user['about_me']; else $user_about_me = '';
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {
if ((Request::post('edit_profile')) and
(((int) Session::get('user_id') == (int) Request::get('user_id')) or
(in_array(Session::get('user_role'), array('admin'))))){
if (Security::check(Request::post('csrf'))) {
if (Security::safeName(Request::post('login')) != '') {
if ($users->update(Request::post('user_id'), array('login' => Security::safeName(Request::post('login')),
'firstname' => Request::post('firstname'),
'lastname' => Request::post('lastname'),
'email' => Request::post('email'),
'skype' => Request::post('skype'),
'twitter' => Request::post('twitter'),
'about_me' => Request::post('about_me'),
'role' => Request::post('role')))) {
Notification::set('success', __('Your changes have been saved.', 'users'));
} else {
Notification::set('error', __('Your changes was not saved.', 'users'));
}
Request::redirect('index.php?id=users&action=edit&user_id='.Request::post('user_id'));
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
if (Request::post('edit_profile_password')) {
if (Security::check(Request::post('csrf'))) {
if (trim(Request::post('new_password')) != '') {
if ($users->update(Request::post('user_id'), array('password' => Security::encryptPassword(trim(Request::post('new_password')))))) {
Notification::set('success', __('Your changes have been saved.', 'users'));
} else {
Notification::set('error', __('Your changes was not saved.', 'users'));
}
Request::redirect('index.php?id=users&action=edit&user_id='.Request::post('user_id'));
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
if ( ((int) Session::get('user_id') == (int) Request::get('user_id')) or (in_array(Session::get('user_role'), array('admin')) && count($user) != 0) ) {
// Display view
View::factory('box/users/views/backend/edit')
->assign('user', $user)
->assign('user_firstname', $user_firstname)
->assign('user_lastname', $user_lastname)
->assign('user_email', $user_email)
->assign('user_twitter', $user_twitter)
->assign('user_skype', $user_skype)
->assign('user_about_me', $user_about_me)
->assign('roles', $roles)
->display();
} else {
echo __('Monstra says: This is not your profile...', 'users');
}
}
break;
// Delete
// -------------------------------------
case "delete":
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin')) && (int)$_SESSION['user_id'] != (int)Request::get('user_id')) {
if (Security::check(Request::get('token'))) {
$user = $users->select('[id="'.Request::get('user_id').'"]', null);
if ($users->delete(Request::get('user_id'))) {
Notification::set('success', __('User :user have been deleted.', 'users', array(':user' => $user['login'])));
} else {
Notification::set('error', __('User :user was not deleted.', 'users', array(':user' => $user['login'])));
}
Request::redirect('index.php?id=users');
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
break;
}
} else {
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
// Dislay view
View::factory('box/users/views/backend/index')
->assign('roles', $roles)
->assign('users_list', $users->select())
->assign('users_frontend_registration', $users_frontend_registration)
->display();
} else {
Request::redirect('index.php?id=users&action=edit&user_id='.Session::get('user_id'));
}
}
}
}
================================================
FILE: plugins/box/users/users.plugin.php
================================================
assign('users', Users::$users->select(null, 'all'))
->display();
}
/**
* Get user profile
*/
public static function getProfile($id)
{
View::factory('box/users/views/frontend/profile')
->assign('user', Users::$users->select("[id=".(int) $id."]", null))
->display();
}
/**
* Get New User Registration
*/
public static function getRegistration()
{
if (Option::get('users_frontend_registration') == 'true') {
// Is User Loged in ?
if ( ! Session::get('user_id')) {
$errors = array();
$user_email = Request::post('email');
$user_login = Request::post('login');
$user_password = Request::post('password');
// Register form submit
if (Request::post('register')) {
// Check csrf
if (Security::check(Request::post('csrf'))) {
$user_email = trim($user_email);
$user_login = trim($user_login);
$user_password = trim($user_password);
if (Option::get('captcha_installed') == 'true' && ! CryptCaptcha::check(Request::post('answer'))) $errors['users_captcha_wrong'] = __('Captcha code is wrong', 'captcha');
if ($user_login == '') $errors['users_empty_login'] = __('Required field', 'users');
if ($user_password == '') $errors['users_empty_password'] = __('Required field', 'users');
if ($user_email == '') $errors['users_empty_email'] = __('Required field', 'users');
if ($user_email != '' && ! Valid::email($user_email)) $errors['users_invalid_email'] = __('User email is invalid', 'users');
if (Users::$users->select("[login='".$user_login."']")) $errors['users_this_user_alredy_exists'] = __('This user alredy exist', 'users');
if (Users::$users->select("[email='".$user_email."']")) $errors['users_this_email_alredy_exists'] = __('This email alredy exist', 'users');
if (count($errors) == 0) {
Users::$users->insert(array('login' => Security::safeName($user_login),
'password' => Security::encryptPassword(Request::post('password')),
'email' => Request::post('email'),
'hash' => Text::random('alnum', 12),
'date_registered' => time(),
'role' => 'user'));
// Log in
$user = Users::$users->select("[id='".Users::$users->lastId()."']", null);
Session::set('user_id', (int) $user['id']);
Session::set('user_login', (string) $user['login']);
Session::set('user_role', (string) $user['role']);
Session::set('user_email', (string) $user['email']);
$mail = new PHPMailer();
$mail->CharSet = 'utf-8';
$mail->ContentType = 'text/html';
$mail->SetFrom(Option::get('system_email'));
$mail->AddReplyTo(Option::get('system_email'));
$mail->AddAddress($user['email'], $user['login']);
$mail->Subject = Option::get('sitename');
$mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
->assign('site_name', Option::get('sitename'))
->assign('user_login', $user['login'])
->assign('email_template', 'new-user')
->render());
$mail->Send();
// Redirect to user profile
Request::redirect(Option::get('siteurl').'/users/'.Users::$users->lastId());
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
// Display view
View::factory('box/users/views/frontend/registration')
->assign('errors', $errors)
->assign('user_email', $user_email)
->assign('user_login', $user_login)
->assign('user_password', $user_password)
->display();
} else {
Request::redirect(Site::url().'/users/'.Session::get('user_id'));
}
} else {
echo __('User registration is closed.', 'users');
}
}
/**
* Get user panel
*/
public static function getPanel()
{
View::factory('box/users/views/frontend/userspanel')->display();
}
/**
* Is User Loged
*/
public static function isLoged()
{
if ((Session::get('user_id')) and (((int) Session::get('user_id') == Uri::segment(1)) or (in_array(Session::get('user_role'), array('admin'))))) {
return true;
} else {
return false;
}
}
/**
* Logout
*/
public static function logout()
{
Session::destroy();
Request::redirect($_SERVER["HTTP_REFERER"]);
}
/**
* Edit user profile
*/
public static function getProfileEdit($id)
{
// Is Current User Loged in ?
if (Users::isLoged()) {
$user = Users::$users->select("[id='".(int) $id."']", null);
// Edit Profile Submit
if (Request::post('edit_profile')) {
// Check csrf
if (Security::check(Request::post('csrf'))) {
// Check for POST data manipulation
if( ((int) Session::get('user_id') == (int) Request::post('user_id')) or (in_array(Session::get('user_role'), array('admin'))) ) {
if (Security::safeName(Request::post('login')) != '') {
if (Users::$users->update(Request::post('user_id'),
array('login' => Security::safeName(Request::post('login')),
'firstname' => Request::post('firstname'),
'lastname' => Request::post('lastname'),
'email' => Request::post('email'),
'skype' => Request::post('skype'),
'about_me' => Request::post('about_me'),
'twitter' => Request::post('twitter')))) {
// Change password
if (trim(Request::post('new_password')) != '') {
Users::$users->update(Request::post('user_id'), array('password' => Security::encryptPassword(trim(Request::post('new_password')))));
}
Notification::set('success', __('Your changes have been saved.', 'users'));
Request::redirect(Site::url().'/users/'.$user['id']);
}
} else { }
} else { die('Monstra says: This is not your profile...'); }
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
View::factory('box/users/views/frontend/edit')
->assign('user', $user)
->display();
} else {
Request::redirect(Site::url().'/users/login');
}
}
/**
* Get Password Reset
*/
public static function getPasswordReset()
{
// Is User Loged in ?
if ( ! Session::get('user_id')) {
$errors = array();
$site_url = Option::get('siteurl');
$site_name = Option::get('sitename');
// Reset Password from hash
if (Request::get('hash')) {
// Get user with specific hash
$user = Users::$users->select("[hash='" . Request::get('hash') . "']", null);
// If user exists
if ((count($user) > 0) && ($user['hash'] == Request::get('hash'))) {
// Generate new password
$new_password = Text::random('alnum', 6);
// Update user profile
// Set new hash and new password
Users::$users->updateWhere("[login='" . $user['login'] . "']", array('hash' => Text::random('alnum', 12), 'password' => Security::encryptPassword($new_password)));
$mail = new PHPMailer();
$mail->CharSet = 'utf-8';
$mail->ContentType = 'text/html';
$mail->SetFrom(Option::get('system_email'));
$mail->AddReplyTo(Option::get('system_email'));
$mail->AddAddress($user['email'], $user['login']);
$mail->Subject = __('Your new password for :site_name', 'users', array(':site_name' => $site_name));
$mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
->assign('site_url', $site_url)
->assign('site_name', $site_name)
->assign('user_id', $user['id'])
->assign('user_login', $user['login'])
->assign('new_password', $new_password)
->assign('email_template', 'new-password')
->render());
$mail->Send();
// Set notification
Notification::set('success', __('New password has been sent', 'users'));
// Redirect to password-reset page
Request::redirect(Site::url().'/users/login');
}
}
// Reset Password Form Submit
if (Request::post('reset_password_submit')) {
$user_login = trim(Request::post('login'));
// Check csrf
if (Security::check(Request::post('csrf'))) {
if (Option::get('captcha_installed') == 'true' && ! CryptCaptcha::check(Request::post('answer'))) $errors['users_captcha_wrong'] = __('Captcha code is wrong', 'users');
if ($user_login == '') $errors['users_empty_field'] = __('Required field', 'users');
if ($user_login != '' && ! Users::$users->select("[login='".$user_login."']")) $errors['users_user_doesnt_exists'] = __('This user doesnt exist', 'users');
if (count($errors) == 0) {
// Get user
$user = Users::$users->select("[login='" . $user_login . "']", null);
// Generate new hash
$new_hash = Text::random('alnum', 12);
// Update user hash
Users::$users->updateWhere("[login='" . $user_login . "']", array('hash' => $new_hash));
$mail = new PHPMailer();
$mail->CharSet = 'utf-8';
$mail->ContentType = 'text/html';
$mail->SetFrom(Option::get('system_email'));
$mail->AddReplyTo(Option::get('system_email'));
$mail->AddAddress($user['email'], $user['login']);
$mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));
$mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
->assign('site_url', $site_url)
->assign('site_name', $site_name)
->assign('user_id', $user['id'])
->assign('user_login', $user['login'])
->assign('new_hash', $new_hash)
->assign('email_template', 'reset-password')
->render());
$mail->Send();
// Set notification
Notification::set('success', __('Your login details for :site_name has been sent', 'users', array(':site_name' => $site_name)));
// Redirect to password-reset page
Request::redirect(Site::url().'/users/password-reset');
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
View::factory('box/users/views/frontend/password_reset')
->assign('errors', $errors)
->assign('user_login', trim(Request::post('login')))
->display();
}
}
/**
* Get User login
*/
public static function getLogin()
{
// Is User Loged in ?
if ( ! Session::get('user_id')) {
// Login Form Submit
if (Request::post('login_submit')) {
if (Cookie::get('login_attempts') && Cookie::get('login_attempts') >= 5) {
Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users'));
} else {
// Check csrf
if (Security::check(Request::post('csrf'))) {
$user = Users::$users->select("[login='" . trim(Request::post('username')) . "']", null);
if (count($user) !== 0) {
if ($user['login'] == Request::post('username')) {
if (trim($user['password']) == Security::encryptPassword(Request::post('password'))) {
if ($user['role'] == 'admin' || $user['role'] == 'editor') {
Session::set('admin', true);
}
Session::set('user_id', (int) $user['id']);
Session::set('user_login', (string) $user['login']);
Session::set('user_role', (string) $user['role']);
Session::set('user_email', (string) $user['email']);
Request::redirect(Site::url().'/users/'.Session::get('user_id'));
} else {
Notification::setNow('error', __('Wrong username or password', 'users'));
if (Cookie::get('login_attempts')) {
if (Cookie::get('login_attempts') < 5) {
$attempts = Cookie::get('login_attempts') + 1;
Cookie::set('login_attempts', $attempts , 600);
} else {
Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users'));
}
} else {
Cookie::set('login_attempts', 1, 600);
}
}
}
} else {
Notification::setNow('error', __('Wrong username or password', 'users'));
if (Cookie::get('login_attempts')) {
if (Cookie::get('login_attempts') < 5) {
$attempts = Cookie::get('login_attempts') + 1;
Cookie::set('login_attempts', $attempts , 600);
} else {
Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users'));
}
} else {
Cookie::set('login_attempts', 1, 600);
}
}
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
}
}
View::factory('box/users/views/frontend/login')->display();
} else {
Request::redirect(Site::url().'/users/'.Session::get('user_id'));
}
}
/**
* Set title
*/
public static function title()
{
switch (Users::route()) {
case 'list': return __('Users', 'users'); break;
case 'profile': return __('Users - Profile', 'users'); break;
case 'edit': return __('Users - Edit Profile', 'users'); break;
case 'login': return __('Users - Login', 'users'); break;
case 'registration': return __('Users - Registration', 'users'); break;
case 'password-reset': return __('Users - Password Recover', 'users'); break;
}
}
/**
* Set content
*/
public static function content()
{
switch (Users::route()) {
case 'list': Users::getList(); break;
case 'profile': Users::getProfile(Uri::segment(1)); break;
case 'edit': Users::getProfileEdit(Uri::segment(1)); break;
case 'login': Users::getLogin(); break;
case 'registration': Users::getRegistration(); break;
case 'password-reset': Users::getPasswordReset(); break;
}
}
/**
* Set template
*/
public static function template()
{
return 'index';
}
/**
* Get Gravatar
*
*
*
*
*
* @param string $email Email
* @param integer $size Image Size
*/
public static function getGravatarURL($email, $size)
{
return 'http://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).'?size='.$size;
}
}
================================================
FILE: plugins/box/users/views/backend/add.view.php
================================================
(isset($errors['users_this_user_alredy_exists']) || isset($errors['users_empty_login'])) ? 'form-control error-field' : 'form-control'))
);
if (isset($errors['users_this_user_alredy_exists'])) echo '';
if (isset($errors['users_empty_l-ogin'])) echo '';
?>
(isset($errors['users_empty_password'])) ? 'form-control error-field' : 'form-control'))
);
if (isset($errors['users_empty_password'])) echo '';
?>
(isset($errors['users_this_email_alredy_exists']) || isset($errors['users_empty_email'])) ? 'form-control error-field' : 'form-control'))
);
if (isset($errors['users_this_email_alredy_exists'])) echo '';
if (isset($errors['users_empty_email'])) echo '';
?>
__('Admin', 'users'), 'editor' => __('Editor', 'users'), 'user' => __('User', 'users')), null, array('class' => 'form-control'))
);
?>
'btn btn-phone btn-primary')).Html::nbsp(2).
Html::anchor(__('Cancel', 'users'), 'index.php?id=users', array('title' => __('Cancel', 'users'), 'class' => 'btn btn-phone btn-default')).
Form::close()
);
?>
================================================
FILE: plugins/box/users/views/backend/edit.view.php
================================================
'form-control'));
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
'form-control'))
);
?>
__('Admin', 'users'), 'editor' => __('Editor', 'users'), 'user' => __('User', 'users')), $user['role'], array('class' => 'form-control'))
?>
'btn btn-phone btn-primary')).Html::nbsp(2).
Html::anchor(__('Cancel', 'users'), 'index.php?id=users', array('title' => __('Cancel', 'users'), 'class' => 'btn btn-phone btn-cancel btn-default')).
Form::close()
);
?>
'form-control'))
);
?>
'btn btn-phone btn-primary')).
Form::close()
);
?>
'.__('This user does not exist', 'users').'';
}
?>
================================================
FILE: plugins/box/users/views/backend/index.view.php
================================================
__('Register New User', 'users'), 'class' => 'btn btn-phone btn-primary')); ?>
'users_frontend')); ?>
'display:none;')); ?>
'btn btn-primary')); ?>
'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete user: :user', 'users', array(':user' => Html::toText($user['login'])))."')"));
}
?>
================================================
FILE: plugins/box/users/views/frontend/edit.view.php
================================================
================================================
FILE: plugins/box/users/views/frontend/index.view.php
================================================
================================================
FILE: plugins/box/users/views/frontend/login.view.php
================================================
'.$error.'');
?>
================================================
FILE: plugins/box/users/views/frontend/password_reset.view.php
================================================
'.$success.'');
?>
================================================
FILE: plugins/box/users/views/frontend/profile.view.php
================================================
:
:
:
:
:
:
:
:
/
/
================================================
FILE: plugins/box/users/views/frontend/registration.view.php
================================================
================================================
FILE: plugins/box/users/views/frontend/userspanel.view.php
================================================
,
================================================
FILE: plugins/captcha/captcha.plugin.php
================================================

";
if ($reload) echo " 
";
echo " ";
}
/**
* Verify Code
*/
function chk_crypt($code)
{
include ($_SESSION['configfile']);
$code = addslashes ($code);
$code = str_replace(' ', '', $code);
$code = ($difuplow ? $code : strtoupper($code));
switch (strtoupper($cryptsecure)) {
case "MD5" : $code = md5($code); break;
case "SHA1" : $code = sha1($code); break;
}
if ($_SESSION['cryptcode'] and ($_SESSION['cryptcode'] == $code)) {
unset($_SESSION['cryptreload']);
if ($cryptoneuse) unset($_SESSION['cryptcode']);
return true;
} else {
$_SESSION['cryptreload'] = true;
return false;
}
}
================================================
FILE: plugins/captcha/crypt/cryptographp.inc.php
================================================
= $cryptusemax) {
header("Content-type: image/png");
readfile('images/erreur1.png');
exit;
}
$delai = time()-$_SESSION['crypttime'];
if ($delai < $cryptusetimer) {
switch ($cryptusertimererror) {
case 2 : header("Content-type: image/png");
readfile('images/erreur2.png');
exit;
case 3 : sleep ($cryptusetimer-$delai);
break; // Fait une pause
case 1 :
default : exit; // Quitte le script sans rien faire
}
}
// Create temporary cryptogram
$imgtmp = imagecreatetruecolor($cryptwidth,$cryptheight);
$blank = imagecolorallocate($imgtmp,255,255,255);
$black = imagecolorallocate($imgtmp,0,0,0);
imagefill($imgtmp,0,0,$blank);
$word ='';
$x = 10;
$pair = rand(0,1);
$charnb = rand($charnbmin,$charnbmax);
for ($i=1;$i<= $charnb;$i++) {
$tword[$i]['font'] = $tfont[array_rand($tfont,1)];
$tword[$i]['angle'] = (rand(1,2)==1)?rand(0,$charanglemax):rand(360-$charanglemax,360);
if ($crypteasy) $tword[$i]['element'] =(!$pair)?$charelc{rand(0,strlen($charelc)-1)}:$charelv{rand(0,strlen($charelv)-1)};
else $tword[$i]['element'] = $charel{rand(0,strlen($charel)-1)};
$pair=!$pair;
$tword[$i]['size'] = rand($charsizemin,$charsizemax);
$tword[$i]['y'] = ($charup?($cryptheight/2)+rand(0,($cryptheight/5)):($cryptheight/1.5));
$word .=$tword[$i]['element'];
$lafont="fonts/".$tword[$i]['font'];
imagettftext($imgtmp,$tword[$i]['size'],$tword[$i]['angle'],$x,$tword[$i]['y'],$black,$lafont,$tword[$i]['element']);
$x +=$charspace;
}
// Calculation of horizontal framing cryptograms temporary
$xbegin=0;
$x=0;
while (($x<$cryptwidth)and(!$xbegin)) {
$y=0;
while (($y<$cryptheight)and(!$xbegin)) {
if (imagecolorat($imgtmp,$x,$y) != $blank) $xbegin = $x;
$y++;
}
$x++;
}
$xend=0;
$x=$cryptwidth-1;
while (($x>0)and(!$xend)) {
$y=0;
while (($y<$cryptheight)and(!$xend)) {
if (imagecolorat($imgtmp,$x,$y) != $blank) $xend = $x;
$y++;
}
$x--;
}
$xvariation = round(($cryptwidth/2)-(($xend-$xbegin)/2));
imagedestroy ($imgtmp);
// Creating the final cryptogram
$img = imagecreatetruecolor($cryptwidth, $cryptheight);
if ($bgimg and is_dir($bgimg)) {
$dh = opendir($bgimg);
while (false !== ($filename = readdir($dh)))
if (eregi(".[gif|jpg|png]$", $filename)) { $files[] = $filename; }
closedir($dh);
$bgimg = $bgimg.'/'.$files[array_rand($files,1)];
}
if ($bgimg) {
list($getwidth, $getheight, $gettype, $getattr) = getimagesize($bgimg);
switch ($gettype) {
case "1": $imgread = imagecreatefromgif($bgimg); break;
case "2": $imgread = imagecreatefromjpeg($bgimg); break;
case "3": $imgread = imagecreatefrompng($bgimg); break;
}
imagecopyresized ($img, $imgread, 0,0,0,0,$cryptwidth,$cryptheight,$getwidth,$getheight);
imagedestroy ($imgread);
} else {
$bg = imagecolorallocate($img,$bgR,$bgG,$bgB);
imagefill($img,0,0,$bg);
if ($bgclear) imagecolortransparent($img,$bg);
}
function ecriture()
{
global $img, $ink, $charR, $charG, $charB, $charclear, $xvariation, $charnb, $charcolorrnd, $charcolorrndlevel, $tword, $charspace;
if (function_exists ('imagecolorallocatealpha')) $ink = imagecolorallocatealpha($img,$charR,$charG,$charB,$charclear);
else $ink = imagecolorallocate ($img,$charR,$charG,$charB);
$x = $xvariation;
for ($i = 1; $i <= $charnb; $i++) {
if ($charcolorrnd) {
$ok = false;
do {
$rndR = rand(0,255); $rndG = rand(0,255); $rndB = rand(0,255);
$rndcolor = $rndR+$rndG+$rndB;
switch ($charcolorrndlevel) {
case 1 : if ($rndcolor<200) $ok=true; break; // tres sombre
case 2 : if ($rndcolor<400) $ok=true; break; // sombre
case 3 : if ($rndcolor>500) $ok=true; break; // claires
case 4 : if ($rndcolor>650) $ok=true; break; // tr?s claires
default : $ok=true;
}
} while (!$ok);
if (function_exists ('imagecolorallocatealpha')) $rndink = imagecolorallocatealpha($img,$rndR,$rndG,$rndB,$charclear);
else $rndink = imagecolorallocate ($img,$rndR,$rndG,$rndB);
}
$lafont="fonts/".$tword[$i]['font'];
imagettftext($img,$tword[$i]['size'],$tword[$i]['angle'],$x,$tword[$i]['y'],$charcolorrnd?$rndink:$ink,$lafont,$tword[$i]['element']);
$x +=$charspace;
}
}
function noisecolor()
{
global $img, $noisecolorchar, $ink, $bg, $brushsize;
switch ($noisecolorchar) {
case 1 : $noisecol = $ink; break;
case 2 : $noisecol = $bg; break;
case 3 :
default : $noisecol = imagecolorallocate ($img,rand(0,255),rand(0,255),rand(0,255)); break;
}
if ($brushsize and $brushsize > 1 and function_exists('imagesetbrush')) {
$brush = imagecreatetruecolor($brushsize,$brushsize);
imagefill($brush, 0, 0, $noisecol);
imagesetbrush($img, $brush);
$noisecol = IMG_COLOR_BRUSHED;
}
return $noisecol;
}
function bruit()
{
global $noisepxmin, $noisepxmax, $noiselinemin, $noiselinemax, $nbcirclemin, $nbcirclemax,$img, $cryptwidth, $cryptheight;
$nbpx = rand($noisepxmin,$noisepxmax);
$nbline = rand($noiselinemin,$noiselinemax);
$nbcircle = rand($nbcirclemin,$nbcirclemax);
for ($i=1;$i<$nbpx;$i++) imagesetpixel ($img,rand(0,$cryptwidth-1),rand(0,$cryptheight-1),noisecolor());
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());
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());
}
if ($noiseup) {
ecriture();
bruit();
} else {
bruit();
ecriture();
}
// Creating frame
if ($bgframe) {
$framecol = imagecolorallocate($img,($bgR*3+$charR)/4,($bgG*3+$charG)/4,($bgB*3+$charB)/4);
imagerectangle($img, 0, 0, $cryptwidth-1, $cryptheight-1, $framecol);
}
// Additional changes: grayscale and gaussian blur
if (function_exists('imagefilter')) {
if ($cryptgrayscal) imagefilter ( $img, IMG_FILTER_GRAYSCALE);
if ($cryptgaussianblur) imagefilter ( $img, IMG_FILTER_GAUSSIAN_BLUR);
}
// Shift conversion cryptograms
$word = ($difuplow?$word:strtoupper($word));
// Write cryptcode to the Session
switch (strtoupper($cryptsecure)) {
case "MD5" : $_SESSION['cryptcode'] = md5($word); break;
case "SHA1" : $_SESSION['cryptcode'] = sha1($word); break;
default : $_SESSION['cryptcode'] = $word; break;
}
$_SESSION['crypttime'] = time();
$_SESSION['cryptcptuse']++;
// Render image
switch (strtoupper($cryptformat)) {
case "JPG" :
case "JPEG" : if (imagetypes() & IMG_JPG) {
header("Content-type: image/jpeg");
imagejpeg($img, "", 80);
}
break;
case "GIF" : if (imagetypes() & IMG_GIF) {
header("Content-type: image/gif");
imagegif($img);
}
break;
case "PNG" :
default : if (imagetypes() & IMG_PNG) {
header("Content-type: image/png");
imagepng($img);
}
}
imagedestroy ($img);
unset ($word,$tword);
unset ($_SESSION['cryptreload']);
================================================
FILE: plugins/captcha/crypt/cryptographp.php
================================================
plugins/captcha/captcha.plugin.php
active
15
Captcha
Captcha plugin for Monstra
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/captcha/install/captcha.uninstall.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Captcha plugin pro Monstra',
'Captcha code is wrong' => 'Captcha kód je nesprávný',
)
);
================================================
FILE: plugins/captcha/languages/de.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Captcha Plugin für Monstra',
'Captcha code is wrong' => 'Captcha Code ist falsch',
)
);
================================================
FILE: plugins/captcha/languages/en.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Captcha plugin for Monstra',
'Captcha code is wrong' => 'Captcha code is wrong',
)
);
================================================
FILE: plugins/captcha/languages/es.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Captcha plugin for Monstra',
'Captcha code is wrong' => 'El código captcha es incorrecto',
)
);
================================================
FILE: plugins/captcha/languages/fa.lang.php
================================================
array(
'Captcha' => 'کدامنيتي',
'Captcha plugin for Monstra' => 'کدامنيتي براي مونسترا',
'Captcha code is wrong' => 'کدامنيتي اشتباه است',
)
);
================================================
FILE: plugins/captcha/languages/fr.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Plugin Captcha pour Monstra',
'Captcha code is wrong' => 'Le code Captcha est erroné',
)
);
================================================
FILE: plugins/captcha/languages/id.lang.php
================================================
array(
'Captcha' => 'Verifikasi',
'Captcha plugin for Monstra' => 'Verifikasi plugin untuk Monstra',
'Captcha code is wrong' => 'Kode Verifikasi salah',
)
);
================================================
FILE: plugins/captcha/languages/it.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Captcha plugin per Monstra',
'Captcha code is wrong' => 'Codice captcha è errato',
)
);
================================================
FILE: plugins/captcha/languages/ka-ge.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Captcha პლაგინი Monstra-თვის',
'Captcha code is wrong' => 'Captcha-ზე პასუხი არასწორია!',
)
);
================================================
FILE: plugins/captcha/languages/lt.lang.php
================================================
array(
'Captcha' => 'Saugos kodas',
'Captcha plugin for Monstra' => 'Saugos kodo papildinys',
'Captcha code is wrong' => 'Saugos kodas yra neteisingas',
)
);
================================================
FILE: plugins/captcha/languages/nl.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Captcha Plugin voor Monstra',
'Captcha code is wrong' => 'Captcha Code is helaas foutief',
)
);
================================================
FILE: plugins/captcha/languages/pl.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Wtyczka Captcha dla systemu Monstra',
'Captcha code is wrong' => 'Niewłaściwy kod Captcha',
)
);
================================================
FILE: plugins/captcha/languages/pt-br.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Plugin de captcha para o Monstra CMS',
'Captcha code is wrong' => 'O Captcha está errado',
)
);
================================================
FILE: plugins/captcha/languages/ru.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Captcha плагин для Monstra',
'Captcha code is wrong' => 'Captcha код неправильный',
)
);
================================================
FILE: plugins/captcha/languages/sk.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Captcha plugin pre Monstra',
'Captcha code is wrong' => 'Captcha kód je nesprávny',
)
);
================================================
FILE: plugins/captcha/languages/sr.lang.php
================================================
array(
'Captcha' => 'Captcha',
'Captcha plugin for Monstra' => 'Captcha dodatak za Monstra',
'Captcha code is wrong' => 'Captcha Kod je pogrešan',
)
);
================================================
FILE: plugins/captcha/languages/tr.lang.php
================================================
array(
'Captcha' => 'Captcha/Doğrulama',
'Captcha plugin for Monstra' => 'Monstra için captcha/doğrulama eklentisi',
'Captcha code is wrong' => 'Doğrulama kodu yanlış',
)
);
================================================
FILE: plugins/captcha/languages/uk.lang.php
================================================
array(
'Captcha' => 'Каптча',
'Captcha plugin for Monstra' => 'Каптча плагін для Monstra',
'Captcha code is wrong' => 'Код каптчі невірний',
)
);
================================================
FILE: plugins/captcha/languages/zh-cn.lang.php
================================================
array(
'Captcha' => '验证码',
'Captcha plugin for Monstra' => 'Monstra 验证码插件',
'Captcha code is wrong' => '验证码错误',
)
);
================================================
FILE: plugins/markitup/install/markitup.manifest.xml
================================================
plugins/markitup/markitup.plugin.php
active
15
MarkItUp!
MarkItUp! universal markup jQuery editor
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/markitup/markitup/.htaccess
================================================
Options -Indexes
Allow from all
================================================
FILE: plugins/markitup/markitup/jquery.markitup.js
================================================
// ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.x
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
// Copyright (C) 2007-2012 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ----------------------------------------------------------------------------
(function($) {
$.fn.markItUp = function(settings, extraSettings) {
var method, params, options, ctrlKey, shiftKey, altKey; ctrlKey = shiftKey = altKey = false;
if (typeof settings == 'string') {
method = settings;
params = extraSettings;
}
options = { id: '',
nameSpace: '',
root: '',
previewHandler: false,
previewInWindow: '', // 'width=800, height=600, resizable=yes, scrollbars=yes'
previewInElement: '',
previewAutoRefresh: true,
previewPosition: 'after',
previewTemplatePath: '~/templates/preview.html',
previewParser: false,
previewParserPath: '',
previewParserVar: 'data',
resizeHandle: true,
beforeInsert: '',
afterInsert: '',
onEnter: {},
onShiftEnter: {},
onCtrlEnter: {},
onTab: {},
markupSet: [ { /* set */ } ]
};
$.extend(options, settings, extraSettings);
// compute markItUp! path
if (!options.root) {
$('script').each(function(a, tag) {
miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
if (miuScript !== null) {
options.root = miuScript[1];
}
});
}
// Quick patch to keep compatibility with jQuery 1.9
var uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
var matched = uaMatch( navigator.userAgent );
var browser = {};
if (matched.browser) {
browser[matched.browser] = true;
browser.version = matched.version;
}
if (browser.chrome) {
browser.webkit = true;
} else if (browser.webkit) {
browser.safari = true;
}
return this.each(function() {
var $$, textarea, levels, scrollPosition, caretPosition, caretOffset,
clicked, hash, header, footer, previewWindow, template, iFrame, abort;
$$ = $(this);
textarea = this;
levels = [];
abort = false;
scrollPosition = caretPosition = 0;
caretOffset = -1;
options.previewParserPath = localize(options.previewParserPath);
options.previewTemplatePath = localize(options.previewTemplatePath);
if (method) {
switch(method) {
case 'remove':
remove();
break;
case 'insert':
markup(params);
break;
default:
$.error('Method ' + method + ' does not exist on jQuery.markItUp');
}
return;
}
// apply the computed path to ~/
function localize(data, inText) {
if (inText) {
return data.replace(/("|')~\//g, "$1"+options.root);
}
return data.replace(/^~\//, options.root);
}
// init and build editor
function init() {
id = ''; nameSpace = '';
if (options.id) {
id = 'id="'+options.id+'"';
} else if ($$.attr("id")) {
id = 'id="markItUp'+($$.attr("id").substr(0, 1).toUpperCase())+($$.attr("id").substr(1))+'"';
}
if (options.nameSpace) {
nameSpace = 'class="'+options.nameSpace+'"';
}
$$.wrap('');
$$.wrap('');
$$.wrap('');
$$.addClass("markItUpEditor");
// add the header before the textarea
header = $('').insertBefore($$);
$(dropMenus(options.markupSet)).appendTo(header);
// add the footer after the textarea
footer = $('').insertAfter($$);
// add the resize handle after textarea
if (options.resizeHandle === true && browser.safari !== true) {
resizeHandle = $('')
.insertAfter($$)
.bind("mousedown.markItUp", function(e) {
var h = $$.height(), y = e.clientY, mouseMove, mouseUp;
mouseMove = function(e) {
$$.css("height", Math.max(20, e.clientY+h-y)+"px");
return false;
};
mouseUp = function(e) {
$("html").unbind("mousemove.markItUp", mouseMove).unbind("mouseup.markItUp", mouseUp);
return false;
};
$("html").bind("mousemove.markItUp", mouseMove).bind("mouseup.markItUp", mouseUp);
});
footer.append(resizeHandle);
}
// listen key events
$$.bind('keydown.markItUp', keyPressed).bind('keyup', keyPressed);
// bind an event to catch external calls
$$.bind("insertion.markItUp", function(e, settings) {
if (settings.target !== false) {
get();
}
if (textarea === $.markItUp.focused) {
markup(settings);
}
});
// remember the last focus
$$.bind('focus.markItUp', function() {
$.markItUp.focused = this;
});
if (options.previewInElement) {
refreshPreview();
}
}
// recursively build header with dropMenus from markupset
function dropMenus(markupSet) {
var ul = $('
'), i = 0;
$('li:hover > ul', ul).css('display', 'block');
$.each(markupSet, function() {
var button = this, t = '', title, li, j;
title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||'');
key = (button.key) ? 'accesskey="'+button.key+'"' : '';
if (button.separator) {
li = $(''+(button.separator||'')+' ').appendTo(ul);
} else {
i++;
for (j = levels.length -1; j >= 0; j--) {
t += levels[j]+"-";
}
li = $(''+(button.name||'')+' ')
.bind("contextmenu.markItUp", function() { // prevent contextmenu on mac and allow ctrl+click
return false;
}).bind('click.markItUp', function(e) {
e.preventDefault();
}).bind("focusin.markItUp", function(){
$$.focus();
}).bind('mouseup', function() {
if (button.call) {
eval(button.call)();
}
setTimeout(function() { markup(button) },1);
return false;
}).bind('mouseenter.markItUp', function() {
$('> ul', this).show();
$(document).one('click', function() { // close dropmenu if click outside
$('ul ul', header).hide();
}
);
}).bind('mouseleave.markItUp', function() {
$('> ul', this).hide();
}).appendTo(ul);
if (button.dropMenu) {
levels.push(i);
$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu));
}
}
});
levels.pop();
return ul;
}
// markItUp! markups
function magicMarkups(string) {
if (string) {
string = string.toString();
string = string.replace(/\(\!\(([\s\S]*?)\)\!\)/g,
function(x, a) {
var b = a.split('|!|');
if (altKey === true) {
return (b[1] !== undefined) ? b[1] : b[0];
} else {
return (b[1] === undefined) ? "" : b[0];
}
}
);
// [![prompt]!], [![prompt:!:value]!]
string = string.replace(/\[\!\[([\s\S]*?)\]\!\]/g,
function(x, a) {
var b = a.split(':!:');
if (abort === true) {
return false;
}
value = prompt(b[0], (b[1]) ? b[1] : '');
if (value === null) {
abort = true;
}
return value;
}
);
return string;
}
return "";
}
// prepare action
function prepare(action) {
if ($.isFunction(action)) {
action = action(hash);
}
return magicMarkups(action);
}
// build block to insert
function build(string) {
var openWith = prepare(clicked.openWith);
var placeHolder = prepare(clicked.placeHolder);
var replaceWith = prepare(clicked.replaceWith);
var closeWith = prepare(clicked.closeWith);
var openBlockWith = prepare(clicked.openBlockWith);
var closeBlockWith = prepare(clicked.closeBlockWith);
var multiline = clicked.multiline;
if (replaceWith !== "") {
block = openWith + replaceWith + closeWith;
} else if (selection === '' && placeHolder !== '') {
block = openWith + placeHolder + closeWith;
} else {
string = string || selection;
var lines = [string], blocks = [];
if (multiline === true) {
lines = string.split(/\r?\n/);
}
for (var l = 0; l < lines.length; l++) {
line = lines[l];
var trailingSpaces;
if (trailingSpaces = line.match(/ *$/)) {
blocks.push(openWith + line.replace(/ *$/g, '') + closeWith + trailingSpaces);
} else {
blocks.push(openWith + line + closeWith);
}
}
block = blocks.join("\n");
}
block = openBlockWith + block + closeBlockWith;
return { block:block,
openBlockWith:openBlockWith,
openWith:openWith,
replaceWith:replaceWith,
placeHolder:placeHolder,
closeWith:closeWith,
closeBlockWith:closeBlockWith
};
}
// define markup to insert
function markup(button) {
var len, j, n, i;
hash = clicked = button;
get();
$.extend(hash, { line:"",
root:options.root,
textarea:textarea,
selection:(selection||''),
caretPosition:caretPosition,
ctrlKey:ctrlKey,
shiftKey:shiftKey,
altKey:altKey
}
);
// callbacks before insertion
prepare(options.beforeInsert);
prepare(clicked.beforeInsert);
if ((ctrlKey === true && shiftKey === true) || button.multiline === true) {
prepare(clicked.beforeMultiInsert);
}
$.extend(hash, { line:1 });
if ((ctrlKey === true && shiftKey === true)) {
lines = selection.split(/\r?\n/);
for (j = 0, n = lines.length, i = 0; i < n; i++) {
if ($.trim(lines[i]) !== '') {
$.extend(hash, { line:++j, selection:lines[i] } );
lines[i] = build(lines[i]).block;
} else {
lines[i] = "";
}
}
string = { block:lines.join('\n')};
start = caretPosition;
len = string.block.length + ((browser.opera) ? n-1 : 0);
} else if (ctrlKey === true) {
string = build(selection);
start = caretPosition + string.openWith.length;
len = string.block.length - string.openWith.length - string.closeWith.length;
len = len - (string.block.match(/ $/) ? 1 : 0);
len -= fixIeBug(string.block);
} else if (shiftKey === true) {
string = build(selection);
start = caretPosition;
len = string.block.length;
len -= fixIeBug(string.block);
} else {
string = build(selection);
start = caretPosition + string.block.length ;
len = 0;
start -= fixIeBug(string.block);
}
if ((selection === '' && string.replaceWith === '')) {
caretOffset += fixOperaBug(string.block);
start = caretPosition + string.openBlockWith.length + string.openWith.length;
len = string.block.length - string.openBlockWith.length - string.openWith.length - string.closeWith.length - string.closeBlockWith.length;
caretOffset = $$.val().substring(caretPosition, $$.val().length).length;
caretOffset -= fixOperaBug($$.val().substring(0, caretPosition));
}
$.extend(hash, { caretPosition:caretPosition, scrollPosition:scrollPosition } );
if (string.block !== selection && abort === false) {
insert(string.block);
set(start, len);
} else {
caretOffset = -1;
}
get();
$.extend(hash, { line:'', selection:selection });
// callbacks after insertion
if ((ctrlKey === true && shiftKey === true) || button.multiline === true) {
prepare(clicked.afterMultiInsert);
}
prepare(clicked.afterInsert);
prepare(options.afterInsert);
// refresh preview if opened
if (previewWindow && options.previewAutoRefresh) {
refreshPreview();
}
// reinit keyevent
shiftKey = altKey = ctrlKey = abort = false;
}
// Substract linefeed in Opera
function fixOperaBug(string) {
if (browser.opera) {
return string.length - string.replace(/\n*/g, '').length;
}
return 0;
}
// Substract linefeed in IE
function fixIeBug(string) {
if (browser.msie) {
return string.length - string.replace(/\r*/g, '').length;
}
return 0;
}
// add markup
function insert(block) {
if (document.selection) {
var newSelection = document.selection.createRange();
newSelection.text = block;
} else {
textarea.value = textarea.value.substring(0, caretPosition) + block + textarea.value.substring(caretPosition + selection.length, textarea.value.length);
}
}
// set a selection
function set(start, len) {
if (textarea.createTextRange){
// quick fix to make it work on Opera 9.5
if (browser.opera && browser.version >= 9.5 && len == 0) {
return false;
}
range = textarea.createTextRange();
range.collapse(true);
range.moveStart('character', start);
range.moveEnd('character', len);
range.select();
} else if (textarea.setSelectionRange ){
textarea.setSelectionRange(start, start + len);
}
textarea.scrollTop = scrollPosition;
textarea.focus();
}
// get the selection
function get() {
textarea.focus();
scrollPosition = textarea.scrollTop;
if (document.selection) {
selection = document.selection.createRange().text;
if (browser.msie) { // ie
var range = document.selection.createRange(), rangeCopy = range.duplicate();
rangeCopy.moveToElementText(textarea);
caretPosition = -1;
while(rangeCopy.inRange(range)) {
rangeCopy.moveStart('character');
caretPosition ++;
}
} else { // opera
caretPosition = textarea.selectionStart;
}
} else { // gecko & webkit
caretPosition = textarea.selectionStart;
selection = textarea.value.substring(caretPosition, textarea.selectionEnd);
}
return selection;
}
// open preview window
function preview() {
if (typeof options.previewHandler === 'function') {
previewWindow = true;
} else if (options.previewInElement) {
previewWindow = $(options.previewInElement);
} else if (!previewWindow || previewWindow.closed) {
if (options.previewInWindow) {
previewWindow = window.open('', 'preview', options.previewInWindow);
$(window).unload(function() {
previewWindow.close();
});
} else {
iFrame = $('');
if (options.previewPosition == 'after') {
iFrame.insertAfter(footer);
} else {
iFrame.insertBefore(header);
}
previewWindow = iFrame[iFrame.length - 1].contentWindow || frame[iFrame.length - 1];
}
} else if (altKey === true) {
if (iFrame) {
iFrame.remove();
} else {
previewWindow.close();
}
previewWindow = iFrame = false;
}
if (!options.previewAutoRefresh) {
refreshPreview();
}
if (options.previewInWindow) {
previewWindow.focus();
}
}
// refresh Preview window
function refreshPreview() {
renderPreview();
}
function renderPreview() {
var phtml;
if (options.previewHandler && typeof options.previewHandler === 'function') {
options.previewHandler( $$.val() );
} else if (options.previewParser && typeof options.previewParser === 'function') {
var data = options.previewParser( $$.val() );
writeInPreview(localize(data, 1) );
} else if (options.previewParserPath !== '') {
$.ajax({
type: 'POST',
dataType: 'text',
global: false,
url: options.previewParserPath,
data: options.previewParserVar+'='+encodeURIComponent($$.val()),
success: function(data) {
writeInPreview( localize(data, 1) );
}
});
} else {
if (!template) {
$.ajax({
url: options.previewTemplatePath,
dataType: 'text',
global: false,
success: function(data) {
writeInPreview( localize(data, 1).replace(//g, $$.val()) );
}
});
}
}
return false;
}
function writeInPreview(data) {
if (options.previewInElement) {
$(options.previewInElement).html(data);
} else if (previewWindow && previewWindow.document) {
try {
sp = previewWindow.document.documentElement.scrollTop
} catch(e) {
sp = 0;
}
previewWindow.document.open();
previewWindow.document.write(data);
previewWindow.document.close();
previewWindow.document.documentElement.scrollTop = sp;
}
}
// set keys pressed
function keyPressed(e) {
shiftKey = e.shiftKey;
altKey = e.altKey;
ctrlKey = (!(e.altKey && e.ctrlKey)) ? (e.ctrlKey || e.metaKey) : false;
if (e.type === 'keydown') {
if (ctrlKey === true) {
li = $('a[accesskey="'+((e.keyCode == 13) ? '\\n' : String.fromCharCode(e.keyCode))+'"]', header).parent('li');
if (li.length !== 0) {
ctrlKey = false;
setTimeout(function() {
li.triggerHandler('mouseup');
},1);
return false;
}
}
if (e.keyCode === 13 || e.keyCode === 10) { // Enter key
if (ctrlKey === true) { // Enter + Ctrl
ctrlKey = false;
markup(options.onCtrlEnter);
return options.onCtrlEnter.keepDefault;
} else if (shiftKey === true) { // Enter + Shift
shiftKey = false;
markup(options.onShiftEnter);
return options.onShiftEnter.keepDefault;
} else { // only Enter
markup(options.onEnter);
return options.onEnter.keepDefault;
}
}
if (e.keyCode === 9) { // Tab key
if (shiftKey == true || ctrlKey == true || altKey == true) {
return false;
}
if (caretOffset !== -1) {
get();
caretOffset = $$.val().length - caretOffset;
set(caretOffset, 0);
caretOffset = -1;
return false;
} else {
markup(options.onTab);
return options.onTab.keepDefault;
}
}
}
}
function remove() {
$$.unbind(".markItUp").removeClass('markItUpEditor');
$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
$$.data('markItUp', null);
}
init();
});
};
$.fn.markItUpRemove = function() {
return this.each(function() {
$(this).markItUp('remove');
}
);
};
$.markItUp = function(settings) {
var options = { target:false };
$.extend(options, settings);
if (options.target) {
return $(options.target).each(function() {
$(this).focus();
$(this).trigger('insertion', [options]);
});
} else {
$('textarea').trigger('insertion', [options]);
}
};
})(jQuery);
================================================
FILE: plugins/markitup/markitup/sets/html/set.js
================================================
// ----------------------------------------------------------------------------
// markItUp!
// ----------------------------------------------------------------------------
// Copyright (C) 2008 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Html tags
// http://en.wikipedia.org/wiki/html
// ----------------------------------------------------------------------------
// Basic set. Feel free to add more tags
// ----------------------------------------------------------------------------
mySettings = {
onShiftEnter: {keepDefault:false, replaceWith:'
\n'},
onCtrlEnter: {keepDefault:false, openWith:'\n', closeWith:'
\n'},
onTab: {keepDefault:false, openWith:' '},
markupSet: [
{name:'Heading 1', key:'1', openWith:'', closeWith:'
', placeHolder:'Your title here...' },
{name:'Heading 2', key:'2', openWith:'', closeWith:'
', placeHolder:'Your title here...' },
{name:'Heading 3', key:'3', openWith:'', closeWith:'
', placeHolder:'Your title here...' },
{name:'Heading 4', key:'4', openWith:'', closeWith:'
', placeHolder:'Your title here...' },
{name:'Heading 5', key:'5', openWith:'', closeWith:'
', placeHolder:'Your title here...' },
{name:'Heading 6', key:'6', openWith:'', closeWith:'
', placeHolder:'Your title here...' },
{name:'Paragraph', openWith:'', closeWith:'
' },
{separator:'---------------' },
{name:'Bold', key:'B', openWith:'(!(|!|)!)', closeWith:'(!(|!|)!)' },
{name:'Italic', key:'I', openWith:'(!(|!|)!)', closeWith:'(!(|!|)!)' },
{name:'Stroke through', key:'S', openWith:'', closeWith:'' },
{separator:'---------------' },
{name:'Ul', openWith:'\n', closeWith:'
\n' },
{name:'Ol', openWith:'\n', closeWith:'
\n' },
{name:'Li', openWith:'', closeWith:' ' },
{separator:'---------------' },
{name:'Picture', key:'P', replaceWith:'
' },
{name:'Link', key:'L', openWith:'', closeWith:'', placeHolder:'Your text to link...' },
{name:'Colors', className:'palette', dropMenu: [
{name:'Yellow', openWith:'', closeWith:'', className:"col1-1" },
{name:'Yellow', openWith:'', closeWith:'', className:"col1-2" },
{name:'Yellow', openWith:'', closeWith:'', className:"col1-3" },
{name:'Orange', openWith:'', closeWith:'', className:"col2-1" },
{name:'Orange', openWith:'', closeWith:'', className:"col2-2" },
{name:'Orange', openWith:'', closeWith:'', className:"col2-3" },
{name:'Brown', openWith:'', closeWith:'', className:"col3-1" },
{name:'Brown', openWith:'', closeWith:'', className:"col3-2" },
{name:'Brown', openWith:'', closeWith:'', className:"col3-3" },
{name:'Green', openWith:'', closeWith:'', className:"col4-1" },
{name:'Green', openWith:'', closeWith:'', className:"col4-2" },
{name:'Green', openWith:'', closeWith:'', className:"col4-3" },
{name:'Blue', openWith:'', closeWith:'', className:"col5-1" },
{name:'Blue', openWith:'', closeWith:'', className:"col5-2" },
{name:'Blue', openWith:'', closeWith:'', className:"col5-3" },
{name:'Purple', openWith:'', closeWith:'', className:"col6-1" },
{name:'Purple', openWith:'', closeWith:'', className:"col6-2" },
{name:'Purple', openWith:'', closeWith:'', className:"col6-3" },
{name:'Red', openWith:'', closeWith:'', className:"col7-1" },
{name:'Red', openWith:'', closeWith:'', className:"col7-2" },
{name:'Red', openWith:'', closeWith:'', className:"col7-3" },
{name:'Gray', openWith:'', closeWith:'', className:"col8-1" },
{name:'Gray', openWith:'', closeWith:'', className:"col8-2" },
{name:'Gray', openWith:'', closeWith:'', className:"col8-3" },
{name:'Gray', openWith:'', closeWith:'', className:"col9-1" },
{name:'Gray', openWith:'', closeWith:'', className:"col9-2" },
{name:'Gray', openWith:'', closeWith:'', className:"col9-3" }
]
},
{separator:'---------------' },
{name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
{name:'Preview', className:'preview', call:'preview' }
]
}
================================================
FILE: plugins/markitup/markitup/sets/html/style.css
================================================
/* -------------------------------------------------------------------
// markItUp!
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
.markItUp .markItUpButton1 a {
background-image:url(images/h1.png);
}
.markItUp .markItUpButton2 a {
background-image:url(images/h2.png);
}
.markItUp .markItUpButton3 a {
background-image:url(images/h3.png);
}
.markItUp .markItUpButton4 a {
background-image:url(images/h4.png);
}
.markItUp .markItUpButton5 a {
background-image:url(images/h5.png);
}
.markItUp .markItUpButton6 a {
background-image:url(images/h6.png);
}
.markItUp .markItUpButton7 a {
background-image:url(images/paragraph.png);
}
.markItUp .markItUpButton8 a {
background-image:url(images/bold.png);
}
.markItUp .markItUpButton9 a {
background-image:url(images/italic.png);
}
.markItUp .markItUpButton10 a {
background-image:url(images/stroke.png);
}
.markItUp .markItUpButton11 a {
background-image:url(images/list-bullet.png);
}
.markItUp .markItUpButton12 a {
background-image:url(images/list-numeric.png);
}
.markItUp .markItUpButton13 a {
background-image:url(images/list-item.png);
}
.markItUp .markItUpButton14 a {
background-image:url(images/picture.png);
}
.markItUp .markItUpButton15 a {
background-image:url(images/link.png);
}
.markItUp .markItUpButton16 a {
background-image:url(images/colors.png);
}
.markItUp .clean a {
background-image:url(images/clean.png);
}
.markItUp .preview a {
background-image:url(images/preview.png);
}
.markItUp .palette a {
background-image:url(images/colors.png);
}
.markItUp .palette ul {
width:81px;
padding:1px;
}
.markItUp .palette li {
border:1px solid white;
width:25px; height:25px;
overflow:hidden;
padding:0px; margin:0px;
float:left;
}
.markItUp .palette ul a {
width:25px; height:25px;
}
.markItUp .palette ul a:hover {
background-color:none;
}
.markItUp .palette .col1-1 a {
background:#FCE94F;
}
.markItUp .palette .col1-2 a {
background:#EDD400;
}
.markItUp .palette .col1-3 a {
background:#C4A000;
}
.markItUp .palette .col2-1 a {
background:#FCAF3E;
}
.markItUp .palette .col2-2 a {
background:#F57900;
}
.markItUp .palette .col2-3 a {
background:#CE5C00;
}
.markItUp .palette .col3-1 a {
background:#E9B96E;
}
.markItUp .palette .col3-2 a {
background:#C17D11;
}
.markItUp .palette .col3-3 a {
background:#8F5902;
}
.markItUp .palette .col4-1 a {
background:#8AE234;
}
.markItUp .palette .col4-2 a {
background:#73D216;
}
.markItUp .palette .col4-3 a {
background:#4E9A06;
}
.markItUp .palette .col5-1 a {
background:#729FCF;
}
.markItUp .palette .col5-2 a {
background:#3465A4;
}
.markItUp .palette .col5-3 a {
background:#204A87;
}
.markItUp .palette .col6-1 a {
background:#AD7FA8;
}
.markItUp .palette .col6-2 a {
background:#75507B;
}
.markItUp .palette .col6-3 a {
background:#5C3566;
}
.markItUp .palette .col7-1 a {
background:#EF2929;
}
.markItUp .palette .col7-2 a {
background:#CC0000;
}
.markItUp .palette .col7-3 a {
background:#A40000;
}
.markItUp .palette .col8-1 a {
background:#FFFFFF;
}
.markItUp .palette .col8-2 a {
background:#D3D7CF;
}
.markItUp .palette .col8-3 a {
background:#BABDB6;
}
.markItUp .palette .col9-1 a {
background:#888A85;
}
.markItUp .palette .col9-2 a {
background:#555753;
}
.markItUp .palette .col9-3 a {
background:#000000;
}
================================================
FILE: plugins/markitup/markitup/skins/simple/style.css
================================================
/* -------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// By Jay Salvat - http://markitup.jaysalvat.com/
// ------------------------------------------------------------------*/
.markItUp * {
margin:0px; padding:0px;
outline:none;
}
.markItUp a:link,
.markItUp a:visited {
color:#000;
text-decoration:none;
}
.markItUp {
width:100%;
margin:5px 0 5px 0;
}
.markItUpContainer {
font:11px Verdana, Arial, Helvetica, sans-serif;
}
.markItUpEditor {
font:12px 'Courier New', Courier, monospace;
padding:5px;
width:100%;
height:320px;
clear:both;
line-height:18px;
overflow:auto;
}
.markItUpPreviewFrame {
overflow:auto;
background-color:#FFF;
width:99.9%;
height:300px;
margin:5px 0;
border:1px solid #ccc;
}
.markItUpFooter {
width:100%;
}
.markItUpResizeHandle {
overflow:hidden;
width:22px; height:5px;
margin-left:auto;
margin-right:auto;
background-image:url(images/handle.png);
cursor:n-resize;
}
/***************************************************************************************/
/* first row of buttons */
.markItUpHeader ul li {
list-style:none;
float:left;
position:relative;
}
.markItUpHeader ul li:hover > ul{
display:block;
}
.markItUpHeader ul .markItUpDropMenu {
background:transparent url(images/menu.png) no-repeat 115% 50%;
margin-right:5px;
}
.markItUpHeader ul .markItUpDropMenu li {
margin-right:0px;
}
/* next rows of buttons */
.markItUpHeader ul ul {
display:none;
position:absolute;
top:18px; left:0px;
background:#FFF;
border:1px solid #000;
}
.markItUpHeader ul ul li {
float:none;
border-bottom:1px solid #000;
}
.markItUpHeader ul ul .markItUpDropMenu {
background:#FFF url(images/submenu.png) no-repeat 100% 50%;
}
.markItUpHeader ul .markItUpSeparator {
margin:0 10px;
width:1px;
height:16px;
overflow:hidden;
background-color:#CCC;
}
.markItUpHeader ul ul .markItUpSeparator {
width:auto; height:1px;
margin:0px;
}
/* next rows of buttons */
.markItUpHeader ul ul ul {
position:absolute;
top:-1px; left:150px;
}
.markItUpHeader ul ul ul li {
float:none;
}
.markItUpHeader ul a {
display:block;
width:16px; height:16px;
text-indent:-10000px;
background-repeat:no-repeat;
padding:3px;
margin:0px;
}
.markItUpHeader ul ul a {
display:block;
padding-left:0px;
text-indent:0;
width:120px;
padding:5px 5px 5px 25px;
background-position:2px 50%;
}
.markItUpHeader ul ul a:hover {
color:#FFF;
background-color:#000;
}
================================================
FILE: plugins/markitup/markitup/templates/preview.css
================================================
/* preview style examples */
body { background-color:#fff; font:100% "Helvetica Neue", Helvetica, Arial, sans-serif; }
================================================
FILE: plugins/markitup/markitup/templates/preview.html
================================================
markItUp! preview template
================================================
FILE: plugins/markitup/markitup.plugin.php
================================================
');
echo ('');
}
}
================================================
FILE: plugins/sandbox/install/sandbox.install.php
================================================
plugins/sandbox/sandbox.plugin.php
active
15
Sandbox
Sandbox plugin for Monstra
1.0.0
Awilum
http://monstra.org/
================================================
FILE: plugins/sandbox/install/sandbox.uninstall.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Sandbox plugin pro Monstra',
'Sandbox template' => 'Sandbox téma',
'Save' => 'Uložit',
)
);
================================================
FILE: plugins/sandbox/languages/de.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Sandbox Plugin für Monstra',
'Sandbox template' => 'Sandbox Template',
'Save' => 'Speichern',
)
);
================================================
FILE: plugins/sandbox/languages/en.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Sandbox plugin for Monstra',
'Sandbox template' => 'Sandbox template',
'Save' => 'Save',
)
);
================================================
FILE: plugins/sandbox/languages/es.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Sandbox plugin for Monstra',
'Sandbox template' => 'Plantilla sandbox',
'Save' => 'Guardar',
)
);
================================================
FILE: plugins/sandbox/languages/fa.lang.php
================================================
array(
'Sandbox' => 'سندباکس',
'Sandbox plugin for Monstra' => 'پلاگین سندباکس برای مونسترا',
'Sandbox template' => 'قالب سندباکس',
'Save' => 'ذخیره',
)
);
================================================
FILE: plugins/sandbox/languages/fr.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Plugin Sandbox pour Monstra',
'Sandbox template' => 'Modèle Sandbox',
'Save' => 'Enregistrer',
)
);
================================================
FILE: plugins/sandbox/languages/id.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Plugin Sandbox untuk Monstra',
'Sandbox template' => 'Template Sandbox',
'Save' => 'Simpan',
)
);
================================================
FILE: plugins/sandbox/languages/it.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Plugin Sandbox per Monstra',
'Sandbox template' => 'Modello Sandbox',
'Save' => 'Salva',
)
);
================================================
FILE: plugins/sandbox/languages/ka-ge.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Sandbox-ის პლაგინი Monstra-თვის',
'Sandbox template' => 'Sandbox-ის ნიმუში',
'Save' => 'შენახვა',
)
);
================================================
FILE: plugins/sandbox/languages/lt.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Sandbox papildinys',
'Sandbox template' => 'Sandbox šablonas',
'Save' => 'Išsaugoti',
)
);
================================================
FILE: plugins/sandbox/languages/nl.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Sandbox Plugin voor Monstra',
'Sandbox template' => 'Sandbox Template',
'Save' => 'Opslaan',
)
);
================================================
FILE: plugins/sandbox/languages/pl.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Wtyczka Sandbox dla systemu Monstra',
'Sandbox template' => 'Szablon Sandbox',
'Save' => 'Zapisz',
)
);
================================================
FILE: plugins/sandbox/languages/pt-br.lang.php
================================================
array(
'Sandbox' => 'Caixa de Areia',
'Sandbox plugin for Monstra' => 'Plugin Caixa de Areia para o Monstra CMS',
'Sandbox template' => 'Template da caixa de areia',
'Save' => 'Salvar',
)
);
================================================
FILE: plugins/sandbox/languages/ru.lang.php
================================================
array(
'Sandbox' => 'Песочница',
'Sandbox plugin for Monstra' => 'Плагин песочница для Monstra',
'Sandbox template' => 'Шаблон песочницы',
'Save' => 'Сохранить',
)
);
================================================
FILE: plugins/sandbox/languages/sk.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Sandbox plugin pre Monstra',
'Sandbox template' => 'Sandbox téma',
'Save' => 'Uložiť',
)
);
================================================
FILE: plugins/sandbox/languages/sr.lang.php
================================================
array(
'Sandbox' => 'Sandbox',
'Sandbox plugin for Monstra' => 'Sandbox dodatak za Monstra',
'Sandbox template' => 'Sandbox šablon',
'Save' => 'Sačuvaj',
)
);
================================================
FILE: plugins/sandbox/languages/tr.lang.php
================================================
array(
'Sandbox' => 'Deneme',
'Sandbox plugin for Monstra' => 'Monstra için deneme/test eklentisi',
'Sandbox template' => 'Deneme şablonu',
'Save' => 'Kaydet',
)
);
================================================
FILE: plugins/sandbox/languages/uk.lang.php
================================================
array(
'Sandbox' => 'Пісочниця',
'Sandbox plugin for Monstra' => 'Плагін пісочниця для Monstra',
'Sandbox template' => 'Шаблон пісочниці',
'Save' => 'Зберегти',
)
);
================================================
FILE: plugins/sandbox/languages/zh-cn.lang.php
================================================
array(
'Sandbox' => '沙盒',
'Sandbox plugin for Monstra' => 'Monstra 沙盒插件',
'Sandbox template' => '沙盒模板',
'Save' => '保存',
)
);
================================================
FILE: plugins/sandbox/sandbox.admin.php
================================================
display();
}
}
/**
* Form Component Save
*/
public static function formComponentSave()
{
if (Request::post('sandbox_component_save')) {
if (Security::check(Request::post('csrf'))) {
Option::update('sandbox_template', Request::post('sandbox_form_template'));
Request::redirect('index.php?id=themes');
}
}
}
/**
* Form Component
*/
public static function formComponent()
{
$_templates = Themes::getTemplates();
foreach ($_templates as $template) {
$templates[basename($template, '.template.php')] = basename($template, '.template.php');
}
echo (
''.
Form::open().
Form::hidden('csrf', Security::token()).
Form::label('sandbox_form_template', __('Sandbox template', 'sandbox')).
Form::select('sandbox_form_template', $templates, Option::get('sandbox_template'), array('class' => 'form-control')).
Html::br().
Form::submit('sandbox_component_save', __('Save', 'sandbox'), array('class' => 'btn btn-default')).
Form::close().
''
);
}
}
================================================
FILE: plugins/sandbox/sandbox.plugin.php
================================================
select('[parent="'.Blog::$parent_page_name.'" and status="published"]', 5, 0, array('slug', 'title', 'author', 'date'), 'date', 'DESC');
// Date now
$now = date("D, d M Y H:i:s T");
ob_end_clean();
?>
'."\n"; ?>
MonstraCMS::BLOG::RSS
/blog
The latest updates for .
en-us
Monstra
-
]]>