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
.portfolio .thumbnail { | |
position: relative; | |
} | |
.portfolio .thumbnail:hover { | |
cursor: pointer; | |
} | |
.portfolio .caption { | |
bottom: 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
tar -zxvf archive.tar.gz ./folder |
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 = simplexml_load_file("news.xml") or die("Error: Cannot create object"); | |
$id = count($xml->channel->item); | |
$item = $xml->channel->addChild('item', ''); | |
$item->addAttribute('id', $id); | |
$item->addChild('date', $_POST['date']); | |
$item->addChild('title', $_POST['title']); | |
$item->addChild('description', $_POST['description']); | |
$xml->asXml('news.xml'); |
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
<snippet> | |
<content><![CDATA[ | |
echo '<!-- '; print_r(\$${1:foo}); echo ' -->'; | |
]]></content> | |
<description>PHP: echo html comment print_r</description> | |
<scope>source.php</scope> | |
<tabTrigger>dump html comment</tabTrigger> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<!-- <tabTrigger>hello</tabTrigger> --> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> |
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
//в файлах init.php или в dbconn.php | |
define("LOG_FILENAME", $_SERVER["DOCUMENT_ROOT"]."/log.txt"); | |
//Используем | |
AddMessage2Log('$arFields = '.print_r($arFields, true),''); |
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
CModule::IncludeModule("catalog"); | |
global $USER; | |
//Цена | |
$arPrice = CCatalogProduct::GetOptimalPrice($arResult['ID'], 1, $USER->GetUserGroupArray()); | |
$arResult['PRICE'] = $arPrice; | |
$arResult['DISCOUNT_PRICE'] = SaleFormatCurrency($arPrice["DISCOUNT_PRICE"], $arPrice["RESULT_PRICE"]["CURRENCY"]); |
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
<?foreach($arResult["ITEMS"] as $cell=>$arItem):?> | |
<? | |
$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_EDIT")); | |
$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_DELETE"), array("CONFIRM" => GetMessage('CT_BNL_ELEMENT_DELETE_CONFIRM'))); | |
?> | |
<?if($cell%$arParams["LINE_ELEMENT_COUNT"] == 0):?> | |
<p> | |
<?endif;?> | |
<img id="<?=$this->GetEditAreaId($arItem['ID']);?>" src="<?=$arItem["PREVIEW_PICTURE"]["SRC"]?>" alt="<?=$arItem["NAME"]?>"/> | |
<?$cell++; |
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
<? | |
if($arParams['ADD_SECTIONS_CHAIN'] && !empty($arResult['NAME'])) { | |
$arResult['SECTION']['PATH'][] = array( | |
'NAME' => $arResult['NAME'], | |
'PATH' => '' | |
); | |
} | |
?> |
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
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?> | |
<? | |
$sChainProlog = "<nav class='breadcrumbs'><ul><li><a href='/'>Главная</a> /</li>"; | |
if( strlen($LINK) > 0 && $arChain[count($arCHAIN)-1]['LINK'] != $LINK ) { | |
$sChainBody .= "<li><a href=\"".$LINK."\" class=\"chain\">".htmlspecialchars($TITLE)."</a> /</li>"; // если указана ссылка то выводим ссылку | |
} else { | |
$sChainBody .= "<li>".htmlspecialchars($TITLE)."</li>"; // иначе текст, или последний пункт | |
} | |
$sChainEpilog = "</ul></nav>"; |
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
<? | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
CModule::IncludeModule("sale"); | |
if (($_GET["action"] == "ADD2BASKET" || $_GET["action"] == "BUY") && IntVal($_GET["id"])>0) { | |
$arFields = array( | |
"FUSER_ID"=>CSaleBasket::GetBasketUserID(), | |
"CURRENCY" => "RUB", | |
"PRODUCT_ID" => $_GET["id"], |