$jml_page = intval($jmlrec/$max_entry_per_page); $sisa = $jmlrec%$max_entry_per_page; if ($sisa > 0) $jml_page++; $no = $page*$max_entry_per_page-$max_entry_per_page; if ($jmlrec == 0) echo "Det finns inga inlägg än."; $w = 0; //--Color for ($i=0; $i<$max_entry_per_page; $i++) { $no++; $recno = $no-1; if (isset($record[$recno])) { $row = explode("|~|",$record[$recno]); if ($w==0) { $warna = $table_content_1a; $warna2 = $table_content_1b; $w=1; } else { $warna = $table_content_2a; $warna2 = $table_content_2b; $w=0; } echo "
$row[4] | $row[2] $row[3] |
$row[6] | ta bort |
"; } //--end if } //--end for if ($jml_page > 1) { if ($page <> 1) echo "[Top] "; else echo "[Top] "; echo "Page # "; if ($jml_page > 10) { if ($page < 5) { $start = 1; $stop = 10; } elseif ($jml_page - $page < 5) { $start = $jml_page - 9; $stop = $jml_page; } else { $start = $page-4; $stop = $page+5; } if ($start <> 1) echo "... "; for ($p=$start; $p<=$stop; $p++) { if ($p == $page) echo "$p "; else echo "$p "; } if ($stop <> $jml_page) echo "... "; echo "av $jml_page "; } else { for ($p=1; $p<=$jml_page; $p++) { if ($p == $page) echo "$p "; else echo "$p "; } } if ($page <> $jml_page) echo "[Bottom]"; else echo "[bottom]"; } else echo "
Sida #1 av 1"; ?>