MDB2_Schema
[ class tree: MDB2_Schema ] [ index: MDB2_Schema ] [ all elements ]

Source for file result.php

Documentation is available at result.php

  1. <?php
  2. // +----------------------------------------------------------------------+
  3. // | PHP versions 4 and 5                                                 |
  4. // +----------------------------------------------------------------------+
  5. // | Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox,                 |
  6. // | Stig. S. Bakken, Lukas Smith, Igor Feghali                           |
  7. // | All rights reserved.                                                 |
  8. // +----------------------------------------------------------------------+
  9. // | MDB2_Schema enables users to maintain RDBMS independant schema files |
  10. // | in XML that can be used to manipulate both data and database schemas |
  11. // | This LICENSE is in the BSD license style.                            |
  12. // |                                                                      |
  13. // | Redistribution and use in source and binary forms, with or without   |
  14. // | modification, are permitted provided that the following conditions   |
  15. // | are met:                                                             |
  16. // |                                                                      |
  17. // | Redistributions of source code must retain the above copyright       |
  18. // | notice, this list of conditions and the following disclaimer.        |
  19. // |                                                                      |
  20. // | Redistributions in binary form must reproduce the above copyright    |
  21. // | notice, this list of conditions and the following disclaimer in the  |
  22. // | documentation and/or other materials provided with the distribution. |
  23. // |                                                                      |
  24. // | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,    |
  25. // | Lukas Smith, Igor Feghali nor the names of his contributors may be   |
  26. // | used to endorse or promote products derived from this software       |
  27. // | without specific prior written permission.                           |
  28. // |                                                                      |
  29. // | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  |
  30. // | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT    |
  31. // | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS    |
  32. // | FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE      |
  33. // | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,          |
  34. // | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
  35. // | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
  36. // |  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  |
  37. // | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT          |
  38. // | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
  39. // | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE          |
  40. // | POSSIBILITY OF SUCH DAMAGE.                                          |
  41. // +----------------------------------------------------------------------+
  42. // | Author: Lukas Smith <smith@pooteeweet.org>                           |
  43. // | Author: Igor Feghali <ifeghali@php.net>                              |
  44. // +----------------------------------------------------------------------+
  45. //
  46. // $Id: result.php,v 1.2 2008/11/17 00:24:52 ifeghali Exp $
  47. //
  48.  
  49. /**
  50.  * This is all rather ugly code, thats probably very much XSS exploitable etc.
  51.  * However the idea was to keep the magic and dependencies low, to just
  52.  * illustrate the MDB2_Schema API a bit.
  53.  */
  54.  
  55. ?>
  56. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  57.         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  58.       <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  59.       <head><title>MDB2_Schema Web Frontend</title></head>
  60. <body>
  61. <?php
  62. $warnings $schema->getWarnings();
  63. if (count($warnings> 0{
  64.     echo '<h1>Warnings</h1>';
  65.     echo '<pre>';
  66.     var_dump($warnings);
  67.     echo '</pre>';
  68. }
  69.  
  70. if ($schema->db->getOption('debug')) {
  71.     echo '<h1>Debug messages</h1>';
  72.     echo $schema->db->getDebugOutput().'<br>';
  73. }
  74.  
  75. if ($data->show_structure
  76.     && isset($definition)
  77.     && is_array($definition)
  78. {
  79.     echo '<h1>Database structure</h1>';
  80.     $var_dump($definition);
  81. }
  82.  
  83. if (isset($error&& $error{
  84.     echo '<h1>Error</h1>';
  85.     echo '<div id="errors"><ul>';
  86.     echo '<li>' $error '</li>';
  87.     echo '</ul></div>';
  88. }
  89. ?>
  90. </body>
  91. </html>

Documentation generated on Mon, 11 Mar 2019 15:26:17 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.