This file contains 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="timer_stock"> | |
<span class="date_finish" style="display: none;" >2016-12-31</span> | |
<span class="days">00</span> | |
<span class="hours">00</span> | |
<span class="minutes">00</span> | |
<span class="seconds">00</span> | |
</div> |
This file contains 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
Show hidden characters
// Sublime Text - Build System for Javascript | |
{ | |
"cmd": ["node", "$file"], | |
"selector": "source.js" | |
} |
This file contains 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 | |
$path = htmlspecialchars($_REQUEST['path']); | |
$type = htmlspecialchars($_REQUEST['type']); | |
if (!empty($path)) { | |
switch ($type) { | |
case 'email': | |
$header = "Content-type:text/html; charset=\"utf-8\"\r\n"; | |
$header .= "From: " . $_SERVER["SERVER_NAME"] . " <noreply@" . $_SERVER["SERVER_NAME"] . ">\r\n"; | |
if (mail("email@gmail.com", $_SERVER["SERVER_NAME"] . '/report_admin.php', 'check url: ' . $path, $header)) { | |
header('Location: /'); |
This file contains 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 | |
require_once ($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'); | |
if ( !defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true ) die(); | |
define('NO_KEEP_STATISTIC', true); | |
CModule::IncludeModule('catalog'); | |
CModule::IncludeModule('sale'); | |
$arID = array(); | |
$arBasketItems = array(); | |
$dbBasketItems = CSaleBasket::GetList( | |
array( |
This file contains 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
<script src="//api-maps.yandex.ru/2.1/?lang=ru_RU" type="text/javascript"></script> | |
<script type="text/javascript"> | |
ymaps.ready( function () { | |
var myMap = new ymaps.Map( 'map', { | |
center: [ 55.582335, 37.669342 ], | |
zoom: 16, | |
controls: [ "zoomControl" ] | |
}, { | |
searchControlProvider: 'yandex#search' | |
} ), |
This file contains 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> | |
#bg-blackout { | |
position: fixed; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
background: rgba(0, 0, 0, 0.2); | |
z-index: 100; | |
} |
This file contains 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(); | |
} | |
foreach ($arResult["ITEMS"] as $key => $arElement) { | |
if (!empty($arElement["PREVIEW_PICTURE"]["SRC"])) { | |
$arFileTmp = CFile::ResizeImageGet( | |
$arElement["PREVIEW_PICTURE"], | |
array("width" => 100, "height" => 100), | |
BX_RESIZE_IMAGE_EXACT, |
This file contains 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
bitrix | |
settitle |
This file contains 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 | |
$db_host = 'localhost'; | |
$db_user = ''; | |
$db_pass = ''; | |
$db_name = ''; | |
$db_table = ''; | |
$db_field = ''; | |
$link = mysql_connect($db_host, $db_user, $db_pass); | |
if (!$link) { | |
die(mysql_error()); |
This file contains 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 files_list($dir, &$files, $types_ar, $required_text) { | |
$fp = opendir($dir); | |
while ($file = readdir($fp)) { | |
$path = $dir . '/' . $file; | |
if (is_file($path)) { | |
if (in_array(end(explode('.', $file)), $types_ar)) { | |
$files[] = $path; | |
$contents = file_get_contents($path); | |
$pos = strpos($contents, $required_text); |
OlderNewer