Файл: l2ps_v5/a1pay_smss.php
Строк: 39
<?php
function A1Lite_processor ($t, $secret)
{
$params = array(
'date' => $t['date'],
'msg_trans' => $t['msg_trans'],
'operator_id' => $t['operator_id'],
'user_id' => $t['user_id'],
'smsid' => $t['smsid'],
'cost_rur' => $t['cost_rur'],
'ran' => $t['ran'],
'test' => $t['test'],
'num' => $t['num'],
'country_id' => $t['country_id'],
// 'test' => 1
);
$params['check'] = md5(join('', array_values($params)) . $secret);
if ($params['check'] === $t['sign'])
{
$log = trim(str_replace('*l2pirat', '', $t['msg']));
$log = trim(str_replace('*l2pirat', '', $log));
$tarif = array(
'1151' => 5,
'1899' => 10,
'3747' => 25,
'1131' => 2,
'1871' => 2,
'1872' => 3,
'1873' => 9,
'1874' => 16,
'1381' => 1,
'1391' => 5,
'1635' => 8,
'1645' => 12,
'5013' => 5,
'5014' => 10,
'1141' => 2,
'1161' => 7,
'1171' => 14,
'7720' => 2,
'7730' => 5,
'7750' => 8,
'7790' => 11,
'8012' => 1,
'8013' => 2,
'8014' => 5,
'7510' => 2,
'7520' => 9,
'7530' => 16,
'7540' => 26,
);
$coin = !empty($tarif[$t['num']]) ? $tarif[$t['num']] : 3;
mysql_query("UPDATE `users` SET `udata38` =`udata38`+ '$coin' WHERE `udata0` = '$log'");
file_put_contents("data/pay.dat", date('Y-m-d') .' / '. $log .' / '. $coin ."rn", FILE_APPEND);
//$text = @file_get_contents("L2dbnam/esql2db/reg/$log.dat");
//$udata = explode(":||:", $text);
//$udata[14] = intval($udata[14] + $coin);
//$text = implode(":||:", $udata);
//file_put_contents("L2dbnam/esql2db/reg/$log.dat", $text);
file_put_contents("local/pay.dat", date('Y-m-d') .' / '. $log .' / '. $coin ."/rn", FILE_APPEND);
echo "smsid:".$t['smsid']."n";
echo "status:replyn";
echo "n";
echo "Персонажу ". $log ." зачислено ". $coin ." Coin of Luck. C уважением Администрация Пиратского Сервера The Company l2pirates.ru Платеж осуществлен сервисом www.a1pay.ru";
}
}
$secret = 'gilza';
A1Lite_processor($_GET, $secret);
php?>