aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2010-08-24 15:53:45 -0300
committerSilvio <silvio@devlet.com.br>2010-08-24 15:53:45 -0300
commite3e32378e9c75303d32c7c7af92852884f73afa0 (patch)
tree73b1709b20c4bc5bf3be7abd5c92743b5629297f /apps
parent55016ae8470f0afa5f49addb70ffb07e81f893d8 (diff)
downloadcinisis-e3e32378e9c75303d32c7c7af92852884f73afa0.tar.gz
cinisis-e3e32378e9c75303d32c7c7af92852884f73afa0.tar.bz2
Using radio buttons for field and subfield selection on apps
Diffstat (limited to 'apps')
-rw-r--r--apps/field.php16
-rw-r--r--apps/repetition.php16
-rw-r--r--apps/search.php21
-rw-r--r--apps/subfield.php19
4 files changed, 37 insertions, 35 deletions
diff --git a/apps/field.php b/apps/field.php
index 09a2016..2829421 100644
--- a/apps/field.php
+++ b/apps/field.php
@@ -10,18 +10,18 @@ require_once '../index.php';
$entry = CinisisHttpHelper::getNumericArg('entry');
$fid = CinisisHttpHelper::getNumericArg('fid');
-// Draw the document.
-$display = new CinisisDisplayHelper('Field finder');
-$form = $display->formInputText('entry', $entry);
-$form .= $display->formInputText('fid', $fid);
-$script = basename(__FILE__);
-$display->form($form, $script);
-
// Get a db instance.
$isis = new IsisFinder();
-// Setup database and entry number.
if ($isis) {
+ // Draw the document.
+ $display = new CinisisDisplayHelper('Field finder');
+ $form = $display->formInputText('entry', $entry);
+ //$form .= $display->formInputText('fid', $fid);
+ $form .= $display->radios('fid', $isis->getFieldNames(), $fid);
+ $script = basename(__FILE__);
+ $display->form($form, $script);
+
// Query database.
$field = $isis->getFieldArray($fid);
list($entry, $result) = $isis->nextField($field, $entry);
diff --git a/apps/repetition.php b/apps/repetition.php
index 66d153f..6706162 100644
--- a/apps/repetition.php
+++ b/apps/repetition.php
@@ -10,18 +10,18 @@ require_once '../index.php';
$entry = CinisisHttpHelper::getNumericArg('entry');
$fid = CinisisHttpHelper::getNumericArg('fid');
-// Draw the document.
-$display = new CinisisDisplayHelper('Repetition finder');
-$form = $display->formInputText('entry', $entry);
-$form .= $display->formInputText('fid', $fid);
-$script = basename(__FILE__);
-$display->form($form, $script);
-
// Get a db instance.
$isis = new IsisFinder();
-// Setup database and entry number.
if ($isis) {
+ // Draw the document.
+ $display = new CinisisDisplayHelper('Repetition finder');
+ $form = $display->formInputText('entry', $entry);
+ //$form .= $display->formInputText('fid', $fid);
+ $form .= $display->radios('fid', $isis->getFieldNames(), $fid);
+ $script = basename(__FILE__);
+ $display->form($form, $script);
+
// Query database.
$field = $isis->getFieldArray($fid);
list($entry, $result) = $isis->nextRepetition($field, $entry);
diff --git a/apps/search.php b/apps/search.php
index cd75339..a66e80f 100644
--- a/apps/search.php
+++ b/apps/search.php
@@ -15,20 +15,21 @@ $fid = CinisisHttpHelper::getNumericArg('fid');
$sid = CinisisHttpHelper::getTextualArg('sid');
$text = CinisisHttpHelper::getTextualArg('text');
-// Draw the document.
-$display = new CinisisDisplayHelper('Text finder');
-$form = $display->formInputText('entry', $entry);
-$form .= $display->formInputText('fid', $fid);
-$form .= $display->formInputText('sid', $sid);
-$form .= $display->formInputText('text', $text);
-$script = basename(__FILE__);
-$display->form($form, $script);
-
// Get a db instance.
$isis = new IsisFinder();
-// Setup database and entry number.
if ($isis) {
+ // Draw the document.
+ $display = new CinisisDisplayHelper('Text finder');
+ $form = $display->formInputText('entry', $entry);
+ $form .= $display->radios('fid', $isis->getFieldNames(), $fid);
+ $form .= $display->radios('sid', $isis->getSubFieldNames($fid), $sid);
+ //$form .= $display->formInputText('fid', $fid);
+ //$form .= $display->formInputText('sid', $sid);
+ $form .= $display->formInputText('text', $text);
+ $script = basename(__FILE__);
+ $display->form($form, $script);
+
// Query database.
$field = $isis->getFieldArray($fid);
$item = ($sid == 'main') ? 'main' : $isis->getSubfieldName($fid, $sid);
diff --git a/apps/subfield.php b/apps/subfield.php
index 919e0b6..dac04d4 100644
--- a/apps/subfield.php
+++ b/apps/subfield.php
@@ -11,19 +11,20 @@ $entry = CinisisHttpHelper::getNumericArg('entry');
$fid = CinisisHttpHelper::getNumericArg('fid');
$sid = CinisisHttpHelper::getTextualArg('sid');
-// Draw the document.
-$display = new CinisisDisplayHelper('Subfield finder');
-$form = $display->formInputText('entry', $entry);
-$form .= $display->formInputText('fid', $fid);
-$form .= $display->formInputText('sid', $sid);
-$script = basename(__FILE__);
-$display->form($form, $script);
-
// Get a db instance.
$isis = new IsisFinder();
-// Setup database and entry number.
if ($isis) {
+ // Draw the document.
+ $display = new CinisisDisplayHelper('Subfield finder');
+ $form = $display->formInputText('entry', $entry);
+ $form .= $display->radios('fid', $isis->getFieldNames(), $fid);
+ $form .= $display->radios('sid', $isis->getSubFieldNames($fid), $sid);
+ //$form .= $display->formInputText('fid', $fid);
+ //$form .= $display->formInputText('sid', $sid);
+ $script = basename(__FILE__);
+ $display->form($form, $script);
+
// Query database.
$field = $isis->getFieldArray($fid);
$subfield = $isis->getSubfieldName($fid, $sid);