0) { $template->set_filenames(array( 'content' => 'koverzicht.tpl') ); } else { $template->set_filenames(array( 'content' => 'overzicht.tpl') ); } $template->assign_block_vars("hoofdpagina", array('titel' => 'Overzicht')); $template->assign_block_vars("hoofdpagina_e", array()); $count = mysql_query("SELECT count(*) AS total FROM bsp_domeinen WHERE categorie != 14 AND categorie != 9 AND active = 1 AND aantallinks > 30") or die(mysql_error()); $num = mysql_fetch_object($count); $total = $num->total; $_GET[letter] = str_replace("overzicht-", "", $_GET[letter]); $_GET[letter] = str_replace(".php", "", $_GET[letter]); $query = mysql_query("SELECT domein,gdomein FROM bsp_domeinen WHERE categorie != 14 AND categorie != 9 AND active = 1".( strlen($_GET[letter]) == 1 ? " AND domein LIKE '$_GET[letter]%'" : "" )." AND aantallinks > 30 ORDER BY domein ASC") or die(mysql_error()); $per_kolom = round($total / 3); $kolommen = array('Linker', 'Middens', 'Rechters'); $col=0; $i=0; while($ob = mysql_fetch_object($query)) { if($old !== strtolower(substr($ob->domein, 0, 1))) { if($i > $per_kolom) { $col++; $i=0; } $template->assign_block_vars($kolommen[$col], array( 'letter' => substr(strtoupper($ob->domein), 0, 1) )); $old = strtolower(substr($ob->domein, 0, 1)); } $template->assign_block_vars($kolommen[$col].".domein", array( 'url' => $ob->domein, 'gdomein' => $KDOMEINEN[$ob->gdomein] )); $i++; } include('includes/footer.inc.php'); ?>