Файл: gold/results.php
Строк: 19
<?
define('MTOP', 1);
include 'config.php';
include '../system/connect.php';
include '../system/core.php';
include '../system/function.php';
if (!isset($_GET['key']) || $_GET['key'] != $key){
header('Location: /');
exit;
}
if (!isset($_POST['LMI_PAYMENT_AMOUNT'])){
header('Location: /');
exit;
}
$site=mysql_fetch_assoc(mysql_query('SELECT * FROM `sait` WHERE `id` = "'.abs(intval($_POST['site'])).'"'));
if ($site['id']){
$sum=abs(intval($_POST['LMI_PAYMENT_AMOUNT']));
$time=($sum/$cena)*86400+time();
mysql_query('UPDATE `'.$prefix.'sait` SET `gold` = "'.$time.'" WHERE `id` = "'.$site['id'].'"');
header('Location: /?yamus_aka_vse_sdelal');
}
else {
header('Location: /?yamus_aka_ne_vse_sdelal');
}
?>