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
[[!weather? | |
&cityId=`26850` | |
&tpl=`weather.tpl` | |
&cacheTime=`7200` | |
]] |
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
var msop2 = { | |
par: {}, | |
setup: function() { | |
msop2.par.msform = '.ms2_form'; | |
msop2.par.product = '.msop2.product-'; | |
msop2.par.product_weight = '.msop2.product_weight-'; | |
}, | |
initialize: function() { | |
msop2.setup(); |
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 | |
/** @var array $scriptProperties */ | |
/** @var mslistorders $mslistorders */ | |
if (!$mslistorders = $modx->getService('mslistorders', 'mslistorders', $modx->getOption('mslistorders_core_path', null, $modx->getOption('core_path') . 'components/mslistorders/') . 'model/mslistorders/', $scriptProperties)) { | |
return 'Could not load mslistorders class!'; | |
} | |
$mslistorders->initialize($modx->context->key, $scriptProperties); | |
// default | |
$class = 'msOrder'; | |
$row = 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 | |
function download($src, $timeout = 3) { | |
if (function_exists('curl_init')) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $src); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); |
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 | |
define('MODX_API_MODE', true); | |
require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/config/config.inc.php'; | |
require_once MODX_BASE_PATH . 'index.php'; | |
if (XPDO_CLI_MODE) { | |
$file = @$argv[1]; | |
$fields = @$argv[2]; | |
$update = (bool) !empty($argv[3]); |
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
var msczone = { | |
par: {} | |
,setup: function() { | |
msczone.par.spot = '#msczone-spot'; | |
msczone.par.sity = '#msczone-city'; | |
} | |
,initialize: function() { | |
msczone.setup(); | |
// Forms listeners | |
$(document).on('change', 'select[name="options-spot"]', function() { |
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
var msczone = { | |
par: {}, | |
setup: function() { | |
msczone.par.spot = '#msczone-spot'; | |
msczone.par.sity = '#msczone-city'; | |
}, | |
initialize: function() { | |
msczone.setup(); | |
// Forms listeners | |
$(document).on('change', 'select[name="options-spot"]', function() { |
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 | |
/* @var array $scriptProperties */ | |
/* @var miniShop2 $miniShop2 */ | |
$miniShop2 = $modx->getService('minishop2'); | |
$miniShop2->initialize($modx->context->key); | |
/** @var msczone $msczone */ | |
if (!$msczone = $modx->getService('msczone', 'msczone', $modx->getOption('msczone_core_path', null, $modx->getOption('core_path') . 'components/msczone/') . 'model/msczone/', $scriptProperties)) { | |
return 'Could not load msczone class!'; | |
} | |
$msczone->initialize($modx->context->key, $scriptProperties); |
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
// скопировать сниппет msOptions | |
// вставить код ниже | |
<?php | |
/* @var array $scriptProperties */ | |
/* @var pdoFetch $pdoFetch */ | |
if (!$modx->loadClass('pdofetch', MODX_CORE_PATH . 'components/pdotools/model/pdotools/', false, true)) {return false;} | |
$pdoFetch = new pdoFetch($modx, $scriptProperties); | |
if (empty($product) && !empty($input)) {$product = $input;} | |
if (empty($selected)) {$selected = '';} |
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
<div class="row ps_subscription"> | |
<div class="span4 col-md-4"> | |
[[+pas_pagetitle]] | |
<p><small>[[+pas_description]]</small></p> | |
</div> | |
<div class="row span8 col-md-8"> | |
<form method="post" class="form-horizontal ps_form"> | |
<input type="hidden" name="id" value="[[+resource_id]]"> | |
<input type="hidden" name="count" value="1"> | |
<input type="hidden" name="options" value="[]"> |