Phantom Posted June 1, 2009 Posted June 1, 2009 I have problem with item pic mod : I need to do this Find: print "<table width=75% class='table' cellspacing='1'><tr style='background: gray;'><th colspan=2>[b]Looking up info on {$id['itmname']}[/b]</th></tr><tr bgcolor=#dfdfdf><td colspan=2>The [b]{$id['itmname']}[/b] is a/an {$id['itmtypename']} Item - [b]{$id['itmdesc']}[/b]</th><tr style='background: gray;'><th colspan=2>Item Info</th></tr><tr style='background:gray'><th>Item Buy Price</th><th>Item Sell Price</th></tr><tr><td>"; Replace With : if($id['itmpic']) { $itmpic = "<tr style='background: gray;'><td colspan='2' style='text-align: center;'>[img=itmpics/".$id[]</td></tr>"; } print "<table width=75% class='table' cellspacing='1'><tr style='background: gray;'><th colspan=2>[b]Looking up info on {$id['itmname']}[/b]</th></tr>$itmpic<tr bgcolor=#dfdfdf><td colspan=2>The [b]{$id['itmname']}[/b] is a/an {$id['itmtypename']} Item - [b]{$id['itmdesc']}[/b]</th><tr style='background: gray;'><th colspan=2>Item Info</th></tr><tr style='background:gray'><th>Item Buy Price</th><th>Item Sell Price</th></tr><tr><td>"; can someone do it to my code Here is it : <?php include "globals.php"; //look up item $_GET['ID'] = abs((int) $_GET['ID']); $itmid=$_GET['ID']; if(!$itmid) { print "Invalid item ID"; } else { $q=$db->query("SELECT i.*,it.* FROM items i LEFT JOIN itemtypes it ON i.itmtype=itmtypeid WHERE i.itmid=$itmid LIMIT 1"); if (!$db->num_rows($q)) { print "Invalid item ID"; } else { $id=$db->fetch_row($q); if($id['itmpic']) { $itmpic = "<tr style='background: gray;'><td colspan='2' style='text-align: center;'>[img=itmpics/".$id[]</td></tr>"; } print "<table width=75% class='table' cellspacing='1'><tr style='background: gray;'><th colspan=2>[b]Looking up info on {$id['itmname']}[/b]</th></tr>$itmpic<tr bgcolor=#dfdfdf><td colspan=2>The [b]{$id['itmname']}[/b] is a/an {$id['itmtypename']} Item - [b]{$id['itmdesc']}[/b]</th><tr style='background: gray;'><th colspan=2>Item Info</th></tr><tr style='background:gray'><th>Item Buy Price</th><th>Item Sell Price</th></tr><tr><td>"; if($id['itmbuyprice']) { print money_formatter($id['itmbuyprice']); } else { print "N/A"; } print "</td><td>"; if($id['itmsellprice']) { print money_formatter($id['itmsellprice']); } else { print "N/A</td></tr></table>"; } } } $h->endpage(); ?> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.