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
directory_create | |
directory_list | |
directory_remove | |
directory_update | |
empty_cache | |
file_list | |
file_manager | |
file_remove | |
file_upload | |
publish_document |
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
Обновление суммы в строчке корзины miniShop2 | |
Javascript: | |
--------------------------------- | |
change: function () { | |
var callbacks = miniShop2.Cart.callbacks; | |
callbacks.change.response.success = function (response) { | |
var num_v = $('#'+response.data.key).find('input[name=count]').val(); | |
var pri = $('#'+response.data.key).find('input[name=price]').val(); | |
var td_pri = parseFloat(pri)*num_v; |
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
$.scrollLock = ( function scrollLockClosure() { | |
'use strict'; | |
var $html = $( 'html' ), | |
// State: unlocked by default | |
locked = false, | |
// State: scroll to revert to | |
prevScroll = { | |
scrollLeft : $( window ).scrollLeft(), | |
scrollTop : $( window ).scrollTop() |
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
Вызов коммандера | |
mc | |
Подключиться по FTP | |
Логин:Пароль@Адрес сервера | |
Синхронизировать папки | |
rsync -avzP test/ [email protected]:public_html/test/ | |
Экспорт базы на исходном сервере: |
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 | |
$step = 5; | |
$offset = isset($_SESSION['galgenoffset']) && $_SESSION['galgenoffset'] ? $_SESSION['galgenoffset'] : 0; | |
$miniShop2 = $modx->getService('minishop2'); | |
$modx->setLogLevel(MODX_LOG_LEVEL_ERROR); | |
$q = $modx->newQuery('msProduct'); | |
$total = $modx->getCount('msProduct', $q); | |
$q->sortby('id','ASC'); | |
$q->limit($step,$offset); | |
$resources = $modx->getCollection('msProduct', $q); |
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 | |
// Add RTE for introtext if richtext option is enabled for the resource | |
// check "OnDocFormRender" event | |
$templates_arr = explode(',', $templates); | |
if(!empty($resource) && in_array($resource->template, $templates_arr)) { | |
$modx->regClientStartupHTMLBlock('<script>Ext.onReady(function() { | |
if(MODx.loadRTE) MODx.loadRTE("modx-resource-introtext"); | |
});</script>'); | |
} |
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
$('ul.tabnav').on('click', 'li:not(.active)', function(e) { | |
e.preventDefault(); | |
$(this).addClass('active').siblings().removeClass('active').parents('div.boxes').find('div.box').eq($(this).index()).fadeIn(150).siblings('div.box').hide(); | |
}); |
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
<? | |
$pics = array(); | |
$i = 1; | |
foreach ($api_value->animalPictures as $animalPictures) { | |
$pic = array(); | |
$pic['image'] = $animalPictures->urlSecureFullsize; | |
$pic['MIGX_id'] = $i; | |
$pics[] = $pic; | |
$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 | |
function flt($input_text) { | |
return mysql_escape_string(htmlspecialchars(strip_tags(trim($input_text)))); | |
} |