diff options
author | Silvio <silvio@devlet.com.br> | 2010-08-19 10:51:05 -0300 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-08-19 10:51:05 -0300 |
commit | ed250793255353582ae32d2cf5dc726004f3e0d8 (patch) | |
tree | afad07967797ff05358c2f9845817683a550a8de /apps/field.php | |
parent | 70d0c6f95279f67f863cf6cb8e2a0528534c4519 (diff) | |
download | cinisis-ed250793255353582ae32d2cf5dc726004f3e0d8.tar.gz cinisis-ed250793255353582ae32d2cf5dc726004f3e0d8.tar.bz2 |
Using field array instead of field name at IsisFinder
Diffstat (limited to 'apps/field.php')
-rw-r--r-- | apps/field.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/field.php b/apps/field.php index 563b2b0..cc79a20 100644 --- a/apps/field.php +++ b/apps/field.php @@ -7,13 +7,13 @@ require_once '../index.php'; // Get input data. -$entry = CinisisHttpHelper::get_numeric_arg('entry'); -$field = CinisisHttpHelper::get_numeric_arg('field'); +$entry = CinisisHttpHelper::get_numeric_arg('entry'); +$field_key = CinisisHttpHelper::get_numeric_arg('field_key'); // Draw the document. $display = new CinisisDisplayHelper('Field finder'); $form = $display->form_input_text('entry', $entry); -$form .= $display->form_input_text('field', $field); +$form .= $display->form_input_text('field_key', $field_key); $display->form($form, basename(__FILE__)); // Get a db instance. @@ -22,19 +22,19 @@ $isis = new IsisFinder(); // Setup database and entry number. if ($isis) { // Query database. - $field_name = $isis->getFieldName($field); - list($entry, $result) = $isis->nextField($entry, $field_name); + $field = $isis->getFieldArray($field_key); + list($entry, $result) = $isis->nextField($entry, $field); // Navigation bar. - $display->navbar($entry, $isis->entries, $repetition, '&field='. $field); + $display->navbar($entry, $isis->entries, $repetition, '&field_key='. $field_key); // Format output. echo "<pre>\n"; - echo "Selected field: $field: $field_name.\n"; + echo "Selected field: $field_key: ". $field['name'] ."\n"; echo "Showing entry ". $display->entry_link($entry) ." from $entries total entries.\n"; - echo "Repetitions found: ". count($result[$field_name]) .".\n"; + echo "Repetitions found: ". count($result[$field['name']]) .".\n"; echo "\n"; - print_r($result[$field_name]); + print_r($result[$field['name']]); echo '</pre>'; } |