Вход Регистрация
Файл: l2ps_v5/itog/bonus.php
Строк: 57
<?php

function vgrInt_deliverBonus($voteId, $voteDate, $voteIp, $voteChar, $sms)
{
vgrInt_openGameSQLConnection();
$voteId = intval($voteId);
$voteDate = intval($voteDate);
$sms = intval($sms);


$req = mysql_query("SELECT * FROM `users` WHERE `udata0`='$voteChar'  LIMIT 1");
////////////////////////////
$avto=mysql_num_rows($req);
if(
$avto==1){
$rs = mysql_fetch_array($req);
$pod=rand(1,2);
if(
$pod=="1"){

$rs['udata19']=$rs['udata19']+10000;
/////////////////
mysql_query("UPDATE `users` SET `udata19`='".$rs['udata19']."' WHERE `udata0`='$voteChar'");
$time = date("H:i d.m.y");
mysql_query("INSERT INTO `msg_r` SET `user_from` = 'Sistema', `user_to` = '$voteChar', `time` = '$time', `read` = 1, `mail_msg` = 'Zachisleno 10 000 exp za golosovanie na vigre.su.'");}

if(
$pod=="2"){

$req = mysql_query("SELECT * FROM `table_vip` WHERE `nick` = '$voteChar'");
$res=mysql_num_rows($req);
$rs = mysql_fetch_array($req);
if(
$res==0){
$time=time()+1800;
mysql_query("INSERT INTO
`table_vip` SET
`nick` = '
$voteChar',
`tip` = 'bronza',
`time` = '
$time'");
}else{
$nk=$rs[time]+1800;
mysql_query("UPDATE `table_vip` SET `time` = '$nk' WHERE `nick` = '$voteChar'");}
$time = date("H:i d.m.y");
mysql_query("INSERT INTO `msg_r` SET `user_from` = 'Sistema', `user_to` = '$voteChar', `time` = '$time', `read` = 1, `mail_msg` = 'Vy podpisany na Bronzoviy Vip akkaynt na 30 minyt za golosovanie na vigre.su.'");}







}
return 
true;
}



function 
vgrInt_deliverBonusInit()
{
try
{
vgrInt_openGameSQLConnection();
}
catch (
Exception $e)
{
vgrInt_printMessage(null, VGR_INT_MESSAGE_WARN, $e->getMessage());
}
}


function 
vgrInt_deliverBonusDeinit()
{
vgrInt_closeGameSQLConnection();
}

?>
Онлайн: 1
Реклама