Er zijn geen referenties '".$_REQUEST['type']."'.
"; } else { // work out the pager values $pager = Pager::getPagerData($total, $limit, $page); $offset = $pager->offset; $limit = $pager->limit; $page = $pager->page; db_connect(); $query = "SELECT naam,plaats,opp,id,type FROM referenties WHERE type='".$_REQUEST['type']."' order by naam limit $offset, $limit"; $result = mysql_query($query) or die ("Fout bij opzoeken: ".mysql_error()); $teller = 0; while($data = mysql_fetch_array($result)) { $query1 = "SELECT filename FROM fotos where id_ref='".$data['id']."'"; $result1 = mysql_query($query1) or die ("Fout bij opzoeken: ".mysql_error()); $data1 = mysql_fetch_array($result1); if(empty($data1['filename'])) { $img = "noImg.jpg"; } else { $img = $data1['filename']; } ?>
// output paging system (could also do it before we output the page content)
if ($page == 1) { // this is the first page - there is no previous page
echo "";
} else { // not the first page, link to the previous page
echo "< Vorige";
}
for ($i = 1; $i <= $pager->numPages; $i++) {
echo " ";
if ($i == $pager->page) {
echo "$i";
} else {
echo "$i";
}
}
if ($page == $pager->numPages) { // this is the last page - there is no next page
echo " ";
} else { // not the last page, link to the next page
echo " Volgende >";
}
}
?>
} else {
db_connect();
$query = "SELECT text FROM deminco";
$result = mysql_query($query) or die ("Fout bij opzoeken: ".mysql_error());
$data = mysql_fetch_array($result);
db_disconnect();
?>
echo nl2br(htmlentities(stripPostSlashes($data['text'])));
?>
}
?>