├── assets
└── components
│ └── frontendmanager
│ ├── index.html
│ ├── js
│ ├── index.html
│ ├── mgr
│ │ ├── index.html
│ │ └── manager.js
│ └── web
│ │ └── frontend.js
│ ├── css
│ ├── mgr
│ │ ├── index.html
│ │ └── manager.css
│ ├── web
│ │ ├── index.html
│ │ └── frontend.css
│ └── fonts
│ │ ├── index.html
│ │ ├── Flaticon.eot
│ │ ├── Flaticon.ttf
│ │ ├── Flaticon.woff
│ │ ├── flaticon.css
│ │ ├── _flaticon.scss
│ │ ├── flaticon.html
│ │ └── Flaticon.svg
│ └── vendor
│ └── contenttools
│ ├── images
│ ├── icons.woff
│ ├── video.svg
│ ├── drop-horz.svg
│ ├── drop-vert-above.svg
│ └── drop-vert-below.svg
│ └── content-tools.min.css
├── core
└── components
│ └── frontendmanager
│ ├── docs
│ ├── readme.txt
│ ├── changelog.txt
│ └── license.txt
│ ├── elements
│ ├── plugins
│ │ └── plugin.frontendmanager.php
│ └── chunks
│ │ └── chunk.frontendmanager.tpl
│ ├── index.class.php
│ ├── lexicon
│ ├── en
│ │ └── default.inc.php
│ └── ru
│ │ └── default.inc.php
│ └── model
│ └── frontendmanager
│ └── frontendmanager.class.php
├── _build
├── includes
│ └── functions.php
├── resolvers
│ ├── resolve.chunks.php
│ └── resolve.setup.php
├── data
│ ├── transport.chunks.php
│ ├── transport.plugins.php
│ └── transport.settings.php
├── build.model.php
├── build.config.php
├── setup.options.php
└── build.transport.php
└── README.md
/assets/components/frontendmanager/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/components/frontendmanager/js/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/components/frontendmanager/css/mgr/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/components/frontendmanager/css/web/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/components/frontendmanager/js/mgr/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/components/frontendmanager/css/fonts/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/components/frontendmanager/css/fonts/Flaticon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/modx-pro/frontendmanager/HEAD/assets/components/frontendmanager/css/fonts/Flaticon.eot
--------------------------------------------------------------------------------
/assets/components/frontendmanager/css/fonts/Flaticon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/modx-pro/frontendmanager/HEAD/assets/components/frontendmanager/css/fonts/Flaticon.ttf
--------------------------------------------------------------------------------
/assets/components/frontendmanager/css/fonts/Flaticon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/modx-pro/frontendmanager/HEAD/assets/components/frontendmanager/css/fonts/Flaticon.woff
--------------------------------------------------------------------------------
/assets/components/frontendmanager/vendor/contenttools/images/icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/modx-pro/frontendmanager/HEAD/assets/components/frontendmanager/vendor/contenttools/images/icons.woff
--------------------------------------------------------------------------------
/core/components/frontendmanager/docs/readme.txt:
--------------------------------------------------------------------------------
1 | --------------------
2 | frontendmanager
3 | --------------------
4 | Author: but1head ';
30 | }
31 |
32 | /** @var xPDOManager $manager */
33 | $manager = $modx->getManager();
34 | /** @var xPDOGenerator $generator */
35 | $generator = $manager->getGenerator();
36 |
37 | // Remove old model
38 | rrmdir($sources['model'] . PKG_NAME_LOWER . '/mysql');
39 |
40 | // Generate a new one
41 | $generator->parseSchema($sources['xml'], $sources['model']);
42 |
43 | $modx->log(modX::LOG_LEVEL_INFO, 'Model generated.');
44 | if (!XPDO_CLI_MODE) {
45 | echo '';
46 | }
--------------------------------------------------------------------------------
/core/components/frontendmanager/elements/plugins/plugin.frontendmanager.php:
--------------------------------------------------------------------------------
1 | user->hasSessionContext('mgr')) return;
3 | if (!$modx->user->isMember(explode(',', $modx->getOption('frontendmanager_active_groups', null, '')))) return;
4 | if ($modx->resource) {
5 | if (in_array($modx->resource->get('id'), explode(',', $modx->getOption('frontendmanager_ignore_resources', null, '')))) return;
6 | if (in_array($modx->resource->get('template'), explode(',', $modx->getOption('frontendmanager_ignore_templates', null, '')))) return;
7 | }
8 | switch ($modx->event->name) {
9 | case 'OnWebPagePrerender':
10 | if (!$modx->resource->get('template')) break;
11 | $frontendManager = $modx->getService('frontendmanager','frontendManager', MODX_CORE_PATH . 'components/frontendmanager/model/frontendmanager/', array());
12 | if(!$frontendManager) return;
13 | $contentTypes = explode(',', $modx->getOption('frontendmanager_contenttypes'));
14 | if (in_array($modx->resource->content_type, $contentTypes)) {
15 | $modx->resource->_output .= $frontendManager->initialize($modx->context->key);
16 | }
17 | break;
18 | case 'OnBeforeManagerPageInit':
19 | if ($_GET['frame']) {
20 | $modx->regClientCSS(MODX_ASSETS_URL.'components/frontendmanager/css/mgr/'.$modx->getOption('frontendmanager_manager_css', NULL, 'manager.css'));
21 | $modx->regClientStartupScript(MODX_ASSETS_URL.'components/frontendmanager/js/mgr/'.$modx->getOption('frontendmanager_manager_js', NULL, 'manager.js'));
22 | }
23 | break;
24 | default:
25 | break;
26 | }
27 | return;
28 |
--------------------------------------------------------------------------------
/core/components/frontendmanager/index.class.php:
--------------------------------------------------------------------------------
1 | modx->getOption('frontendmanager_core_path', null, $this->modx->getOption('core_path') . 'components/frontendmanager/');
16 | require_once $corePath . 'model/frontendmanager/frontendmanager.class.php';
17 |
18 | $this->frontendManager = new frontendManager($this->modx);
19 | //$this->addCss($this->frontendManager->config['cssUrl'] . 'mgr/main.css');
20 | $this->addJavascript($this->frontendManager->config['jsUrl'] . 'mgr/frontendmanager.js');
21 | $this->addHtml('
22 |
26 | ');
27 |
28 | parent::initialize();
29 | }
30 |
31 |
32 | /**
33 | * @return array
34 | */
35 | public function getLanguageTopics() {
36 | return array('frontendmanager:default');
37 | }
38 |
39 |
40 | /**
41 | * @return bool
42 | */
43 | public function checkPermissions() {
44 | return true;
45 | }
46 | }
47 |
48 |
49 | /**
50 | * Class IndexManagerController
51 | */
52 | class IndexManagerController extends frontendManagerMainController {
53 |
54 | /**
55 | * @return string
56 | */
57 | public static function getDefaultController() {
58 | return 'home';
59 | }
60 | }
--------------------------------------------------------------------------------
/core/components/frontendmanager/elements/chunks/chunk.frontendmanager.tpl:
--------------------------------------------------------------------------------
1 |
3 |
';
14 | foreach ($options['attributes']['chunks'] as $k => $v) {
15 | $chunks .= '
16 |
';
23 | }
24 | break;
25 |
26 | case xPDOTransport::ACTION_UNINSTALL:
27 | break;
28 | }
29 |
30 | $output = '';
31 | /*
32 | if (!$exists) {
33 | switch ($modx->getOption('manager_language')) {
34 | case 'ru':
35 | $output = 'Этот компонент требует pdoTools для быстрой работы сниппетов.
Он будет автоматически скачан и установлен.';
36 | break;
37 | default:
38 | $output = 'This component requires pdoTools for fast work of snippets.
It will be automaticly downloaded and installed?';
39 | }
40 | }
41 | */
42 |
43 | if ($chunks) {
44 | /*
45 | if (!$exists) {
46 | $output .= '
';
47 | }
48 | */
49 |
50 | switch ($modx->getOption('manager_language')) {
51 | case 'ru':
52 | $output .= 'Выберите чанки, которые нужно перезаписать:
53 |
54 | отметить все |
55 | cнять отметки
56 |
57 | ';
58 | break;
59 | default:
60 | $output .= 'Select chunks, which need to overwrite:
61 |
62 | select all |
63 | deselect all
64 |
65 | ';
66 | }
67 |
68 | $output .= $chunks;
69 | }
70 |
71 | return $output;
--------------------------------------------------------------------------------
/assets/components/frontendmanager/js/web/frontend.js:
--------------------------------------------------------------------------------
1 | const frontendManager = {
2 | config: {
3 | panel: '.fm-panel',
4 | modal: {
5 | id: 'fm-modal',
6 | cookieKey: 'fm-hide',
7 | className: {
8 | general: 'fm-modal',
9 | iframeWrapper: 'fm-iframe-wrapper',
10 | closeButton: 'fm-btn-close',
11 | modeButton: 'fm-mode',
12 | },
13 | },
14 | },
15 | initialize() {
16 | const { cookieKey, className } = this.config.modal;
17 | if (typeof frontendManagerConfig === 'undefined') return;
18 |
19 | this.panel = document.querySelector(this.config.panel);
20 |
21 | document.body.classList.add('fm', `fm-pos-${frontendManagerConfig.position}`);
22 | this.getCookie(cookieKey) && document.body.classList.add(cookieKey);
23 |
24 | this.panel.querySelectorAll(':scope a[data-action="iframe"]')
25 | .forEach((i) => i.addEventListener('click', (e) => {
26 | e.preventDefault();
27 | this.open(i.getAttribute('href'));
28 | }));
29 |
30 | document.querySelectorAll(`.${className.modeButton}`)
31 | .forEach((i) => i.addEventListener('click', (e) => {
32 | e.preventDefault();
33 | document.cookie = `${cookieKey}=${document.body.classList.contains(cookieKey) ? '' : '1'}`;
34 | document.body.classList.toggle(cookieKey);
35 | }));
36 |
37 | this.createModal();
38 | this.panel.classList.add('fm-panel--show');
39 | },
40 | createModal() {
41 | const { className, id: modalId } = this.config.modal;
42 |
43 | this.modal = document.createElement('div');
44 | this.modal.id = modalId;
45 | this.modal.classList.add(className.general);
46 |
47 | this.closeButton = document.createElement('button');
48 | this.closeButton.classList.add(className.closeButton);
49 |
50 | this.iframe = document.createElement('iframe');
51 | this.iframeWrapper = document.createElement('div');
52 | this.iframeWrapper.classList.add(className.iframeWrapper);
53 | this.iframeWrapper.append(this.iframe);
54 | this.iframeWrapper.dataset.textLoad = frontendManagerConfig.modal.textModalLoad;
55 |
56 | this.modal.append(this.closeButton, this.iframeWrapper);
57 |
58 | document.addEventListener('click', ({ target }) => {
59 | if (target !== this.modal && target !== this.closeButton) {
60 | return;
61 | }
62 |
63 | this.close();
64 | });
65 | },
66 | open(url) {
67 | const scrollPadding = window.innerWidth - document.documentElement.clientWidth;
68 |
69 | this.iframe.src = url + '&frame=1';
70 | document.body.style.overflow = 'hidden';
71 | document.body.append(this.modal);
72 |
73 | if(scrollPadding) {
74 | document.body.style.paddingRight = `${scrollPadding}px`;
75 | }
76 | },
77 | close() {
78 | document.body.removeChild(this.modal);
79 | document.body.style.overflow = '';
80 | document.body.style.paddingRight = '';
81 | this.iframe.src = '';
82 | },
83 | getCookie(name) {
84 | const result = document.cookie.match(`(^|[^;]+)\s*${name}\s*=\s*([^;]+)`);
85 | return result ? decodeURIComponent(result.pop()) : undefined;
86 | }
87 | };
88 |
89 | frontendManager.initialize();
90 |
--------------------------------------------------------------------------------
/core/components/frontendmanager/model/frontendmanager/frontendmanager.class.php:
--------------------------------------------------------------------------------
1 | modx =& $modx;
12 |
13 | $corePath = $this->modx->getOption('frontendmanager_core_path', $config, $this->modx->getOption('core_path') . 'components/frontendmanager/');
14 | $assetsUrl = $this->modx->getOption('frontendmanager_assets_url', $config, $this->modx->getOption('assets_url') . 'components/frontendmanager/');
15 | $connectorUrl = $assetsUrl . 'connector.php';
16 |
17 | $this->config = array_merge(array(
18 | 'assetsUrl' => $assetsUrl,
19 | 'cssUrl' => $assetsUrl . 'css/',
20 | 'jsUrl' => $assetsUrl . 'js/',
21 | 'connectorUrl' => $connectorUrl,
22 | 'position' => $this->modx->getOption('frontendmanager_frontend_position', null, 'top'),
23 | 'corePath' => $corePath,
24 | 'modelPath' => $corePath . 'model/',
25 | 'chunksPath' => $corePath . 'elements/chunks/',
26 | 'templatesPath' => $corePath . 'elements/templates/',
27 | 'chunkSuffix' => '.chunk.tpl',
28 | 'snippetsPath' => $corePath . 'elements/snippets/',
29 | 'processorsPath' => $corePath . 'processors/'
30 | ), $config);
31 |
32 | $this->modx->addPackage('frontendmanager', $this->config['modelPath']);
33 | $this->modx->lexicon->load('frontendmanager:default');
34 |
35 | $this->pdoTools = $this->modx->getService('pdoFetch');
36 | $this->pdoTools->setConfig($this->config);
37 | }
38 |
39 |
40 | public function initialize($ctx = 'web', $scriptProperties = array()){
41 |
42 | $this->config = array_merge($this->config, $scriptProperties);
43 | if (!empty($this->initialized[$ctx])) {
44 | return true;
45 | }
46 | $this->initialized[$ctx] = true;
47 |
48 | $config_js = array(
49 | 'ctx' => $ctx,
50 | 'jsUrl' => $this->config['jsUrl'],
51 | 'cssUrl' => $this->config['cssUrl'],
52 | 'position' => $this->config['position'],
53 | 'auth' => $this->modx->user->getUserToken('mgr'),
54 | 'modal' => [
55 | 'textModalLoad' => $this->modx->lexicon('frontendmanager_text_modal_load')
56 | ],
57 | );
58 |
59 | $output = &$this->modx->resource->_output;
60 | $assets = [];
61 |
62 | if (strpos($output, '') === false || strpos($output, '
Instructions
363 | 364 |
371 | <head>
372 |
...
373 |
<link rel="stylesheet" type="text/css" href="your_website_domain/css_root/flaticon.css">
374 |
...
375 |
</head>
376 |
377 |
381 | 3Use the icon class on "display: inline" elements:
382 |
383 | Use example: <i class="flaticon-airplane49"></i> or <span class="flaticon-airplane49"></span>
384 |
Under CC: Gregor Cresnar, Freepik, Yannick
457 | 458 | <i class="flaticon-cache"></i> 459 |
460 |464 | 465 | <i class="flaticon-context"></i> 466 |
467 |471 | 472 | <i class="flaticon-edit"></i> 473 |
474 |478 | 479 | <i class="flaticon-hide"></i> 480 |
481 |') === false) { 63 | return; 64 | } 65 | 66 | $assets[] = ''; 67 | $assets[] = ''; 68 | $assets[] = ''; 69 | 70 | $chunk_fm = $this->pdoTools->getChunk($this->modx->getOption('frontendmanager_frontend_tpl', NULL, 'tpl.frontendmanager.panel')); 71 | 72 | $assets = join(PHP_EOL, $assets); 73 | 74 | $output = preg_replace("/(<\/head>)/i", $assets . "\n\\1", $output, 1); 75 | $output = preg_replace("/(<\/body>)/i", $chunk_fm . "\n\\1", $output, 1); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/web/frontend.css: -------------------------------------------------------------------------------- 1 | @import "../fonts/flaticon.css"; 2 | 3 | :root { 4 | --fm-color-primary: #2F4150; 5 | --fm-color-secondary: #3B5C69; 6 | --fm-index: 1040; 7 | } 8 | 9 | .fm-panel, 10 | .fm-panel *, 11 | .fm-panel *::before, 12 | .fm-panel *::after { 13 | box-sizing: border-box; 14 | } 15 | 16 | .fm-modal, 17 | .fm-modal *, 18 | .fm-modal *::before, 19 | .fm-modal *::after { 20 | box-sizing: border-box; 21 | } 22 | 23 | .fm-panel { 24 | display: none; 25 | flex-direction: row; 26 | flex-wrap: wrap; 27 | align-items: center; 28 | gap: 1em .5em; 29 | background-color: var(--fm-color-primary); 30 | font: normal 13px "Helvetica Neue", Helvetica, Arial, Tahoma, sans-serif; 31 | -webkit-font-smoothing: antialiased; 32 | position: fixed; 33 | z-index: var(--fm-index); 34 | top: 0; 35 | left: 0; 36 | right: 0; 37 | padding: .5em; 38 | } 39 | 40 | .fm-panel--show { 41 | display: flex; 42 | } 43 | 44 | .fm-row { 45 | display: flex; 46 | flex-direction: row; 47 | overflow-x: auto; 48 | flex: 1; 49 | gap: .5em; 50 | } 51 | 52 | .fm-panel a { 53 | display: inline-flex; 54 | gap: .5em; 55 | align-items: center; 56 | color: #fff !important; 57 | padding: 0 1em; 58 | outline: 0 !important; 59 | text-decoration: none !important; 60 | transition: background-color .3s; 61 | border-radius: 1.6em; 62 | height: 2.5em; 63 | line-height: 1; 64 | } 65 | 66 | .fm-panel a>img { 67 | height: 1.5em; 68 | width: 1.5em; 69 | } 70 | 71 | .fm-panel a.fm-mode { 72 | display: flex; 73 | justify-content: center; 74 | align-items: center; 75 | width: 2.5em; 76 | background-color: var(--fm-color-primary); 77 | padding: 0; 78 | border-radius: 100%; 79 | margin-right: 1em; 80 | } 81 | 82 | .fm-panel a:hover { 83 | background-color: var(--fm-color-secondary); 84 | opacity: 1; 85 | } 86 | 87 | .fm-panel a span[class^="fm-icon-"]>img { 88 | display: none; 89 | } 90 | 91 | .fm-panel a span[class^="fm-icon-"]:before { 92 | font-size: 1em; 93 | margin: 0 94 | } 95 | 96 | .fm-link-text { 97 | margin-top: 2px; 98 | white-space: nowrap; 99 | } 100 | 101 | .fm-panel.button { 102 | display: inline-block; 103 | position: static; 104 | padding: 0 1em; 105 | color: #fff 106 | } 107 | 108 | .fm-panel.button:hover { 109 | background: var(--fm-color-secondary); 110 | text-decoration: none 111 | } 112 | 113 | body.fm-pos-bottom .fm-panel { 114 | bottom: 0; 115 | top: auto; 116 | } 117 | 118 | body.fm-hide .fm-panel, 119 | body.fm-hide .fm-row { 120 | background-color: transparent; 121 | pointer-events: none; 122 | overflow-x: hidden; 123 | } 124 | 125 | body.fm-hide .fm-panel a { 126 | opacity: 0; 127 | pointer-events: none; 128 | } 129 | 130 | body.fm-hide .fm-panel a.fm-mode { 131 | opacity: 1; 132 | pointer-events: all; 133 | z-index: var(--fm-index); 134 | } 135 | 136 | /* Modal */ 137 | .fm-modal { 138 | position: fixed; 139 | z-index: calc(var(--fm-index) + 1); 140 | left: 0; 141 | top: 0; 142 | width: 100%; 143 | height: 100%; 144 | overflow: auto; 145 | background-color: rgba(0, 0, 0, 0.5); 146 | display: flex; 147 | justify-content: center; 148 | align-items: center; 149 | padding: 3.5rem; 150 | } 151 | 152 | .fm-modal iframe { 153 | position: relative; 154 | width: 100%; 155 | height: 100%; 156 | border-radius: .4em; 157 | border: 0; 158 | padding: .5rem; 159 | background: #f2f2f2; 160 | } 161 | 162 | .fm-modal .fm-iframe-wrapper { 163 | position: relative; 164 | width: 100%; 165 | height: 100%; 166 | max-width: 1600px; 167 | border: 0; 168 | background-color: var(--fm-color-primary); 169 | border-radius: .4em; 170 | } 171 | 172 | .fm-modal .fm-iframe-wrapper::before { 173 | content: attr(data-text-load); 174 | position: absolute; 175 | top: 0; 176 | left: 0; 177 | width: 100%; 178 | height: 100%; 179 | color: white; 180 | display: flex; 181 | justify-content: center; 182 | align-items: center; 183 | font-size: 2em; 184 | } 185 | 186 | .fm-modal .fm-btn-close { 187 | position: absolute; 188 | right: 1.25em; 189 | top: 1.25em; 190 | background-color: var(--fm-color-primary); 191 | color: white; 192 | border: none; 193 | border-radius: 50%; 194 | width: 2.3em; 195 | height: 2.3em; 196 | padding: .125em; 197 | z-index: calc(var(--fm-index) + 2); 198 | transition: background-color .3s; 199 | cursor: pointer; 200 | } 201 | 202 | .fm-modal .fm-btn-close::before { 203 | content: ''; 204 | display: block; 205 | width: 100%; 206 | height: 100%; 207 | background-image: url('data:image/svg+xml,%3Csvg%20xmlns="http://www.w3.org/2000/svg"%20fill="none"%20viewBox="0%200%2024%2024"%20stroke-width="1.5"%20stroke="white"%3E%3Cpath%20stroke-linecap="round"%20stroke-linejoin="round"%20d="M9.75%209.75l4.5%204.5m0-4.5l-4.5%204.5M21%2012a9%209%200%2011-18%200%209%209%200%200118%200z"%20/%3E%3C/svg%3E'); 208 | } 209 | 210 | .fm-modal .fm-btn-close:hover { 211 | background-color: var(--fm-color-secondary); 212 | } 213 | 214 | /* Modal END */ 215 | 216 | @media only screen and (max-width: 1280px) { 217 | .fm-panel a span[class^="fm-icon-"] { 218 | margin: 0; 219 | } 220 | 221 | .fm-panel a span.fm-link-text { 222 | display: none; 223 | } 224 | 225 | .fm-modal { 226 | padding: 4rem .3rem .3rem .3rem; 227 | } 228 | } 229 | -------------------------------------------------------------------------------- /_build/resolvers/resolve.setup.php: -------------------------------------------------------------------------------- 1 | getObject('transport.modTransportProvider', array('service_url:LIKE' => '%simpledream.ru%', 'OR:service_url:LIKE' => '%modstore.pro%'))) { 10 | $provider = $modx->getObject('transport.modTransportProvider', 1); 11 | } 12 | 13 | $modx->getVersionData(); 14 | $productVersion = $modx->version['code_name'] . '-' . $modx->version['full_version']; 15 | 16 | $response = $provider->request('package', 'GET', array( 17 | 'supports' => $productVersion, 18 | 'query' => $packageName 19 | )); 20 | 21 | if (!empty($response)) { 22 | $foundPackages = simplexml_load_string($response->response); 23 | foreach ($foundPackages as $foundPackage) { 24 | /* @var modTransportPackage $foundPackage */ 25 | if ($foundPackage->name == $packageName) { 26 | $sig = explode('-', $foundPackage->signature); 27 | $versionSignature = explode('.', $sig[1]); 28 | $url = $foundPackage->location; 29 | 30 | if (!downloadPackage($url, $modx->getOption('core_path') . 'packages/' . $foundPackage->signature . '.transport.zip')) { 31 | return array( 32 | 'success' => 0, 33 | 'message' => "Could not download package {$packageName}.", 34 | ); 35 | } 36 | 37 | /* add in the package as an object so it can be upgraded */ 38 | /** @var modTransportPackage $package */ 39 | $package = $modx->newObject('transport.modTransportPackage'); 40 | $package->set('signature', $foundPackage->signature); 41 | $package->fromArray(array( 42 | 'created' => date('Y-m-d h:i:s'), 43 | 'updated' => null, 44 | 'state' => 1, 45 | 'workspace' => 1, 46 | 'provider' => $provider->id, 47 | 'source' => $foundPackage->signature . '.transport.zip', 48 | 'package_name' => $packageName, 49 | 'version_major' => $versionSignature[0], 50 | 'version_minor' => !empty($versionSignature[1]) ? $versionSignature[1] : 0, 51 | 'version_patch' => !empty($versionSignature[2]) ? $versionSignature[2] : 0, 52 | )); 53 | 54 | if (!empty($sig[2])) { 55 | $r = preg_split('/([0-9]+)/', $sig[2], -1, PREG_SPLIT_DELIM_CAPTURE); 56 | if (is_array($r) && !empty($r)) { 57 | $package->set('release', $r[0]); 58 | $package->set('release_index', (isset($r[1]) ? $r[1] : '0')); 59 | } 60 | else { 61 | $package->set('release', $sig[2]); 62 | } 63 | } 64 | 65 | if ($package->save() && $package->install()) { 66 | return array( 67 | 'success' => 1, 68 | 'message' => "{$packageName} was successfully installed", 69 | ); 70 | } 71 | else { 72 | return array( 73 | 'success' => 0, 74 | 'message' => "Could not save package {$packageName}", 75 | ); 76 | } 77 | break; 78 | } 79 | } 80 | } 81 | else { 82 | return array( 83 | 'success' => 0, 84 | 'message' => "Could not find {$packageName} in MODX repository", 85 | ); 86 | } 87 | return true; 88 | } 89 | } 90 | 91 | if (!function_exists('downloadPackage')) { 92 | function downloadPackage($src, $dst) { 93 | if (ini_get('allow_url_fopen')) { 94 | $file = @file_get_contents($src); 95 | } 96 | else { 97 | if (function_exists('curl_init')) { 98 | $ch = curl_init(); 99 | curl_setopt($ch, CURLOPT_URL, $src); 100 | curl_setopt($ch, CURLOPT_HEADER, 0); 101 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 102 | curl_setopt($ch, CURLOPT_TIMEOUT, 180); 103 | $safeMode = @ini_get('safe_mode'); 104 | $openBasedir = @ini_get('open_basedir'); 105 | if (empty($safeMode) && empty($openBasedir)) { 106 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 107 | } 108 | 109 | $file = curl_exec($ch); 110 | curl_close($ch); 111 | } 112 | else { 113 | return false; 114 | } 115 | } 116 | file_put_contents($dst, $file); 117 | 118 | return file_exists($dst); 119 | } 120 | } 121 | 122 | 123 | $success = false; 124 | switch (@$options[xPDOTransport::PACKAGE_ACTION]) { 125 | case xPDOTransport::ACTION_INSTALL: 126 | case xPDOTransport::ACTION_UPGRADE: 127 | /* @var modX $modx */ 128 | $modx = &$object->xpdo; 129 | /* Checking and installing required packages */ 130 | $packages = array( 131 | 'pdoTools' => '2.1.0-pl', 132 | ); 133 | 134 | foreach ($packages as $package_name => $version) { 135 | $installed = $modx->getIterator('transport.modTransportPackage', array('package_name' => $package_name)); 136 | /** @var modTransportPackage $package */ 137 | foreach ($installed as $package) { 138 | if ($package->compareVersion($version, '<=')) { 139 | continue(2); 140 | } 141 | } 142 | $modx->log(modX::LOG_LEVEL_INFO, "Trying to install {$package_name}. Please wait..."); 143 | $response = installPackage($package_name); 144 | $level = $response['success'] 145 | ? modX::LOG_LEVEL_INFO 146 | : modX::LOG_LEVEL_ERROR; 147 | $modx->log($level, $response['message']); 148 | } 149 | 150 | $success = true; 151 | break; 152 | 153 | case xPDOTransport::ACTION_UNINSTALL: 154 | $success = true; 155 | break; 156 | } 157 | 158 | return $success; -------------------------------------------------------------------------------- /_build/build.transport.php: -------------------------------------------------------------------------------- 1 | $root, 21 | 'build' => $root . '_build/', 22 | 'data' => $root . '_build/data/', 23 | 'resolvers' => $root . '_build/resolvers/', 24 | 'chunks' => $root . 'core/components/' . PKG_NAME_LOWER . '/elements/chunks/', 25 | 'snippets' => $root . 'core/components/' . PKG_NAME_LOWER . '/elements/snippets/', 26 | 'plugins' => $root . 'core/components/' . PKG_NAME_LOWER . '/elements/plugins/', 27 | 'lexicon' => $root . 'core/components/' . PKG_NAME_LOWER . '/lexicon/', 28 | 'docs' => $root . 'core/components/' . PKG_NAME_LOWER . '/docs/', 29 | 'pages' => $root . 'core/components/' . PKG_NAME_LOWER . '/elements/pages/', 30 | 'source_assets' => $root . 'assets/components/' . PKG_NAME_LOWER, 31 | 'source_core' => $root . 'core/components/' . PKG_NAME_LOWER, 32 | ); 33 | unset($root); 34 | 35 | require_once MODX_CORE_PATH . 'model/modx/modx.class.php'; 36 | require_once $sources['build'] . '/includes/functions.php'; 37 | 38 | $modx = new modX(); 39 | $modx->initialize('mgr'); 40 | $modx->setLogLevel(modX::LOG_LEVEL_INFO); 41 | $modx->setLogTarget('ECHO'); 42 | $modx->getService('error', 'error.modError'); 43 | $modx->loadClass('transport.modPackageBuilder', '', false, true); 44 | if (!XPDO_CLI_MODE) { 45 | echo '
';
46 | }
47 |
48 | $builder = new modPackageBuilder($modx);
49 | $builder->createPackage(PKG_NAME_LOWER, PKG_VERSION, PKG_RELEASE);
50 | $builder->registerNamespace(PKG_NAME_LOWER, false, true, PKG_NAMESPACE_PATH);
51 |
52 | $modx->log(modX::LOG_LEVEL_INFO, 'Created Transport Package and Namespace.');
53 |
54 | /* load system settings */
55 | if (defined('BUILD_SETTING_UPDATE')) {
56 | $settings = include $sources['data'] . 'transport.settings.php';
57 | if (!is_array($settings)) {
58 | $modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in settings.');
59 | }
60 | else {
61 | $attributes = array(
62 | xPDOTransport::UNIQUE_KEY => 'key',
63 | xPDOTransport::PRESERVE_KEYS => true,
64 | xPDOTransport::UPDATE_OBJECT => BUILD_SETTING_UPDATE,
65 | );
66 | foreach ($settings as $setting) {
67 | $vehicle = $builder->createVehicle($setting, $attributes);
68 | $builder->putVehicle($vehicle);
69 | }
70 | $modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($settings) . ' System Settings.');
71 | }
72 | unset($settings, $setting, $attributes);
73 | }
74 |
75 | /* load plugins events */
76 | if (defined('BUILD_EVENT_UPDATE')) {
77 | $events = include $sources['data'] . 'transport.events.php';
78 | if (!is_array($events)) {
79 | $modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in events.');
80 | }
81 | else {
82 | $attributes = array(
83 | xPDOTransport::PRESERVE_KEYS => true,
84 | xPDOTransport::UPDATE_OBJECT => BUILD_EVENT_UPDATE,
85 | );
86 | foreach ($events as $event) {
87 | $vehicle = $builder->createVehicle($event, $attributes);
88 | $builder->putVehicle($vehicle);
89 | }
90 | $modx->log(xPDO::LOG_LEVEL_INFO, 'Packaged in ' . count($events) . ' Plugins events.');
91 | }
92 | unset ($events, $event, $attributes);
93 | }
94 |
95 | /* package in default access policy */
96 | if (defined('BUILD_POLICY_UPDATE')) {
97 | $attributes = array(
98 | xPDOTransport::PRESERVE_KEYS => false,
99 | xPDOTransport::UNIQUE_KEY => array('name'),
100 | xPDOTransport::UPDATE_OBJECT => BUILD_POLICY_UPDATE,
101 | );
102 | $policies = include $sources['data'] . 'transport.policies.php';
103 | if (!is_array($policies)) {
104 | $modx->log(modX::LOG_LEVEL_FATAL, 'Adding policies failed.');
105 | }
106 | foreach ($policies as $policy) {
107 | $vehicle = $builder->createVehicle($policy, $attributes);
108 | $builder->putVehicle($vehicle);
109 | }
110 | $modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($policies) . ' Access Policies.');
111 | flush();
112 | unset($policies, $policy, $attributes);
113 | }
114 |
115 | /* package in default access policy templates */
116 | if (defined('BUILD_POLICY_TEMPLATE_UPDATE')) {
117 | $templates = include dirname(__FILE__) . '/data/transport.policytemplates.php';
118 | $attributes = array(
119 | xPDOTransport::PRESERVE_KEYS => false,
120 | xPDOTransport::UNIQUE_KEY => array('name'),
121 | xPDOTransport::UPDATE_OBJECT => BUILD_POLICY_TEMPLATE_UPDATE,
122 | xPDOTransport::RELATED_OBJECTS => true,
123 | xPDOTransport::RELATED_OBJECT_ATTRIBUTES => array(
124 | 'Permissions' => array(
125 | xPDOTransport::PRESERVE_KEYS => false,
126 | xPDOTransport::UPDATE_OBJECT => BUILD_PERMISSION_UPDATE,
127 | xPDOTransport::UNIQUE_KEY => array('template', 'name'),
128 | ),
129 | )
130 | );
131 | if (is_array($templates)) {
132 | foreach ($templates as $template) {
133 | $vehicle = $builder->createVehicle($template, $attributes);
134 | $builder->putVehicle($vehicle);
135 | }
136 | $modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($templates) . ' Access Policy Templates.');
137 | flush();
138 | }
139 | else {
140 | $modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in Access Policy Templates.');
141 | }
142 | unset ($templates, $template, $attributes);
143 | }
144 |
145 | /* load menus */
146 | if (defined('BUILD_MENU_UPDATE')) {
147 | $menus = include $sources['data'] . 'transport.menu.php';
148 | $attributes = array(
149 | xPDOTransport::PRESERVE_KEYS => true,
150 | xPDOTransport::UPDATE_OBJECT => BUILD_MENU_UPDATE,
151 | xPDOTransport::UNIQUE_KEY => 'text',
152 | xPDOTransport::RELATED_OBJECTS => true,
153 | xPDOTransport::RELATED_OBJECT_ATTRIBUTES => array(
154 | 'Action' => array(
155 | xPDOTransport::PRESERVE_KEYS => false,
156 | xPDOTransport::UPDATE_OBJECT => BUILD_ACTION_UPDATE,
157 | xPDOTransport::UNIQUE_KEY => array('namespace', 'controller'),
158 | ),
159 | ),
160 | );
161 | if (is_array($menus)) {
162 | foreach ($menus as $menu) {
163 | $vehicle = $builder->createVehicle($menu, $attributes);
164 | $builder->putVehicle($vehicle);
165 | /* @var modMenu $menu */
166 | $modx->log(modX::LOG_LEVEL_INFO, 'Packaged in menu "' . $menu->get('text') . '".');
167 | }
168 | }
169 | else {
170 | $modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in menu.');
171 | }
172 | unset($vehicle, $menus, $menu, $attributes);
173 | }
174 |
175 |
176 | /* create category */
177 | $modx->log(xPDO::LOG_LEVEL_INFO, 'Created category.');
178 | /* @var modCategory $category */
179 | $category = $modx->newObject('modCategory');
180 | $category->set('category', PKG_NAME);
181 | /* create category vehicle */
182 | $attr = array(
183 | xPDOTransport::UNIQUE_KEY => 'category',
184 | xPDOTransport::PRESERVE_KEYS => false,
185 | xPDOTransport::UPDATE_OBJECT => true,
186 | xPDOTransport::RELATED_OBJECTS => true,
187 | );
188 |
189 | /* add snippets */
190 | if (defined('BUILD_SNIPPET_UPDATE')) {
191 | $attr[xPDOTransport::RELATED_OBJECT_ATTRIBUTES]['Snippets'] = array(
192 | xPDOTransport::PRESERVE_KEYS => false,
193 | xPDOTransport::UPDATE_OBJECT => BUILD_SNIPPET_UPDATE,
194 | xPDOTransport::UNIQUE_KEY => 'name',
195 | );
196 | $snippets = include $sources['data'] . 'transport.snippets.php';
197 | if (!is_array($snippets)) {
198 | $modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in snippets.');
199 | }
200 | else {
201 | $category->addMany($snippets);
202 | $modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($snippets) . ' snippets.');
203 | }
204 | }
205 |
206 | /* add chunks */
207 | if (defined('BUILD_CHUNK_UPDATE')) {
208 | $attr[xPDOTransport::RELATED_OBJECT_ATTRIBUTES]['Chunks'] = array(
209 | xPDOTransport::PRESERVE_KEYS => false,
210 | xPDOTransport::UPDATE_OBJECT => BUILD_CHUNK_UPDATE,
211 | xPDOTransport::UNIQUE_KEY => 'name',
212 | );
213 | $chunks = include $sources['data'] . 'transport.chunks.php';
214 | if (!is_array($chunks)) {
215 | $modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in chunks.');
216 | }
217 | else {
218 | $category->addMany($chunks);
219 | $modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($chunks) . ' chunks.');
220 | }
221 | }
222 |
223 | /* add plugins */
224 | if (defined('BUILD_PLUGIN_UPDATE')) {
225 | $attr[xPDOTransport::RELATED_OBJECT_ATTRIBUTES]['Plugins'] = array(
226 | xPDOTransport::PRESERVE_KEYS => false,
227 | xPDOTransport::UPDATE_OBJECT => BUILD_PLUGIN_UPDATE,
228 | xPDOTransport::UNIQUE_KEY => 'name',
229 | );
230 | $attr[xPDOTransport::RELATED_OBJECT_ATTRIBUTES]['PluginEvents'] = array(
231 | xPDOTransport::PRESERVE_KEYS => true,
232 | xPDOTransport::UPDATE_OBJECT => BUILD_PLUGIN_UPDATE,
233 | xPDOTransport::UNIQUE_KEY => array('pluginid', 'event'),
234 | );
235 | $plugins = include $sources['data'] . 'transport.plugins.php';
236 | if (!is_array($plugins)) {
237 | $modx->log(modX::LOG_LEVEL_ERROR, 'Could not package in plugins.');
238 | }
239 | else {
240 | $category->addMany($plugins);
241 | $modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($plugins) . ' plugins.');
242 | }
243 | }
244 |
245 | $vehicle = $builder->createVehicle($category, $attr);
246 |
247 | /* now pack in resolvers */
248 | $vehicle->resolve('file', array(
249 | 'source' => $sources['source_assets'],
250 | 'target' => "return MODX_ASSETS_PATH . 'components/';",
251 | ));
252 | $vehicle->resolve('file', array(
253 | 'source' => $sources['source_core'],
254 | 'target' => "return MODX_CORE_PATH . 'components/';",
255 | ));
256 |
257 | foreach ($BUILD_RESOLVERS as $resolver) {
258 | if ($vehicle->resolve('php', array('source' => $sources['resolvers'] . 'resolve.' . $resolver . '.php'))) {
259 | $modx->log(modX::LOG_LEVEL_INFO, 'Added resolver "' . $resolver . '" to category.');
260 | }
261 | else {
262 | $modx->log(modX::LOG_LEVEL_INFO, 'Could not add resolver "' . $resolver . '" to category.');
263 | }
264 | }
265 |
266 | flush();
267 | $builder->putVehicle($vehicle);
268 |
269 | /* now pack in the license file, readme and setup options */
270 | $builder->setPackageAttributes(array(
271 | 'changelog' => file_get_contents($sources['docs'] . 'changelog.txt'),
272 | 'license' => file_get_contents($sources['docs'] . 'license.txt'),
273 | 'readme' => file_get_contents($sources['docs'] . 'readme.txt'),
274 | 'chunks' => $BUILD_CHUNKS,
275 | 'setup-options' => array(
276 | 'source' => $sources['build'] . 'setup.options.php',
277 | ),
278 | ));
279 | $modx->log(modX::LOG_LEVEL_INFO, 'Added package attributes and setup options.');
280 |
281 | /* zip up package */
282 | $modx->log(modX::LOG_LEVEL_INFO, 'Packing up transport package zip...');
283 | $builder->pack();
284 |
285 | $mtime = microtime();
286 | $mtime = explode(" ", $mtime);
287 | $mtime = $mtime[1] + $mtime[0];
288 | $tend = $mtime;
289 | $totalTime = ($tend - $tstart);
290 | $totalTime = sprintf("%2.4f s", $totalTime);
291 |
292 | $signature = $builder->getSignature();
293 | if (defined('PKG_AUTO_INSTALL') && PKG_AUTO_INSTALL) {
294 | $sig = explode('-', $signature);
295 | $versionSignature = explode('.', $sig[1]);
296 |
297 | /* @var modTransportPackage $package */
298 | if (!$package = $modx->getObject('transport.modTransportPackage', array('signature' => $signature))) {
299 | $package = $modx->newObject('transport.modTransportPackage');
300 | $package->set('signature', $signature);
301 | $package->fromArray(array(
302 | 'created' => date('Y-m-d h:i:s'),
303 | 'updated' => null,
304 | 'state' => 1,
305 | 'workspace' => 1,
306 | 'provider' => 0,
307 | 'source' => $signature . '.transport.zip',
308 | 'package_name' => $sig[0],
309 | 'version_major' => $versionSignature[0],
310 | 'version_minor' => !empty($versionSignature[1]) ? $versionSignature[1] : 0,
311 | 'version_patch' => !empty($versionSignature[2]) ? $versionSignature[2] : 0,
312 | ));
313 | if (!empty($sig[2])) {
314 | $r = preg_split('/([0-9]+)/', $sig[2], -1, PREG_SPLIT_DELIM_CAPTURE);
315 | if (is_array($r) && !empty($r)) {
316 | $package->set('release', $r[0]);
317 | $package->set('release_index', (isset($r[1]) ? $r[1] : '0'));
318 | }
319 | else {
320 | $package->set('release', $sig[2]);
321 | }
322 | }
323 | $package->save();
324 | }
325 |
326 | if ($package->install()) {
327 | $modx->runProcessor('system/clearcache');
328 | }
329 | }
330 | if (!empty($_GET['download'])) {
331 | echo '';
332 | }
333 |
334 | $modx->log(modX::LOG_LEVEL_INFO, "\n
Execution time: {$totalTime}\n");
335 | if (!XPDO_CLI_MODE) {
336 | echo ''; 337 | } 338 | -------------------------------------------------------------------------------- /core/components/frontendmanager/docs/license.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | -------------------------- 4 | 5 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 6 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 7 | 8 | Everyone is permitted to copy and distribute verbatim copies 9 | of this license document, but changing it is not allowed. 10 | 11 | Preamble 12 | -------- 13 | 14 | The licenses for most software are designed to take away your 15 | freedom to share and change it. By contrast, the GNU General Public 16 | License is intended to guarantee your freedom to share and change free 17 | software--to make sure the software is free for all its users. This 18 | General Public License applies to most of the Free Software 19 | Foundation's software and to any other program whose authors commit to 20 | using it. (Some other Free Software Foundation software is covered by 21 | the GNU Library General Public License instead.) You can apply it to 22 | your programs, too. 23 | 24 | When we speak of free software, we are referring to freedom, not 25 | price. Our General Public Licenses are designed to make sure that you 26 | have the freedom to distribute copies of free software (and charge for 27 | this service if you wish), that you receive source code or can get it 28 | if you want it, that you can change the software or use pieces of it 29 | in new free programs; and that you know you can do these things. 30 | 31 | To protect your rights, we need to make restrictions that forbid 32 | anyone to deny you these rights or to ask you to surrender the rights. 33 | These restrictions translate to certain responsibilities for you if you 34 | distribute copies of the software, or if you modify it. 35 | 36 | For example, if you distribute copies of such a program, whether 37 | gratis or for a fee, you must give the recipients all the rights that 38 | you have. You must make sure that they, too, receive or can get the 39 | source code. And you must show them these terms so they know their 40 | rights. 41 | 42 | We protect your rights with two steps: (1) copyright the software, and 43 | (2) offer you this license which gives you legal permission to copy, 44 | distribute and/or modify the software. 45 | 46 | Also, for each author's protection and ours, we want to make certain 47 | that everyone understands that there is no warranty for this free 48 | software. If the software is modified by someone else and passed on, we 49 | want its recipients to know that what they have is not the original, so 50 | that any problems introduced by others will not reflect on the original 51 | authors' reputations. 52 | 53 | Finally, any free program is threatened constantly by software 54 | patents. We wish to avoid the danger that redistributors of a free 55 | program will individually obtain patent licenses, in effect making the 56 | program proprietary. To prevent this, we have made it clear that any 57 | patent must be licensed for everyone's free use or not licensed at all. 58 | 59 | The precise terms and conditions for copying, distribution and 60 | modification follow. 61 | 62 | 63 | GNU GENERAL PUBLIC LICENSE 64 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 65 | --------------------------------------------------------------- 66 | 67 | 0. This License applies to any program or other work which contains 68 | a notice placed by the copyright holder saying it may be distributed 69 | under the terms of this General Public License. The "Program", below, 70 | refers to any such program or work, and a "work based on the Program" 71 | means either the Program or any derivative work under copyright law: 72 | that is to say, a work containing the Program or a portion of it, 73 | either verbatim or with modifications and/or translated into another 74 | language. (Hereinafter, translation is included without limitation in 75 | the term "modification".) Each licensee is addressed as "you". 76 | 77 | Activities other than copying, distribution and modification are not 78 | covered by this License; they are outside its scope. The act of 79 | running the Program is not restricted, and the output from the Program 80 | is covered only if its contents constitute a work based on the 81 | Program (independent of having been made by running the Program). 82 | Whether that is true depends on what the Program does. 83 | 84 | 1. You may copy and distribute verbatim copies of the Program's 85 | source code as you receive it, in any medium, provided that you 86 | conspicuously and appropriately publish on each copy an appropriate 87 | copyright notice and disclaimer of warranty; keep intact all the 88 | notices that refer to this License and to the absence of any warranty; 89 | and give any other recipients of the Program a copy of this License 90 | along with the Program. 91 | 92 | You may charge a fee for the physical act of transferring a copy, and 93 | you may at your option offer warranty protection in exchange for a fee. 94 | 95 | 2. You may modify your copy or copies of the Program or any portion 96 | of it, thus forming a work based on the Program, and copy and 97 | distribute such modifications or work under the terms of Section 1 98 | above, provided that you also meet all of these conditions: 99 | 100 | a) You must cause the modified files to carry prominent notices 101 | stating that you changed the files and the date of any change. 102 | 103 | b) You must cause any work that you distribute or publish, that in 104 | whole or in part contains or is derived from the Program or any 105 | part thereof, to be licensed as a whole at no charge to all third 106 | parties under the terms of this License. 107 | 108 | c) If the modified program normally reads commands interactively 109 | when run, you must cause it, when started running for such 110 | interactive use in the most ordinary way, to print or display an 111 | announcement including an appropriate copyright notice and a 112 | notice that there is no warranty (or else, saying that you provide 113 | a warranty) and that users may redistribute the program under 114 | these conditions, and telling the user how to view a copy of this 115 | License. (Exception: if the Program itself is interactive but 116 | does not normally print such an announcement, your work based on 117 | the Program is not required to print an announcement.) 118 | 119 | These requirements apply to the modified work as a whole. If 120 | identifiable sections of that work are not derived from the Program, 121 | and can be reasonably considered independent and separate works in 122 | themselves, then this License, and its terms, do not apply to those 123 | sections when you distribute them as separate works. But when you 124 | distribute the same sections as part of a whole which is a work based 125 | on the Program, the distribution of the whole must be on the terms of 126 | this License, whose permissions for other licensees extend to the 127 | entire whole, and thus to each and every part regardless of who wrote it. 128 | 129 | Thus, it is not the intent of this section to claim rights or contest 130 | your rights to work written entirely by you; rather, the intent is to 131 | exercise the right to control the distribution of derivative or 132 | collective works based on the Program. 133 | 134 | In addition, mere aggregation of another work not based on the Program 135 | with the Program (or with a work based on the Program) on a volume of 136 | a storage or distribution medium does not bring the other work under 137 | the scope of this License. 138 | 139 | 3. You may copy and distribute the Program (or a work based on it, 140 | under Section 2) in object code or executable form under the terms of 141 | Sections 1 and 2 above provided that you also do one of the following: 142 | 143 | a) Accompany it with the complete corresponding machine-readable 144 | source code, which must be distributed under the terms of Sections 145 | 1 and 2 above on a medium customarily used for software interchange; or, 146 | 147 | b) Accompany it with a written offer, valid for at least three 148 | years, to give any third party, for a charge no more than your 149 | cost of physically performing source distribution, a complete 150 | machine-readable copy of the corresponding source code, to be 151 | distributed under the terms of Sections 1 and 2 above on a medium 152 | customarily used for software interchange; or, 153 | 154 | c) Accompany it with the information you received as to the offer 155 | to distribute corresponding source code. (This alternative is 156 | allowed only for noncommercial distribution and only if you 157 | received the program in object code or executable form with such 158 | an offer, in accord with Subsection b above.) 159 | 160 | The source code for a work means the preferred form of the work for 161 | making modifications to it. For an executable work, complete source 162 | code means all the source code for all modules it contains, plus any 163 | associated interface definition files, plus the scripts used to 164 | control compilation and installation of the executable. However, as a 165 | special exception, the source code distributed need not include 166 | anything that is normally distributed (in either source or binary 167 | form) with the major components (compiler, kernel, and so on) of the 168 | operating system on which the executable runs, unless that component 169 | itself accompanies the executable. 170 | 171 | If distribution of executable or object code is made by offering 172 | access to copy from a designated place, then offering equivalent 173 | access to copy the source code from the same place counts as 174 | distribution of the source code, even though third parties are not 175 | compelled to copy the source along with the object code. 176 | 177 | 4. You may not copy, modify, sublicense, or distribute the Program 178 | except as expressly provided under this License. Any attempt 179 | otherwise to copy, modify, sublicense or distribute the Program is 180 | void, and will automatically terminate your rights under this License. 181 | However, parties who have received copies, or rights, from you under 182 | this License will not have their licenses terminated so long as such 183 | parties remain in full compliance. 184 | 185 | 5. You are not required to accept this License, since you have not 186 | signed it. However, nothing else grants you permission to modify or 187 | distribute the Program or its derivative works. These actions are 188 | prohibited by law if you do not accept this License. Therefore, by 189 | modifying or distributing the Program (or any work based on the 190 | Program), you indicate your acceptance of this License to do so, and 191 | all its terms and conditions for copying, distributing or modifying 192 | the Program or works based on it. 193 | 194 | 6. Each time you redistribute the Program (or any work based on the 195 | Program), the recipient automatically receives a license from the 196 | original licensor to copy, distribute or modify the Program subject to 197 | these terms and conditions. You may not impose any further 198 | restrictions on the recipients' exercise of the rights granted herein. 199 | You are not responsible for enforcing compliance by third parties to 200 | this License. 201 | 202 | 7. If, as a consequence of a court judgment or allegation of patent 203 | infringement or for any other reason (not limited to patent issues), 204 | conditions are imposed on you (whether by court order, agreement or 205 | otherwise) that contradict the conditions of this License, they do not 206 | excuse you from the conditions of this License. If you cannot 207 | distribute so as to satisfy simultaneously your obligations under this 208 | License and any other pertinent obligations, then as a consequence you 209 | may not distribute the Program at all. For example, if a patent 210 | license would not permit royalty-free redistribution of the Program by 211 | all those who receive copies directly or indirectly through you, then 212 | the only way you could satisfy both it and this License would be to 213 | refrain entirely from distribution of the Program. 214 | 215 | If any portion of this section is held invalid or unenforceable under 216 | any particular circumstance, the balance of the section is intended to 217 | apply and the section as a whole is intended to apply in other 218 | circumstances. 219 | 220 | It is not the purpose of this section to induce you to infringe any 221 | patents or other property right claims or to contest validity of any 222 | such claims; this section has the sole purpose of protecting the 223 | integrity of the free software distribution system, which is 224 | implemented by public license practices. Many people have made 225 | generous contributions to the wide range of software distributed 226 | through that system in reliance on consistent application of that 227 | system; it is up to the author/donor to decide if he or she is willing 228 | to distribute software through any other system and a licensee cannot 229 | impose that choice. 230 | 231 | This section is intended to make thoroughly clear what is believed to 232 | be a consequence of the rest of this License. 233 | 234 | 8. If the distribution and/or use of the Program is restricted in 235 | certain countries either by patents or by copyrighted interfaces, the 236 | original copyright holder who places the Program under this License 237 | may add an explicit geographical distribution limitation excluding 238 | those countries, so that distribution is permitted only in or among 239 | countries not thus excluded. In such case, this License incorporates 240 | the limitation as if written in the body of this License. 241 | 242 | 9. The Free Software Foundation may publish revised and/or new versions 243 | of the General Public License from time to time. Such new versions will 244 | be similar in spirit to the present version, but may differ in detail to 245 | address new problems or concerns. 246 | 247 | Each version is given a distinguishing version number. If the Program 248 | specifies a version number of this License which applies to it and "any 249 | later version", you have the option of following the terms and conditions 250 | either of that version or of any later version published by the Free 251 | Software Foundation. If the Program does not specify a version number of 252 | this License, you may choose any version ever published by the Free Software 253 | Foundation. 254 | 255 | 10. If you wish to incorporate parts of the Program into other free 256 | programs whose distribution conditions are different, write to the author 257 | to ask for permission. For software which is copyrighted by the Free 258 | Software Foundation, write to the Free Software Foundation; we sometimes 259 | make exceptions for this. Our decision will be guided by the two goals 260 | of preserving the free status of all derivatives of our free software and 261 | of promoting the sharing and reuse of software generally. 262 | 263 | NO WARRANTY 264 | ----------- 265 | 266 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 267 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 268 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 269 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 270 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 271 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 272 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 273 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 274 | REPAIR OR CORRECTION. 275 | 276 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 277 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 278 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 279 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 280 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 281 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 282 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 283 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 284 | POSSIBILITY OF SUCH DAMAGES. 285 | 286 | --------------------------- 287 | END OF TERMS AND CONDITIONS -------------------------------------------------------------------------------- /assets/components/frontendmanager/css/fonts/flaticon.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 303 | 304 | 305 |