rendered paste body<?PHP$pagetemplate = "zoekresultaten.html";include("regulator.php");if ($_GET['zoeken_op']){ $_GET['zoek_op'] = $_GET['zoeken_op'];}$template->replace('zoekwoord',htmlspecialchars($_GET['zoek_op']));$template->replace('number_of_results',mysql_result(mysql_query("SELECT count(1) FROM fotos WHERE MATCH (titel,omschrijving,tags) AGAINST ('".mysql_real_escape_string($_GET['zoek_op'],$connectie)."' IN BOOLEAN MODE) LIMIT 0,1",$connectie),0,0));$pagina = $_GET['pagina']*10;if ($_GET['orderby'] == 1){ $orderby = "f.id";}elseif ($_GET['orderby'] == 2){ $orderby = "MATCH (f.titel,f.omschrijving,f.tags) AGAINST ('".mysql_real_escape_string($_GET['zoek_op'],$connectie)."' IN BOOLEAN MODE)";}elseif ($_GET['orderby'] == 3){ $orderby = "f.views";}elseif (!isset($_GET['orderby'])){ $orderby = "f.id";}$query = mysql_query("SELECT f.bestandsnaam, u.username, f.toegevoegd, f.tags, f.bestandFROM fotos AS f, filesystem AS g, users AS u WHERE MATCH (f.titel,f.omschrijving,f.tags) AGAINST ('".mysql_real_escape_string($_GET['zoek_op'],$connectie)."' IN BOOLEAN MODE) AND f.id=g.fotoAND u.id=g.uidORDER BY ".$orerby." DESCLIMIT ".$pagina.",10",$connectie);$i = 1;$temphtml = "";$template2 = new template();$template2->load("zoekresultaten_resultaat.html");$j = 0;while ($array = mysql_fetch_array($query)){ if ($i == 3) { $temphtml .= $template2->return_html(); $template2 = new template(); $template2->load("zoekresultaten_resultaat.html"); $i = 1; $j++; } $template2->replace('foto_title'.$i,$array[0]); $template2->replace('foto_screenname'.$i,$array[1]); $template2->replace('foto_upload_date'.$i,$array[2]); $tags = explode(",",$array[3]); $taghtml = ''; foreach ($tags AS $tag) { $taghtml .= '<a href="zoekresultaten.php?zoek_op='.trim(htmlspecialchars($tag)).'&zoekoptie=tags" class="link_Standaard">'.trim(htmlspecialchars($tag)).'</a> '; } $template2->replace('tags'.$i,$taghtml); $template2->replace('foto_thumb'.$i,'http://thumbs.imgme.nl/'.$array[4]); $template2->replace('last',$j); $i++;}if ($i == 2){ $template2->replace('foto_screenname2','dit vak deleten'); $template->replace('javascriptje','<script type="text/javascript">document.getElementById("vak2_'.$j.'").innerHTML = "";</script>');}else{ $template->replace('javascriptje','');}$temphtml .= $template2->return_html();$template->replace('resultaten',$temphtml);$template->parse();?>