This file contains 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
<!--noindex--> | |
<p id="texthidecomments" style="text-align:center;font-style:italic">----- некоторые вопросы были скрыты -----</p> | |
<h4 id="showallcomments" style="display: block;"> | |
<a href="[[*uri]]#" class="wpb_button_anone"><span class="wpb_none btn btn-default">Показать все вопросы</span></a> | |
</h4> | |
<!--/noindex--> | |
<script> | |
jQuery( document ).ready(function() { | |
var $div = jQuery("li[data-parent=0]"); | |
var start = 7; |
This file contains 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 = ''; | |
if($tv = $modx->resource->getTVValue('slider-inside-oneclick')){ | |
$tv_arr = $modx->fromJSON($tv); | |
if(is_array($tv_arr)){ | |
foreach($tv_arr as $v){ | |
if(!$v['name']) $v['name'] = $modx->resource->get('pagetitle'); | |
$out .= $modx->parseChunk('tpl.slider-inside-oneclick', $v); | |
} | |
} |
This file contains 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
[{ | |
"formname":"Ванные" | |
,"formtabs": [{ | |
"caption":"Тип калькулятора" | |
,"fields": [{ | |
"field":"fake" | |
,"default":"1" | |
,"inputTVtype":"hidden" | |
}, | |
{ |
This file contains 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 | |
//шлём заголовки | |
header('Access-Control-Allow-Origin: *'); | |
header('Content-type: application/json; charset=utf-8'); | |
// инициализация MODX API | |
define('MODX_API_MODE', true); | |
require_once dirname(dirname(__FILE__)) . '/core/config/config.inc.php'; | |
require_once MODX_BASE_PATH . 'index.php'; | |
// Включаем обработку ошибок |
This file contains 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
{ | |
"allowBlank":"false", | |
"allowDecimals":"No", | |
"allowNegative":"No", | |
"decimalPrecision":"0", | |
"decimalSeparator":".", | |
"maxValue":"", | |
"minValue":"" | |
} |
This file contains 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 | |
/** | |
* quip.thread_err_save - MIGX использует данное значение лексикона по умолчанию, как сообщение об ошибке | |
* см. https://github.com/Bruno17/MIGX/blob/700780f2328f79bdd6b6b8dcea3351bad472f049/core/components/migx/processors/mgr/default/update.php#L317 | |
* чтобы переопределить его для своих целей и сделать его разным для разных своих классов, всегда перед return false; | |
* подключаем нужный нам лексикон из определённого пространства имён. | |
* Таким образом, выводим нужное нам значение об ошибке | |
* Author хака: andronex (i.modx@ya.ru) | |
**/ | |
class CarsClassesPrices extends xPDOSimpleObject { |
This file contains 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
if ($modx->context->key != 'mgr') { | |
switch ($modx->event->name) { | |
// Событие перед регистрацией пользователя | |
case 'OnBeforeUserFormSave': | |
******************************************************************** код ****************************************** | |
$modx->error->errors[] = array('changedriverphone' => true); //вывод в массив data | |
$modx->error->errors[] = array('id_driver' => (int)$_POST['id_driver'][$di]); //вывод в массив data | |
$modx->event->output('Вы уверены, что хотите сменить номер телефона водителя '. $modx->stripTags($_POST['driver-evacuator-name'][$di]) .' с '. $oldPhone .' на '. $newPhone .' ?<br>'); //вывод в message | |
******************************************************************** код ****************************************** | |
break; |
This file contains 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
if (!$modx->user->isAuthenticated('web')) { | |
$modx->sendUnauthorizedPage(); | |
} | |
//////////////// | |
if(!$modx->user->isMember('Членистоногие')){ | |
$modx->sendUnauthorizedPage(); | |
} |
This file contains 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 | |
define('MODX_API_MODE', true); | |
require_once dirname((__FILE__)) . '/index.php'; | |
$modx->getService('error','error.modError'); | |
$modx->setLogTarget(XPDO_CLI_MODE ? 'ECHO' : 'HTML'); | |
$modx->setLogLevel(modX::LOG_LEVEL_ERROR); | |
$modx->ms2Gallery = $modx->getService('ms2gallery', 'ms2Gallery', MODX_CORE_PATH . 'components/ms2gallery/model/ms2gallery/'); | |
$json = $modx->getObject('modTemplateVarResource', array( | |
'tmplvarid' => 24, |
This file contains 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 EvacuatorsPaidsBeznal extends xPDOSimpleObject { | |
/** {inheritDoc} */ | |
public function save($cacheFlag = null) { | |
if($this->get('status') == true && isset($this->_dirty['status']) && !$this->isNew()){ | |
$this->set('published', 0); | |
$table = $this->xpdo->getTableName('EvacuatorsBalance'); | |
//плюсуем на счёт сумму из выставленного ранее и оплаченного счёта | |
$this->xpdo->exec("UPDATE {$table} SET `amount` = `amount` + {$this->amount} WHERE `user_id` = {$this->user_id};"); |