| Code: : |
| if( eregi( "block-Auktion_List.php", $PHP_SELF)) { Header("Location: index.php"); die(); } global $prefix, $db; $result = $db->sql_query("SELECT cid,title,price,bids,start,end,picture from ".$prefix."_auction_items order by cid"); while(list($cid,$title,$price,$bids,$start,$end,$picture) = $db->sql_fetchrows($result)) { $content.="<a href=\"modules.php?name=auktion&file=viewitem&item=$cid">$title</a>"; $content.="<img src=modules/auktion/pictures/$picture width=100 height=100 border=0>"; $content.="<td align=\"right\">$price</td>"; $content.="<td align=\"center\">$bids</td>"; $content.="<td align=\"right\">".timediff($end)."</td><tr>"; } ?> |
| Code: : |
| // I Assume you have the <?PHP at the start of the file, just that you included the end ?> and not the start <?PHP // Not suposed to use the $PHP_SELF variable anymore as it was droped by php, replaced with what i have below if( eregi( "block-Auktion_List.php", $_SERVER['PHP_SELF'])) { header("Location: index.php"); die(); } global $prefix, $db; $result = $db -> sql_query("SELECT cid,title,price,bids,start,end,picture from ".$prefix."_auction_items order by cid"); while(list($cid,$title,$price,$bids,$start,$end,$picture) = $db -> sql_fetchrows($result)) { $content .= "<a href=\"modules.php?name=auktion&file=viewitem&item=$cid\">$title</a>"; // Had " without \ before > $content .= "<img src=modules/auktion/pictures/$picture width=100 height=100 border=0>"; $content .= "<td align=\"right\">$price</td>"; $content .= "<td align=\"center\">$bids</td>"; $content .= "<td align=\"right\">".timediff($end)."</td><tr>"; } ?> |