<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">

<head><meta http-equiv='content-type' content='application/xhtml+xml; charset=windows-1251'/>
<link rel="shortcut icon" href="ico.ico" type="image/x-icon" />
<title>Джозеф</title>
<link rel="stylesheet" href="../styleN.css" type="text/css" />
</head>
<body><img src="img/al.png" alt="c" width="10" height="10"> <?echo"<a href=\"game.php?NICK=$aNickName&pass=$pass\">в игру</a><br/><a href=\"game.php?NICK=$aNickName&pass=$pass&speak=djozef\"><img src=\"img/ar.png\" alt=\"c\" width=\"10\" height=\"10\"> назад</a>";?><br/>
<br/>

<?
$count=$_POST['count'];
$bint=mysql_query("SELECT * FROM djozef_items");
while($bint2=mysql_fetch_assoc($bint)){
echo "$bint2[name_djozef_items]<br/><img src=\"$bint2[img_djozef_items]\"><br/>кол-во:".$bint2[counts_djozef_items].'<br/>'.'цена:'.$bint2[costs_djozef_items];
if($bint2[counts_djozef_items]>1){echo"
<form action=\"game.php?NICK=$NICK&pass=$pass&speak=djozef&id=dj_buy\" method=\"POST\">
<font color=\"lime\">кол-во:</font>
<br/>
<input name=\"NICK\" value=\"$NICK\" type=\"hidden\">

<input name=\"pass\" value=\"$pass\" type=\"hidden\">

<input name=\"speak\" value=\"djozef\" type=\"hidden\">

<input name=\"id\" value=\"buy\" type=\"hidden\">

<input name=\"count\" size=\"4\" maxlength=\"5\">
<br/>
<input type=\"submit\" value=\"купить\">
</form>";}
if($count>$bint2[counts_djozef_items]){echo'<div class="foot">у торговца нету такого кол-ва предметов</div>';die;}
if($count<=$bint2[counts_djozef_items]){
if($count==0 AND isset($count)){echo'<div class="foot">кол-во не может равняться 0</div>';die;}

$pr_bint=mysql_query("SELECT * FROM inv WHERE ID_USERS=\"$NICK\" AND IL_KEY=\"i.bint\"");
if(mysql_num_rows($pr_bint)>0 AND isset($count)){echo'<div class="foot">вы успешно купили '. $count.' бинт. UPDATE</div>';}
if(mysql_num_rows($pr_bint)<1 AND isset($count)){echo'<div class="foot">вы успешно купили '. $count.' бинт. INSERT</div>';}
die;}
}
die;?>

