Вход Регистрация
Файл: vkolhoze.com/pay_rubi/paytools/suces.php
Строк: 33
<?php
if(!empty($_POST['system_income']) AND !empty($_POST['order_id'])){
include_once 
''.(str_replace("/pay_rubi/paytools/",""$_SERVER['DOCUMENT_ROOT'])).'/inc/start_sess.php';
$kols=htmlspecialchars($_POST['system_income']);
$ku=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id`='".(intval($_POST['order_id']))."' LIMIT 1"));
$kol=round($kols/0.06);
if(
$ku['flowerbed']==11)$bon=round(($kol/100)*25);
if(
$ku['flowerbed']==12)$bon=round(($kol/100)*50);
function 
texi($kol){
$rest substr("$kol", -1);
if(
$rest>=1){$tex="рубинов";}
if(
$kol>=21 and $rest==1){$tex="рубин";}
if(
$kol>=21 and $rest>=and $rest<=4){$tex="рубина";}
if(
$kol>=21 and $rest>=5){$tex="рубинов";}
if(
$rest==0){$tex="рубинов";}
return 
$tex;
}
if(isset(
$bon))$bontext='Бонус за клумбу: '.$bon.' '.(texi($bon)).'.'; else {$bon=0;$bontext='';}
$text="Получен платеж на Ваш аккаунт: $kol ".(texi($kol)).".
$bontext
Всего зачислено: "
.($kol+$bon)." ".(texi($kol+$bon)).".";
///
echo "Оплата заказа прошла удачно. $text";
$sum=$kol+$bon;
mysql_query("UPDATE `kolhoz_user` SET `rubies` = '$ku[rubies]'+'$sum',`action_time`='".(time()+86400)."' WHERE `id` = '$ku[id]' LIMIT 1") or die (mysql_error());
mysql_query("INSERT INTO `kolhoz_mail` SET `id_user` = '$ku[id]', `id_kont` = '0', `msg` = '$text', `time` = '".(time())."', `type` = 'to'") or die (mysql_error());
mysql_query("INSERT INTO `kolhoz_price` SET `id_user` = '$ku[id]', `kol` = '$kol', `bon` = '$bon', `time` = '".(time())."', `kol_all` = '$sum'") or die (mysql_error());

}
?>
Онлайн: 2
Реклама