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
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 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 if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?> | |
<div id="content"> | |
<?php $APPLICATION->ShowViewContent('content'); ?> | |
</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
<form method="post" action="<?php echo POST_FORM_ACTION_URI?>"> | |
<?php echo bitrix_sessid_post()?> | |
<input type="submit" name="submit" value="Submit"> | |
</form> |
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 | |
define('NO_AGENT_CHECK', true); | |
define("STOP_STATISTICS", true); | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
//ajax | |
/*if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || empty($_SERVER['HTTP_X_REQUESTED_WITH']) | |
|| strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest') return;*/ |
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
Options -Indexes | |
ErrorDocument 404 /404.php | |
<IfModule mod_php5.c> | |
php_flag session.use_trans_sid off | |
php_value display_errors 1 | |
php_value mbstring.internal_encoding UTF-8 | |
</IfModule> | |
<IfModule mod_rewrite.c> |
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"); | |
// добавление заказа в один клик, только по имени и телефону | |
CModule::IncludeModule("sale"); | |
CModule::IncludeModule("catalog"); | |
if(!empty($_REQUEST['name']) && !empty($_REQUEST['phone'])) | |
{ | |
$name = $_REQUEST['name']; |
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
<?define("LOG_FILENAME", $_SERVER["DOCUMENT_ROOT"]."/log.txt"); | |
AddMessage2Log('Моя мессага');?> |
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(CModule::IncludeModule("sale")) | |
echo Number2Word_Rus(1425.43);?> |
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
function getNumEnding(number, titles) { | |
var cases = [2, 0, 1, 1, 1, 2]; | |
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
} | |
use: | |
getNumEnding(count, ["товар", "товара", "товаров"]); |
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 | |
$adress = urlencode("Москва, Тверская улица, дом 7"); | |
$url = "http://geocode-maps.yandex.ru/1.x/?geocode={$adress}"; | |
$content = file_get_contents($url); | |
preg_match("/<pos>(.*?)<\/pos>/", $content, $point); | |
$coords = str_replace(' ', ', ', trim(strip_tags($point[1]))); | |
echo $coords; | |
// результат: 38.241803, 56.300984 |
OlderNewer