Файл: modules/arena_item_rand.php
Строк: 12
<?php
$item_rand = rand(1,10);
if($item_rand == 10){
$item = mysql_fetch_assoc(mysql_query("SELECT * FROM `item` WHERE `skill` = '1' OR `skill` = '10' ORDER BY RAND() LIMIT 1"));
if($item){
$inv = mysql_result(mysql_query("SELECT COUNT(*) FROM `inv` WHERE `odeta` = 'net' AND `id_user` = '$myID'"),0);
if($inv + 1 < 21){
mysql_query("INSERT INTO `inv` SET `id_user` = '$myID', `name` = '$item[name]', `str` = '$item[str]', `def` = '$item[def]', `health` = '$item[health]', `tip` = '$item[tip]', `skill` = '$item[skill]', `odeta` = 'net' , `item` = '$item[item]'");
}
}
}
?>