"; print ""; if(!isset($_GET['start'])) { $start=0; } else { $start=$_GET['start']; } $numentries='10'; //Number of Entries per page $order="SELECT * from " . $tablename . " where Archief='$archief' order by Datum DESC"; $order2=mysql_query($order) or die(mysql_error()); $d=0; $f=0; $curpage=0; $g=1+$d/$numentries; $num=mysql_num_rows($order2); ?>

Er is 1 bericht in ";} else {print "Er zijn $num berichten in ";} if($archief=="J") { print "dit archief. Klik hier voor de actuele berichten. "; } else { print "deze rubriek. Zie het archief voor oude berichten. "; } print "

"; print ""; $prev=$start-$numentries; $next=$start+$numentries; $paginaregel="Pagina: "; if($start>=$numentries) { $paginaregel.="<< "; } while($order3=mysql_fetch_array($order2)) { if($f>=$start-10*$numentries&&$f<=$start+10*$numentries) { if($f%$numentries==0) { $a=$g; $b=$next/10; if($a==$b) { $paginaregel.="$g "; } else { $paginaregel.="$g "; } } } $d=$d+1; $g=1+$d/$numentries; $f++; } if($start<=$num-$numentries) { $paginaregel.=">>"; } print "$paginaregel

"; $nwsvar="Select * FROM " . $tablename . " where Archief='$archief' order by Datum DESC LIMIT " . $start . ", $numentries"; //retrieve entries from sql $row=mysql_query($nwsvar); while($nwsvalues=mysql_fetch_array($row)) { $nwsvalues[ID]=htmlspecialchars($nwsvalues[ID]); $nwsvalues[Txt1]=$nwsvalues[Txt1]; $nwsvalues[Txt2]=$nwsvalues[Txt2]; $nwsvalues[Txt3]=$nwsvalues[Txt3]; $nwsvalues[Txt4]=$nwsvalues[Txt4]; $nwsvalues[Txt5]=$nwsvalues[Txt5]; $nwsvalues[Txt6]=$nwsvalues[Txt6]; $nwsvalues[Txt7]=$nwsvalues[Txt7]; $nwsvalues[Kop]=$nwsvalues[Kop]; $nwsvalues[Datum]=$nwsvalues[Datum]; $nwsvalues[Loc]=strtoupper($nwsvalues[Loc]); $nwsvalues[Bron]=$nwsvalues[Bron]; $Picdesc2="$nwsvalues[Kop] - Klik voor bericht"; print ""; } print "
"; if($nwsvalues[PicURL]<>"") { print ""; print "$Picdesc2"; } $displaydatum=substr($nwsvalues[Datum], 8, 2); if ($displaydatum<>'') {$displaydatum.='-';} $displaydatum.=substr($nwsvalues[Datum], 5, 2); if ($displaydatum<>'') {$displaydatum.='-';} $displaydatum.=substr($nwsvalues[Datum], 0, 4); $displaydatum=str_replace ('--', '-', $displaydatum); $displaydatum=str_replace (' ', '', $displaydatum); print "$nwsvalues[Kop], $displaydatum
"; $nwsvalues[Txt1]=str_replace ('
', ' ', $nwsvalues[Txt1]); $nwsvalues[Txt2]=str_replace ('
', ' ', $nwsvalues[Txt2]); $nwsvalues[Txt3]=str_replace ('
', ' ', $nwsvalues[Txt3]); $nwsvalues[Txt4]=str_replace ('
', ' ', $nwsvalues[Txt4]); $nwsvalues[Txt5]=str_replace ('
', ' ', $nwsvalues[Txt5]); $nwsvalues[Txt6]=str_replace ('
', ' ', $nwsvalues[Txt6]); $nwsvalues[Txt7]=str_replace ('
', ' ', $nwsvalues[Txt7]); if ($nwsvalues[Loc]=="") { $Txt=''; } else { $Txt="$nwsvalues[Loc] - "; } $Txt.=$nwsvalues[Txt1]; $Txt.=' '; $Txt.=$nwsvalues[Txt2]; $Txt.=' '; $Txt.=$nwsvalues[Txt3]; $Txt.=' '; $Txt.=$nwsvalues[Txt4]; $Txt.=' '; $Txt.=$nwsvalues[Txt5]; $Txt.=' '; $Txt.=$nwsvalues[Txt6]; $Txt.=' '; $Txt.=$nwsvalues[Txt7]; $Txt=substr($Txt,0,200); print "$Txt...  
"; $order="SELECT * from Reacties_berichten where parent_ID=$nwsvalues[ID]"; $order2=mysql_query($order) or die(mysql_error()); $num=mysql_num_rows($order2); ?>
 Lees verder     $num reactie"; } else { print " $num reacties"; } ?>
"; print "
$paginaregel
"; ?>