From 2ec3b3c05e535ffacb1e10a64aa62ad057499d47 Mon Sep 17 00:00:00 2001 From: Silvio Date: Mon, 16 Aug 2010 15:37:31 -0300 Subject: Adding helper classes and repetition finder --- tests/index.php | 48 +++++++++--------------------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) (limited to 'tests/index.php') diff --git a/tests/index.php b/tests/index.php index ae12134..50c36f6 100644 --- a/tests/index.php +++ b/tests/index.php @@ -2,33 +2,16 @@ /** * Cinisis - Isis db reading tool. */ -?> - - - - - - - - -
-Entry: - -
-
-form($display->form_input_text('entry')); + +// Get entry number. +$entry = CinisisHttpHelper::get_numeric_arg('entry'); // Get a db instance. $isis = new CinisisDb(); @@ -45,20 +28,7 @@ if ($isis->db) { // Query database. $result = $isis->db->read($entry); - - // First / prev links. - if ($entry != 1) { - $prev = $entry - 1; - echo 'first '; - echo '< prev '; - } - - // Next / last links. - if ($entry < $entries) { - $next = $entry + 1; - echo 'next > '; - echo 'last'; - } + $display->navbar($entry, $entries); // Format output. echo "
\n";
@@ -68,5 +38,5 @@ if ($isis->db) {
   echo '
'; } +$display->footer(); ?> - -- cgit v1.2.3