Файл: ok.php
Строк: 233
<?php
require'../config.php';
$align='left';
$title='Дикая охота-Выстрел';
aut();
head();
who_add(0,'enter');
if(!isset($user)){
header("Location:/aut.php");
break;
}
$arr=mysql_fetch_array(mysql_query("SELECT * FROM `oxota` WHERE `ids`='$user[id]'"));
$ss=rand(1,9);
################################################################################
$flood = mysql_fetch_assoc(mysql_query("SELECT `time` FROM `oxota` WHERE `ids` = '".$user['id']."' order by `time` desc limit 1"));
if($flood['time']<(time()-10))
{
if($arr['patron']<=0){
echo "У вас закончились патроны!";
}else{
// Это вывод зверей с 1 локации....
if ($arr['lok']==1)
{
if ($ss==1) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_a`=`zver_a`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/1r/1.png' alt='kaktuz'/><br /><br /></td></table></center>";
}
if ($ss==2) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_b`=`zver_b`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/1r/2.png' alt='Кот'/><br /><br /></td></table></center>";
}
if ($ss==3) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_c`=`zver_c`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/1r/3.png' alt='Обезъяна'/><br /><br /></td></table></center>";
}
if ($ss==4) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_d`=`zver_d`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/1r/4.png' alt='Бегемот'/><br /><br /></td></table></center>";
}
if ($ss==5) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_e`=`zver_e`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/1r/5.png' alt='------'/><br /><br /></td></table></center>";
}
if ($ss==6) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_f`=`zver_f`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/1r/6.png' alt='Морт'/><br /><br /></td></table></center>";
}
if ($ss==7) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_h`=`zver_h`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/1r/7.png' alt='Морт'/><br /><br /></td></table></center>";
}
if ($ss==8) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_i`=`zver_i`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/1r/8.png' alt='Морт'/><br /><br /></td></table></center>";
}
if ($ss==9) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_j`=`zver_j`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/1r/9.png' alt='Морт'/><br /><br /></td></table></center>";
}
echo '<form action="?" method="POST"><input type="submit" name="" value="Стрелять" /></form>';
}
// Это вывод зверей с 2 локации....
if ($arr['lok']==2)
{
if ($ss==1) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_a`=`zver_a`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/2r/1.png' alt='kaktuz'/><br /><br /></td></table></center>";
}
if ($ss==2) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_b`=`zver_b`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/2r/2.png' alt='Кот'/><br /><br /></td></table></center>";
}
if ($ss==3) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_c`=`zver_c`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/2r/3.png' alt='Обезъяна'/><br /><br /></td></table></center>";
}
if ($ss==4) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_d`=`zver_d`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/2r/4.png' alt='Бегемот'/><br /><br /></td></table></center>";
}
if ($ss==5) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_e`=`zver_e`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/2r/5.png' alt='------'/><br /><br /></td></table></center>";
}
if ($ss==6) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_f`=`zver_f`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/2r/6.png' alt='Морт'/><br /><br /></td></table></center>";
}
if ($ss==7) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_h`=`zver_h`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/2r/7.png' alt='Морт'/><br /><br /></td></table></center>";
}
if ($ss==8) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_i`=`zver_i`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/2r/8.png' alt='Морт'/><br /><br /></td></table></center>";
}
if ($ss==9) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_j`=`zver_j`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/2r/9.png' alt='Морт'/><br /><br /></td></table></center>";
}
echo '<form action="?" method="POST"><input type="submit" name="" value="Стрелять" /></form>';
}
// Это вывод зверей с 3 локации....
if ($arr['lok']==3)
{
if ($ss==1) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_a`=`zver_a`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/3r/1.png' alt='kaktuz'/><br /><br /></td></table></center>";
}
if ($ss==2) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_b`=`zver_b`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/3r/2.png' alt='Кот'/><br /><br /></td></table></center>";
}
if ($ss==3) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_c`=`zver_c`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/3r/3.png' alt='Обезъяна'/><br /><br /></td></table></center>";
}
if ($ss==4) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_d`=`zver_d`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/3r/4.png' alt='Бегемот'/><br /><br /></td></table></center>";
}
if ($ss==5) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_e`=`zver_e`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/3r/5.png' alt='------'/><br /><br /></td></table></center>";
}
if ($ss==6) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_f`=`zver_f`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/3r/6.png' alt='Морт'/><br /><br /></td></table></center>";
}
if ($ss==7) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_h`=`zver_h`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/3r/7.png' alt='Морт'/><br /><br /></td></table></center>";
}
if ($ss==8) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_i`=`zver_i`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/3r/8.png' alt='Морт'/><br /><br /></td></table></center>";
}
if ($ss==9) {
mysql_query("UPDATE `oxota` SET `time` = '".time()."' WHERE `ids` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `oxota` SET `zvereu_ubito`=`zvereu_ubito`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `zver_j`=`zver_j`+'1' WHERE `ids`='".$user['id']."'");
mysql_query("UPDATE `oxota` SET `patron`=`patron`-'1' WHERE `ids`='".$user['id']."'");
echo '<center><table width="162" height="162" style="color: white; background-image: url(zver/kroog.png);" border="0">';
echo "<td valign='bottom'><img src='zver/3r/9.png' alt='Морт'/><br /><br /></td></table></center>";
}
echo '<form action="?" method="POST"><input type="submit" name="" value="Стрелять" /></form>';
}
}
}else{echo '<div class="err">Часто стреляешь! Можно стрелять раз в 10 секунд , дуло нагревается!</div>';}
echo "<div class='aut'><a href='index.php?id=$user[id]'>Назад</a></div>";
foot();
?>