CREATE TABLE `modx_site_plugin_events` (
  `pluginid` int NOT NULL DEFAULT '0',
  `event` varchar(191) NOT NULL DEFAULT '',
  `priority` int NOT NULL DEFAULT '0',
  `propertyset` int unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`pluginid`,`event`),
  KEY `priority` (`priority`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

INSERT INTO `modx_site_plugin_events` (`pluginid`, `event`, `priority`, `propertyset`) VALUES
(3,	'OnMODXInit',	-100,	0),
(3,	'OnSiteRefresh',	0,	0),
(3,	'OnWebPagePrerender',	-100,	0),
(6,	'OnDocFormRender',	0,	0),
(6,	'OnDocFormSave',	0,	0),
(6,	'OnLoadWebDocument',	0,	0),
(6,	'OnMODXInit',	0,	0),
(6,	'OnResourceDuplicate',	0,	0),
(7,	'OnEmptyTrash',	0,	0),
(8,	'OnDocFormPrerender',	0,	0),
(8,	'OnManagerPageBeforeRender',	0,	0),
(8,	'OnTVInputPropertiesList',	0,	0),
(8,	'OnTVInputRenderList',	0,	0),
(8,	'OnTVOutputRenderList',	0,	0),
(8,	'OnTVOutputRenderPropertiesList',	0,	0),
(9,	'OnManagerPageBeforeRender',	0,	0),
(9,	'OnTVInputPropertiesList',	0,	0),
(9,	'OnTVInputRenderList',	0,	0),
(9,	'OnTVOutputRenderList',	0,	0),
(9,	'OnTVOutputRenderPropertiesList',	0,	0),
(12,	'OnBeforeDocFormSave',	0,	0),
(12,	'OnDocFormPrerender',	0,	0),
(12,	'OnDocFormSave',	0,	0),
(12,	'OnEmptyTrash',	0,	0),
(12,	'OnLoadWebDocument',	0,	0),
(12,	'OnManagerPageBeforeRender',	0,	0),
(12,	'OnPageNotFound',	0,	0),
(12,	'OnResourceBeforeSort',	0,	0),
(12,	'OnResourceDuplicate',	0,	0),
(13,	'OnSiteRefresh',	0,	0),
(14,	'OnSiteRefresh',	0,	0),
(16,	'OnSiteRefresh',	0,	0),
(16,	'OnWebPagePrerender',	0,	0),
(17,	'OnHandleRequest',	0,	0),
(18,	'OnChunkFormPrerender',	0,	0),
(18,	'OnDocFormPrerender',	0,	0),
(18,	'OnFileCreateFormPrerender',	0,	0),
(18,	'OnFileEditFormPrerender',	0,	0),
(18,	'OnManagerPageBeforeRender',	0,	0),
(18,	'OnPluginFormPrerender',	0,	0),
(18,	'OnRichTextEditorRegister',	0,	0),
(18,	'OnSnipFormPrerender',	0,	0),
(18,	'OnTempFormPrerender',	0,	0),
(18,	'OnTVInputRenderList',	0,	0),
(20,	'OnDocFormPrerender',	0,	0),
(20,	'OnDocFormSave',	0,	0),
(20,	'OnLoadWebDocument',	0,	0),
(20,	'OnManagerAuthentication',	0,	0),
(20,	'OnManagerPageAfterRender',	0,	0),
(20,	'OnManagerPageBeforeRender',	0,	0),
(20,	'OnManagerPageInit',	0,	0),
(20,	'OnMODXInit',	-100,	0),
(20,	'OnTempFormPrerender',	0,	0),
(21,	'OnBeforeChunkFormSave',	0,	0),
(21,	'OnBeforePluginFormSave',	0,	0),
(21,	'OnBeforeSnipFormSave',	0,	0),
(21,	'OnBeforeTempFormSave',	0,	0),
(21,	'OnChunkFormDelete',	0,	0),
(21,	'OnChunkFormPrerender',	0,	0),
(21,	'OnManagerPageBeforeRender',	0,	0),
(21,	'OnManagerPageInit',	0,	0),
(21,	'OnPluginFormDelete',	0,	0),
(21,	'OnPluginFormPrerender',	0,	0),
(21,	'OnSnipFormDelete',	0,	0),
(21,	'OnSnipFormPrerender',	0,	0),
(21,	'OnTempFormDelete',	0,	0),
(21,	'OnTempFormPrerender',	0,	0),
(25,	'OnManagerPageBeforeRender',	0,	0),
(26,	'OnBeforeRegisterClientScripts',	0,	0),
(26,	'OnManagerPageBeforeRender',	0,	0),
(27,	'OnHandleRequest',	0,	0),
(28,	'OnHandleRequest',	0,	0),
(28,	'OnMODXInit',	0,	0),
(28,	'pdoToolsOnFenomInit',	0,	0),
(29,	'OnManagerAuthentication',	0,	0),
(29,	'OnUserNotFound',	0,	0),
(29,	'OnWebAuthentication',	0,	0);

CREATE TABLE `modx_site_plugins` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `source` int unsigned NOT NULL DEFAULT '0',
  `property_preprocess` tinyint unsigned NOT NULL DEFAULT '0',
  `name` varchar(50) NOT NULL DEFAULT '',
  `description` varchar(191) NOT NULL DEFAULT '',
  `editor_type` int NOT NULL DEFAULT '0',
  `category` int NOT NULL DEFAULT '0',
  `cache_type` tinyint(1) NOT NULL DEFAULT '0',
  `plugincode` mediumtext NOT NULL,
  `locked` tinyint unsigned NOT NULL DEFAULT '0',
  `properties` text,
  `disabled` tinyint unsigned NOT NULL DEFAULT '0',
  `moduleguid` varchar(32) NOT NULL DEFAULT '',
  `static` tinyint unsigned NOT NULL DEFAULT '0',
  `static_file` varchar(191) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `category` (`category`),
  KEY `locked` (`locked`),
  KEY `disabled` (`disabled`),
  KEY `static` (`static`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

INSERT INTO `modx_site_plugins` (`id`, `source`, `property_preprocess`, `name`, `description`, `editor_type`, `category`, `cache_type`, `plugincode`, `locked`, `properties`, `disabled`, `moduleguid`, `static`, `static_file`) VALUES
(3,	1,	0,	'pdoTools',	'',	0,	4,	0,	'/** @var modX $modx */\r\nswitch ($modx->event->name) {\r\n\r\n    case \'OnMODXInit\':\r\n        $fqn = $modx->getOption(\'pdoTools.class\', null, \'pdotools.pdotools\', true);\r\n        $path = $modx->getOption(\'pdotools_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\n        $modx->loadClass($fqn, $path, false, true);\r\n\r\n        $fqn = $modx->getOption(\'pdoFetch.class\', null, \'pdotools.pdofetch\', true);\r\n        $path = $modx->getOption(\'pdofetch_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\n        $modx->loadClass($fqn, $path, false, true);\r\n        break;\r\n\r\n    case \'OnSiteRefresh\':\r\n        /** @var pdoTools $pdoTools */\r\n        if ($pdoTools = $modx->getService(\'pdoTools\')) {\r\n            if ($pdoTools->clearFileCache()) {\r\n                $modx->log(modX::LOG_LEVEL_INFO, $modx->lexicon(\'refresh_default\') . \': pdoTools\');\r\n            }\r\n        }\r\n        break;\r\n\r\n    case \'OnWebPagePrerender\':\r\n        $parser = $modx->getParser();\r\n        if ($parser instanceof pdoParser) {\r\n            foreach ($parser->pdoTools->ignores as $key => $val) {\r\n                $modx->resource->_output = str_replace($key, $val, $modx->resource->_output);\r\n            }\r\n        }\r\n        break;\r\n}',	0,	NULL,	0,	'',	0,	'core/components/pdotools/elements/plugins/plugin.pdotools.php'),
(6,	0,	0,	'seoPro',	'SEO optimizing plugin for MODx Revolution.',	0,	7,	0,	'/**\n * The base seoPro snippet.\n *\n * @package seopro\n */\n$seoPro = $modx->getService(\'seopro\', \'seoPro\', $modx->getOption(\'seopro.core_path\', null, $modx->getOption(\'core_path\') . \'components/seopro/\') . \'model/seopro/\', $scriptProperties);\nif (!($seoPro instanceof seoPro)) {\n    return \'\';\n}\n\n$disabledTemplates = explode(\',\', $modx->getOption(\'seopro.disabledtemplates\', null, \'0\'));\n\nswitch ($modx->event->name) {\n    case \'OnMODXInit\':\n        $version = $modx->getVersionData();\n        $version = (int)($version[\'version\'] . $version[\'major_version\']);\n        if ($version < 27) {\n            $modx->loadClass(\'modResource\');\n            $modx->map[\'modResource\'][\'fieldMeta\'][\'description\'] = array(\n                \'dbtype\' => \'text\',\n                \'phptype\' => \'string\',\n                \'index\' => \'fulltext\',\n                \'indexgrp\' => \'content_ft_idx\',\n            );\n        }\n        break;\n\n    case \'OnDocFormRender\':\n        $template = (string)$resource->get(\'template\');\n        $override = false;\n        if (isset($_REQUEST[\'template\'])) {\n            $template = (string)$_REQUEST[\'template\'];\n            $override = true;\n        }\n        if (($override && $template === \'0\') || (!empty($template) && in_array($template, $disabledTemplates))) {\n            break;\n        }\n        \n        $currClassKey = $resource->get(\'class_key\');\n        $strFields = $modx->getOption(\'seopro.fields\', null, \'pagetitle:70,longtitle:70,description:320,alias:2023,menutitle:2023\');\n        $arrFields = array();\n        if (is_array(explode(\',\', $strFields))) {\n            foreach (explode(\',\', $strFields) as $field) {\n                list($fieldName, $fieldCount) = explode(\':\', $field);\n                $arrFields[$fieldName] = $fieldCount;\n            }\n        } else {\n            return \'\';\n        }\n\n        $keywords = \'\';\n        $modx->controller->addLexiconTopic(\'seopro:default\');\n        $ctxKey = !empty($resource) ? $resource->get(\'context_key\') : $modx->getOption(\'default_context\');\n        $ctx = $modx->getContext($ctxKey);\n        if ($ctx) {\n            $url = $ctx->getOption(\'site_url\', \'\', $modx->getOption(\'site_url\'));\n        } else {\n            $url = $modx->getOption(\'site_url\');\n        }\n        if ($mode == \'upd\') {\n            if ($ctx) {\n                if ($resource->get(\'id\') != $ctx->getOption(\'site_start\', \'\', $modx->getOption(\'site_start\'))) {\n                    $url .= $resource->get(\'uri\');\n                }\n            } else {\n                $url = $modx->makeUrl($resource->get(\'id\'), \'\', \'\', \'full\');\n            }\n            $url = str_replace(\n                $resource->get(\'alias\'),\n                \'<span id=\\\"seopro-replace-alias\\\">\' . $resource->get(\'alias\') . \'</span>\',\n                $url\n            );\n            $seoKeywords = $modx->getObject(\'seoKeywords\', array(\'resource\' => $resource->get(\'id\')));\n            if ($seoKeywords) {\n                $keywords = $seoKeywords->get(\'keywords\');\n            }\n        }\n\n        if ($_REQUEST[\'id\'] == $modx->getOption(\'site_start\')) {\n            unset($arrFields[\'alias\']);\n            unset($arrFields[\'menutitle\']);\n        }\n\n\n        $config = $seoPro->config;\n        unset($config[\'resource\']);\n        $modx->regClientStartupHTMLBlock(\'<script type=\"text/javascript\">\n        Ext.onReady(function() {\n            seoPro.config = \' . $modx->toJSON($config) . \';\n            seoPro.config.record = \"\' . $keywords . \'\";\n            seoPro.config.values = {};\n            seoPro.config.fields = \"\' . implode(\",\", array_keys($arrFields)) . \'\";\n            seoPro.config.chars = \' . $modx->toJSON($arrFields) . \'\n            seoPro.config.url = \"\' . $url . \'\";\n        });</script>\');\n\n        /* include CSS and JS*/\n        $version = $modx->getVersionData();\n        if($version[\'version\'] == 2 && $version[\'major_version\'] == 2){\n            $modx->regClientCSS($seoPro->config[\'assetsUrl\'] . \'css/mgr.css\');\n        }else{\n            $modx->regClientCSS($seoPro->config[\'assetsUrl\'] . \'css/mgr23.css\');\n        }\n        $modx->regClientStartupScript($seoPro->config[\'assetsUrl\'] . \'js/mgr/seopro.js??v=\' . $modx->getOption(\'seopro.version\', null, \'v1.0.0\'));\n        $modx->regClientStartupScript($seoPro->config[\'assetsUrl\'] . \'js/mgr/resource.js?v=\' . $modx->getOption(\'seopro.version\', null, \'v1.0.0\'));\n\n        break;\n\n    case \'OnDocFormSave\':\n        $template = (string)$resource->get(\'template\');\n        $override = false;\n        if (isset($_REQUEST[\'template\'])) {\n            $template = (string)$_REQUEST[\'template\'];\n            $override = true;\n        }\n        if (($override && $template === \'0\') || (!empty($template) && in_array($template, $disabledTemplates))) {\n            break;\n        }\n        $seoKeywords = $modx->getObject(\'seoKeywords\', array(\'resource\' => $resource->get(\'id\')));\n        if (!$seoKeywords && isset($resource)) {\n            $seoKeywords = $modx->newObject(\'seoKeywords\', array(\'resource\' => $resource->get(\'id\')));\n        }\n        if($seoKeywords){\n            if (isset($_POST[\'keywords\'])){\n                $seoKeywords->set(\'keywords\', trim($_POST[\'keywords\'], \',\'));\n            } else {\n                $seoKeywords->set(\'keywords\', \'\');\n            }\n            $seoKeywords->save();\n        }\n        break;\n\n    case \'onResourceDuplicate\':\n        $template = (string)$resource->get(\'template\');\n        $override = false;\n        if (isset($_REQUEST[\'template\'])) {\n            $template = (string)$_REQUEST[\'template\'];\n            $override = true;\n        }\n        if (($override && $template === \'0\') || (!empty($template) && in_array($template, $disabledTemplates))) {\n            break;\n        }\n\n        $seoKeywords = $modx->getObject(\'seoKeywords\', array(\'resource\' => $resource->get(\'id\')));\n        if (!$seoKeywords) {\n            $seoKeywords = $modx->newObject(\'seoKeywords\', array(\'resource\' => $resource->get(\'id\')));\n        }\n        $newSeoKeywords = $modx->newObject(\'seoKeywords\');\n        $newSeoKeywords->fromArray($seoKeywords->toArray());\n        $newSeoKeywords->set(\'resource\', $newResource->get(\'id\'));\n        $newSeoKeywords->save();\n        break;\n\n    case \'OnLoadWebDocument\':\n        if ($modx->context->get(\'key\') == \"mgr\") {\n            break;\n        }\n        $template = ($modx->resource->get(\'template\')) ? (string)$modx->resource->get(\'template\') : \'\';\n        if (in_array($template, $disabledTemplates)) {\n            break;\n        }\n        $seoKeywords = $modx->getObject(\'seoKeywords\', array(\'resource\' => $modx->resource->get(\'id\')));\n        if ($seoKeywords) {\n            $keyWords = $seoKeywords->get(\'keywords\');\n            $modx->setPlaceholder(\'seoPro.keywords\', $keyWords);\n        }\n        // Render the meta title, based on system settings\n        $titleFormat = $modx->getOption(\'seopro.title_format\');\n        if (empty($titleFormat)) {\n            $siteDelimiter = $modx->getOption(\'seopro.delimiter\', null, \'/\');\n            $siteUseSitename = (boolean)$modx->getOption(\'seopro.usesitename\', null, true);\n            $siteID = $modx->resource->get(\'id\');\n            $siteName = $modx->getOption(\'site_name\');\n            $longtitle = $modx->resource->get(\'longtitle\');\n            $pagetitle = $modx->resource->get(\'pagetitle\');\n            $seoProTitle = array();\n            if ($siteID == $modx->getOption(\'site_start\')) {\n                $seoProTitle[\'pagetitle\'] = !empty($longtitle) ? $longtitle : $siteName;\n            } else {\n                $seoProTitle[\'pagetitle\'] = !empty($longtitle) ? $longtitle : $pagetitle;\n                if ($siteUseSitename) {\n                    $seoProTitle[\'delimiter\'] = $siteDelimiter;\n                    $seoProTitle[\'sitename\'] = $siteName;\n                }\n            }\n            $title = implode(\' \', $seoProTitle);\n        } else {\n            $title = $modx->getOption(\'seopro.title_format\');\n        }\n        $modx->setPlaceholder(\'seoPro.title\', $title);\n        break;\n}',	0,	'a:0:{}',	0,	'',	0,	''),
(7,	0,	0,	'QuipResourceCleaner',	'Cleans up threads when a Resource is removed.',	0,	0,	0,	'/**\n * Quip\n *\n * Copyright 2010-11 by Shaun McCormick <shaun@modx.com>\n *\n * This file is part of Quip, a simple commenting component for MODx Revolution.\n *\n * Quip is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Quip is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Quip; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\n * Suite 330, Boston, MA 02111-1307 USA\n *\n * @package quip\n */\n/**\n * Handles removal of threads if a Resource is deleted.\n * \n * @package quip\n */\n$quip = $modx->getService(\'quip\',\'Quip\',$modx->getOption(\'quip.core_path\',null,$modx->getOption(\'core_path\').\'components/quip/\').\'model/quip/\',$scriptProperties);\nif (!($quip instanceof Quip)) return;\n\nswitch ($modx->event->name) {\n    case \'OnEmptyTrash\':\n        foreach ($scriptProperties[\'ids\'] as $id) {\n            if (empty($id)) continue;\n\n            $threads = $modx->getCollection(\'quipThread\',array(\'resource\' => $id));\n            foreach ($threads as $thread) {\n                $modx->log(modX::LOG_LEVEL_INFO,\'[Quip] Removing thread: \'.$thread->get(\'name\'));\n                $thread->remove();\n            }\n        }\n        break;\n}\nreturn;',	0,	NULL,	0,	'',	0,	''),
(8,	0,	0,	'GalleryCustomTV',	'',	0,	10,	0,	'/**\n * Handles plugin events for Gallery\'s Custom TV\n *\n * @package gallery\n */\n/** @noinspection PhpUndefinedVariableInspection */\n$corePath = $modx->getOption(\'gallery.core_path\',null,$modx->getOption(\'core_path\').\'components/gallery/\');\nswitch ($modx->event->name) {\n    case \'OnTVInputRenderList\':\n        $modx->event->output($corePath.\'elements/tv/input/\');\n        break;\n    case \'OnTVOutputRenderList\':\n        $modx->event->output($corePath.\'elements/tv/output/\');\n        break;\n    case \'OnTVInputPropertiesList\':\n        $modx->event->output($corePath.\'elements/tv/inputoptions/\');\n        break;\n    case \'OnTVOutputRenderPropertiesList\':\n        $modx->event->output($corePath.\'elements/tv/properties/\');\n        break;\n    case \'OnManagerPageBeforeRender\':\n        /** @noinspection PhpUndefinedVariableInspection */\n        $gallery = $modx->getService(\'gallery\',\'Gallery\',$modx->getOption(\'gallery.core_path\',null,$modx->getOption(\'core_path\').\'components/gallery/\').\'model/gallery/\',$scriptProperties);\n        if (!($gallery instanceof Gallery)) return \'\';\n\n        $snippetIds = \'\';\n        $gallerySnippet = $modx->getObject(\'modSnippet\',array(\'name\' => \'Gallery\'));\n        if ($gallerySnippet) {\n            $snippetIds .= \'GAL.snippetGallery = \"\'.$gallerySnippet->get(\'id\').\'\";\'.\"\\n\";\n        }\n        $galleryItemSnippet = $modx->getObject(\'modSnippet\',array(\'name\' => \'GalleryItem\'));\n        if ($galleryItemSnippet) {\n            $snippetIds .= \'GAL.snippetGalleryItem = \"\'.$galleryItemSnippet->get(\'id\').\'\";\'.\"\\n\";\n        }\n\n        $jsDir = $modx->getOption(\'gallery.assets_url\',null,$modx->getOption(\'assets_url\').\'components/gallery/\').\'js/mgr/\';\n        $modx->controller->addLexiconTopic(\'gallery:default\');\n        $modx->controller->addJavascript($jsDir.\'gallery.js\');\n        $modx->controller->addJavascript($jsDir.\'tree.js\');\n        $modx->controller->addHtml(\'<script type=\"text/javascript\">\n        Ext.onReady(function() {\n            GAL.config.connector_url = \"\'.$gallery->config[\'connectorUrl\'].\'\";\n            \'.$snippetIds.\'\n        });\n        </script>\');\n        break;\n    case \'OnDocFormPrerender\':\n        /** @noinspection PhpUndefinedVariableInspection */\n        $gallery = $modx->getService(\'gallery\',\'Gallery\',$modx->getOption(\'gallery.core_path\',null,$modx->getOption(\'core_path\').\'components/gallery/\').\'model/gallery/\',$scriptProperties);\n        if (!($gallery instanceof Gallery)) return \'\';\n\n        /* assign gallery lang to JS */\n        $modx->controller->addLexiconTopic(\'gallery:tv\');\n\n        /* @var modAction $action */\n        $action = null;\n        if ($modx->getVersionData()[\'version\'] < 3){\n            //V2\n            $action = $modx->getObject(\'modAction\',array(\n                \'namespace\' => \'gallery\',\n                \'controller\' => \'index\',\n            ));\n        }\n\n        $modx->controller->addHtml(\'<script type=\"text/javascript\">\n        Ext.onReady(function() {\n            GAL.config = {};\n            GAL.config.connector_url = \"\'.$gallery->config[\'connectorUrl\'].\'\";\n            GAL.action = \"\'.($action ? $action->get(\'id\') : 0).\'\";\n        });\n        </script>\');\n        $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/tv/Spotlight.js\');\n        $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/gallery.js\');\n        $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/widgets/album/album.items.view.js\');\n        $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/widgets/album/album.tree.js\');\n        $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/tv/gal.browser.js\');\n        $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/tv/galtv.js\');\n        $modx->controller->addCss($gallery->config[\'cssUrl\'].\'mgr.css\');\n        break;\n}\nreturn;',	0,	'a:0:{}',	0,	'',	0,	''),
(9,	0,	0,	'ImagePlus',	'Image+ runtime hooks - registers custom TV input & output types and includes javascripts on document edit pages.',	0,	11,	0,	'/**\n * Image+ Runtime Hooks\n *\n * @package imageplus\n * @subpackage plugin\n *\n * @var modX $modx\n * @var array $scriptProperties\n */\n\n$className = \'TreehillStudio\\ImagePlus\\Plugins\\Events\\\\\' . $modx->event->name;\n\n$corePath = $modx->getOption(\'imageplus.core_path\', null, $modx->getOption(\'core_path\') . \'components/imageplus/\');\n/** @var ImagePlus $imageplus */\n$imageplus = $modx->getService(\'imageplus\', \'ImagePlus\', $corePath . \'model/imageplus/\', [\n    \'core_path\' => $corePath\n]);\n\nif ($imageplus) {\n    if (class_exists($className)) {\n        $handler = new $className($modx, $scriptProperties);\n        if (get_class($handler) == $className) {\n            $handler->run();\n        } else {\n            $modx->log(xPDO::LOG_LEVEL_ERROR, $className. \' could not be initialized!\', \'\', \'ImagePlus Plugin\');\n        }\n    } else {\n        $modx->log(xPDO::LOG_LEVEL_ERROR, $className. \' was not found!\', \'\', \'ImagePlus Plugin\');\n    }\n}\n\nreturn;',	0,	'a:0:{}',	0,	'',	0,	''),
(12,	0,	0,	'StercSEO',	'Plugin to render SEO Tab and save all the data.',	0,	14,	0,	'/**\n * SEO Tab\n *\n * Copyright 2013 by Sterc internet & marketing <modx@sterc.nl>\n *\n * This file is part of SEO Tab.\n *\n * SEO Tab is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * SEO Tab is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * SEO Tab; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\n * Suite 330, Boston, MA 02111-1307 USA\n *\n * @package stercseo\n */\n/**\n * SEO Tab Plugin\n *\n *\n * Events:\n * OnDocFormPrerender,OnDocFormSave,OnHandleRequest,OnPageNotFound, OnResourceDuplicate, OnEmptyThrash, OnResourceBeforeSort\n *\n * @author Sterc internet & marketing <modx@sterc.nl>\n *\n * @package stercseo\n *\n */\n$stercseo = $modx->getService(\'stercseo\', \'StercSEO\', $modx->getOption(\'stercseo.core_path\', null, $modx->getOption(\'core_path\').\'components/stercseo/\').\'model/stercseo/\', array());\n\nif (!($stercseo instanceof StercSEO)) {\n    return;\n}\n\nswitch ($modx->event->name) {\n    case \'OnDocFormPrerender\':\n        if (!$stercseo->checkUserAccess()) {\n            return;\n        }\n\n        $resource =& $modx->event->params[\'resource\'];\n        if ($resource) {\n            $stercseo->setWorkingContext($resource->get(\'context_key\'));\n\n            //First check if SEO Tab is allowed in this context\n            if (!$stercseo->isAllowed($resource->get(\'context_key\'))) {\n                return;\n            }\n            $properties = $resource->getProperties(\'stercseo\');\n            $urls = $modx->getCollection(\'seoUrl\', array(\'resource\' => $resource->get(\'id\')));\n        } elseif (isset($_GET[\'context_key\'])) {\n            $stercseo->setWorkingContext($_GET[\'context_key\']);\n        }\n\n        if (empty($properties)) {\n            $properties = array(\n                \'index\' => $stercseo->getOption(\'stercseo.index\', null, \'1\'),\n                \'follow\' => $stercseo->getOption(\'stercseo.follow\', null, \'1\'),\n                \'sitemap\' => $stercseo->getOption(\'stercseo.sitemap\', null, \'1\'),\n                \'priority\' => $stercseo->getOption(\'stercseo.priority\', null, \'0.5\'),\n                \'changefreq\' => $stercseo->getOption(\'stercseo.changefreq\', null, \'weekly\'),\n                \'searchable\' => $stercseo->getOption(\'search_default\', null, \'1\')\n            );\n        } elseif ($resource) {\n            $properties[\'searchable\'] = $resource->get(\'searchable\');\n        }\n    \n        $properties[\'urls\'] = \'\';\n        // Fetch urls from seoUrl collection\n        if ($urls && is_object($urls)) {\n            foreach ($urls as $url) {\n                $properties[\'urls\'][][\'url\'] = urldecode($url->get(\'url\'));\n            }\n        }\n\n        $modx->regClientStartupHTMLBlock(\'<script type=\"text/javascript\">\n        Ext.onReady(function() {\n            StercSEO.config = \'.$modx->toJSON($stercseo->config).\';\n            StercSEO.config.connector_url = \"\'.$stercseo->config[\'connectorUrl\'].\'\";\n            StercSEO.record = \'.$modx->toJSON($properties).\';\n        });\n        </script>\');\n        $version = $modx->getVersionData();\n\n        /* include CSS and JS*/\n        if ($version[\'version\'] == 2 && $version[\'major_version\'] == 2) {\n            $modx->regClientCSS($stercseo->config[\'cssUrl\'].\'stercseo.css\');\n        }\n        $modx->regClientStartupScript($stercseo->config[\'jsUrl\'].\'mgr/stercseo.js\');\n        $modx->regClientStartupScript($stercseo->config[\'jsUrl\'].\'mgr/sections/resource.js\');\n        $modx->regClientStartupScript($stercseo->config[\'jsUrl\'].\'mgr/widgets/resource.grid.js\');\n        $modx->regClientStartupScript($stercseo->config[\'jsUrl\'].\'mgr/widgets/resource.vtabs.js\');\n\n        //add lexicon\n        $modx->controller->addLexiconTopic(\'stercseo:default\');\n\n        break;\n\n    case \'OnBeforeDocFormSave\':\n        $oldResource = ($mode == \'upd\') ? $modx->getObject(\'modResource\', $resource->get(\'id\')) : $resource;\n        if (!$stercseo->isAllowed($oldResource->get(\'context_key\'))) {\n            return;\n        }\n\n        $stercseo->setWorkingContext($resource->get(\'context_key\'));\n\n        /* If freeze URI is set, checks if a redirect already exists for the freeze URI and returns error if a redirect has been found. */\n        $stercseo->checkIfFreezeUriExistsAsRedirect($resource);\n\n        $properties = $oldResource->getProperties(\'stercseo\');\n        if (isset($_POST[\'urls\'])) {\n            $urls = $modx->fromJSON($_POST[\'urls\']);\n            foreach ($urls as $url) {\n                $check = $modx->getObject(\'seoUrl\', array( \'url\' => urlencode($url[\'url\']), \'resource\' => $oldResource->get(\'id\'), \'context_key\' => $oldResource->get(\'context_key\')));\n                if (!$check) {\n                    $redirect = $modx->newObject(\'seoUrl\');\n                    $data = array(\n                        \'url\' => urlencode($url[\'url\']),\n                        \'resource\' => $oldResource->get(\'id\'),\n                        \'context_key\' => $oldResource->get(\'context_key\'),\n                    );\n                    $redirect->fromArray($data);\n                    $redirect->save();\n                }\n            }\n        }\n\n        if ($mode == \'upd\') {\n            $newProperties = array(\n                \'index\' => (isset($_POST[\'index\']) ? $_POST[\'index\'] : $properties[\'index\']),\n                \'follow\' => (isset($_POST[\'follow\']) ? $_POST[\'follow\'] : $properties[\'follow\']),\n                \'sitemap\' => (isset($_POST[\'sitemap\']) ? $_POST[\'sitemap\'] : $properties[\'sitemap\']),\n                \'priority\' => (isset($_POST[\'priority\']) ? $_POST[\'priority\'] : $properties[\'priority\']),\n                \'changefreq\' => (isset($_POST[\'changefreq\']) ? $_POST[\'changefreq\'] : $properties[\'changefreq\'])\n            );\n        } else {\n            $newProperties = array(\n                \'index\' => (isset($_POST[\'index\']) ? $_POST[\'index\'] : $stercseo->getOption(\'stercseo.index\', null, \'1\')),\n                \'follow\' => (isset($_POST[\'follow\']) ? $_POST[\'follow\'] : $stercseo->getOption(\'stercseo.follow\', null, \'1\')),\n                \'sitemap\' => (isset($_POST[\'sitemap\']) ? $_POST[\'sitemap\'] : $stercseo->getOption(\'stercseo.sitemap\', null, \'1\')),\n                \'priority\' => (isset($_POST[\'priority\']) ? $_POST[\'priority\'] : $stercseo->getOption(\'stercseo.priority\', null, \'0.5\')),\n                \'changefreq\' => (isset($_POST[\'changefreq\']) ? $_POST[\'changefreq\'] : $stercseo->getOption(\'stercseo.changefreq\', null, \'weekly\'))\n            );\n        }\n\n        // If uri is changed or alias (with freeze uri off) has changed, add a new redirect\n        if ((\n                $oldResource->get(\'uri\') != $resource->get(\'uri\') ||\n                (\n                    $oldResource->get(\'uri_override\') == 0\n                    && $oldResource->get(\'alias\') != $resource->get(\'alias\')\n                )\n            )\n            && $oldResource->get(\'uri\') != \'\'\n        ) {\n            $site_url = $modx->getOption(\'site_url\');\n            if ($stercseo->getOption(\'site_url\')) {\n                $site_url = $stercseo->getOption(\'site_url\');\n            }\n\n            $url = urlencode($site_url.$oldResource->get(\'uri\'));\n            if (!$modx->getCount(\'seoUrl\', array(\'url\' => $url))) {\n                $data = array(\n                    \'url\' => $url,\n                    \'resource\' => $resource->get(\'id\'),\n                    \'context_key\' => $resource->get(\'context_key\'),\n                );\n                $redirect = $modx->newObject(\'seoUrl\');\n                $redirect->fromArray($data);\n                $redirect->save();\n            }\n\n            // Recursive set all children resources as redirects\n            if ($modx->getOption(\'use_alias_path\')) {\n                $resourceOldBasePath = $oldResource->getAliasPath($oldResource->get(\'alias\'), $oldResource->toArray() + array(\'isfolder\' => 1));\n                $resourceNewBasePath = $resource->getAliasPath($resource->get(\'alias\'), $resource->toArray() + array(\'isfolder\' => 1));\n                $childResources = $modx->getIterator(\'modResource\', array(\n                    \'uri:LIKE\' => $resourceOldBasePath . \'%\',\n                    \'uri_override\' => \'0\',\n                    \'published\' => \'1\',\n                    \'deleted\' => \'0\',\n                    \'context_key\' => $resource->get(\'context_key\')\n                ));\n                foreach ($childResources as $childResource) {\n                    $url = urlencode($site_url.$childResource->get(\'uri\'));\n                    if (!$modx->getCount(\'seoUrl\', array(\'url\' => $url))) {\n                        $data = array(\n                            \'url\' => $url,\n                            \'resource\' => $childResource->get(\'id\'),\n                            \'context_key\' => $resource->get(\'context_key\'),\n                        );\n                        $redirect = $modx->newObject(\'seoUrl\');\n                        $redirect->fromArray($data);\n                        $redirect->save();\n                    }\n                }\n            }\n        }\n        $resource->setProperties($newProperties, \'stercseo\');\n        break;\n\n    case \'OnDocFormSave\':\n        if (!$stercseo->isAllowed($resource->context_key)) {\n            return;\n        }\n        \n        /* Tmp overwrite the cache_alias_map setting to prevent that a redirect is removed again. */\n        $cacheAliasMap = $modx->getOption(\'cache_alias_map\', true);\n        $modx->setOption(\'cache_alias_map\', false);\n        \n        $url       = urlencode($modx->makeUrl($resource->id, $resource->context_key, \'\', \'full\'));\n        $urlExists = $modx->getObject(\'seoUrl\', array(\n            \'url\'         => $url,\n            \'context_key\' => $resource->context_key\n        ));\n\n        if ($urlExists) {\n            $modx->removeObject(\'seoUrl\', array(\n                \'url\'         => $url,\n                \'context_key\' => $resource->context_key\n            ));\n        }\n        \n        $modx->setOption(\'cache_alias_map\', $cacheAliasMap);\n        break;\n\n    case \'OnLoadWebDocument\':\n        if ($modx->resource) {\n            if (!$stercseo->isAllowed($modx->resource->get(\'context_key\'))) {\n                return;\n            }\n            $properties = $modx->resource->getProperties(\'stercseo\');\n            if (empty($properties)) {\n                // Properties not available\n                // This means an this resource has nog SEO Tab properties, which means it is a pre-SEO Tab resource\n                // Fallback to system defaults\n                $properties = array(\n                    \'index\' => $modx->getOption(\'stercseo.index\', null, 1),\n                    \'follow\' => $modx->getOption(\'stercseo.follow\', null, 1)\n                );\n            }\n            $metaContent = array(\n                (int)$properties[\'index\'] ? \'index\' : \'noindex\',\n                (int)$properties[\'follow\'] ? \'follow\' : \'nofollow\'\n            );\n\n            $modx->setPlaceholder(\'seoTab.robotsTag\', implode(\',\', $metaContent));\n        }\n        break;\n\n    case \'OnPageNotFound\':\n        $options = array();\n        $query   = $modx->newQuery(\'seoUrl\');\n        $url     = $_SERVER[\'HTTP_HOST\'] . $_SERVER[\'REQUEST_URI\'];\n\n        $query->where(array(\n            array(\n                \'url\' => urlencode(\'http://\' . $url)\n            ),\n            array(\n                \'url\' => urlencode(\'https://\' . $url)\n            )\n        ),xPDOQuery::SQL_OR);\n\n         if ($modx->getOption(\'stercseo.context-aware-alias\', null, \'0\')) {\n             $query->where(\n                 array(\n                     \'context_key\' => $modx->context->key\n                 )\n             );\n         }\n\n        $alreadyExists = $modx->getObject(\'seoUrl\', $query);\n        if (isset($alreadyExists) && ($modx->context->key !== $alreadyExists->get(\'context_key\'))) {\n            $q = $modx->newQuery(\'modContextSetting\');\n            $q->where(array(\n                \'context_key\' => $alreadyExists->get(\'context_key\'),\n                \'key\'         => \'site_url\'\n            ));\n            $q->prepare();\n\n            $siteUrl = $modx->getObject(\'modContextSetting\', $q);\n            if ($siteUrl) {\n                $options[\'site_url\'] = $siteUrl->get(\'value\');\n            }\n        }\n\n        if ($alreadyExists) {\n            $url = $modx->makeUrl($alreadyExists->get(\'resource\'), $alreadyExists->get(\'context_key\'), \'\', \'full\', $options);\n\n            $modx->sendRedirect($url, 0, \'REDIRECT_HEADER\', \'HTTP/1.1 301 Moved Permanently\');\n        }\n        break;\n\n    case \'OnResourceBeforeSort\':\n        list($sourceCtx, $resource) = explode(\'_\', $modx->getOption(\'source\', $_POST));\n        list($targetCtx, $target) = explode(\'_\', $modx->getOption(\'target\', $_POST));\n        switch ($modx->getOption(\'point\', $_POST)) {\n            case \'above\':\n            case \'below\':\n                $tmpRes = $modx->getObject(\'modResource\', $target);\n                if ($tmpRes) {\n                    $target = $tmpRes->get(\'parent\');\n                    unset($tmpRes);\n                }\n                break;\n        }\n        $oldResource = $modx->getObject(\'modResource\', $resource);\n        $resource = $modx->getObject(\'modResource\', $resource);\n        if ($oldResource && $resource) {\n            $resource->set(\'parent\', $target);\n            $resource->set(\'uri\', \'\');\n            $uriChanged = false;\n            if ($oldResource->get(\'uri\') != $resource->get(\'uri\') && $oldResource->get(\'uri\') != \'\') {\n                $uriChanged = true;\n            }\n\n            if ($oldResource->get(\'alias\') != $resource->get(\'alias\') && $oldResource->get(\'alias\') != \'\') {\n                $newProperties[\'urls\'][] = array(\'url\' => $oldResource->get(\'uri\'));\n                $uriChanged              = true;\n            }\n\n            // Recursive set redirects for drag/dropped resource, and its children (where uri_override is not set)\n            if ($uriChanged && $modx->getOption(\'use_alias_path\')) {\n                $oldResource->set(\'isfolder\', true);\n                $resourceOldBasePath = $oldResource->getAliasPath(\n                    $oldResource->get(\'alias\'),\n                    $oldResource->toArray()\n                );\n                $resourceNewBasePath = $resource->getAliasPath(\n                    $resource->get(\'alias\'),\n                    $resource->toArray() + array(\'isfolder\' => 1)\n                );\n                $cond = $modx->newQuery(\'modResource\');\n                $cond->where(array(\n                    array(\n                        \'uri:LIKE\' => $resourceOldBasePath . \'%\',\n                        \'OR:id:=\' => $oldResource->id\n                    ),\n                    \'uri_override\' => \'0\',\n                    \'published\' => \'1\',\n                    \'deleted\' => \'0\',\n                    \'context_key\' => $resource->get(\'context_key\')\n                ));\n\n                $stercseo->setWorkingContext($resource->get(\'context_key\'));\n\n                $site_url = $stercseo->getOption(\'site_url\', \'\', $modx->getOption(\'site_url\'));\n                \n                $childResources = $modx->getIterator(\'modResource\', $cond);\n                foreach ($childResources as $childResource) {\n                    $url = urlencode($site_url . $childResource->get(\'uri\'));\n                    if (!$modx->getCount(\'seoUrl\', array(\'url\' => $url))) {\n                        $data = array(\n                            \'url\' => $url,\n                            \'resource\' => $childResource->get(\'id\'),\n                            \'context_key\' => $targetCtx\n                        );\n                        $redirect = $modx->newObject(\'seoUrl\');\n                        $redirect->fromArray($data);\n                        $redirect->save();\n                    }\n                }\n            } // endif $uriChanged\n        } // endif $oldResource && $resource\n        break;\n\n    case \'OnResourceDuplicate\':\n        if (!$stercseo->isAllowed($newResource->get(\'context_key\'))) {\n            return;\n        }\n        $props = $newResource->getProperties(\'stercseo\');\n        $newResource->setProperties($props, \'stercseo\');\n        $newResource->save();\n        break;\n\n    case \'OnManagerPageBeforeRender\':\n        if (!$stercseo->checkUserAccess()) {\n            return;\n        }\n        // If migration status is false, show migrate alert message bar in manager\n        if (!$stercseo->redirectMigrationStatus()) {\n            $modx->regClientStartupHTMLBlock($stercseo->getChunk(\'migrate/alert\', array(\'message\' => $modx->lexicon(\'stercseo.migrate_alert\'))));\n            $modx->regClientCSS($stercseo->config[\'cssUrl\'].\'migrate.css\');\n        }\n        break;\n\n    case \'OnEmptyTrash\':\n        if (count($ids) > 0) {\n            foreach ($ids as $id) {\n                $modx->removeCollection(\'seoUrl\', array(\n                    \'resource\' => $id\n                ));\n            }\n        }\n}\nreturn;',	0,	'a:0:{}',	0,	'',	0,	''),
(13,	0,	0,	'SmartOptimizerCacheManager',	'Handles cache cleaning when clearing the site cache.',	0,	18,	0,	'/**\r\n * SmartOptimizer SmartOptimizerCacheManager plugin\r\n *\r\n * Copyright 2011 Benjamin Vauchel <contact@omycode.fr>\r\n *\r\n * @author Benjamin Vauchel <contact@omycode.fr>\r\n * @version Version 1.0.0 pl\r\n * 20/4/12\r\n *\r\n * SmartOptimizer is free software; you can redistribute it and/or modify it\r\n * under the terms of the GNU General Public License as published by the Free\r\n * Software Foundation; either version 2 of the License, or (at your option) any\r\n * later version.\r\n *\r\n * SmartOptimizer is distributed in the hope that it will be useful, but WITHOUT ANY\r\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\r\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n *\r\n * You should have received a copy of the GNU General Public License along with\r\n * SmartOptimizer; if not, write to the Free Software Foundation, Inc., 59 Temple\r\n * Place, Suite 330, Boston, MA 02111-1307 USA\r\n *\r\n * @package smartoptimizer\r\n */\r\n\r\n/**\r\n * MODx SmartOptimizer SmartOptimizerCacheManager plugin\r\n *\r\n * Description: Handles cache cleaning when clearing the site cache.\r\n * Events: OnSiteRefresh\r\n *\r\n * @package smartoptimizer\r\n *\r\n * @property\r\n */\r\n\r\nswitch ($modx->event->name) \r\n{\r\n    case \'OnSiteRefresh\':\r\n        $cachePath = $modx->getOption(\'smartoptimizer.cache_dir\', null, $modx->getOption(\'assets_path\').\'components/smartoptimizer/cache\');\r\n\r\n        /* clear local cache */\r\n        if (!empty($cachePath)) {\r\n            foreach (new DirectoryIterator($cachePath) as $file) {\r\n                if (!$file->isFile()) continue;\r\n                @unlink($file->getPathname());\r\n            }\r\n        }\r\n\r\n        break;\r\n}',	0,	NULL,	0,	'',	0,	''),
(14,	0,	0,	'phpThumbOfCacheManager',	'Handles cache cleaning when clearing the Site Cache.',	0,	19,	0,	'/*\n * Handles cache cleanup\n * pThumb\n * Copyright 2013 Jason Grant\n *\n * Please see the GitHub page for documentation or to report bugs:\n * https://github.com/oo12/phpThumbOf\n *\n * pThumb is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; either version 2 of the License, or (at your option) any\n * later version.\n *\n * pThumb is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * phpThumbOf; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n */\n\nif ($modx->event->name === \'OnSiteRefresh\') {\n	if (!$modx->loadClass(\'pThumbCacheCleaner\', MODX_CORE_PATH . \'components/phpthumbof/model/\', true, true)) {\n		$modx->log(modX::LOG_LEVEL_ERROR, \'[pThumb] Could not load pThumbCacheCleaner class.\');\n		return;\n	}\n	static $pt_settings = array();\n	$pThumb = new pThumbCacheCleaner($modx, $pt_settings, array(), true);\n	$pThumb->cleanCache();\n}',	0,	NULL,	0,	'',	0,	''),
(16,	0,	0,	'MinifyX',	'Combine and minify JS and CSS files',	0,	22,	0,	'/**\n * MinifyX Plugin\n *\n * @package minifyx\n * @subpackage plugin\n *\n * @var modX $modx\n * @var array $scriptProperties\n */\n\n$className = \'TreehillStudio\\MinifyX\\Plugins\\Events\\\\\' . $modx->event->name;\n\n$corePath = $modx->getOption(\'minifyx.core_path\', null, $modx->getOption(\'core_path\') . \'components/minifyx/\');\n/** @var MinifyX $minifyx */\n$minifyx = $modx->getService(\'minifyx\', \'MinifyX\', $corePath . \'model/minifyx/\', [\n    \'core_path\' => $corePath\n]);\n\nif ($minifyx) {\n    if (class_exists($className)) {\n        $handler = new $className($modx, $scriptProperties);\n        if (get_class($handler) == $className) {\n            $handler->run();\n        } else {\n            $modx->log(xPDO::LOG_LEVEL_ERROR, $className. \' could not be initialized!\', \'\', \'MinifyX Plugin\');\n        }\n    } else {\n        $modx->log(xPDO::LOG_LEVEL_ERROR, $className. \' was not found!\', \'\', \'MinifyX Plugin\');\n    }\n}\n\nreturn;',	0,	'a:0:{}',	0,	'',	0,	''),
(17,	1,	0,	'OnHandleRequest',	'',	0,	0,	0,	'include MODX_CORE_PATH.\'/elements/SxGeo/snippets/get_location.php\';\n$modx->setPlaceholder(\'strana\',$country);\n$modx->setPlaceholder(\'ip\', $ip);\n$modx->setPlaceholder(\'region\', $region_name_en);\n$modx->setPlaceholder(\'city\', $city_name_en);\n$modx->setPlaceholder(\'city2\', $city);',	0,	'a:0:{}',	0,	'',	0,	''),
(18,	0,	0,	'Ace',	'Ace code editor plugin for MODx Revolution',	0,	0,	0,	'/**\n * Ace Source Editor Plugin\n *\n * Events: OnManagerPageBeforeRender, OnRichTextEditorRegister, OnSnipFormPrerender,\n * OnTempFormPrerender, OnChunkFormPrerender, OnPluginFormPrerender,\n * OnFileCreateFormPrerender, OnFileEditFormPrerender, OnDocFormPrerender\n *\n * @author Danil Kostin <danya.postfactum(at)gmail.com>\n *\n * @package ace\n *\n * @var array $scriptProperties\n * @var Ace $ace\n */\nif ($modx->event->name == \'OnRichTextEditorRegister\') {\n    $modx->event->output(\'Ace\');\n    return;\n}\n\nif ($modx->getOption(\'which_element_editor\', null, \'Ace\') !== \'Ace\') {\n    return;\n}\n\n$corePath = $modx->getOption(\'ace.core_path\', null, $modx->getOption(\'core_path\').\'components/ace/\');\n$ace = $modx->getService(\'ace\', \'Ace\', $corePath.\'model/ace/\');\n$ace->initialize();\n\n$extensionMap = array(\n    \'tpl\'   => \'text/x-smarty\',\n    \'htm\'   => \'text/html\',\n    \'html\'  => \'text/html\',\n    \'css\'   => \'text/css\',\n    \'scss\'  => \'text/x-scss\',\n    \'less\'  => \'text/x-less\',\n    \'svg\'   => \'image/svg+xml\',\n    \'xml\'   => \'application/xml\',\n    \'xsl\'   => \'application/xml\',\n    \'js\'    => \'application/javascript\',\n    \'json\'  => \'application/json\',\n    \'php\'   => \'application/x-php\',\n    \'sql\'   => \'text/x-sql\',\n    \'md\'    => \'text/x-markdown\',\n    \'txt\'   => \'text/plain\',\n    \'twig\'  => \'text/x-twig\'\n);\n\n// Define default mime for html elements(templates, chunks and html resources)\n$html_elements_mime=$modx->getOption(\'ace.html_elements_mime\',null,false);\nif(!$html_elements_mime){\n    // this may deprecated in future because components may set ace.html_elements_mime option now\n    switch (true) {\n        case $modx->getOption(\'twiggy_class\'):\n            $html_elements_mime = \'text/x-twig\';\n            break;\n        case $modx->getOption(\'pdotools_fenom_parser\'):\n            $html_elements_mime = \'text/x-smarty\';\n            break;\n        default:\n            $html_elements_mime = \'text/html\';\n    }\n}\n\n// Defines wether we should highlight modx tags\n$modxTags = false;\nswitch ($modx->event->name) {\n    case \'OnSnipFormPrerender\':\n        $field = \'modx-snippet-snippet\';\n        $mimeType = \'application/x-php\';\n        break;\n    case \'OnTempFormPrerender\':\n        $field = \'modx-template-content\';\n        $modxTags = true;\n        $mimeType = $html_elements_mime;\n        break;\n    case \'OnChunkFormPrerender\':\n        $field = \'modx-chunk-snippet\';\n        if ($modx->controller->chunk && $modx->controller->chunk->isStatic()) {\n            $extension = pathinfo($modx->controller->chunk->name, PATHINFO_EXTENSION);\n            if(!$extension||!isset($extensionMap[$extension])){\n                $extension = pathinfo($modx->controller->chunk->getSourceFile(), PATHINFO_EXTENSION);\n            }\n            $mimeType = isset($extensionMap[$extension]) ? $extensionMap[$extension] : \'text/plain\';\n        } else {\n            $mimeType = $html_elements_mime;\n        }\n        $modxTags = true;\n        break;\n    case \'OnPluginFormPrerender\':\n        $field = \'modx-plugin-plugincode\';\n        $mimeType = \'application/x-php\';\n        break;\n    case \'OnFileCreateFormPrerender\':\n        $field = \'modx-file-content\';\n        $mimeType = \'text/plain\';\n        break;\n    case \'OnFileEditFormPrerender\':\n        $field = \'modx-file-content\';\n        $extension = pathinfo($scriptProperties[\'file\'], PATHINFO_EXTENSION);\n        $mimeType = isset($extensionMap[$extension])\n            ? $extensionMap[$extension]\n            : (\'@FILE:\'.pathinfo($scriptProperties[\'file\'], PATHINFO_BASENAME));\n        $modxTags = $extension == \'tpl\';\n        break;\n    case \'OnDocFormPrerender\':\n        if (!$modx->controller->resourceArray) {\n            return;\n        }\n        $field = \'ta\';\n        $mimeType = $modx->getObject(\'modContentType\', $modx->controller->resourceArray[\'content_type\'])->get(\'mime_type\');\n\n        if($mimeType == \'text/html\')$mimeType = $html_elements_mime;\n\n        if ($modx->getOption(\'use_editor\')){\n            $richText = $modx->controller->resourceArray[\'richtext\'];\n            $classKey = $modx->controller->resourceArray[\'class_key\'];\n            if ($richText || in_array($classKey, array(\'modStaticResource\',\'modSymLink\',\'modWebLink\',\'modXMLRPCResource\'))) {\n                $field = false;\n            }\n        }\n        $modxTags = true;\n        break;\n    case \'OnTVInputRenderList\':\n        $modx->event->output($corePath . \'elements/tv/input/\');\n        break;\n    default:\n        return;\n}\n\n$modxTags = (int) $modxTags;\n$script = \'\';\nif (!empty($field)) {\n    $script .= \"MODx.ux.Ace.replaceComponent(\'$field\', \'$mimeType\', $modxTags);\";\n}\n\nif ($modx->event->name == \'OnDocFormPrerender\' && !$modx->getOption(\'use_editor\')) {\n    $script .= \"MODx.ux.Ace.replaceTextAreas(Ext.query(\'.modx-richtext\'));\";\n}\n\nif ($script) {\n    $modx->controller->addHtml(\'<script>Ext.onReady(function() {\' . $script . \'});</script>\');\n}',	0,	NULL,	0,	'',	0,	'ace/elements/plugins/ace.plugin.php'),
(20,	1,	0,	'AdminTools',	'',	0,	31,	0,	'/** @var array $scriptProperties */\n$path = $modx->getOption(\'admintools_core_path\', null, $modx->getOption(\'core_path\') . \'components/admintools/\') . \'services/\';\n/** @var AdminTools $AdminTools */\n$AdminTools = $modx->getService(\'admintools\', \'AdminTools\', $path);\n$elementType = null;\nif ($AdminTools instanceof AdminTools) {\n    switch ($modx->event->name) {\n        case \'OnManagerPageBeforeRender\':\n            if ($modx->user->id) {\n                $AdminTools->initialize();\n            }\n            break;\n        case \'OnManagerPageAfterRender\':\n            if ($AdminTools->isLocked()) {\n                $controller->content = $modx->getChunk(\'tpl.lockScreen\', [\n                        \'username\' => $modx->user->username,\n                        \'photo\' => $modx->user->getPhoto(),\n                        \'title\' => $modx->getOption(\'site_name\'),\n                        \'lang\' => $modx->getOption(\'manager_language\'),\n                        \'form_action\' => $AdminTools->getOption(\'connectorUrl\'),\n                        \'auth\' => $modx->user->getUserToken(\'mgr\'),\n                        \'assets_url\' => MODX_ASSETS_URL,\n                        \'input_placeholder\' => $AdminTools->getInputPlaceholder(),\n                    ]\n                );\n            }\n            break;\n        case \'OnDocFormSave\':\n            if ($modx->getOption(\'admintools_clear_only_resource_cache\', null, false) && $modx->event->params[\'mode\'] === modSystemEvent::MODE_UPD) {\n                if ($resource->get(\'syncsite\')) {\n                    $AdminTools->clearResourceCache($resource);\n                }\n                if (!empty($_POST[\'createCache\'])) {\n                    $AdminTools->createResourceCache($resource->uri);\n                }\n            }\n            break;\n        case \'OnManagerPageInit\':\n            if (!$modx->user->isAuthenticated(\'mgr\') && $modx->getOption(\'admintools_email_authorization\', null, false)) {\n                $id = (int) $modx->getOption(\'admintools_loginform_resource\');\n                if (!empty($id) && $modx->getCount(\'modResource\', [\'id\' => $id, \'published\' => 1, \'deleted\' => 0])) {\n                    $url = $modx->makeUrl($id, \'\', \'\', \'full\');\n                    $modx->setOption(\'manager_login_url_alternate\', $url);\n                }\n            }\n            break;\n        case \'OnManagerAuthentication\':\n            if ($modx->getOption(\'admintools_user_can_login\', null, false)) {\n                $modx->setOption(\'admintools_user_can_login\', false);\n                $modx->event->output(true);\n            }\n            break;\n        case \'OnLoadWebDocument\':\n            if ((!$modx->user->active || $modx->user->Profile->blocked) && $modx->user->isAuthenticated($modx->context->get(\'key\'))) {\n                $modx->runProcessor(\'security/logout\');\n            }\n            if ($modx->getOption(\'admintools_alternative_permissions\', null, false) && !$AdminTools->hasPermissions()){\n                $modx->sendUnauthorizedPage();\n            }\n            break;\n        case \'OnTempFormPrerender\':\n            if ($modx->getOption(\'admintools_template_resource_relationship\', null, true)) {\n                $modx->controller->addLastJavascript($AdminTools->getOption(\'jsUrl\') . \'mgr/templates.js\');\n            }\n            break;\n        case \'OnDocFormPrerender\':\n            $_html = [];\n            $output = \'\';\n            if ($modx->getOption(\'admintools_template_resource_relationship\', null, true)) {\n                $_html[\'tpl_res_relationship\'] = \'\n            var tmpl = Ext.getCmp(\"modx-resource-template\");\n            if (tmpl.getValue()) tmpl.label.update(_(\"resource_template\") + \"&nbsp;&nbsp;<a href=\\\"?a=element/template/update&id=\" + tmpl.getValue() + \"\\\"><i class=\\\"icon icon-external-link\\\"></i></a>\");\';\n            }\n            if ($modx->getOption(\'admintools_clear_only_resource_cache\', null, true) && $modx->event->params[\'mode\'] != modSystemEvent::MODE_NEW) {\n                $_html[\'create_resource_cache\'] = \'\n            var cb = Ext.create({\n                xtype: \"xcheckbox\",\n                boxLabel: _(\"admintools_create_resource_cache\"),\n                description: _(\"admintools_create_resource_cache_help\"),\n                hideLabel: true,\n                name: \"createCache\",\n                id: \"createCache\",\n                checked: \'. (int)$modx->getOption(\'admintools_create_resource_cache\', null, false) .\'\n            });\n            if (Ext.getCmp(\"modx-page-settings-right-box-right\")) {\n                Ext.getCmp(\"modx-page-settings-right-box-right\").insert(2,cb);\n                Ext.getCmp(\"modx-page-settings-right-box-left\").add(Ext.getCmp(\"modx-resource-uri-override\"));\n                Ext.getCmp(\"modx-panel-resource\").on(\"success\", function(o){\n                    if (o.result.object.createCache != 0) {\n                        cb.setValue(true);\n                    }\n                });\n            }\';\n            }\n            if (!empty($_html)) {\n            $output .= \'\n    Ext.onReady(function() {\n        setTimeout(function(){\' . implode(\"\\n\", $_html) . \'\n        }, 200);\n    });\';\n            }\n            if ($modx->getOption(\'admintools_alternative_permissions\', null, true) && $modx->hasPermission(\'access_permissions\')) {\n                $modx->controller->addLastJavascript($AdminTools->getOption(\'jsUrl\') . \'mgr/permissions.js\');\n                $output .= \'\n    Ext.ComponentMgr.onAvailable(\"modx-resource-tabs\", function() {\n		this.on(\"beforerender\", function() {\n			this.add({\n				title: _(\"admintools_permissions\"),\n				border: false,\n				items: [{\n					layout: \"anchor\",\n					border: false,\n					items: [{\n						html: _(\"admintools_permissions_desc\"),\n						border: false,\n						bodyCssClass: \"panel-desc\"\n					}, {\n						xtype: \"admintools-grid-permissions\",\n						anchor: \"100%\",\n						cls: \"main-wrapper\",\n						resource: \' . $id . \'\n					}]\n				}]\n			});\n		});\n	});\n\';\n            }\n            if (!empty($output)) {\n                $modx->controller->addHtml(\'<script>\' . $output . \'</script>\');\n            }\n            break;\n        case \'OnMODXInit\':\n            if (($modx->context->get(\'key\') !== \'mgr\')\n                && $modx->getOption(\'admintools_only_current_context_user\', null, false)\n                && $modx->user->isAuthenticated(\'mgr\')\n                && !$modx->user->isAuthenticated($modx->context->get(\'key\')))\n            {\n               $modx->user = $modx->newObject(\'modUser\');\n                $modx->user->fromArray([\'id\' => 0, \'username\' => $modx->getOption(\'default_username\', \'\', \'(anonymous)\', true)], \'\', true);\n            }\n            break;\n    }\n}',	0,	NULL,	0,	'',	0,	'core/components/admintools/elements/plugins/plugin.admintools.php'),
(21,	0,	0,	'StaticElementsLive',	'',	0,	35,	0,	'/**\n * @var modX $modx\n * @var array $scriptProperties\n * @var StaticElementsLive $staticelementslive\n * @var StaticElementsLiveTools $tools\n * @var modElement $object\n */\n\n$staticelementslive = $modx->getService(\'staticelementslive\', \'StaticElementsLive\');\n$tools = $staticelementslive->getTools();\n\nswitch ($modx->event->name) {\n    case \'OnManagerPageBeforeRender\':\n        $staticelementslive->loadControllerJsCss($modx->controller, \'manager\');\n        break;\n    case \'OnManagerPageInit\':\n        $autoScan = $modx->getOption(\'staticelementslive_auto_scan\');\n        $usergroups = $tools->explodeAndClean($modx->getOption(\'staticelementslive_usergroups\'));\n        if (!$autoScan || !$modx->user->isMember($usergroups)) return;\n        /** @var modProcessorResponse $response */\n        $response = $staticelementslive->runProcessor(\'web/element/scan\');\n        break;\n    case \'OnTempFormPrerender\':\n    case \'OnChunkFormPrerender\':\n    case \'OnPluginFormPrerender\':\n    case \'OnSnipFormPrerender\':\n        $staticelementslive->loadControllerJsCss($modx->controller);\n        break;\n    case \'OnBeforeTempFormSave\':\n    case \'OnBeforeChunkFormSave\':\n    case \'OnBeforeSnipFormSave\':\n    case \'OnBeforePluginFormSave\':\n        $className = $tools->getElementClassName($object);\n        $fieldName = $tools->getElementKeyFieldName($className);\n        if ($object->get(\'auto_create_static\')) {\n            $path = $tools->getElementPathByClassName($className);\n            $path = $tools->normalizePath($path . \'/\');\n            $sourceId = $tools->getMediaSourceId();\n            $filename = $object->get($fieldName);\n            $filename = $tools->prepareFileName($filename);\n            if ($object->get(\'category\')) {\n                $categoryPath = $tools->getElementCategoryPath($object->get(\'category\'));\n                if ($categoryPath) {\n                    $path .= $categoryPath;\n                }\n            }\n            $file = $path . $filename . $tools->getElementFileExtension($className);\n            $staticFile = $tools->prepareFileMediaSourcePath($sourceId, $file);\n            $object->set(\'static\', 1);\n            $object->set(\'source\', $sourceId);\n            $object->set(\'static_file\', $staticFile);\n        } else if (\n            $object->get(\'static\') &&\n            $object->isDirty($fieldName) &&\n            $modx->getOption(\'staticelementslive_rename_file\')\n        ) {\n            $oldStaticFile = $object->get(\'static_file\');\n            $oldFileName = pathinfo($oldStaticFile, PATHINFO_FILENAME);\n            $oldFileName = $tools->prepareElementName($oldFileName);\n            $fieldName = $tools->getElementKeyFieldName($className);\n            $newFileName = $object->get($fieldName);\n            $newStaticFile = str_replace($oldFileName, $newFileName, $oldStaticFile);\n            $object->set(\'static_file\', $newStaticFile);\n            $modx->setOption(\'static_elements_automate_\' . $tools->getElementType($className), true);\n        }\n        break;\n    case \'OnTempFormDelete\':\n    case \'OnChunkFormDelete\':\n    case \'OnSnipFormDelete\':\n    case \'OnPluginFormDelete\':\n        if ($object->get(\'static\') &&\n            $modx->getOption(\'staticelementslive_remove_file\')\n        ) {\n            $file = $object->getSourceFile();\n            if (file_exists($file)) {\n                unlink($file);\n            }\n        }\n        break;\n}\nreturn;',	0,	NULL,	0,	'',	0,	'core/components/staticelementslive/elements/plugins/StaticElementsLive.plugin.php'),
(22,	1,	0,	'examplePlugin',	'',	0,	0,	0,	'if($modx->event->name != \'OnHandleRequest\') return;\n\n$modx->log(MODX_LOG_LEVEL_INFO, \"It\'s worked! Run examplePlugin!\");',	0,	NULL,	0,	'',	1,	'core/elements/plugins/examplePlugin.php'),
(23,	1,	0,	'plugins.inc',	'',	0,	0,	0,	'return array(\n    \'OnHandleRequest\' => array(\n        \'examplePlugin\'\n    )\n);',	0,	NULL,	0,	'',	1,	'core/elements/plugins/plugins.inc.php'),
(25,	0,	0,	'FormIt',	'',	0,	39,	0,	'/**\n * FormIt\n *\n * Copyright 2009-2017 by Sterc <modx@sterc.nl>\n *\n * FormIt is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; either version 2 of the License, or (at your option) any\n * later version.\n *\n * FormIt is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * FormIt; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\n * Suite 330, Boston, MA 02111-1307 USA\n *\n * @package formit\n */\n/**\n * FormIt plugin\n *\n * @package formit\n */\n\n$formit = $modx->getService(\n    \'formit\',\n    \'FormIt\',\n    $modx->getOption(\'formit.core_path\', null, $modx->getOption(\'core_path\').\'components/formit/\') .\'model/formit/\',\n    array()\n);\n\nif (!($formit instanceof FormIt)) {\n    return;\n}\n\nswitch ($modx->event->name) {\n    case \'OnManagerPageBeforeRender\':\n        // If migration status is false, show migrate alert message bar in manager\n        if (method_exists(\'FormIt\',\'encryptionMigrationStatus\')) {\n            if (!$formit->encryptionMigrationStatus()) {\n                $modx->lexicon->load(\'formit:mgr\');\n                $properties = array(\'message\' => $modx->lexicon(\'formit.migrate_alert\'));\n                $chunk = $formit->_getTplChunk(\'migrate/alert\');\n                if ($chunk) {\n                    $modx->regClientStartupHTMLBlock($chunk->process($properties));\n                    $modx->regClientCSS($formit->config[\'cssUrl\'] . \'migrate.css\');\n                }\n            }\n        }\n}',	0,	'a:0:{}',	0,	'',	0,	''),
(26,	1,	0,	'controlErrorLog',	'',	0,	41,	0,	'/** @var modX $modx */\nswitch ($modx->event->name) {\n    case \'OnManagerPageBeforeRender\':\n        if ($modx->getOption(\'controlerrorlog.enable\', null, true) && $modx->hasPermission(\'error_log_view\')) {\n            $modx->controller->addLexiconTopic(\'controlerrorlog:default\');\n            $assetsUrl = $modx->getOption(\'controlerrorlog_assets_url\', null, $modx->getOption(\'assets_url\') . \'components/controlerrorlog/\') ;\n            $modx->controller->addCss($assetsUrl . \'css/mgr/main.css\');\n            $modx->controller->addJavascript($assetsUrl . \'js/mgr/cel.default.js\');\n\n\n            $path = $modx->getOption(\'controlerrorlog_core_path\', null, $modx->getOption(\'core_path\') . \'components/controlerrorlog/\') . \'processors/\';\n            $response = $modx->runProcessor(\'mgr/get\', [\'includeContent\' => false], [\'processors_path\' => $path]);\n            $resObj = $response->getObject();\n            $_html = \"<script>	controlErrorLog.config = \" . $modx->toJSON($resObj) . \";</script>\";\n            $modx->controller->addHtml($_html);\n        }\n        break;\n    case \'OnBeforeRegisterClientScripts\':\n        $isAuth = $modx->user->isAuthenticated(\'mgr\') && $modx->user->isAuthenticated($modx->context->key);\n        if ($isAuth && $modx->getOption(\'controlerrorlog.control_frontend\', null, true) && $modx->hasPermission(\'error_log_view\')) {\n            $modx->lexicon->load(\'controlerrorlog:default\');\n            $modx->regClientHTMLBlock($modx->getChunk(\'errorLogPanel.tpl\'));\n\n            $assetsUrl = $modx->getOption(\'controlerrorlog_assets_url\', null, $modx->getOption(\'assets_url\') . \'components/controlerrorlog/\') ;\n            if ($css = $modx->getOption(\'controlerrorlog.css_file\', null, $assetsUrl . \'css/web/default.css\')) {\n                $modx->regClientCSS($css);\n            }\n            if ($js = $modx->getOption(\'controlerrorlog.js_file\', null, $assetsUrl . \'js/web/default.js\')) {\n                $modx->regClientScript($js);\n            }\n\n            if (!isset($_SESSION[\'controlerrorlog\'][\'token\'])) {\n                $_SESSION[\'controlerrorlog\'][\'token\'] = md5(MODX_HTTP_HOST . time() . mt_rand(1, 1000));\n            }\n            $path = $modx->getOption(\'controlerrorlog_core_path\', null, $modx->getOption(\'core_path\') . \'components/controlerrorlog/\') . \'processors/\';\n            $response = $modx->runProcessor(\'web/get\', [\'includeContent\' => false, \'token\' => @$_SESSION[\'controlerrorlog\'][\'token\']], [\'processors_path\' => $path]);\n            $rObject = $response->getObject();\n            $config = json_encode($rObject[\'config\']);\n            $connectorUrl = $assetsUrl . \'api.php\';\n            $rObject[\"tooLarge\"] = $rObject[\"tooLarge\"] ? \'true\' : \'false\';\n            $rObject[\"empty\"] = $rObject[\"empty\"] ? \'true\' : \'false\';\n            $resObj = \"{\n                token: \'{$_SESSION[\'controlerrorlog\'][\'token\']}\',\n                config: {$config},\n                collapsed: false,\n                connectorUrl: \'{$connectorUrl}\',\n                tooLarge: {$rObject[\"tooLarge\"]},\n                size: \'{$rObject[\"size\"]}\',\n                empty: {$rObject[\"empty\"]},\n                log: \'{$rObject[\"log\"]}\',\n                messages_count: {$rObject[\"messages_count\"]}\n            }\";\n            $_html = \"<script>\\r\\n\\tlet controlErrorLog = \" . $resObj . \";\\r\\n</script>\";\n            $modx->regClientStartupHTMLBlock($_html);\n        }\n        break;\n}',	0,	NULL,	0,	'',	0,	'core/components/controlerrorlog/elements/plugins/plugin.controlerrorlog.php'),
(27,	1,	0,	'2faUser',	'',	0,	0,	0,	'if ($modx->context->key == \'mgr\' || empty($_SERVER[\'HTTP_X_REQUESTED_WITH\']) || $_SERVER[\'HTTP_X_REQUESTED_WITH\'] != \'XMLHttpRequest\') return;\nswitch ($_POST[\'action\']) {\n    case \'2faOn\':\n        $output = array(\'success\' => false, \'message\' => \'\');\n        $modx->log(1,print_r($_POST[\'fields\'],1));\n        function filter(&$value) {\n             $value = htmlspecialchars($value, ENT_QUOTES, \'UTF-8\');\n        }\n        array_walk_recursive($_POST, \"filter\");\n        \n        $user_id = $_POST[\'fields\'][\'user_id\'];\n        // Получаем объект modUser\n        if ($user = $modx->getObject(\'modUser\', $user_id)) {\n        	// Получаем связанный с ним профиль пользователя\n        	if ($profile = $user->getOne(\'Profile\')) {\n        		// Получаем специальное поле extended\n        		$extended = $profile->get(\'extended\');\n        		// Добавляем новое значение\n        		if($_POST[\'fields\'][\'2fa-chek\'] == \'email\'){\n        		    $extended[\'2fa\'] = \'email\';\n        		}elseif($_POST[\'fields\'][\'2fa-chek\'] == \'google\'){\n        		    $extended[\'2fa\'] = \'google\';\n        		}\n        		else{\n        		    $extended[\'2fa\'] = \'\';\n        		}\n        		\n        		// И сохраняем обратно в профиль\n        		$profile->set(\'extended\', $extended);\n        		$profile->save();\n        		$output[\'success\'] = true;\n        		$output[\'message\'] =  \'Сохранено\';\n        	}\n        }else{\n           $output[\'message\'] =  \'Пользователь не найден\';  \n        }\n        \n        \n        \n        $output = json_encode($output);\n        die($output);\n        break;\n    case \'2faReset\':\n        $output = array(\'success\' => false, \'message\' => \'\');\n        $modx->log(1,print_r($_POST[\'fields\'],1));\n        function filter(&$value) {\n             $value = htmlspecialchars($value, ENT_QUOTES, \'UTF-8\');\n        }\n        array_walk_recursive($_POST, \"filter\");\n        \n        $user_email = $_POST[\'fields\'][\'email\'];\n       \n        // Получаем объект modUser\n        if ($user = $modx->getObject(\'modUser\', array(\'username\' => $user_email))) {\n        	// Получаем связанный с ним профиль пользователя\n        	if ($profile = $user->getOne(\'Profile\')) {\n        		// Получаем специальное поле extended\n        		$extended = $profile->get(\'extended\');\n        		// Добавляем новое значение\n        		if ($extended[\'resetTfa\']){\n        		   if ($extended[\'resetTfa\'] == $_POST[\'fields\'][\'reset_key\']){\n        		        $extended[\'userKey\'] = \'\';\n                		$extended[\'2fa\'] = \'\';\n                		$extended[\'resetTfa\'] = \'\';\n                		$profile->set(\'extended\', $extended);\n                		$profile->save();\n                		$output[\'success\'] = true;\n                		$output[\'message\'] =  \'Двухфактарная авторизация удалена\';\n        		    }else{\n        		        $output[\'message\'] =  \'Неверный ключ\'; \n        		    }\n        		}else{\n        		    $output[\'message\'] =  \'Ключ не существует\'; \n        		}\n        		\n        		\n        	}\n        }else{\n           $output[\'message\'] =  \'Пользователь не найден\';  \n        }\n        \n        \n        \n        $output = json_encode($output);\n        die($output);\n        break;    \n    case \'2faOn_remove\':\n        $output = array(\'success\' => false, \'message\' => \'\');\n        //$modx->log(1,print_r($_POST[\'fields\'],1));\n        function filter(&$value) {\n             $value = htmlspecialchars($value, ENT_QUOTES, \'UTF-8\');\n        }\n        array_walk_recursive($_POST, \"filter\");\n        \n        $user_id = $_POST[\'fields\'][\'user_id\'];\n        if ($user = $modx->getObject(\'modUser\', $user_id)) {\n        	if ($profile = $user->getOne(\'Profile\')) {\n        		$extended = $profile->get(\'extended\');\n        		$extended[\'userKey\'] = \'\';\n        		$extended[\'2fa\'] = \'\';\n        		$profile->set(\'extended\', $extended);\n        		$profile->save();\n        		$output[\'success\'] = true;\n        		$output[\'message\'] =  \'Удалено\';\n        	}\n        }else{\n           $output[\'message\'] =  \'Пользователь не найден\';  \n        }\n        \n        \n        \n        $output = json_encode($output);\n        die($output);\n        break;    \n   \n    default:\n        return;\n        break;\n}',	0,	'a:0:{}',	0,	'',	0,	''),
(28,	0,	0,	'ClientConfig',	'Sets system settings from the Client Config CMP.',	0,	0,	0,	'/**\n * ClientConfig\n *\n * Copyright 2011-2014 by Mark Hamstra <hello@markhamstra.com>\n *\n * ClientConfig is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * ClientConfig is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * ClientConfig; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * @package clientconfig\n *\n * @var modX $modx\n * @var int $id\n * @var string $mode\n * @var modResource $resource\n * @var modTemplate $template\n * @var modTemplateVar $tv\n * @var modChunk $chunk\n * @var modSnippet $snippet\n * @var modPlugin $plugin\n*/\n\n$eventName = $modx->event->name;\n\nswitch($eventName) {\n    case \'OnMODXInit\':\n    case \'OnHandleRequest\':\n    case \'pdoToolsOnFenomInit\':\n        /* Grab the class */\n        $path = $modx->getOption(\'clientconfig.core_path\', null, $modx->getOption(\'core_path\') . \'components/clientconfig/\');\n        $path .= \'model/clientconfig/\';\n        $clientConfig = $modx->getService(\'clientconfig\',\'ClientConfig\', $path);\n\n        /* If we got the class (gotta be careful of failed migrations), grab settings and go! */\n        if ($clientConfig instanceof ClientConfig) {\n            $contextKey = $modx->context instanceof modContext ? $modx->context->get(\'key\') : \'web\';\n            $settings = $clientConfig->getSettings($contextKey);\n\n            /* Make settings available as [[++tags]] */\n            $modx->setPlaceholders($settings, \'+\');\n\n            /* Make settings available for $modx->getOption() */\n            foreach ($settings as $key => $value) {\n                $modx->setOption($key, $value);\n            }\n        }\n        break;\n}\n\nreturn;',	0,	NULL,	0,	'',	0,	''),
(29,	0,	0,	'ModLDAP',	'<strong>2.4.1-beta3</strong> This plugin is part of ModLDAP packages: handling LDAP-User authentication.',	0,	0,	0,	'/**\r\n * ModLDAP\r\n *\r\n * Copyright 2016 by Zaenal Muttaqin <zaenal(#)lokamaya.com>\r\n *\r\n * This file is part of ModLDAP, which integrates LDAP authentication\r\n * into MODx Revolution.\r\n *\r\n * ModLDAP is free software; you can redistribute it and/or modify\r\n * it under the terms of the GNU General Public License as published by the Free\r\n * Software Foundation; either version 2 of the License, or (at your option) any\r\n * later version.\r\n *\r\n * ModLDAP is distributed in the hope that it will be useful, but\r\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r\n * details.\r\n *\r\n * You should have received a copy of the GNU General Public License along with\r\n * ModLDAP; if not, write to the Free Software Foundation, Inc.,\r\n * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r\n *\r\n * @package modldap\r\n */\r\n/**\r\n * Handle plugin events\r\n * \r\n * @package modldap\r\n**/\r\nif (!$modx->getOption(\'modldap.enabled\', $scriptProperties, false)) return;\r\n\r\n//load modLDAP class\r\n$modLDAP = $modx->getService(\'modldap\', \'modLDAP\', $modx->getOption(\'modldap.core_path\', null, $modx->getOption(\'core_path\') . \'components/modldap/\') . \'model/modldap/\', $scriptProperties);\r\nif (!($modLDAP instanceof modLDAP)) {\r\n    $modx->log(modX::LOG_LEVEL_ERROR, \'[ModLDAP] Could not load ModLDAP class.\');\r\n    $modx->event->output(false);\r\n    return;\r\n}\r\n\r\nif ($modx->context->get(\'key\') == \'mgr\' && $modx->getOption(modLDAP::LOGIN_MANAGER_DISABLE, $scriptProperties, false)) {\r\n    $modx->event->output(false);\r\n    return;\r\n} else if ($modx->context->get(\'key\') != \'mgr\' && $modx->getOption(modLDAP::LOGIN_WEB_DISABLE, $scriptProperties, false)) {\r\n    $modx->event->output(false);\r\n    return;\r\n}\r\n    \r\n\r\nswitch ($modx->event->name) {\r\n    /* authentication mgr */\r\n    case \'OnManagerAuthentication\':\r\n        return $modLDAP->processOnManagerAuthentication();\r\n        break;\r\n        \r\n    /* authentication other context */\r\n    case \'OnWebAuthentication\':\r\n        return $modLDAP->processOnWebAuthentication();\r\n        break;\r\n\r\n    /* onusernotfound */\r\n    case \'OnUserNotFound\':\r\n        return $modLDAP->processOnUserNotFound();\r\n        break;\r\n}\r\n\r\nreturn;',	0,	'a:1:{s:7:\"_object\";a:7:{s:4:\"name\";s:7:\"_object\";s:4:\"desc\";s:31:\"prop_modldap.distinguish_object\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:14:\"ModLDAP Plugin\";s:7:\"lexicon\";s:18:\"modldap:properties\";s:4:\"area\";s:0:\"\";}}',	0,	'',	0,	'');

CREATE TABLE `modx_site_snippets` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `source` int unsigned NOT NULL DEFAULT '0',
  `property_preprocess` tinyint unsigned NOT NULL DEFAULT '0',
  `name` varchar(50) NOT NULL DEFAULT '',
  `description` varchar(191) NOT NULL DEFAULT '',
  `editor_type` int NOT NULL DEFAULT '0',
  `category` int NOT NULL DEFAULT '0',
  `cache_type` tinyint(1) NOT NULL DEFAULT '0',
  `snippet` mediumtext,
  `locked` tinyint unsigned NOT NULL DEFAULT '0',
  `properties` text,
  `moduleguid` varchar(32) NOT NULL DEFAULT '',
  `static` tinyint unsigned NOT NULL DEFAULT '0',
  `static_file` varchar(191) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `category` (`category`),
  KEY `locked` (`locked`),
  KEY `moduleguid` (`moduleguid`),
  KEY `static` (`static`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

INSERT INTO `modx_site_snippets` (`id`, `source`, `property_preprocess`, `name`, `description`, `editor_type`, `category`, `cache_type`, `snippet`, `locked`, `properties`, `moduleguid`, `static`, `static_file`) VALUES
(16,	1,	0,	'pdoResources',	'',	0,	4,	0,	'/** @var array $scriptProperties */\r\n/** @var modX $modx */\r\nif (isset($parents) && $parents === \'\') {\r\n    $scriptProperties[\'parents\'] = $modx->resource->id;\r\n}\r\nif (!empty($returnIds)) {\r\n    $scriptProperties[\'return\'] = $return = \'ids\';\r\n} elseif (!isset($return)) {\r\n    $scriptProperties[\'return\'] = $return = \'chunks\';\r\n}\r\n\r\n// Adding extra parameters into special place so we can put them in a results\r\n/** @var modSnippet $snippet */\r\n$additionalPlaceholders = $properties = [];\r\nif (isset($this) && $this instanceof modSnippet && $this->get(\'properties\')) {\r\n    $properties = $this->get(\'properties\');\r\n}\r\nelseif ($snippet = $modx->getObject(\'modSnippet\', [\'name\' => \'pdoResources\'])) {\r\n    $properties = $snippet->get(\'properties\');\r\n}\r\nif (!empty($properties)) {\r\n    foreach ($scriptProperties as $k => $v) {\r\n        if (!isset($properties[$k])) {\r\n            $additionalPlaceholders[$k] = $v;\r\n        }\r\n    }\r\n}\r\n$scriptProperties[\'additionalPlaceholders\'] = $additionalPlaceholders;\r\n\r\n/** @var pdoFetch $pdoFetch */\r\n$fqn = $modx->getOption(\'pdoFetch.class\', null, \'pdotools.pdofetch\', true);\r\n$path = $modx->getOption(\'pdofetch_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\nif ($pdoClass = $modx->loadClass($fqn, $path, false, true)) {\r\n    $pdoFetch = new $pdoClass($modx, $scriptProperties);\r\n} else {\r\n    return false;\r\n}\r\n$pdoFetch->addTime(\'pdoTools loaded\');\r\n$output = $pdoFetch->run();\r\n\r\n$log = \'\';\r\nif ($modx->user->hasSessionContext(\'mgr\') && !empty($showLog)) {\r\n    $log .= \'<pre class=\"pdoResourcesLog\">\' . print_r($pdoFetch->getTime(), 1) . \'</pre>\';\r\n}\r\n\r\n// Return output\r\nif (!empty($returnIds)) {\r\n    $modx->setPlaceholder(\'pdoResources.log\', $log);\r\n    if (!empty($toPlaceholder)) {\r\n        $modx->setPlaceholder($toPlaceholder, $output);\r\n    } else {\r\n        return $output;\r\n    }\r\n} elseif ($return === \'data\') {\r\n    return $output;\r\n} elseif (!empty($toSeparatePlaceholders)) {\r\n    $output[\'log\'] = $log;\r\n    $modx->setPlaceholders($output, $toSeparatePlaceholders);\r\n} else {\r\n    $output .= $log;\r\n\r\n    if (!empty($tplWrapper) && (!empty($wrapIfEmpty) || !empty($output))) {\r\n        $output = $pdoFetch->getChunk($tplWrapper, array_merge($additionalPlaceholders, [\'output\' => $output]),\r\n            $pdoFetch->config[\'fastMode\']);\r\n    }\r\n\r\n    if (!empty($toPlaceholder)) {\r\n        $modx->setPlaceholder($toPlaceholder, $output);\r\n    } else {\r\n        return $output;\r\n    }\r\n}',	0,	'a:47:{s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:17:\"pdotools_prop_tpl\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"returnIds\";a:7:{s:4:\"name\";s:9:\"returnIds\";s:4:\"desc\";s:23:\"pdotools_prop_returnIds\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"showLog\";a:7:{s:4:\"name\";s:7:\"showLog\";s:4:\"desc\";s:21:\"pdotools_prop_showLog\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"fastMode\";a:7:{s:4:\"name\";s:8:\"fastMode\";s:4:\"desc\";s:22:\"pdotools_prop_fastMode\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"sortby\";a:7:{s:4:\"name\";s:6:\"sortby\";s:4:\"desc\";s:20:\"pdotools_prop_sortby\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:11:\"publishedon\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"sortbyTV\";a:7:{s:4:\"name\";s:8:\"sortbyTV\";s:4:\"desc\";s:22:\"pdotools_prop_sortbyTV\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"sortbyTVType\";a:7:{s:4:\"name\";s:12:\"sortbyTVType\";s:4:\"desc\";s:26:\"pdotools_prop_sortbyTVType\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"sortdir\";a:7:{s:4:\"name\";s:7:\"sortdir\";s:4:\"desc\";s:21:\"pdotools_prop_sortdir\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:3:\"ASC\";s:5:\"value\";s:3:\"ASC\";}i:1;a:2:{s:4:\"text\";s:4:\"DESC\";s:5:\"value\";s:4:\"DESC\";}}s:5:\"value\";s:4:\"DESC\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"sortdirTV\";a:7:{s:4:\"name\";s:9:\"sortdirTV\";s:4:\"desc\";s:23:\"pdotools_prop_sortdirTV\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:3:\"ASC\";s:5:\"value\";s:3:\"ASC\";}i:1;a:2:{s:4:\"text\";s:4:\"DESC\";s:5:\"value\";s:4:\"DESC\";}}s:5:\"value\";s:3:\"ASC\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:19:\"pdotools_prop_limit\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:10;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"offset\";a:7:{s:4:\"name\";s:6:\"offset\";s:4:\"desc\";s:20:\"pdotools_prop_offset\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"depth\";a:7:{s:4:\"name\";s:5:\"depth\";s:4:\"desc\";s:19:\"pdotools_prop_depth\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:10;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"outputSeparator\";a:7:{s:4:\"name\";s:15:\"outputSeparator\";s:4:\"desc\";s:29:\"pdotools_prop_outputSeparator\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"\n\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:27:\"pdotools_prop_toPlaceholder\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"parents\";a:7:{s:4:\"name\";s:7:\"parents\";s:4:\"desc\";s:21:\"pdotools_prop_parents\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:14:\"includeContent\";a:7:{s:4:\"name\";s:14:\"includeContent\";s:4:\"desc\";s:28:\"pdotools_prop_includeContent\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"includeTVs\";a:7:{s:4:\"name\";s:10:\"includeTVs\";s:4:\"desc\";s:24:\"pdotools_prop_includeTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"prepareTVs\";a:7:{s:4:\"name\";s:10:\"prepareTVs\";s:4:\"desc\";s:24:\"pdotools_prop_prepareTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"1\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"processTVs\";a:7:{s:4:\"name\";s:10:\"processTVs\";s:4:\"desc\";s:24:\"pdotools_prop_processTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"tvPrefix\";a:7:{s:4:\"name\";s:8:\"tvPrefix\";s:4:\"desc\";s:22:\"pdotools_prop_tvPrefix\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:3:\"tv.\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"tvFilters\";a:7:{s:4:\"name\";s:9:\"tvFilters\";s:4:\"desc\";s:23:\"pdotools_prop_tvFilters\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:21:\"tvFiltersAndDelimiter\";a:7:{s:4:\"name\";s:21:\"tvFiltersAndDelimiter\";s:4:\"desc\";s:35:\"pdotools_prop_tvFiltersAndDelimiter\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\",\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:20:\"tvFiltersOrDelimiter\";a:7:{s:4:\"name\";s:20:\"tvFiltersOrDelimiter\";s:4:\"desc\";s:34:\"pdotools_prop_tvFiltersOrDelimiter\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:2:\"||\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"where\";a:7:{s:4:\"name\";s:5:\"where\";s:4:\"desc\";s:19:\"pdotools_prop_where\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"showUnpublished\";a:7:{s:4:\"name\";s:15:\"showUnpublished\";s:4:\"desc\";s:29:\"pdotools_prop_showUnpublished\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"showDeleted\";a:7:{s:4:\"name\";s:11:\"showDeleted\";s:4:\"desc\";s:25:\"pdotools_prop_showDeleted\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"showHidden\";a:7:{s:4:\"name\";s:10:\"showHidden\";s:4:\"desc\";s:24:\"pdotools_prop_showHidden\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:14:\"hideContainers\";a:7:{s:4:\"name\";s:14:\"hideContainers\";s:4:\"desc\";s:28:\"pdotools_prop_hideContainers\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"context\";a:7:{s:4:\"name\";s:7:\"context\";s:4:\"desc\";s:21:\"pdotools_prop_context\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:3:\"idx\";a:7:{s:4:\"name\";s:3:\"idx\";s:4:\"desc\";s:17:\"pdotools_prop_idx\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"first\";a:7:{s:4:\"name\";s:5:\"first\";s:4:\"desc\";s:19:\"pdotools_prop_first\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:4:\"last\";a:7:{s:4:\"name\";s:4:\"last\";s:4:\"desc\";s:18:\"pdotools_prop_last\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"tplFirst\";a:7:{s:4:\"name\";s:8:\"tplFirst\";s:4:\"desc\";s:22:\"pdotools_prop_tplFirst\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"tplLast\";a:7:{s:4:\"name\";s:7:\"tplLast\";s:4:\"desc\";s:21:\"pdotools_prop_tplLast\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"tplOdd\";a:7:{s:4:\"name\";s:6:\"tplOdd\";s:4:\"desc\";s:20:\"pdotools_prop_tplOdd\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"tplWrapper\";a:7:{s:4:\"name\";s:10:\"tplWrapper\";s:4:\"desc\";s:24:\"pdotools_prop_tplWrapper\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"wrapIfEmpty\";a:7:{s:4:\"name\";s:11:\"wrapIfEmpty\";s:4:\"desc\";s:25:\"pdotools_prop_wrapIfEmpty\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"totalVar\";a:7:{s:4:\"name\";s:8:\"totalVar\";s:4:\"desc\";s:22:\"pdotools_prop_totalVar\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:5:\"total\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"resources\";a:7:{s:4:\"name\";s:9:\"resources\";s:4:\"desc\";s:23:\"pdotools_prop_resources\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"tplCondition\";a:7:{s:4:\"name\";s:12:\"tplCondition\";s:4:\"desc\";s:26:\"pdotools_prop_tplCondition\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"tplOperator\";a:7:{s:4:\"name\";s:11:\"tplOperator\";s:4:\"desc\";s:25:\"pdotools_prop_tplOperator\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:10:{i:0;a:2:{s:4:\"text\";s:11:\"is equal to\";s:5:\"value\";s:2:\"==\";}i:1;a:2:{s:4:\"text\";s:15:\"is not equal to\";s:5:\"value\";s:2:\"!=\";}i:2;a:2:{s:4:\"text\";s:9:\"less than\";s:5:\"value\";s:1:\"<\";}i:3;a:2:{s:4:\"text\";s:21:\"less than or equal to\";s:5:\"value\";s:2:\"<=\";}i:4;a:2:{s:4:\"text\";s:24:\"greater than or equal to\";s:5:\"value\";s:2:\">=\";}i:5;a:2:{s:4:\"text\";s:8:\"is empty\";s:5:\"value\";s:5:\"empty\";}i:6;a:2:{s:4:\"text\";s:12:\"is not empty\";s:5:\"value\";s:6:\"!empty\";}i:7;a:2:{s:4:\"text\";s:7:\"is null\";s:5:\"value\";s:4:\"null\";}i:8;a:2:{s:4:\"text\";s:11:\"is in array\";s:5:\"value\";s:7:\"inarray\";}i:9;a:2:{s:4:\"text\";s:10:\"is between\";s:5:\"value\";s:7:\"between\";}}s:5:\"value\";s:2:\"==\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"conditionalTpls\";a:7:{s:4:\"name\";s:15:\"conditionalTpls\";s:4:\"desc\";s:29:\"pdotools_prop_conditionalTpls\";s:4:\"type\";s:8:\"textarea\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"select\";a:7:{s:4:\"name\";s:6:\"select\";s:4:\"desc\";s:20:\"pdotools_prop_select\";s:4:\"type\";s:8:\"textarea\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:22:\"toSeparatePlaceholders\";a:7:{s:4:\"name\";s:22:\"toSeparatePlaceholders\";s:4:\"desc\";s:36:\"pdotools_prop_toSeparatePlaceholders\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"loadModels\";a:7:{s:4:\"name\";s:10:\"loadModels\";s:4:\"desc\";s:24:\"pdotools_prop_loadModels\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"scheme\";a:7:{s:4:\"name\";s:6:\"scheme\";s:4:\"desc\";s:20:\"pdotools_prop_scheme\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:6:{i:0;a:2:{s:5:\"value\";s:0:\"\";s:4:\"text\";s:14:\"System default\";}i:1;a:2:{s:5:\"value\";i:-1;s:4:\"text\";s:25:\"-1 (relative to site_url)\";}i:2;a:2:{s:5:\"value\";s:4:\"full\";s:4:\"text\";s:40:\"full (absolute, prepended with site_url)\";}i:3;a:2:{s:5:\"value\";s:3:\"abs\";s:4:\"text\";s:39:\"abs (absolute, prepended with base_url)\";}i:4;a:2:{s:5:\"value\";s:4:\"http\";s:4:\"text\";s:38:\"http (absolute, forced to http scheme)\";}i:5;a:2:{s:5:\"value\";s:5:\"https\";s:4:\"text\";s:40:\"https (absolute, forced to https scheme)\";}}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"useWeblinkUrl\";a:7:{s:4:\"name\";s:13:\"useWeblinkUrl\";s:4:\"desc\";s:27:\"pdotools_prop_useWeblinkUrl\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	'core/components/pdotools/elements/snippets/snippet.pdoresources.php'),
(17,	1,	0,	'pdoUsers',	'',	0,	4,	0,	'/** @var array $scriptProperties */\r\n/** @var pdoFetch $pdoFetch */\r\n/** @var modX $modx */\r\nif (!empty($returnIds)) {\r\n    $scriptProperties[\'return\'] = $return = \'ids\';\r\n} elseif (!isset($return)) {\r\n    $scriptProperties[\'return\'] = $return = \'chunks\';\r\n}\r\n$fqn = $modx->getOption(\'pdoFetch.class\', null, \'pdotools.pdofetch\', true);\r\n$path = $modx->getOption(\'pdofetch_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\nif ($pdoClass = $modx->loadClass($fqn, $path, false, true)) {\r\n    $pdoFetch = new $pdoClass($modx, $scriptProperties);\r\n} else {\r\n    return false;\r\n}\r\n$pdoFetch->addTime(\'pdoTools loaded\');\r\n\r\n$class = \'modUser\';\r\n$profile = \'modUserProfile\';\r\n$member = \'modUserGroupMember\';\r\n\r\n// Start building \"Where\" expression\r\n$where = [];\r\nif (empty($showInactive)) {\r\n    $where[$class . \'.active\'] = 1;\r\n}\r\nif (empty($showBlocked)) {\r\n    $where[$profile . \'.blocked\'] = 0;\r\n}\r\n\r\n// Add users profiles and groups\r\n$innerJoin = [\r\n    $profile => [\'alias\' => $profile, \'on\' => \"$class.id = $profile.internalKey\"],\r\n];\r\n\r\n// Filter by users, groups and roles\r\n$tmp = [\r\n    \'users\' => [\r\n        \'class\' => $class,\r\n        \'name\' => \'username\',\r\n        \'join\' => $class . \'.id\',\r\n    ],\r\n    \'groups\' => [\r\n        \'class\' => \'modUserGroup\',\r\n        \'name\' => \'name\',\r\n        \'join\' => $member . \'.user_group\',\r\n    ],\r\n    \'roles\' => [\r\n        \'class\' => \'modUserGroupRole\',\r\n        \'name\' => \'name\',\r\n        \'join\' => $member . \'.role\',\r\n    ],\r\n];\r\nforeach ($tmp as $k => $p) {\r\n    if (!empty($$k)) {\r\n        $$k = array_map(\'trim\', explode(\',\', $$k));\r\n        ${$k . \'_in\'} = ${$k . \'_out\'} = $fetch_in = $fetch_out = [];\r\n        foreach ($$k as $v) {\r\n            if (is_numeric($v)) {\r\n                if ($v[0] == \'-\') {\r\n                    ${$k . \'_out\'}[] = abs($v);\r\n                } else {\r\n                    ${$k . \'_in\'}[] = abs($v);\r\n                }\r\n            } else {\r\n                if ($v[0] == \'-\') {\r\n                    $fetch_out[] = $v;\r\n                } else {\r\n                    $fetch_in[] = $v;\r\n                }\r\n            }\r\n        }\r\n\r\n        if (!empty($fetch_in) || !empty($fetch_out)) {\r\n            $q = $modx->newQuery($p[\'class\'], [$p[\'name\'] . \':IN\' => array_merge($fetch_in, $fetch_out)]);\r\n            $q->select(\'id,\' . $p[\'name\']);\r\n            $tstart = microtime(true);\r\n            if ($q->prepare() && $q->stmt->execute()) {\r\n                $modx->queryTime += microtime(true) - $tstart;\r\n                $modx->executedQueries++;\r\n                while ($row = $q->stmt->fetch(PDO::FETCH_ASSOC)) {\r\n                    if (in_array($row[$p[\'name\']], $fetch_in)) {\r\n                        ${$k . \'_in\'}[] = $row[\'id\'];\r\n                    } else {\r\n                        ${$k . \'_out\'}[] = $row[\'id\'];\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        if (!empty(${$k . \'_in\'})) {\r\n            $where[$p[\'join\'] . \':IN\'] = ${$k . \'_in\'};\r\n        }\r\n        if (!empty(${$k . \'_out\'})) {\r\n            $where[$p[\'join\'] . \':NOT IN\'] = ${$k . \'_out\'};\r\n        }\r\n    }\r\n}\r\n\r\nif (!empty($groups_in) || !empty($groups_out) || !empty($roles_in) || !empty($roles_out)) {\r\n    $innerJoin[$member] = [\'alias\' => $member, \'on\' => \"$class.id = $member.member\"];\r\n}\r\n\r\n// Fields to select\r\n$select = [\r\n    $profile => implode(\',\', array_diff(array_keys($modx->getFieldMeta($profile)), [\'sessionid\'])),\r\n    $class => implode(\',\', array_diff(array_keys($modx->getFieldMeta($class)), [\'password\', \'cachepwd\', \'salt\', \'session_stale\', \'remote_key\', \'remote_data\', \'hash_class\'])),\r\n];\r\n\r\n// Add custom parameters\r\nforeach ([\'where\', \'innerJoin\', \'select\'] as $v) {\r\n    if (!empty($scriptProperties[$v])) {\r\n        $tmp = $scriptProperties[$v];\r\n        if (!is_array($tmp)) {\r\n            $tmp = json_decode($tmp, true);\r\n        }\r\n        if (is_array($tmp)) {\r\n            $$v = array_merge($$v, $tmp);\r\n        }\r\n    }\r\n    unset($scriptProperties[$v]);\r\n}\r\n$pdoFetch->addTime(\'Conditions prepared\');\r\n\r\n$default = [\r\n    \'class\' => $class,\r\n    \'innerJoin\' => json_encode($innerJoin),\r\n    \'where\' => json_encode($where),\r\n    \'select\' => json_encode($select),\r\n    \'groupby\' => $class . \'.id\',\r\n    \'sortby\' => $class . \'.id\',\r\n    \'sortdir\' => \'ASC\',\r\n    \'fastMode\' => false,\r\n    \'return\' => $return,\r\n    \'disableConditions\' => true,\r\n];\r\n\r\nif (!empty($users_in) && (empty($scriptProperties[\'sortby\']) || $scriptProperties[\'sortby\'] == $class . \'.id\')) {\r\n    $scriptProperties[\'sortby\'] = \"find_in_set(`$class`.`id`,\'\" . implode(\',\', $users_in) . \"\')\";\r\n    $scriptProperties[\'sortdir\'] = \'\';\r\n}\r\n\r\n// Merge all properties and run!\r\n$pdoFetch->addTime(\'Query parameters ready\');\r\n$pdoFetch->setConfig(array_merge($default, $scriptProperties), false);\r\n$output = $pdoFetch->run();\r\n\r\n$log = \'\';\r\nif ($modx->user->hasSessionContext(\'mgr\') && !empty($showLog)) {\r\n    $log .= \'<pre class=\"pdoUsersLog\">\' . print_r($pdoFetch->getTime(), 1) . \'</pre>\';\r\n}\r\n\r\n// Return output\r\nif (!empty($returnIds)) {\r\n    $modx->setPlaceholder(\'pdoUsers.log\', $log);\r\n    if (!empty($toPlaceholder)) {\r\n        $modx->setPlaceholder($toPlaceholder, $output);\r\n    } else {\r\n        return $output;\r\n    }\r\n} elseif ($return === \'data\') {\r\n    return $output;\r\n} elseif (!empty($toSeparatePlaceholders)) {\r\n    $output[\'log\'] = $log;\r\n    $modx->setPlaceholders($output, $toSeparatePlaceholders);\r\n} else {\r\n    $output .= $log;\r\n\r\n    if (!empty($tplWrapper) && (!empty($wrapIfEmpty) || !empty($output))) {\r\n        $output = $pdoFetch->getChunk($tplWrapper, [\'output\' => $output], $pdoFetch->config[\'fastMode\']);\r\n    }\r\n\r\n    if (!empty($toPlaceholder)) {\r\n        $modx->setPlaceholder($toPlaceholder, $output);\r\n    } else {\r\n        return $output;\r\n    }\r\n}',	0,	'a:30:{s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:17:\"pdotools_prop_tpl\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"returnIds\";a:7:{s:4:\"name\";s:9:\"returnIds\";s:4:\"desc\";s:23:\"pdotools_prop_returnIds\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"showLog\";a:7:{s:4:\"name\";s:7:\"showLog\";s:4:\"desc\";s:21:\"pdotools_prop_showLog\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"fastMode\";a:7:{s:4:\"name\";s:8:\"fastMode\";s:4:\"desc\";s:22:\"pdotools_prop_fastMode\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"sortby\";a:7:{s:4:\"name\";s:6:\"sortby\";s:4:\"desc\";s:20:\"pdotools_prop_sortby\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:10:\"modUser.id\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"sortdir\";a:7:{s:4:\"name\";s:7:\"sortdir\";s:4:\"desc\";s:21:\"pdotools_prop_sortdir\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:3:\"ASC\";s:5:\"value\";s:3:\"ASC\";}i:1;a:2:{s:4:\"text\";s:4:\"DESC\";s:5:\"value\";s:4:\"DESC\";}}s:5:\"value\";s:3:\"ASC\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:19:\"pdotools_prop_limit\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:10;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"offset\";a:7:{s:4:\"name\";s:6:\"offset\";s:4:\"desc\";s:20:\"pdotools_prop_offset\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"outputSeparator\";a:7:{s:4:\"name\";s:15:\"outputSeparator\";s:4:\"desc\";s:29:\"pdotools_prop_outputSeparator\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"\n\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:27:\"pdotools_prop_toPlaceholder\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"groups\";a:7:{s:4:\"name\";s:6:\"groups\";s:4:\"desc\";s:20:\"pdotools_prop_groups\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"roles\";a:7:{s:4:\"name\";s:5:\"roles\";s:4:\"desc\";s:19:\"pdotools_prop_roles\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"users\";a:7:{s:4:\"name\";s:5:\"users\";s:4:\"desc\";s:19:\"pdotools_prop_users\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"where\";a:7:{s:4:\"name\";s:5:\"where\";s:4:\"desc\";s:19:\"pdotools_prop_where\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"showInactive\";a:7:{s:4:\"name\";s:12:\"showInactive\";s:4:\"desc\";s:26:\"pdotools_prop_showInactive\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"showBlocked\";a:7:{s:4:\"name\";s:11:\"showBlocked\";s:4:\"desc\";s:25:\"pdotools_prop_showBlocked\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:3:\"idx\";a:7:{s:4:\"name\";s:3:\"idx\";s:4:\"desc\";s:17:\"pdotools_prop_idx\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"first\";a:7:{s:4:\"name\";s:5:\"first\";s:4:\"desc\";s:19:\"pdotools_prop_first\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:4:\"last\";a:7:{s:4:\"name\";s:4:\"last\";s:4:\"desc\";s:18:\"pdotools_prop_last\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"tplFirst\";a:7:{s:4:\"name\";s:8:\"tplFirst\";s:4:\"desc\";s:22:\"pdotools_prop_tplFirst\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"tplLast\";a:7:{s:4:\"name\";s:7:\"tplLast\";s:4:\"desc\";s:21:\"pdotools_prop_tplLast\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"tplOdd\";a:7:{s:4:\"name\";s:6:\"tplOdd\";s:4:\"desc\";s:20:\"pdotools_prop_tplOdd\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"tplWrapper\";a:7:{s:4:\"name\";s:10:\"tplWrapper\";s:4:\"desc\";s:24:\"pdotools_prop_tplWrapper\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"wrapIfEmpty\";a:7:{s:4:\"name\";s:11:\"wrapIfEmpty\";s:4:\"desc\";s:25:\"pdotools_prop_wrapIfEmpty\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"totalVar\";a:7:{s:4:\"name\";s:8:\"totalVar\";s:4:\"desc\";s:22:\"pdotools_prop_totalVar\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:5:\"total\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"tplCondition\";a:7:{s:4:\"name\";s:12:\"tplCondition\";s:4:\"desc\";s:26:\"pdotools_prop_tplCondition\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"tplOperator\";a:7:{s:4:\"name\";s:11:\"tplOperator\";s:4:\"desc\";s:25:\"pdotools_prop_tplOperator\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:10:{i:0;a:2:{s:4:\"text\";s:11:\"is equal to\";s:5:\"value\";s:2:\"==\";}i:1;a:2:{s:4:\"text\";s:15:\"is not equal to\";s:5:\"value\";s:2:\"!=\";}i:2;a:2:{s:4:\"text\";s:9:\"less than\";s:5:\"value\";s:1:\"<\";}i:3;a:2:{s:4:\"text\";s:21:\"less than or equal to\";s:5:\"value\";s:2:\"<=\";}i:4;a:2:{s:4:\"text\";s:24:\"greater than or equal to\";s:5:\"value\";s:2:\">=\";}i:5;a:2:{s:4:\"text\";s:8:\"is empty\";s:5:\"value\";s:5:\"empty\";}i:6;a:2:{s:4:\"text\";s:12:\"is not empty\";s:5:\"value\";s:6:\"!empty\";}i:7;a:2:{s:4:\"text\";s:7:\"is null\";s:5:\"value\";s:4:\"null\";}i:8;a:2:{s:4:\"text\";s:11:\"is in array\";s:5:\"value\";s:7:\"inarray\";}i:9;a:2:{s:4:\"text\";s:10:\"is between\";s:5:\"value\";s:7:\"between\";}}s:5:\"value\";s:2:\"==\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"conditionalTpls\";a:7:{s:4:\"name\";s:15:\"conditionalTpls\";s:4:\"desc\";s:29:\"pdotools_prop_conditionalTpls\";s:4:\"type\";s:8:\"textarea\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"select\";a:7:{s:4:\"name\";s:6:\"select\";s:4:\"desc\";s:20:\"pdotools_prop_select\";s:4:\"type\";s:8:\"textarea\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:22:\"toSeparatePlaceholders\";a:7:{s:4:\"name\";s:22:\"toSeparatePlaceholders\";s:4:\"desc\";s:36:\"pdotools_prop_toSeparatePlaceholders\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	'core/components/pdotools/elements/snippets/snippet.pdousers.php'),
(18,	1,	0,	'pdoCrumbs',	'',	0,	4,	0,	'/** @var array $scriptProperties */\r\n/** @var pdoFetch $pdoFetch */\r\n/** @var modX $modx */\r\n$fqn = $modx->getOption(\'pdoFetch.class\', null, \'pdotools.pdofetch\', true);\r\n$path = $modx->getOption(\'pdofetch_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\nif ($pdoClass = $modx->loadClass($fqn, $path, false, true)) {\r\n    $pdoFetch = new $pdoClass($modx, $scriptProperties);\r\n} else {\r\n    return false;\r\n}\r\n$pdoFetch->addTime(\'pdoTools loaded\');\r\n\r\nif (!isset($from) || $from == \'\') {\r\n    $from = 0;\r\n}\r\nif (empty($to)) {\r\n    $to = $modx->resource->id;\r\n}\r\nif (empty($direction)) {\r\n    $direction = \'ltr\';\r\n}\r\nif ($outputSeparator == \'&nbsp;&rarr;&nbsp;\' && $direction == \'rtl\') {\r\n    $outputSeparator = \'&nbsp;&larr;&nbsp;\';\r\n}\r\nif ($limit == \'\') {\r\n    $limit = 10;\r\n}\r\n\r\n// For compatibility with BreadCrumb\r\nif (!empty($maxCrumbs)) {\r\n    $limit = $maxCrumbs;\r\n}\r\nif (!empty($containerTpl)) {\r\n    $tplWrapper = $containerTpl;\r\n}\r\nif (!empty($currentCrumbTpl)) {\r\n    $tplCurrent = $currentCrumbTpl;\r\n}\r\nif (!empty($linkCrumbTpl)) {\r\n    $scriptProperties[\'tpl\'] = $linkCrumbTpl;\r\n}\r\nif (!empty($maxCrumbTpl)) {\r\n    $tplMax = $maxCrumbTpl;\r\n}\r\nif (isset($showBreadCrumbsAtHome)) {\r\n    $showAtHome = $showBreadCrumbsAtHome;\r\n}\r\nif (isset($showHomeCrumb)) {\r\n    $showHome = $showHomeCrumb;\r\n}\r\nif (isset($showCurrentCrumb)) {\r\n    $showCurrent = $showCurrentCrumb;\r\n}\r\n// --\r\n$fastMode = !empty($fastMode);\r\n$siteStart = $modx->getOption(\'siteStart\', $scriptProperties, $modx->getOption(\'site_start\'));\r\n\r\nif (empty($showAtHome) && $modx->resource->id == $siteStart) {\r\n    return \'\';\r\n}\r\n\r\n$class = $modx->getOption(\'class\', $scriptProperties, \'modResource\');\r\n// Start building \"Where\" expression\r\n$where = array();\r\nif (empty($showUnpublished) && empty($showUnPub)) {\r\n    $where[\'published\'] = 1;\r\n}\r\nif (empty($showHidden)) {\r\n    $where[\'hidemenu\'] = 0;\r\n}\r\nif (empty($showDeleted)) {\r\n    $where[\'deleted\'] = 0;\r\n}\r\nif (!empty($hideContainers) && empty($showContainer)) {\r\n    $where[\'isfolder\'] = 0;\r\n}\r\n\r\n$resource = ($to == $modx->resource->id)\r\n    ? $modx->resource\r\n    : $modx->getObject($class, $to);\r\n\r\nif (!$resource) {\r\n    $message = \'Could not build breadcrumbs to resource \"\' . $to . \'\"\';\r\n\r\n    return \'\';\r\n}\r\n\r\nif (!empty($customParents)) {\r\n    $customParents = is_array($customParents) ? $customParents : array_map(\'trim\', explode(\',\', $customParents));\r\n    $parents = is_array($customParents) ? array_reverse($customParents) : array();\r\n}\r\nif (empty($parents)) {\r\n    $parents = $modx->getParentIds($resource->id, $limit, array(\'context\' => $resource->get(\'context_key\')));\r\n}\r\nif (!empty($showHome)) {\r\n    $parents[] = $siteStart;\r\n}\r\n\r\n$ids = array($resource->id);\r\nforeach ($parents as $parent) {\r\n    if (!empty($parent)) {\r\n        $ids[] = $parent;\r\n    }\r\n    if (!empty($from) && $parent == $from) {\r\n        break;\r\n    }\r\n}\r\n$where[\'id:IN\'] = $ids;\r\n\r\nif (!empty($exclude)) {\r\n    $where[\'id:NOT IN\'] = array_map(\'trim\', explode(\',\', $exclude));\r\n}\r\n\r\n// Fields to select\r\n$resourceColumns = array_keys($modx->getFieldMeta($class));\r\n$select = array($class => implode(\',\', $resourceColumns));\r\n\r\n// Add custom parameters\r\nforeach (array(\'where\', \'select\') as $v) {\r\n    if (!empty($scriptProperties[$v])) {\r\n        $tmp = $scriptProperties[$v];\r\n        if (!is_array($tmp)) {\r\n            $tmp = json_decode($tmp, true);\r\n        }\r\n        if (is_array($tmp)) {\r\n            $$v = array_merge($$v, $tmp);\r\n        }\r\n    }\r\n    unset($scriptProperties[$v]);\r\n}\r\n$pdoFetch->addTime(\'Conditions prepared\');\r\n\r\n// Default parameters\r\n$default = array(\r\n    \'class\' => $class,\r\n    \'where\' => json_encode($where),\r\n    \'select\' => json_encode($select),\r\n    \'groupby\' => $class . \'.id\',\r\n    \'sortby\' => \"find_in_set(`$class`.`id`,\'\" . implode(\',\', $ids) . \"\')\",\r\n    \'sortdir\' => \'\',\r\n    \'return\' => \'data\',\r\n    \'totalVar\' => \'pdocrumbs.total\',\r\n    \'disableConditions\' => true,\r\n);\r\n\r\n// Merge all properties and run!\r\n$pdoFetch->addTime(\'Query parameters ready\');\r\n$pdoFetch->setConfig(array_merge($default, $scriptProperties), false);\r\n$rows = $pdoFetch->run();\r\n\r\n$output = [];\r\nif (!empty($rows) && is_array($rows)) {\r\n    if (strtolower($direction) == \'ltr\') {\r\n        $rows = array_reverse($rows);\r\n    }\r\n\r\n    foreach ($rows as $row) {\r\n        if (!empty($useWeblinkUrl) && $row[\'class_key\'] == \'modWebLink\') {\r\n            $row[\'link\'] = is_numeric(trim($row[\'content\'], \'[]~ \'))\r\n                ? $pdoFetch->makeUrl((int)trim($row[\'content\'], \'[]~ \'), $row)\r\n                : $row[\'content\'];\r\n        } else {\r\n            $row[\'link\'] = $pdoFetch->makeUrl($row[\'id\'], $row);\r\n        }\r\n\r\n        $row = array_merge(\r\n            $scriptProperties,\r\n            $row,\r\n            [\'idx\' => $pdoFetch->idx++]\r\n        );\r\n        if (empty($row[\'menutitle\'])) {\r\n            $row[\'menutitle\'] = $row[\'pagetitle\'];\r\n        }\r\n\r\n        if (isset($return) && $return === \'data\') {\r\n            $output[] = $row;\r\n            continue;\r\n        }\r\n        if ($row[\'id\'] == $resource->id && empty($showCurrent)) {\r\n            continue;\r\n        } elseif ($row[\'id\'] == $resource->id && !empty($tplCurrent)) {\r\n            $tpl = $tplCurrent;\r\n        } elseif ($row[\'id\'] == $siteStart && !empty($tplHome)) {\r\n            $tpl = $tplHome;\r\n        } else {\r\n            $tpl = $pdoFetch->defineChunk($row);\r\n        }\r\n        $output[] = empty($tpl)\r\n            ? \'<pre>\' . $pdoFetch->getChunk(\'\', $row) . \'</pre>\'\r\n            : $pdoFetch->getChunk($tpl, $row, $fastMode);\r\n    }\r\n}\r\nif (isset($return) && $return === \'data\') {\r\n    return $output;\r\n}\r\n\r\n$pdoFetch->addTime(\'Chunks processed\');\r\n\r\nif (count($output) == 1 && !empty($hideSingle)) {\r\n    $pdoFetch->addTime(\'The only result was hidden, because the parameter \"hideSingle\" activated\');\r\n    $output = array();\r\n}\r\n\r\n$log = \'\';\r\nif ($modx->user->hasSessionContext(\'mgr\') && !empty($showLog)) {\r\n    $log .= \'<pre class=\"pdoCrumbsLog\">\' . print_r($pdoFetch->getTime(), 1) . \'</pre>\';\r\n}\r\n\r\nif (!empty($toSeparatePlaceholders)) {\r\n    $output[\'log\'] = $log;\r\n    $modx->setPlaceholders($output, $toSeparatePlaceholders);\r\n} else {\r\n    $output = implode($outputSeparator, $output);\r\n    if ($pdoFetch->idx >= $limit && !empty($tplMax) && !empty($output)) {\r\n        $output = ($direction == \'ltr\')\r\n            ? $pdoFetch->getChunk($tplMax, array(), $fastMode) . $output\r\n            : $output . $pdoFetch->getChunk($tplMax, array(), $fastMode);\r\n    }\r\n    $output .= $log;\r\n\r\n    if (!empty($tplWrapper) && (!empty($wrapIfEmpty) || !empty($output))) {\r\n        $output = $pdoFetch->getChunk($tplWrapper, array(\'output\' => $output, \'crumbs\' => $output), $fastMode);\r\n    }\r\n\r\n    if (!empty($toPlaceholder)) {\r\n        $modx->setPlaceholder($toPlaceholder, $output);\r\n    } else {\r\n        return $output;\r\n    }\r\n}',	0,	'a:31:{s:7:\"showLog\";a:7:{s:4:\"name\";s:7:\"showLog\";s:4:\"desc\";s:21:\"pdotools_prop_showLog\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"fastMode\";a:7:{s:4:\"name\";s:8:\"fastMode\";s:4:\"desc\";s:22:\"pdotools_prop_fastMode\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:4:\"from\";a:7:{s:4:\"name\";s:4:\"from\";s:4:\"desc\";s:18:\"pdotools_prop_from\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:2:\"to\";a:7:{s:4:\"name\";s:2:\"to\";s:4:\"desc\";s:16:\"pdotools_prop_to\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"customParents\";a:7:{s:4:\"name\";s:13:\"customParents\";s:4:\"desc\";s:27:\"pdotools_prop_customParents\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:19:\"pdotools_prop_limit\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:10;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"exclude\";a:7:{s:4:\"name\";s:7:\"exclude\";s:4:\"desc\";s:21:\"pdotools_prop_exclude\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"outputSeparator\";a:7:{s:4:\"name\";s:15:\"outputSeparator\";s:4:\"desc\";s:29:\"pdotools_prop_outputSeparator\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"\n\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:27:\"pdotools_prop_toPlaceholder\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"includeTVs\";a:7:{s:4:\"name\";s:10:\"includeTVs\";s:4:\"desc\";s:24:\"pdotools_prop_includeTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"prepareTVs\";a:7:{s:4:\"name\";s:10:\"prepareTVs\";s:4:\"desc\";s:24:\"pdotools_prop_prepareTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"1\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"processTVs\";a:7:{s:4:\"name\";s:10:\"processTVs\";s:4:\"desc\";s:24:\"pdotools_prop_processTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"tvPrefix\";a:7:{s:4:\"name\";s:8:\"tvPrefix\";s:4:\"desc\";s:22:\"pdotools_prop_tvPrefix\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:3:\"tv.\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"where\";a:7:{s:4:\"name\";s:5:\"where\";s:4:\"desc\";s:19:\"pdotools_prop_where\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"showUnpublished\";a:7:{s:4:\"name\";s:15:\"showUnpublished\";s:4:\"desc\";s:29:\"pdotools_prop_showUnpublished\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"showDeleted\";a:7:{s:4:\"name\";s:11:\"showDeleted\";s:4:\"desc\";s:25:\"pdotools_prop_showDeleted\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"showHidden\";a:7:{s:4:\"name\";s:10:\"showHidden\";s:4:\"desc\";s:24:\"pdotools_prop_showHidden\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:14:\"hideContainers\";a:7:{s:4:\"name\";s:14:\"hideContainers\";s:4:\"desc\";s:28:\"pdotools_prop_hideContainers\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:17:\"pdotools_prop_tpl\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:79:\"@INLINE <li class=\"breadcrumb-item\"><a href=\"[[+link]]\">[[+menutitle]]</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"tplCurrent\";a:7:{s:4:\"name\";s:10:\"tplCurrent\";s:4:\"desc\";s:24:\"pdotools_prop_tplCurrent\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:62:\"@INLINE <li class=\"breadcrumb-item active\">[[+menutitle]]</li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"tplMax\";a:7:{s:4:\"name\";s:6:\"tplMax\";s:4:\"desc\";s:20:\"pdotools_prop_tplMax\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:65:\"@INLINE <li class=\"breadcrumb-item disabled\">&nbsp;...&nbsp;</li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"tplHome\";a:7:{s:4:\"name\";s:7:\"tplHome\";s:4:\"desc\";s:21:\"pdotools_prop_tplHome\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"tplWrapper\";a:7:{s:4:\"name\";s:10:\"tplWrapper\";s:4:\"desc\";s:24:\"pdotools_prop_tplWrapper\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:47:\"@INLINE <ol class=\"breadcrumb\">[[+output]]</ol>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"wrapIfEmpty\";a:7:{s:4:\"name\";s:11:\"wrapIfEmpty\";s:4:\"desc\";s:25:\"pdotools_prop_wrapIfEmpty\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"showCurrent\";a:7:{s:4:\"name\";s:11:\"showCurrent\";s:4:\"desc\";s:25:\"pdotools_prop_showCurrent\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"showHome\";a:7:{s:4:\"name\";s:8:\"showHome\";s:4:\"desc\";s:22:\"pdotools_prop_showHome\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"showAtHome\";a:7:{s:4:\"name\";s:10:\"showAtHome\";s:4:\"desc\";s:24:\"pdotools_prop_showAtHome\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"hideSingle\";a:7:{s:4:\"name\";s:10:\"hideSingle\";s:4:\"desc\";s:24:\"pdotools_prop_hideSingle\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"direction\";a:7:{s:4:\"name\";s:9:\"direction\";s:4:\"desc\";s:23:\"pdotools_prop_direction\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:5:\"value\";s:3:\"ltr\";s:4:\"text\";s:19:\"Left To Right (ltr)\";}i:1;a:2:{s:5:\"value\";s:3:\"rtl\";s:4:\"text\";s:19:\"Right To Left (rtl)\";}}s:5:\"value\";s:3:\"ltr\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"scheme\";a:7:{s:4:\"name\";s:6:\"scheme\";s:4:\"desc\";s:20:\"pdotools_prop_scheme\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:6:{i:0;a:2:{s:5:\"value\";s:0:\"\";s:4:\"text\";s:14:\"System default\";}i:1;a:2:{s:5:\"value\";i:-1;s:4:\"text\";s:25:\"-1 (relative to site_url)\";}i:2;a:2:{s:5:\"value\";s:4:\"full\";s:4:\"text\";s:40:\"full (absolute, prepended with site_url)\";}i:3;a:2:{s:5:\"value\";s:3:\"abs\";s:4:\"text\";s:39:\"abs (absolute, prepended with base_url)\";}i:4;a:2:{s:5:\"value\";s:4:\"http\";s:4:\"text\";s:38:\"http (absolute, forced to http scheme)\";}i:5;a:2:{s:5:\"value\";s:5:\"https\";s:4:\"text\";s:40:\"https (absolute, forced to https scheme)\";}}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"useWeblinkUrl\";a:7:{s:4:\"name\";s:13:\"useWeblinkUrl\";s:4:\"desc\";s:27:\"pdotools_prop_useWeblinkUrl\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	'core/components/pdotools/elements/snippets/snippet.pdocrumbs.php'),
(19,	1,	0,	'pdoField',	'',	0,	4,	0,	'/** @var array $scriptProperties */\r\n/** @var modX $modx */\r\nif (!empty($input)) {\r\n    $id = $input;\r\n}\r\nif (!isset($default)) {\r\n    $default = \'\';\r\n}\r\nif (!isset($output)) {\r\n    $output = \'\';\r\n}\r\n$class = $modx->getOption(\'class\', $scriptProperties, \'modResource\', true);\r\n$isResource = $class == \'modResource\' || in_array($class, $modx->getDescendants(\'modResource\'));\r\n\r\nif (empty($field)) {\r\n    $field = \'pagetitle\';\r\n}\r\n$top = isset($top) ? (int)$top : 0;\r\n$topLevel = isset($topLevel) ? (int)$topLevel : 0;\r\nif (!empty($options)) {\r\n    $options = trim($options);\r\n    if ($options[0] == \'{\') {\r\n        $tmp = json_decode($options, true);\r\n        if (is_array($tmp)) {\r\n            extract($tmp);\r\n            $scriptProperties = array_merge($scriptProperties, $tmp);\r\n        }\r\n    } else {\r\n        $field = $options;\r\n    }\r\n}\r\nif (empty($id)) {\r\n    if (!empty($modx->resource)) {\r\n        $id = $modx->resource->id;\r\n    } else {\r\n        return \'You must specify an id of \' . $class;\r\n    }\r\n}\r\nif (!isset($context)) {\r\n    $context = \'\';\r\n}\r\n\r\n// Gets the parent from root of context, if specified\r\nif ($isResource && $id && ($top || $topLevel)) {\r\n    // Select needed context for parents functionality\r\n    if (empty($context)) {\r\n        $q = $modx->newQuery($class, $id);\r\n        $q->select(\'context_key\');\r\n        $tstart = microtime(true);\r\n        if ($q->prepare() && $q->stmt->execute()) {\r\n            $modx->queryTime += microtime(true) - $tstart;\r\n            $modx->executedQueries++;\r\n            $context = $q->stmt->fetch(PDO::FETCH_COLUMN);\r\n        }\r\n    }\r\n    // Original pdoField logic\r\n    if (empty($ultimate)) {\r\n        if ($topLevel) {\r\n            $pids = $modx->getChildIds(0, $topLevel, [\'context\' => $context]);\r\n            $pid = $id;\r\n            while (true) {\r\n                $tmp = $modx->getParentIds($pid, 1, [\'context\' => $context]);\r\n                if (!$pid = current($tmp)) {\r\n                    break;\r\n                } elseif (in_array($pid, $pids)) {\r\n                    $id = $pid;\r\n                    break;\r\n                }\r\n            }\r\n        } elseif ($top) {\r\n            $pid = $id;\r\n            for ($i = 1; $i <= $top; $i++) {\r\n                $tmp = $modx->getParentIds($pid, 1, [\'context\' => $context]);\r\n                if (!$pid = current($tmp)) {\r\n                    break;\r\n                }\r\n                $id = $pid;\r\n            }\r\n        }\r\n    }\r\n    // UltimateParent logic\r\n    // https://github.com/splittingred/UltimateParent/blob/develop/core/components/ultimateparent/snippet.ultimateparent.php\r\n    elseif ($id != $top) {\r\n        $pid = $id;\r\n        $pids = $modx->getParentIds($id, 10, [\'context\' => $context]);\r\n        if (!$topLevel || count($pids) >= $topLevel) {\r\n            while ($parentIds = $modx->getParentIds($id, 1, [\'context\' => $context])) {\r\n                $pid = array_pop($parentIds);\r\n                if ($pid == $top) {\r\n                    break;\r\n                }\r\n                $id = $pid;\r\n                $parentIds = $modx->getParentIds($id, 10, [\'context\' => $context]);\r\n                if ($topLevel && count($parentIds) < $topLevel) {\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n/** @var pdoFetch $pdoFetch */\r\n$fqn = $modx->getOption(\'pdoFetch.class\', null, \'pdotools.pdofetch\', true);\r\n$path = $modx->getOption(\'pdofetch_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\nif ($pdoClass = $modx->loadClass($fqn, $path, false, true)) {\r\n    $pdoFetch = new $pdoClass($modx, $scriptProperties);\r\n} else {\r\n    return false;\r\n}\r\n$pdoFetch->addTime(\'pdoTools loaded\');\r\n\r\n$where = [$class . \'.id\' => $id];\r\n// Add custom parameters\r\nforeach (array(\'where\') as $v) {\r\n    if (!empty($scriptProperties[$v])) {\r\n        $tmp = $scriptProperties[$v];\r\n        if (!is_array($tmp)) {\r\n            $tmp = json_decode($tmp, true);\r\n        }\r\n        if (is_array($tmp)) {\r\n            $$v = array_merge($$v, $tmp);\r\n        }\r\n    }\r\n    unset($scriptProperties[$v]);\r\n}\r\n$pdoFetch->addTime(\'Conditions prepared\');\r\n\r\n// Fields to select\r\n$resourceColumns = array_keys($modx->getFieldMeta($class));\r\n$field = strtolower($field);\r\nif (in_array($field, $resourceColumns)) {\r\n    $scriptProperties[\'select\'] = [$class => $field];\r\n    $scriptProperties[\'includeTVs\'] = \'\';\r\n} elseif ($isResource) {\r\n    $scriptProperties[\'select\'] = [$class => \'id\'];\r\n    $scriptProperties[\'includeTVs\'] = $field;\r\n}\r\n// Additional default field\r\nif (!empty($default)) {\r\n    $default = strtolower($default);\r\n    if (in_array($default, $resourceColumns)) {\r\n        $scriptProperties[\'select\'][$class] .= \',\' . $default;\r\n    } elseif ($isResource) {\r\n        $scriptProperties[\'includeTVs\'] = empty($scriptProperties[\'includeTVs\'])\r\n            ? $default\r\n            : $scriptProperties[\'includeTVs\'] . \',\' . $default;\r\n    }\r\n}\r\n\r\n$scriptProperties[\'disableConditions\'] = true;\r\nif ($row = $pdoFetch->getObject($class, $where, $scriptProperties)) {\r\n    foreach ($row as $k => $v) {\r\n        if (strtolower($k) == $field && $v != \'\') {\r\n            $output = $v;\r\n            break;\r\n        }\r\n    }\r\n\r\n    if (empty($output) && !empty($default)) {\r\n        foreach ($row as $k => $v) {\r\n            if (strtolower($k) == $default && $v != \'\') {\r\n                $output = $v;\r\n                break;\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\nif (!empty($toPlaceholder)) {\r\n    $modx->setPlaceholder($toPlaceholder, $output);\r\n} else {\r\n    return $output;\r\n}',	0,	'a:12:{s:2:\"id\";a:7:{s:4:\"name\";s:2:\"id\";s:4:\"desc\";s:16:\"pdotools_prop_id\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"field\";a:7:{s:4:\"name\";s:5:\"field\";s:4:\"desc\";s:19:\"pdotools_prop_field\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:9:\"pagetitle\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"prepareTVs\";a:7:{s:4:\"name\";s:10:\"prepareTVs\";s:4:\"desc\";s:24:\"pdotools_prop_prepareTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"1\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"processTVs\";a:7:{s:4:\"name\";s:10:\"processTVs\";s:4:\"desc\";s:24:\"pdotools_prop_processTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"where\";a:7:{s:4:\"name\";s:5:\"where\";s:4:\"desc\";s:19:\"pdotools_prop_where\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"context\";a:7:{s:4:\"name\";s:7:\"context\";s:4:\"desc\";s:27:\"pdotools_prop_field_context\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:3:\"top\";a:7:{s:4:\"name\";s:3:\"top\";s:4:\"desc\";s:17:\"pdotools_prop_top\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"topLevel\";a:7:{s:4:\"name\";s:8:\"topLevel\";s:4:\"desc\";s:22:\"pdotools_prop_topLevel\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"default\";a:7:{s:4:\"name\";s:7:\"default\";s:4:\"desc\";s:27:\"pdotools_prop_field_default\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"output\";a:7:{s:4:\"name\";s:6:\"output\";s:4:\"desc\";s:26:\"pdotools_prop_field_output\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:27:\"pdotools_prop_toPlaceholder\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"ultimate\";a:7:{s:4:\"name\";s:8:\"ultimate\";s:4:\"desc\";s:22:\"pdotools_prop_ultimate\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	'core/components/pdotools/elements/snippets/snippet.pdofield.php'),
(20,	1,	0,	'pdoSitemap',	'',	0,	4,	0,	'/** @var array $scriptProperties */\r\n/** @var pdoFetch $pdoFetch */\r\n$fqn = $modx->getOption(\'pdoFetch.class\', null, \'pdotools.pdofetch\', true);\r\n$path = $modx->getOption(\'pdofetch_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\nif ($pdoClass = $modx->loadClass($fqn, $path, false, true)) {\r\n    $pdoFetch = new $pdoClass($modx, $scriptProperties);\r\n} else {\r\n    return false;\r\n}\r\n$pdoFetch->addTime(\'pdoTools loaded\');\r\n\r\n// Default variables\r\nif (empty($tpl)) {\r\n    $tpl = \"@INLINE \\n<url>\\n\\t<loc>[[+url]]</loc>\\n\\t<lastmod>[[+date]]</lastmod>\\n\\t<changefreq>[[+update]]</changefreq>\\n\\t<priority>[[+priority]]</priority>\\n</url>\";\r\n}\r\nif (empty($tplWrapper)) {\r\n    $tplWrapper = \"@INLINE <?xml version=\\\"1.0\\\" encoding=\\\"[[++modx_charset]]\\\"?>\\n<urlset xmlns=\\\"[[+schema]]\\\">\\n[[+output]]\\n</urlset>\";\r\n}\r\nif (empty($sitemapSchema)) {\r\n    $sitemapSchema = \'http://www.sitemaps.org/schemas/sitemap/0.9\';\r\n}\r\nif (empty($outputSeparator)) {\r\n    $outputSeparator = \"\\n\";\r\n}\r\nif (empty($cacheKey)) {\r\n    $scriptProperties[\'cacheKey\'] = \'sitemap/\' . substr(md5(json_encode($scriptProperties)), 0, 6);\r\n}\r\n\r\n// Convert parameters from GoogleSiteMap if exists\r\nif (!empty($itemTpl)) {\r\n    $tpl = $itemTpl;\r\n}\r\nif (!empty($containerTpl)) {\r\n    $tplWrapper = $containerTpl;\r\n}\r\nif (!empty($allowedtemplates)) {\r\n    $scriptProperties[\'templates\'] = $allowedtemplates;\r\n}\r\nif (!empty($maxDepth)) {\r\n    $scriptProperties[\'depth\'] = $maxDepth;\r\n}\r\nif (isset($hideDeleted)) {\r\n    $scriptProperties[\'showDeleted\'] = !$hideDeleted;\r\n}\r\nif (isset($published)) {\r\n    $scriptProperties[\'showUnpublished\'] = !$published;\r\n}\r\nif (isset($searchable)) {\r\n    $scriptProperties[\'showUnsearchable\'] = !$searchable;\r\n}\r\nif (!empty($googleSchema)) {\r\n    $sitemapSchema = $googleSchema;\r\n}\r\nif (!empty($excludeResources)) {\r\n    $tmp = array_map(\'trim\', explode(\',\', $excludeResources));\r\n    foreach ($tmp as $v) {\r\n        if (!empty($scriptProperties[\'resources\'])) {\r\n            $scriptProperties[\'resources\'] .= \',-\' . $v;\r\n        } else {\r\n            $scriptProperties[\'resources\'] = \'-\' . $v;\r\n        }\r\n    }\r\n}\r\nif (!empty($excludeChildrenOf)) {\r\n    $tmp = array_map(\'trim\', explode(\',\', $excludeChildrenOf));\r\n    foreach ($tmp as $v) {\r\n        if (!empty($scriptProperties[\'parents\'])) {\r\n            $scriptProperties[\'parents\'] .= \',-\' . $v;\r\n        } else {\r\n            $scriptProperties[\'parents\'] = \'-\' . $v;\r\n        }\r\n    }\r\n}\r\nif (!empty($startId)) {\r\n    if (!empty($scriptProperties[\'parents\'])) {\r\n        $scriptProperties[\'parents\'] .= \',\' . $startId;\r\n    } else {\r\n        $scriptProperties[\'parents\'] = $startId;\r\n    }\r\n}\r\nif (!empty($sortBy)) {\r\n    $scriptProperties[\'sortby\'] = $sortBy;\r\n}\r\nif (!empty($sortDir)) {\r\n    $scriptProperties[\'sortdir\'] = $sortDir;\r\n}\r\nif (!empty($priorityTV)) {\r\n    if (!empty($scriptProperties[\'includeTVs\'])) {\r\n        $scriptProperties[\'includeTVs\'] .= \',\' . $priorityTV;\r\n    } else {\r\n        $scriptProperties[\'includeTVs\'] = $priorityTV;\r\n    }\r\n}\r\nif (!empty($itemSeparator)) {\r\n    $outputSeparator = $itemSeparator;\r\n}\r\n//---\r\n\r\n\r\n$class = \'modResource\';\r\n$where = [];\r\nif (empty($showHidden)) {\r\n    $where[] = [\r\n        $class . \'.hidemenu\' => 0,\r\n        \'OR:\' . $class . \'.class_key:IN\' => [\'Ticket\', \'Article\'],\r\n    ];\r\n}\r\nif (empty($context)) {\r\n    $scriptProperties[\'context\'] = $modx->context->key;\r\n}\r\n\r\n$select = [$class => \'id,editedon,createdon,context_key,class_key,uri\'];\r\nif (!empty($useWeblinkUrl)) {\r\n    $select[$class] .= \',content\';\r\n}\r\n// Add custom parameters\r\nforeach ([\'where\', \'select\'] as $v) {\r\n    if (!empty($scriptProperties[$v])) {\r\n        $tmp = $scriptProperties[$v];\r\n        if (!is_array($tmp)) {\r\n            $tmp = json_decode($tmp, true);\r\n        }\r\n        if (is_array($tmp)) {\r\n            $$v = array_merge($$v, $tmp);\r\n        }\r\n    }\r\n    unset($scriptProperties[$v]);\r\n}\r\n$pdoFetch->addTime(\'Conditions prepared\');\r\n\r\n// Default parameters\r\n$default = [\r\n    \'class\' => $class,\r\n    \'where\' => json_encode($where),\r\n    \'select\' => json_encode($select),\r\n    \'sortby\' => \"{$class}.parent ASC, {$class}.menuindex\",\r\n    \'sortdir\' => \'ASC\',\r\n    \'return\' => \'data\',\r\n    \'scheme\' => \'full\',\r\n    \'limit\' => 0,\r\n];\r\n// Merge all properties and run!\r\n$pdoFetch->addTime(\'Query parameters ready\');\r\n$pdoFetch->setConfig(array_merge($default, $scriptProperties), false);\r\n\r\nif (!empty($cache)) {\r\n    $data = $pdoFetch->getCache($scriptProperties);\r\n}\r\nif (!isset($return)) {\r\n    $return = \'chunks\';\r\n}\r\nif (empty($data)) {\r\n    $now = time();\r\n    $data = $urls = [];\r\n    $rows = $pdoFetch->run();\r\n    foreach ($rows as $row) {\r\n        if (!empty($useWeblinkUrl) && $row[\'class_key\'] == \'modWebLink\') {\r\n            $row[\'url\'] = is_numeric(trim($row[\'content\'], \'[]~ \'))\r\n                ? $pdoFetch->makeUrl((int)trim($row[\'content\'], \'[]~ \'), $row)\r\n                : $row[\'content\'];\r\n        } else {\r\n            $row[\'url\'] = $pdoFetch->makeUrl($row[\'id\'], $row);\r\n        }\r\n        unset($row[\'content\']);\r\n        $time = !empty($row[\'editedon\'])\r\n            ? $row[\'editedon\']\r\n            : $row[\'createdon\'];\r\n        $row[\'date\'] = date(\'c\', $time);\r\n\r\n        $datediff = floor(($now - $time) / 86400);\r\n        if ($datediff <= 1) {\r\n            $row[\'priority\'] = \'1.0\';\r\n            $row[\'update\'] = \'daily\';\r\n        } elseif (($datediff > 1) && ($datediff <= 7)) {\r\n            $row[\'priority\'] = \'0.75\';\r\n            $row[\'update\'] = \'weekly\';\r\n        } elseif (($datediff > 7) && ($datediff <= 30)) {\r\n            $row[\'priority\'] = \'0.50\';\r\n            $row[\'update\'] = \'weekly\';\r\n        } else {\r\n            $row[\'priority\'] = \'0.25\';\r\n            $row[\'update\'] = \'monthly\';\r\n        }\r\n        if (!empty($priorityTV) && !empty($row[$priorityTV])) {\r\n            $row[\'priority\'] = $row[$priorityTV];\r\n        }\r\n\r\n        // Fix possible duplicates made by modWebLink\r\n        if (!empty($urls[$row[\'url\']])) {\r\n            if ($urls[$row[\'url\']] > $row[\'date\']) {\r\n                continue;\r\n            }\r\n        }\r\n        $urls[$row[\'url\']] = $row[\'date\'];\r\n\r\n        // Add item to output\r\n        if ($return === \'data\') {\r\n            $data[$row[\'url\']] = $row;\r\n        } else {\r\n            $data[$row[\'url\']] = $pdoFetch->parseChunk($tpl, $row);\r\n            if (strpos($data[$row[\'url\']], \'[[\') !== false) {\r\n                $modx->parser->processElementTags(\'\', $data[$row[\'url\']], true, true, \'[[\', \']]\', array(), 10);\r\n            }\r\n        }\r\n    }\r\n    $pdoFetch->addTime(\'Rows processed\');\r\n    if (!empty($cache)) {\r\n        $pdoFetch->setCache($data, $scriptProperties);\r\n    }\r\n}\r\n\r\nif ($return === \'data\') {\r\n    $output = $data;\r\n} else {\r\n    $output = implode($outputSeparator, $data);\r\n    $output = $pdoFetch->getChunk($tplWrapper, [\r\n        \'schema\' => $sitemapSchema,\r\n        \'output\' => $output,\r\n        \'items\' => $output,\r\n    ]);\r\n    $pdoFetch->addTime(\'Rows wrapped\');\r\n\r\n    if ($modx->user->hasSessionContext(\'mgr\') && !empty($showLog)) {\r\n        $output .= \'<pre class=\"pdoSitemapLog\">\' . print_r($pdoFetch->getTime(), 1) . \'</pre>\';\r\n    }\r\n}\r\nif (!empty($forceXML)) {\r\n    header(\"Content-Type:text/xml\");\r\n    @session_write_close();\r\n    exit($output);\r\n} else {\r\n    return $output;\r\n}',	0,	'a:24:{s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:17:\"pdotools_prop_tpl\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:145:\"@INLINE <url>\n	<loc>[[+url]]</loc>\n	<lastmod>[[+date]]</lastmod>\n	<changefreq>[[+update]]</changefreq>\n	<priority>[[+priority]]</priority>\n</url>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"tplWrapper\";a:7:{s:4:\"name\";s:10:\"tplWrapper\";s:4:\"desc\";s:24:\"pdotools_prop_tplWrapper\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:110:\"@INLINE <?xml version=\"1.0\" encoding=\"[[++modx_charset]]\"?>\n<urlset xmlns=\"[[+schema]]\">\n[[+output]]\n</urlset>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"templates\";a:7:{s:4:\"name\";s:9:\"templates\";s:4:\"desc\";s:23:\"pdotools_prop_templates\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"context\";a:7:{s:4:\"name\";s:7:\"context\";s:4:\"desc\";s:21:\"pdotools_prop_context\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"depth\";a:7:{s:4:\"name\";s:5:\"depth\";s:4:\"desc\";s:19:\"pdotools_prop_depth\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:10;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"showDeleted\";a:7:{s:4:\"name\";s:11:\"showDeleted\";s:4:\"desc\";s:25:\"pdotools_prop_showDeleted\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"showHidden\";a:7:{s:4:\"name\";s:10:\"showHidden\";s:4:\"desc\";s:24:\"pdotools_prop_showHidden\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"sitemapSchema\";a:7:{s:4:\"name\";s:13:\"sitemapSchema\";s:4:\"desc\";s:27:\"pdotools_prop_sitemapSchema\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:43:\"http://www.sitemaps.org/schemas/sitemap/0.9\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"showUnpublished\";a:7:{s:4:\"name\";s:15:\"showUnpublished\";s:4:\"desc\";s:29:\"pdotools_prop_showUnpublished\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:16:\"hideUnsearchable\";a:7:{s:4:\"name\";s:16:\"hideUnsearchable\";s:4:\"desc\";s:30:\"pdotools_prop_hideUnsearchable\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"resources\";a:7:{s:4:\"name\";s:9:\"resources\";s:4:\"desc\";s:23:\"pdotools_prop_resources\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"parents\";a:7:{s:4:\"name\";s:7:\"parents\";s:4:\"desc\";s:21:\"pdotools_prop_parents\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"sortby\";a:7:{s:4:\"name\";s:6:\"sortby\";s:4:\"desc\";s:20:\"pdotools_prop_sortby\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:9:\"menuindex\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"sortdir\";a:7:{s:4:\"name\";s:7:\"sortdir\";s:4:\"desc\";s:21:\"pdotools_prop_sortdir\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:3:\"asc\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"where\";a:7:{s:4:\"name\";s:5:\"where\";s:4:\"desc\";s:19:\"pdotools_prop_where\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"includeTVs\";a:7:{s:4:\"name\";s:10:\"includeTVs\";s:4:\"desc\";s:24:\"pdotools_prop_includeTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"prepareTVs\";a:7:{s:4:\"name\";s:10:\"prepareTVs\";s:4:\"desc\";s:24:\"pdotools_prop_prepareTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"1\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"processTVs\";a:7:{s:4:\"name\";s:10:\"processTVs\";s:4:\"desc\";s:24:\"pdotools_prop_processTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"outputSeparator\";a:7:{s:4:\"name\";s:15:\"outputSeparator\";s:4:\"desc\";s:29:\"pdotools_prop_outputSeparator\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"\n\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"forceXML\";a:7:{s:4:\"name\";s:8:\"forceXML\";s:4:\"desc\";s:22:\"pdotools_prop_forceXML\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"useWeblinkUrl\";a:7:{s:4:\"name\";s:13:\"useWeblinkUrl\";s:4:\"desc\";s:27:\"pdotools_prop_useWeblinkUrl\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"cache\";a:7:{s:4:\"name\";s:5:\"cache\";s:4:\"desc\";s:19:\"pdotools_prop_cache\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"cacheKey\";a:7:{s:4:\"name\";s:8:\"cacheKey\";s:4:\"desc\";s:22:\"pdotools_prop_cacheKey\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"cacheTime\";a:7:{s:4:\"name\";s:9:\"cacheTime\";s:4:\"desc\";s:23:\"pdotools_prop_cacheTime\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:600;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	'core/components/pdotools/elements/snippets/snippet.pdositemap.php'),
(21,	1,	0,	'pdoNeighbors',	'',	0,	4,	0,	'/** @var array $scriptProperties */\r\n/** @var pdoFetch $pdoFetch */\r\n/** @var modX $modx */\r\n$fqn = $modx->getOption(\'pdoFetch.class\', null, \'pdotools.pdofetch\', true);\r\n$path = $modx->getOption(\'pdofetch_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\nif ($pdoClass = $modx->loadClass($fqn, $path, false, true)) {\r\n    $pdoFetch = new $pdoClass($modx, $scriptProperties);\r\n} else {\r\n    return false;\r\n}\r\n$pdoFetch->addTime(\'pdoTools loaded\');\r\n\r\nif (empty($id)) {\r\n    $id = $modx->resource->id;\r\n}\r\nif (empty($limit)) {\r\n    $limit = 1;\r\n}\r\nif (!isset($outputSeparator)) {\r\n    $outputSeparator = \"\\n\";\r\n}\r\n$fastMode = !empty($fastMode);\r\n\r\n$class = \'modResource\';\r\n$resource = ($id == $modx->resource->id)\r\n    ? $modx->resource\r\n    : $modx->getObject($class, $id);\r\nif (!$resource) {\r\n    return \'\';\r\n}\r\n\r\n// We need to determine ids of neighbors\r\n$params = $scriptProperties;\r\n$params[\'select\'] = \'id\';\r\n$params[\'limit\'] = 0;\r\nif (!empty($parents) && is_string($parents)) {\r\n    $parents = array_map(\'trim\', explode(\',\', $parents));\r\n    if (!in_array($resource->parent, $parents)) {\r\n        $parents[] = $resource->parent;\r\n    }\r\n    $key = array_search($resource->parent * -1, $parents);\r\n    if ($key !== false) {\r\n        unset($parents[$key]);\r\n    }\r\n    $params[\'parents\'] = implode(\',\', $parents);\r\n    $ids = $pdoFetch->getCollection(\'modResource\', [], $params);\r\n    unset($scriptProperties[\'parents\']);\r\n} else {\r\n    $ids = $pdoFetch->getCollection(\'modResource\', [\'parent\' => $resource->parent], $params);\r\n}\r\n\r\n$found = false;\r\n$prev = $next = [];\r\nforeach ($ids as $v) {\r\n    if ($v[\'id\'] == $id) {\r\n        $found = true;\r\n        continue;\r\n    } elseif (!$found) {\r\n        $prev[] = $v[\'id\'];\r\n    } else {\r\n        $next[] = $v[\'id\'];\r\n        if (count($next) >= $limit) {\r\n            break;\r\n        }\r\n    }\r\n}\r\n$prev = array_splice($prev, $limit * -1);\r\nif (!empty($loop)) {\r\n    if (!count($prev)) {\r\n        $v = end($ids);\r\n        $prev[] = $v[\'id\'];\r\n    } else {\r\n        if (!count($next)) {\r\n            $v = reset($ids);\r\n            $next[] = $v[\'id\'];\r\n        }\r\n    }\r\n}\r\n$ids = array_merge($prev, $next, [$resource->parent]);\r\n$pdoFetch->addTime(\'Found ids of neighbors: \' . implode(\',\', $ids));\r\n\r\n// Query conditions\r\n$where = [$class . \'.id:IN\' => $ids];\r\n\r\n// Fields to select\r\n$resourceColumns = array_keys($modx->getFieldMeta($class));\r\nif (empty($includeContent) && empty($useWeblinkUrl)) {\r\n    $key = array_search(\'content\', $resourceColumns);\r\n    unset($resourceColumns[$key]);\r\n}\r\n$select = [$class => implode(\',\', $resourceColumns)];\r\n\r\n// Add custom parameters\r\nforeach ([\'where\', \'select\'] as $v) {\r\n    if (!empty($scriptProperties[$v])) {\r\n        $tmp = $scriptProperties[$v];\r\n        if (!is_array($tmp)) {\r\n            $tmp = json_decode($tmp, true);\r\n        }\r\n        if (is_array($tmp)) {\r\n            $$v = array_merge($$v, $tmp);\r\n        }\r\n    }\r\n    unset($scriptProperties[$v]);\r\n}\r\n$pdoFetch->addTime(\'Conditions prepared\');\r\n\r\n// Default parameters\r\n$default = [\r\n    \'class\' => $class,\r\n    \'where\' => json_encode($where),\r\n    \'select\' => json_encode($select),\r\n    //\'groupby\' => $class.\'.id\',\r\n    \'sortby\' => $class . \'.menuindex\',\r\n    \'sortdir\' => \'ASC\',\r\n    \'return\' => \'data\',\r\n    \'limit\' => 0,\r\n    \'totalVar\' => \'pdoneighbors.total\',\r\n];\r\n\r\n// Merge all properties and run!\r\nunset($scriptProperties[\'limit\']);\r\n$pdoFetch->addTime(\'Query parameters ready\');\r\n$pdoFetch->setConfig(array_merge($default, $scriptProperties), false);\r\n\r\n$rows = $pdoFetch->run();\r\n$prev = array_flip($prev);\r\n$next = array_flip($next);\r\n\r\nif (!isset($return)) {\r\n    $return = \'chunks\';\r\n}\r\n$output = [\'prev\' => [], \'up\' => [], \'next\' => []];\r\nforeach ($rows as $row) {\r\n    if (empty($row[\'menutitle\'])) {\r\n        $row[\'menutitle\'] = $row[\'pagetitle\'];\r\n    }\r\n    if (!empty($useWeblinkUrl) && $row[\'class_key\'] == \'modWebLink\') {\r\n        $row[\'link\'] = is_numeric(trim($row[\'content\'], \'[]~ \'))\r\n            ? $pdoFetch->makeUrl((int)trim($row[\'content\'], \'[]~ \'), $row)\r\n            : $row[\'content\'];\r\n    } else {\r\n        $row[\'link\'] = $pdoFetch->makeUrl($row[\'id\'], $row);\r\n    }\r\n\r\n    if (isset($prev[$row[\'id\']])) {\r\n        if ($return === \'data\') {\r\n            $output[\'prev\'][] = $row;\r\n        } else {\r\n            $output[\'prev\'][] = !empty($tplPrev)\r\n                ? $pdoFetch->getChunk($tplPrev, $row, $fastMode)\r\n                : $pdoFetch->getChunk(\'\', $row);\r\n        }\r\n    } elseif (isset($next[$row[\'id\']])) {\r\n        if ($return === \'data\') {\r\n            $output[\'next\'][] = $row;\r\n        } else {\r\n            $output[\'next\'][] = !empty($tplNext)\r\n                ? $pdoFetch->getChunk($tplNext, $row, $fastMode)\r\n                : $pdoFetch->getChunk(\'\', $row);\r\n        }\r\n    } else {\r\n        if ($return === \'data\') {\r\n            $output[\'up\'][] = $row;\r\n        } else {\r\n            $output[\'up\'][] = !empty($tplUp)\r\n                ? $pdoFetch->getChunk($tplUp, $row, $fastMode)\r\n                : $pdoFetch->getChunk(\'\', $row);\r\n        }\r\n    }\r\n}\r\n$pdoFetch->addTime(\'Chunks processed\');\r\n\r\n$log = \'\';\r\nif ($modx->user->hasSessionContext(\'mgr\') && !empty($showLog)) {\r\n    $log .= \'<pre class=\"pdoNeighborsLog\">\' . print_r($pdoFetch->getTime(), 1) . \'</pre>\';\r\n}\r\n\r\nforeach ($output as &$row) {\r\n    $row = implode($outputSeparator, $row);\r\n}\r\n\r\nif (!empty($toSeparatePlaceholders)) {\r\n    $output[\'log\'] = $log;\r\n    $modx->setPlaceholders($output, $toSeparatePlaceholders);\r\n} else {\r\n    if (!empty($rows) || !empty($wrapIfEmpty)) {\r\n        $output = !empty($tplWrapper)\r\n            ? $pdoFetch->getChunk($tplWrapper, $output, $fastMode)\r\n            : $pdoFetch->getChunk(\'\', $output);\r\n    } else {\r\n        $output = \'\';\r\n    }\r\n    $output .= $log;\r\n\r\n    if (!empty($toPlaceholder)) {\r\n        $modx->setPlaceholder($toPlaceholder, $output);\r\n    } else {\r\n        return $output;\r\n    }\r\n}',	0,	'a:27:{s:2:\"id\";a:7:{s:4:\"name\";s:2:\"id\";s:4:\"desc\";s:16:\"pdotools_prop_id\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:29:\"pdotools_prop_neighbors_limit\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"sortby\";a:7:{s:4:\"name\";s:6:\"sortby\";s:4:\"desc\";s:20:\"pdotools_prop_sortby\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:9:\"menuindex\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"sortdir\";a:7:{s:4:\"name\";s:7:\"sortdir\";s:4:\"desc\";s:21:\"pdotools_prop_sortdir\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:3:\"asc\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"depth\";a:7:{s:4:\"name\";s:5:\"depth\";s:4:\"desc\";s:19:\"pdotools_prop_depth\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"tplPrev\";a:7:{s:4:\"name\";s:7:\"tplPrev\";s:4:\"desc\";s:21:\"pdotools_prop_tplPrev\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:106:\"@INLINE <span class=\"link-prev\"><a href=\"[[+link]]\" class=\"btn btn-light\">&larr; [[+menutitle]]</a></span>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"tplUp\";a:7:{s:4:\"name\";s:5:\"tplUp\";s:4:\"desc\";s:19:\"pdotools_prop_tplUp\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:104:\"@INLINE <span class=\"link-up\"><a href=\"[[+link]]\" class=\"btn btn-light\">&uarr; [[+menutitle]]</a></span>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"tplNext\";a:7:{s:4:\"name\";s:7:\"tplNext\";s:4:\"desc\";s:21:\"pdotools_prop_tplNext\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:106:\"@INLINE <span class=\"link-next\"><a href=\"[[+link]]\" class=\"btn btn-light\">[[+menutitle]] &rarr;</a></span>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"tplWrapper\";a:7:{s:4:\"name\";s:10:\"tplWrapper\";s:4:\"desc\";s:34:\"pdotools_prop_neighbors_tplWrapper\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:93:\"@INLINE <div class=\"neighbors d-flex justify-content-between\">[[+prev]][[+up]][[+next]]</div>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"wrapIfEmpty\";a:7:{s:4:\"name\";s:11:\"wrapIfEmpty\";s:4:\"desc\";s:25:\"pdotools_prop_wrapIfEmpty\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"showUnpublished\";a:7:{s:4:\"name\";s:15:\"showUnpublished\";s:4:\"desc\";s:29:\"pdotools_prop_showUnpublished\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"showDeleted\";a:7:{s:4:\"name\";s:11:\"showDeleted\";s:4:\"desc\";s:25:\"pdotools_prop_showDeleted\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"showHidden\";a:7:{s:4:\"name\";s:10:\"showHidden\";s:4:\"desc\";s:24:\"pdotools_prop_showHidden\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:14:\"hideContainers\";a:7:{s:4:\"name\";s:14:\"hideContainers\";s:4:\"desc\";s:28:\"pdotools_prop_hideContainers\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:22:\"toSeparatePlaceholders\";a:7:{s:4:\"name\";s:22:\"toSeparatePlaceholders\";s:4:\"desc\";s:36:\"pdotools_prop_toSeparatePlaceholders\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:27:\"pdotools_prop_toPlaceholder\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"parents\";a:7:{s:4:\"name\";s:7:\"parents\";s:4:\"desc\";s:21:\"pdotools_prop_parents\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"outputSeparator\";a:7:{s:4:\"name\";s:15:\"outputSeparator\";s:4:\"desc\";s:29:\"pdotools_prop_outputSeparator\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"\n\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"showLog\";a:7:{s:4:\"name\";s:7:\"showLog\";s:4:\"desc\";s:21:\"pdotools_prop_showLog\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"fastMode\";a:7:{s:4:\"name\";s:8:\"fastMode\";s:4:\"desc\";s:22:\"pdotools_prop_fastMode\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"includeTVs\";a:7:{s:4:\"name\";s:10:\"includeTVs\";s:4:\"desc\";s:24:\"pdotools_prop_includeTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"prepareTVs\";a:7:{s:4:\"name\";s:10:\"prepareTVs\";s:4:\"desc\";s:24:\"pdotools_prop_prepareTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"1\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"processTVs\";a:7:{s:4:\"name\";s:10:\"processTVs\";s:4:\"desc\";s:24:\"pdotools_prop_processTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"tvPrefix\";a:7:{s:4:\"name\";s:8:\"tvPrefix\";s:4:\"desc\";s:22:\"pdotools_prop_tvPrefix\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:3:\"tv.\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"scheme\";a:7:{s:4:\"name\";s:6:\"scheme\";s:4:\"desc\";s:20:\"pdotools_prop_scheme\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:6:{i:0;a:2:{s:5:\"value\";s:0:\"\";s:4:\"text\";s:14:\"System default\";}i:1;a:2:{s:5:\"value\";i:-1;s:4:\"text\";s:25:\"-1 (relative to site_url)\";}i:2;a:2:{s:5:\"value\";s:4:\"full\";s:4:\"text\";s:40:\"full (absolute, prepended with site_url)\";}i:3;a:2:{s:5:\"value\";s:3:\"abs\";s:4:\"text\";s:39:\"abs (absolute, prepended with base_url)\";}i:4;a:2:{s:5:\"value\";s:4:\"http\";s:4:\"text\";s:38:\"http (absolute, forced to http scheme)\";}i:5;a:2:{s:5:\"value\";s:5:\"https\";s:4:\"text\";s:40:\"https (absolute, forced to https scheme)\";}}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"useWeblinkUrl\";a:7:{s:4:\"name\";s:13:\"useWeblinkUrl\";s:4:\"desc\";s:27:\"pdotools_prop_useWeblinkUrl\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:4:\"loop\";a:7:{s:4:\"name\";s:4:\"loop\";s:4:\"desc\";s:18:\"pdotools_prop_loop\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	'core/components/pdotools/elements/snippets/snippet.pdoneighbors.php'),
(22,	1,	0,	'pdoPage',	'',	0,	4,	0,	'/** @var array $scriptProperties */\r\n/** @var modX $modx */\r\n// Default variables\r\nif (empty($pageVarKey)) {\r\n    $pageVarKey = \'page\';\r\n}\r\nif (empty($pageNavVar)) {\r\n    $pageNavVar = \'page.nav\';\r\n}\r\nif (empty($pageCountVar)) {\r\n    $pageCountVar = \'pageCount\';\r\n}\r\nif (empty($totalVar)) {\r\n    $totalVar = \'total\';\r\n}\r\nif (empty($page)) {\r\n    $page = 1;\r\n}\r\nif (empty($pageLimit)) {\r\n    $pageLimit = 5;\r\n} else {\r\n    $pageLimit = (integer)$pageLimit;\r\n}\r\nif (!isset($plPrefix)) {\r\n    $plPrefix = \'\';\r\n}\r\nif (!empty($scriptProperties[\'ajaxMode\'])) {\r\n    $scriptProperties[\'ajax\'] = 1;\r\n}\r\n\r\n// Convert parameters from getPage if exists\r\nif (!empty($namespace)) {\r\n    $plPrefix = $namespace;\r\n}\r\nif (!empty($pageNavTpl)) {\r\n    $scriptProperties[\'tplPage\'] = $pageNavTpl;\r\n}\r\nif (!empty($pageNavOuterTpl)) {\r\n    $scriptProperties[\'tplPageWrapper\'] = $pageNavOuterTpl;\r\n}\r\nif (!empty($pageActiveTpl)) {\r\n    $scriptProperties[\'tplPageActive\'] = $pageActiveTpl;\r\n}\r\nif (!empty($pageFirstTpl)) {\r\n    $scriptProperties[\'tplPageFirst\'] = $pageFirstTpl;\r\n}\r\nif (!empty($pagePrevTpl)) {\r\n    $scriptProperties[\'tplPagePrev\'] = $pagePrevTpl;\r\n}\r\nif (!empty($pageNextTpl)) {\r\n    $scriptProperties[\'tplPageNext\'] = $pageNextTpl;\r\n}\r\nif (!empty($pageLastTpl)) {\r\n    $scriptProperties[\'tplPageLast\'] = $pageLastTpl;\r\n}\r\nif (!empty($pageSkipTpl)) {\r\n    $scriptProperties[\'tplPageSkip\'] = $pageSkipTpl;\r\n}\r\nif (!empty($pageNavScheme)) {\r\n    $scriptProperties[\'scheme\'] = $pageNavScheme;\r\n}\r\nif (!empty($cache_expires)) {\r\n    $scriptProperties[\'cacheTime\'] = $cache_expires;\r\n}\r\n//---\r\n$strictMode = !empty($strictMode);\r\n\r\n$isAjax = !empty($scriptProperties[\'ajax\']) && !empty($_SERVER[\'HTTP_X_REQUESTED_WITH\']) && $_SERVER[\'HTTP_X_REQUESTED_WITH\'] == \'XMLHttpRequest\';\r\nif ($isAjax && !isset($_REQUEST[$pageVarKey])) {\r\n    return;\r\n}\r\n\r\n/** @var pdoPage $pdoPage */\r\n$fqn = $modx->getOption(\'pdoPage.class\', null, \'pdotools.pdopage\', true);\r\n$path = $modx->getOption(\'pdopage_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\nif ($pdoClass = $modx->loadClass($fqn, $path, false, true)) {\r\n    $pdoPage = new $pdoClass($modx, $scriptProperties);\r\n} else {\r\n    return false;\r\n}\r\n$pdoPage->pdoTools->addTime(\'pdoTools loaded\');\r\n\r\n// Script and styles\r\nif (!$isAjax && !empty($scriptProperties[\'ajaxMode\'])) {\r\n    $pdoPage->loadJsCss();\r\n}\r\n// Removing of default scripts and styles so they do not overwrote nested snippet parameters\r\nif ($snippet = $modx->getObject(\'modSnippet\', [\'name\' => \'pdoPage\'])) {\r\n    $properties = $snippet->get(\'properties\');\r\n    if ($scriptProperties[\'frontend_js\'] == $properties[\'frontend_js\'][\'value\']) {\r\n        unset($scriptProperties[\'frontend_js\']);\r\n    }\r\n    if ($scriptProperties[\'frontend_css\'] == $properties[\'frontend_css\'][\'value\']) {\r\n        unset($scriptProperties[\'frontend_css\']);\r\n    }\r\n}\r\n\r\n// Page\r\nif (isset($_REQUEST[$pageVarKey]) && $strictMode && (!is_numeric($_REQUEST[$pageVarKey]) || ($_REQUEST[$pageVarKey] <= 1 && !$isAjax))) {\r\n    return $pdoPage->redirectToFirst($isAjax);\r\n} elseif (!empty($_REQUEST[$pageVarKey])) {\r\n    $page = (integer)$_REQUEST[$pageVarKey];\r\n}\r\n$scriptProperties[\'page\'] = $page;\r\n$scriptProperties[\'request\'] = $_REQUEST;\r\n$scriptProperties[\'setTotal\'] = true;\r\n\r\n// Limit\r\nif (isset($_REQUEST[\'limit\'])) {\r\n    if (is_numeric($_REQUEST[\'limit\']) && abs($_REQUEST[\'limit\']) > 0) {\r\n        $scriptProperties[\'limit\'] = abs($_REQUEST[\'limit\']);\r\n    } elseif ($strictMode) {\r\n        unset($_GET[\'limit\']);\r\n\r\n        return $pdoPage->redirectToFirst($isAjax);\r\n    }\r\n}\r\nif (!empty($maxLimit) && !empty($scriptProperties[\'limit\']) && $scriptProperties[\'limit\'] > $maxLimit) {\r\n    $scriptProperties[\'limit\'] = $maxLimit;\r\n}\r\n\r\n// Offset\r\n$offset = !empty($scriptProperties[\'offset\']) && $scriptProperties[\'offset\'] > 0\r\n    ? (int)$scriptProperties[\'offset\']\r\n    : 0;\r\n$scriptProperties[\'offset\'] = $page > 1\r\n    ? $scriptProperties[\'limit\'] * ($page - 1) + $offset\r\n    : $offset;\r\nif (!empty($scriptProperties[\'offset\']) && empty($scriptProperties[\'limit\'])) {\r\n    $scriptProperties[\'limit\'] = 10000000;\r\n}\r\n\r\n$cache = !empty($cache) || (!$modx->user->id && !empty($cacheAnonymous));\r\n$url = $pdoPage->getBaseUrl();\r\n$output = $pagination = $total = $pageCount = \'\';\r\n\r\n$data = $cache\r\n    ? $pdoPage->pdoTools->getCache($scriptProperties)\r\n    : [];\r\n\r\nif (empty($data)) {\r\n    $output = $pdoPage->pdoTools->runSnippet($scriptProperties[\'element\'], $scriptProperties);\r\n    if ($output === false) {\r\n        return \'\';\r\n    } elseif (!empty($toPlaceholder)) {\r\n        $output = $modx->getPlaceholder($toPlaceholder);\r\n    }\r\n\r\n    // Pagination\r\n    $total = (int)$modx->getPlaceholder($totalVar);\r\n    $pageCount = !empty($scriptProperties[\'limit\']) && $total > $offset\r\n        ? ceil(($total - $offset) / $scriptProperties[\'limit\'])\r\n        : 0;\r\n\r\n    // Redirect to start if somebody specified incorrect page\r\n    if ($page > 1 && $page > $pageCount && $strictMode) {\r\n        return $pdoPage->redirectToFirst($isAjax);\r\n    }\r\n    if (!empty($pageCount) && $pageCount > 1) {\r\n        $pagination = [\r\n            \'first\' => $page > 1 && !empty($tplPageFirst)\r\n                ? $pdoPage->makePageLink($url, 1, $tplPageFirst)\r\n                : \'\',\r\n            \'prev\' => $page > 1 && !empty($tplPagePrev)\r\n                ? $pdoPage->makePageLink($url, $page - 1, $tplPagePrev)\r\n                : \'\',\r\n            \'pages\' => $pageLimit >= 7 && empty($disableModernPagination)\r\n                ? $pdoPage->buildModernPagination($page, $pageCount, $url)\r\n                : $pdoPage->buildClassicPagination($page, $pageCount, $url),\r\n            \'next\' => $page < $pageCount && !empty($tplPageNext)\r\n                ? $pdoPage->makePageLink($url, $page + 1, $tplPageNext)\r\n                : \'\',\r\n            \'last\' => $page < $pageCount && !empty($tplPageLast)\r\n                ? $pdoPage->makePageLink($url, $pageCount, $tplPageLast)\r\n                : \'\',\r\n        ];\r\n\r\n        if (!empty($pageCount)) {\r\n            foreach ([\'first\', \'prev\', \'next\', \'last\'] as $v) {\r\n                $tpl = \'tplPage\' . ucfirst($v) . \'Empty\';\r\n                if (!empty(${$tpl}) && empty($pagination[$v])) {\r\n                    $pagination[$v] = $pdoPage->pdoTools->getChunk(${$tpl});\r\n                }\r\n            }\r\n        }\r\n    } else {\r\n        $pagination = [\r\n            \'first\' => \'\',\r\n            \'prev\' => \'\',\r\n            \'pages\' => \'\',\r\n            \'next\' => \'\',\r\n            \'last\' => \'\'\r\n        ];\r\n    }\r\n\r\n    $data = [\r\n        \'output\' => $output,\r\n        $pageVarKey => $page,\r\n        $pageCountVar => $pageCount,\r\n        $pageNavVar => !empty($tplPageWrapper)\r\n            ? $pdoPage->pdoTools->getChunk($tplPageWrapper, $pagination)\r\n            : $pdoPage->pdoTools->parseChunk(\'\', $pagination),\r\n        $totalVar => $total,\r\n    ];\r\n    if ($cache) {\r\n        $pdoPage->pdoTools->setCache($data, $scriptProperties);\r\n    }\r\n}\r\n\r\nif ($modx->user->hasSessionContext(\'mgr\') && !empty($showLog)) {\r\n    $data[\'output\'] .= \'<pre class=\"pdoPageLog\">\' . print_r($pdoPage->pdoTools->getTime(), 1) . \'</pre>\';\r\n}\r\n\r\nif ($isAjax) {\r\n    if ($pageNavVar != \'pagination\') {\r\n        $data[\'pagination\'] = $data[$pageNavVar];\r\n        unset($data[$pageNavVar]);\r\n    }\r\n    if ($pageCountVar != \'pages\') {\r\n        $data[\'pages\'] = (int)$data[$pageCountVar];\r\n        unset($data[$pageCountVar]);\r\n    }\r\n    if ($pageVarKey != \'page\') {\r\n        $data[\'page\'] = (int)$data[$pageVarKey];\r\n        unset($data[$pageVarKey]);\r\n    }\r\n    if ($totalVar != \'total\') {\r\n        $data[\'total\'] = (int)$data[$totalVar];\r\n        unset($data[$totalVar]);\r\n    }\r\n\r\n    $maxIterations = (integer)$modx->getOption(\'parser_max_iterations\', null, 10);\r\n    $modx->getParser()->processElementTags(\'\', $data[\'output\'], false, false, \'[[\', \']]\', [], $maxIterations);\r\n    $modx->getParser()->processElementTags(\'\', $data[\'output\'], true, true, \'[[\', \']]\', [], $maxIterations);\r\n\r\n    @session_write_close();\r\n    exit(json_encode($data));\r\n} else {\r\n    if (!empty($setMeta)) {\r\n        $charset = $modx->getOption(\'modx_charset\', null, \'UTF-8\');\r\n        $canurl = $pdoPage->pdoTools->config[\'scheme\'] !== \'full\'\r\n            ? rtrim($modx->getOption(\'site_url\'), \'/\') . \'/\' . ltrim($url, \'/\')\r\n            : $url;\r\n        $modx->regClientStartupHTMLBlock(\'<link rel=\"canonical\" href=\"\' . htmlentities($canurl, ENT_QUOTES, $charset) . \'\"/>\');\r\n        if ($data[$pageVarKey] > 1) {\r\n            $prevUrl = $pdoPage->makePageLink($canurl, $data[$pageVarKey] - 1);\r\n            $modx->regClientStartupHTMLBlock(\r\n                \'<link rel=\"prev\" href=\"\' . htmlentities($prevUrl, ENT_QUOTES, $charset) . \'\"/>\'\r\n            );\r\n        }\r\n        if ($data[$pageVarKey] < $data[$pageCountVar]) {\r\n            $nextUrl = $pdoPage->makePageLink($canurl, $data[$pageVarKey] + 1);\r\n            $modx->regClientStartupHTMLBlock(\r\n                \'<link rel=\"next\" href=\"\' . htmlentities($nextUrl, ENT_QUOTES, $charset) . \'\"/>\'\r\n            );\r\n        }\r\n    }\r\n\r\n    $modx->setPlaceholders($data, $plPrefix);\r\n    if (!empty($toPlaceholder)) {\r\n        $modx->setPlaceholder($toPlaceholder, $data[\'output\']);\r\n    } else {\r\n        return $data[\'output\'];\r\n    }\r\n}',	0,	'a:41:{s:8:\"plPrefix\";a:7:{s:4:\"name\";s:8:\"plPrefix\";s:4:\"desc\";s:22:\"pdotools_prop_plPrefix\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:19:\"pdotools_prop_limit\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:10;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"maxLimit\";a:7:{s:4:\"name\";s:8:\"maxLimit\";s:4:\"desc\";s:22:\"pdotools_prop_maxLimit\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:100;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"offset\";a:7:{s:4:\"name\";s:6:\"offset\";s:4:\"desc\";s:20:\"pdotools_prop_offset\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:4:\"page\";a:7:{s:4:\"name\";s:4:\"page\";s:4:\"desc\";s:18:\"pdotools_prop_page\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"pageVarKey\";a:7:{s:4:\"name\";s:10:\"pageVarKey\";s:4:\"desc\";s:24:\"pdotools_prop_pageVarKey\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:4:\"page\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"totalVar\";a:7:{s:4:\"name\";s:8:\"totalVar\";s:4:\"desc\";s:22:\"pdotools_prop_totalVar\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:10:\"page.total\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"pageLimit\";a:7:{s:4:\"name\";s:9:\"pageLimit\";s:4:\"desc\";s:23:\"pdotools_prop_pageLimit\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:5;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"element\";a:7:{s:4:\"name\";s:7:\"element\";s:4:\"desc\";s:21:\"pdotools_prop_element\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:12:\"pdoResources\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"pageNavVar\";a:7:{s:4:\"name\";s:10:\"pageNavVar\";s:4:\"desc\";s:24:\"pdotools_prop_pageNavVar\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:8:\"page.nav\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"pageCountVar\";a:7:{s:4:\"name\";s:12:\"pageCountVar\";s:4:\"desc\";s:26:\"pdotools_prop_pageCountVar\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:9:\"pageCount\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:14:\"pageLinkScheme\";a:7:{s:4:\"name\";s:14:\"pageLinkScheme\";s:4:\"desc\";s:28:\"pdotools_prop_pageLinkScheme\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"tplPage\";a:7:{s:4:\"name\";s:7:\"tplPage\";s:4:\"desc\";s:21:\"pdotools_prop_tplPage\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:88:\"@INLINE <li class=\"page-item\"><a class=\"page-link\" href=\"[[+href]]\">[[+pageNo]]</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:14:\"tplPageWrapper\";a:7:{s:4:\"name\";s:14:\"tplPageWrapper\";s:4:\"desc\";s:28:\"pdotools_prop_tplPageWrapper\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:83:\"@INLINE <ul class=\"pagination\">[[+first]][[+prev]][[+pages]][[+next]][[+last]]</ul>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"tplPageActive\";a:7:{s:4:\"name\";s:13:\"tplPageActive\";s:4:\"desc\";s:27:\"pdotools_prop_tplPageActive\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:95:\"@INLINE <li class=\"page-item active\"><a class=\"page-link\" href=\"[[+href]]\">[[+pageNo]]</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"tplPageFirst\";a:7:{s:4:\"name\";s:12:\"tplPageFirst\";s:4:\"desc\";s:26:\"pdotools_prop_tplPageFirst\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:95:\"@INLINE <li class=\"page-item\"><a class=\"page-link\" href=\"[[+href]]\">[[%pdopage_first]]</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"tplPageLast\";a:7:{s:4:\"name\";s:11:\"tplPageLast\";s:4:\"desc\";s:25:\"pdotools_prop_tplPageLast\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:94:\"@INLINE <li class=\"page-item\"><a class=\"page-link\" href=\"[[+href]]\">[[%pdopage_last]]</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"tplPagePrev\";a:7:{s:4:\"name\";s:11:\"tplPagePrev\";s:4:\"desc\";s:25:\"pdotools_prop_tplPagePrev\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:84:\"@INLINE <li class=\"page-item\"><a class=\"page-link\" href=\"[[+href]]\">&laquo;</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"tplPageNext\";a:7:{s:4:\"name\";s:11:\"tplPageNext\";s:4:\"desc\";s:25:\"pdotools_prop_tplPageNext\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:84:\"@INLINE <li class=\"page-item\"><a class=\"page-link\" href=\"[[+href]]\">&raquo;</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"tplPageSkip\";a:7:{s:4:\"name\";s:11:\"tplPageSkip\";s:4:\"desc\";s:25:\"pdotools_prop_tplPageSkip\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:81:\"@INLINE <li class=\"page-item disabled\"><a class=\"page-link\" href=\"#\">...</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:17:\"tplPageFirstEmpty\";a:7:{s:4:\"name\";s:17:\"tplPageFirstEmpty\";s:4:\"desc\";s:31:\"pdotools_prop_tplPageFirstEmpty\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:96:\"@INLINE <li class=\"page-item disabled\"><a class=\"page-link\" href=\"#\">[[%pdopage_first]]</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:16:\"tplPageLastEmpty\";a:7:{s:4:\"name\";s:16:\"tplPageLastEmpty\";s:4:\"desc\";s:30:\"pdotools_prop_tplPageLastEmpty\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:95:\"@INLINE <li class=\"page-item disabled\"><a class=\"page-link\" href=\"#\">[[%pdopage_last]]</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:16:\"tplPagePrevEmpty\";a:7:{s:4:\"name\";s:16:\"tplPagePrevEmpty\";s:4:\"desc\";s:30:\"pdotools_prop_tplPagePrevEmpty\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:85:\"@INLINE <li class=\"page-item disabled\"><a class=\"page-link\" href=\"#\">&laquo;</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:16:\"tplPageNextEmpty\";a:7:{s:4:\"name\";s:16:\"tplPageNextEmpty\";s:4:\"desc\";s:30:\"pdotools_prop_tplPageNextEmpty\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:85:\"@INLINE <li class=\"page-item disabled\"><a class=\"page-link\" href=\"#\">&raquo;</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"cache\";a:7:{s:4:\"name\";s:5:\"cache\";s:4:\"desc\";s:19:\"pdotools_prop_cache\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"cacheTime\";a:7:{s:4:\"name\";s:9:\"cacheTime\";s:4:\"desc\";s:23:\"pdotools_prop_cacheTime\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:3600;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:14:\"cacheAnonymous\";a:7:{s:4:\"name\";s:14:\"cacheAnonymous\";s:4:\"desc\";s:28:\"pdotools_prop_cacheAnonymous\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:27:\"pdotools_prop_toPlaceholder\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:4:\"ajax\";a:7:{s:4:\"name\";s:4:\"ajax\";s:4:\"desc\";s:18:\"pdotools_prop_ajax\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"ajaxMode\";a:7:{s:4:\"name\";s:8:\"ajaxMode\";s:4:\"desc\";s:22:\"pdotools_prop_ajaxMode\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:4:{i:0;a:2:{s:4:\"text\";s:4:\"None\";s:5:\"value\";s:0:\"\";}i:1;a:2:{s:4:\"text\";s:7:\"Default\";s:5:\"value\";s:7:\"default\";}i:2;a:2:{s:4:\"text\";s:6:\"Scroll\";s:5:\"value\";s:6:\"scroll\";}i:3;a:2:{s:4:\"text\";s:6:\"Button\";s:5:\"value\";s:6:\"button\";}}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"ajaxElemWrapper\";a:7:{s:4:\"name\";s:15:\"ajaxElemWrapper\";s:4:\"desc\";s:29:\"pdotools_prop_ajaxElemWrapper\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:8:\"#pdopage\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"ajaxElemRows\";a:7:{s:4:\"name\";s:12:\"ajaxElemRows\";s:4:\"desc\";s:26:\"pdotools_prop_ajaxElemRows\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:14:\"#pdopage .rows\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:18:\"ajaxElemPagination\";a:7:{s:4:\"name\";s:18:\"ajaxElemPagination\";s:4:\"desc\";s:32:\"pdotools_prop_ajaxElemPagination\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:20:\"#pdopage .pagination\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"ajaxElemLink\";a:7:{s:4:\"name\";s:12:\"ajaxElemLink\";s:4:\"desc\";s:26:\"pdotools_prop_ajaxElemLink\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:22:\"#pdopage .pagination a\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"ajaxElemMore\";a:7:{s:4:\"name\";s:12:\"ajaxElemMore\";s:4:\"desc\";s:26:\"pdotools_prop_ajaxElemMore\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:18:\"#pdopage .btn-more\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"ajaxTplMore\";a:7:{s:4:\"name\";s:11:\"ajaxTplMore\";s:4:\"desc\";s:25:\"pdotools_prop_ajaxTplMore\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:75:\"@INLINE <button class=\"btn btn-primary btn-more\">[[%pdopage_more]]</button>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"ajaxHistory\";a:7:{s:4:\"name\";s:11:\"ajaxHistory\";s:4:\"desc\";s:25:\"pdotools_prop_ajaxHistory\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:3:{i:0;a:2:{s:4:\"text\";s:4:\"Auto\";s:5:\"value\";s:0:\"\";}i:1;a:2:{s:4:\"text\";s:7:\"Enabled\";s:5:\"value\";i:1;}i:2;a:2:{s:4:\"text\";s:8:\"Disabled\";s:5:\"value\";i:0;}}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"frontend_js\";a:7:{s:4:\"name\";s:11:\"frontend_js\";s:4:\"desc\";s:25:\"pdotools_prop_frontend_js\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:31:\"[[+assetsUrl]]js/pdopage.min.js\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"frontend_css\";a:7:{s:4:\"name\";s:12:\"frontend_css\";s:4:\"desc\";s:26:\"pdotools_prop_frontend_css\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:33:\"[[+assetsUrl]]css/pdopage.min.css\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"setMeta\";a:7:{s:4:\"name\";s:7:\"setMeta\";s:4:\"desc\";s:21:\"pdotools_prop_setMeta\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"strictMode\";a:7:{s:4:\"name\";s:10:\"strictMode\";s:4:\"desc\";s:24:\"pdotools_prop_strictMode\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	'core/components/pdotools/elements/snippets/snippet.pdopage.php'),
(23,	1,	0,	'pdoMenu',	'',	0,	4,	0,	'/** @var array $scriptProperties */\r\n/** @var modX $modx */\r\n\r\n// Convert parameters from Wayfinder if exists\r\nif (isset($startId)) {\r\n    $scriptProperties[\'parents\'] = $startId;\r\n}\r\nif (!empty($includeDocs)) {\r\n    $tmp = array_map(\'trim\', explode(\',\', $includeDocs));\r\n    foreach ($tmp as $v) {\r\n        if (!empty($scriptProperties[\'resources\'])) {\r\n            $scriptProperties[\'resources\'] .= \',\' . $v;\r\n        } else {\r\n            $scriptProperties[\'resources\'] = $v;\r\n        }\r\n    }\r\n}\r\nif (!empty($excludeDocs)) {\r\n    $tmp = array_map(\'trim\', explode(\',\', $excludeDocs));\r\n    foreach ($tmp as $v) {\r\n        if (!empty($scriptProperties[\'resources\'])) {\r\n            $scriptProperties[\'resources\'] .= \',-\' . $v;\r\n        } else {\r\n            $scriptProperties[\'resources\'] = \'-\' . $v;\r\n        }\r\n    }\r\n}\r\n\r\nif (!empty($previewUnpublished) && $modx->hasPermission(\'view_unpublished\')) {\r\n    $scriptProperties[\'showUnpublished\'] = 1;\r\n}\r\n\r\n$scriptProperties[\'depth\'] = empty($level) ? 100 : abs($level) - 1;\r\nif (!empty($contexts)) {\r\n    $scriptProperties[\'context\'] = $contexts;\r\n}\r\nif (empty($scriptProperties[\'context\'])) {\r\n    $scriptProperties[\'context\'] = $modx->resource->context_key;\r\n}\r\n\r\n// Save original parents specified by user\r\n$specified_parents = array_map(\'trim\', explode(\',\', $scriptProperties[\'parents\']));\r\n\r\nif ($scriptProperties[\'parents\'] === \'\') {\r\n    $scriptProperties[\'parents\'] = $modx->resource->id;\r\n} elseif ($scriptProperties[\'parents\'] === 0 || $scriptProperties[\'parents\'] === \'0\') {\r\n    if ($scriptProperties[\'depth\'] !== \'\' && $scriptProperties[\'depth\'] !== 100) {\r\n        $contexts = array_map(\'trim\', explode(\',\', $scriptProperties[\'context\']));\r\n        $parents = array();\r\n        if (!empty($scriptProperties[\'showDeleted\'])) {\r\n            /** @var pdoFetch $pdoFetch */\r\n            $pdoFetch = $modx->getService(\'pdoFetch\');\r\n            foreach ($contexts as $ctx) {\r\n                $parents = array_merge($parents, $pdoFetch->getChildIds(\'modResource\', 0, $scriptProperties[\'depth\'], array(\'context\' => $ctx)));\r\n            }\r\n        } else {\r\n            foreach ($contexts as $ctx) {\r\n                $parents = array_merge($parents, $modx->getChildIds(0, $scriptProperties[\'depth\'], array(\'context\' => $ctx)));\r\n            }\r\n        }\r\n        $scriptProperties[\'parents\'] = !empty($parents) ? implode(\',\', $parents) : \'+0\';\r\n        $scriptProperties[\'depth\'] = 0;\r\n    }\r\n    $scriptProperties[\'includeParents\'] = 1;\r\n    $scriptProperties[\'displayStart\'] = 0;\r\n} else {\r\n    $parents = array_map(\'trim\', explode(\',\', $scriptProperties[\'parents\']));\r\n    $parents_in = $parents_out = array();\r\n    foreach ($parents as $v) {\r\n        if (!is_numeric($v)) {\r\n            continue;\r\n        }\r\n        if ($v[0] == \'-\') {\r\n            $parents_out[] = abs($v);\r\n        } else {\r\n            $parents_in[] = abs($v);\r\n        }\r\n    }\r\n\r\n    if (empty($parents_in)) {\r\n        $scriptProperties[\'includeParents\'] = 1;\r\n        $scriptProperties[\'displayStart\'] = 0;\r\n    }\r\n}\r\n\r\nif (!empty($displayStart)) {\r\n    $scriptProperties[\'includeParents\'] = 1;\r\n}\r\nif (!empty($ph)) {\r\n    $toPlaceholder = $ph;\r\n}\r\nif (!empty($sortOrder)) {\r\n    $scriptProperties[\'sortdir\'] = $sortOrder;\r\n}\r\nif (!empty($sortBy)) {\r\n    $scriptProperties[\'sortby\'] = $sortBy;\r\n}\r\nif (!empty($permissions)) {\r\n    $scriptProperties[\'checkPermissions\'] = $permissions;\r\n}\r\nif (!empty($cacheResults)) {\r\n    $scriptProperties[\'cache\'] = $cacheResults;\r\n}\r\nif (!empty($ignoreHidden)) {\r\n    $scriptProperties[\'showHidden\'] = $ignoreHidden;\r\n}\r\n\r\n$wfTemplates = array(\r\n    \'outerTpl\' => \'tplOuter\',\r\n    \'rowTpl\' => \'tpl\',\r\n    \'parentRowTpl\' => \'tplParentRow\',\r\n    \'parentRowHereTpl\' => \'tplParentRowHere\',\r\n    \'hereTpl\' => \'tplHere\',\r\n    \'innerTpl\' => \'tplInner\',\r\n    \'innerRowTpl\' => \'tplInnerRow\',\r\n    \'innerHereTpl\' => \'tplInnerHere\',\r\n    \'activeParentRowTpl\' => \'tplParentRowActive\',\r\n    \'categoryFoldersTpl\' => \'tplCategoryFolder\',\r\n    \'startItemTpl\' => \'tplStart\',\r\n);\r\nforeach ($wfTemplates as $k => $v) {\r\n    if (isset(${$k})) {\r\n        $scriptProperties[$v] = ${$k};\r\n    }\r\n}\r\n//---\r\n\r\n/** @var pdoMenu $pdoMenu */\r\n$fqn = $modx->getOption(\'pdoMenu.class\', null, \'pdotools.pdomenu\', true);\r\n$path = $modx->getOption(\'pdomenu_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\nif ($pdoClass = $modx->loadClass($fqn, $path, false, true)) {\r\n    $pdoMenu = new $pdoClass($modx, $scriptProperties);\r\n} else {\r\n    return false;\r\n}\r\n$pdoMenu->pdoTools->addTime(\'pdoTools loaded\');\r\n\r\n$cache = !empty($cache) || (!$modx->user->id && !empty($cacheAnonymous));\r\nif (empty($scriptProperties[\'cache_key\'])) {\r\n    $scriptProperties[\'cache_key\'] = \'pdomenu/\' . sha1(serialize($scriptProperties));\r\n}\r\n\r\n$output = \'\';\r\n$tree = array();\r\nif ($cache) {\r\n    $tree = $pdoMenu->pdoTools->getCache($scriptProperties);\r\n}\r\nif (empty($tree)) {\r\n    $data = $pdoMenu->pdoTools->run();\r\n    $data = $pdoMenu->pdoTools->buildTree($data, \'id\', \'parent\', $specified_parents);\r\n    $tree = array();\r\n    foreach ($data as $k => $v) {\r\n        if (empty($v[\'id\'])) {\r\n            if (!in_array($k, $specified_parents) && !$pdoMenu->checkResource($k)) {\r\n                continue;\r\n            } else {\r\n                $tree = array_merge($tree, $v[\'children\']);\r\n            }\r\n        } else {\r\n            $tree[$k] = $v;\r\n        }\r\n    }\r\n    if ($cache) {\r\n        $pdoMenu->pdoTools->setCache($tree, $scriptProperties);\r\n    }\r\n}\r\nif (isset($return) && $return === \'data\') {\r\n    return $tree;\r\n}\r\nif (!empty($tree)) {\r\n    $output = $pdoMenu->templateTree($tree);\r\n}\r\n\r\nif ($modx->user->hasSessionContext(\'mgr\') && !empty($showLog)) {\r\n    $output .= \'<pre class=\"pdoMenuLog\">\' . print_r($pdoMenu->pdoTools->getTime(), 1) . \'</pre>\';\r\n}\r\n\r\nif (!empty($toPlaceholder)) {\r\n    $modx->setPlaceholder($toPlaceholder, $output);\r\n} else {\r\n    return $output;\r\n}',	0,	'a:51:{s:7:\"showLog\";a:7:{s:4:\"name\";s:7:\"showLog\";s:4:\"desc\";s:21:\"pdotools_prop_showLog\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"fastMode\";a:7:{s:4:\"name\";s:8:\"fastMode\";s:4:\"desc\";s:22:\"pdotools_prop_fastMode\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"level\";a:7:{s:4:\"name\";s:5:\"level\";s:4:\"desc\";s:19:\"pdotools_prop_level\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"parents\";a:7:{s:4:\"name\";s:7:\"parents\";s:4:\"desc\";s:21:\"pdotools_prop_parents\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"displayStart\";a:7:{s:4:\"name\";s:12:\"displayStart\";s:4:\"desc\";s:26:\"pdotools_prop_displayStart\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"resources\";a:7:{s:4:\"name\";s:9:\"resources\";s:4:\"desc\";s:23:\"pdotools_prop_resources\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"templates\";a:7:{s:4:\"name\";s:9:\"templates\";s:4:\"desc\";s:23:\"pdotools_prop_templates\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"context\";a:7:{s:4:\"name\";s:7:\"context\";s:4:\"desc\";s:21:\"pdotools_prop_context\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"cache\";a:7:{s:4:\"name\";s:5:\"cache\";s:4:\"desc\";s:19:\"pdotools_prop_cache\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"cacheTime\";a:7:{s:4:\"name\";s:9:\"cacheTime\";s:4:\"desc\";s:23:\"pdotools_prop_cacheTime\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:3600;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:14:\"cacheAnonymous\";a:7:{s:4:\"name\";s:14:\"cacheAnonymous\";s:4:\"desc\";s:28:\"pdotools_prop_cacheAnonymous\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"plPrefix\";a:7:{s:4:\"name\";s:8:\"plPrefix\";s:4:\"desc\";s:22:\"pdotools_prop_plPrefix\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:3:\"wf.\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"showHidden\";a:7:{s:4:\"name\";s:10:\"showHidden\";s:4:\"desc\";s:24:\"pdotools_prop_showHidden\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"showUnpublished\";a:7:{s:4:\"name\";s:15:\"showUnpublished\";s:4:\"desc\";s:29:\"pdotools_prop_showUnpublished\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"showDeleted\";a:7:{s:4:\"name\";s:11:\"showDeleted\";s:4:\"desc\";s:25:\"pdotools_prop_showDeleted\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:18:\"previewUnpublished\";a:7:{s:4:\"name\";s:18:\"previewUnpublished\";s:4:\"desc\";s:32:\"pdotools_prop_previewUnpublished\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"hideSubMenus\";a:7:{s:4:\"name\";s:12:\"hideSubMenus\";s:4:\"desc\";s:26:\"pdotools_prop_hideSubMenus\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"useWeblinkUrl\";a:7:{s:4:\"name\";s:13:\"useWeblinkUrl\";s:4:\"desc\";s:27:\"pdotools_prop_useWeblinkUrl\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"sortdir\";a:7:{s:4:\"name\";s:7:\"sortdir\";s:4:\"desc\";s:21:\"pdotools_prop_sortdir\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:3:\"ASC\";s:5:\"value\";s:3:\"ASC\";}i:1;a:2:{s:4:\"text\";s:4:\"DESC\";s:5:\"value\";s:4:\"DESC\";}}s:5:\"value\";s:3:\"ASC\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"sortby\";a:7:{s:4:\"name\";s:6:\"sortby\";s:4:\"desc\";s:20:\"pdotools_prop_sortby\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:9:\"menuindex\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:19:\"pdotools_prop_limit\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"offset\";a:7:{s:4:\"name\";s:6:\"offset\";s:4:\"desc\";s:20:\"pdotools_prop_offset\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"rowIdPrefix\";a:7:{s:4:\"name\";s:11:\"rowIdPrefix\";s:4:\"desc\";s:25:\"pdotools_prop_rowIdPrefix\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"firstClass\";a:7:{s:4:\"name\";s:10:\"firstClass\";s:4:\"desc\";s:24:\"pdotools_prop_firstClass\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:5:\"first\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"lastClass\";a:7:{s:4:\"name\";s:9:\"lastClass\";s:4:\"desc\";s:23:\"pdotools_prop_lastClass\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:4:\"last\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"hereClass\";a:7:{s:4:\"name\";s:9:\"hereClass\";s:4:\"desc\";s:23:\"pdotools_prop_hereClass\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:6:\"active\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"parentClass\";a:7:{s:4:\"name\";s:11:\"parentClass\";s:4:\"desc\";s:25:\"pdotools_prop_parentClass\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"rowClass\";a:7:{s:4:\"name\";s:8:\"rowClass\";s:4:\"desc\";s:22:\"pdotools_prop_rowClass\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"outerClass\";a:7:{s:4:\"name\";s:10:\"outerClass\";s:4:\"desc\";s:24:\"pdotools_prop_outerClass\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"innerClass\";a:7:{s:4:\"name\";s:10:\"innerClass\";s:4:\"desc\";s:24:\"pdotools_prop_innerClass\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"levelClass\";a:7:{s:4:\"name\";s:10:\"levelClass\";s:4:\"desc\";s:24:\"pdotools_prop_levelClass\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"selfClass\";a:7:{s:4:\"name\";s:9:\"selfClass\";s:4:\"desc\";s:23:\"pdotools_prop_selfClass\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"webLinkClass\";a:7:{s:4:\"name\";s:12:\"webLinkClass\";s:4:\"desc\";s:26:\"pdotools_prop_webLinkClass\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"tplOuter\";a:7:{s:4:\"name\";s:8:\"tplOuter\";s:4:\"desc\";s:22:\"pdotools_prop_tplOuter\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:41:\"@INLINE <ul[[+classes]]>[[+wrapper]]</ul>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:17:\"pdotools_prop_tpl\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:95:\"@INLINE <li[[+classes]]><a href=\"[[+link]]\" [[+attributes]]>[[+menutitle]]</a>[[+wrapper]]</li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"tplParentRow\";a:7:{s:4:\"name\";s:12:\"tplParentRow\";s:4:\"desc\";s:26:\"pdotools_prop_tplParentRow\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:16:\"tplParentRowHere\";a:7:{s:4:\"name\";s:16:\"tplParentRowHere\";s:4:\"desc\";s:30:\"pdotools_prop_tplParentRowHere\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"tplHere\";a:7:{s:4:\"name\";s:7:\"tplHere\";s:4:\"desc\";s:21:\"pdotools_prop_tplHere\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"tplInner\";a:7:{s:4:\"name\";s:8:\"tplInner\";s:4:\"desc\";s:22:\"pdotools_prop_tplInner\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"tplInnerRow\";a:7:{s:4:\"name\";s:11:\"tplInnerRow\";s:4:\"desc\";s:25:\"pdotools_prop_tplInnerRow\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"tplInnerHere\";a:7:{s:4:\"name\";s:12:\"tplInnerHere\";s:4:\"desc\";s:26:\"pdotools_prop_tplInnerHere\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:18:\"tplParentRowActive\";a:7:{s:4:\"name\";s:18:\"tplParentRowActive\";s:4:\"desc\";s:32:\"pdotools_prop_tplParentRowActive\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:17:\"tplCategoryFolder\";a:7:{s:4:\"name\";s:17:\"tplCategoryFolder\";s:4:\"desc\";s:31:\"pdotools_prop_tplCategoryFolder\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"tplStart\";a:7:{s:4:\"name\";s:8:\"tplStart\";s:4:\"desc\";s:22:\"pdotools_prop_tplStart\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:55:\"@INLINE <h2[[+classes]]>[[+menutitle]]</h2>[[+wrapper]]\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:16:\"checkPermissions\";a:7:{s:4:\"name\";s:16:\"checkPermissions\";s:4:\"desc\";s:30:\"pdotools_prop_checkPermissions\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"hereId\";a:7:{s:4:\"name\";s:6:\"hereId\";s:4:\"desc\";s:20:\"pdotools_prop_hereId\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"where\";a:7:{s:4:\"name\";s:5:\"where\";s:4:\"desc\";s:19:\"pdotools_prop_where\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"select\";a:7:{s:4:\"name\";s:6:\"select\";s:4:\"desc\";s:20:\"pdotools_prop_select\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"scheme\";a:7:{s:4:\"name\";s:6:\"scheme\";s:4:\"desc\";s:20:\"pdotools_prop_scheme\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:6:{i:0;a:2:{s:5:\"value\";s:0:\"\";s:4:\"text\";s:14:\"System default\";}i:1;a:2:{s:5:\"value\";i:-1;s:4:\"text\";s:25:\"-1 (relative to site_url)\";}i:2;a:2:{s:5:\"value\";s:4:\"full\";s:4:\"text\";s:40:\"full (absolute, prepended with site_url)\";}i:3;a:2:{s:5:\"value\";s:3:\"abs\";s:4:\"text\";s:39:\"abs (absolute, prepended with base_url)\";}i:4;a:2:{s:5:\"value\";s:4:\"http\";s:4:\"text\";s:38:\"http (absolute, forced to http scheme)\";}i:5;a:2:{s:5:\"value\";s:5:\"https\";s:4:\"text\";s:40:\"https (absolute, forced to https scheme)\";}}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:27:\"pdotools_prop_toPlaceholder\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"countChildren\";a:7:{s:4:\"name\";s:13:\"countChildren\";s:4:\"desc\";s:27:\"pdotools_prop_countChildren\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	'core/components/pdotools/elements/snippets/snippet.pdomenu.php'),
(24,	1,	0,	'pdoTitle',	'',	0,	4,	0,	'/** @var array $scriptProperties */\r\n/** @var modX $modx */\r\nif (empty($outputSeparator)) {\r\n    $outputSeparator = \' / \';\r\n}\r\nif (empty($titleField)) {\r\n    $titleField = \'longtitle\';\r\n}\r\nif (!isset($pageVarKey)) {\r\n    $pageVarKey = \'page\';\r\n}\r\nif (!isset($queryVarKey)) {\r\n    $queryVarKey = \'query\';\r\n}\r\nif (empty($tplPages)) {\r\n    $tplPages = \'@INLINE [[%pdopage_page]] [[+page]] [[%pdopage_from]] [[+pageCount]]\';\r\n}\r\nif (empty($tplSearch)) {\r\n    $tplSearch = \'@INLINE «[[+mse2_query]]»\';\r\n}\r\nif (empty($minQuery)) {\r\n    $minQuery = 3;\r\n}\r\nif (empty($id)) {\r\n    $id = $modx->resource->id;\r\n}\r\nif (empty($cacheKey)) {\r\n    $cacheKey = \'title_crumbs\';\r\n}\r\nif (!isset($cacheTime)) {\r\n    $cacheTime = 0;\r\n}\r\n/** @var pdoTools $pdoTools */\r\n$fqn = $modx->getOption(\'pdoTools.class\', null, \'pdotools.pdotools\', true);\r\n$path = $modx->getOption(\'pdotools_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\nif ($pdoClass = $modx->loadClass($fqn, $path, false, true)) {\r\n    $pdoTools = new $pdoClass($modx, $scriptProperties);\r\n} else {\r\n    return false;\r\n}\r\n$modx->lexicon->load(\'pdotools:pdopage\');\r\n\r\n/** @var modResource $resource */\r\n$resource = ($id == $modx->resource->id)\r\n    ? $modx->resource\r\n    : $modx->getObject(\'modResource\', $id);\r\nif (!$resource) {\r\n    return \'\';\r\n}\r\n\r\n$title = [];\r\n$pagetitle = trim($resource->get($titleField));\r\nif (empty($pagetitle)) {\r\n    $pagetitle = $resource->get(\'pagetitle\');\r\n}\r\n\r\n// Add search request if exists\r\nif (!empty($_GET[$queryVarKey]) && strlen($_GET[$queryVarKey]) >= $minQuery && !empty($tplSearch)) {\r\n    $pagetitle .= \' \' . $pdoTools->getChunk($tplSearch, [\r\n            $queryVarKey => $modx->stripTags($_GET[$queryVarKey]),\r\n        ]);\r\n}\r\n$title[] = $pagetitle;\r\n\r\n// Add pagination if exists\r\nif (!empty($_GET[$pageVarKey]) && !empty($tplPages)) {\r\n    $title[] = $pdoTools->getChunk($tplPages, [\r\n        \'page\' => (int)$_GET[$pageVarKey],\r\n    ]);\r\n}\r\n\r\n// Add parents\r\n$cacheKey = $resource->getCacheKey() . \'/\' . $cacheKey;\r\n$cacheOptions = [\'cache_key\' => $modx->getOption(\'cache_resource_key\', null, \'resource\')];\r\n$crumbs = \'\';\r\nif (empty($cache) || !$crumbs = $modx->cacheManager->get($cacheKey, $cacheOptions)) {\r\n    $crumbs = $pdoTools->runSnippet(\'pdoCrumbs\', array_merge(\r\n        [\r\n            \'to\' => $resource->id,\r\n            \'outputSeparator\' => $outputSeparator,\r\n            \'showHome\' => 0,\r\n            \'showAtHome\' => 0,\r\n            \'showCurrent\' => 0,\r\n            \'direction\' => \'rtl\',\r\n            \'tpl\' => \'@INLINE [[+menutitle]]\',\r\n            \'tplCurrent\' => \'@INLINE [[+menutitle]]\',\r\n            \'tplWrapper\' => \'@INLINE [[+output]]\',\r\n            \'tplMax\' => \'\',\r\n            \'tplHome\' => \'\',\r\n        ], $scriptProperties\r\n    ));\r\n}\r\nif (!empty($crumbs)) {\r\n    if (!empty($cache)) {\r\n        $modx->cacheManager->set($cacheKey, $crumbs, $cacheTime, $cacheOptions);\r\n    }\r\n    $title[] = $crumbs;\r\n}\r\n\r\nif (!empty($registerJs)) {\r\n    $config = [\r\n        \'separator\' => $outputSeparator,\r\n        \'tpl\' => str_replace([\'[[+\', \']]\'], [\'{\', \'}\'], $pdoTools->getChunk($tplPages)),\r\n    ];\r\n    /** @noinspection Annotator */\r\n    $modx->regClientStartupScript(\'<script>pdoTitle = \' . json_encode($config) . \';</script>\',\r\n        true);\r\n}\r\n\r\nreturn implode($outputSeparator, $title);',	0,	'a:13:{s:2:\"id\";a:7:{s:4:\"name\";s:2:\"id\";s:4:\"desc\";s:16:\"pdotools_prop_id\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"exclude\";a:7:{s:4:\"name\";s:7:\"exclude\";s:4:\"desc\";s:21:\"pdotools_prop_exclude\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:25:\"pdotools_prop_title_limit\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:3;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"titleField\";a:7:{s:4:\"name\";s:10:\"titleField\";s:4:\"desc\";s:24:\"pdotools_prop_titleField\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:9:\"longtitle\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"cache\";a:7:{s:4:\"name\";s:5:\"cache\";s:4:\"desc\";s:25:\"pdotools_prop_title_cache\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"cacheTime\";a:7:{s:4:\"name\";s:9:\"cacheTime\";s:4:\"desc\";s:23:\"pdotools_prop_cacheTime\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"tplPages\";a:7:{s:4:\"name\";s:8:\"tplPages\";s:4:\"desc\";s:22:\"pdotools_prop_tplPages\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:68:\"@INLINE [[%pdopage_page]] [[+page]] [[%pdopage_from]] [[+pageCount]]\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"pageVarKey\";a:7:{s:4:\"name\";s:10:\"pageVarKey\";s:4:\"desc\";s:24:\"pdotools_prop_pageVarKey\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:4:\"page\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"tplSearch\";a:7:{s:4:\"name\";s:9:\"tplSearch\";s:4:\"desc\";s:23:\"pdotools_prop_tplSearch\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:27:\"@INLINE «[[+mse2_query]]»\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"queryVarKey\";a:7:{s:4:\"name\";s:11:\"queryVarKey\";s:4:\"desc\";s:25:\"pdotools_prop_queryVarKey\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:5:\"query\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"minQuery\";a:7:{s:4:\"name\";s:8:\"minQuery\";s:4:\"desc\";s:22:\"pdotools_prop_minQuery\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:3;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"outputSeparator\";a:7:{s:4:\"name\";s:15:\"outputSeparator\";s:4:\"desc\";s:35:\"pdotools_prop_title_outputSeparator\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:3:\" / \";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"registerJs\";a:7:{s:4:\"name\";s:10:\"registerJs\";s:4:\"desc\";s:24:\"pdotools_prop_registerJs\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	'core/components/pdotools/elements/snippets/snippet.pdotitle.php'),
(25,	1,	0,	'pdoArchive',	'',	0,	4,	0,	'/** @var modX $modx */\r\n$modx->lexicon->load(\'pdotools:pdoarchive\');\r\n\r\n/** @var array $scriptProperties */\r\n$tplWrapper = $modx->getOption(\'tplWrapper\', $scriptProperties);\r\n$tplYear = $modx->getOption(\'tplYear\', $scriptProperties);\r\n$tplMonth = $modx->getOption(\'tplMonth\', $scriptProperties);\r\n$tplDay = $modx->getOption(\'tplDay\', $scriptProperties);\r\n$tpl = $modx->getOption(\'tpl\', $scriptProperties);\r\n$dateField = $modx->getOption(\'dateField\', $scriptProperties, \'createdon\', true);\r\n$dateFormat = $modx->getOption(\'dateFormat\', $scriptProperties, \'H:i\', true);\r\n$outputSeparator = $modx->getOption(\'outputSeparator\', $scriptProperties, \"\\n\");\r\n\r\n// Adding extra parameters into special place so we can put them in a results\r\n/** @var modSnippet $snippet */\r\n$additionalPlaceholders = $properties = [];\r\nif (isset($this) && $this instanceof modSnippet) {\r\n    $properties = $this->get(\'properties\');\r\n} elseif ($snippet = $modx->getObject(\'modSnippet\', [\'name\' => \'pdoResources\'])) {\r\n    $properties = $snippet->get(\'properties\');\r\n}\r\nif (!empty($properties)) {\r\n    foreach ($scriptProperties as $k => $v) {\r\n        if (!isset($properties[$k])) {\r\n            $additionalPlaceholders[$k] = $v;\r\n        }\r\n    }\r\n}\r\n$scriptProperties[\'additionalPlaceholders\'] = $additionalPlaceholders;\r\nif (isset($parents) && $parents === \'\') {\r\n    $scriptProperties[\'parents\'] = $modx->resource->id;\r\n}\r\n$scriptProperties[\'return\'] = \'data\';\r\n/** @var pdoFetch $pdoFetch */\r\n$fqn = $modx->getOption(\'pdoFetch.class\', null, \'pdotools.pdofetch\', true);\r\n$path = $modx->getOption(\'pdofetch_class_path\', null, MODX_CORE_PATH . \'components/pdotools/model/\', true);\r\nif ($pdoClass = $modx->loadClass($fqn, $path, false, true)) {\r\n    $pdoFetch = new $pdoClass($modx, $scriptProperties);\r\n} else {\r\n    return false;\r\n}\r\n$pdoFetch->addTime(\'pdoTools loaded\');\r\n$rows = $pdoFetch->run();\r\n\r\n// Process rows\r\n$tree = [];\r\nforeach ($rows as $row) {\r\n    $tmp = $row[$dateField];\r\n    if (!is_numeric($tmp)) {\r\n        $tmp = strtotime($tmp);\r\n    }\r\n    $year = date(\'Y\', $tmp);\r\n    $month = date(\'m\', $tmp);\r\n    $day = date(\'d\', $tmp);\r\n    $tree[$year][$month][$day][] = $row;\r\n}\r\n\r\n$output = \'\';\r\nforeach ($tree as $year => $months) {\r\n    $rows_year = \'\';\r\n    $count_year = 0;\r\n\r\n    foreach ($months as $month => $days) {\r\n        $rows_month = \'\';\r\n        $count_month = 0;\r\n\r\n        foreach ($days as $day => $resources) {\r\n            $rows_day = [];\r\n            $count_day = 0;\r\n            $idx = 1;\r\n\r\n            foreach ($resources as $resource) {\r\n                $resource[\'day\'] = $day;\r\n                $resource[\'month\'] = $month;\r\n                $resource[\'year\'] = $year;\r\n                $resource[\'date\'] = strftime($dateFormat, $resource[$dateField]);\r\n                $resource[\'idx\'] = $idx++;\r\n                $resource[\'menutitle\'] = !empty($resource[\'menutitle\'])\r\n                    ? $resource[\'menutitle\']\r\n                    : $resource[\'pagetitle\'];\r\n                // Add placeholder [[+link]] if specified\r\n                if (!empty($scriptProperties[\'useWeblinkUrl\'])) {\r\n                    if (!isset($resource[\'context_key\'])) {\r\n                        $resource[\'context_key\'] = \'\';\r\n                    }\r\n                    if (isset($resource[\'class_key\']) && ($resource[\'class_key\'] == \'modWebLink\')) {\r\n                        $resource[\'link\'] = isset($resource[\'content\']) && is_numeric(trim($resource[\'content\'], \'[]~ \'))\r\n                            ? $pdoFetch->makeUrl(intval(trim($resource[\'content\'], \'[]~ \')), $resource)\r\n                            : (isset($resource[\'content\']) ? $resource[\'content\'] : \'\');\r\n                    } else {\r\n                        $resource[\'link\'] = $pdoFetch->makeUrl($resource[\'id\'], $resource);\r\n                    }\r\n                } else {\r\n                    $resource[\'link\'] = \'\';\r\n                }\r\n                $tpl = $pdoFetch->defineChunk($resource);\r\n                $rows_day[] = $pdoFetch->getChunk($tpl, $resource);\r\n                $count_year++;\r\n                $count_month++;\r\n                $count_day++;\r\n            }\r\n\r\n            $rows_month .= !empty($tplDay)\r\n                ? $pdoFetch->getChunk($tplDay, [\r\n                    \'day\' => $day,\r\n                    \'month\' => $month,\r\n                    \'year\' => $year,\r\n                    \'count\' => $count_day,\r\n                    \'wrapper\' => implode($outputSeparator, $rows_day),\r\n                ], $pdoFetch->config[\'fastMode\'])\r\n                : implode($outputSeparator, $rows_day);\r\n        }\r\n\r\n        $rows_year .= !empty($tplMonth)\r\n            ? $pdoFetch->getChunk($tplMonth, [\r\n                \'month\' => $month,\r\n                \'month_name\' => $modx->lexicon(\'pdoarchive_month_\' . $month),\r\n                \'year\' => $year,\r\n                \'count\' => $count_month,\r\n                \'wrapper\' => $rows_month,\r\n            ], $pdoFetch->config[\'fastMode\'])\r\n            : $rows_month;\r\n    }\r\n\r\n    $output .= !empty($tplYear)\r\n        ? $pdoFetch->getChunk($tplYear, [\r\n            \'year\' => $year,\r\n            \'count\' => $count_year,\r\n            \'wrapper\' => $rows_year,\r\n        ], $pdoFetch->config[\'fastMode\'])\r\n        : $rows_year;\r\n}\r\n$pdoFetch->addTime(\'Rows processed\');\r\n\r\n// Return output\r\nif (!empty($tplWrapper) && (!empty($wrapIfEmpty) || !empty($output))) {\r\n    $output = $pdoFetch->getChunk(\r\n        $tplWrapper,\r\n        array_merge($additionalPlaceholders, [\'output\' => $output]),\r\n        $pdoFetch->config[\'fastMode\']\r\n    );\r\n    $pdoFetch->addTime(\'Rows wrapped\');\r\n}\r\n\r\nif ($modx->user->hasSessionContext(\'mgr\') && !empty($showLog)) {\r\n    $output .= \'<pre class=\"pdoArchiveLog\">\' . print_r($pdoFetch->getTime(), 1) . \'</pre>\';\r\n}\r\n\r\nif (!empty($toPlaceholder)) {\r\n    $modx->setPlaceholder($toPlaceholder, $output);\r\n} else {\r\n    return $output;\r\n}',	0,	'a:36:{s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:17:\"pdotools_prop_tpl\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:65:\"@INLINE <li>[[+date]] <a href=\"[[+link]]\">[[+menutitle]]</a></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"tplYear\";a:7:{s:4:\"name\";s:7:\"tplYear\";s:4:\"desc\";s:21:\"pdotools_prop_tplYear\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:71:\"@INLINE <h3>[[+year]] <sup>([[+count]])</sup></h3><ul>[[+wrapper]]</ul>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"tplMonth\";a:7:{s:4:\"name\";s:8:\"tplMonth\";s:4:\"desc\";s:22:\"pdotools_prop_tplMonth\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:86:\"@INLINE <li><h4>[[+month_name]] <sup>([[+count]])</sup></h4><ul>[[+wrapper]]</ul></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"tplDay\";a:7:{s:4:\"name\";s:6:\"tplDay\";s:4:\"desc\";s:20:\"pdotools_prop_tplDay\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:79:\"@INLINE <li><h5>[[+day]] <sup>([[+count]])</sup></h5><ul>[[+wrapper]]</ul></li>\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"tplWrapper\";a:7:{s:4:\"name\";s:10:\"tplWrapper\";s:4:\"desc\";s:24:\"pdotools_prop_tplWrapper\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"wrapIfEmpty\";a:7:{s:4:\"name\";s:11:\"wrapIfEmpty\";s:4:\"desc\";s:25:\"pdotools_prop_wrapIfEmpty\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"dateField\";a:7:{s:4:\"name\";s:9:\"dateField\";s:4:\"desc\";s:23:\"pdotools_prop_dateField\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:9:\"createdon\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"dateFormat\";a:7:{s:4:\"name\";s:10:\"dateFormat\";s:4:\"desc\";s:24:\"pdotools_prop_dateFormat\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:5:\"%H:%M\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"showLog\";a:7:{s:4:\"name\";s:7:\"showLog\";s:4:\"desc\";s:21:\"pdotools_prop_showLog\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"sortby\";a:7:{s:4:\"name\";s:6:\"sortby\";s:4:\"desc\";s:20:\"pdotools_prop_sortby\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:9:\"createdon\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"sortbyTV\";a:7:{s:4:\"name\";s:8:\"sortbyTV\";s:4:\"desc\";s:22:\"pdotools_prop_sortbyTV\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:12:\"sortbyTVType\";a:7:{s:4:\"name\";s:12:\"sortbyTVType\";s:4:\"desc\";s:26:\"pdotools_prop_sortbyTVType\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"sortdir\";a:7:{s:4:\"name\";s:7:\"sortdir\";s:4:\"desc\";s:21:\"pdotools_prop_sortdir\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:3:\"ASC\";s:5:\"value\";s:3:\"ASC\";}i:1;a:2:{s:4:\"text\";s:4:\"DESC\";s:5:\"value\";s:4:\"DESC\";}}s:5:\"value\";s:4:\"DESC\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"sortdirTV\";a:7:{s:4:\"name\";s:9:\"sortdirTV\";s:4:\"desc\";s:23:\"pdotools_prop_sortdirTV\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:3:\"ASC\";s:5:\"value\";s:3:\"ASC\";}i:1;a:2:{s:4:\"text\";s:4:\"DESC\";s:5:\"value\";s:4:\"DESC\";}}s:5:\"value\";s:3:\"ASC\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:19:\"pdotools_prop_limit\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"offset\";a:7:{s:4:\"name\";s:6:\"offset\";s:4:\"desc\";s:20:\"pdotools_prop_offset\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"depth\";a:7:{s:4:\"name\";s:5:\"depth\";s:4:\"desc\";s:19:\"pdotools_prop_depth\";s:4:\"type\";s:11:\"numberfield\";s:7:\"options\";a:0:{}s:5:\"value\";i:10;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"outputSeparator\";a:7:{s:4:\"name\";s:15:\"outputSeparator\";s:4:\"desc\";s:29:\"pdotools_prop_outputSeparator\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"\n\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:27:\"pdotools_prop_toPlaceholder\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"parents\";a:7:{s:4:\"name\";s:7:\"parents\";s:4:\"desc\";s:21:\"pdotools_prop_parents\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:14:\"includeContent\";a:7:{s:4:\"name\";s:14:\"includeContent\";s:4:\"desc\";s:28:\"pdotools_prop_includeContent\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"includeTVs\";a:7:{s:4:\"name\";s:10:\"includeTVs\";s:4:\"desc\";s:24:\"pdotools_prop_includeTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"prepareTVs\";a:7:{s:4:\"name\";s:10:\"prepareTVs\";s:4:\"desc\";s:24:\"pdotools_prop_prepareTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:1:\"1\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"processTVs\";a:7:{s:4:\"name\";s:10:\"processTVs\";s:4:\"desc\";s:24:\"pdotools_prop_processTVs\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"tvPrefix\";a:7:{s:4:\"name\";s:8:\"tvPrefix\";s:4:\"desc\";s:22:\"pdotools_prop_tvPrefix\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:3:\"tv.\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:5:\"where\";a:7:{s:4:\"name\";s:5:\"where\";s:4:\"desc\";s:19:\"pdotools_prop_where\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:15:\"showUnpublished\";a:7:{s:4:\"name\";s:15:\"showUnpublished\";s:4:\"desc\";s:29:\"pdotools_prop_showUnpublished\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:11:\"showDeleted\";a:7:{s:4:\"name\";s:11:\"showDeleted\";s:4:\"desc\";s:25:\"pdotools_prop_showDeleted\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:10:\"showHidden\";a:7:{s:4:\"name\";s:10:\"showHidden\";s:4:\"desc\";s:24:\"pdotools_prop_showHidden\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:14:\"hideContainers\";a:7:{s:4:\"name\";s:14:\"hideContainers\";s:4:\"desc\";s:28:\"pdotools_prop_hideContainers\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:0;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:7:\"context\";a:7:{s:4:\"name\";s:7:\"context\";s:4:\"desc\";s:21:\"pdotools_prop_context\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:8:\"totalVar\";a:7:{s:4:\"name\";s:8:\"totalVar\";s:4:\"desc\";s:22:\"pdotools_prop_totalVar\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:5:\"total\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:9:\"resources\";a:7:{s:4:\"name\";s:9:\"resources\";s:4:\"desc\";s:23:\"pdotools_prop_resources\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"select\";a:7:{s:4:\"name\";s:6:\"select\";s:4:\"desc\";s:20:\"pdotools_prop_select\";s:4:\"type\";s:8:\"textarea\";s:7:\"options\";a:0:{}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:6:\"scheme\";a:7:{s:4:\"name\";s:6:\"scheme\";s:4:\"desc\";s:20:\"pdotools_prop_scheme\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:6:{i:0;a:2:{s:5:\"value\";s:0:\"\";s:4:\"text\";s:14:\"System default\";}i:1;a:2:{s:5:\"value\";i:-1;s:4:\"text\";s:25:\"-1 (relative to site_url)\";}i:2;a:2:{s:5:\"value\";s:4:\"full\";s:4:\"text\";s:40:\"full (absolute, prepended with site_url)\";}i:3;a:2:{s:5:\"value\";s:3:\"abs\";s:4:\"text\";s:39:\"abs (absolute, prepended with base_url)\";}i:4;a:2:{s:5:\"value\";s:4:\"http\";s:4:\"text\";s:38:\"http (absolute, forced to http scheme)\";}i:5;a:2:{s:5:\"value\";s:5:\"https\";s:4:\"text\";s:40:\"https (absolute, forced to https scheme)\";}}s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}s:13:\"useWeblinkUrl\";a:7:{s:4:\"name\";s:13:\"useWeblinkUrl\";s:4:\"desc\";s:27:\"pdotools_prop_useWeblinkUrl\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";a:0:{}s:5:\"value\";b:1;s:7:\"lexicon\";s:19:\"pdotools:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	'core/components/pdotools/elements/snippets/snippet.pdoarchive.php'),
(40,	0,	0,	'Quip',	'A simple commenting component.',	0,	8,	0,	'/**\n * Quip\n *\n * Copyright 2010-11 by Shaun McCormick <shaun@modx.com>\n *\n * This file is part of Quip, a simple commenting component for MODx Revolution.\n *\n * Quip is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Quip is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Quip; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\n * Suite 330, Boston, MA 02111-1307 USA\n *\n * @package quip\n */\n/**\n * Quip\n *\n * A simple comments component.\n *\n * @var modX $modx\n * @var array $scriptProperties\n *\n * @name Quip\n * @author Shaun McCormick <shaun@modx.com>\n * @package quip\n */\n/** @var Quip $quip */\n$quip = $modx->getService(\'quip\',\'Quip\',$modx->getOption(\'quip.core_path\',null,$modx->getOption(\'core_path\').\'components/quip/\').\'model/quip/\',$scriptProperties);\nif (!($quip instanceof Quip)) return \'\';\n\n$quip->initialize($modx->context->get(\'key\'));\n\n$controller = $quip->loadController(\'Thread\');\n$output = $controller->run($scriptProperties);\nreturn $output;',	0,	'a:50:{s:6:\"thread\";a:7:{s:4:\"name\";s:6:\"thread\";s:4:\"desc\";s:21:\"quip.prop_thread_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"parent\";a:7:{s:4:\"name\";s:6:\"parent\";s:4:\"desc\";s:21:\"quip.prop_parent_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:1:\"0\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:8:\"threaded\";a:7:{s:4:\"name\";s:8:\"threaded\";s:4:\"desc\";s:23:\"quip.prop_threaded_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:8:\"maxDepth\";a:7:{s:4:\"name\";s:8:\"maxDepth\";s:4:\"desc\";s:23:\"quip.prop_maxdepth_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:5;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:15:\"replyResourceId\";a:7:{s:4:\"name\";s:15:\"replyResourceId\";s:4:\"desc\";s:30:\"quip.prop_replyresourceid_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:18:\"threadedPostMargin\";a:7:{s:4:\"name\";s:18:\"threadedPostMargin\";s:4:\"desc\";s:33:\"quip.prop_threadedpostmargin_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:15;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:11:\"requireAuth\";a:7:{s:4:\"name\";s:11:\"requireAuth\";s:4:\"desc\";s:26:\"quip.prop_requireauth_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:17:\"requireUsergroups\";a:7:{s:4:\"name\";s:17:\"requireUsergroups\";s:4:\"desc\";s:32:\"quip.prop_requireusergroups_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"closed\";a:7:{s:4:\"name\";s:6:\"closed\";s:4:\"desc\";s:21:\"quip.prop_closed_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"closeAfter\";a:7:{s:4:\"name\";s:10:\"closeAfter\";s:4:\"desc\";s:25:\"quip.prop_closeafter_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:14;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"dateFormat\";a:7:{s:4:\"name\";s:10:\"dateFormat\";s:4:\"desc\";s:25:\"quip.prop_dateformat_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:21:\"%b %d, %Y at %I:%M %p\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"useMargins\";a:7:{s:4:\"name\";s:10:\"useMargins\";s:4:\"desc\";s:25:\"quip.prop_usemargins_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"useCss\";a:7:{s:4:\"name\";s:6:\"useCss\";s:4:\"desc\";s:21:\"quip.prop_usecss_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"rowCss\";a:7:{s:4:\"name\";s:6:\"rowCss\";s:4:\"desc\";s:21:\"quip.prop_rowcss_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:12:\"quip-comment\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"altRowCss\";a:7:{s:4:\"name\";s:9:\"altRowCss\";s:4:\"desc\";s:24:\"quip.prop_altrowcss_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:16:\"quip-comment-alt\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:5:\"olCss\";a:7:{s:4:\"name\";s:5:\"olCss\";s:4:\"desc\";s:20:\"quip.prop_olcss_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:19:\"quip-comment-parent\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:13:\"unapprovedCss\";a:7:{s:4:\"name\";s:13:\"unapprovedCss\";s:4:\"desc\";s:28:\"quip.prop_unapprovedcss_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:15:\"quip-unapproved\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"authorTpl\";a:7:{s:4:\"name\";s:9:\"authorTpl\";s:4:\"desc\";s:24:\"quip.prop_authortpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:13:\"quipAuthorTpl\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"nameField\";a:7:{s:4:\"name\";s:9:\"nameField\";s:4:\"desc\";s:24:\"quip.prop_namefield_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:8:\"username\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:17:\"showAnonymousName\";a:7:{s:4:\"name\";s:17:\"showAnonymousName\";s:4:\"desc\";s:32:\"quip.prop_showanonymousname_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:13:\"anonymousName\";a:7:{s:4:\"name\";s:13:\"anonymousName\";s:4:\"desc\";s:28:\"quip.prop_anonymousname_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:11:\"allowRemove\";a:7:{s:4:\"name\";s:11:\"allowRemove\";s:4:\"desc\";s:26:\"quip.prop_allowremove_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:15:\"removeThreshold\";a:7:{s:4:\"name\";s:15:\"removeThreshold\";s:4:\"desc\";s:30:\"quip.prop_removethreshold_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:3;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:17:\"allowReportAsSpam\";a:7:{s:4:\"name\";s:17:\"allowReportAsSpam\";s:4:\"desc\";s:32:\"quip.prop_allowreportasspam_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:11:\"useGravatar\";a:7:{s:4:\"name\";s:11:\"useGravatar\";s:4:\"desc\";s:26:\"quip.prop_usegravatar_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:12:\"gravatarIcon\";a:7:{s:4:\"name\";s:12:\"gravatarIcon\";s:4:\"desc\";s:27:\"quip.prop_gravataricon_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:9:\"identicon\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:12:\"gravatarSize\";a:7:{s:4:\"name\";s:12:\"gravatarSize\";s:4:\"desc\";s:27:\"quip.prop_gravatarsize_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:50;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"sortBy\";a:7:{s:4:\"name\";s:6:\"sortBy\";s:4:\"desc\";s:21:\"quip.prop_sortby_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:4:\"rank\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:11:\"sortByAlias\";a:7:{s:4:\"name\";s:11:\"sortByAlias\";s:4:\"desc\";s:26:\"quip.prop_sortbyalias_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:12:\"quip.comment\";s:5:\"value\";s:11:\"quipComment\";}i:1;a:2:{s:4:\"text\";s:11:\"quip.author\";s:5:\"value\";s:6:\"Author\";}}s:5:\"value\";s:11:\"quipComment\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:7:\"sortDir\";a:7:{s:4:\"name\";s:7:\"sortDir\";s:4:\"desc\";s:22:\"quip.prop_sortdir_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:14:\"quip.ascending\";s:5:\"value\";s:3:\"ASC\";}i:1;a:2:{s:4:\"text\";s:15:\"quip.descending\";s:5:\"value\";s:4:\"DESC\";}}s:5:\"value\";s:3:\"ASC\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:28:\"quip.prop_toplaceholder_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:17:\"placeholderPrefix\";a:7:{s:4:\"name\";s:17:\"placeholderPrefix\";s:4:\"desc\";s:32:\"quip.prop_placeholderprefix_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:4:\"quip\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"tplComment\";a:7:{s:4:\"name\";s:10:\"tplComment\";s:4:\"desc\";s:25:\"quip.prop_tplcomment_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:11:\"quipComment\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:17:\"tplCommentOptions\";a:7:{s:4:\"name\";s:17:\"tplCommentOptions\";s:4:\"desc\";s:32:\"quip.prop_tplcommentoptions_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:18:\"quipCommentOptions\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:11:\"tplComments\";a:7:{s:4:\"name\";s:11:\"tplComments\";s:4:\"desc\";s:26:\"quip.prop_tplcomments_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:12:\"quipComments\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"tplReport\";a:7:{s:4:\"name\";s:9:\"tplReport\";s:4:\"desc\";s:24:\"quip.prop_tplreport_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:10:\"quipReport\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:12:\"reportAction\";a:7:{s:4:\"name\";s:12:\"reportAction\";s:4:\"desc\";s:27:\"quip.prop_reportaction_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:11:\"quip_report\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:12:\"removeAction\";a:7:{s:4:\"name\";s:12:\"removeAction\";s:4:\"desc\";s:27:\"quip.prop_removeaction_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:11:\"quip_remove\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:8:\"idPrefix\";a:7:{s:4:\"name\";s:8:\"idPrefix\";s:4:\"desc\";s:23:\"quip.prop_idprefix_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:4:\"qcom\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:5:\"debug\";a:7:{s:4:\"name\";s:5:\"debug\";s:4:\"desc\";s:20:\"quip.prop_debug_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"debugUser\";a:7:{s:4:\"name\";s:9:\"debugUser\";s:4:\"desc\";s:24:\"quip.prop_debuguser_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:11:\"debugUserId\";a:7:{s:4:\"name\";s:11:\"debugUserId\";s:4:\"desc\";s:26:\"quip.prop_debuguserid_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:20:\"quip.prop_limit_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:5:\"start\";a:7:{s:4:\"name\";s:5:\"start\";s:4:\"desc\";s:20:\"quip.prop_start_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:13:\"tplPagination\";a:7:{s:4:\"name\";s:13:\"tplPagination\";s:4:\"desc\";s:28:\"quip.prop_tplpagination_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:14:\"quipPagination\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:17:\"tplPaginationItem\";a:7:{s:4:\"name\";s:17:\"tplPaginationItem\";s:4:\"desc\";s:32:\"quip.prop_tplpaginationitem_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:18:\"quipPaginationItem\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:24:\"tplPaginationCurrentItem\";a:7:{s:4:\"name\";s:24:\"tplPaginationCurrentItem\";s:4:\"desc\";s:39:\"quip.prop_tplpaginationcurrentitem_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:25:\"quipPaginationCurrentItem\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:13:\"paginationCls\";a:7:{s:4:\"name\";s:13:\"paginationCls\";s:4:\"desc\";s:28:\"quip.prop_paginationcls_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:15:\"quip-pagination\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:7:\"pageCls\";a:7:{s:4:\"name\";s:7:\"pageCls\";s:4:\"desc\";s:22:\"quip.prop_pagecls_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:16:\"quip-page-number\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:14:\"currentPageCls\";a:7:{s:4:\"name\";s:14:\"currentPageCls\";s:4:\"desc\";s:29:\"quip.prop_currentpagecls_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:17:\"quip-page-current\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(41,	0,	0,	'QuipCount',	'An assistance snippet for getting thread/user comment counts.',	0,	8,	0,	'/**\n * Quip\n *\n * Copyright 2010-11 by Shaun McCormick <shaun@modx.com>\n *\n * This file is part of Quip, a simple commenting component for MODx Revolution.\n *\n * Quip is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Quip is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Quip; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\n * Suite 330, Boston, MA 02111-1307 USA\n *\n * @package quip\n */\n/**\n * QuipCount\n *\n * Gets the total # of comments in a thread or by a user.\n *\n * @var modX $modx\n * @var array $scriptProperties\n * @var Quip $quip\n *\n * @name QuipCount\n * @author Shaun McCormick <shaun@modx.com>\n * @package quip\n */\n$quip = $modx->getService(\'quip\',\'Quip\',$modx->getOption(\'quip.core_path\',null,$modx->getOption(\'core_path\').\'components/quip/\').\'model/quip/\',$scriptProperties);\nif (!($quip instanceof Quip)) return \'\';\n$quip->initialize($modx->context->get(\'key\'));\n$controller = $quip->loadController(\'ThreadCount\');\n$output = $controller->run($scriptProperties);\nreturn $output;',	0,	'a:5:{s:4:\"type\";a:7:{s:4:\"name\";s:4:\"type\";s:4:\"desc\";s:25:\"quip.prop_count_type_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:3:{i:0;a:2:{s:4:\"text\";s:11:\"quip.thread\";s:5:\"value\";s:6:\"thread\";}i:1;a:2:{s:4:\"text\";s:9:\"quip.user\";s:5:\"value\";s:4:\"user\";}i:2;a:2:{s:4:\"text\";s:11:\"quip.family\";s:5:\"value\";s:6:\"family\";}}s:5:\"value\";s:6:\"thread\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"thread\";a:7:{s:4:\"name\";s:6:\"thread\";s:4:\"desc\";s:27:\"quip.prop_count_thread_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:4:\"user\";a:7:{s:4:\"name\";s:4:\"user\";s:4:\"desc\";s:25:\"quip.prop_count_user_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"family\";a:7:{s:4:\"name\";s:6:\"family\";s:4:\"desc\";s:27:\"quip.prop_count_family_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:34:\"quip.prop_count_toplaceholder_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(42,	0,	0,	'QuipLatestComments',	'An assistance snippet for getting the latest comments for the whole site or a thread or user.',	0,	8,	0,	'/**\n * Quip\n *\n * Copyright 2010-11 by Shaun McCormick <shaun@modx.com>\n *\n * This file is part of Quip, a simple commenting component for MODx Revolution.\n *\n * Quip is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Quip is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Quip; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\n * Suite 330, Boston, MA 02111-1307 USA\n *\n * @package quip\n */\n/**\n * QuipLatestComments\n *\n * Gets latest comments in a thread or by a user.\n *\n * @var modX $modx\n * @var array $scriptProperties\n * @var Quip $quip\n * \n * @name QuipLatestComments\n * @author Shaun McCormick <shaun@modx.com>\n * @package quip\n */\n$quip = $modx->getService(\'quip\',\'Quip\',$modx->getOption(\'quip.core_path\',null,$modx->getOption(\'core_path\').\'components/quip/\').\'model/quip/\',$scriptProperties);\nif (!($quip instanceof Quip)) return \'\';\n$quip->initialize($modx->context->get(\'key\'));\n$controller = $quip->loadController(\'LatestComments\');\n$output = $controller->run($scriptProperties);\nreturn $output;',	0,	'a:18:{s:4:\"type\";a:7:{s:4:\"name\";s:4:\"type\";s:4:\"desc\";s:24:\"quip.prop_late_type_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:4:{i:0;a:2:{s:5:\"value\";s:3:\"all\";s:4:\"text\";s:8:\"quip.all\";}i:1;a:2:{s:5:\"value\";s:6:\"thread\";s:4:\"text\";s:11:\"quip.thread\";}i:2;a:2:{s:5:\"value\";s:6:\"family\";s:4:\"text\";s:11:\"quip.family\";}i:3;a:2:{s:5:\"value\";s:4:\"user\";s:4:\"text\";s:9:\"quip.user\";}}s:5:\"value\";s:3:\"all\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:23:\"quip.prop_late_tpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:17:\"quipLatestComment\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"thread\";a:7:{s:4:\"name\";s:6:\"thread\";s:4:\"desc\";s:26:\"quip.prop_late_thread_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:4:\"user\";a:7:{s:4:\"name\";s:4:\"user\";s:4:\"desc\";s:24:\"quip.prop_late_user_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"family\";a:7:{s:4:\"name\";s:6:\"family\";s:4:\"desc\";s:26:\"quip.prop_late_family_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"stripTags\";a:7:{s:4:\"name\";s:9:\"stripTags\";s:4:\"desc\";s:29:\"quip.prop_late_striptags_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"dateFormat\";a:7:{s:4:\"name\";s:10:\"dateFormat\";s:4:\"desc\";s:30:\"quip.prop_late_dateformat_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:21:\"%b %d, %Y at %I:%M %p\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"bodyLimit\";a:7:{s:4:\"name\";s:9:\"bodyLimit\";s:4:\"desc\";s:29:\"quip.prop_late_bodylimit_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:30;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"rowCss\";a:7:{s:4:\"name\";s:6:\"rowCss\";s:4:\"desc\";s:26:\"quip.prop_late_rowcss_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:19:\"quip-latest-comment\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"altRowCss\";a:7:{s:4:\"name\";s:9:\"altRowCss\";s:4:\"desc\";s:29:\"quip.prop_late_altrowcss_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:23:\"quip-latest-comment-alt\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:25:\"quip.prop_late_limit_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:5;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:5:\"start\";a:7:{s:4:\"name\";s:5:\"start\";s:4:\"desc\";s:25:\"quip.prop_late_start_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"sortBy\";a:7:{s:4:\"name\";s:6:\"sortBy\";s:4:\"desc\";s:26:\"quip.prop_late_sortby_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:9:\"createdon\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:11:\"sortByAlias\";a:7:{s:4:\"name\";s:11:\"sortByAlias\";s:4:\"desc\";s:31:\"quip.prop_late_sortbyalias_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:12:\"quip.comment\";s:5:\"value\";s:11:\"quipComment\";}i:1;a:2:{s:4:\"text\";s:11:\"quip.author\";s:5:\"value\";s:6:\"Author\";}}s:5:\"value\";s:11:\"quipComment\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:7:\"sortDir\";a:7:{s:4:\"name\";s:7:\"sortDir\";s:4:\"desc\";s:27:\"quip.prop_late_sortdir_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:14:\"quip.ascending\";s:5:\"value\";s:3:\"ASC\";}i:1;a:2:{s:4:\"text\";s:15:\"quip.descending\";s:5:\"value\";s:4:\"DESC\";}}s:5:\"value\";s:4:\"DESC\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:8:\"contexts\";a:7:{s:4:\"name\";s:8:\"contexts\";s:4:\"desc\";s:28:\"quip.prop_late_contexts_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:33:\"quip.prop_late_toplaceholder_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:17:\"placeholderPrefix\";a:7:{s:4:\"name\";s:17:\"placeholderPrefix\";s:4:\"desc\";s:37:\"quip.prop_late_placeholderprefix_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:11:\"quip.latest\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(43,	0,	0,	'QuipReply',	'Displays a reply form for comments.',	0,	8,	0,	'/**\n * Quip\n *\n * Copyright 2010-11 by Shaun McCormick <shaun@modx.com>\n *\n * This file is part of Quip, a simple commenting component for MODx Revolution.\n *\n * Quip is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Quip is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Quip; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\n * Suite 330, Boston, MA 02111-1307 USA\n *\n * @package quip\n */\n/**\n * Displays a reply form for a thread\n *\n * @var modX $modx\n * @var array $scriptProperties\n * @var Quip $quip\n *\n * @name QuipReply\n * @author Shaun McCormick <shaun@modx.com>\n * @package quip\n */\n$quip = $modx->getService(\'quip\',\'Quip\',$modx->getOption(\'quip.core_path\',null,$modx->getOption(\'core_path\').\'components/quip/\').\'model/quip/\',$scriptProperties);\nif (!($quip instanceof Quip)) return \'\';\n\n$quip->initialize($modx->context->get(\'key\'));\n$controller = $quip->loadController(\'ThreadReply\');\n$output = $controller->run($scriptProperties);\nreturn $output;\n\n/* get thread */\n$thread = $modx->getOption(\'quip_thread\',$_REQUEST,$modx->getOption(\'thread\',$scriptProperties,\'\'));\nif (empty($thread)) return \'\';\n$thread = $modx->getObject(\'quipThread\',array(\'name\' => $thread));\nif (!$thread) return \'\';\n\n/* sync properties with thread row values */\n$thread->sync($scriptProperties);\n$ps = $thread->get(\'quipreply_call_params\');\nif (!empty($ps)) {\n    $diff = array_diff_assoc($ps,$scriptProperties);\n    if (empty($diff)) $diff = array_diff_assoc($scriptProperties,$ps);\n}\nif (empty($_REQUEST[\'quip_thread\']) && (!empty($diff) || empty($ps))) { /* only sync call params if not on threaded reply page */\n    $thread->set(\'quipreply_call_params\',$scriptProperties);\n    $thread->save();\n}\n/* if in threaded reply page, get the original passing values to QuipReply in the thread\'s main page and use those */\nif (!empty($_REQUEST[\'quip_thread\']) && is_array($ps) && !empty($ps)) $scriptProperties = array_merge($scriptProperties,$ps);\nunset($ps,$diff);\n\n/* setup default properties */\n$requireAuth = $modx->getOption(\'requireAuth\',$scriptProperties,false);\n$requireUsergroups = $modx->getOption(\'requireUsergroups\',$scriptProperties,false);\n$addCommentTpl = $modx->getOption(\'tplAddComment\',$scriptProperties,\'quipAddComment\');\n$loginToCommentTpl = $modx->getOption(\'tplLoginToComment\',$scriptProperties,\'quipLoginToComment\');\n$previewTpl = $modx->getOption(\'tplPreview\',$scriptProperties,\'quipPreviewComment\');\n$closeAfter = $modx->getOption(\'closeAfter\',$scriptProperties,14);\n$requirePreview = $modx->getOption(\'requirePreview\',$scriptProperties,false);\n$previewAction = $modx->getOption(\'previewAction\',$scriptProperties,\'quip-preview\');\n$postAction = $modx->getOption(\'postAction\',$scriptProperties,\'quip-post\');\n$allowedTags = $modx->getOption(\'quip.allowed_tags\',$scriptProperties,\'<br><b><i>\');\n$preHooks = $modx->getOption(\'preHooks\',$scriptProperties,\'\');\n$postHooks = $modx->getOption(\'postHooks\',$scriptProperties,\'\');\n$unsubscribeAction = $modx->getOption(\'unsubscribeAction\',$scriptProperties,\'quip_unsubscribe\');\n\n/* get parent and auth */\n$parent = $modx->getOption(\'quip_parent\',$_REQUEST,$modx->getOption(\'parent\',$scriptProperties,0));\n$hasAuth = $modx->user->hasSessionContext($modx->context->get(\'key\')) || $modx->getOption(\'debug\',$scriptProperties,false) || empty($requireAuth);\nif (!empty($requireUsergroups)) {\n    $requireUsergroups = explode(\',\',$requireUsergroups);\n    $hasAuth = $modx->user->isMember($requireUsergroups);\n}\n\n/* setup default placeholders */\n$placeholders = array();\n$p = $modx->request->getParameters();\nunset($p[\'reported\'],$p[\'quip_approved\']);\n$placeholders[\'parent\'] = $parent;\n$placeholders[\'thread\'] = $thread->get(\'name\');\n$placeholders[\'url\'] = $modx->makeUrl($modx->resource->get(\'id\'),\'\',$p);\n$placeholders[\'idprefix\'] = $thread->get(\'idprefix\');\n\n/* handle POST */\n$fields = array();\n$hasPreview = false;\nif (!empty($_POST)) {\n    foreach ($_POST as $k => $v) {\n        $fields[$k] = str_replace(array(\'[\',\']\'),array(\'&#91;\',\'&#93;\'),$v);\n    }\n    \n    $fields[\'name\'] = strip_tags($fields[\'name\']);\n    $fields[\'email\'] = strip_tags($fields[\'email\']);\n    $fields[\'website\'] = strip_tags($fields[\'website\']);\n    \n    /* verify a message was posted */\n    if (empty($fields[\'comment\'])) $errors[\'comment\'] = $modx->lexicon(\'quip.message_err_ns\');\n    if (empty($fields[\'name\'])) $errors[\'name\'] = $modx->lexicon(\'quip.name_err_ns\');\n    if (empty($fields[\'email\'])) $errors[\'email\'] = $modx->lexicon(\'quip.email_err_ns\');\n    \n    if (!empty($_POST[$postAction]) && empty($errors)) {\n        $comment = include_once $quip->config[\'processorsPath\'].\'web/comment/create.php\';\n        if (is_object($comment) && $comment instanceof quipComment) {\n            $params = $modx->request->getParameters();\n            unset($params[$postAction],$params[\'quip_parent\'],$params[\'quip_thread\']);\n            $params[\'quip_approved\'] = $comment->get(\'approved\') ? 1 : 0;\n            $url = $comment->makeUrl(\'\',$params);\n\n            /* if not approved, remove # and replace with success message #\n             * since comment is not yet visible\n             */\n            if (!$comment->get(\'approved\')) {\n                $url = str_replace(\'#\'.$thread->get(\'idprefix\').$comment->get(\'id\'),\'#quip-success-\'.$thread->get(\'idprefix\'),$url);\n            }\n            $modx->sendRedirect($url);\n        } else if (is_array($comment)) {\n            $errors = array_merge($errors,$comment);\n        }\n        $fields[$previewAction] = true;\n    }\n    /* handle preview */\n    else if (!empty($fields[$previewAction]) && empty($errors)) {\n        $errors = include_once $quip->config[\'processorsPath\'].\'web/comment/preview.php\';\n    }\n    if (!empty($errors)) {\n        $placeholders[\'error\'] = implode(\"<br />\\n\",$errors);\n        foreach ($errors as $k => $v) {\n            $placeholders[\'error.\'.$k] = $v;\n        }\n        $placeholders = array_merge($placeholders,$fields);\n    }\n}\n/* display moderated success message */\nif (isset($_GET[\'quip_approved\']) && $_GET[\'quip_approved\'] == 0) {\n    $placeholders[\'successMsg\'] = $modx->lexicon(\'quip.comment_will_be_moderated\');\n}\n\n/* handle unsubscribing from thread */\nif (!empty($_GET[$unsubscribeAction]) && $modx->user->hasSessionContext($modx->context->get(\'key\'))) {\n    $profile = $modx->user->getOne(\'Profile\');\n    if ($profile) {\n        $notify = $modx->getObject(\'quipCommentNotify\',array(\n            \'email\' => $profile->get(\'email\'),\n            \'thread\' => $thread,\n        ));\n        if ($notify && $notify->remove()) {\n            $placeholders[\'successMsg\'] = $modx->lexicon(\'quip.unsubscribed\');\n        }\n    }\n}\n\n/* if using recaptcha, load recaptcha html if user is not logged in */\n$disableRecaptchaWhenLoggedIn = (boolean)$modx->getOption(\'disableRecaptchaWhenLoggedIn\',$scriptProperties,true);\n$useRecaptcha = (boolean)$modx->getOption(\'recaptcha\',$scriptProperties,false);\nif ($useRecaptcha && !($disableRecaptchaWhenLoggedIn && $hasAuth) && !$hasPreview) {\n    $recaptcha = $modx->getService(\'recaptcha\',\'reCaptcha\',$quip->config[\'modelPath\'].\'recaptcha/\');\n    if ($recaptcha instanceof reCaptcha) {\n        $recaptchaTheme = $modx->getOption(\'recaptchaTheme\',$scriptProperties,\'clean\');\n        $html = $recaptcha->getHtml($recaptchaTheme);\n        $modx->setPlaceholder(\'quip.recaptcha_html\',$html);\n    } else {\n        return $modx->lexicon(\'quip.recaptcha_err_load\');\n    }\n}\n\n/* build reply form */\n$replyForm = \'\';\n\n$stillOpen = $thread->checkIfStillOpen($closeAfter) && !$modx->getOption(\'closed\',$scriptProperties,false);\nif ($hasAuth && $stillOpen) {\n    $phs = array_merge($placeholders,array(\n        \'username\' => $modx->user->get(\'username\'),\n    ));\n    $phs[\'unsubscribe\'] = \'\';\n\n    /* prefill fields */\n    $profile = $modx->user->getOne(\'Profile\');\n    if ($profile) {\n        $phs[\'name\'] = !empty($fields[\'name\']) ? $fields[\'name\'] : $profile->get(\'fullname\');\n        $phs[\'email\'] = !empty($fields[\'email\']) ? $fields[\'email\'] : $profile->get(\'email\');\n        $phs[\'website\'] = !empty($fields[\'website\']) ? $fields[\'website\'] : $profile->get(\'website\');\n\n        /* allow for unsubscribing for logged-in users */\n        if ($modx->user->hasSessionContext($modx->context->get(\'key\'))) {\n            $notify = $modx->getObject(\'quipCommentNotify\',array(\n                \'email\' => $profile->get(\'email\'),\n                \'thread\' => $thread,\n            ));\n            if ($notify) {\n                $phs[\'notifyId\'] = $notify->get(\'id\');\n                $phs[\'unsubscribe\'] = $quip->getChunk(\'quipUnsubscribe\',$phs);\n                $params = $modx->request->getParameters();\n                $params[$unsubscribeAction] = 1;\n                $phs[\'unsubscribeUrl\'] = $modx->makeUrl($modx->resource->get(\'id\'),\'\',$params);\n            }\n        }\n    }\n\n    /* if requirePreview == false, auto-can post */\n    if (!$requirePreview) {\n        $phs[\'can_post\'] = true;\n    }\n    $phs[\'post_action\'] = $postAction;\n    $phs[\'preview_action\'] = $previewAction;\n    $phs[\'allowed_tags\'] = $allowedTags;\n    $phs[\'notifyChecked\'] = !empty($fields[\'notify\']) ? \' checked=\"checked\"\' : \'\';\n\n    $replyForm = $quip->getChunk($addCommentTpl,$phs);\n} else if (!$stillOpen) {\n    $replyForm = $modx->lexicon(\'quip.thread_autoclosed\');\n} else {\n    $replyForm = $quip->getChunk($loginToCommentTpl,$placeholders);\n}\n\n/* output or set to placeholder */\n$toPlaceholder = $modx->getOption(\'toPlaceholder\',$scriptProperties,false);\nif ($toPlaceholder) {\n    $modx->setPlaceholder($toPlaceholder,$replyForm);\n    return \'\';\n}\nreturn $replyForm;',	0,	'a:34:{s:11:\"requireAuth\";a:7:{s:4:\"name\";s:11:\"requireAuth\";s:4:\"desc\";s:32:\"quip.prop_reply_requireauth_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:17:\"requireUsergroups\";a:7:{s:4:\"name\";s:17:\"requireUsergroups\";s:4:\"desc\";s:38:\"quip.prop_reply_requireusergroups_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:14:\"requirePreview\";a:7:{s:4:\"name\";s:14:\"requirePreview\";s:4:\"desc\";s:35:\"quip.prop_reply_requirepreview_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"closed\";a:7:{s:4:\"name\";s:6:\"closed\";s:4:\"desc\";s:27:\"quip.prop_reply_closed_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"closeAfter\";a:7:{s:4:\"name\";s:10:\"closeAfter\";s:4:\"desc\";s:31:\"quip.prop_reply_closeafter_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:14;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:8:\"moderate\";a:7:{s:4:\"name\";s:8:\"moderate\";s:4:\"desc\";s:29:\"quip.prop_reply_moderate_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:21:\"moderateAnonymousOnly\";a:7:{s:4:\"name\";s:21:\"moderateAnonymousOnly\";s:4:\"desc\";s:42:\"quip.prop_reply_moderateanonymousonly_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:21:\"moderateFirstPostOnly\";a:7:{s:4:\"name\";s:21:\"moderateFirstPostOnly\";s:4:\"desc\";s:42:\"quip.prop_reply_moderatefirstpostonly_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"moderators\";a:7:{s:4:\"name\";s:10:\"moderators\";s:4:\"desc\";s:31:\"quip.prop_reply_moderators_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:14:\"moderatorGroup\";a:7:{s:4:\"name\";s:14:\"moderatorGroup\";s:4:\"desc\";s:35:\"quip.prop_reply_moderatorgroup_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:13:\"Administrator\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:24:\"dontModerateManagerUsers\";a:7:{s:4:\"name\";s:24:\"dontModerateManagerUsers\";s:4:\"desc\";s:45:\"quip.prop_reply_dontmoderatemanagerusers_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"dateFormat\";a:7:{s:4:\"name\";s:10:\"dateFormat\";s:4:\"desc\";s:31:\"quip.prop_reply_dateformat_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:21:\"%b %d, %Y at %I:%M %p\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"useCss\";a:7:{s:4:\"name\";s:6:\"useCss\";s:4:\"desc\";s:27:\"quip.prop_reply_usecss_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:12:\"notifyEmails\";a:7:{s:4:\"name\";s:12:\"notifyEmails\";s:4:\"desc\";s:33:\"quip.prop_reply_notifyemails_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"recaptcha\";a:7:{s:4:\"name\";s:9:\"recaptcha\";s:4:\"desc\";s:30:\"quip.prop_reply_recaptcha_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:14:\"recaptchaTheme\";a:7:{s:4:\"name\";s:14:\"recaptchaTheme\";s:4:\"desc\";s:35:\"quip.prop_reply_recaptchatheme_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:4:{i:0;a:2:{s:4:\"text\";s:12:\"quip.opt_red\";s:5:\"value\";s:3:\"red\";}i:1;a:2:{s:4:\"text\";s:14:\"quip.opt_white\";s:5:\"value\";s:5:\"white\";}i:2;a:2:{s:4:\"text\";s:14:\"quip.opt_clean\";s:5:\"value\";s:5:\"clean\";}i:3;a:2:{s:4:\"text\";s:19:\"quip.opt_blackglass\";s:5:\"value\";s:10:\"blackglass\";}}s:5:\"value\";s:5:\"clean\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:28:\"disableRecaptchaWhenLoggedIn\";a:7:{s:4:\"name\";s:28:\"disableRecaptchaWhenLoggedIn\";s:4:\"desc\";s:49:\"quip.prop_reply_disablerecaptchawhenloggedin_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:16:\"autoConvertLinks\";a:7:{s:4:\"name\";s:16:\"autoConvertLinks\";s:4:\"desc\";s:37:\"quip.prop_reply_autoconvertlinks_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:24:\"extraAutoLinksAttributes\";a:7:{s:4:\"name\";s:24:\"extraAutoLinksAttributes\";s:4:\"desc\";s:45:\"quip.prop_reply_extraautolinksattributes_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:11:\"useGravatar\";a:7:{s:4:\"name\";s:11:\"useGravatar\";s:4:\"desc\";s:32:\"quip.prop_reply_usegravatar_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:12:\"gravatarIcon\";a:7:{s:4:\"name\";s:12:\"gravatarIcon\";s:4:\"desc\";s:33:\"quip.prop_reply_gravataricon_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:9:\"identicon\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:12:\"gravatarSize\";a:7:{s:4:\"name\";s:12:\"gravatarSize\";s:4:\"desc\";s:33:\"quip.prop_reply_gravatarsize_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:50;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:13:\"tplAddComment\";a:7:{s:4:\"name\";s:13:\"tplAddComment\";s:4:\"desc\";s:34:\"quip.prop_reply_tpladdcomment_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:14:\"quipAddComment\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:17:\"tplLoginToComment\";a:7:{s:4:\"name\";s:17:\"tplLoginToComment\";s:4:\"desc\";s:38:\"quip.prop_reply_tpllogintocomment_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:18:\"quipLoginToComment\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"tplPreview\";a:7:{s:4:\"name\";s:10:\"tplPreview\";s:4:\"desc\";s:31:\"quip.prop_reply_tplpreview_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:18:\"quipPreviewComment\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"tplReport\";a:7:{s:4:\"name\";s:9:\"tplReport\";s:4:\"desc\";s:30:\"quip.prop_reply_tplreport_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:10:\"quipReport\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"postAction\";a:7:{s:4:\"name\";s:10:\"postAction\";s:4:\"desc\";s:31:\"quip.prop_reply_postaction_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:9:\"quip-post\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:13:\"previewAction\";a:7:{s:4:\"name\";s:13:\"previewAction\";s:4:\"desc\";s:34:\"quip.prop_reply_previewaction_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:12:\"quip-preview\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:8:\"idPrefix\";a:7:{s:4:\"name\";s:8:\"idPrefix\";s:4:\"desc\";s:29:\"quip.prop_reply_idprefix_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:4:\"qcom\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"redirectTo\";a:7:{s:4:\"name\";s:10:\"redirectTo\";s:4:\"desc\";s:31:\"quip.prop_reply_redirectto_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:13:\"redirectToUrl\";a:7:{s:4:\"name\";s:13:\"redirectToUrl\";s:4:\"desc\";s:34:\"quip.prop_reply_redirecttourl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:5:\"debug\";a:7:{s:4:\"name\";s:5:\"debug\";s:4:\"desc\";s:26:\"quip.prop_reply_debug_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"debugUser\";a:7:{s:4:\"name\";s:9:\"debugUser\";s:4:\"desc\";s:30:\"quip.prop_reply_debuguser_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:11:\"debugUserId\";a:7:{s:4:\"name\";s:11:\"debugUserId\";s:4:\"desc\";s:32:\"quip.prop_reply_debuguserid_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(44,	0,	0,	'QuipRss',	'Generates an RSS of latest comments for a thread or by a user.',	0,	8,	0,	'/**\n * Quip\n *\n * Copyright 2010-11 by Shaun McCormick <shaun@modx.com>\n *\n * This file is part of Quip, a simple commenting component for MODx Revolution.\n *\n * Quip is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Quip is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Quip; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\n * Suite 330, Boston, MA 02111-1307 USA\n *\n * @package quip\n */\n/**\n * QuipLatestComments\n *\n * Generates an RSS of latest comments for a thread or by a user.\n *\n * @var Quip $quip\n * @var modX $modx\n * @var array $scriptProperties\n * \n * @name QuipRss\n * @author Shaun McCormick <shaun@modx.com>\n * @package quip\n */\n$quip = $modx->getService(\'quip\',\'Quip\',$modx->getOption(\'quip.core_path\',null,$modx->getOption(\'core_path\').\'components/quip/\').\'model/quip/\',$scriptProperties);\nif (!($quip instanceof Quip)) return \'\';\n\n/* setup default properties */\n$type = $modx->getOption(\'type\',$scriptProperties,\'all\');\n$tpl = $modx->getOption(\'tpl\',$scriptProperties,\'quipRssComment\');\n$containerTpl = $modx->getOption(\'containerTpl\',$scriptProperties,\'quipRssContainer\');\n$limit = $modx->getOption(\'limit\',$scriptProperties,5);\n$start = $modx->getOption(\'start\',$scriptProperties,0);\n$sortBy = $modx->getOption(\'sortBy\',$scriptProperties,\'createdon\');\n$sortByAlias = $modx->getOption(\'sortByAlias\',$scriptProperties,\'quipComment\');\n$sortDir = $modx->getOption(\'sortDir\',$scriptProperties,\'DESC\');\n\n$dateFormat = $modx->getOption(\'dateFormat\',$scriptProperties,\'%b %d, %Y at %I:%M %p\');\n$stripTags = $modx->getOption(\'stripTags\',$scriptProperties,true);\n$bodyLimit = $modx->getOption(\'bodyLimit\',$scriptProperties,30);\n\n$pagetitle = $modx->getOption(\'pagetitle\',$scriptProperties,\'\');\n\n/* build query by type */\n$c = $modx->newQuery(\'quipComment\');\n$c->select($modx->getSelectColumns(\'quipComment\',\'quipComment\'));\n$c->select(array(\n    \'Resource.pagetitle\',\n));\n$c->leftJoin(\'modUser\',\'Author\');\n$c->leftJoin(\'modResource\',\'Resource\');\nswitch ($type) {\n    case \'user\':\n        if (empty($scriptProperties[\'user\'])) return \'\';\n        if (is_numeric($scriptProperties[\'user\'])) {\n            $c->where(array(\n                \'Author.id\' => $scriptProperties[\'user\'],\n            ));\n        } else {\n            $c->where(array(\n                \'Author.username\' => $scriptProperties[\'user\'],\n            ));\n        }\n        break;\n    case \'thread\':\n        if (empty($scriptProperties[\'thread\'])) return \'\';\n        $c->where(array(\n            \'quipComment.thread\' => $scriptProperties[\'thread\'],\n        ));\n        break;\n    case \'family\':\n        if (empty($scriptProperties[\'family\'])) return \'\';\n        $c->where(array(\n            \'quipComment.thread:LIKE\' => $scriptProperties[\'family\'],\n        ));\n        break;\n    case \'all\':\n    default:\n        break;\n}\n$contexts = $modx->getOption(\'contexts\',$scriptProperties,\'\');\nif (!empty($contexts)) {\n    $c->where(array(\n        \'Resource.context_key:IN\' => explode(\',\',$contexts),\n    ));\n}\n$c->where(array(\n    \'quipComment.deleted\' => false,\n    \'quipComment.approved\' => true,\n));\n$c->sortby(\'`\'.$sortByAlias.\'`.`\'.$sortBy.\'`\',$sortDir);\n$c->limit($limit,$start);\n$comments = $modx->getCollection(\'quipComment\',$c);\n\n/* iterate */\n$pagePlaceholders = array();\n$output = array();\n$alt = false;\n$commentArray = array();\n/** @var quipComment $comment */\nforeach ($comments as $comment) {\n    $commentArray = $comment->toArray();\n    $commentArray[\'bodyLimit\'] = $bodyLimit;\n    $commentArray[\'url\'] = $comment->makeUrl(0,array(),array(\n        \'scheme\' => \'full\',\n    ));\n\n    if (!empty($stripTags)) { $commentArray[\'body\'] = strip_tags($commentArray[\'body\']); }\n\n    $commentArray[\'ago\'] = $quip->getTimeAgo($commentArray[\'createdon\']);\n\n    $output[] = $quip->getChunk($tpl,$commentArray);\n    $alt = !$alt;\n}\n\n/* set page placeholders */\n$pagePlaceholders = array();\n$pagePlaceholders[\'resource\'] = $commentArray[\'resource\'];\n$pagePlaceholders[\'pagetitle\'] = empty($pagetitle)? $commentArray[\'pagetitle\'] : $pagetitle;\n$placeholderPrefix = $modx->getOption(\'placeholderPrefix\',$scriptProperties,\'quip.latest\');\n$modx->toPlaceholders($pagePlaceholders,$placeholderPrefix);\n\n/* generate output and wrap */\n$outputSeparator = $modx->getOption(\'outputSeparator\',$scriptProperties,\"\\n\");\n$output = implode($outputSeparator,$output);\n\nif (!empty($containerTpl)) {\n    $output = $quip->getChunk($containerTpl,array(\n        \'comments\' => $output,\n    ));\n}\n\n/* set to placeholder or return output */\n$toPlaceholder = $modx->getOption(\'toPlaceholder\',$scriptProperties,false);\nif ($toPlaceholder) {\n    $modx->setPlaceholder($toPlaceholder,$output);\n    return \'\';\n}\nreturn $output;',	0,	'a:17:{s:4:\"type\";a:7:{s:4:\"name\";s:4:\"type\";s:4:\"desc\";s:24:\"quip.prop_late_type_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:4:{i:0;a:2:{s:5:\"value\";s:3:\"all\";s:4:\"text\";s:8:\"quip.all\";}i:1;a:2:{s:5:\"value\";s:6:\"thread\";s:4:\"text\";s:11:\"quip.thread\";}i:2;a:2:{s:5:\"value\";s:6:\"family\";s:4:\"text\";s:11:\"quip.family\";}i:3;a:2:{s:5:\"value\";s:4:\"user\";s:4:\"text\";s:9:\"quip.user\";}}s:5:\"value\";s:3:\"all\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:22:\"quip.prop_rss_tpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:14:\"quipRssComment\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:12:\"containerTpl\";a:7:{s:4:\"name\";s:12:\"containerTpl\";s:4:\"desc\";s:31:\"quip.prop_rss_containertpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:16:\"quipRssContainer\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"thread\";a:7:{s:4:\"name\";s:6:\"thread\";s:4:\"desc\";s:26:\"quip.prop_late_thread_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:4:\"user\";a:7:{s:4:\"name\";s:4:\"user\";s:4:\"desc\";s:24:\"quip.prop_late_user_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"family\";a:7:{s:4:\"name\";s:6:\"family\";s:4:\"desc\";s:26:\"quip.prop_late_family_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"stripTags\";a:7:{s:4:\"name\";s:9:\"stripTags\";s:4:\"desc\";s:29:\"quip.prop_late_striptags_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:10:\"dateFormat\";a:7:{s:4:\"name\";s:10:\"dateFormat\";s:4:\"desc\";s:30:\"quip.prop_late_dateformat_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:21:\"%b %d, %Y at %I:%M %p\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:9:\"bodyLimit\";a:7:{s:4:\"name\";s:9:\"bodyLimit\";s:4:\"desc\";s:29:\"quip.prop_late_bodylimit_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:30;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:25:\"quip.prop_late_limit_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:5;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:5:\"start\";a:7:{s:4:\"name\";s:5:\"start\";s:4:\"desc\";s:25:\"quip.prop_late_start_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:0;s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:6:\"sortBy\";a:7:{s:4:\"name\";s:6:\"sortBy\";s:4:\"desc\";s:26:\"quip.prop_late_sortby_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:9:\"createdon\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:11:\"sortByAlias\";a:7:{s:4:\"name\";s:11:\"sortByAlias\";s:4:\"desc\";s:31:\"quip.prop_late_sortbyalias_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:12:\"quip.comment\";s:5:\"value\";s:11:\"quipComment\";}i:1;a:2:{s:4:\"text\";s:11:\"quip.author\";s:5:\"value\";s:6:\"Author\";}}s:5:\"value\";s:11:\"quipComment\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:7:\"sortDir\";a:7:{s:4:\"name\";s:7:\"sortDir\";s:4:\"desc\";s:27:\"quip.prop_late_sortdir_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:4:\"text\";s:14:\"quip.ascending\";s:5:\"value\";s:3:\"ASC\";}i:1;a:2:{s:4:\"text\";s:15:\"quip.descending\";s:5:\"value\";s:4:\"DESC\";}}s:5:\"value\";s:4:\"DESC\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:8:\"contexts\";a:7:{s:4:\"name\";s:8:\"contexts\";s:4:\"desc\";s:28:\"quip.prop_late_contexts_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:33:\"quip.prop_late_toplaceholder_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}s:17:\"placeholderPrefix\";a:7:{s:4:\"name\";s:17:\"placeholderPrefix\";s:4:\"desc\";s:36:\"quip.prop_rss_placeholderprefix_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:11:\"quip.latest\";s:7:\"lexicon\";s:15:\"quip:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(120,	1,	0,	'isAuthRedirect',	'',	0,	0,	0,	'$user = $modx->getUser();\nif ($user and ($user->isAuthenticated() and ($user->isMember(\'Users\') or $user->isMember(\'Administrator\')))) {\n   $url = $modx->makeUrl(100, \"\", \"\", \"full\");\n   $modx->sendRedirect($url);\n}',	0,	NULL,	'',	1,	'core/elements/snippets/isAuthRedirect.php'),
(121,	1,	0,	'StercSeoSiteMap',	'',	0,	0,	0,	'require_once $modx->getOption(\'stercseo.core_path\', null, $modx->getOption(\'core_path\').\'components/stercseo/\').\'model/stercseo/stercseo.class.php\';\n$stercseo       = new StercSeo($modx, $scriptProperties);\n$allowSymlinks  = (isset($allowSymlinks)) ? $allowSymlinks : 0;\n$contexts       = (isset($contexts)) ? explode(\',\',str_replace(\' \', \'\', $contexts)) : array($modx->resource->get(\'context_key\'));\n$outerTpl       = (isset($outerTpl)) ? $outerTpl : \'sitemap/outertpl\';\n$rowTpl         = (isset($rowTpl)) ? $rowTpl : \'sitemap/rowtpl\';\n$alternateTpl   = (isset($alternateTpl)) ? $alternateTpl : \'sitemap/alternatetpl\';\n$type           = (isset($type)) ? $type : \'\';\n$indexOuterTpl  = (isset($indexOuterTpl)) ? $indexOuterTpl : \'sitemap/index/outertpl\';\n$indexRowTpl    = (isset($indexRowTpl)) ? $indexRowTpl : \'sitemap/index/rowtpl\';\n$imagesOuterTpl = (isset($imageOuterTPl)) ? $imagesOuterTpl : \'sitemap/images/outertpl\';\n$imagesRowTpl   = (isset($imagesRowTpl)) ? $imagesRowTpl : \'sitemap/images/rowtpl\';\n$imageTpl       = (isset($imageTpl)) ? $imageTpl : \'sitemap/images/imagetpl\';\n$templates      = (isset($templates)) ? $templates : \'\';\n\n$options = array(\n    \'outerTpl\'       => $outerTpl,\n    \'rowTpl\'         => $rowTpl,\n    \'alternateTpl\'   => $alternateTpl,\n    \'type\'           => $type,\n    \'indexOuterTpl\'  => $indexOuterTpl,\n    \'indexRowTpl\'    => $indexRowTpl,\n    \'imagesOuterTpl\' => $imagesOuterTpl,\n    \'imagesRowTpl\'   => $imagesRowTpl,\n    \'imageTpl\'       => $imageTpl,\n    \'templates\'      => $templates\n);\n\nreturn $stercseo->sitemap($contexts, $allowSymlinks, $options);',	0,	NULL,	'',	1,	'core/elements/snippets/StercSeoSiteMap.php'),
(122,	1,	0,	'bd',	'',	0,	0,	0,	'// $bd = mysqli_connect(\'localhost\',\'root\',\'\',\'phone\');\n// $bd = mysqli_connect(\'sql354.your-server.de\',\'aacall_sms\',\'Ns2bDTNS1FwuJNMX\',\'aacall_sms\');\n$bd = mysqli_connect(\'localhost\',\'admin\',\'hfKJbTkMW9UWJjTCb7Xr\',\'sms\');\n\n    $bd->query(\"SET NAMES utf8\");\n    $bd->query(\"SET CHARACTER SET utf8\");\n    $bd->set_charset(\'utf8\');\n    $bd->set_charset(\'utf-8\');',	0,	NULL,	'',	1,	'core/elements/snippets/bd.php'),
(123,	1,	0,	'MetaX',	'',	0,	0,	0,	'/*\r\n	MetaX (Meta Tags Extended) for Revolution\r\n	Version: 2.0.2\r\n	Author: Salvatore Sodano - http://salscode.com\r\n	Other Contributors:\r\n		Mike Stop Continues - http://mikestopcontinues.com\r\n		Jakob Class - http://www.class-zec.de <jakob.class@class-zec.de>\r\n		Stefan Rochlitzer - icebear-solutions.com <Stefan.Rochlitzer@icebear-solutions.com>\r\n	Support Page: http://salscode.com/index.php?id=93\r\n\r\n	Description: Automatically generates Meta tags for your pages, along with a base and a couple link tags.\r\n	For a full description visit http://rtfm.modx.com/extras/revo/metax.\r\n\r\n	MODx Versions:\r\n	Evolution - This is the Revo version, visit http://modx.com/extras/package/metax-evo for Evo.\r\n	Revolution - All versions, tested up to 2.3.\r\n\r\n	Parameters:\r\n	http://rtfm.modx.com/extras/revo/metax\r\n*/\r\n/**********Variables***********/\r\n$configs = $modx->getConfig();\r\n$sitename = trim($configs[\'site_name\']);\r\n$sitestart = trim($configs[\'site_start\']);\r\n \r\n//HTML\r\n$html = empty($html) ? 0 : $html;\r\n$html5 = empty($html5) ? 0 : $html5;\r\n \r\n//Favicon Relative Path - Default is set to the site root, shown below.\r\n//If the code for your favicon does not display, then the below path may be incorrect.\r\n$favicon = empty($favicon) ? \'favicon.ico\' : $favicon;\r\n$mobile = empty($mobile) ? \'mobile.png\' : $mobile;\r\n\r\n//Copyrighted until - Blank defaults to current year.\r\n$copytill = empty($copytill) ? \'\' : $copytill;\r\n\r\n//Copyrighted since - Blank omits this from view.\r\n$copyfrom = empty($copyfrom) ? \'\' : $copyfrom;\r\n\r\n//RSS & CSS\r\n$rss = empty($rss) ? \'\' : $rss;\r\n$css = empty($css) ? \'\' : $css;\r\n\r\n$id = $modx->resource->get(\'id\');\r\n$siteurl = $configs[\'site_url\'];\r\n\r\n/*----------End Variables----------*/\r\n\r\nif($html5 == 1) {$html = 2;}\r\nswitch ($html)\r\n{\r\n	default:\r\n	case 0:\r\n		$tagend = \" />\";\r\n		$tpl = empty($tpl) ? \'metax-xhtml4\' : $tpl;\r\n		break;\r\n	case 1:\r\n		$tagend = \" >\";\r\n		$tpl = empty($tpl) ? \'metax-html4\' : $tpl;\r\n		break;\r\n	case 2:\r\n		$tagend = \" />\";\r\n		$tpl = empty($tpl) ? \'metax-html5\' : $tpl;\r\n		break;\r\n}\r\n/*--------------------*/\r\n\r\n/**Robots**/\r\n$tmp = $modx->resource->get(\'searchable\');\r\nif ($tmp == 1) {$output[\"metax.robots\"] = \"index, follow\";}\r\nelse {$output[\"metax.robots\"] = \"noindex, nofollow\";}\r\n/*--------------------*/\r\n\r\n/**Creator/Editor**/\r\n$created = $modx->resource->get(\'createdby\');\r\nif ($created != \'\')\r\n{\r\n	$user = $modx->getObject(\"modUser\", $created);\r\n	if($user != NULL) {$output[\"metax.createdby\"] = $user->getOne(\"Profile\")->get(\"fullname\");}\r\n	else {$output[\"metax.createdby\"] = $sitename;}\r\n}\r\n$edited = $modx->resource->get(\'editedby\');\r\nif ($edited != \'\')\r\n{\r\n	$user = $modx->getObject(\"modUser\", $edited);\r\n	if($user != NULL) {$output[\"metax.editedby\"] = $user->getOne(\"Profile\")->get(\"fullname\");}\r\n	else {$output[\"metax.editedby\"] = $sitename;}\r\n}\r\n/*--------------------*/\r\n\r\n/**Copyright**/\r\nif ($copyfrom != \'\' && $copytill != \'\' && $copyfrom != $copytill) {$copyyears = $copyfrom.\" - \".$copytill;}\r\nelseif (($copyfrom == \'\' && $copytill != \'\') || ($copytill != \'\' && $copytill == $copyfrom)) {$copyyears = $copytill;}\r\nelseif ($copyfrom != \'\' && $copytill == \'\') {$copyyears = $copyfrom.\" - \".date(\'Y\');}\r\nelseif ($copyfrom == \'\' && $copytill == \'\') {$copyyears = date(\'Y\');}\r\n$output[\"metax.copyyears\"] = $copyyears;\r\n/*--------------------*/\r\n\r\n/**Pragma & Cache-Control**/\r\n$pragma = $modx->resource->get(\'cacheable\');\r\nif ($pragma == 1)\r\n{\r\n	if($html5 != 1) {$output[\"metax.cache\"] = \"cache\";}\r\n	else {$output[\"metax.cache\"] = \"public\";}\r\n}\r\nelse {$output[\"metax.cache\"] = \"no-cache\";}\r\n\r\n/**Canonical Link**/\r\nif (!isset($urlExtension))\r\n{\r\n	$urlExtension = \'\';\r\n}\r\n\r\nif ($id == $sitestart) {$output[\"metax.canonical\"] = $siteurl.$urlExtension;}\r\nelse\r\n{\r\n	$urlExtension = \'\';\r\n	try\r\n	{\r\n		if($modx->getObject(\'modSnippet\', array(\'name\' => \'Archivist\')) != NULL)\r\n		{\r\n			/* Support for FURLs created by Archivist: append year and month to canonical url */\r\n			$archivistFilterPrefix = $modx->getOption(\'archivistFilterPrefix\',$scriptProperties,\'arc_\');\r\n			$archivist = $modx->getService(\'archivist\',\'Archivist\',$modx->getOption(\'archivist.core_path\',null,$modx->getOption(\'core_path\').\'components/archivist/\').\'model/archivist/\',array(\'filterPrefix\' => $archivistFilterPrefix));\r\n			if (($archivist instanceof Archivist))\r\n			{\r\n				// Archivist is installed...\r\n				$year = $modx->getOption($archivistFilterPrefix.\'year\',$_REQUEST,$modx->getOption(\'year\',$scriptProperties,\'\'));\r\n				$year = (int)$archivist->sanitize($year);\r\n				if(!empty($year)) {$urlExtension = $year;}\r\n				$month = $modx->getOption($archivistFilterPrefix.\'month\',$_REQUEST,$modx->getOption(\'month\',$scriptProperties,\'\'));\r\n				$month = (int)$archivist->sanitize($month);\r\n				if (!empty($month))\r\n				{\r\n					if (strlen($month) == 1) $month = \'0\'.$month;\r\n					$urlExtension .= \'/\'.$month;\r\n				}\r\n			}\r\n		}\r\n	}\r\n	catch (Exception $e) {/*No Archivist, do nothing.*/}\r\n	$output[\"metax.canonical\"] = $modx->makeUrl($id, \'\', \'\', \'full\').$urlExtension;\r\n}\r\n/*--------------------*/\r\n\r\n/**Favicon**/\r\nif (is_file($favicon)) {$favicon = $siteurl.$favicon;}\r\nelse {$favicon = \'\';}\r\n$output[\"metax.favicon\"] = $favicon;\r\n\r\n/**Mobile icon**/\r\nif (is_file($mobile)) {$mobile = $siteurl.$mobile;}\r\nelse {$mobile = \'\';}\r\n$output[\"metax.mobile\"] = $mobile;\r\n/*--------------------*/\r\n\r\n/**RSS Feed**/\r\n$rss = explode(\",\", $rss);\r\n$count = count($rss);\r\n$i = 0;\r\n$output[\"metax.rss\"] = \"\";\r\nwhile ($i < $count)\r\n{\r\n	$rss[$i] = trim($rss[$i]);\r\n	$tmpdoc = $modx->getObject(\'modResource\',array(\'id\' => $rss[$i]));\r\n	if ($tmpdoc != NULL)\r\n	{\r\n		$output[\"metax.rss\"] .= \"<link href=\\\"\".$modx->makeUrl($rss[$i], \'\', \'\', \'full\').\"\\\" rel=\\\"alternate\\\" type=\\\"application/rss+xml\\\" title=\\\"\".$tmpdoc->get(\'pagetitle\').\"\\\"\".$tagend;\r\n	}\r\n	$i++;\r\n	if($i < $count) {$output[\"metax.rss\"] .= \"\\n\";}\r\n}\r\n/*--------------------*/\r\n\r\n/**CSS Links**/\r\n$css = explode(\",\", $css);\r\n$count = count($css);\r\n$i = 0;\r\nwhile ($i < $count)\r\n{\r\n	$temp = $css[$i];\r\n	$temp = explode(\":\", $temp);\r\n	$countt = count($temp);\r\n	$temp[0] = trim($temp[0]);\r\n	if (is_file($temp[0]))\r\n	{\r\n		if ($countt == 1) {$output[\"metax.css\"] .= \"<link rel=\\\"stylesheet\\\" href=\\\"\".$temp[0].\"\\\" type=\\\"text/css\\\"\".$tagend;}\r\n		else\r\n		{\r\n			$temp[1] = trim($temp[1]);\r\n			$output[\"metax.css\"] .= \"<!--[if \".$temp[1].\"]><link rel=\\\"stylesheet\\\" href=\\\"\".$temp[0].\"\\\" type=\\\"text/css\\\"\".$tagend.\"<![endif]-->\";\r\n		}\r\n	}\r\n	$i++;\r\n	if($i < $count) {$output[\"metax.css\"] .= \"\\n\";}\r\n}\r\n/*--------------------*/\r\n\r\nreturn $modx->getChunk($tpl, $output);',	0,	NULL,	'',	1,	'core/elements/snippets/MetaX.php'),
(124,	0,	0,	'ActiveUsers',	'Shows a list of active, logged-in users.',	0,	17,	0,	'/**\n * Login\n *\n * Copyright 2010 by Shaun McCormick <shaun+login@modx.com>\n *\n * Login is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Login is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Login; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * @package login\n */\n/**\n * Shows a list of active, signed-on users\n *\n * @var modX $modx\n * @var Login $login\n * @var array $scriptProperties\n *\n * @package login\n **/\nrequire_once $modx->getOption(\'login.core_path\',null,$modx->getOption(\'core_path\').\'components/login/\').\'model/login/login.class.php\';\n$login = new Login($modx,$scriptProperties);\n\n$controller = $login->loadController(\'ActiveUsers\');\n$output = $controller->run($scriptProperties);\nreturn $output;',	0,	'a:9:{s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:20:\"prop_activeusers.tpl\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:13:\"lgnActiveUser\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:7:\"tplType\";a:7:{s:4:\"name\";s:7:\"tplType\";s:4:\"desc\";s:24:\"prop_activeusers.tplType\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:4:{i:0;a:2:{s:5:\"value\";s:8:\"modChunk\";s:4:\"text\";s:18:\"opt_register.chunk\";}i:1;a:2:{s:5:\"value\";s:4:\"file\";s:4:\"text\";s:17:\"opt_register.file\";}i:2;a:2:{s:5:\"value\";s:6:\"inline\";s:4:\"text\";s:19:\"opt_register.inline\";}i:3;a:2:{s:5:\"value\";s:8:\"embedded\";s:4:\"text\";s:21:\"opt_register.embedded\";}}s:5:\"value\";s:8:\"modChunk\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:6:\"sortBy\";a:7:{s:4:\"name\";s:6:\"sortBy\";s:4:\"desc\";s:23:\"prop_activeusers.sortBy\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:8:\"username\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:7:\"sortDir\";a:7:{s:4:\"name\";s:7:\"sortDir\";s:4:\"desc\";s:24:\"prop_activeusers.sortDir\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:2:{i:0;a:2:{s:5:\"value\";s:3:\"ASC\";s:4:\"text\";s:16:\"opt_register.asc\";}i:1;a:2:{s:5:\"value\";s:4:\"DESC\";s:4:\"text\";s:17:\"opt_register.desc\";}}s:5:\"value\";s:4:\"DESC\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:22:\"prop_activeusers.limit\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:2:\"10\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:6:\"offset\";a:7:{s:4:\"name\";s:6:\"offset\";s:4:\"desc\";s:23:\"prop_activeusers.offset\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:1:\"0\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:8:\"classKey\";a:7:{s:4:\"name\";s:8:\"classKey\";s:4:\"desc\";s:25:\"prop_activeusers.classKey\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:7:\"modUser\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:17:\"placeholderPrefix\";a:7:{s:4:\"name\";s:17:\"placeholderPrefix\";s:4:\"desc\";s:39:\"prop_activeusers.placeholderprefix_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:3:\"au.\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:35:\"prop_activeusers.toplaceholder_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(125,	1,	0,	'pthumb',	'',	0,	0,	0,	'/**\n * pThumb\n * Copyright 2013-2014 Jason Grant\n *\n * Please see the GitHub page for documentation or to report bugs:\n * https://github.com/oo12/phpThumbOf\n *\n * Forked from phpThumbOf 1.4.0\n * Copyright 2009-2012 by Shaun McCormick <shaun@modx.com>\n *\n * pThumb is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; either version 2 of the License, or (at your option) any\n * later version.\n *\n * pThumb is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * phpThumbOf; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n */\n/**\n *\n * @var modX $modx\n * @var array $scriptProperties\n * @var string $input\n * @var string|array $options\n *\n */\n\nif (empty($input)) {  // Exit quietly if no file name given\n	return;\n}\n\n$scriptProperties[\'debug\'] = isset($debug) ? $debug : false;\n\n\nstatic $pt_settings = array();\n\nif (empty($pt_settings)) {\n	if (!$modx->loadClass(\'phpThumbOf\', MODX_CORE_PATH . \'components/phpthumbof/model/\', true, true)) {\n		$modx->log(modX::LOG_LEVEL_ERROR, \'[pThumb] Could not load phpThumbOf class.\');\n		return $input;\n	}\n}\n\n$pThumb = new phpThumbOf($modx, $pt_settings, $scriptProperties);\n\n$result = $pThumb->createThumbnail($input, $options);\n\nif (!empty($toPlaceholder) || $result[\'outputDims\']) {\n	if ($result[\'width\'] === \'\' && $result[\'file\'] && $dims = getimagesize($result[\'file\']) ) {\n			$result[\'width\'] = $dims[0];\n			$result[\'height\'] = $dims[1];\n	}\n	if (!empty($toPlaceholder)) {\n		$modx->setPlaceholders(array(\n			$toPlaceholder => $result[\'src\'],\n			\"$toPlaceholder.width\" => $result[\'width\'],\n			\"$toPlaceholder.height\" => $result[\'height\']\n		));\n		$output = \'\';\n	}\n	if ($result[\'outputDims\']) {\n		$output = \"src=\\\"{$result[\'src\']}\\\"\" . ($result[\'width\'] ? \" width=\\\"{$result[\'width\']}\\\" height=\\\"{$result[\'height\']}\\\"\" : \'\');\n	}\n}\nelse {\n	$output = $result[\'src\'];\n}\n\nif ($debug && $result[\'success\']) {  // if debugging is on and createThumbnail was successful, log the debug info\n	$pThumb->debugmsg(isset($pThumb->phpThumb->debugmessages) ? \':: Processed ::\' : \":: Loaded from cache: {$result[\'src\']}\", true);\n}\n\nreturn $output;',	0,	NULL,	'',	1,	'core/elements/snippets/pthumb.php'),
(126,	0,	0,	'isLoggedIn',	'Checks to see if the user is logged in. If not, redirects to Unauthorized Page.',	0,	17,	0,	'/**\n * isLoggedIn\n *\n * Copyright 2009-2011 by Shaun McCormick <shaun@modx.com>\n *\n * isLoggedIn is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * isLoggedIn is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * isLoggedIn; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * @package login\n */\n/**\n * MODx isLoggedIn Snippet. Will check to see if user is logged into the current\n * or specific context. If not, redirects to unauthorized page.\n *\n * @package login\n */\n/* setup default properties */\n$ctxs = !empty($ctxs) ? $ctxs : $modx->context->get(\'key\');\nif (!is_array($ctxs)) $ctxs = explode(\',\',$ctxs);\n\nif (!$modx->user->hasSessionContext($ctxs)) {\n    if (!empty($redirectTo)) {\n        $redirectParams = !empty($redirectParams) ? $modx->fromJSON($redirectParams) : \'\';\n        $url = $modx->makeUrl($redirectTo,\'\',$redirectParams,\'full\');\n        $modx->sendRedirect($url);\n    } else {\n        $modx->sendUnauthorizedPage();\n    }\n}\nreturn \'\';',	0,	'a:3:{s:8:\"contexts\";a:7:{s:4:\"name\";s:8:\"contexts\";s:4:\"desc\";s:29:\"prop_isloggedin.contexts_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:10:\"redirectTo\";a:7:{s:4:\"name\";s:10:\"redirectTo\";s:4:\"desc\";s:31:\"prop_isloggedin.redirectto_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:14:\"redirectParams\";a:7:{s:4:\"name\";s:14:\"redirectParams\";s:4:\"desc\";s:35:\"prop_isloggedin.redirectparams_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(127,	1,	0,	'Calculator1',	'',	0,	0,	0,	'require_once($_SERVER[\'DOCUMENT_ROOT\'].\'/core/components/phpmailer/PHPMailerAutoload.php\');\n$mail = new PHPMailer;\n$mail->CharSet = \'utf-8\';\n\n$name = $_POST[\'Name\'];\n$email = $_POST[\'Email\'];\n$KLVMENEGEROV = $_POST[\'KLVMENEGEROV\'];\n\n$DELAUT__VHOD = $_POST[\'DELAUT__VHOD\'];\n$PRIN__WHOD = $_POST[\'PRIN__WHOD\'];\n$KOL__PROD__V__MES = $_POST[\'KOL__PROD__V__MES\'];\n$SRED__CHECK = $_POST[\'SRED__CHECK\'];\n$PVA = $_POST[\'PVA\'];\n$PCRM = $_POST[\'PCRM\'];\n$VGMIP = $_POST[\'VGMIP\'];\n$VPZS = $_POST[\'VPZS\'];\n$VZVPDK = $_POST[\'VZVPDK\'];\n$AFCT = $_POST[\'AFCT\'];\n$IVN = $_POST[\'IVN\'];\n$SSPVZ = $_POST[\'SSPVZ\'];\n$UNS = $_POST[\'UNS\'];\n$result = $_POST[\'result\'];\n//$mail->SMTPDebug = 3;                               // Enable verbose debug output\n\nif ($PVA == \'on\') {\n    $PVA = \"Да\";\n}\nif ($PVA == \'\') {\n    $PVA = \"Нет\";\n}\n\nif ($PCRM == \'on\') {\n    $PCRM = \"Да\";\n}\nif ($PCRM == \'\') {\n    $PCRM = \"Нет\";\n}\n\nif ($VGMIP == \'on\') {\n    $VGMIP = \"Да\";\n}\nif ($VGMIP == \'\') {\n    $VGMIP = \"Нет\";\n}\nif ($VPZS == \'on\') {\n    $VPZS = \"Да\";\n}\nif ($VPZS == \'\') {\n    $VPZS = \"Нет\";\n}\nif ($VZVPDK == \'on\') {\n    $VZVPDK = \"Да\";\n}\nif ($VZVPDK == \'\') {\n    $VZVPDK = \"Нет\";\n}\nif ($AFCT == \'on\') {\n    $AFCT = \"Да\";\n}\nif ($AFCT == \'\') {\n    $AFCT = \"Нет\";\n}\nif ($IVN == \'on\') {\n    $IVN = \"Да\";\n}\nif ($IVN == \'\') {\n    $IVN = \"Нет\";\n}\nif ($SSPVZ == \'on\') {\n    $SSPVZ = \"Да\";\n}\nif ($SSPVZ == \'\') {\n    $SSPVZ = \"Нет\";\n}\nif ($UNS == \'on\') {\n    $UNS = \"Да\";\n}\nif ($UNS == \'\') {\n    $UNS = \"Нет\";\n}\n\n$mail->isSMTP();                                      // Set mailer to use SMTP\n$mail->Host = \'smtp.yandex.ru\';                                                                                             // Specify main and backup SMTP servers\n$mail->SMTPAuth = true;                               // Enable SMTP authentication\n$mail->Username = \'no_replay@a1call.me\'; // Ваш логин от почты с которой будут отправляться письма\n$mail->Password = \'KZdVb4t4hNwY5^jx\'; // Ваш пароль от почты с которой будут отправляться письма\n$mail->SMTPSecure = \'TLS\';                            // Enable TLS encryption, `ssl` also accepted\n$mail->Port = 587; // TCP port to connect to / этот порт может отличаться у других провайдеров\n\n$mail->setFrom(\'no_replay@a1call.me\'); // от кого будет уходить письмо?\n$mail->addAddress(\'mrmegatest@gmail.com\');     // Кому будет уходить письмо\n$mail->isHTML(true);                                  // Set email format to HTML\n\n$mail->Subject = \'Польза Виртуальной АТС\';\n$mail->Body    = \'\' .$name . \' оставил заявку, <br>Почта этого пользователя: \' .$email. \',<br> Кол-во менеджеров: \' .$KLVMENEGEROV. \'.<br> Делают исходящих звонков в день (клиентам): \' .$DELAUT__VHOD. \',<br> Принимают входящих звонков в день (от клиентов): \' .$PRIN__WHOD. \',<br> Количество продаж в месяц (всего):\' .$KOL__PROD__V__MES. \',<br> Средний чек:\' .$SRED__CHECK. \',<br> Подключаемые опции:<br> Подключаем Виртуальную АТС: \' .$PVA. \",<br> Подключаем CRM: \" .$PCRM. \",<br> Включить голосовое меню и приветствие: \" .$VGMIP. \",<br> Включить приём звонков системой: \" .$VPZS. \",<br> Включить запись всех разговоров для контроля менеджеров: \" .$VZVPDK. \",<br> Активировать функцию Call Tracking: \" .$AFCT. \",<br> Использовать виртуальные номера: \" .$IVN. \",<br> Собирать статистику по всем звонкам: \" .$SSPVZ. \",<br> Установить на сайт виджет Ловец Лидов: \" .$UNS. \",<br> доход за месяц: \" .$result. \' грн\';\n$mail->AltBody = \'\';\n\nif(!$mail->send()) {\n    echo \'Error\';\n} else {\n    echo \'Есть\';\n}',	0,	NULL,	'',	1,	'core/elements/snippets/Calculator1.php'),
(128,	1,	0,	'form_sms2',	'',	0,	0,	0,	'$host = \'localhost\';\n$username = \'admin\';\n$password = \'hfKJbTkMW9UWJjTCb7Xr\';\n$dbname = \'sms\';\n$charset = \'utf8\';\n \n/*\nif (isset($_COOKIE[\'_gcl_au\'])) {\n}else{\n   header(\"Location:http://78.47.124.109/\");\n   exit();\n}\n*/\n$dsn = \"mysql:host=$host;dbname=$dbname;charset=$charset\";\n$xpdo = new xPDO($dsn, $username, $password);\n \n// Test your connection\n \n// Issue queries against the foreign database:\nif (isset($_POST[\'sbt\'])) {\n   $send_phone = $_POST[\'sender_phone\'] ? $_POST[\'sender_phone\'] : \'\';\n	$se_phone = $_POST[\'se_phone\'];\n	$phone = str_replace(\'+\', \'\', $_POST[\'phone\']);\n	$text = $_POST[\'text\'];\n	$time = time();\n	$link = \"https://voip.a1call.me/api/message?_login=bulgakov_test_sms&_password=oG0kOzuQ&source_name=GiftSMS&source_number=$send_phone&destination_number=$phone&body=$text&require_dlr=1\";\n	$ch = curl_init();\n	curl_setopt($ch, CURLOPT_URL, $link);\n	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n$result = curl_exec($ch);\n	        $err = curl_errno($ch);\n	        $errmsg = curl_error($ch);\n	        $header = curl_getinfo($ch);\n	        curl_close($ch);\ndie($result);\n$result = json_decode($result, 1);\n\n	$req_time = time();\n	$stats = $result[\'data\'][\'attributes\'][\'status\'];\n	$id = $result[\'data\'][\'id\'];\n	$query = \"INSERT INTO `request`(`time`, `status`, `number`, `se_phone`, `service_id`, `user`) VALUES (\'$req_time\',\'$stats\',\'$phone\',\'$send_phone\',\'$id\',\'$user\')\";\n	$xpdo->query($query);\n}\n?>\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n	<meta charset=\"UTF-8\">\n	<meta name=\"viewport\" content=\"width=s, initial-scale=1.0\">\n	<title>Document</title>\n</head>\n<body>\n	<style>\n* {\n   box-sizing: border-box;\n}\n.decor {\n    position: relative;\n    max-width: 600px;\n    margin: 0px auto 0px;\n    border-radius: 30px;\n    background-color: #f7f7f7;\n    margin-bottom: 20px;\n    margin-top: 20px;\n}\n.form-left-decoration, .form-right-decoration {\n   content: \"\";\n   position: absolute;\n   width: 50px;\n   height: 20px;\n   background: #008337;\n   border-radius: 20px;\n}\n.form-left-decoration {\n   bottom: 60px;\n   left: -30px;\n}\n.form-right-decoration {\n   top: 60px;\n   right: -30px;\n}\n.form-left-decoration:before, .form-left-decoration:after, .form-right-decoration:before, .form-right-decoration:after {\n   content: \"\";\n   position: absolute;\n   width: 50px;\n   height: 20px;\n   border-radius: 30px;\n   background: white;\n}\n.form-left-decoration:before {\n   top: -20px;\n}\n.form-left-decoration:after {\n   top: 20px;\n   left: 10px;\n}\n.form-right-decoration:before {\n   top: -20px;\n   right: 0;\n}\n.form-right-decoration:after {\n   top: 20px;\n   right: 10px;\n}\n.circle {\n   position: absolute;\n   bottom: 80px;\n   left: -55px;\n   width: 20px;\n   height: 20px;\n   border-radius: 50%;\n   background: white;\n}\n.form-inner {\n   padding: 50px;\n}\n.form-inner input, .form-inner textarea, .form-inner select {\n   display: block;\n   width: 100%;\n   padding: 0 20px;\n   margin-bottom: 10px;\n   background: #E9EFF6;\n   line-height: 40px;\n   border-width: 0;\n   border-radius: 20px;\n   font-family: \'Roboto\', sans-serif;\n   margin: 8px;\n}\n.form-inner input[type=\"submit\"] {\n   margin-top: 30px;\n   background: #008337;\n   border-bottom: 4px solid #008300;\n   color: white;\n   font-size: 14px;\n}\n.form-inner textarea {\n   resize: none;\n}\n.form-inner h3 {\n   margin-top: 0;\n   font-family: \'Roboto\', sans-serif;\n   font-weight: 500;\n   font-size: 24px;\n   color: #707981;\n}\n	</style>\n	<form class=\"decor\" action=\"http://78.47.124.109/assets/test/send.php\" method=\"post\">\n		<div class=\"form-left-decoration\"></div>\n		<div class=\"form-right-decoration\"></div>\n		<div class=\"circle\"></div>\n		<div class=\"form-inner\">\n<b>Номер получателя</b>\n      <input type=\"text\" placeholder=\"Номер\" name=\"phone\" class=\"phone\" required>\n<b>Номер отправителя</b>\n		<input type=\"text\" placeholder=\"От Кого\" name=\"sender_phone\" class=\"phones\">\n<b>Контакты</b>\n      <select style=\"padding: 12px;border-radius: 5px;\" name=\"se_phone\" id=\"\" class=\"se_phone\" onchange=\"Phone(this)\">\n         <?php \n            $sql = \"SELECT * FROM `phone`  WHERE user=\'$user\'\";\n            $data = $xpdo->query($sql);\n            while ($cat = $data->fetch()) { ?>\n            <option value=\"<?=$cat[\'phone\']?>\"><?=$cat[\'contact\']?></option>\n           <?php  }\n         ?>\n      </select>\n		<textarea placeholder=\"Сообщение...\" rows=\"3\"  name=\"text\"></textarea>\n                <input type=\"text\" hidden name=\"user\" value=\"<?=$user?>\"  style=\"display:none;\">\n		<input type=\"submit\" name=\"sbt\">\n		</div>\n	</form>\n   <script>\n      function Phone(e){\n         console.log(e)\n         let phone = document.querySelector(\'.phone\');\n         phone.value = e.value\n      }\n   </script>\n</body>\n</html>\n<?php',	0,	NULL,	'',	1,	'core/elements/snippets/form_sms2.php'),
(129,	1,	0,	'sitemap',	'',	0,	0,	0,	'list of all published documents.\n# 1.0.3\n- Added ability to specify the XSL URL - you don\'t always need one and it \n  seems to create a lot of support confusion!\n  It is now a parameter (&xsl=``) which can take either an alias or a doc ID (ncrossland)\n- Modifications suggested by forum users Grad and Picachu incorporated\n  (http://modxcms.com/forums/index.php/topic,5754.60.html)\n# 1.0.2\n- Reworked fetching of template variable value to\n  get INHERITED value.\n# 1.0.1\n- Reworked fetching of template variable value,\n  now it gets computed value instead of nominal;\n  however, still not the inherited value.\n# 1.0\n- First public release.\n\nTODO:\n- provide output for ROR\n--------------------------------------------------\n*/\n\n/* Parameters\n----------------------------------------------- */\n\n# $startid [ int ]\n# Id of the \'root\' document from which the sitemap\n# starts.\n# Default: 0\n\n$mainpage = $modx->getConfig(\'site_start\');\n\n$startid = (isset($startid)) ? $startid : 0;\n\n# $format [ sp | txt | ror ]\n# Which format of sitemap to use:\n# - sp <- Sitemap Protocol used by Google\n# - txt <- text file with list of URLs\n# TODO - ror <- Resource Of Resources\n# Default: sp\n\n$format = (isset($format) && ($format != \'ror\')) ? $format : \'sp\';\n\n# $priority [ str ]\n# Name of TV which sets the relative priority of\n# the document. If there is no such TV, this\n# parameter will not be used.\n# Default: sitemap_priority\n\n$priority = (isset($priority)) ? $priority : \'sitemap_priority\';\n\n# $changefreq [ str ]\n# Name of TV which sets the change frequency. If\n# there is no such TV this parameter will not be\n# used.\n# Default: sitemap_changefreq\n\n$changefreq = (isset($changefreq)) ? $changefreq : \'sitemap_changefreq\';\n\n# $excludeTemplates [ str ]\n# Documents based on which templates should not be\n# included in the sitemap. Comma separated list\n# with names of templates.\n# Default: empty\n\n$excludeTemplates = (isset($excludeTemplates)) ? $excludeTemplates : array();\n\n# $excludeTV [ str ]\n# Name of TV (boolean type) which sets document\n# exclusion form sitemap. If there is no such TV\n# this parameter will not be used.\n# Default: \'sitemap_exclude\'\n\n$excludeTV = (isset($excludeTV)) ? $excludeTV : \'sitemap_exclude\';\n\n# $xsl [ str ] \n# URL to the XSL style sheet\n# or\n# $xsl [ int ]\n# doc ID of the XSL style sheet\n\n$xsl = (isset($xsl)) ? $xsl : \'\';\nif (is_numeric($xsl)) { $xsl = $modx->makeUrl($xsl); }\n\n\n# $excludeWeblinks [ bool ]\n# Should weblinks be excluded?\n# You may not want to include links to external sites in your sitemap,\n# and Google gives warnings about multiple redirects to pages \n# within your site.\n# Default: false\n$excludeWeblinks = (isset($excludeWeblinks)) ? $excludeWeblinks : false;\n\n\n/* End parameters\n----------------------------------------------- */\n\n# get list of documents\n# ---------------------------------------------\n$docs = getDocs($modx,$startid,$priority,$changefreq,$excludeTV);\n\n\n# filter out documents by template or TV\n# ---------------------------------------------\n// get all templates\n$select = $modx->db->select(\"id, templatename\", $modx->getFullTableName(\'site_templates\'));\nwhile ($query = $modx->db->getRow($select)) {\n	$allTemplates[$query[\'id\']] = $query[\'templatename\'];\n}\n\n$remainingTemplates = $allTemplates;\n\n// get templates to exclude, and remove them from the all templates list\nif (!empty ($excludeTemplates)) {\n	\n	$excludeTemplates = explode(\",\", $excludeTemplates);	\n	\n	// Loop through each template we want to exclude\n	foreach ($excludeTemplates as $template) {\n		$template = trim($template);\n		\n		// If it\'s numeric, assume it\'s an ID, and remove directly from the $allTemplates array\n		if (is_numeric($template) && isset($remainingTemplates[$template])) {\n			unset($remainingTemplates[$template]);\n		} else if (trim($template) && in_array($template, $remainingTemplates)) { // If it\'s text, and not empty, assume it\'s a template name\n			unset($remainingTemplates[array_search($template, $remainingTemplates)]);			\n		}\n	} // end foreach\n}\n\n$output= array();\n// filter out documents which shouldn\'t be included\nforeach ($docs as $doc)\n{\n	if (isset($remainingTemplates[$doc[\'template\']]) && !$doc[$excludeTV] && $doc[\'published\'] && $doc[\'template\']!=0 && $doc[\'searchable\']) {\n		if (!$excludeWeblinks || ($excludeWeblinks && $doc[\'type\'] != \'reference\')) {\n			$output[] = $doc;		\n		}\n	}\n}\n$docs = $output;\nunset ($output, $allTemplates, $excludeTemplates);\n\n\n# build sitemap in specified format\n# ---------------------------------------------\n\nswitch ($format)\n{\n	// Next case added in version 1.0.4\n	case \'ulli\': // UL List\n		$output .= \"\n\\n\";\n		// TODO: Sort the array on Menu Index\n		// TODO: Make a nested ul-li based on the levels in the document tree.\n		foreach ($docs as $doc)\n		{\n			$s  = \"  \n\";\n			if ($doc[\'id\']!=$mainpage){\n				$s .= \"\" . $doc[\'pagetitle\'] . \"\";\n			} else {\n				$s .= \"\" . $doc[\'pagetitle\'] . \"\";\n			}\n			$s .= \"\n\\n\";\n			$output .= $s;\n		} // end foreach\n		$output .= \"\n\\n\";\n		break;\n		\n	case \'txt\': // plain text list of URLs\n\n		foreach ($docs as $doc)\n		{\n			$url = \'[(site_url)][~\'.$doc[\'id\'].\'~]\';\n\n			$output .= $url.\"\\n\";\n		} // end foreach\n		break;\n\n	case \'ror\': // TODO\n	default: // Sitemap Protocol\n\n	\n	$output = \'\'.\"\\n\";\n	if ($xsl != \'\') {\n		$output .=\'\'.\"\\n\";\n	}\n	$output .=\'\'.\"\\n\";\n	\n	\n	foreach ($docs as $doc)	{\n		if ($doc[\'id\']!=$mainpage){\n			$url = \'[(site_url)][~\'.$doc[\'id\'].\'~]\';\n		} else {\n			$url = \'[(site_url)]\';\n		}\n		$date = $doc[\'editedon\'];\n		$date = date(\"Y-m-d\", $date);\n		$docPriority = ($doc[$priority]) ? $doc[$priority] : 0; // false if TV doesn\'t exist\n		$docChangefreq = ($doc[$changefreq]) ? $doc[$changefreq] : 0; // false if TV doesn\'t exist\n\n		$output .= \"\\t\".\'\'.\"\\n\";\n		$output .= \"\\t\\t\".\'\'.$url.\'\'.\"\\n\";\n		$output .= \"\\t\\t\".\'\'.$date.\'\'.\"\\n\";\n		$output .= ($docPriority) ? (\"\\t\\t\".\'\'.$docPriority.\'\'.\"\\n\") : \'\'; // don\'t output anything if TV doesn\'t exist\n		$output .= ($docChangefreq) ? (\"\\t\\t\".\'\'.$docChangefreq.\'\'.\"\\n\") : \'\'; // don\'t output anything if TV doesn\'t exist\n		$output .= \"\\t\".\'\'.\"\\n\";\n	} // end foreach\n	$output .= \'\';\n\n} // end switch\n\nreturn $output;\n\n# functions\n# ---------------------------------------------\n\n# gets (inherited) value of template variable\nfunction getTV($modx,$docid,$doctv)\n{\n/* apparently in 0.9.2.1 the getTemplateVarOutput function doesn\'t work as expected and doesn\'t return INHERITED value; this is probably to be fixed for next release; see http://modxcms.com/bugs/task/464\n	$output = $modx->getTemplateVarOutput($tv,$docid);\n	return $output[$tv];\n*/\n	\n	while ($pid = $modx->getDocument($docid,\'parent\'))\n	{\n		$tv = $modx->getTemplateVar($doctv,\'*\',$docid);\n		if (($tv[\'value\'] && substr($tv[\'value\'],0,8) != \'@INHERIT\') or !$tv[\'value\']) // tv default value is overriden (including empty)\n		{\n			$output = $tv[\'value\'];\n			break;\n		}\n		else // there is no parent with default value overriden \n		{\n			$output = trim(substr($tv[\'value\'],8));\n		}\n		$docid = $pid[\'parent\']; // move up one document in document tree\n	} // end while\n	\n	return $output;\n}\n\n# gets list of published documents with properties\nfunction getDocs($modx,$startid,$priority,$changefreq,$excludeTV)\n{\n	// get children documents\n	$docs = $modx->getActiveChildren($startid,\'menuindex\',\'asc\',\'id,editedon,template,published,searchable,pagetitle,type\'); \n	// add sub-children to the list\n	foreach ($docs as $key => $doc)\n	{\n		$id = $doc[\'id\'];\n		$docs[$key][$priority] = getTV($modx,$id,$priority); // add priority property\n		$docs[$key][$changefreq] = getTV($modx,$id,$changefreq); // add changefreq property\n		$docs[$key][$excludeTV] = getTV($modx,$id,$excludeTV); // add excludeTV property\n		\n		if ($modx->getActiveChildren($id))\n			$docs = array_merge($docs, getDocs($modx,$id,$priority,$changefreq,$excludeTV));\n	} // end foreach\n	return $docs;\n}',	0,	NULL,	'',	1,	'core/elements/snippets/sitemap.php'),
(130,	1,	0,	'mail',	'',	0,	0,	0,	'require_once($_SERVER[\'DOCUMENT_ROOT\'].\'/core/components/phpmailer/PHPMailerAutoload.php\');\n$mail = new PHPMailer;\n$mail->CharSet = \'utf-8\';\n\n$mail->SMTPOptions = array(\n    \'ssl\' => array(\n        \'verify_peer\' => false,\n        \'verify_peer_name\' => false,\n        \'allow_self_signed\' => true\n    )\n);\n\n$name = $_POST[\'Name\'];\n$phone = $_POST[\'Phone\'];\n$email = $_POST[\'Email\'];\n\n$mail->SMTPDebug = 3;                               // Enable verbose debug output\n\n$mail->isSMTP();                                      // Set mailer to use SMTP\n$mail->Host = \'tls://mail.a1call.me:587\';  																							// Specify main and backup SMTP servers\n$mail->SMTPAuth = true;                               // Enable SMTP authentication\n$mail->Username = \'no_replay@a1call.me\'; // Ваш логин от почты с которой будут отправляться письма\n$mail->Password = \'Fce7VAvc\'; // Ваш пароль от почты с которой будут отправляться письма\n//$mail->SMTPSecure = \'ssl\';                            // Enable TLS encryption, `ssl` also accepted\n//$mail->Port = 25; // TCP port to connect to / этот порт может отличаться у других провайдеров\n\n$mail->setFrom(\'dsmirnov@a1call.me\'); // от кого будет уходить письмо?\n$mail->addAddress(\'mrmega7744@gmail.com\');     // Кому будет уходить письмо \n//$mail->addAddress(\'ellen@example.com\');               // Name is optional\n//$mail->addReplyTo(\'info@example.com\', \'Information\');\n//$mail->addCC(\'cc@example.com\');\n//$mail->addBCC(\'bcc@example.com\');\n//$mail->addAttachment(\'/var/tmp/file.tar.gz\');         // Add attachments\n//$mail->addAttachment(\'/tmp/image.jpg\', \'new.jpg\');    // Optional name\n$mail->isHTML(true);                                  // Set email format to HTML\n\n\n$mail->Subject = \'Заявка с сайта A1 Telecom\';\n$mail->Body    = \'\' .$name . \' оставил заявку, его телефон \' .$phone. \'<br>Почта этого пользователя: \' .$email;\n$mail->AltBody = \'\';',	0,	NULL,	'',	1,	'core/elements/snippets/mail.php'),
(131,	0,	0,	'ChangePassword',	'Processes a form for changing the password for a User.',	0,	17,	0,	'/**\n * Login\n *\n * Copyright 2010 by Shaun McCormick <shaun+login@modx.com>\n *\n * Login is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Login is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Login; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * @package login\n */\n/**\n * ChangePassword snippet\n *\n * @var modX $modx\n * @var Login $login\n * @var array $scriptProperties\n * \n * @package login\n **/\nrequire_once $modx->getOption(\'login.core_path\',null,$modx->getOption(\'core_path\').\'components/login/\').\'model/login/login.class.php\';\n$login = new Login($modx,$scriptProperties);\n\n$controller = $login->loadController(\'ChangePassword\');\n$output = $controller->run($scriptProperties);\nreturn $output;',	0,	'a:9:{s:9:\"submitVar\";a:7:{s:4:\"name\";s:9:\"submitVar\";s:4:\"desc\";s:34:\"prop_changepassword.submitvar_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:12:\"logcp-submit\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:16:\"fieldOldPassword\";a:7:{s:4:\"name\";s:16:\"fieldOldPassword\";s:4:\"desc\";s:41:\"prop_changepassword.fieldoldpassword_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:12:\"password_old\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:16:\"fieldNewPassword\";a:7:{s:4:\"name\";s:16:\"fieldNewPassword\";s:4:\"desc\";s:41:\"prop_changepassword.fieldnewpassword_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:12:\"password_new\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:23:\"fieldConfirmNewPassword\";a:7:{s:4:\"name\";s:23:\"fieldConfirmNewPassword\";s:4:\"desc\";s:48:\"prop_changepassword.fieldconfirmnewpassword_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:20:\"password_new_confirm\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:8:\"preHooks\";a:7:{s:4:\"name\";s:8:\"preHooks\";s:4:\"desc\";s:33:\"prop_changepassword.prehooks_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:9:\"postHooks\";a:7:{s:4:\"name\";s:9:\"postHooks\";s:4:\"desc\";s:34:\"prop_changepassword.posthooks_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:15:\"redirectToLogin\";a:7:{s:4:\"name\";s:15:\"redirectToLogin\";s:4:\"desc\";s:40:\"prop_changepassword.redirecttologin_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:15:\"reloadOnSuccess\";a:7:{s:4:\"name\";s:15:\"reloadOnSuccess\";s:4:\"desc\";s:40:\"prop_changepassword.reloadonsuccess_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:17:\"placeholderPrefix\";a:7:{s:4:\"name\";s:17:\"placeholderPrefix\";s:4:\"desc\";s:42:\"prop_changepassword.placeholderprefix_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:6:\"logcp.\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(132,	1,	0,	'Jevix',	'',	0,	0,	0,	'/** @var array $scriptProperties */\n/** @var ModxJevix $Jevix */\nif (!$modx->loadClass(\'jevix\', MODX_CORE_PATH . \'components/jevix/model/\', false, true)) {\n    return \'Could not load Jevix!\';\n} elseif (empty($input)) {\n    return \'\';\n}\n\nif (!empty($options) && is_string($options) && $options[0] == \'{\') {\n    $scriptProperties = json_decode($options, true);\n}\n\n$Jevix = new ModxJevix($modx, $scriptProperties);\n$processed = $Jevix->process($input);\n\nif (!empty($scriptProperties[\'escapeTags\'])) {\n    $processed = str_replace([\'[\', \']\', \'`\', \'{\', \'}\'], [\'&#91;\', \'&#93;\', \'&#96;\', \'&#123;\', \'&#125;\'], $processed);\n}\n\nreturn $processed;',	0,	NULL,	'',	1,	'core/elements/snippets/Jevix.php'),
(133,	0,	0,	'ImagePlus',	'Snippet as alternative to Image+ TV Output Type',	0,	11,	0,	'/**\n * ImagePlus Snippet as alternative to Image+ TV Output Type\n *\n * @package imageplus\n * @subpackage snippet\n *\n * @var modX $modx\n * @var array $scriptProperties\n */\n\nuse TreehillStudio\\ImagePlus\\Snippets\\ImagePlus;\n\n$corePath = $modx->getOption(\'imageplus.core_path\', null, $modx->getOption(\'core_path\') . \'components/imageplus/\');\n/** @var ImagePlus $imageplus */\n$imageplus = $modx->getService(\'imageplus\', \'ImagePlus\', $corePath . \'model/imageplus/\', [\n    \'core_path\' => $corePath\n]);\n\n$snippet = new ImagePlus($modx, $scriptProperties);\nif ($snippet instanceof TreehillStudio\\ImagePlus\\Snippets\\ImagePlus) {\n    return $snippet->execute();\n}\nreturn \'TreehillStudio\\ImagePlus\\Snippets\\ImagePlus class not found\';',	0,	'a:5:{s:6:\"tvname\";a:7:{s:4:\"name\";s:6:\"tvname\";s:4:\"desc\";s:26:\"imageplus.imageplus.tvname\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:20:\"imageplus:properties\";s:4:\"area\";s:0:\"\";}s:5:\"docid\";a:7:{s:4:\"name\";s:5:\"docid\";s:4:\"desc\";s:25:\"imageplus.imageplus.docid\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:20:\"imageplus:properties\";s:4:\"area\";s:0:\"\";}s:4:\"type\";a:7:{s:4:\"name\";s:4:\"type\";s:4:\"desc\";s:24:\"imageplus.imageplus.type\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:20:\"imageplus:properties\";s:4:\"area\";s:0:\"\";}s:7:\"options\";a:7:{s:4:\"name\";s:7:\"options\";s:4:\"desc\";s:27:\"imageplus.imageplus.options\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:20:\"imageplus:properties\";s:4:\"area\";s:0:\"\";}s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:23:\"imageplus.imageplus.tpl\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:15:\"ImagePlus.image\";s:7:\"lexicon\";s:20:\"imageplus:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(134,	1,	0,	'stats',	'',	0,	0,	0,	'set_include_path(\".:/usr/lib/php:/usr/local/lib/php:/var/www/html/assets\");\n//date_default_timezone_set(\'UTC\');\ndate_default_timezone_set(\'Europe/Moscow\');\n\nrequire \'test/bd.php\';\n$xpdo = new xPDO($dsn, $username, $password);\n$xpdo->query(\"SET GLOBAL time_zone = \'Europe/Moscow\'\");\n\n$where_sql = \'1=1\';\n$_del = [];\n\nif(isset($_POST[\'filter\'])){\n	$filter = $_POST[\'filter\'];\n	$where_txt = \'\';\n	$order = \'\';\n\n	if($filter[\'period\'] == \'period\'){\n		if($filter[\'date_from\'])\n			$where[\'r.time >= \'] = strtotime($filter[\'date_from\']);\n\n		if($filter[\'date_to\'])\n			$where[\'r.time <= \'] = strtotime($filter[\'date_to\']);\n\n	} elseif($filter[\'period\'] == \'15min\'){\n		$where[\'r.time >= \'] = strtotime(\'-15 min\');\n		$where[\'r.time <= \'] = time();\n	\n	} elseif($filter[\'period\'] == \'30min\'){\n		$where[\'r.time >= \'] = strtotime(\'-30 min\');\n		$where[\'r.time <= \'] = time();\n	\n	} elseif($filter[\'period\'] == \'1h\'){\n		$where[\'r.time >= \'] = strtotime(\'-1 hour\');\n		$where[\'r.time <= \'] = time();\n	\n	} elseif($filter[\'period\'] == \'current_h\'){\n		$where[\'r.time >= \'] = strtotime(date(\'Y-m-d H:00:00\'));\n		$where[\'r.time <= \'] = time();\n	\n	} elseif($filter[\'period\'] == \'prev_month\'){\n		$where[\'r.time >= \'] = strtotime(date(\'Y-m-01\', strtotime(\'-1 months\')));\n		$where[\'r.time <= \'] = strtotime(date(\'Y-m-t 24:59:59\', strtotime(\'-1 months\')));\n	}\n\n	if($filter[\'sort\'] == \'time_desc\')\n		$order = \'r.time DESC\';\n	\n	elseif($filter[\'sort\'] == \'time_asc\')\n		$order = \'r.time ASC\';\n\n	elseif($filter[\'sort\'] == \'delivered_desc\')\n		$order = \'r.delivered DESC\';\n\n	elseif($filter[\'sort\'] == \'delivered_asc\')\n		$order = \'r.delivered ASC\';\n\n	if($filter[\'se_phone\'])\n		$where[\'r.se_phone\'] = \" REGEXP \'\" . $filter[\'se_phone\'] . \"\'\";\n\n	if($filter[\'user_phone\'])\n		$where[\'r.number\'] = \" REGEXP \'\" . $filter[\'user_phone\'] . \"\'\";\n\n	if($filter[\'user_phone_code\'])\n		$where[\'r.number\'] = \" REGEXP \'^\" . $filter[\'user_phone_code\'] . \"\'\";\n\n	if($filter[\'message_id\'])\n		$where[\'r.service_id\'] = \" REGEXP \'\" . $filter[\'message_id\'] . \"\'\";\n\n	if($filter[\'duration_from\'])\n		$where[\'r.duration >= \'] = (int)$filter[\'duration_from\'];\n\n	if($filter[\'duration_to\'])\n		$where[\'r.duration <= \'] = (int)$filter[\'duration_to\'];\n\n	if($filter[\'delivered\'] == \'delivered\'){\n		$where[\'r.message_state = \'] = \"\'DELIVERED\'\";\n		$_del[] = \' AND r.message_state = \' . \"\'DELIVERED\'\";\n	}\n\n	elseif($filter[\'delivered\'] == \'not_delivered\'){\n		$where_txt .= \' AND (r.message_state IS NULL OR r.message_state <> \\\'DELIVERED\\\')\';\n		$_del[] = \' AND (r.message_state IS NULL OR r.message_state <> \\\'DELIVERED\\\')\';\n	}\n\n	foreach($where as $key => $value)\n		$where_sql .= \' AND \' . $key . $value;\n\n	if($where_txt)\n		$where_sql .= $where_txt;\n\n	if(isset($filter[\'group\']) && $filter[\'group\'] == \'day\')\n		$group_col = \'from_unixtime(r.time, \\\'%Y %m %d\\\') AS time_group \';\n	\n	elseif(isset($filter[\'group\']) && $filter[\'group\'] == \'month\')\n		$group_col = \'from_unixtime(r.time, \\\'%Y %m\\\') AS time_group \';\n\n	elseif(isset($filter[\'group\']) && $filter[\'group\'] == \'hour\')\n		$group_col = \'from_unixtime(r.time, \\\'%Y %m %d %H\\\') AS time_group \';\n\n\n	/*if($order)\n		$where_sql .= \' ORDER BY \' . $order;*/\n	\n	//die(\'SELECT r.* FROM request as r WHERE \' . $where_sql);\n}\n$report[\'status_error\'] = [];\n$report[\'status_ok\'] = [];\n\n$query = \"SELECT * FROM request as r WHERE r.status != \'\' and r.user = \'$user\' AND \" . $where_sql . ($order ? \' ORDER BY \' . $order : \'\');\n$data = $xpdo->query($query);\n\n$query = \"SELECT COUNT(id) as count \" . (isset($group_col) ? \', \' . $group_col : \'\') . \" FROM request as r WHERE r.status = \'error\' and r.user = \'$user\' AND \" . $where_sql . (isset($group_col) ? \' GROUP BY time_group\' : \'\');\n$r = $xpdo->query($query);\nif($r)\n	while($row = $r->fetch())\n		$report[\'status_error\'][isset($row[\'time_group\']) ? $row[\'time_group\'] : 0] = $row[\'count\'];\n\n$query = \"SELECT COUNT(id) as count \" . (isset($group_col) ? \', \' . $group_col : \'\') . \" FROM request as r WHERE r.status = \'ok\' and r.user = \'$user\' AND \" . $where_sql . (isset($group_col) ? \' GROUP BY time_group\' : \'\');\n$r = $xpdo->query($query);\nif($r)\n	while($row = $r->fetch())\n		$report[\'status_ok\'][isset($row[\'time_group\']) ? $row[\'time_group\'] : 0] = $row[\'count\'];\n\n//$reports[\'status\'] = array_keys(array_merge($report[\'status_ok\'], $report[\'status_error\']));\n\nif($filter[\'delivered\'] == \'not_delivered\')\n	$report[\'delivered\'] = 0;\nelse {\n	$query = \"SELECT COUNT(id) as count \" . (isset($group_col) ? \', \' . $group_col : \'\') . \" FROM request as r WHERE r.status = \'ok\' and r.user = \'$user\' and r.message_state = \'DELIVERED\' AND \" . str_replace($_del, \'\', $where_sql) . (isset($group_col) ? \' GROUP BY time_group\' : \'\');\n	$r = $xpdo->query($query);\n	if($r)\n		while($row = $r->fetch())\n			$report[\'delivered\'][isset($row[\'time_group\']) ? $row[\'time_group\'] : 0] = $row[\'count\'];\n}\n\n$query = \"SELECT COUNT(id) as count \" . (isset($group_col) ? \', \' . $group_col : \'\') . \" FROM request as r WHERE r.status = \'ok\' AND r.user = \'$user\' AND r.message_state = \'UNDELIVERABLE\' AND \" . str_replace($_del, \'\', $where_sql) . (isset($group_col) ? \' GROUP BY time_group\' : \'\');\nif($r)\n	while($row = $r->fetch())\n		$report[\'undeliverable\'][isset($row[\'time_group\']) ? $row[\'time_group\'] : 0] = $row[\'count\'];\n\n$query = \"SELECT COUNT(id) as count \" . (isset($group_col) ? \', \' . $group_col : \'\') . \" FROM request as r WHERE r.status = \'ok\' AND r.user = \'$user\' AND r.message_state = \'ENROUTE\' AND \" . str_replace($_del, \'\', $where_sql) . (isset($group_col) ? \' GROUP BY time_group\' : \'\');\n$r = $xpdo->query($query);\nif($r)\n	while($row = $r->fetch())\n		$report[\'enroute\'][isset($row[\'time_group\']) ? $row[\'time_group\'] : 0] = $row[\'count\'];\n\n$query = \"SELECT COUNT(id) as count \" . (isset($group_col) ? \', \' . $group_col : \'\') . \" FROM request as r WHERE r.status = \'ok\' AND r.user = \'$user\' AND r.message_state = \'EXPIRED\' AND \" . str_replace($_del, \'\', $where_sql) . (isset($group_col) ? \' GROUP BY time_group\' : \'\');\n$r = $xpdo->query($query);\nif($r)\n	while($row = $r->fetch())\n		$report[\'expired\'][isset($row[\'time_group\']) ? $row[\'time_group\'] : 0] = $row[\'count\'];\n\n$query = \"SELECT COUNT(id) as count \" . (isset($group_col) ? \', \' . $group_col : \'\') . \" FROM request as r WHERE r.status = \'ok\' AND r.user = \'$user\' AND r.message_state = \'ACCEPTED\' AND \" . str_replace($_del, \'\', $where_sql) . (isset($group_col) ? \' GROUP BY time_group\' : \'\');\n$r = $xpdo->query($query);\nif($r)\n	while($row = $r->fetch())\n		$report[\'accepted\'][isset($row[\'time_group\']) ? $row[\'time_group\'] : 0] = $row[\'count\'];\n\n$query = \"SELECT COUNT(id) as count \" . (isset($group_col) ? \', \' . $group_col : \'\') . \" FROM request as r WHERE r.status = \'ok\' AND r.user = \'$user\' AND r.message_state = \'UNKNOWN\' AND \" . str_replace($_del, \'\', $where_sql) . (isset($group_col) ? \' GROUP BY time_group\' : \'\');\n$r = $xpdo->query($query);\nif($r)\n	while($row = $r->fetch())\n		$report[\'unknown\'][isset($row[\'time_group\']) ? $row[\'time_group\'] : 0] = $row[\'count\'];\n\n$query = \"SELECT COUNT(id) as count \" . (isset($group_col) ? \', \' . $group_col : \'\') . \" FROM request as r WHERE r.status = \'ok\' AND r.user = \'$user\' AND r.message_state = \'REJECTED\' AND \" . str_replace($_del, \'\', $where_sql) . (isset($group_col) ? \' GROUP BY time_group\' : \'\');\n$r = $xpdo->query($query);\nif($r)\n	while($row = $r->fetch())\n		$report[\'rejected\'][isset($row[\'time_group\']) ? $row[\'time_group\'] : 0] = $row[\'count\'];\n\n$query = \"SELECT COUNT(id) as count \" . (isset($group_col) ? \', \' . $group_col : \'\') . \" FROM request as r WHERE r.user = \'$user\' AND \" . $where_sql . (isset($group_col) ? \' GROUP BY time_group\' : \'\');\n$r = $xpdo->query($query);\nif($r)\n	while($row = $r->fetch())\n		$report[\'all\'][isset($row[\'time_group\']) ? $row[\'time_group\'] : 0] = $row[\'count\'];\n\n/*echo \'<pre>\';\nprint_r($report);\necho \'</pre>\';*/\n$i = 1;\n\n$message_states = [\'enroute\' => \'В пути\', \'delivered\' => \'Доставлено\', \'expired\' => \'Истекшие\', \'undeliverable\' => \'Невозможно\', \'accepted\' => \'Принят\', \'unknown\' => \'Неизвестный\', \'rejected\' => \'Отказано\'];\n?>\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n	<meta charset=\"UTF-8\">\n	<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n	<title>Document</title>\n</head>\n<body>\n	<link rel=\"stylesheet\" type=\"text/css\" href=\"/assets/components/style_vay.css\">\n	<link rel=\"stylesheet\" type=\"text/css\" href=\"/assets/components/js/libs/datetimepicker-master/jquery.datetimepicker.css\">\n<style>\na.active{\n    color: #008337;\n}\ntable {\n  font-family: arial, sans-serif;\n  border-collapse: collapse;\n  width: 100%;\n}\ntd, th {\n  border: 1px solid #dddddd;\n  text-align: left;\n  padding: 8px;\n}\n.blue{\n	color: #fff;\n	background-color: #008337;\n}\n\n.red{\n	color: #fff;\n	background-color: #e25858;\n}\n.title {\n    display: flex;\n    justify-content: space-between;\n    flex-direction: column;\n}\n.h2, h2 {\n    font-size: 24px;\n}\n\nh1, h2, h3 {\n    font-weight: 900;\n}\n\n</style>\n</head>\n<body>\n	<div class=\"container_vay\">\n		<div class=\"title table-responsive\" style=\"background: #deefe58f;padding: 25px;border: 1px solid #ddd;margin: 0 0 10px;\">\n<div class=\"filtr\">\n			<form class=\"filter\" method=\"POST\">\n				<div class=\"col\">\n					<label class=\"vay_label\">От</label>\n					<div class=\"control\">\n						<input type=\"text\" name=\"filter[date_from]\" autocomplete=\"off\" value=\"<?=isset($filter[\'date_from\']) ? $filter[\'date_from\'] : \'\'?>\">\n					</div>\n				</div>\n				<div class=\"col\">\n					<label class=\"vay_label\">До</label>\n					<div class=\"control\">\n						<input type=\"text\" name=\"filter[date_to]\" autocomplete=\"off\" value=\"<?=isset($filter[\'date_to\']) ? $filter[\'date_to\'] : \'\'?>\">\n					</div>\n				</div>\n				<div class=\"col\">\n					<label class=\"vay_label\">Отображать данные</label>\n					<div class=\"control\">\n						<select name=\"filter[period]\">\n							<option value=\"period\" <?=isset($filter[\'period\']) && $filter[\'period\'] == \'period\' ? \'selected\' : \'\'?>>Выбранные период</option>\n							<option value=\"15min\" <?=isset($filter[\'period\']) && $filter[\'period\'] == \'15min\' ? \'selected\' : \'\'?>>Последние 15 мин</option>\n							<option value=\"30min\" <?=isset($filter[\'period\']) && $filter[\'period\'] == \'30min\' ? \'selected\' : \'\'?>>Последние 30 мин</option>\n							<option value=\"1h\" <?=isset($filter[\'period\']) && $filter[\'period\'] == \'1h\' ? \'selected\' : \'\'?>>Последний час</option>\n							<option value=\"current_h\" <?=isset($filter[\'period\']) && $filter[\'period\'] == \'current_h\' ? \'selected\' : \'\'?>>Текущий час</option>\n							<option value=\"prev_month\" <?=isset($filter[\'period\']) && $filter[\'period\'] == \'prev_month\' ? \'selected\' : \'\'?>>Предыдущий месяц</option>\n						</select>\n					</div>\n				</div>\n				<div class=\"col\">\n					<label class=\"vay_label\">Сортировка</label>\n					<div class=\"control\">\n						<select name=\"filter[sort]\">\n							<option value=\"time_desc\" <?=isset($filter[\'sort\']) && $filter[\'sort\'] == \'time_desc\' ? \'selected\' : \'\'?>>Время начала (убывание)</option>\n							<option value=\"time_asc\" <?=isset($filter[\'sort\']) && $filter[\'sort\'] == \'time_asc\' ? \'selected\' : \'\'?>>Время начала (возрастание)</option>\n							<option value=\"delivered_desc\" <?=isset($filter[\'sort\']) && $filter[\'sort\'] == \'delivered_desc\' ? \'selected\' : \'\'?>>Время завершения (убывание)</option>\n							<option value=\"delivered_asc\" <?=isset($filter[\'sort\']) && $filter[\'sort\'] == \'delivered_asc\' ? \'selected\' : \'\'?>>Время завершения (возрастание)</option>\n						</select>\n					</div>\n				</div>\n				<div class=\"col\">\n					<label class=\"vay_label\">Шаблон номера отправителя</label>\n					<div class=\"control\">\n						<input type=\"text\" name=\"filter[se_phone]\" value=\"<?=isset($filter[\'se_phone\']) ? $filter[\'se_phone\'] : \'\'?>\">\n					</div>\n				</div>\n				<div class=\"col\">\n					<label class=\"vay_label\">Шаблон номера получателя</label>\n					<div class=\"control\">\n						<input type=\"text\" name=\"filter[user_phone]\" value=\"<?=isset($filter[\'user_phone\']) ? $filter[\'user_phone\'] : \'\'?>\">\n					</div>\n				</div>\n				<div class=\"col\">\n					<label class=\"vay_label\">Шаблон кода</label>\n					<div class=\"control\">\n						<input type=\"text\" name=\"filter[user_phone_code]\" value=\"<?=isset($filter[\'user_phone_code\']) ? $filter[\'user_phone_code\'] : \'\'?>\">\n					</div>\n				</div>\n				<div class=\"col\">\n					<label class=\"vay_label\">Шаблон ID сообщения</label>\n					<div class=\"control\">\n						<input type=\"text\" name=\"filter[message_id]\" value=\"<?=isset($filter[\'message_id\']) ? $filter[\'message_id\'] : \'\'?>\">\n					</div>\n				</div><!--\n				<div class=\"col\">\n					<label class=\"vay_label\">Сообщения с общей длительностью (сек)</label>\n					<div class=\"control\">\n						<input type=\"text\" name=\"filter[duration_from]\" value=\"<?=isset($filter[\'duration_from\']) ? $filter[\'duration_from\'] : \'\'?>\">\n						<input type=\"text\" name=\"filter[duration_to]\" value=\"<?=isset($filter[\'duration_to\']) ? $filter[\'duration_to\'] : \'\'?>\">\n					</div> -->\n				</div>\n				<div class=\"col\">\n					<label class=\"vay_label\">Успешные сообщения</label>\n					<div class=\"control\">\n						<select name=\"filter[delivered]\">\n							<option value=\"all\" <?=isset($filter[\'delivered\']) && $filter[\'delivered\'] == \'all\' ? \'selected\' : \'\'?>>Любой</option>\n							<option value=\"delivered\" <?=isset($filter[\'delivered\']) && $filter[\'delivered\'] == \'delivered\' ? \'selected\' : \'\'?>>Да</option>\n							<option value=\"not_delivered\" <?=isset($filter[\'delivered\']) && $filter[\'delivered\'] == \'not_delivered\' ? \'selected\' : \'\'?>>Нет</option>\n						</select>\n					</div>\n				</div>\n				<div class=\"col\">\n					<label class=\"vay_label\">Детальность</label>\n					<div class=\"control\">\n						<select name=\"filter[group]\">\n							<option value=\"all\" <?=isset($filter[\'group\']) && $filter[\'group\'] == \'all\' ? \'selected\' : \'\'?>>Всё</option>\n							<option value=\"month\" <?=isset($filter[\'group\']) && $filter[\'group\'] == \'month\' ? \'selected\' : \'\'?>>Месяц</option>\n							<option value=\"day\" <?=isset($filter[\'group\']) && $filter[\'group\'] == \'day\' ? \'selected\' : \'\'?>>День</option>\n							<option value=\"hour\" <?=isset($filter[\'group\']) && $filter[\'group\'] == \'hour\' ? \'selected\' : \'\'?>>Час</option>\n						</select>\n					</div>\n				</div>\n				<div class=\"col\">\n					<button type=\"submit\">Показать</button>\n				</div>\n			</form>\n</div>\n		</div>\n			<hr>\n<div class=\"table-responsive\">\n			<h2 style=\"margin-top: 0px;\">Статистика по SMS</h2>\n			<table>\n				<tr style=\"background-color: #f0f0f0;\">\n					<?if(current(array_keys($report[\'all\']))):?>\n						<th>Детальность</th>\n					<?endif?>\n					<th>Общее количество</th>\n					<th>Отправленных</th>\n					<th>Не отправленных</th>\n					<th>Доставлено</th>\n					<th>Невозможно</th>\n				</tr>\n				<?foreach(array_keys($report[\'all\']) as $key):?>\n				<tr>\n					<?if($key):?>\n						<td><?=$key?></td>\n					<?endif?>\n					<td><?=(int)$report[\'all\'][$key]?></td>\n					<td><?=(int)$report[\'status_ok\'][$key]?></td>\n					<td><?=(int)$report[\'status_error\'][$key]?></td>\n					<td class=\"uniq\"><span><?=(int)$report[\'delivered\'][$key]?></span><span style=\"padding-left: 50%;\"><?=round(100 * intval($report[\'delivered\']) / intval($report[\'all\'][$key]), 2)?> %</span></td>\n					<td><?=(int)$report[\'undeliverable\'][$key]?></td>\n				</tr>\n				<?endforeach?>\n			</table>\n\n		<h2>Детализация по SMS</h2>\n		<table id=\"data\">\n<thead>\n			<tr style=\"background-color: #f0f0f0;\">\n				<th>№</th>\n				<th>Дата / Время</th>\n				<th>Получатель</th>\n				<th>Отправитель</th>\n				<th>Статус</th>\n				<th>Доставка</th>\n				<th>Время доставки</th>\n			</tr>\n</thead>\n<tbody>\n			<?while($cat = $data->fetch()):?>\n				<tr class=\"<?=$cat[\'status\'] == \'error\' ? \'red\' : \'blue\'?>\">\n					<td><?=$i?></td>\n					<td><?=date(\"d-m H:i:s\", $cat[\'time\'])?></td><?//F j, Y, g:i a?>\n					<td><?=$cat[\'number\']?></td>\n					<td><?=$cat[\'se_phone\']?></td>\n					<td><?=$cat[\'status\'] == \'error\' ? \'не отправлено\' : \'Отправлено\'?></td>\n					<td><?=$message_states[strtolower($cat[\'message_state\'])] ?: \' - \'?></td>\n					<td><?=$cat[\'delivered_time\'] ? date(\'d-m H:i:s\', $cat[\'delivered_time\']) : \' - \'?></td>\n				</tr>\n			<?$i++;\n			endwhile;?>\n</tbody>\n		</table>\n	</div>\n</div>\n	<script type=\"text/javascript\" src=\"/assets/components/js/libs/datetimepicker-master/jquery.datetimepicker.full.min.js\"></script>\n	<script type=\"text/javascript\">\n	$(\'[name=\"filter[date_from]\"]\').datetimepicker({\n		defaultTime: \'00:00\',\n		step: 1\n		/*format: \'d.m.Y H:i\',\n		inline: true,*/\n	});\n	$(\'[name=\"filter[date_to]\"]\').datetimepicker({\n		defaultTime: \'23:59\',\n		step: 1\n		/*format: \'d.m.Y H:i\',\n		inline: true,*/\n	});\n	$.datetimepicker.setLocale(\'ru\');\n	</script>\n</body>\n</html>\n<?php',	0,	NULL,	'',	1,	'core/elements/snippets/stats.php'),
(135,	0,	0,	'MinifyX',	'Combine and minify JS and CSS files',	0,	22,	0,	'/**\n * MinifyX Snippet\n *\n * @package minifyx\n * @subpackage snippet\n *\n * @var modX $modx\n * @var array $scriptProperties\n */\n\nuse TreehillStudio\\MinifyX\\Snippets\\MinifyXSnippet;\n\n$corePath = $modx->getOption(\'minifyx.core_path\', null, $modx->getOption(\'core_path\') . \'components/minifyx/\');\n/** @var MinifyX $minifyx */\n$minifyx = $modx->getService(\'minifyx\', \'MinifyX\', $corePath . \'model/minifyx/\', [\n    \'core_path\' => $corePath\n]);\n\n$snippet = new MinifyXSnippet($modx, $scriptProperties);\nif ($snippet instanceof TreehillStudio\\MinifyX\\Snippets\\MinifyXSnippet) {\n    return $snippet->execute();\n}\nreturn \'TreehillStudio\\MinifyX\\Snippets\\MinifyXSnippet class not found\';',	0,	'a:13:{s:9:\"jsSources\";a:7:{s:4:\"name\";s:9:\"jsSources\";s:4:\"desc\";s:25:\"minifyx.minifyx.jsSources\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:10:\"cssSources\";a:7:{s:4:\"name\";s:10:\"cssSources\";s:4:\"desc\";s:26:\"minifyx.minifyx.cssSources\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:8:\"minifyJs\";a:7:{s:4:\"name\";s:8:\"minifyJs\";s:4:\"desc\";s:24:\"minifyx.minifyx.minifyJs\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:9:\"minifyCss\";a:7:{s:4:\"name\";s:9:\"minifyCss\";s:4:\"desc\";s:25:\"minifyx.minifyx.minifyCss\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:10:\"jsFilename\";a:7:{s:4:\"name\";s:10:\"jsFilename\";s:4:\"desc\";s:26:\"minifyx.minifyx.jsFilename\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:11:\"cssFilename\";a:7:{s:4:\"name\";s:11:\"cssFilename\";s:4:\"desc\";s:27:\"minifyx.minifyx.cssFilename\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:13:\"jsPlaceholder\";a:7:{s:4:\"name\";s:13:\"jsPlaceholder\";s:4:\"desc\";s:29:\"minifyx.minifyx.jsPlaceholder\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:18:\"MinifyX.javascript\";s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:14:\"cssPlaceholder\";a:7:{s:4:\"name\";s:14:\"cssPlaceholder\";s:4:\"desc\";s:30:\"minifyx.minifyx.cssPlaceholder\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:11:\"MinifyX.css\";s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:10:\"registerJs\";a:7:{s:4:\"name\";s:10:\"registerJs\";s:4:\"desc\";s:26:\"minifyx.minifyx.registerJs\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:4:{i:0;a:2:{s:4:\"text\";s:38:\"minifyx.minifyx.properties.placeholder\";s:5:\"value\";s:11:\"placeholder\";}i:1;a:2:{s:4:\"text\";s:34:\"minifyx.minifyx.properties.startup\";s:5:\"value\";s:7:\"startup\";}i:2;a:2:{s:4:\"text\";s:34:\"minifyx.minifyx.properties.default\";s:5:\"value\";s:7:\"default\";}i:3;a:2:{s:4:\"text\";s:32:\"minifyx.minifyx.properties.print\";s:5:\"value\";s:5:\"print\";}}s:5:\"value\";s:11:\"placeholder\";s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:11:\"registerCss\";a:7:{s:4:\"name\";s:11:\"registerCss\";s:4:\"desc\";s:27:\"minifyx.minifyx.registerCss\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:3:{i:0;a:2:{s:4:\"text\";s:38:\"minifyx.minifyx.properties.placeholder\";s:5:\"value\";s:11:\"placeholder\";}i:1;a:2:{s:4:\"text\";s:34:\"minifyx.minifyx.properties.default\";s:5:\"value\";s:7:\"default\";}i:2;a:2:{s:4:\"text\";s:32:\"minifyx.minifyx.properties.print\";s:5:\"value\";s:5:\"print\";}}s:5:\"value\";s:11:\"placeholder\";s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:6:\"cssTpl\";a:7:{s:4:\"name\";s:6:\"cssTpl\";s:4:\"desc\";s:22:\"minifyx.minifyx.cssTpl\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:5:\"jsTpl\";a:7:{s:4:\"name\";s:5:\"jsTpl\";s:4:\"desc\";s:21:\"minifyx.minifyx.jsTpl\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}s:11:\"forceUpdate\";a:7:{s:4:\"name\";s:11:\"forceUpdate\";s:4:\"desc\";s:27:\"minifyx.minifyx.forceUpdate\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:18:\"minifyx:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(136,	1,	0,	'generation_sms',	'',	0,	0,	0,	'set_include_path(\".:/usr/lib/php:/usr/local/lib/php:/var/www/html/assets\");\nrequire \'test/bd.php\';\n$xpdo = new xPDO($dsn, $username, $password);\n\nif(isset($_GET[\'mode\']) && $_GET[\'mode\'] == \'delete\'){\n  mysqli_query($bd, \'DELETE FROM massage WHERE id = \' . (int)$_GET[\'id\']);\n  header(\'Location: spisok-rassyilok\', true, 301);\n}\n\nif(isset($_GET[\'mode\']) && $_GET[\'mode\'] == \'edit\'){\n  $sql = \'SELECT * FROM massage WHERE id = \' . (int)$_GET[\'id\'] . \' AND user = \\\'\' . $user . \'\\\'\';\n  $data = mysqli_query($bd, $sql);\n  $edit_row = mysqli_fetch_assoc($data);\n  if(!$edit_row)\n    die(\'not found\');\n\n  $date_from = UnixToTime($edit_row[\'dec_time\'], $edit_row[\'tz\']);\n  //print_r($edit_row);\n}\n\nif(isset($_POST[\'sbt\'])){\n  $send_phone = $_POST[\'sender_phone\'] ? $_POST[\'sender_phone\'] : \'\';\n  $phone = implode(\',\', array_map(\'trim\', explode(\"\\r\\n\", trim($_POST[\'phone\']))));\n  $se_phone = $_POST[\'se_phone\'];\n  $text = $_POST[\'text\'];\n  $time = time();\n  $date = tiemUnix($_POST[\'date\'], $_POST[\'time\']);\n  //$date_desc = tiemUnix($_POST[\'date_desc\'], $_POST[\'time_desc\']);\n  $query = \"INSERT INTO `massage`(`time`, `dec_time`, `user_phone`, `se_phone`, `massage`) VALUES (\'$time\', \'$date\', \'$phone\', `$send_phone`, \'$text\')\";\n  $xpdo->query($query);\n}\n\nfunction UnixToTime($unix, $tz){\n  $unix+=$tz;\n  return [\'date\' => date(\'Y-m-d\', $unix), \'time\' => date(\'H:i\', $unix)];\n}\n\nfunction tiemUnix($d,$t){\n  $date = $d;\n  $date = str_replace(\'/\', \'-\', $date);\n  $date = $date . \' \' . $t . \':00\';\n  $timestamp = strtotime($date);\n  return $timestamp;\n}\n\nclass TimeZoneList {\n  private $timezone_identifiers;\n  private $error;\n\n  public function __construct () {\n   $this->error = \'\';\n   $needver = \'5.2.0\';\n   if (version_compare(PHP_VERSION, $needver, \'<=\')) {    \n    $this->error = \'Класс TimeZoneList требует PHP версии не ниже \'.$needver.\'. Ваша версия: \'.PHP_VERSION;\n    return;\n  }\n  $this->timezone_identifiers = DateTimeZone::listIdentifiers();\n}\n\npublic function get_array () {\n $timezones = array ();\n if (!empty($this->error)) return array (0 => $this->error);\n $phpTime = Date(\"Y-m-d H:i:s\");\n foreach ($this->timezone_identifiers as $key=>$value) {\n  if (preg_match(\'/^(Europe|America|Asia|Antartica|Arctic|Atlantic|Indian|Pacific)\\//\', $value)) {\n   $timezone = new DateTimeZone ($value);\n   $offset = $timezone->getOffset(new DateTime($phpTime));\n   $offsetHours = abs($offset)/3600;\n   $offsetString = ($offset < 0 ? \'-\' : \'+\');\n   if (abs($offsetHours)==1) $label = \'час\'; \n   else if (abs($offsetHours)>1 and abs($offsetHours)<5) $label = \'часа\';\n   else $label = \'часов\';\n   $timezones[$value] = array (\n    \'timezone\' => $value.\' (\'.$offsetString.$offsetHours.\' \'.$label.\')\',\n    \'offset\' => $offset\n  );\n }\n}\n\nuasort ($timezones, function ($a, $b) {\n  return $a[\'offset\'] != $b[\'offset\'] ? $b[\'offset\'] < $a[\'offset\'] : $b[\'timezone\'] < $a[\'timezone\'];\n});\n\nreturn $timezones;\n}\n\npublic function get_html_list($name = \'timeZoneList\', $selected = \'Europe/Moscow\'){\n  $timezones = $this->get_array();\n  $content = \'<select size=\"1\" name=\"\' . $name . \'\" id=\"\' . $name . \'\">\' . \"\\n\";\n  foreach($timezones as $key => $value)\n    $content .= \'<option value=\"\' . $value[\'offset\'] . \'\" id=\"tz_\' . $key . \'\"\' . ((is_numeric($selected) ? $value[\'offset\'] : $key) == explode(\' \', $selected)[0] ? \' selected\' : \'\') . \'>\' . $value[\'timezone\'] . \"\\n\";\n\n  $content .= \'</select>\';\n  return $content;\n}\n}\n\n$tList = new TimeZoneList();\n$tZones = $tList->get_array();\n?>\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n	<meta charset=\"UTF-8\">\n	<meta name=\"viewport\" content=\"width=s, initial-scale=1.0\">\n	<title>Document</title>\n</head>\n<body>\n	<style>\n    * {\n     box-sizing: border-box;\n   }\n   .decor {\n    position: relative;\n    max-width: 600px;\n    margin: 0px auto 0px;\n    border-radius: 30px;\n    background-color: #f7f7f7;\n    margin-bottom: 20px;\n    margin-top: 20px;\n  }\n  .form-left-decoration, .form-right-decoration {\n   content: \"\";\n   position: absolute;\n   width: 50px;\n   height: 20px;\n   background: #008337;\n   border-radius: 20px;\n }\n .form-left-decoration {\n   bottom: 60px;\n   left: -30px;\n }\n .form-right-decoration {\n   top: 60px;\n   right: -30px;\n }\n .form-left-decoration:before, .form-left-decoration:after, .form-right-decoration:before, .form-right-decoration:after {\n   content: \"\";\n   position: absolute;\n   width: 50px;\n   height: 20px;\n   border-radius: 30px;\n   background: white;\n }\n .form-left-decoration:before {\n   top: -20px;\n }\n .form-left-decoration:after {\n   top: 20px;\n   left: 10px;\n }\n .form-right-decoration:before {\n   top: -20px;\n   right: 0;\n }\n .form-right-decoration:after {\n   top: 20px;\n   right: 10px;\n }\n .circle {\n   position: absolute;\n   bottom: 80px;\n   left: -55px;\n   width: 20px;\n   height: 20px;\n   border-radius: 50%;\n   background: white;\n }\n .form-inner {\n   padding: 50px;\n }\n .form-inner input, .form-inner textarea, .form-inner select {\n   display: block;\n   width: 100%;\n   padding: 0 20px;\n   margin-bottom: 10px;\n   background: #E9EFF6;\n   line-height: 40px;\n   border-width: 0;\n   border-radius: 20px;\n   font-family: \'Roboto\', sans-serif;\n   margin: 8px;\n }\n .form-inner select {\n  padding: 12px;\n  border-radius: 5px;\n}\n.form-inner input[type=\"submit\"] {\n margin-top: 30px;\n background: #008337;\n border-bottom: 4px solid #008000;\n color: white;\n font-size: 14px;\n}\n.form-inner textarea[name=\"text\"] {\n resize: none;\n}\n.form-inner h3 {\n margin-top: 0;\n font-family: \'Roboto\', sans-serif;\n font-weight: 500;\n font-size: 24px;\n color: #707981;\n}\n\ntextarea.phone {\n  line-height: 24px;\n  padding: 10px;\n}\n.contacts_panel {\n  display: flex;\n  align-items: center;\n  padding: 0 45px;\n}\n\n.contacts_panel input {\n  line-height: 25px;\n  border-radius: 10px;\n}\n\n.contacts_panel #save {\n  cursor: pointer;\n}\n</style>\n<?\n$sql = \"SELECT * FROM `phone` WHERE user = \'$user\'\";\n$data = $xpdo->query($sql);\n$list = [];\nforeach($data->fetchAll() as $val)\n  $list[$val[\'list\']][$val[\'id\']] = [\'phone\' => $val[\'phone\'], \'contact\' => $val[\'contact\']];\n?>\n<script>\n  var list = <?=json_encode($list)?>;\n</script>\n\n<form class=\"decor\" action=\"http://78.47.124.109/assets/test/index.php\" method=\"post\">\n  <div class=\"form-left-decoration\"></div>\n  <div class=\"form-right-decoration\"></div>\n  <div class=\"circle\"></div>\n  <div class=\"form-inner\">\n    <?if(isset($edit_row)):?>\n      <input type=\"hidden\" name=\"id\" value=\"<?=$edit_row[\'id\']?>\">\n    <?endif?>\n\n    <b>Номера получателей</b>\n    <textarea placeholder=\"Список номеров (каждый с новой строки)\" name=\"phone\" class=\"phone\"><?\n      if(isset($edit_row)){\n        $edit_row[\'user_phone\'] = array_map(\'trim\', explode(\',\', $edit_row[\'user_phone\']));\n        echo implode(PHP_EOL, $edit_row[\'user_phone\']);\n      }\n      ?>\n    </textarea>\n    <div class=\"contacts_panel\">\n      <input type=\"text\" id=\"new_list\" placeholder=\"Название списка\">\n      <div id=\"save\">Сохранить</div>\n    </div>\n    <b>Контакты</b>\n    <select style=\"padding: 12px;border-radius: 5px;\" name=\"se_phone\" id=\"\" class=\"se_phone\" onchange=\"Phone(this)\">\n      <option value=\"\">Выберите список</option>\n      <?foreach($list as $cat => $contacts):?>\n      <option value=\"<?=$cat?>\"><?=$cat?></option>\n      <?endforeach?>\n    </select>\n    <b>Номер отправителя</b>\n    <input type=\"text\" placeholder=\"От Кого\" name=\"sender_phone\" class=\"phones\" value=\"<?=isset($edit_row) ? $edit_row[\'se_phone\'] : \'\'?>\">\n    <b>Временная зона</b>\n    <?=$tList->get_html_list(\'tz\', isset($edit_row) ? $edit_row[\'tz_name\'] : \'Europe/Moscow\')?>\n    <input type=\"hidden\" name=\"tz_name\" value=\"<?=isset($edit_row) ? $edit_row[\'tz_name\'] : \'Europe/Moscow\'?>\">\n    <b>Дата активации</b>\n    <input type=\"date\" placeholder=\"Дата\" name=\"date\" value=\"<?=isset($edit_row) ? $date_from[\'date\'] : \'\'?>\">\n    <b>Время активации</b>\n    <input type=\"time\" placeholder=\"Время\" name=\"time\" value=\"<?=isset($edit_row) ? $date_from[\'time\'] : \'\'?>\">\n    <b>Количество сообщений в секунду</b>\n    <input type=\"text\" placeholder=\"Рекомендуемое количество 1-10 смс в секунду\" onchange=\"handleChange(this);\" name=\"limit_sec\" value=\"<?=isset($edit_row) ? $edit_row[\'limit_sec\'] : \'\'?>\">\n    <input type=\"hidden\" name=\"user\" value=\"<?=isset($edit_row) ? $edit_row[\'user\'] : $user?>\">\n<b>Сообщение</b>\n    <textarea placeholder=\"Ваше сообщение...\" rows=\"5\" name=\"text\"><?=isset($edit_row) ? $edit_row[\'massage\'] : \'\'?></textarea>\n    <input type=\"submit\" name=\"sbt\">\n  </div>\n</form>\n<script>\n  $(\'[name=\"tz\"]\').change(function(){\n    $(\'[name=\"tz_name\"]\').val($(\'[name=\"tz\"] option:selected\').text());\n  });\n\n  function Phone(e){\n   let phone = document.querySelector(\'.phone\');\n   var phones = \'\';\n\n   $(\'#new_list\').val(e.value);\n   if(typeof list[e.value] != \'undefined\')\n     $.each(list[e.value], function(idx, val){\n       phones += val.phone + \"\\r\\n\";\n     });\n\n   phone.value = phones;\n }\n $(\'.contacts_panel #save\').click(function(){\n  var user = $(\'[name=\"user\"]\').val();\n  var list_name = $(\'#new_list\').val();\n  var contacts = $(\'.phone\').val();\n  if(!list_name){\n    $(\'#new_list\').focus()\n    return false;\n  }\n\n  if(!contacts){\n    $(\'.phone\').focus()\n    return false;\n  }\n  $.ajax({\n    type: \"POST\",\n    url: \"http://78.47.124.109/assets/test/index.php\",\n    data: {mode: \'list_save\', user: user, list_name: list_name, contacts: contacts}\n  }).done(function(msg){\n    alert(msg);\n  });\n});\n</script>\n</body>\n</html>\n<?php',	0,	NULL,	'',	1,	'core/elements/snippets/generation_sms.php'),
(137,	1,	0,	'PHPMailerAutoload',	'',	0,	0,	0,	'/**\n * PHPMailer SPL autoloader.\n * PHP Version 5\n * @package PHPMailer\n * @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project\n * @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>\n * @author Jim Jagielski (jimjag) <jimjag@gmail.com>\n * @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>\n * @author Brent R. Matzelle (original founder)\n * @copyright 2012 - 2014 Marcus Bointon\n * @copyright 2010 - 2012 Jim Jagielski\n * @copyright 2004 - 2009 Andy Prevost\n * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License\n * @note This program is distributed in the hope that it will be useful - WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE.\n */\n\n/**\n * PHPMailer SPL autoloader.\n * @param string $classname The name of the class to load\n */\nfunction PHPMailerAutoload($classname)\n{\n    //Can\'t use __DIR__ as it\'s only in PHP 5.3+\n    $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.\'class.\'.strtolower($classname).\'.php\';\n    if (is_readable($filename)) {\n        require $filename;\n    }\n}\n\nif (version_compare(PHP_VERSION, \'5.1.2\', \'>=\')) {\n    //SPL autoloading was introduced in PHP 5.1.2\n    if (version_compare(PHP_VERSION, \'5.3.0\', \'>=\')) {\n        spl_autoload_register(\'PHPMailerAutoload\', true, true);\n    } else {\n        spl_autoload_register(\'PHPMailerAutoload\');\n    }\n} else {\n    /**\n     * Fall back to traditional autoload for old PHP versions\n     * @param string $classname The name of the class to load\n     */\n    function __autoload($classname)\n    {\n        PHPMailerAutoload($classname);\n    }\n}',	0,	NULL,	'',	1,	'core/elements/snippets/PHPMailerAutoload.php'),
(138,	0,	0,	'UpdateProfile',	'Allows front-end updating of a users own profile.',	0,	17,	0,	'/**\n * Login\n *\n * Copyright 2010-2012 by Shaun McCormick <shaun+login@modx.com>\n *\n * Login is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Login is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Login; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * @package login\n */\n/**\n * MODx UpdateProfile Snippet. Handles updating of User Profiles.\n *\n * @var modX $modx\n * @var Login $login\n * @var array $scriptProperties\n * \n * @package login\n */\nrequire_once $modx->getOption(\'login.core_path\',null,$modx->getOption(\'core_path\').\'components/login/\').\'model/login/login.class.php\';\n$login = new Login($modx,$scriptProperties);\n\n$controller = $login->loadController(\'UpdateProfile\');\nreturn $controller->run($scriptProperties);',	0,	'a:13:{s:9:\"submitVar\";a:7:{s:4:\"name\";s:9:\"submitVar\";s:4:\"desc\";s:33:\"prop_updateprofile.submitvar_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:4:\"user\";a:7:{s:4:\"name\";s:4:\"user\";s:4:\"desc\";s:28:\"prop_updateprofile.user_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:15:\"redirectToLogin\";a:7:{s:4:\"name\";s:15:\"redirectToLogin\";s:4:\"desc\";s:39:\"prop_updateprofile.redirecttologin_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:15:\"reloadOnSuccess\";a:7:{s:4:\"name\";s:15:\"reloadOnSuccess\";s:4:\"desc\";s:39:\"prop_updateprofile.reloadonsuccess_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:12:\"syncUsername\";a:7:{s:4:\"name\";s:12:\"syncUsername\";s:4:\"desc\";s:36:\"prop_updateprofile.syncusername_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:10:\"emailField\";a:7:{s:4:\"name\";s:10:\"emailField\";s:4:\"desc\";s:34:\"prop_updateprofile.emailfield_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:5:\"email\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:11:\"useExtended\";a:7:{s:4:\"name\";s:11:\"useExtended\";s:4:\"desc\";s:35:\"prop_updateprofile.useextended_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:15:\"excludeExtended\";a:7:{s:4:\"name\";s:15:\"excludeExtended\";s:4:\"desc\";s:39:\"prop_updateprofile.excludeextended_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:13:\"allowedFields\";a:7:{s:4:\"name\";s:13:\"allowedFields\";s:4:\"desc\";s:37:\"prop_updateprofile.allowedfields_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:21:\"allowedExtendedFields\";a:7:{s:4:\"name\";s:21:\"allowedExtendedFields\";s:4:\"desc\";s:45:\"prop_updateprofile.allowedextendedfields_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:8:\"preHooks\";a:7:{s:4:\"name\";s:8:\"preHooks\";s:4:\"desc\";s:32:\"prop_updateprofile.prehooks_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:9:\"postHooks\";a:7:{s:4:\"name\";s:9:\"postHooks\";s:4:\"desc\";s:33:\"prop_updateprofile.posthooks_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:17:\"placeholderPrefix\";a:7:{s:4:\"name\";s:17:\"placeholderPrefix\";s:4:\"desc\";s:41:\"prop_updateprofile.placeholderprefix_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(139,	1,	0,	'Gravatar',	'',	0,	0,	0,	'/**\n * @name Gravatar \n * @version 2\n * @author Oleg Pryadko <oleg@websitezen.com>\n * @description Gravatar snippet for MODx Revolution\n * @license Public Domain, use as you like (except possibly class file, which is based on http://www.talkphp.com/script-giveaway/1905-gravatar-wrapper-class.html)\n * @history version 1 by lossendae <lossendae@gmail.com>\n*/\n\n// Variables\n$email = $modx->getOption(\'email\', $scriptProperties, $modx->getOption(\'emailsender\', null, \'\'));\n$size = $modx->getOption(\'size\', $scriptProperties, \'80\');\n$site_default = $modx->getOption(\'gravatar_default\',null,\'\');\nif (!$site_default) {\n  $default = $modx->getOption(\'default\', $scriptProperties, $modx->getOption(\'image\', $scriptProperties, $modx->getOption(\'icon\', $scriptProperties, \'wavatar\')));\n} else {$default = $site_default;}\n$secure = $modx->getOption(\'secure\', $scriptProperties, \'\');\n$rating = $modx->getOption(\'rating\', $scriptProperties, \'g\');\n$profile = $modx->getOption(\'profile\', $scriptProperties, false);\n$extraParams = $modx->fromJSON($modx->getOption(\'extraParams\', $scriptProperties, \'{}\'));\n\n/* Output Filter Properties */\nif(isset($scriptProperties[\'input\'])){\n  $email = $scriptProperties[\'input\'];\n}\nif(isset($scriptProperties[\'options\'])){\n  if (is_numeric($scriptProperties[\'options\'])) {\n    $size = $scriptProperties[\'options\'];\n  } else {\n    $profile = $scriptProperties[\'options\'];\n  }\n}\n\n/* check for email, or get user\'s email if email is a number (userid) */\nif (!empty($email) && is_numeric($email)) {\n  $email = intval($email);\n  $userObject = $modx->getObject(\'modUser\',$email);\n  $userProfile = $userObject->getOne(\'Profile\');\n  $email = $userProfile->get(\'email\');\n}\nif (empty($email)) {return \'\';}\n\n/* Include Class Files and create class instance*/\n$base_path = MODX_CORE_PATH.\'/components/gravatar/\';  \n$f = $base_path.\'gravatar_class.php\';\nif (file_exists($f)) {include_once $f;} else {$modx->log(modX::LOG_LEVEL_ERROR,\'Gravatar class not found at: \'.$f);}\n$pAvatar = new TalkPHP_Gravatar();\n\n/* Set Email */\n$pAvatar->setEmail($email);\nif(!$profile) {$pAvatar->setSize($size);}\n\n/* Set Default Type */\nif ($default == 1 || strtolower($default) == \'identicon\') {\n  $pAvatar->setDefaultImageAsIdentIcon();\n} elseif ($default == 2 || strtolower($default) == \'monster\' || strtolower($default) == \'monsterid\') {\n  $pAvatar->setDefaultImageAsMonsterId();\n} elseif ($default == 3 || strtolower($default) == \'wavatar\') {\n  $pAvatar->setDefaultImageAsWavatar();\n} elseif ($default == 4 || strtolower($default) == \'mystery\' || strtolower($default) == \'mm\') {\n  $pAvatar->setDefaultImageAsMystery();\n} elseif ($default == 5 || strtolower($default) == \'retro\') {\n  $pAvatar->setDefaultImageAsRetro();\n} elseif (is_string($default) && !$profile) {\n  $pAvatar->setDefaultImageAsCustom($default);\n}\n\n/* Secure URLs */\nif ($secure) {\n  $pAvatar->setSecure();\n} elseif ($secure != \'0\' && $secure != \'false\') {\n  $url = $_SERVER[\'REQUEST_URI\'];\n  $ssl = FALSE;\n  if($_SERVER[\'HTTPS\'] == 1)  {\n    $ssl =  TRUE;\n  } elseif ($_SERVER[\'HTTPS\'] == \'on\'){\n    $ssl =  TRUE;\n  } elseif ($_SERVER[\'SERVER_PORT\'] == 443) {\n    $ssl = TRUE;\n  }\n  if ($ssl) {\n    $pAvatar->setSecure();\n  }\n}\n\n/* Set Rating */\nif (strtolower($rating) == \'g\') {$pAvatar->setRatingAsG();}\nelseif (strtolower($rating) == \'pg\') {$pAvatar->setRatingAsPG();}\nelseif (strtolower($rating) == \'r\') {$pAvatar->setRatingAsR();}\nelseif (strtolower($rating) == \'x\') {$pAvatar->setRatingAsX();}\n  \n/* append extra options to the URL (making sure to start with ? if we are outputting a profile URL) */\nif (is_array($extraParams) && !empty($extraParams)) {\n  if (!$profile) {$isstart = 0;} else {$isstart = 1;}\n  $pAvatar->setExtraParams($extraParams,$isstart);\n}\n\n/* Output URL */\nif ($profile) {\n  $pAvatar->setFiletype($profile);\n  $output = $pAvatar->getProfile();\n} else {\n  $output = $pAvatar->getAvatar();\n}\nunset($pAvatar);\nreturn $output;',	0,	NULL,	'',	1,	'core/elements/snippets/Gravatar.php'),
(140,	1,	0,	'Load',	'',	0,	0,	0,	'$host = \'sql354.your-server.de\';\n$username = \'aacall_sms\';\n$password = \'Ns2bDTNS1FwuJNMX\';\n$dbname = \'aacall_sms\';\n$charset = \'utf8\';\n$dsn = \"mysqli:host=$host;dbname=$dbname;charset=$charset\";\n$loadfile = $_POST[\'file_name\']; // получаем имя загруженного файла\nrequire_once $_SERVER[\'DOCUMENT_ROOT\'].\"/core/components/Classes/PHPExcel/IOFactory.php\"; // подключаем класс для доступа к файлу\n$objPHPExcel = PHPExcel_IOFactory::load($_SERVER[\'DOCUMENT_ROOT\'].\"/uploads/\".$loadfile);\nforeach ($objPHPExcel->getWorksheetIterator() as $worksheet) // цикл обходит страницы файла\n{\n  $highestRow = $worksheet->getHighestRow(); // получаем количество строк\n  $highestColumn = $worksheet->getHighestColumn(); // а так можно получить количество колонок\n\n  for ($row = 1; $row <= $highestRow; ++ $row) // обходим все строки\n  {\n    $cell1 = $worksheet->getCellByColumnAndRow(0, $row); //Телефон\n    $cell2 = $worksheet->getCellByColumnAndRow(1, $row); //Имя\n    $sql = \"INSERT INTO `phone` (`phone`,`contact`) VALUES\n(\'$cell1\',\'$cell2\')\";\n    $query = mysqli_query($sql) or die(\'Ошибка чтения записи: \'.mysqli_error());\n  }\n}',	0,	NULL,	'',	1,	'core/elements/snippets/Load.php'),
(141,	1,	0,	'send',	'',	0,	0,	0,	'require($_SERVER[\'DOCUMENT_ROOT\'].\'/assets/test/bd.php\');\nerror_reporting(E_ALL);\nini_set(\'display_errors\', 1);\nini_set(\'display_startup_errors\', 1);\nif (isset($_POST[\'sbt\'])) {\n   $send_phone = $_POST[\'sender_phone\'] ? $_POST[\'sender_phone\'] : \'\';\n	$se_phone = $_POST[\'se_phone\'];\n	$phone = str_replace(\'+\', \'\', $_POST[\'phone\']);\n	$text = $_POST[\'text\'];\n	$time = time();\n	$link = \"https://voip.a1call.me/api/message?_login=bulgakov_test_sms&_password=oG0kOzuQ&source_name=GiftSMS&source_number=$send_phone&destination_number=$phone&body=$text&require_dlr=1\";\n	$ch = curl_init();\n	curl_setopt($ch, CURLOPT_URL, $link);\n	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n	$result = json_decode(curl_exec($ch),1);\n	curl_close($ch);\n	$req_time = time();\n	$stats = $result[\'data\'][\'attributes\'][\'status\'];\n	$id = $result[\'data\'][\'id\'];\n	$query = \"INSERT INTO `request`(`time`, `status`, `number`, `se_phone`, `service_id`) VALUES (\'$req_time\',\'$stats\',\'$phone\',\'$send_phone\',\'$id\')\";\n	mysqli_query($bd,$query);\n}',	0,	NULL,	'',	1,	'core/elements/snippets/send.php'),
(142,	1,	0,	'phpthumbof',	'',	0,	0,	0,	'/**\n * pThumb\n * Copyright 2013-2014 Jason Grant\n *\n * Please see the GitHub page for documentation or to report bugs:\n * https://github.com/oo12/phpThumbOf\n *\n * Forked from phpThumbOf 1.4.0\n * Copyright 2009-2012 by Shaun McCormick <shaun@modx.com>\n *\n * pThumb is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; either version 2 of the License, or (at your option) any\n * later version.\n *\n * pThumb is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * phpThumbOf; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n */\n/**\n *\n * @var modX $modx\n * @var array $scriptProperties\n * @var string $input\n * @var string|array $options\n *\n */\n\nif (empty($input)) {  // Exit quietly if no file name given\n	return;\n}\n\n$scriptProperties[\'debug\'] = isset($debug) ? $debug : false;\n\n\nstatic $pt_settings = array();\n\nif (empty($pt_settings)) {\n	if (!$modx->loadClass(\'phpThumbOf\', MODX_CORE_PATH . \'components/phpthumbof/model/\', true, true)) {\n		$modx->log(modX::LOG_LEVEL_ERROR, \'[pThumb] Could not load phpThumbOf class.\');\n		return $input;\n	}\n}\n\n$pThumb = new phpThumbOf($modx, $pt_settings, $scriptProperties);\n\n$result = $pThumb->createThumbnail($input, $options);\n\nif (!empty($toPlaceholder) || $result[\'outputDims\']) {\n	if ($result[\'width\'] === \'\' && $result[\'file\'] && $dims = getimagesize($result[\'file\']) ) {\n			$result[\'width\'] = $dims[0];\n			$result[\'height\'] = $dims[1];\n	}\n	if (!empty($toPlaceholder)) {\n		$modx->setPlaceholders(array(\n			$toPlaceholder => $result[\'src\'],\n			\"$toPlaceholder.width\" => $result[\'width\'],\n			\"$toPlaceholder.height\" => $result[\'height\']\n		));\n		$output = \'\';\n	}\n	if ($result[\'outputDims\']) {\n		$output = \"src=\\\"{$result[\'src\']}\\\"\" . ($result[\'width\'] ? \" width=\\\"{$result[\'width\']}\\\" height=\\\"{$result[\'height\']}\\\"\" : \'\');\n	}\n}\nelse {\n	$output = $result[\'src\'];\n}\n\nif ($debug && $result[\'success\']) {  // if debugging is on and createThumbnail was successful, log the debug info\n	$pThumb->debugmsg(isset($pThumb->phpThumb->debugmessages) ? \':: Processed ::\' : \":: Loaded from cache: {$result[\'src\']}\", true);\n}\n\nreturn $output;',	0,	NULL,	'',	1,	'core/elements/snippets/phpthumbof.php'),
(143,	1,	0,	'recaptchav2_render',	'',	0,	0,	0,	'/**\n * Renders ReCaptcha V2 form\n *\n * Based on https://github.com/google/ReCAPTCHA/tree/master/php\n *\n * @copyright Copyright (c) 2014, Google Inc.\n * @link      http://www.google.com/recaptcha\n *\n * Ported to MODX by YJ Tso @sepiariver\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// Register API keys at https://www.google.com/recaptcha/admin\n$site_key = $modx->getOption(\'recaptchav2.site_key\', null, \'\');\n// reCAPTCHA supported 40+ languages listed here: https://developers.google.com/recaptcha/docs/language\n$lang = $modx->getOption(\'cultureKey\', null, \'en\', true);\n// use \'recaptchav2_invisible_html\' inside form element for invisible recaptcha\n$tpl = $modx->getOption(\'tpl\', $scriptProperties, \'recaptchav2_html\', true);\n$form_id = $modx->getOption(\'form_id\', $scriptProperties, \'\');\n\n// Merge scriptProperties to support arbitrary placeholders in template\n// The ID regex is like that for a reason, see Google\n$props = array_merge($scriptProperties, [\n    \'site_key\' => $site_key,\n    \'lang\' => $lang,\n    \'form_id\' => $form_id,\n]);\n$recaptcha_html = $modx->getChunk($tpl, $props);\n\nif ($hook) { \n    $hook->setValue(\'recaptchav2_html\', $recaptcha_html); // This won\'t re-render on page reload there\'s validation errors\n    return true;\n} else { // This works at least\n    return $recaptcha_html;\n}',	0,	NULL,	'',	1,	'core/elements/snippets/recaptchav2_render.php'),
(144,	1,	0,	'sendmail',	'',	0,	0,	0,	'require_once(\'core/components/phpmailer/PHPMailerAutoload.php\');\n$mail = new PHPMailer;\n$mail->CharSet = \'utf-8\';\n\n// Настройки SMTP:\n$smtp_host     = \'mail.a1call.me\'; // SMPT-адрес сервера\n$smtp_port     = 465; // TCP-порт\n$smtp_secure   = \'tls\'; // SMTP TLS/SSL\n$smtp_auth     = true; // SMPT-аутентификация\n$smtp_username = \'no_replay@a1call.me\'; // Почтовый ящик, с которого будут отправляться письма\n$smtp_password = \'Fce7VAvc\'; // Пароль почтового ящика, с которого будут отправляться письма\n\nuse PHPMailer\\PHPMailer\\PHPMailer;\nuse PHPMailer\\PHPMailer\\Exception;\n\n$mail->setFrom(\'no_replay@a1call.me\'); // от кого будет уходить письмо?\n$mail->addAddress(\'mrmegatest@gmail.com\');     // Кому будет уходить письмо\n$mail->isHTML(true);         \n\n$name = $_POST[\'Name\'];\n$email = $_POST[\'Email\'];\n$KLVMENEGEROV = $_POST[\'KLVMENEGEROV\'];\n\n$DELAUT__VHOD = $_POST[\'DELAUT__VHOD\'];\n$PRIN__WHOD = $_POST[\'PRIN__WHOD\'];\n$KOL__PROD__V__MES = $_POST[\'KOL__PROD__V__MES\'];\n$SRED__CHECK = $_POST[\'SRED__CHECK\'];\n$PVA = $_POST[\'PVA\'];\n$PCRM = $_POST[\'PCRM\'];\n$VGMIP = $_POST[\'VGMIP\'];\n$VPZS = $_POST[\'VPZS\'];\n$VZVPDK = $_POST[\'VZVPDK\'];\n$AFCT = $_POST[\'AFCT\'];\n$IVN = $_POST[\'IVN\'];\n$SSPVZ = $_POST[\'SSPVZ\'];\n$UNS = $_POST[\'UNS\'];\n$result = $_POST[\'result\'];\n//$mail->SMTPDebug = 3;                               // Enable verbose debug output\n\nif ($PVA == \'on\') {\n    $PVA = \"Да\";\n}\nif ($PVA == \'\') {\n    $PVA = \"Нет\";\n}\n\nif ($PCRM == \'on\') {\n    $PCRM = \"Да\";\n}\nif ($PCRM == \'\') {\n    $PCRM = \"Нет\";\n}\n\nif ($VGMIP == \'on\') {\n    $VGMIP = \"Да\";\n}\nif ($VGMIP == \'\') {\n    $VGMIP = \"Нет\";\n}\nif ($VPZS == \'on\') {\n    $VPZS = \"Да\";\n}\nif ($VPZS == \'\') {\n    $VPZS = \"Нет\";\n}\nif ($VZVPDK == \'on\') {\n    $VZVPDK = \"Да\";\n}\nif ($VZVPDK == \'\') {\n    $VZVPDK = \"Нет\";\n}\nif ($AFCT == \'on\') {\n    $AFCT = \"Да\";\n}\nif ($AFCT == \'\') {\n    $AFCT = \"Нет\";\n}\nif ($IVN == \'on\') {\n    $IVN = \"Да\";\n}\nif ($IVN == \'\') {\n    $IVN = \"Нет\";\n}\nif ($SSPVZ == \'on\') {\n    $SSPVZ = \"Да\";\n}\nif ($SSPVZ == \'\') {\n    $SSPVZ = \"Нет\";\n}\nif ($UNS == \'on\') {\n    $UNS = \"Да\";\n}\nif ($UNS == \'\') {\n    $UNS = \"Нет\";\n}\n                         // Set email format to HTML\n\n$mail->Subject = \'Польза Виртуальной АТС\';\n$mail->Body    = \'\' .$name . \' оставил заявку, <br>Почта этого пользователя: \' .$email. \',<br> Кол-во менеджеров: \' .$KLVMENEGEROV. \'.<br> Делают исходящих звонков в день (клиентам): \' .$DELAUT__VHOD. \',<br> Принимают входящих звонков в день (от клиентов): \' .$PRIN__WHOD. \',<br> Количество продаж в месяц (всего):\' .$KOL__PROD__V__MES. \',<br> Средний чек:\' .$SRED__CHECK. \',<br> Подключаемые опции:<br> Подключаем Виртуальную АТС: \' .$PVA. \",<br> Подключаем CRM: \" .$PCRM. \",<br> Включить голосовое меню и приветствие: \" .$VGMIP. \",<br> Включить приём звонков системой: \" .$VPZS. \",<br> Включить запись всех разговоров для контроля менеджеров: \" .$VZVPDK. \",<br> Активировать функцию Call Tracking: \" .$AFCT. \",<br> Использовать виртуальные номера: \" .$IVN. \",<br> Собирать статистику по всем звонкам: \" .$SSPVZ. \",<br> Установить на сайт виджет Ловец Лидов: \" .$UNS. \",<br> доход за месяц: \" .$result. \' грн\';\n$mail->AltBody = \'\';\n\nif(!$mail->send()) {\n    echo \'Error\';\n} else {\n    echo \'Есть\';\n}',	0,	NULL,	'',	1,	'core/elements/snippets/sendmail.php'),
(145,	1,	0,	'balans',	'',	0,	0,	0,	'$profile = $modx->user->getOne(\'Profile\');\n\n$link = \"http://78.47.124.109/get_balance.php?login=\" . $profile->get(\'fullname\') . \"&pass={$_SESSION[\'pass\']}\";\n$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, $link);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n$result = json_decode(curl_exec($ch),1);\ncurl_close($ch);\nif($result)\necho $result[\'amount\'] . \' \' . $result[\'currency\'];\nelse\necho \'Нет данных\';',	0,	NULL,	'',	1,	'core/elements/snippets/balans.php'),
(146,	0,	0,	'ForgotPassword',	'Displays a forgot password form.',	0,	17,	0,	'/**\n * ForgotPassword\n *\n * Copyright 2010 by Jason Coward <jason@modx.com> and Shaun McCormick\n * <shaun@modx.com>\n *\n * ForgotPassword is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; either version 2 of the License, or (at your option) any\n * later version.\n *\n * ForgotPassword is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * ForgotPassword; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * @package login\n */\n/**\n * MODx ForgotPassword Snippet. Displays a form for users who have forgotten\n * their password and gives them the ability to retrieve it.\n *\n * @package login\n */\nrequire_once $modx->getOption(\'login.core_path\',null,$modx->getOption(\'core_path\').\'components/login/\').\'model/login/login.class.php\';\n$login = new Login($modx,$scriptProperties);\n\n$controller = $login->loadController(\'ForgotPassword\');\n$output = $controller->run($scriptProperties);\nreturn $output;',	0,	'a:13:{s:8:\"emailTpl\";a:7:{s:4:\"name\";s:8:\"emailTpl\";s:4:\"desc\";s:33:\"prop_forgotpassword.emailtpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:18:\"lgnForgotPassEmail\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:11:\"emailTplAlt\";a:7:{s:4:\"name\";s:11:\"emailTplAlt\";s:4:\"desc\";s:36:\"prop_forgotpassword.emailtplalt_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:12:\"emailTplType\";a:7:{s:4:\"name\";s:12:\"emailTplType\";s:4:\"desc\";s:37:\"prop_forgotpassword.emailtpltype_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:4:{i:0;a:2:{s:5:\"value\";s:8:\"modChunk\";s:4:\"text\";s:18:\"opt_register.chunk\";}i:1;a:2:{s:5:\"value\";s:4:\"file\";s:4:\"text\";s:17:\"opt_register.file\";}i:2;a:2:{s:5:\"value\";s:6:\"inline\";s:4:\"text\";s:19:\"opt_register.inline\";}i:3;a:2:{s:5:\"value\";s:8:\"embedded\";s:4:\"text\";s:21:\"opt_register.embedded\";}}s:5:\"value\";s:8:\"modChunk\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:7:\"sentTpl\";a:7:{s:4:\"name\";s:7:\"sentTpl\";s:4:\"desc\";s:32:\"prop_forgotpassword.senttpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:20:\"lgnForgotPassSentTpl\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:11:\"sentTplType\";a:7:{s:4:\"name\";s:11:\"sentTplType\";s:4:\"desc\";s:36:\"prop_forgotpassword.senttpltype_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:4:{i:0;a:2:{s:5:\"value\";s:8:\"modChunk\";s:4:\"text\";s:18:\"opt_register.chunk\";}i:1;a:2:{s:5:\"value\";s:4:\"file\";s:4:\"text\";s:17:\"opt_register.file\";}i:2;a:2:{s:5:\"value\";s:6:\"inline\";s:4:\"text\";s:19:\"opt_register.inline\";}i:3;a:2:{s:5:\"value\";s:8:\"embedded\";s:4:\"text\";s:21:\"opt_register.embedded\";}}s:5:\"value\";s:8:\"modChunk\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:28:\"prop_forgotpassword.tpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:16:\"lgnForgotPassTpl\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:7:\"tplType\";a:7:{s:4:\"name\";s:7:\"tplType\";s:4:\"desc\";s:32:\"prop_forgotpassword.tpltype_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:4:{i:0;a:2:{s:5:\"value\";s:8:\"modChunk\";s:4:\"text\";s:18:\"opt_register.chunk\";}i:1;a:2:{s:5:\"value\";s:4:\"file\";s:4:\"text\";s:17:\"opt_register.file\";}i:2;a:2:{s:5:\"value\";s:6:\"inline\";s:4:\"text\";s:19:\"opt_register.inline\";}i:3;a:2:{s:5:\"value\";s:8:\"embedded\";s:4:\"text\";s:21:\"opt_register.embedded\";}}s:5:\"value\";s:8:\"modChunk\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:6:\"errTpl\";a:7:{s:4:\"name\";s:6:\"errTpl\";s:4:\"desc\";s:31:\"prop_forgotpassword.errtpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:9:\"lgnErrTpl\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:10:\"errTplType\";a:7:{s:4:\"name\";s:10:\"errTplType\";s:4:\"desc\";s:35:\"prop_forgotpassword.errtpltype_desc\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:4:{i:0;a:2:{s:5:\"value\";s:8:\"modChunk\";s:4:\"text\";s:18:\"opt_register.chunk\";}i:1;a:2:{s:5:\"value\";s:4:\"file\";s:4:\"text\";s:17:\"opt_register.file\";}i:2;a:2:{s:5:\"value\";s:6:\"inline\";s:4:\"text\";s:19:\"opt_register.inline\";}i:3;a:2:{s:5:\"value\";s:8:\"embedded\";s:4:\"text\";s:21:\"opt_register.embedded\";}}s:5:\"value\";s:8:\"modChunk\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:12:\"emailSubject\";a:7:{s:4:\"name\";s:12:\"emailSubject\";s:4:\"desc\";s:37:\"prop_forgotpassword.emailsubject_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:15:\"resetResourceId\";a:7:{s:4:\"name\";s:15:\"resetResourceId\";s:4:\"desc\";s:40:\"prop_forgotpassword.resetresourceid_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:1:\"1\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:10:\"redirectTo\";a:7:{s:4:\"name\";s:10:\"redirectTo\";s:4:\"desc\";s:36:\"prop_confirmregister.redirectto_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}s:14:\"redirectParams\";a:7:{s:4:\"name\";s:14:\"redirectParams\";s:4:\"desc\";s:40:\"prop_confirmregister.redirectparams_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:16:\"login:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(147,	1,	0,	'recaptchav3',	'',	0,	0,	0,	'/**\n * recaptchav3 hook for use with MODX form processors\n *\n * Based on https://github.com/google/recaptcha\n *\n * @copyright Copyright (c) 2014, Google Inc.\n * @link      http://www.google.com/recaptcha\n *\n * Ported to MODX by YJ Tso @sepiariver\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// Require hook object\nif (!$hook) {\n    $modx->log(modX::LOG_LEVEL_ERROR, \'RecaptchaV3 requires hook object.\');\n    return;\n}\n\n// Register API keys at https://www.google.com/recaptcha/admin\n$props[\'site_key\'] = $modx->getOption(\'recaptchav3.site_key\', null, \'\');\n$props[\'secret_key\'] = $modx->getOption(\'recaptchav3.secret_key\', null, \'\');\n// reCAPTCHA supported 40+ languages listed here: https://developers.google.com/recaptcha/docs/language\n$props[\'lang\'] = $modx->getOption(\'cultureKey\', null, \'en\');\n// https://developers.google.com/recaptcha/docs/v3 \"Actions\"\n$props[\'action_key\'] = $modx->getOption(\'recaptchav3.action_key\', null, \'recaptcha-action\', true);\n$props[\'token_key\'] = $modx->getOption(\'recaptchav3.token_key\', null, \'recaptcha-token\', true);\n\n// Options\n$hookConfig = [];\nif ($hook->formit) {\n    $hookConfig = $hook->formit->config;\n} elseif ($hook->login) {\n    $hookConfig = $hook->login->controller->config;\n}\nforeach ($hookConfig as $k => $v) {\n    if (strpos($k, \'recaptchav3.\') === 0) {\n        $k = substr($k, 12);\n        $props[$k] = $v;\n    }\n}\n\n// Defaults\n$props[\'threshold\'] = floatval($modx->getOption(\'threshold\', $props, 0.5, true));\n$props[\'display_resp_errors\'] = $modx->getOption(\'display_resp_errors\', $props, true);\n$props[\'ip\'] = $modx->getOption(\'HTTP_CF_CONNECTING_IP\', $_SERVER, $_SERVER[\'REMOTE_ADDR\'], true);\n\n// make sure the modLexicon class is loaded by instantiating\n$modx->getService(\'lexicon\',\'modLexicon\');\n// load lexicon\n$modx->lexicon->load(\'recaptchav2:default\');\n// get the message from default.inc.php from the correct lang\n$tech_err_msg = $modx->lexicon(\'recaptchav2.technical_error_message\');\n$recaptcha_err_msg = $modx->lexicon(\'recaptchav2.recaptchav3_error_message\');\n\n// Get the class\n$recaptchaPath = $modx->getOption(\'recaptchav2.core_path\', null, $modx->getOption(\'core_path\') . \'components/recaptchav2/\');\n$recaptchaPath .= \'model/recaptchav2/\';\nif (!file_exists($recaptchaPath . \'autoload.php\')) {\n    $modx->log(modX::LOG_LEVEL_ERROR, \'Cannot find required Recaptcha autoload.php file.\');\n    return false;\n}\nrequire_once($recaptchaPath . \'autoload.php\');\ntry {\n    $recaptcha = new \\ReCaptcha\\ReCaptcha($props[\'secret_key\'], new \\ReCaptcha\\RequestMethod\\CurlPost());\n} catch (Exception $e) {\n    $modx->log(modX::LOG_LEVEL_ERROR, \'Failed to load Recaptcha class.\');\n    return false;\n}\n\nif (!($recaptcha instanceof \\ReCaptcha\\ReCaptcha)) {\n    $hook->addError(\'recaptchav3_error\', $tech_err_msg);\n    $modx->log(modX::LOG_LEVEL_ERROR, \'Failed to load Recaptcha class.\');\n    return false;\n}\n\n// The response from reCAPTCHA\n$resp = null;\n// The error code from reCAPTCHA, if any\n$error = null;\n\n// Was there a reCAPTCHA response?\nif ($hook->getValue($props[\'token_key\'])) {\n    $resp = $recaptcha->setExpectedHostname(parse_url($modx->getOption(\'site_url\'), PHP_URL_HOST))\n              ->setExpectedAction($hook->getValue($props[\'action_key\']))\n              ->setScoreThreshold($props[\'threshold\'])\n              ->verify($hook->getValue($props[\'token_key\']), $props[\'ip\']);\n\n}\n\n// Hook pass/fail\nif ($resp != null && $resp->isSuccess()) {\n    return true;\n} else {\n    $msg = \'\';\n    if ($resp != null && $props[\'display_resp_errors\']) {\n        foreach ($resp->getErrorCodes() as $error) {\n            $msg .= $error . \"\\n\";\n        }\n    }\n    if (empty($msg)) $msg = $recaptcha_err_msg;\n    $hook->addError(\'recaptchav3_error\', $msg);\n    $modx->log(modX::LOG_LEVEL_DEBUG, print_r($resp, true));\n    return false;\n}\n\n\n// Checks failed\nreturn false;',	0,	NULL,	'',	1,	'core/elements/snippets/recaptchav3.php'),
(148,	1,	0,	'recaptchav3_render',	'',	0,	0,	0,	'/**\n * Renders ReCaptcha V3 form\n *\n * Based on https://github.com/google/recaptcha\n *\n * @copyright Copyright (c) 2014, Google Inc.\n * @link      http://www.google.com/recaptcha\n *\n * Ported to MODX by YJ Tso @sepiariver\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// Register API keys at https://www.google.com/recaptcha/admin\n$site_key = $modx->getOption(\'recaptchav3.site_key\', null, \'\');\n// reCAPTCHA supported 40+ languages listed here: https://developers.google.com/recaptcha/docs/language\n$lang = $modx->getOption(\'cultureKey\', null, \'en\', true);\n// https://developers.google.com/recaptcha/docs/v3 \"Actions\"\n$action_key = $modx->getOption(\'action_key\', $scriptProperties, $modx->getOption(\'recaptchav3.action_key\', null, \'recaptcha-action\', true), true);\n\n$token_key = $modx->getOption(\'token_key\', $scriptProperties, $modx->getOption(\'recaptchav3.token_key\', null, \'recaptcha-token\', true), true);\n\n// new \'recaptchav3_html\' Chunk\n$tpl = $modx->getOption(\'tpl\', $scriptProperties, \'recaptchav3_html\', true);\n$form_id = $modx->getOption(\'form_id\', $scriptProperties, $modx->resource->get(\'uri\'));\n\n// Merge scriptProperties to support arbitrary placeholders in template\n// The ID regex is like that for a reason, see Google\n$props = array_merge($scriptProperties, [\n    \'site_key\' => $site_key,\n    \'lang\' => $lang,\n    \'form_id\' => preg_replace(\'/[^A-Za-z_]/\', \'\', $form_id),\n    \'action_key\' => $action_key,\n    \'token_key\' => $token_key,\n]);\n$recaptcha_html = $modx->getChunk($tpl, $props);\n\nreturn $recaptcha_html;',	0,	NULL,	'',	1,	'core/elements/snippets/recaptchav3_render.php'),
(149,	1,	0,	'contacts',	'',	0,	0,	0,	'$host = \'localhost\';\n$username = \'admin\';\n$password = \'hfKJbTkMW9UWJjTCb7Xr\';\n$dbname = \'sms\';\n$charset = \'utf8\';\n\n/*\nif (isset($_COOKIE[\'_gcl_au\'])) {\n}else{\n   header(\"Location:http://78.47.124.109/\");\n   exit();\n}*/\n$dsn = \"mysql:host=$host;dbname=$dbname;charset=$charset\";\n$xpdo = new xPDO($dsn, $username, $password);\n\n$list = $xpdo->query(\"SELECT list FROM phone WHERE user = \'$user\' GROUP BY list\");\n$list = $list->fetchAll();\n\n$query = \"SELECT * FROM phone WHERE user=\'$user\'\" . (isset($_GET[\'list\']) ? \' AND list = \\\'\' . $modx->stripTags($_GET[\'list\']) . \'\\\'\' : \'\');\n$data = $xpdo->query($query);\n$i=1;\n?>\n\n\n	<style>\n@import url(\'https://rsms.me/inter/inter.css\');\n\nh1, h2, h3 {\n  font-weight: 900;\n}\n\nmark {\n  background: var(--color-accent);\n  color: var(--color-text);\n  font-weight: bold;\n  padding: 0 0.2em;\n}\n\n.card {\n  background: var(--color-background);\n  padding: calc(4 * var(--size-bezel));\n  margin-top: calc(4 * var(--size-bezel));\n  border-radius: var(--size-radius);\n  border: 3px solid var(--color-shadow, currentColor);\n  box-shadow: .5rem .5rem 0 var(--color-shadow, currentColor);\n  \n  &--inverted {\n    --color-background: var(--color-dark);\n    color: var(--color-light);\n    --color-shadow: var(--color-accent);\n  }\n  \n  &--accent {\n    --color-background: var(--color-signal);\n    --color-accent: var(--color-light);\n    color: var(--color-dark);\n  }\n  \n  *:first-child {\n    margin-top: 0;\n  }\n}\n\n\n.l-design-widht {\n  max-width: 40rem;\n  padding: 1rem;\n}\n\n.input {\n  position: relative;\n  \n  &__label {\n    position: absolute;\n    left: 0;\n    top: 0;\n    padding: calc(var(--size-bezel) * 0.75) calc(var(--size-bezel) * .5);\n    margin: calc(var(--size-bezel) * 0.75 + 3px) calc(var(--size-bezel) * .5);\n    background: pink;\n    white-space: nowrap;\n    transform: translate(0, 0);\n    transform-origin: 0 0;\n    background: var(--color-background);\n    transition: transform 120ms ease-in;\n    font-weight: bold;\n    line-height: 1.2;\n  }\n  &__field {\n    box-sizing: border-box;\n    display: block;\n    width: 100%;\n    border: 3px solid currentColor;\n    padding: calc(var(--size-bezel) * 1.5) var(--size-bezel);\n    color: currentColor;\n    background: transparent;\n    border-radius: var(--size-radius);\n    \n    &:focus,\n    &:not(:placeholder-shown) {\n      & + .input__label {\n        transform: translate(.25rem, -65%) scale(.8);\n        color: var(--color-accent);\n      }\n    }\n  }\n}\n\n\n.button-group {\n  margin-top: calc(var(--size-bezel) * 2.5);\n}\n\nbutton {\n    color: #ffffff;\n    background-color: #008337;\n    border: black;\n    border-radius: 4px;\n    font-weight: 600;\n  &[type=reset]{\n    background: var(--color-background);\n    font-weight: 200;\n  } \n}\n\nbutton + button {\n  margin-left: calc(var(--size-bezel) * 2);\n}\n\n.icon {\n  display: inline-block;\n  width: 1em; height: 1em;\n  margin-right: .5em;\n}\n\n.hidden {\n  display: none;\n}\n\n\n		*{\n			box-sizing: border-box;\n		}\n		.datas{\n			display: flex;\n			flex-direction: column;\n		}\n		/*.add{\n			width: 550px;\n\n		}*/\n		.add>span{\n			padding:10px;\n		}\n		.add>span:hover{\n			cursor: pointer;\n		}\n		.decor {\n		   position: relative;\n		   max-width: 400px;\n		   margin: 50px auto 0;\n		   background: white;\n		   border-radius: 30px;\n		}\n		table {\n		  font-family: arial, sans-serif;\n		  border-collapse: collapse;\n		  width: 100%;\n		}\n		td, th {\n		  border: 1px solid #dddddd;\n		  text-align: left;\n		  padding: 8px;\n		}\ninput {\n    margin-right: 15px;\n    background-color: #ffffff;\n    padding: 6px 8px;\n    border-radius: 5px;\n}\nselect {\n    padding: 8px 12px;\nmargin-right: 12px;\n}\n#list_contacts {\n    display: flex;\n    margin: 0 0 8px;\n    font-size: 15px;\n    font-weight: 600;\n    padding: 2px 20px;\n    background: #00833721;\n}\n#list_contacts a {\n    margin: 0 5px;\n    padding: 3px;\n}\n#list_contacts a.active {\n    color: #008337 !important;\n}\nform#fileLoad {\n    display: flex;\n}\n#add_contacts {\n}\n.h2, h2 {\n    font-size: 24px;\n}\n\nform {\n    background: #deefe58f;\n    padding: 25px;\n    border: 1px solid #ddd;\n    margin: 0 0 10px;\n}\nform.form select[name=\"list\"] {\n    margin: 0 15px 12px 0;\n    min-height: 43px;\n}\n	</style>\n	<h2 style=\"margin-top: 0px;\">Списки контактов</h2>\n<div id=\"list_contacts\">\n<a href=\"nomernyie-pulyi\" class=\"<?=!isset($_GET[\'list\']) ? \'active\' : \'\'?>\">Общий</a>\n<?foreach($list as $val):?>\n<a href=\"nomernyie-pulyi?list=<?=$val[\'list\']?>\" class=\"<?=$_GET[\'list\'] == $val[\'list\'] ? \'active\' : \'\'?>\"><?=$val[\'list\']?></a>\n<?endforeach?>\n</div>\n<div id=\"add_contacts\">\n<h2>Добавить контакт</h2>\n	<form action=\"http://78.47.124.109/assets/test/add.php\" method=\"post\" class=\"form\">\n<select name=\"list\" required>\n        <option value=\"\">Выберите список</option>\n        <?foreach($list as $val):?>\n            <option value=\"<?=$val[\'list\']?>\" <?=isset($_GET[\'list\']) && $_GET[\'list\'] == $val[\'list\'] ? \'selected\' : \'\'?>><?=$val[\'list\']?></option>\n        <?endforeach?>\n        <option value=\"__new__\">Новый</option>\n</select>\n		<div class=\"datas\">\n<label for=\"e1\" class=\"add\">\n<input type=\"text\" style=\"margin-bottom: 8px;margin-right: 15px;padding: 6px 8px;\" placeholder=\"Имя\" id=\"e1\" name=\"contact[]\" required>\n<input type=\"text\" style=\"margin-bottom: 8px;margin-right: 15px;padding: 6px 8px;\" placeholder=\"Телефон\" id=\"e1\" name=\"phone[]\" required>\n<span data-code=\"1\" onclick=\"Add(this)\"><b style=\"font-size: 15px;\">+</b></span>\n</label>\n </div>\n                <input type=\"text\" hidden name=\"user\" value=\"<?php echo $user?>\">\n    		<input type=\"submit\" style=\"color: #ffffff;background-color: #008337;border: black;border-radius: 4px;font-weight: 600;\"  value=\"Добавить контакт\" name=\"sbt\">\n	</form>\n	<h2>Загрузить контакты (.csv или .xlsx)</h2>\n<form action=\"http://78.47.124.109/assets/test/add.php\" enctype=\"multipart/form-data\" method=\"POST\" id=\"fileLoad\">\n    <input type=\"hidden\" name=\"user\" value=\"<?=$user?>\">\n    <select name=\"list\" required>\n        <option value=\"\">Выберите список</option>\n        <?foreach($list as $val):?>\n            <option value=\"<?=$val[\'list\']?>\" <?=isset($_GET[\'list\']) && $_GET[\'list\'] == $val[\'list\'] ? \'selected\' : \'\'?>><?=$val[\'list\']?></option>\n        <?endforeach?>\n        <option value=\"__new__\">Новый</option>\n    </select>\n    <input type=\"file\" name=\"upload_file\" onchange=\"loadFileContacts()\" disabled>\n</form>\n</div>\n\n	<?php if (isset($_GET[\'edit\'])):\n		$phone = $_GET[\'edit\'];\n		$query = \"SELECT * FROM `phone` WHERE id = \'$phone\'\";\n		$ph_data = $xpdo->query($query);\n		$row = $ph_data->fetch();\n\n	 ?>	\n	 	<h1>EDIT CONTACT <?=$row[\'contact\']?></h1>\n		<form action=\"http://78.47.124.109/assets/test/add.php\" method=\"post\" class=\"form\">\n			<div class=\"datas col-md-6 col-lg-6\">\n				<label for=\"e1\" class=\"add\"><input type=\"text\" placeholder=\"edd_contact\" id=\"e1\" name=\"edd_contact\" required value=\"<?=$row[\'contact\']?>\"><input type=\"text\" placeholder=\"number\" id=\"e1\" name=\"edd_phone\" required value=\"<?=$row[\'phone\']?>\"></label>\n				<input type=\"text\" hidden name=\"id\" value=\"<?=$row[\'id\']?>\">\n                                <input type=\"text\" hidden name=\"user\" value=\"<?php echo $user?>\">\n			</div>\n<div class=\"col-md-6 col-lg-6\">\n			<input type=\"submit\" style=\"background-color: #008337;color: #ffffff;\" value=\"EDIT\" name=\"sbit\">\n</div>\n		</form>\n	<?php endif ?>\n\n		<h2>Контакты</h2>\n<div class=\"table-responsive\">\n	<table>\n\n		<tr style=\"background-color: #f0f0f0;\">\n			<th class=\"thead-default\">№</th>\n			<th>Телефон</th>\n			<th>Имя</th>\n<?if(!isset($_GET[\'list\'])):?>\n			<th>Список</th>\n<?endif?>\n			<th>Изменения</th>\n		</tr>\n		<?php while ($cat = $data->fetch()) { ?>\n				<tr class=\"red\">\n					<td><?=$i?></td>\n					<td><?=$cat[\'phone\']?></td>\n					<td><?=$cat[\'contact\']?></td>\n                                        <?if(!isset($_GET[\'list\'])):?>\n					    <td><?=$cat[\'list\']?></td>\n                                        <?endif?>\n					<td><a href=\"http://78.47.124.109/nomernyie-pulyi?edit=<?=$cat[\'id\']?><?=isset($_GET[\'list\']) ? \'&list=\' . $_GET[\'list\'] : \'\'?>\">Редактировать</a> / <a href=\"http://78.47.124.109/assets/test/add.php?delete=<?=$cat[\'id\']?>\">Удалить</a></td>\n				</tr>\n		<?php \n                   $i=$i+1;\n                  } ?>		\n	</table>\n</div>\n	<script>\n		function Add(e){\n			let form = document.querySelector(\'.datas\')\n			let data = parseInt(e.dataset.code)+1;\n		    var newInput = document.createElement(\'div\');\n		    form.appendChild(newInput);\n		    newInput.outerHTML = `<label for=\"e${data}\" class=\"add\"><input type=\"text\" style=\"margin-bottom: 8px;\" placeholder=\"Имя\" id=\"e1\" name=\"contact[]\" required><input type=\"text\" style=\"margin-bottom: 8px;margin-left: 5px;\" placeholder=\"Телефон\" id=\"e${data}\" name=\"phone[]\" required><span data-code=\"e${data}\" onclick=\"Add(this)\"><b style=\"font-size: 15px;\">+</b></span></label>`;\n		}\n	</script>\n<?php',	0,	NULL,	'',	1,	'core/elements/snippets/contacts.php'),
(150,	1,	0,	'ticketCommentCount',	'',	0,	0,	0,	'$q = $modx->newQuery(\'modResource\', $id);\n$q->leftJoin(\'TicketThread\',\'TicketThread\', \"`TicketThread`.`name` = \'resource-{$id}\'\");\n$q->leftJoin(\'TicketComment\',\'TicketComment\', \"`TicketThread`.`id` = `TicketComment`.`thread`\");\n$q->where(array(\n    \'TicketComment.published\' => 1\n));\n\n$q->select(\'COUNT(`TicketComment`.`id`) as `comments`\');\n\n$count = 0;\nif ($q->prepare() && $q->stmt->execute()) {\n	$count = (integer) $q->stmt->fetch(PDO::FETCH_COLUMN);\n}\nreturn $count;',	0,	NULL,	'',	1,	'core/elements/snippets/ticketCommentCount.php'),
(151,	1,	0,	'spam_list',	'',	0,	0,	0,	'set_include_path(\".:/usr/lib/php:/usr/local/lib/php:/var/www/html/assets\");\ndate_default_timezone_set(\'Europe/Moscow\');\nrequire \'test/bd.php\';\n$time = time();\n\n$sql = \'SELECT * FROM massage WHERE status = \\\'0\\\' OR status = \\\'2\\\'\';\n$data = mysqli_query($bd, $sql);\nwhile($row = mysqli_fetch_assoc($data))\n	$data_arr[] = $row;\n\n?>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/assets/components/style_vay.css\">\n\n<div class=\"container_vay table-responsive\">\n	<table>\n		<thead>\n			<th>ID</th>\n			<th>Время начала</th>\n			<th>Получатели</th>\n			<th>Сообщение</th>\n			<th>Статус</th>\n			<th>Процесс</th>\n                        <th>Изменения</th>\n			<th></th>\n		</thead>\n		<tbody>\n			<?foreach($data_arr as $row):?>\n			<tr>\n				<td><?=$row[\'id\']?></td>\n				<td><?=date(\'d/m H:i\', $row[\'dec_time\'])?></td>\n				<td class=\"phones\"><?=$row[\'user_phone\']?></td>\n				<td class=\"msg\"><?=$row[\'massage\']?></td>\n				<td class=\"msg\"><?=(int)$row[\'status\'] === 2 ? \'выполняется\' : (!$row[\'status\'] ? \'в ожидании\' : \'завершена\')?></td>\n				<td class=\"msg\"><?=$row[\'progress\']?></td>\n				<td>\n					<a href=\"/generacziya-soobshhenij?mode=edit&id=<?=$row[\'id\']?>\">Редактировать</a> / \n					<a class=\"delete\" href=\"/generacziya-soobshhenij?mode=delete&id=<?=$row[\'id\']?>\">Удалить</a>\n				</td>\n			</tr>\n			<?endforeach?>\n		</tbody>\n	</table>\n</div>\n<?php',	0,	NULL,	'',	1,	'core/elements/snippets/spam_list.php'),
(152,	1,	0,	'form_sms',	'',	0,	0,	0,	'$bd = mysqli_connect(\'localhost\',\'admin\',\'hfKJbTkMW9UWJjTCb7Xr\',\'sms\');\n\necho \"string\";\nerror_reporting(E_ALL);\nini_set(\'display_errors\', 1);\nini_set(\'display_startup_errors\', 1);\nif (isset($_POST[\'sbt\'])) {\n	$se_phone = $_POST[\'se_phone\'];\n	$phone = str_replace(\'+\', \'\', $_POST[\'phone\']);\n	$text = $_POST[\'text\'];\n	$time = time();\n	$link = \"https://voip.a1call.me/api/message?_login=bulgakov_test_sms&_password=oG0kOzuQ&source_name=GiftSMS&destination_number=$phone&body=$text&require_dlr=1\";\n	$ch = curl_init();\n	curl_setopt($ch, CURLOPT_URL, $link);\n	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n	$result = json_decode(curl_exec($ch),1);\n	curl_close($ch);\n	$req_time = time();\n	$stats = $result[\'data\'][\'attributes\'][\'status\'];\n	$id = $result[\'data\'][\'id\'];\n	$query = \"INSERT INTO `request`(`time`, `status`, `number`, `service_id`) VALUES (\'$req_time\',\'$stats\',\'$phone\',\'$id\')\";\n	echo $query;\n	mysqli_query($bd,$query);\n}',	0,	NULL,	'',	1,	'core/elements/snippets/form_sms.php'),
(153,	1,	0,	'loadUserPhoto',	'',	0,	0,	0,	'$modx->log(modX::LOG_LEVEL_ERROR, \'[KW]: \' . \'profile\');\n// Получить профиль пользователя\n$profile = $modx->user->getOne(\'Profile\');\n$modx->log(modX::LOG_LEVEL_ERROR, \'[KW] profile: \' . print_r($profile->toArray(), true));\n// Получить значение поля photo\n$pathToPhoto = $profile->get(\'photo\');\n$modx->log(modX::LOG_LEVEL_ERROR, \'[KW] profile: \' . $pathToPhoto);\n// Установить полю photo текущее значение\n$hook->setValue(\'photo\', $pathToPhoto);\n\n// Запрос на удаление картинки (глобальный массив POST имеет ключ delete-photo-btn со значением отличным от NULL)\nif (isset($_POST[\'delete-photo-btn\'])) {\n  // Если поле photo не пустое, то..\n  if ($pathToPhoto) {\n    // Сформировать полный путь к файлу (фото)\n    $fullPathToPhoto = $modx->config[\'base_path\'].$pathToPhoto;\n    // Если файл (фото) есть, то удалить его\n    if(file_exists($fullPathToPhoto))\n      unlink($fullPathToPhoto);\n    // Установить полю photo пустое значение\n    $hook->setValue(\'photo\',\'\');\n  }\n}\n\n// Запрос на обновление (глобальный массив POST имеет ключ login-updprof-btn со значением отличным от NULL)\nif (isset($_POST[\'login-updprof-btn\'])) {\n  // Допустимые расширения (jpg, png, jpeg)\n  $validExt = array(\'jpg\', \'png\', \'jpeg\');\n  // Директория для хранения фото пользователей\n  $pathToPhoto = $modx->config[\'base_path\'] . \'assets/photouser/\';\n  // Имя файла пользователя \n  $nameFile = $_FILES[\'photo\'][\'name\'];\n  // Получить расширение загруженного пользователем файла в нижнем регистре\n  $extFile = mb_strtolower(pathinfo($nameFile, PATHINFO_EXTENSION));\n  // Временное имя, с которым принятый файл был сохранён на сервере\n  $tmpFile = $_FILES[\'photo\'][\'tmp_name\'];\n  // Если файл загружен посредством HTTP POST и ошибок в процессе загрузке не возникло, то...\n  if ((is_uploaded_file($tmpFile)) && !($_FILES[\'photo\'][\'error\'])) {\n    // Проверям соответствует ли расширение файла допустимому. Если всё хорошо, то...\n    if(in_array($extFile, $validExt)) {\n      // Формируем имя файлу (фото)\n      $nameFilePhoto = \'user\'.$modx->user->get(\'id\') . \'.\' . $extFile;\n      // Получаем полное имя файла (фото)\n      $fullNameFilePhoto = $pathToPhoto . $nameFilePhoto;\n      // Перемещаем временный файл на новое место $fullNameFilePhoto. Если всё прошло успешно, то...\n      if (move_uploaded_file($tmpFile, $fullNameFilePhoto)) {\n        // если файл phpthumb.class.php не был подключён, то включить его\n        require_once MODX_CORE_PATH.\'model/phpthumb/phpthumb.class.php\';\n        // Создать новый экземпляр класса phpThumb\n        $phpThumb = new phpThumb();\n        // Указываем исходное изображение\n        $phpThumb->setSourceFilename($fullNameFilePhoto);\n        // Устанавливаем ширину изображению\n        $phpThumb->setParameter(\'w\', 100);\n        // Устанавливаем высоту изображению\n        $phpThumb->setParameter(\'h\', 100);\n        // Задаём тип обрезки\n        $phpThumb->setParameter(\'zc\', \'1\');\n        // Задём качество изображения\n        $phpThumb->setParameter(\'q\', \'80\');\n        // Генерируем уменьшенное изображение. Если действие прошло успешно, то...\n        if ($phpThumb->GenerateThumbnail()) {\n          // Сохраняем изображение в файл $fullNameFilePhoto. Если данное действие завершилось успехом, то..\n          if ($phpThumb->RenderToFile($fullNameFilePhoto)) {\n            // Устанавливаем в поле photo путь к файлу \n            $hook->setValue(\'photo\',$modx->getOption(\'assets_url\'). \'photouser/\' . $nameFilePhoto);\n          }\n          else {\n            $modx->log(modX::LOG_LEVEL_ERROR, \'Ошибка при сохрании изображения в файл \'.$fullNameFilePhoto);\n          }\n        }\n        else {\n          // Записываем полученую ошибку в журнал MODX\n          $modx->log(modX::LOG_LEVEL_ERROR, print_r($phpThumb->debugmessages, 1));\n        }\n      }\n      else {\n        // Записываем в журнал что произошла ошибка при перемещении файла на новое место\n        $modx->log(modX::LOG_LEVEL_ERROR, \'Ошибка при перемещении временного файла \'.$tmpFile.\' на новое место \'.$fullNameFilePhoto);\n      }\n    } \n    else {\n      // Записываем в журнал сообщение о том, что расширение файла не соответствует разрешённому\n      $modx->log(modX::LOG_LEVEL_ERROR, \'Изображение имеет недопустимое расширение\');\n    }\n  }\n  else {\n    // Записываем в журнал что произошла ошибка при загрузке файла\n    $modx->log(modX::LOG_LEVEL_ERROR, \'Ошибка при загрузке файла. Код ошибки: \'.$_FILES[\'photo\'][\'error\']);\n  }\n}\nreturn true;',	0,	NULL,	'',	1,	'core/elements/snippets/loadUserPhoto.php'),
(154,	1,	0,	'add',	'',	0,	0,	0,	'',	0,	NULL,	'',	1,	'core/elements/snippets/add.php'),
(155,	0,	0,	'GalleryItem',	'',	0,	10,	0,	'/**\n * Gallery\n *\n * Copyright 2010-2012 by Shaun McCormick <shaun@modx.com>\n *\n * Gallery is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Gallery is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * @package gallery\n */\n/**\n * Display a single Gallery Item\n *\n * @package gallery\n */\n$gallery = $modx->getService(\'gallery\',\'Gallery\',$modx->getOption(\'gallery.core_path\',null,$modx->getOption(\'core_path\').\'components/gallery/\').\'model/gallery/\',$scriptProperties);\nif (!($gallery instanceof Gallery)) return \'\';\n\n/* get ID of item */\n$id = (int)$modx->getOption(\'id\',$scriptProperties,false);\nif ($modx->getOption(\'checkForRequestVar\',$scriptProperties,true)) {\n    $getParam = $modx->getOption(\'getParam\',$scriptProperties,\'galItem\');\n    if (!empty($_REQUEST[$getParam])) { $id = (int)$_REQUEST[$getParam]; }\n}\nif (empty($id)) return \'\';\n\n/* setup default properties */\n$tpl = $modx->getOption(\'tpl\',$scriptProperties,\'galItem\');\n$toPlaceholders = $modx->getOption(\'toPlaceholders\',$scriptProperties,true);\n$toPlaceholdersPrefix = $modx->getOption(\'toPlaceholdersPrefix\',$scriptProperties,\'galitem\');\n$albumTpl = $modx->getOption(\'albumTpl\',$scriptProperties,\'galItemAlbum\');\n$albumSeparator = $modx->getOption(\'albumSeparator\',$scriptProperties,\',&nbsp;\');\n$albumRequestVar = $modx->getOption(\'albumRequestVar\',$scriptProperties,\'galAlbum\');\n$tagTpl = $modx->getOption(\'tagTpl\',$scriptProperties,\'galItemTag\');\n$tagSeparator = $modx->getOption(\'tagSeparator\',$scriptProperties,\',&nbsp;\');\n$tagSortDir = $modx->getOption(\'tagSortDir\',$scriptProperties,\'DESC\');\n$tagRequestVar = $modx->getOption(\'tagRequestVar\',$scriptProperties,\'galTag\');\n/* get item */\n$c = $modx->newQuery(\'galItem\');\n$c->select($modx->getSelectColumns(\'galItem\',\'galItem\'));\n$c->where(array(\n    \'id\' => $id,\n));\n$item = $modx->getObject(\'galItem\',$c);\nif (empty($item)) return \'\';\n\n/* setup placeholders */\n$itemArray = $item->toArray();\n$itemArray[\'filename\'] = basename($item->get(\'filename\'));\n$itemArray[\'filesize\'] = $item->get(\'filesize\');\n\n/* get image+thumbnail */\n$thumbProperties = $modx->getOption(\'thumbProperties\',$scriptProperties,\'\');\n$thumbProperties = !empty($thumbProperties) ? $modx->fromJSON($thumbProperties) : array();\n$thumbProperties = array_merge(array(\n    \'w\' => (int)$modx->getOption(\'thumbWidth\',$scriptProperties,100),\n    \'h\' => (int)$modx->getOption(\'thumbHeight\',$scriptProperties,100),\n    \'zc\' => (boolean)$modx->getOption(\'thumbZoomCrop\',$scriptProperties,0),\n    \'far\' => (string)$modx->getOption(\'thumbFar\',$scriptProperties,\'C\'),\n    \'q\' => (int)$modx->getOption(\'thumbQuality\',$scriptProperties,90),\n),$thumbProperties);\n$itemArray[\'thumbnail\'] = $item->get(\'thumbnail\',$thumbProperties);\n\n$imageProperties = $modx->getOption(\'imageProperties\',$scriptProperties,\'\');\n$imageProperties = !empty($imageProperties) ? $modx->fromJSON($imageProperties) : array();\n$imageProperties = array_merge(array(\n    \'w\' => (int)$modx->getOption(\'imageWidth\',$scriptProperties,500),\n    \'h\' => (int)$modx->getOption(\'imageHeight\',$scriptProperties,500),\n    \'zc\' => (boolean)$modx->getOption(\'imageZoomCrop\',$scriptProperties,0),\n    \'far\' => (string)$modx->getOption(\'imageFar\',$scriptProperties,false),\n    \'q\' => (int)$modx->getOption(\'imageQuality\',$scriptProperties,90),\n),$imageProperties);\n$itemArray[\'image\'] = $item->get(\'thumbnail\',$imageProperties);\n\n/* get albums */\n$c = $modx->newQuery(\'galAlbum\');\n$c->innerJoin(\'galAlbumItem\',\'AlbumItems\',$modx->getSelectColumns(\'galAlbumItem\',\'AlbumItems\',\'\',array(\'album\')).\' = \'.$modx->getSelectColumns(\'galAlbum\',\'galAlbum\',\'\',array(\'id\'))\n    .\' AND \'.$modx->getSelectColumns(\'galAlbumItem\',\'AlbumItems\',\'\',array(\'item\')).\' = \'.$item->get(\'id\'));\n$c->sortby(\'AlbumItems.rank\',\'ASC\');\n$albums = $modx->getCollection(\'galAlbum\',$c);\n$itemArray[\'albums\'] = array();\n$i = 0;\nforeach ($albums as $album) {\n    $albumArray = $album->toArray(\'\',true,true);\n    $albumArray[\'idx\'] = $i;\n    $albumArray[\'albumRequestVar\'] = $albumRequestVar;\n    $itemArray[\'albums\'][] = $gallery->getChunk($albumTpl,$albumArray);\n    $i++;\n}\n$itemArray[\'albums\'] = implode($albumSeparator,$itemArray[\'albums\']);\n\n/* get tags */\n$c = $modx->newQuery(\'galTag\');\n$c->where(array(\n    \'item\' => $item->get(\'id\'),\n));\n$c->sortby(\'tag\',$tagSortDir);\n$tags = $modx->getCollection(\'galTag\',$c);\n$i = 0;\n$itemArray[\'tags\'] = array();\nforeach ($tags as $tag) {\n    $tagArray = $tag->toArray();\n    $tagArray[\'idx\'] = $i;\n    $tagArray[\'tagRequestVar\'] = $tagRequestVar;\n    $itemArray[\'tags\'][] = $gallery->getChunk($tagTpl,$tagArray);\n    $i++;\n}\n$itemArray[\'tags\'] = implode($tagSeparator,$itemArray[\'tags\']);\n\n/* if outputting to placeholders, use this, otherwise, use tpl */\nif ($toPlaceholders) {\n    $modx->toPlaceholders($itemArray,$toPlaceholdersPrefix);\n    return \'\';\n}\n\nif (empty($tpl)) return \'\';\n$output .= $gallery->getChunk($tpl,$itemArray);\nreturn $output;',	0,	'a:23:{s:2:\"id\";a:7:{s:4:\"name\";s:2:\"id\";s:4:\"desc\";s:19:\"galleryitem.id_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:14:\"toPlaceholders\";a:7:{s:4:\"name\";s:14:\"toPlaceholders\";s:4:\"desc\";s:31:\"galleryitem.toplaceholders_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:20:\"toPlaceholdersPrefix\";a:7:{s:4:\"name\";s:20:\"toPlaceholdersPrefix\";s:4:\"desc\";s:37:\"galleryitem.toplaceholdersprefix_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:7:\"galitem\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:3:\"tpl\";a:7:{s:4:\"name\";s:3:\"tpl\";s:4:\"desc\";s:20:\"galleryitem.tpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:7:\"galItem\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:8:\"albumTpl\";a:7:{s:4:\"name\";s:8:\"albumTpl\";s:4:\"desc\";s:25:\"galleryitem.albumtpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:12:\"galItemAlbum\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:14:\"albumSeparator\";a:7:{s:4:\"name\";s:14:\"albumSeparator\";s:4:\"desc\";s:31:\"galleryitem.albumseparator_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:7:\",&nbsp;\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:15:\"albumRequestVar\";a:7:{s:4:\"name\";s:15:\"albumRequestVar\";s:4:\"desc\";s:32:\"galleryitem.albumrequestvar_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:8:\"galAlbum\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:6:\"tagTpl\";a:7:{s:4:\"name\";s:6:\"tagTpl\";s:4:\"desc\";s:23:\"galleryitem.tagtpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:10:\"galItemTag\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:12:\"tagSeparator\";a:7:{s:4:\"name\";s:12:\"tagSeparator\";s:4:\"desc\";s:29:\"galleryitem.tagseparator_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:7:\",&nbsp;\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:10:\"tagSortDir\";a:7:{s:4:\"name\";s:10:\"tagSortDir\";s:4:\"desc\";s:27:\"galleryitem.tagsortdir_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:4:\"DESC\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:13:\"tagRequestVar\";a:7:{s:4:\"name\";s:13:\"tagRequestVar\";s:4:\"desc\";s:30:\"galleryitem.tagrequestvar_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:6:\"galTag\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:10:\"thumbWidth\";a:7:{s:4:\"name\";s:10:\"thumbWidth\";s:4:\"desc\";s:27:\"galleryitem.thumbwidth_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:3:\"100\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:11:\"thumbHeight\";a:7:{s:4:\"name\";s:11:\"thumbHeight\";s:4:\"desc\";s:28:\"galleryitem.thumbheight_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:3:\"100\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:13:\"thumbZoomCrop\";a:7:{s:4:\"name\";s:13:\"thumbZoomCrop\";s:4:\"desc\";s:30:\"galleryitem.thumbzoomcrop_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:8:\"thumbFar\";a:7:{s:4:\"name\";s:8:\"thumbFar\";s:4:\"desc\";s:25:\"galleryitem.thumbfar_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:1:\"C\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:12:\"thumbQuality\";a:7:{s:4:\"name\";s:12:\"thumbQuality\";s:4:\"desc\";s:29:\"galleryitem.thumbquality_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:90;s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:15:\"thumbProperties\";a:7:{s:4:\"name\";s:15:\"thumbProperties\";s:4:\"desc\";s:32:\"galleryitem.thumbproperties_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:10:\"imageWidth\";a:7:{s:4:\"name\";s:10:\"imageWidth\";s:4:\"desc\";s:27:\"galleryitem.imagewidth_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:11:\"imageHeight\";a:7:{s:4:\"name\";s:11:\"imageHeight\";s:4:\"desc\";s:28:\"galleryitem.imageheight_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:13:\"imageZoomCrop\";a:7:{s:4:\"name\";s:13:\"imageZoomCrop\";s:4:\"desc\";s:30:\"galleryitem.imagezoomcrop_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:8:\"imageFar\";a:7:{s:4:\"name\";s:8:\"imageFar\";s:4:\"desc\";s:25:\"galleryitem.imagefar_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:12:\"imageQuality\";a:7:{s:4:\"name\";s:12:\"imageQuality\";s:4:\"desc\";s:29:\"galleryitem.imagequality_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:90;s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:15:\"imageProperties\";a:7:{s:4:\"name\";s:15:\"imageProperties\";s:4:\"desc\";s:32:\"galleryitem.imageproperties_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(156,	1,	0,	'SmartOptimizer',	'',	0,	0,	0,	'/**\r\n * SmartOptimizer\r\n * Copyright 2011 Benjamin Vauchel <contact@omycode.fr>\r\n *\r\n * SmartOptimizer is free software; you can redistribute it and/or modify it\r\n * under the terms of the GNU General Public License as published by the Free\r\n * Software Foundation; either version 2 of the License, or (at your option) any\r\n * later version.\r\n *\r\n * SmartOptimizer is distributed in the hope that it will be useful, but WITHOUT ANY\r\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\r\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n *\r\n * You should have received a copy of the GNU General Public License along with\r\n * SmartOptimizer; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\r\n * Suite 330, Boston, MA 02111-1307 USA\r\n *\r\n * @package SmartOptimizer\r\n * @author Benjamin Vauchel <contact@omycode.fr>\r\n *\r\n * @version Version 1.0.0-pl\r\n * 20/4/12\r\n *\r\n * This snippet return the URL to the SmartOptimizer connector for CSS or JS files\r\n *\r\n\r\n/**\r\n  @version Version 1.0.0-pl\r\n\r\n /** Example properties\r\n * &package SmartOptimizer\r\n *\r\n *  Required Properties:\r\n *    @property input - (string) Url to JS or CSS files. Examples: assets/css/main.css or assets/css/main.css,index.css. Required if property files not used.\r\n *    @property files - (string) Url to JS or CSS files. Examples: assets/css/main.css or assets/css/main.css,index.css. Required if property input not used.\r\n *\r\n */\r\n \r\n$files = (!empty($input) ? $input : (!empty($files) ? $files : \'\'));\r\n\r\nreturn $modx->getOption(\'assets_url\').\'components/smartoptimizer/connector.php?\'.urlencode($files);',	0,	NULL,	'',	1,	'core/elements/snippets/SmartOptimizer.php'),
(157,	0,	0,	'GalleryAlbums',	'',	0,	10,	0,	'/**\n * Gallery\n *\n * Copyright 2010-2012 by Shaun McCormick <shaun@modx.com>\n *\n * Gallery is free software; you can redistribute it and/or modify it under the\n * terms of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * Gallery is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple\n * Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * @package gallery\n */\n/**\n * Loads a list of Albums\n *\n * @var modX $modx\n * @var Gallery $gallery\n * @package gallery\n */\n/** @noinspection PhpUndefinedVariableInspection */\n$gallery = $modx->getService(\'gallery\',\'Gallery\',$modx->getOption(\'gallery.core_path\',null,$modx->getOption(\'core_path\').\'components/gallery/\').\'model/gallery/\',$scriptProperties);\nif (!($gallery instanceof Gallery)) return \'\';\n\n/* setup default properties */\n$rowTpl = $modx->getOption(\'rowTpl\',$scriptProperties,\'galAlbumRowTpl\');\n$rowCls = $modx->getOption(\'rowCls\',$scriptProperties,\'\');\n$toPlaceholder = $modx->getOption(\'toPlaceholder\',$scriptProperties,false);\n$showAll = $modx->getOption(\'showAll\',$scriptProperties,false);\n$albumRequestVar = $modx->getOption(\'albumRequestVar\',$scriptProperties,\'galAlbum\');\n$albumCoverSort = $modx->getOption(\'albumCoverSort\',$scriptProperties,\'rank\');\n$albumCoverSortDir = $modx->getOption(\'albumCoverSortDir\',$scriptProperties,\'ASC\');\n$showName = $modx->getOption(\'showName\',$scriptProperties,true);\n\n$totalProperties = $scriptProperties;\n$totalProperties[\'limit\'] = \'0\';\n$totalProperties[\'start\'] = \'0\';\n$totalAlbums = $modx->call(\'galAlbum\', \'getList\', array(&$modx, $totalProperties));\n$totalVar = $modx->getOption(\'totalVar\', $scriptProperties, \'total\');\n$modx->setPlaceholder($totalVar, count($totalAlbums));\n\n/* build query */\n$albums = $modx->call(\'galAlbum\',\'getList\',array(&$modx,$scriptProperties));\n\n/* handle sorting for album cover */\nif ($albumCoverSort == \'rank\') {\n    $albumCoverSort = \'AlbumItems.rank\';\n}\nif (in_array(strtolower($albumCoverSort),array(\'random\',\'rand()\',\'rand\'))) {\n    $albumCoverSort = \'RAND()\';\n    $albumCoverSortDir = \'\';\n}\n\n/* get thumb properties for album cover */\n$thumbProperties = $modx->getOption(\'thumbProperties\',$scriptProperties,\'\');\n$thumbProperties = !empty($thumbProperties) ? $modx->fromJSON($thumbProperties) : array();\n$thumbProperties = array_merge(array(\n    \'w\' => (int)$modx->getOption(\'thumbWidth\',$scriptProperties,100),\n    \'h\' => (int)$modx->getOption(\'thumbHeight\',$scriptProperties,100),\n    \'zc\' => (string)$modx->getOption(\'thumbZoomCrop\',$scriptProperties,1),\n    \'far\' => (string)$modx->getOption(\'thumbFar\',$scriptProperties,\'C\'),\n    \'q\' => (int)$modx->getOption(\'thumbQuality\',$scriptProperties,90),\n),$thumbProperties);\n\n/* iterate */\n$output = array();\n$idx = 0;\n$filesUrl = $modx->call(\'galAlbum\',\'getFilesUrl\',array(&$modx));\n$nav = array();\n/** @var galAlbum $album */\nforeach ($albums as $album) {\n    $albumArray = $album->toArray();\n    $classes = array($rowCls);\n\n    if (!isset($nav[\'first\'])) {\n        $nav[\'first\'] = $albumArray[\'id\'];\n    }\n    if (!isset($nav[\'next\']) && isset($nav[\'current\'])) {\n        $nav[\'next\'] = $albumArray[\'id\'];\n    }\n    if (isset($_GET[$albumRequestVar]) && $_GET[$albumRequestVar] == $albumArray[\'id\']) {\n        $nav[\'current\'] = $albumArray[\'id\'];\n        $nav[\'curIdx\'] = $idx + 1;\n        $classes[] = \'current\';\n    }\n    if (!isset($nav[\'current\'])) {\n        $nav[\'prev\'] = $albumArray[\'id\'];\n    }\n    $nav[\'last\'] = $albumArray[\'id\'];\n\n    $albumArray[\'cls\'] = implode(\' \', $classes);\n    $albumArray[\'idx\'] = $idx;\n    $albumArray[\'showName\'] = $showName;\n    $albumArray[\'albumRequestVar\'] = $albumRequestVar;\n    $coverItem = $album->getCoverItem($albumCoverSort,$albumCoverSortDir);\n    if ($coverItem) {\n        $albumArray[\'image\'] = $coverItem->get(\'thumbnail\',$thumbProperties);\n        $albumArray[\'image_absolute\'] = $filesUrl.$coverItem->get(\'filename\');\n        $albumArray[\'total\'] = $coverItem->get(\'total\');\n    }\n\n    $albumArray[\'cls\'] = implode(\' \', $classes);\n    $albumArray[\'idx\'] = $idx;\n    $albumArray[\'showName\'] = $showName;\n    $albumArray[\'albumRequestVar\'] = $albumRequestVar;\n    $output[] = $gallery->getChunk($rowTpl,$albumArray);\n    $idx++;\n}\nif (!isset($nav[\'current\'])) {\n    unset($nav[\'prev\']);\n}\n$nav[\'count\'] = $idx;\n\n/* set output to placeholder or return */\n$outputSeparator = $modx->getOption(\'outputSeparator\',$scriptProperties,\"\\n\");\n$output = implode($outputSeparator,$output);\n\n/* if set, place in a container tpl */\n$containerTpl = $modx->getOption(\'containerTpl\',$scriptProperties,false);\nif (!empty($containerTpl)) {\n    $ct = $gallery->getChunk($containerTpl,array(\n        \'albums\' => $output,\n        \'nav\' => $nav,\n        \'albumRequestVar\' => $albumRequestVar\n    ));\n    if (!empty($ct)) $output = $ct;\n}\n\nif ($toPlaceholder) {\n    $modx->setPlaceholder($toPlaceholder,$output);\n    return \'\';\n}\nreturn $output;',	0,	'a:21:{s:6:\"rowTpl\";a:7:{s:4:\"name\";s:6:\"rowTpl\";s:4:\"desc\";s:25:\"galleryalbums.rowtpl_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:14:\"galAlbumRowTpl\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:6:\"rowCls\";a:7:{s:4:\"name\";s:6:\"rowCls\";s:4:\"desc\";s:25:\"galleryalbums.rowcls_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:4:\"sort\";a:7:{s:4:\"name\";s:4:\"sort\";s:4:\"desc\";s:23:\"galleryalbums.sort_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:4:\"rank\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:3:\"dir\";a:7:{s:4:\"name\";s:3:\"dir\";s:4:\"desc\";s:22:\"galleryalbums.dir_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:4:\"DESC\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:5:\"limit\";a:7:{s:4:\"name\";s:5:\"limit\";s:4:\"desc\";s:24:\"galleryalbums.limit_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:2:\"10\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:5:\"start\";a:7:{s:4:\"name\";s:5:\"start\";s:4:\"desc\";s:24:\"galleryalbums.start_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:1:\"0\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:13:\"toPlaceholder\";a:7:{s:4:\"name\";s:13:\"toPlaceholder\";s:4:\"desc\";s:32:\"galleryalbums.toplaceholder_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:12:\"showInactive\";a:7:{s:4:\"name\";s:12:\"showInactive\";s:4:\"desc\";s:31:\"galleryalbums.showinactive_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:13:\"prominentOnly\";a:7:{s:4:\"name\";s:13:\"prominentOnly\";s:4:\"desc\";s:32:\"galleryalbums.prominentonly_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:6:\"parent\";a:7:{s:4:\"name\";s:6:\"parent\";s:4:\"desc\";s:25:\"galleryalbums.parent_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:1:\"0\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:7:\"showAll\";a:7:{s:4:\"name\";s:7:\"showAll\";s:4:\"desc\";s:26:\"galleryalbums.showall_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:8:\"showName\";a:7:{s:4:\"name\";s:8:\"showName\";s:4:\"desc\";s:27:\"galleryalbums.showname_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:15:\"albumRequestVar\";a:7:{s:4:\"name\";s:15:\"albumRequestVar\";s:4:\"desc\";s:34:\"galleryalbums.albumrequestvar_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:8:\"galAlbum\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:14:\"albumCoverSort\";a:7:{s:4:\"name\";s:14:\"albumCoverSort\";s:4:\"desc\";s:33:\"galleryalbums.albumcoversort_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:4:\"rank\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:17:\"albumCoverSortDir\";a:7:{s:4:\"name\";s:17:\"albumCoverSortDir\";s:4:\"desc\";s:36:\"galleryalbums.albumcoversortdir_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:3:\"ASC\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:10:\"thumbWidth\";a:7:{s:4:\"name\";s:10:\"thumbWidth\";s:4:\"desc\";s:29:\"galleryalbums.thumbwidth_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:3:\"100\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:11:\"thumbHeight\";a:7:{s:4:\"name\";s:11:\"thumbHeight\";s:4:\"desc\";s:30:\"galleryalbums.thumbheight_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:3:\"100\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:13:\"thumbZoomCrop\";a:7:{s:4:\"name\";s:13:\"thumbZoomCrop\";s:4:\"desc\";s:32:\"galleryalbums.thumbzoomcrop_desc\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:1;s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:8:\"thumbFar\";a:7:{s:4:\"name\";s:8:\"thumbFar\";s:4:\"desc\";s:27:\"galleryalbums.thumbfar_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:1:\"C\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:12:\"thumbQuality\";a:7:{s:4:\"name\";s:12:\"thumbQuality\";s:4:\"desc\";s:31:\"galleryalbums.thumbquality_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";i:90;s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}s:15:\"thumbProperties\";a:7:{s:4:\"name\";s:15:\"thumbProperties\";s:4:\"desc\";s:34:\"galleryalbums.thumbproperties_desc\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";s:7:\"lexicon\";s:18:\"gallery:properties\";s:4:\"area\";s:0:\"\";}}',	'',	0,	''),
(158,	1,	0,	'adminLogin',	'',	0,	0,	0,	'/** @var AdminTools $AdminTools */\r\n/** @var array $scriptProperties */\r\n$path = $modx->getOption(\'admintools_core_path\', null, $modx->getOption(\'core_path\') . \'components/admintools/\') . \'services/\';\r\n$AdminTools = $modx->getService(\'admintools\', \'AdminTools\', $path, $scriptProperties);\r\n$get = array_map(\'trim\', $_GET);\r\n\r\nif (isset($_SERVER[\'HTTP_X_REQUESTED_WITH\']) && $_SERVER[\'HTTP_X_REQUESTED_WITH\'] === \'XMLHttpRequest\') {\r\n    $success = true;\r\n    $message = $modx->lexicon(\'admintools_link_is_sent\');\r\n\r\n    try {\r\n        $AdminTools->sendLoginLink($get);\r\n    } catch (InvalidArgumentException $e) {\r\n        $success = false;\r\n        $message =  $e->getMessage();\r\n    }\r\n    $response = [\'success\' => $success, \'message\' => $message];\r\n\r\n    exit($modx->toJSON($response));\r\n}\r\n\r\nif ($modx->user->isAuthenticated(\'mgr\')) {\r\n    $modx->sendRedirect($AdminTools->getManagerUrl());\r\n}\r\n$errormsg = \'\';\r\nif (isset($get[\'a\'], $get[\'token\']) && $get[\'a\'] === \'login\') {\r\n    $get[\'token\'] = $modx->sanitizeString($get[\'token\']);\r\n    $data = $AdminTools->getLoginState($get[\'token\']);\r\n    if (!empty($data[\'uid\']) && hash_equals($data[\'key\'], $AdminTools->getUserLoginKey())) {\r\n        $errormsg = $AdminTools->loginUser($data[\'uid\'], $get[\'token\']);\r\n    }\r\n}\r\n/** @var array $scriptProperties */\r\n$assetsUrl = $AdminTools->getOption(\'assetsUrl\');\r\n$modx->regClientCss($assetsUrl . \'css/mgr/login.css\');\r\n$modx->regClientScript($assetsUrl . \'js/mgr/login.js\');\r\nreturn $modx->getChunk($tpl, [\'errormsg\' => $errormsg]);',	0,	NULL,	'',	1,	'core/elements/snippets/adminLogin.php'),
(159,	1,	0,	'MailForm',	'',	0,	0,	0,	'require_once($_SERVER[\'DOCUMENT_ROOT\'].\'/core/components/phpmailer/PHPMailerAutoload.php\');\n$mail = new PHPMailer;\n$mail->CharSet = \'utf-8\';\n\n$mail->SMTPOptions = array(\n\'ssl\' => array(\n\'verify_peer\' => false,\n\'verify_peer_name\' => false,\n\'allow_self_signed\' => true\n)\n);\n$number = $_POST[\'NumberOfOperators\'];\n$name = $_POST[\'Name\'];\n$namecom = $_POST[\'NameCompany\'];\n$phone = $_POST[\'Phone\'];\n$email = $_POST[\'Email\'];\n$adminemail = $_POST[\'Email\'];\n\n$html = \"<table>\n<tr>\n<td style=\'padding: 10px; border: #e9e9e9 2px solid; width: 25%; background-color: #f8f8f8;\'><b>Количество менеджеров(операторов):</b></td>\n<td style=\'padding: 10px; border: #e9e9e9 2px solid;\'>{$_POST[\'NumberOfOperators\']}</td>\n</tr>\n<tr>\n<tr>\n<td style=\'padding: 10px; border: #e9e9e9 2px solid; width: 25%; background-color: #f8f8f8;\'><b>Имя :</b></td>\n<td style=\'padding: 10px; border: #e9e9e9 2px solid;\'>{$_POST[\'Name\']}</td>\n</tr>\n<tr>\n<td style=\'padding: 10px; border: #e9e9e9 2px solid; width: 25%; background-color: #f8f8f8;\'><b>Имя компании :</b></td>\n<td style=\'padding: 10px; border: #e9e9e9 2px solid;\'>{$_POST[\'NameCompany\']}</td>\n</tr>\n<tr>\n<td style=\'padding: 10px; border: #e9e9e9 2px solid; width: 25%; background-color: #f8f8f8;\'><b>Телефон :</b></td>\n<td style=\'padding: 10px; border: #e9e9e9 2px solid;\'>{$_POST[\'Phone\']}</td>\n</tr>\n<tr>\n<td style=\'padding: 10px; border: #e9e9e9 2px solid; width: 25%; background-color: #f8f8f8;\'><b>Email :</b></td>\n<td style=\'padding: 10px; border: #e9e9e9 2px solid;\'>{$_POST[\'Email\']}</td>\n</tr>\n</table>\";\n\n$html2 = \"<html style=\'width:100%;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;padding:0;Margin:0;\'>\n <head> \n  <meta charset=\'UTF-8\'> \n  <meta content=\'width=device-width, initial-scale=1\' name=\'viewport\'> \n  <meta name=\'x-apple-disable-message-reformatting\'> \n  <meta http-equiv=\'X-UA-Compatible\' content=\'IE=edge\'> \n  <meta content=\'telephone=no\' name=\'format-detection\'> \n  <title>Новое письмо</title> \n  <!--[if (mso 16)]>\n    <style type=\'text/css\'>\n    a {text-decoration: none;}\n    </style>\n    <![endif]--> \n  <!--[if gte mso 9]><style>sup { font-size: 100% !important; }</style><![endif]--> \n  <!--[if !mso]><!-- --> \n  <link href=\'https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700,700i\' rel=\'stylesheet\'> \n  <!--<![endif]--> \n  <style type=\'text/css\'>\n@media only screen and (max-width:600px) {p, ul li, ol li, a { font-size:16px!important; line-height:150%!important } h1 { font-size:30px!important; text-align:center; line-height:120%!important } h2 { font-size:26px!important; text-align:center; line-height:120%!important } h3 { font-size:20px!important; text-align:center; line-height:120%!important } h1 a { font-size:30px!important } h2 a { font-size:26px!important } h3 a { font-size:20px!important } .es-menu td a { font-size:13px!important } .es-header-body p, .es-header-body ul li, .es-header-body ol li, .es-header-body a { font-size:16px!important } .es-footer-body p, .es-footer-body ul li, .es-footer-body ol li, .es-footer-body a { font-size:16px!important } .es-infoblock p, .es-infoblock ul li, .es-infoblock ol li, .es-infoblock a { font-size:12px!important } *[class=\'gmail-fix\'] { display:none!important } .es-m-txt-c, .es-m-txt-c h1, .es-m-txt-c h2, .es-m-txt-c h3 { text-align:center!important } .es-m-txt-r, .es-m-txt-r h1, .es-m-txt-r h2, .es-m-txt-r h3 { text-align:right!important } .es-m-txt-l, .es-m-txt-l h1, .es-m-txt-l h2, .es-m-txt-l h3 { text-align:left!important } .es-m-txt-r img, .es-m-txt-c img, .es-m-txt-l img { display:inline!important } .es-button-border { display:block!important } a.es-button { font-size:16px!important; display:block!important; border-right-width:0px!important; border-left-width:0px!important } .es-btn-fw { border-width:10px 0px!important; text-align:center!important } .es-adaptive table, .es-btn-fw, .es-btn-fw-brdr, .es-left, .es-right { width:100%!important } .es-content table, .es-header table, .es-footer table, .es-content, .es-footer, .es-header { width:100%!important; max-width:600px!important } .es-adapt-td { display:block!important; width:100%!important } .adapt-img { width:100%!important; height:auto!important } .es-m-p0 { padding:0px!important } .es-m-p0r { padding-right:0px!important } .es-m-p0l { padding-left:0px!important } .es-m-p0t { padding-top:0px!important } .es-m-p0b { padding-bottom:0!important } .es-m-p20b { padding-bottom:20px!important } .es-mobile-hidden, .es-hidden { display:none!important } .es-desk-hidden { display:table-row!important; width:auto!important; overflow:visible!important; float:none!important; max-height:inherit!important; line-height:inherit!important } .es-desk-menu-hidden { display:table-cell!important } table.es-table-not-adapt, .esd-block-html table { width:auto!important } table.es-social { display:inline-block!important } table.es-social td { display:inline-block!important } }\n#outlook a {\n	padding:0;\n}\n.ExternalClass {\n	width:100%;\n}\n.ExternalClass,\n.ExternalClass p,\n.ExternalClass span,\n.ExternalClass font,\n.ExternalClass td,\n.ExternalClass div {\n	line-height:100%;\n}\n.es-button {\n	mso-style-priority:100!important;\n	text-decoration:none!important;\n}\na[x-apple-data-detectors] {\n	color:inherit!important;\n	text-decoration:none!important;\n	font-size:inherit!important;\n	font-family:inherit!important;\n	font-weight:inherit!important;\n	line-height:inherit!important;\n}\n.es-desk-hidden {\n	display:none;\n	float:left;\n	overflow:hidden;\n	width:0;\n	max-height:0;\n	line-height:0;\n	mso-hide:all;\n}\n</style> \n </head> \n <body style=\'width:100%;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;padding:0;Margin:0;\'> \n  <div class=\'es-wrapper-color\' style=\'background-color:#F6F6F6;\'> \n   <!--[if gte mso 9]>\n			<v:background xmlns:v=\'urn:schemas-microsoft-com:vml\' fill=\'t\'>\n				<v:fill type=\'tile\' color=\'#f6f6f6\'></v:fill>\n			</v:background>\n		<![endif]--> \n   <table class=\'es-wrapper\' width=\'100%\' cellspacing=\'0\' cellpadding=\'0\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;padding:0;Margin:0;width:100%;height:100%;background-repeat:repeat;background-position:center top;\'> \n     <tr style=\'border-collapse:collapse;\'> \n      <td valign=\'top\' style=\'padding:0;Margin:0;\'> \n       <table class=\'es-content\' cellspacing=\'0\' cellpadding=\'0\' align=\'center\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;table-layout:fixed !important;width:100%;\'> \n         <tr style=\'border-collapse:collapse;\'> \n          <td align=\'center\' style=\'padding:0;Margin:0;\'> \n           <table class=\'es-content-body\' width=\'600\' cellspacing=\'0\' cellpadding=\'0\' bgcolor=\'#ffffff\' align=\'center\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:#FFFFFF;\'> \n             <tr style=\'border-collapse:collapse;\'> \n              <td align=\'left\' style=\'padding:0;Margin:0;\'> \n               <table cellpadding=\'0\' cellspacing=\'0\' width=\'100%\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;\'> \n                 <tr style=\'border-collapse:collapse;\'> \n                  <td width=\'600\' align=\'center\' valign=\'top\' style=\'padding:0;Margin:0;\'> \n                   <table cellpadding=\'0\' cellspacing=\'0\' width=\'100%\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;\'> \n                     <tr style=\'border-collapse:collapse;\'> \n                      <td align=\'center\' style=\'padding:0;Margin:0;\'><a target=\'_blank\' href=\'http://a1call.me\' style=\'-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;font-size:14px;text-decoration:underline;color:#FFFFFF;\'><img class=\'adapt-img\' src=\'https://ekhuyw.stripocdn.email/content/guids/CABINET_d6e724ae1c2b1b1870f0557fcdf7f972/images/64071579009536952.png\' alt=\'A1 Telecom\' style=\'display:block;border:0;outline:none;text-decoration:none;-ms-interpolation-mode:bicubic;\' width=\'600\' title=\'A1 Telecom\' height=\'228\'></a></td> \n                     </tr> \n                   </table></td> \n                 </tr> \n               </table></td> \n             </tr> \n           </table></td> \n         </tr> \n       </table> \n       <table class=\'es-content\' cellspacing=\'0\' cellpadding=\'0\' align=\'center\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;table-layout:fixed !important;width:100%;\'> \n         <tr style=\'border-collapse:collapse;\'> \n          <td align=\'center\' style=\'padding:0;Margin:0;\'> \n           <table class=\'es-content-body\' width=\'600\' cellspacing=\'0\' cellpadding=\'0\' bgcolor=\'#ffffff\' align=\'center\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:#FFFFFF;\'> \n             <tr style=\'border-collapse:collapse;\'> \n              <td align=\'left\' style=\'padding:0;Margin:0;padding-left:20px;padding-right:20px;padding-top:25px;\'> \n               <table width=\'100%\' cellspacing=\'0\' cellpadding=\'0\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;\'> \n                 <tr style=\'border-collapse:collapse;\'> \n                  <td width=\'560\' valign=\'top\' align=\'center\' style=\'padding:0;Margin:0;\'> \n                   <table width=\'100%\' cellspacing=\'0\' cellpadding=\'0\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;\'> \n                     <tr style=\'border-collapse:collapse;\'> \n                      <td class=\'es-m-txt-l\' align=\'left\' bgcolor=\'transparent\' style=\'padding:0;Margin:0;padding-bottom:10px;\'><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'>Спасибо за заполнение заявки на нашем сайте! Скоро наш менеджер свяжется с Вами для уточнения информации и согласование подключения. А пока хотим обратить внимание на некоторые другие наши услуги.</p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'><br></p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'>Это выгодные тарифы на набор сервисов для моментального увеличения количества клиентов и прибыли компании, такие как - облачная АТС, кнопка обратного звонка, call-трекинг и многое другое.</p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'><br></p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'>Это SIP-каналы, с посекундной тарификацией позволяющие не переплачивать за телефонную связь.</p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'><br></p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'>Это облачный call-центр. Больше не нужны IP-телефоны, софтфоны, VPN каналы... Все работает через браузер.</p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'><br></p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'>Так же наши разработчики готовы предложить индивидуальные решения в зависимости от специфики бизнеса (интеграция с различными внешними ресурсами, быстрая настройка любых функций);</p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'><br></p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'>Если же у Вас еще остались вопросы то Вы можете задать их менеджеру, при контакте или же самим позвонить по телефону +380 (44) 299 70 60.</p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'><br></p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#000000;\'>Мы возьмём на себя организацию телефонной системы с целью роста вашего бизнеса!</p></td> \n                     </tr> \n                   </table></td> \n                 </tr> \n               </table></td> \n             </tr> \n           </table></td> \n         </tr> \n       </table> \n       <table class=\'es-content\' cellspacing=\'0\' cellpadding=\'0\' align=\'center\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;table-layout:fixed !important;width:100%;\'> \n         <tr style=\'border-collapse:collapse;\'> \n          <td align=\'center\' style=\'padding:0;Margin:0;\'> \n           <table class=\'es-content-body\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:#FFFFFF;\' width=\'600\' cellspacing=\'0\' cellpadding=\'0\' bgcolor=\'#ffffff\' align=\'center\'> \n             <tr style=\'border-collapse:collapse;\'> \n              <td align=\'left\' style=\'padding:0;Margin:0;padding-top:20px;padding-left:20px;padding-right:20px;\'> \n               <!--[if mso]><table width=\'560\' cellpadding=\'0\' cellspacing=\'0\'><tr><td width=\'360\' valign=\'top\'><![endif]--> \n               <table cellpadding=\'0\' cellspacing=\'0\' class=\'es-left\' align=\'left\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;float:left;\'> \n                 <tr style=\'border-collapse:collapse;\'> \n                  <td class=\'es-m-p20b\' width=\'360\' align=\'left\' style=\'padding:0;Margin:0;\'> \n                   <table width=\'100%\' cellspacing=\'0\' cellpadding=\'0\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;\'> \n                     <tr style=\'border-collapse:collapse;\'> \n                      <td class=\'es-m-txt-c\' align=\'left\' style=\'padding:0;Margin:0;\'><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#333333;\'><br></p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#333333;\'>До связи!</p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#333333;\'><br></p><p style=\'Margin:0;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-size:14px;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;line-height:21px;color:#333333;\'>Служба продаж A1 Telecom, sales@a1call.me.</p></td> \n                     </tr> \n                   </table></td> \n                 </tr> \n               </table> \n               <!--[if mso]></td><td width=\'20\'></td><td width=\'180\' valign=\'top\'><![endif]--> \n               <table cellpadding=\'0\' cellspacing=\'0\' align=\'right\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;\'> \n                 <tr style=\'border-collapse:collapse;\'> \n                  <td width=\'180\' align=\'left\' style=\'padding:0;Margin:0;\'> \n                   <table cellpadding=\'0\' cellspacing=\'0\' width=\'100%\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;\'> \n                     <tr style=\'border-collapse:collapse;\'> \n                      <td align=\'center\' style=\'padding:0;Margin:0;display:none;\'></td> \n                     </tr> \n                   </table></td> \n                 </tr> \n               </table> \n               <!--[if mso]></td></tr></table><![endif]--></td> \n             </tr> \n           </table></td> \n         </tr> \n       </table> \n       <table class=\'es-footer\' cellspacing=\'0\' cellpadding=\'0\' align=\'center\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;table-layout:fixed !important;width:100%;background-color:transparent;background-repeat:repeat;background-position:center top;\'> \n         <tr style=\'border-collapse:collapse;\'> \n          <td align=\'center\' style=\'padding:0;Margin:0;\'> \n           <table class=\'es-footer-body\' width=\'600\' cellspacing=\'0\' cellpadding=\'0\' align=\'center\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:#FFFFFF;\'> \n             <tr style=\'border-collapse:collapse;\'> \n              <td style=\'Margin:0;padding-top:15px;padding-bottom:15px;padding-left:20px;padding-right:20px;background-color:#FFFFFF;background-position:left bottom;\' bgcolor=\'#ffffff\' align=\'left\'> \n               <!--[if mso]><table width=\'560\' cellpadding=\'0\' cellspacing=\'0\'><tr><td width=\'180\' valign=\'top\'><![endif]--> \n               <table class=\'es-left\' cellspacing=\'0\' cellpadding=\'0\' align=\'left\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;float:left;\'> \n                 <tr style=\'border-collapse:collapse;\'> \n                  <td class=\'es-m-p0r es-m-p20b\' width=\'180\' valign=\'top\' align=\'center\' style=\'padding:0;Margin:0;\'> \n                   <table width=\'100%\' cellspacing=\'0\' cellpadding=\'0\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;\'> \n                     <tr style=\'border-collapse:collapse;\'> \n                      <td class=\'es-m-txt-c\' align=\'left\' style=\'padding:0;Margin:0;\'><a target=\'_blank\' href=\'http://a1call.me\' style=\'-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;font-size:14px;text-decoration:underline;color:#FFFFFF;\'><img src=\'https://ekhuyw.stripocdn.email/content/guids/CABINET_d6e724ae1c2b1b1870f0557fcdf7f972/images/78201579010494156.jpg\' alt=\'A1 Telecom\' style=\'display:block;border:0;outline:none;text-decoration:none;-ms-interpolation-mode:bicubic;\' width=\'100\' title=\'A1 Telecom\' height=\'78\'></a></td> \n                     </tr> \n                   </table></td> \n                 </tr> \n               </table> \n               <!--[if mso]></td><td width=\'20\'></td><td width=\'360\' valign=\'top\'><![endif]--> \n               <table cellspacing=\'0\' cellpadding=\'0\' align=\'right\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;\'> \n                 <tr style=\'border-collapse:collapse;\'> \n                  <td width=\'360\' align=\'left\' style=\'padding:0;Margin:0;\'> \n                   <table width=\'100%\' cellspacing=\'0\' cellpadding=\'0\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;\'> \n                     <tr style=\'border-collapse:collapse;\'> \n                      <td class=\'es-m-txt-c\' align=\'right\' style=\'padding:0;Margin:0;padding-top:25px;\'> \n                       <table class=\'es-table-not-adapt es-social\' cellspacing=\'0\' cellpadding=\'0\' style=\'mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;\'> \n                         <tr style=\'border-collapse:collapse;\'> \n                          <td valign=\'top\' align=\'center\' style=\'padding:0;Margin:0;padding-right:15px;\'><a target=\'_blank\' href=\'https://www.facebook.com/A1Tele\' style=\'-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;font-size:14px;text-decoration:underline;color:#FFFFFF;\'><img title=\'Facebook\' src=\'https://ekhuyw.stripocdn.email/content/assets/img/social-icons/circle-black/facebook-circle-black.png\' alt=\'Fb\' width=\'32\' height=\'32\' style=\'display:block;border:0;outline:none;text-decoration:none;-ms-interpolation-mode:bicubic;\'></a></td> \n                          <td valign=\'top\' align=\'center\' style=\'padding:0;Margin:0;padding-right:15px;\'><a target=\'_blank\' href=\'https://www.linkedin.com/company/a-1-telecom\' style=\'-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;font-size:14px;text-decoration:underline;color:#FFFFFF;\'><img title=\'Linkedin\' src=\'https://ekhuyw.stripocdn.email/content/assets/img/social-icons/circle-black/linkedin-circle-black.png\' alt=\'In\' width=\'32\' height=\'32\' style=\'display:block;border:0;outline:none;text-decoration:none;-ms-interpolation-mode:bicubic;\'></a></td> \n                          <td valign=\'top\' align=\'center\' style=\'padding:0;Margin:0;padding-right:15px;\'><a target=\'_blank\' href=\'https://twitter.com/SKMTelecom\' style=\'-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;font-size:14px;text-decoration:underline;color:#FFFFFF;\'><img title=\'Twitter\' src=\'https://ekhuyw.stripocdn.email/content/assets/img/social-icons/circle-black/twitter-circle-black.png\' alt=\'Tw\' width=\'32\' height=\'32\' style=\'display:block;border:0;outline:none;text-decoration:none;-ms-interpolation-mode:bicubic;\'></a></td> \n                          <td valign=\'top\' align=\'center\' style=\'padding:0;Margin:0;\'><a target=\'_blank\' href=\'https://www.xing.com/communities/groups/A1telecom-b93b-1120167\' style=\'-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-family:\'open sans\', \'helvetica neue\', helvetica, arial, sans-serif;font-size:14px;text-decoration:underline;color:#FFFFFF;\'><img title=\'Xing\' src=\'https://ekhuyw.stripocdn.email/content/assets/img/social-icons/circle-black/xing-circle-black.png\' alt=\'Xing\' width=\'32\' height=\'32\' style=\'display:block;border:0;outline:none;text-decoration:none;-ms-interpolation-mode:bicubic;\'></a></td> \n                         </tr> \n                       </table></td> \n                     </tr> \n                   </table></td> \n                 </tr> \n               </table> \n               <!--[if mso]></td></tr></table><![endif]--></td> \n             </tr> \n           </table></td> \n         </tr> \n       </table></td> \n     </tr> \n   </table> \n  </div>  \n </body>\n</html>\";\n\n//$mail->SMTPDebug = 3;                               // Enable verbose debug output\n\n$mail->isSMTP();                                      // Set mailer to use SMTP\n$mail->Host = \'mail.a1call.me\';  																							// Specify main and backup SMTP servers\n$mail->SMTPAuth = true;                               // Enable SMTP authentication\n$mail->Username = \'no_replay@a1call.me\'; // Ваш логин от почты с которой будут отправляться письма\n$mail->Password = \'Fce7VAvc\'; // Ваш пароль от почты с которой будут отправляться письма\n$mail->SMTPSecure = \'tls\';                            // Enable TLS encryption, `ssl` also accepted\n$mail->Port = 587; // TCP port to connect to / этот порт может отличаться у других провайдеров\n\n$mail->setFrom(\'dsmirnov@a1call.me\'); // от кого будет уходить письмо?\n$mail->addAddress(\'dsmirnov@a1call.me\');     // Кому будет уходить письмо \n//$mail->addAddress(\'dsmirnov@a1call.me\');               // Name is optional\n//$mail->addReplyTo(\'info@example.com\', \'Information\');\n//$mail->addCC(\'mrmega7744@gmail.com\');\n//$mail->addBCC(\'bcc@example.com\');\n//$mail->addAttachment(\'/var/tmp/file.tar.gz\');         // Add attachments\n//$mail->addAttachment(\'/tmp/image.jpg\', \'new.jpg\');    // Optional name\n$mail->isHTML(true);                                  // Set email format to HTML\n\n$mail->Subject = \'Contacts\';\n$mail->Body    = $html;\n$mail->AltBody = $htmlBody;\n\nif(!$mail->send()) {\n    echo \'Error\';\n} else {\n    $mail->ClearAddresses();\n    $mail->AddAddress($adminemail);\n    $mail->Subject = \'Письмо от A1 Telecom\';\n    $mail->Body = $html2;\n    $mail->Send();\n}',	0,	NULL,	'',	1,	'core/elements/snippets/MailForm.php'),
