aboutsummaryrefslogtreecommitdiff
path: root/tests/repetition.php
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2010-08-16 16:18:37 -0300
committerSilvio <silvio@devlet.com.br>2010-08-16 16:18:37 -0300
commita8f51f030179974bfeace50d9523a50e059affd1 (patch)
tree8c45aa338cec53fcabed76e2e23491be5eba1eef /tests/repetition.php
parente7e7ea4467452f6e08cf79ca0a8e6b9e216407c6 (diff)
downloadcinisis-a8f51f030179974bfeace50d9523a50e059affd1.tar.gz
cinisis-a8f51f030179974bfeace50d9523a50e059affd1.tar.bz2
Adding navbar for repetition finder
Diffstat (limited to 'tests/repetition.php')
-rw-r--r--tests/repetition.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/repetition.php b/tests/repetition.php
index 7555016..1677c18 100644
--- a/tests/repetition.php
+++ b/tests/repetition.php
@@ -8,7 +8,8 @@ require_once '../index.php';
// Draw the document.
$display = new CinisisDisplayHelper('Repetition finder');
-$display->form($display->form_input_text('code'), 'repetition.php');
+$form = $display->form_input_text('code') . $display->form_input_text('display');
+$display->form($form, 'repetition.php');
// Get field code.
$code = CinisisHttpHelper::get_numeric_arg('code');
@@ -21,16 +22,19 @@ if ($isis->db) {
// Get the number of entries.
$field = $isis->db->format['fields'][$code]['name'];
$entries = $isis->db->entries();
- $entry = 1;
+ $entry = CinisisHttpHelper::get_numeric_arg('entry') - 1;
// Query database.
do {
- $result = $isis->db->read($entry++);
+ $result = $isis->db->read(++$entry);
if ($entry == $entries) {
break;
}
} while (!isset($result[$field]) || count($result[$field]) < 2);
+ // Navigation bar.
+ $display->navbar($entry, $entries, $repetition, '&code='. $code);
+
// Format output.
echo "<pre>\n";
echo "Showing entry $entry from $entries total entries.\n";