Jump to content
MakeWebGames

Item pic in inventory wont display?


HUSTLE HARD

Recommended Posts

Okay for some reason my equipped item does not display, how ever if unequipepd it will display...

can some one help me please..

 

<?php

    include_once "globals.php";
$q=$db->query("SELECT * FROM items WHERE itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']}, {$ir['equip_armor']})");


echo"
    <div class='equipped'>
";


while($r=$db->fetch_row($q))
{
$equip[$r['itmid']]=$r;
}
echo "<br /><div class='primary'>";
if($equip[$ir['equip_primary']]['itmid'])
{
print' <img src="'.$equip[$ir['equip_primary']]['itmname'].'"> <br /><a href="unequip.php?type=equip_primary">Unequip Item</a>';
}
else
{
echo "No primary weapon!";
}
echo"</div>";




echo "<div class='armour'>";
if($equip[$ir['equip_armor']]['itmid'])
{
print' <img src="'.$equip[$ir['equip_armour']]['itmid'].'"> <a href="unequip.php?type=equip_armor">Unequip Item</a>';
}
else
{
echo "No Armour!";
}

echo"</div>";







echo "<div class='secondary'>";
if($equip[$ir['equip_secondary']]['itmid'])
{
print' <img src="'.$equip[$ir['equip_secondary']]['itmname'].'"> <br /> <a href="unequip.php?type=equip_secondary">Unequip Item</a>';
}
else
{
echo "No Secondary weapon!";
}
echo"</div></div>";





echo "
<h3>My Inventory</h3>
<a href='merge.php'>>Merge your inventory!</a><br><br />";
$inv=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC");
if ($db->num_rows($inv) == 0)
{
echo "<b>You have no items!</b>
";
}
else
{
echo "<b>Your items are listed below.</b><br />
     <style type='text/css'>
#h {
background-color:#333;
}
#table{
background-color:#444;
}
</style>



<table width=95% class=table border='0' cellspacing='1'>
<tr>
<td id='table'><font style=color:white;><b>Item</b></font></td>
<td id='table'><font style=color:white;><b>Sell Value</b></font></td>
<td id='table'><font style=color:white;><b>Total Sell Value</b></font></td>
<td id='table'><font style=color:white;><b>Links</b></font></td>
</tr>";
$lt="";





while($i=$db->fetch_row($inv))
{

$usershop=$db->query("select * from usershops where userid=$userid");
if(mysql_num_rows($usershop)!=0)
{
$addtoshop="[<a href='addtoshop.php?ID={$i['inv_id']}'>Put in Shop</a>]";
}


if($lt!=$i['itmtypename'])
{
$lt=$i['itmtypename'];
echo "\n<tr><td colspan=4 id='h'><font style=color:white;><b>{$lt}</b></font></td></tr>";
}
echo '<tr><td><img src="'.$i['itmname'].'">';
if ($i['inv_qty'] > 1)
{
echo " x{$i['inv_qty']}";
}
echo "</td><td> \$ ".number_format($i['itmsellprice'])."</td><td>";
echo "$".number_format($i['itmsellprice']*$i['inv_qty']);
echo "</td><td>[<a href='iteminfo.php?ID={$i['itmid']}'>Info</a>] [<a href='itemsend.php?ID={$i['inv_id']}'>Send</a>] [<a href='itemsell.php?ID={$i['inv_id']}'>Sell</a>] [<a href='imadd.php?ID={$i['inv_id']}'>Add To Market</a>]";
if($i['itmtype'] == 9)
{
print " [<a href='dogattack.php?ID={$i['inv_id']}'>Dog attack</a>]";
}

if($i['itmid']=='3')
           {
           print " [<a href='russianroulette.php'>Play First Blood</a>]";
           }

print"$addtoshop";
if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) {
echo " [<a href='itemuse.php?ID={$i['inv_id']}'>Use</a>]";
}
if($i['weapon'])
{
echo " [<a href='equip_weapon.php?ID={$i['inv_id']}'>Equip as Weapon</a>]";
}
if($i['armor'])
{
echo " [<a href='equip_armor.php?ID={$i['inv_id']}'>Equip as Armor</a>]";
}
echo "</td></tr>";
}
echo "</table>";

}
$h->endpage();
?>


Link to comment
Share on other sites

what does that meanm? you mean .png .jpeg?

my image is in the item folder so would it be something like this

<img src="items/'.$equip[$ir['equip_armour']]['itmid'].'.png">

^^ i tried it did not work

See if the image actually exists. Right click > copy image URL > open new tab > paste > compare result with images

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...