<?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('45coin', '', $t['msg']));
$log = trim(str_replace('99coin', '', $log));
$tarif = array(
'1151' => 6,
'1899' => 8,
'1161' => 9,
'4481' => 15,
'1871' => 1,
'1872' => 2,
'1873' => 6,
'1874' => 10,
'1381' => 1,
'1391' => 2,
'1635' => 6,
'1645' => 10,
'5013' => '',
'5014' => '',
'17011' => 3,
'17012' => 8,
'17013' => 10,
'7720' => 3,
'7730' => 5,
'7750' => 10,
'7790' => 20,
'7910' => 3,
'79866' => 10,
'7510' => 3,
'7520' => 12,
'7530' => 22,
'7540' => 37,
'1899' => 2,
'7781' => 3,
);
$coin = !empty($tarif[$t['num']]) ? $tarif[$t['num']] : 3;
$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("L2dbnam/esql2db/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 уважением администрация L2servak.Ru Платеж осуществлен сервисом www.a1pay.ru";
}
}
$secret = '54se54gf23';
A1Lite_processor($_GET, $secret);