<link rel="stylesheet" type="text/css" href="style.css">
<?
include("forb.php");
$i = 0;
$sql = "SELECT id FROM artikel";
$query = mysql_query($sql);
$num = mysql_num_rows($query);
$average = $num/10;
$pages = ceil($average);
$page_number = 0;
while ($page_number < $pages)
	{
	$test = $pages-1;
	$page_number++;
	$show_number = $page_number*10-10;
	}

?>
<?php
include('forb.php');
$antal1 = mysql_query("SELECT * FROM artikel ORDER BY id DESC") or die(mysql_error());
$antal = mysql_num_rows($antal1);
print "Der er ialt skrevet <b>$antal</b> artikel/artikler på NsYoung<hr>";
$hent_beskeder = mysql_query("SELECT * FROM artikel ORDER BY id DESC") or die(mysql_error());
while($vis = mysql_fetch_array($hent_beskeder)) {
?>

<b><?php print"$vis[overskrift]";?></b> - <a href="se2.php?id=<?php print"$vis[id]";?>">(Læs artiklen!)</a>
<TABLE cellSpacing=0 cellPadding=0 width="500" border=0>
  <TBODY>
  <TR>
    <TD 
    style="float left">
    <TD align=left width="500"><font size="2"></b><?php
$wordwrap = wordwrap($vis[artikel],50, " <br />\n");
$wordwrap = substr($wordwrap,0,150);
$wordwrap = str_replace("<","[",$wordwrap);
$wordwrap = str_replace(">","]",$wordwrap);

echo $wordwrap;
?>... </TD></TR></TBODY></TABLE>
Artiklen er skrevet af <b><? echo "$vis[skrevet_af]";?></b></b> - d. <?php echo "$vis[dato]"; ?>
<HR>
<?
}
?><br>