30 lines
876 B
PHP
30 lines
876 B
PHP
<?
|
|
if(!defined('GAME'))
|
|
{
|
|
die();
|
|
}
|
|
|
|
if( $itm['magic_inci'] == 'secondshans' ) {
|
|
|
|
|
|
|
|
$pvr = array();
|
|
$titm = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vals` = "loto" AND `time` > '.(time()-24*60*60).' ORDER BY `time` DESC LIMIT 1'));
|
|
|
|
//Äåéñòâèå ïðè êëèêå
|
|
if( $titm==false ) {
|
|
$u->error = '<font color=red><b>Ó âàñ íåò çàäåðæêè, íåò ñìûñëà èñïîëüçîâàòü ñâèòîê.</b></font> ';
|
|
}else{
|
|
|
|
mysql_query('DELETE FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vals` = "loto" ');
|
|
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
|
|
mysql_query('DELETE FROM `items_users` WHERE `id` = '.$itm['id'].' LIMIT 1');
|
|
$u->error = '<font color=red><b>Ñâèòîê óäà÷íî èñïîëüçîâàí</b></font> ';
|
|
}
|
|
|
|
//Îòíèìàåì òàêòèêè
|
|
//$this->mintr($pl);
|
|
|
|
unset($pvr);
|
|
}
|
|
?>
|