Файл: mod/result2.php
Строк: 20
<?php
include_once($_SERVER["DOCUMENT_ROOT"]."/inc/db.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/inc/function.php");
$num = ($_POST['LMI_PAYMENT_NO']);
$data = mysql_query("SELECT * FROM `rek` WHERE `num` = '".$num."'");
$row = mysql_fetch_assoc($data);
$post = ($_POST['LMI_PAYMENT_AMOUNT']);
if($row['sum'] <> $post ) {
$err=1;
echo "ERR: НЕВЕРНАЯ СУММА ".$_POST['LMI_PAYMENT_AMOUNT'];
exit;
}
if(trim($_POST['LMI_PAYEE_PURSE'])!=$wmr3) {
$err=1;
echo "ERR: НЕВЕРНЫЙ КОШЕЛЕК ПОЛУЧАТЕЛЯ ".$_POST['LMI_PAYEE_PURSE'];
exit;
}
if(empty($err)){ echo "YES";
}
IF($_POST['LMI_PREREQUEST']==1) {
}
ELSE {
$number = mysql_fetch_assoc(mysql_query("SELECT * FROM `rek` WHERE `num` = '".$num."'"));
if($number == TRUE)
{
mysql_query("UPDATE `rek` SET `clicks` = `clicks` + `ok` WHERE `num` = '".$number['num']."' AND `id` = '".$number['id']."'");
}
}
?>