A Qcodo based CMS/ecommerce framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
4.2 KiB

13 years ago
  1. <?php
  2. // Include prepend.inc to load Qcodo
  3. require('../prepend.inc.php'); /* if you DO NOT have "includes/" in your include_path */
  4. // require('prepend.inc.php'); /* if you DO have "includes/" in your include_path */
  5. // Load in the QCodeGen Class
  6. require(__QCODO__ . '/codegen/QCodeGen.class.php');
  7. // Security check for ALLOW_REMOTE_ADMIN
  8. // To allow access REGARDLESS of ALLOW_REMOTE_ADMIN, simply remove the line below
  9. QApplication::CheckRemoteAdmin();
  10. /////////////////////////////////////////////////////
  11. // Run CodeGen, using the ./codegen_settings.xml file
  12. /////////////////////////////////////////////////////
  13. QCodeGen::Run(dirname(__FILE__) . '/codegen_settings.xml');
  14. function DisplayMonospacedText($strText) {
  15. $strText = QApplication::HtmlEntities($strText);
  16. $strText = str_replace(' ', ' ', $strText);
  17. $strText = str_replace(' ', '&nbsp;', $strText);
  18. $strText = str_replace("\r", '', $strText);
  19. $strText = str_replace("\n", '<br/>', $strText);
  20. _p($strText, false);
  21. }
  22. //////////////////
  23. // Output the Page
  24. //////////////////
  25. ?>
  26. <html>
  27. <head>
  28. <title>Qcodo Development Framework - Code Generator</title>
  29. <style>
  30. body { font-family: 'Arial' 'Helvetica' 'sans-serif'; font-size: 14px; margin: 0px; background-color: white;}
  31. a:link, a:visited { text-decoration: none; }
  32. a:hover { text-decoration: underline; }
  33. .page { padding: 10px; }
  34. .headingLeft {
  35. background-color: #446644;
  36. color: #ffffff;
  37. padding: 10px 0px 10px 10px;
  38. font-family: 'Verdana' 'Arial' 'Helvetica' 'sans-serif';
  39. font-size: 18px;
  40. font-weight: bold;
  41. width: 70%;
  42. vertical-align: bottom;
  43. }
  44. .headingLeftSmall { font-size: 10px; }
  45. .headingRight {
  46. background-color: #446644;
  47. color: #ffffff;
  48. padding: 0px 10px 10px 10px;
  49. font-family: 'Verdana' 'Arial' 'Helvetica' 'sans-serif';
  50. font-size: 10px;
  51. width: 30%;
  52. vertical-align: bottom;
  53. text-align: right;
  54. }
  55. .title { font-family: 'Verdana' 'Arial' 'Helvetica' 'sans-serif'; font-size: 19px; font-style: italic; color: #330055; }
  56. .code { background-color: #f4eeff; padding: 10px 10px 10px 10px; margin-left: 50px; font-size: 11px; font-family: 'Lucida Console' 'Courier New' 'Courier' 'monospaced';}
  57. .code_title { font-family: 'Verdana' 'Arial' 'Helvetica' 'sans-serif'; font-size: 12px; font-weight: bold; }
  58. </style>
  59. </head>
  60. <body>
  61. <table border="0" cellspacing="0" width="100%">
  62. <tr>
  63. <td nowrap="nowrap" class="headingLeft"><span class="headingLeftSmall">Qcodo Development Framework <?php _p(QCODO_VERSION); ?><br /></span>Code Generator</div></td>
  64. <td nowrap="nowrap" class="headingRight">
  65. <b>PHP Version:</b> <?php _p(PHP_VERSION); ?>;&nbsp;&nbsp;<b>Zend Engine Version:</b> <?php _p(zend_version()); ?>;&nbsp;&nbsp;<b>Qcodo Version:</b> <?php _p(QCODO_VERSION); ?><br />
  66. <?php if (array_key_exists('OS', $_SERVER)) printf('<b>Operating System:</b> %s;&nbsp;&nbsp;', $_SERVER['OS']); ?><b>Application:</b> <?php _p($_SERVER['SERVER_SOFTWARE']); ?>;&nbsp;&nbsp;<b>Server Name:</b> <?php _p($_SERVER['SERVER_NAME']); ?><br />
  67. <b>Code Generated:</b> <?php _p(date('l, F j Y, g:i:s A')); ?>
  68. </td>
  69. </tr>
  70. </table>
  71. <div class="page">
  72. <?php if ($strErrors = QCodeGen::$RootErrors) { ?>
  73. <p><b>The following root errors were reported:</b></p>
  74. <div class="code"><?php DisplayMonospacedText($strErrors); ?></div>
  75. <p></p>
  76. <?php } else { ?>
  77. <p><b>CodeGen Settings (as evaluated from <?php _p(QCodeGen::$SettingsFilePath); ?>):</b></p>
  78. <div class="code"><?php DisplayMonospacedText(QCodeGen::GetSettingsXml()); ?></div>
  79. <p></p>
  80. <?php } ?>
  81. <?php foreach (QCodeGen::$CodeGenArray as $objCodeGen) { ?>
  82. <p><b><?php _p($objCodeGen->GetTitle()); ?></b></p>
  83. <div class="code"><span class="code_title"><?php _p($objCodeGen->GetReportLabel()); ?></span><br/><br/>
  84. <?php DisplayMonospacedText($objCodeGen->GenerateAll()); ?>
  85. <?php if ($strErrors = $objCodeGen->Errors) { ?>
  86. <p class="code_title">The following errors were reported:</p>
  87. <?php DisplayMonospacedText($objCodeGen->Errors); ?>
  88. <?php } ?>
  89. </div><p></p>
  90. <?php } ?>
  91. <?php foreach (QCodeGen::GenerateAggregate() as $strMessage) { ?>
  92. <p><b><?php _p($strMessage); ?></b></p>
  93. <?php } ?>
  94. </div>
  95. </body>
  96. </html>