<?php
include("menu.php");
include("forb.php");
include("check.php");
include("torv_menu.php");
$q1 = mysql_query("SELECT * FROM tj_butik ORDER BY id DESC") or die(mysql_error());
while($vis = mysql_fetch_array($q1)) {
?>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD 
    style="float:left"><img border="0" src="<?php print"$vis[billede]";?>" border="0">
    <TD align=left width="100%">
</b><b>
<?
print "$vis[navn]</b>";
?><br><?php
$wordwrap = wordwrap($vis[info],200, " <br />&nbsp;\n");

echo $wordwrap;
?><br><br>
&nbsp;Prisen er <?php print"$vis[pris]";?>, og den kræver level <?php print "$vis[kraever_level]";?>!<br>
&nbsp;Der er <?php print "$vis[lager]";?> stk. på lager!
  <br><br><a href="koeb_tj.php?id=<?php print"$vis[id]";?>">&nbsp;Køb nu</a><br>
<?php
if($vis[lager] == '0'){
print "<b><font color=red>&nbsp;* Figuren er udsolgt</font></b>";
}
?>
<?php
$admins3 = array('Ejer', 'Webmaster', 'Redaktør', 'Grafiker');
if(in_array($_SESSION[Rang], $admins3)){
print "<br><b>&nbsp;Admin</b><br><a href='slet_tj.php?id=$vis[id]'>&nbsp;Slet figuren</a><br><a href='lager-tj2.php?id=$vis[id]'>&nbsp;Sæt flere eksemplare på lager</a>";
}
?>

</TD></TR></TBODY></TABLE>
<hr>
<?
}
?>