$sql2")); $aantalvelden = mysql_num_fields($result2); for($i = 0; $i < $aantalvelden; $i++) { $veldtype[$i] = mysql_field_type($result2, $i); $tableheader[$i] = mysql_field_name($result2, $i); if($tableheaderalias[$i] == "") { $tableheaderalias[$i] = mysql_field_name($result2, $i); } // IF ALIAS } // AANTAL VELDEN // $WHERE GEGEVENS VOOR SQL3 if ($form_zoek != "") { $where = "WHERE\n"; for($i = 0; $i < $aantalvelden; $i++) { $where .= " $tableheader[$i] LIKE '%$form_zoek%'"; if ($i < $aantalvelden-1) { $where .= "\nOR\n"; } } // AANTAL VELDEN } // ALS form_zoek != "" // VOLGORDE IF ($set_order != ""){$order = "ORDER BY $set_order";} // TOTAAL AANTAL GEZOCHTE RECORDS: $sql1 = "SELECT * from $table_name $where"; $result1 = @mysql_query($sql1,$connection) or die(report_error(__FILE__,__LINE__,mysql_errno(),mysql_error(),"\$sql1 = $sql1")); $totaantal = mysql_numrows($result1); // DE ZOEK SQL $sql3 = " SELECT * FROM $table_name $where $order LIMIT $van, $plus;"; // TEST SQL // $sql3 = "SELECT * from $table_name $order LIMIT 1, 10"; $result3 = @mysql_query($sql3,$connection) or die(report_error(__FILE__,__LINE__,mysql_errno(),mysql_error(),"\$sql3 = $sql3")); $i=0; while ($row = mysql_fetch_array($result3)) { $gegevens[$i]= $row; $table = "\n"; $i++; } // HEADERS if ($headers == "1") { $theader .= "\n"; if ($tellertje == "1"){$theader .= "\n";} for($cteller = 0; $cteller <= count($tableheader)-1; $cteller++) { if (!in_array($cteller,$cols)) { $theader .= "\t\n"; } // DIE HEADER WILLEN WE NIET ZIEN } $theader .= "\n"; } $table .= $theader; // VELDTYPE if ($types == "1") { $table .= "\n"; if ($tellertje == "1"){$table .= "\n";} for($cteller = 0; $cteller <= count($tableheader)-1; $cteller++) { if (!in_array($cteller,$cols)) { $table .= "\t\n"; } // die Col willen we niet zien } $table .= "\n"; } // ##################### // GEGEVENS: // ROWS for($rteller = 0; $rteller <= count($gegevens)-1 ; $rteller++) { // COLS $toggle = ($toggle) ? 0:1; $css = ($toggle) ? "even":"oneven"; $table .= "\n"; if ($tellertje == "1"){ $vanaf = $vanaf+1; $table .= "\n";} for($cteller = 0; $cteller <= count($tableheader)-1; $cteller++) { if (!in_array($cteller,$cols)) { if ($veldtype[$cteller] == "blob" ) {$align = " align=\"justify\""; $gegevens[$rteller][$cteller] = nl2br($gegevens[$rteller][$cteller]); } // FUNCTIE TELLER AANROEPEN teller($van, $plus, $totaantal ); if ($vorige >= 0) { $prev=" "; } // prev if ($volgende < $totaantal) { $next = " "; } // next if ($totaantal != "0"){ $boventeller ="
$prev $curvan t/m $curtm van $totaantal $next
"; $onderteller ="
$prev $curvan t/m $curtm van $totaantal $next
"; } else { $teller = "
Geen zoekresultaten gevonden
"; $lijst = ""; } // GEGEVEN IN TD ZETTEN $table .= "\t\n"; } // ALLEEN DE GESELECTEERDE COLS } // FOR ROWS $table .= "\n"; // OM DE X ROWS HEADER HERHALEN if ($herhaal == 1) { if ((($rteller+1)/$interval)== intval(($rteller+1)/$interval)) { $table .= $theader; } } } // FOR COLLS $table .= "
#{$tableheaderalias[$cteller]}
TYPE:($cteller){$veldtype[$cteller]}
$vanaf
{$gegevens[$rteller][$cteller]}
\n"; ?> <? echo $title ?>