diff options
author | Silvio <silvio@devlet.com.br> | 2010-08-18 12:22:55 -0300 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-08-18 12:22:55 -0300 |
commit | e949696dd9ba44b2bc3ad703d9704ed1d47a6d8f (patch) | |
tree | 5107b8a0e1983d8069f331af185f988d83792ace /samples/phpisis.php | |
parent | 38eb563bc42fb1ab830fd27277aefe7f04937ee5 (diff) | |
download | cinisis-e949696dd9ba44b2bc3ad703d9704ed1d47a6d8f.tar.gz cinisis-e949696dd9ba44b2bc3ad703d9704ed1d47a6d8f.tar.bz2 |
Cleaning up samples
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(); |