-
Notifications
You must be signed in to change notification settings - Fork 1
/
sell.php
42 lines (40 loc) · 1.38 KB
/
sell.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?
$login=$_SESSION['login'];
$city=$db["city_game"];
$ip=$db["remote_ip"];
echo '<table width=100% cellspacing=1 cellpadding=3 class="l3">';
$item_sell=mysql_query("SELECT * FROM inv WHERE owner='".$login."' AND object_razdel='obj' AND wear=0 ORDER BY date DESC");
if(mysql_num_rows($item_sell)==0)
{
echo "<tr align=center class='l0'><td><b>Ó Âàñ íåò âåùåé, êîòîðûå ìîæíî ïðîäàòü</b></td></tr>";
}
else
{
while($query=mysql_fetch_array($item_sell))
{
$n=(!$n);
$pal_price=$query["price"];
$money_type="Çë.";
if ($query["art"])$money_type="Ïë.";
if ($query["podzemka"])$money_type="Åä.";
if (!$query["noremont"])
{
if ($query["art"]) $price1=$pal_price*1.0-($query["iznos"]*0.1);
else $price1=$pal_price*0.75-($query["iznos"]*0.1);//$price1=$pal_price;
}
else $price1=1;
if ($query["podzemka"])$price1=1;
if ($price1<0)$price1=0;
if ($query["term"]!="")$price1=0;
$price = sprintf ("%01.2f", $price1);
$db["vip"]=0;
echo "<tr class='".($n?"l0":"l1")."'>
<td width=180 valign=center align=center><img src='img/items/".$query["img"]."'><br>";
echo "<a href='#' onclick=\"prodaja('".$query["id"]."', '".$query["name"].($query["is_modified"]?" +".$query["is_modified"]:"")."');\">Ïðîäàòü çà $price $money_type</a>";
echo "</td><td valign='top'>";
show_item($db,$query);
echo "</td></tr>";
}
}
echo "</table>";
?>