diff options
Diffstat (limited to 'samples/phpisis.php')
-rw-r--r-- | samples/phpisis.php | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/samples/phpisis.php b/samples/phpisis.php index 75326f1..cc691d6 100644 --- a/samples/phpisis.php +++ b/samples/phpisis.php @@ -1,29 +1,31 @@ <?php /** - * Test query script. + * Php Isis test script. */ -?> -<h3>Testing pecl-isis</h3> -<?php +// Import requisites. +require_once '../index.php'; + +// Draw the document. +$display = new CinisisDisplayHelper('Php Isis Test'); - $db = isis_open('db/dbname/dbname'); - print_r(isis_last_mfn($db)); +// Open the database. +$db = isis_open('db/dbname/dbname'); +print_r(isis_last_mfn($db)); - echo '<table>'; +$display->open_table(); - $result = isis_search('$', $db); - while ($record = isis_fetch_flat_array($result) ) { - print (" <tr><td colspan=\"2\">MFN: $record[mfn]</td></tr>\n"); - for ($i=0; $i<count($record)-1; ++$i) { //-1 porque el mfn es +1 - list ($tag, $value) = $record[$i]; - print (" <tr>\n". - " <td>$tag</td>\n". - " <td>".htmlspecialchars($value)."</td>\n". - " </tr>\n"); - } +$result = isis_search('$', $db); +while ($record = isis_fetch_flat_array($result) ) { + print (" <tr><td colspan=\"2\">MFN: $record[mfn]</td></tr>\n"); + for ($i=0; $i<count($record)-1; ++$i) { //-1 porque el mfn es +1 + list ($tag, $value) = $record[$i]; + print (" <tr>\n". + " <td>$tag</td>\n". + " <td>".htmlspecialchars($value)."</td>\n". + " </tr>\n"); } - echo '</table>'; -?> +} -</body></html> +$display->close_table(); +$display->footer(); |