107 lines
4.4 KiB
PHP
107 lines
4.4 KiB
PHP
|
|
|||
|
<?php
|
|||
|
date_default_timezone_set('Europe/Moscow');
|
|||
|
$c = array(
|
|||
|
/* MySQL <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
'db_name' => 'pay_operations', //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
'db_host' => 'localhost',
|
|||
|
'db_user' => 'newcom1_abk',
|
|||
|
'db_pass' => '4nWYsIM[c?}P',
|
|||
|
'db_base' => 'newcom1_abk',
|
|||
|
/* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
'ip_list' => array('127,0,0,1,188.166.34.68,136.243.38.147,136.243.38.149,136.243.38.150,136.243.38.151,136.243.38.189,88.198.88.98'), //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IP)
|
|||
|
'key' => 'qtzl0igb', //gamedealer key
|
|||
|
'id' => '65643' //ID <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
|||
|
);
|
|||
|
|
|||
|
|
|||
|
function connect_db($c) {
|
|||
|
$db = mysql_connect($c['db_host'],$c['db_user'],$c['db_pass']) or die('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> MySQL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!');
|
|||
|
mysql_select_db($c['db_base'],$db) or die('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!');
|
|||
|
mysql_query('SET NAMES cp1251');
|
|||
|
}
|
|||
|
|
|||
|
//MERCHANT_ORDER_ID=142&P_PHONE=380688028300&P_EMAIL=evhenii_kula%40mail.ru&CUR_ID=94&AMOUNT=90&MERCHANT_ID=65643&SIGN=c0fc70d5446614597d44ff13f2c7a6a5&intid=29728441
|
|||
|
/*
|
|||
|
MERCHANT_ORDER_ID
|
|||
|
P_PHONE
|
|||
|
P_EMAIL
|
|||
|
CUR_ID
|
|||
|
AMOUNT
|
|||
|
MERCHANT_ID
|
|||
|
SIGN
|
|||
|
intid
|
|||
|
*/
|
|||
|
|
|||
|
connect_db($c);
|
|||
|
$nick = mysql_fetch_array(mysql_query('SELECT * FROM `pay_operation` WHERE `id` = "'.$_POST['MERCHANT_ORDER_ID'].'" LIMIT 1'));
|
|||
|
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$nick['uid'].'" LIMIT 1'));
|
|||
|
if (isset ($_POST['MERCHANT_ORDER_ID']))
|
|||
|
{
|
|||
|
if ($nick['good']!=0)
|
|||
|
{
|
|||
|
echo "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
|
|||
|
mysql_query('UPDATE `users` SET `money2` = `money2` + '.$nick['ekr'].' WHERE `id` = "'.$nick['uid'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `pay_operation` SET `good` = "'.time().'" WHERE `id` = "'.$_POST['MERCHANT_ORDER_ID'].'" LIMIT 1');
|
|||
|
mysql_query('UPDATE `users` SET `catch` = `catch` + '.$nick['ekr'].' WHERE `id` = "'.$nick['uid'].'" LIMIT 1');
|
|||
|
|
|||
|
//mysql_query('INSERT INTO `'.$c['db_name'].'` (`time`,`type`,`ip`,`value`,`money`,`project`) VALUES ("'.time().'","'.mysql_real_escape_string($type).'","'.$_SERVER['HTTP_X_REAL_IP'].'","'.mysql_real_escape_string($value).'","'.mysql_real_escape_string($money).'","'.mysql_real_escape_string($this->id).'")');
|
|||
|
|
|||
|
$r = '<span class=date>'.date('d.m.Y H:i').'</span> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></b> / <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></u> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ';
|
|||
|
if($user['sex'] == 1)
|
|||
|
{
|
|||
|
$r .= '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
$r .= '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
$r .= ' <b>'.$user['login'].'</b>, <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.$nick['ekr'].' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!';
|
|||
|
//$str1 = iconv("cp1251","UTF-8",$r);
|
|||
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$user['city']."','".$user['room']."','','".$user['login']."','".$r."','-1','5','0')");
|
|||
|
//echo $r."r<br>";
|
|||
|
|
|||
|
|
|||
|
if ($nick['ref'] !=0)
|
|||
|
{
|
|||
|
$refecr=round(($nick['ekr']/10));
|
|||
|
mysql_query('UPDATE `users` SET `money2` = `money2` + '.$refecr.' WHERE `id` = "'.$nick['ref'].'" LIMIT 1');
|
|||
|
$referal = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$nick['ref'].'" LIMIT 1'));
|
|||
|
$r = '<span class=date>'.date('d.m.Y H:i').'</span> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></b> / <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></u> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ';
|
|||
|
if($referal['sex'] == 1)
|
|||
|
{
|
|||
|
$r .= '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
$r .= '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
$r .= ' <b>'.$referal['login'].'</b>, <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.$refecr.' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!'.$user['login'].'';
|
|||
|
//$str1 = iconv("cp1251","UTF-8",$r);
|
|||
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$referal['city']."','".$referal['room']."','','".$referal['login']."','".$r."','-1','5','0')");
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
echo "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ".$user['login']." | ID: ".$nick['uid']." | <20><><EFBFBD><EFBFBD><EFBFBD>: ".$nick['ekr']." | ID <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ".$_POST['MERCHANT_ORDER_ID']."<br>";
|
|||
|
if (isset ($referal['id']))
|
|||
|
{
|
|||
|
echo "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>): ".$referal['login']." | ID: ".$referal['id']." | <20><><EFBFBD><EFBFBD><EFBFBD>: ".$refecr."<br>";
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
echo "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!!";
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
echo "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!";
|
|||
|
}
|
|||
|
?>
|