<?php
include ("data/header.dat");
if(!$umail) {echo "<center>Укажите E-mail!</center>";}
if($umail) {
$fp = fopen("users/". $wmz, "r");
$dat = fgets($fp, 100);
$fp = fclose($fp);
list($ip,$email,$id,$cash,$times,$magicb,$cash2,$paid)=split(">>", $dat);
if($email == $umail) {
if($get_cash > $cash) {$sum = $cash;} else {$sum = $get_cash;}
if($fp = @fopen("temp/cash/". $wmz, "r")) {
$perevod = fgets($fp, filesize("temp/cash/". $wmz));
$fp = fclose($fp);
$sum2 = $sum + $perevod;
} else {$sum2 = $sum;}
$fp = fopen("temp/cash/". $wmz, "w");
fwrite($fp, $sum2);
$fp = fclose($fp);
$cash2_1 = $cash - $sum;
$cash2_2 = 0;
$times2 = $times + 1;
$fp = fopen("users/". $wmz, "w");
fwrite ($fp, $ip. ">>". $email. ">>". $id. ">>". $cash2_1 .">>". $times2. ">>". $magicb. ">>". $cash2_2. ">>". $paid);
$fp = fclose($fp);
echo "<center>Через некоторое время на ваш кошелёк придут деньги.</center>";
} else {echo "<center>Введён неверный E-mail!</center>";}
}
include ("data/foot.dat");
?>