- ";
foreach($arr['response']['docs'] as $item) {
echo "
- " . $item['teaserTitle_str'] . "
" . $item['teaserText_str'] . "
" . $item['teaserFDate_str'] . "
";
}
echo "
";
if($currentpage != 1){
$previouspage = (($currentpage -1)*10)-10;
echo "«";
};
if($totalpages < 10){
for ($i = 1; $i <= $totalpages; $i++) {
$itemstart = ($i*10)-10;
echo "" . $i . "";
}
}else{
if ($currentpage >= 5){
echo "...";
for ($i = ($currentpage - 4); $i < $currentpage ; $i++) {
$itemstart = ($i*10)-10;
echo "" . $i . "";
}
}
else{
for ($i = 1; $i < $currentpage ; $i++) {
$itemstart = ($i*10)-10;
echo "" . $i . "";
}
}
echo "" . $currentpage . "";
if ($currentpage >= ($totalpages-4)){
if ($currentpage != $totalpages){
for ($i = ($currentpage +1); $i <= $totalpages ; $i++) {
$itemstart = ($i*10)-10;
echo "" . $i . "";
}
}
}
else{
for ($i = ($currentpage +1); $i <= ($currentpage +4) ; $i++) {
$itemstart = ($i*10)-10;
echo "" . $i . "";
}
echo "...";
}
};
if($currentpage != $totalpages){
$nextpage = (($currentpage + 1)*10)-10;
echo "»";
};
echo "
";
};
}
else{
echo "Zu dem Suchbegriff '" . $query . "' konnten wir leider keine Seiten finden.";
};
?>