Файл: sellrukvesh.php
Строк: 78
<?php
include_once("files/dop.php");
switch($_GET[go]){
default:
$id=abs(intval($_GET[id]));
echo "<form action="sellrukvesh.php?&go=go&name=$name&id=$id" method="post"><small>Сколько?:</small><br/>";
echo "<input name="kol" maxlength="10" title="*N" emptyok="true"/><br/>";
echo "<small>Цена за 1 штуку:</small><br/>";
echo "<input name="cena" maxlength="10" title="*N" emptyok="true"/><br/>";
echo '<input type="submit" value="Продать!" /></form>';
break;
case 'go':
$id = htmlspecialchars(stripslashes($id));
$cena = htmlspecialchars(stripslashes($cena));
$text = htmlspecialchars(stripslashes($_POST[text]));
if(eregi("[^0-9]",$cena)){echo"<small>Вводите число, а не буквы!</small>"; include_once"files/down.php"; exit;}
$file = @file("data/item/$log.dat");
$file = array_reverse($file);
$data = explode(":||:",$file[$id]);
if(empty($cena)){echo"<small>Вы не ввели цену товара.</small>"; include_once"files/down.php"; exit;}
$qi = mysql_query("SELECT * from `item` WHERE `uda7`='".$log."' and `id`='".$id."' ");
while($row=mysql_fetch_array($qi)){
if($row['uda4']==$udata12){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata11){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata10){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata13){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata40){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata45){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata46){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata84){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata81){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata80){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata79){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata78){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']==$udata77){echo"<small>Одетую вещь продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']=="Olimpiad Medal"){echo"<small>Медали продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row['uda4']=="Fish"){echo"<small>Рыбу продать нельзя.</small>"; include_once"files/down.php";exit;}
if($row[uda3]<"$kol"){echo"У вас стоко нет вещей!"; include_once"files/down.php"; exit;}
mysql_query("INSERT INTO `sell` VALUES ('', '$row[uda0]', '$row[uda1]', '$row[uda2]' , '$kol' , '$row[uda4]' , '$row[uda5]' , '$row[uda6]' , '$row[uda7]', '$cena', '$kol' )") or die(mysql_error());
echo"<small>Вещь выставленна на продажу.<br/><a href="sellruktime.php?">Продолжить</a></small>";
}
break;
}
include_once"files/down.php";
?>