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 | |
/***************************************************** | |
** Вывод списка заказов пользователей | |
** | |
** | |
****************************************************/ | |
$tpl = $modx->getOption('tpl', $scriptProperties, ''); | |
$pdoTools = $modx->getService('pdoTools'); | |
$pdo = $modx->getService('pdoFetch'); |
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
{'pdoCrumbs' | snippet : [ | |
'showHome' => 1, | |
'showHidden' => 0, | |
'tpl' => '@INLINE <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> | |
<a href="{{+link}}" itemscope itemtype="http://schema.org/Thing" itemprop="item"> | |
<span itemprop="name">{{+menutitle}}</span> | |
</a> | |
<meta itemprop="position" content="{{+idx}}" /> | |
</li>', | |
'tplCurrent' => '@INLINE <li class="active" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> |
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 id="google-maps"><div class="google-maps"></div></div> | |
$(window).load(function() { | |
$(".google-maps").gmap3({ | |
marker:{ | |
address:"23, Mornington Crescent, London",options:{icon: "img/marker.png"}}, | |
map:{ | |
options:{ | |
zoom: 14, | |
scrollwheel: false, | |
mapTypeControl: false, |
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 | |
// определение ip | |
if (!empty($_SERVER['HTTP_CLIENT_IP'])) { | |
$ip=$_SERVER['HTTP_CLIENT_IP']; | |
}elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { | |
$ip=$_SERVER['HTTP_X_FORWARDED_FOR']; | |
}else{ | |
$ip=$_SERVER['REMOTE_ADDR']; | |
} | |
// https://dadata.ru/ |
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
<style> | |
select { | |
text-align: center; | |
text-align-last: center; | |
} | |
option { | |
text-align: left; | |
} | |
</style> | |
<select name="number-of-default" aria-invalid="false"> |
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
Ext.onReady(function() { | |
MODx.Ajax.request({ | |
url: Component.config.connector_url, | |
params: { | |
action: 'mgr/getlist', | |
}, | |
listeners: { | |
success: {fn:function(r) { | |
console.log(r); | |
} } |
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
// православный способ обработки "Fatal error: Call to a member function ..." | |
$res = $modx->getObject('className', 5); | |
if (is_object($res) && $res->get('id')) { | |
echo '1'; | |
} else { | |
echo '0'; | |
} |
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
// lg | |
@media screen and (max-width: 1199px) | |
.catalogItem | |
height: 210px | |
margin-bottom: 20px | |
// md | |
@media screen and (max-width: 991px) | |
.catalogItem | |
height: 155px |
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 | |
$gallery = array( | |
'id' => $rid, | |
'name' => '', | |
'rank' => 0, | |
'file' => MODX_BASE_PATH.$arr[7] | |
); | |
$upload = $modx->runProcessor('gallery/upload', $gallery, array( | |
'processors_path' => MODX_CORE_PATH.'components/minishop2/processors/mgr/' | |
)); |
OlderNewer