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
<?xml version="1.0" encoding="UTF-8"?> | |
<policy> | |
<template> | |
<name>AdministratorTemplate</name> | |
<description>Context administration policy template with all permissions.</description> | |
<lexicon>permissions</lexicon> | |
<template_group>Admin</template_group> | |
<permissions> | |
<permission> | |
<name>about</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
$('#uslugi_st').on('change', function(){ | |
$(this.options).removeClass('op_active'); | |
$(this.options[this.selectedIndex]).addClass('op_active'); | |
}) |
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
//Плавная прокрутка к якорю | |
$(document).ready(function() { | |
$("a.scrollto").click(function() { | |
var elementClick = $(this).attr("href") | |
var destination = $(elementClick).offset().top; | |
jQuery("html:not(:animated),body:not(:animated)").animate({ | |
scrollTop: destination | |
}, 800); | |
return 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
// Плавное разворачивание аккордеона | |
$('.collapse').on('shown.bs.collapse', function (e) { | |
//console.log('разворачиваем'); | |
var element = $(e.target); | |
$('html, body').animate({ | |
scrollTop: ($('a[href=#'+e.target.id+']').offset().top) | |
},500); | |
}); | |
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
case "msOnBeforeAddToCart": | |
if (is_array($options) && array_key_exists('gift', $options) && !empty($options['gift'])) { | |
$items = $cart->get(); | |
foreach ($items as $item) { | |
if ($item['options']['gift'] && $item['id'] == $product->get('id')) { | |
$response = array( | |
'success' => false | |
,'message' => 'Этот товар уже добавлен в качестве подарка.' | |
); | |
exit(json_encode($response)); |
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
[ | |
{ name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] }, | |
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, | |
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] }, | |
{ name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] }, | |
{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] }, | |
{ name: 'colors', items : [ 'TextColor','BGColor' ] }, | |
{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] } | |
'/', | |
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] }, |
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 // PHP код должен быть заключен в теги <?php | |
// Если ваш файл содержит только PHP-код, то можно | |
пропустить закрывающий ?> | |
// А так начинаются комментарии | |
# Это тоже комментарий но // предпочтительнее |
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
wget -r -k -l 7 -p -E -nc http://site.com/ | |
-r — указывает на то, что нужно рекурсивно переходить по ссылкам на сайте, чтобы скачивать страницы. | |
-k — используется для того, чтобы wget преобразовал все ссылки в скаченных файлах таким образом, чтобы по ним можно было переходить на локальном компьютере (в автономном режиме). | |
-p — указывает на то, что нужно загрузить все файлы, которые требуются для отображения страниц (изображения, css и т.д.). | |
-l — определяет максимальную глубину вложенности страниц, которые wget должен скачать (по умолчанию значение равно 5, в примере мы установили 7). В большинстве случаев сайты имеют страницы с большой степенью вложенности и wget может просто «закопаться», скачивая новые страницы. Чтобы этого не произошло можно использовать параметр -l. | |
-E — добавлять к загруженным файлам расширение .html. | |
-nc — при использовании данного параметра существующие файлы не будут перезаписаны. Это удобно, когда нужно продолжить загрузку сайта, прерванную в предыдущий раз. |
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
SELECT CONCAT( 'ALTER TABLE `', t.`TABLE_SCHEMA` , '`.`', t.`TABLE_NAME` , '` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' ) AS sqlcode | |
FROM `information_schema`.`TABLES` t | |
WHERE 1 | |
AND t.`TABLE_SCHEMA` = 'My_DB_for_convert' | |
ORDER BY 1 | |
LIMIT 0 , 90 |
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 | |
error_reporting(E_ALL); | |
$ftp_server = ''; | |
$ftp_user_name = ''; | |
$ftp_user_pass = ''; | |
$destination_file = ''; | |
$source_file = ''; |