== "Weapons") {
$shopname = "If its Weapons you need your here";
$from = "items";
$type = "weapon > '0'";
$show = 100;
}
elseif ($_GET
== "Armour") {
$shopname = "Our Best Armour Shop";
$from = "items";
$type = "armor > '0'";
$show = 100;
}
elseif ($_GET
== "Medical") {
$shopname = "Our Best Medical Supplies Shop";
$from = "items";
$type = "itmtype = 'ID OF ITEM TYPES FOR MEDICAL ITEMS'";
$show = 100;
}
else {
echo" this shop dont exsist
";
die();
}
$res = mysql_query("SELECT * FROM $from WHERE $type ORDER BY itmbuyprice ASC") or die(mysql_error());
echo "$shopname";
echo "
Img
Item
Price
Buy";
while ($row = mysql_fetch_array($res)) {
if ($row[itmbuyable] == 0)
continue;
$rfc = mt_rand(0, 100);
if ($show < $rfc)
continue;
if (!$i) {
$bg = "#ffffff";
$i = 1;
}
elseif ($i) {
$bg = "#ececec";
$i = 0;
}
$imageuri = $row[itempic];
if (!$imageuri)
$imageuri = "images/items/default.jpg";
echo "
if ($from == "items")
echo "item";
else
echo "weapon";
echo "info.php?ID=$row[itmid]\">$row[itmname]
$". number_format($row[itmbuyprice]) ."
if ($from == "items")
echo "buy";
else
echo "buy";
echo ".php?id=$row[itmid]\">Buy";
}
echo "
";
$h->endpage();
?>
I use the original shops.php file.
When i replace with this code it says "this shop dont exsist"
I also use just links in explore for the shops (i.e: shops.php?shop=1 wich states for weapons, shops.php?shop=2 wich states for armors and so on...)
Sry Illusions i bumped at code :)
@Kabbz the code gives errors no mather what i change to it but, yes i want "shops.php?shop=1" to display the 100 items in pages (4 pages with 25 items per page)
thx all for learning me :)