$title = GetMessage('RBS_PAYMENT_ORDER_THANK');
if ($response['orderStatus'] == 1) {
$message = GetMessage('RBS_PAYMENT_ORDER_AUTH', array('#ORDER_ID#' => $orderNumberPrint));
} else {
$message = GetMessage('RBS_PAYMENT_ORDER_FULL_AUTH', array('#ORDER_ID#' => $orderNumberPrint));
}
$title = GetMessage('RBS_PAYMENT_ORDER_THANK');
$message = GetMessage('RBS_PAYMENT_ORDER_PAY1', array('#ORDER_ID#' => $orderNumberPrint));
if (!CSaleOrder::StatusOrder($order_number, "OP")) echo "";
<?
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php");
Cmodule::IncludeModule('catalog');
$iOstatok = $_GET["QUANTITY"];
$iElementID = $_GET["ID"];
$el = new CIBlockElement;
$arFields = array("QUANTITY" => $iOstatok);
CCatalogProduct::Update($iElementID, $arFields);
?>
<?php
$marks = array(
array(
'name'=>'Петров',
'subjects'=>array(
'math'=>4,
'physics'=>3,
'chemistry'=>3,
'russian'=>5
),
),
array(
'name'=>'Иванов',
'subjects'=>array(
'math'=>4,
'physics'=>5,
'chemistry'=>4,
'russian'=>5
),
),
array(
'name'=>'Сидоров',
'subjects'=>array(
'math'=>5,
'physics'=>3,
'chemistry'=>4,
'russian'=>3
),
),
array(
'name'=>'Ветрова',
'subjects'=>array(
'math'=>2,
'physics'=>3,
'chemistry'=>3,
'russian'=>4
),
),
array('name'=>'Филатова',
'subjects'=>array(
'math'=>4,
'physics'=>4,
'chemistry'=>4,
'russian'=>5
),
),
array(
'name'=>'Бубнов',
'subjects'=>array(
'math'=>4,
'physics'=>3,
'chemistry'=>3,
'russian'=>4
),
),
array(
'name'=>'Пескова',
'subjects'=>array(
'math'=>5,
'physics'=>5,
'chemistry'=>4,
'russian'=>2
),
),
array(
'name'=>'Ленинов',
'subjects'=>array(
'math'=>4,
'physics'=>3,
'chemistry'=>3,
'russian'=>5
),
),
);
?>
<table>
<thead>
<tr>
<td>ФИО / Предметы</td>
<td>математика</td>
<td>физика</td>
<td>химия</td>
<td>русский</td>
<td>средний бал</td>
</tr>
</thead>
<tbody>
<?php
foreach ($marks as $student)
{
echo '<tr>
<td>'.$student['name'].'</td>
<td>'.$student['subjects']['math'].'</td>
<td>'.$student['subjects']['physics'].'</td>
<td>'.$student['subjects']['chemistry'].'</td>
<td>'.$student['subjects']['russian'].'</td>
<td>'.(($student['subjects']['math']+$student['subjects']['physics']+$student['subjects']['chemistry']+$student['subjects']['russian'])/4).'</td>
</tr>';
}
?>
</tbody>
</table>
if (CSite::InDir('/papka/')){
?>ваш контент<?
}
function rus2translit($string) {
$converter = array(
'а' => 'a', 'б' => 'b', 'в' => 'v',
'г' => 'g', 'д' => 'd', 'е' => 'e',
'ё' => 'e', 'ж' => 'zh', 'з' => 'z',
'и' => 'i', 'й' => 'y', 'к' => 'k',
'л' => 'l', 'м' => 'm', 'н' => 'n',
'о' => 'o', 'п' => 'p', 'р' => 'r',
'с' => 's', 'т' => 't', 'у' => 'u',
'ф' => 'f', 'х' => 'h', 'ц' => 'c',
'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sch',
'ь' => '\'', 'ы' => 'y', 'ъ' => '\'',
'э' => 'e', 'ю' => 'yu', 'я' => 'ya',
'А' => 'A', 'Б' => 'B', 'В' => 'V',
'Г' => 'G', 'Д' => 'D', 'Е' => 'E',
'Ё' => 'E', 'Ж' => 'Zh', 'З' => 'Z',
'И' => 'I', 'Й' => 'Y', 'К' => 'K',
'Л' => 'L', 'М' => 'M', 'Н' => 'N',
'О' => 'O', 'П' => 'P', 'Р' => 'R',
'С' => 'S', 'Т' => 'T', 'У' => 'U',
'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C',
'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sch',
'Ь' => '\'', 'Ы' => 'Y', 'Ъ' => '\'',
'Э' => 'E', 'Ю' => 'Yu', 'Я' => 'Ya',
);
return strtr($string, $converter);
}
<form id="form_id" method="post">
//инпуты и тексты, субмит
</form>
<script type="text/javascript">
$(function () {
$('#form_id').submit(function(e){
e.preventDefault();
var data = $(this).serialize();
$. ajax ({
url:'/ajax.php',
type:'post',
data:data,
success:function(res){
$('#result').html(res);
}
})
})
})
</script>
<?php
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
$Android = stripos($_SERVER['HTTP_USER_AGENT'],"Android");
if( $iPod || $iPhone || $iPad ){
echo "ios";
}else if($Android){
echo "android";
}
//скрытно регить на этапе оформления
$random = randString(10, array(
"ABCDEFGHIJKLNMOPQRSTUVWXYZ"
));
$mailusers = $random.'@test.com';
global $USER; $arResult = $USER->Register($random, $random, "", $random, $random, $mailusers);
ShowMessage($arResult);
$USER->Authorize($USER->GetID());
//на странице завершения заказа в конце
$USER->Logout();
<!--Скрытый див, где-то на странице.-->
<div style="display: none;" id="from"><?=getPrice(...);?></div>
...
<!--пустой див в закэшированном компонете-->
<div style="display: block;" id="to"></div>
<script type="text/JavaScript">
document.getElementById('to').innerHTML = document.getElementById('from').innerHTML;
</script>
<?
$sortField = 'shows'; // поле сортировки по умолчанию
$sortOrder = 'DESC'; // направление сортировки по умолчанию
if (
isset($_GET["sort"]) && isset($_GET["method"]) && (
$_GET["sort"] == "name" ||
$_GET["sort"] == "catalog_PRICE_1" ||
$_GET["sort"] == "shows" ||
$_GET["sort"] == "created")){
$sortField = $_GET["sort"];
$sortOrder = $_GET["method"];
}
?>
$res = CIBlockElement::GetList(Array($sortField => $sortOrder), Array($arrFilter, $arFilter), false, Array("nPageSize"=>19), $arSelect);
<div class="sort">Сортировка по:
<a href="?sort=catalog_PRICE_1&method=desc">цене</a>
<a href="?sort=shows&method=desc">популярности</a>
<a href="?sort=created&method=desc">новинкам</a>
<a href="?sort=name&method=asc">названию</a>
</div>