This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Object.prototype.toPH = function () { | |
| if (typeof this.ns === 'undefined') { | |
| return; | |
| } | |
| // обходим свойства | |
| for (let key in this.data) { | |
| let prop = this.data[key]; | |
| let _this = this; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class modWebFormsIndexProcessor extends modProcessor{ | |
| protected $config = array( | |
| 'uploadValidExts' => 'txt,jpg,png,doc,docx,xls,xlsx,pdf,rtf', | |
| 'uploadMaxSize' => 5242880, | |
| 'uploadFolder' => 'upload/', | |
| ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alertify.set('notifier','position', 'top-right'); | |
| let CONNECTOR_URL = '/assets/components/modxsite/connectors/connector.php'; | |
| var isRequest = false; | |
| $(document).on('click','[data-action] [type=submit]',function(e){ | |
| e.preventDefault(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // v.1.0.1 | |
| class modSiteWebGetmenuProcessor extends modProcessor{ | |
| public $classKey = 'modResource'; | |
| protected $activeIDs = array(); // ID of active parents | |
| public function initialize(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // v1.0.2 | |
| $date = date($options,!empty($input) ? $input : time()); | |
| $months_arr = array( | |
| 'January' => array('Январь', 'января'), | |
| 'February' => array('Февраль', 'февраля'), | |
| 'March' => array('Март', 'марта'), | |
| 'April' => array('Апрель', 'апреля'), | |
| 'May' => array('Май', 'мая'), | |
| 'June' => array('Июнь', 'июня'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // v.1.0.1 | |
| class modWebResourcesGetfilterProcessor extends modProcessor { | |
| public function process() { | |
| $response = array('total' => 0, 'success' => 0); | |
| $tvs = $this->getProperty('tvs') ? $this->getProperty('tvs') : array(); | |
| $resource_fields = array_keys($this->modx->newObject('modResource')->toArray()); | |
| $select = $excl = $tvs_name = []; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ls – список файлов и каталогов | |
| ls -al – форматированный список со скрытыми каталогами и файлами | |
| cd dir – сменить директорию на dir | |
| cd – сменить на домашний каталог | |
| pwd – показать текущий каталог | |
| mkdir dir – создать каталог dir | |
| rm file – удалить file | |
| rm -r dir – удалить каталог dir | |
| rm -f file – удалить форсированно file | |
| rm -rf dir – удалить форсированно каталог dir * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $out = array(); | |
| if( | |
| !empty($loadModels) | |
| && !empty($class) | |
| ){ | |
| $loadModels = explode(',',$loadModels); | |
| $class = explode(',',$class); | |
| foreach($loadModels as $i=>$package){ | |
| $className = $class[$i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * v1.0.7 | |
| * переключение контекстов в зависимости от домена и/или урла | |
| * | |
| * необходимые для работы настройки контекста | |
| * error_page | |
| * site_start | |
| * base_url - если нужно переключать контекст в пределах сайта (указывается раздел, напр. "/folder/") | |
| * http_host - если контекст на другом домене (поддомене), напр. "http://site.ru" |