1: <?php
2: require_once('../qcubed.inc.php');
3:
4:
5: require(__QCUBED__ . '/codegen/QCodeGen.class.php');
6:
7: include (__QCUBED_CORE__ . '/codegen/controls/_class_paths.inc.php');
8:
9:
10:
11:
12: QApplication::CheckRemoteAdmin();
13:
14:
15:
16:
17: QCodeGen::Run(__CONFIGURATION__ . '/codegen_settings.xml');
18:
19: function DisplayMonospacedText($strText) {
20: $strText = QApplication::HtmlEntities($strText);
21: $strText = str_replace(' ', ' ', $strText);
22: $strText = str_replace(' ', ' ', $strText);
23: $strText = str_replace("\r", '', $strText);
24: $strText = str_replace("\n", '<br/>', $strText);
25:
26: _p($strText, false);
27: }
28:
29: $strPageTitle = "QCubed Development Framework - Code Generator";
30: require(__CONFIGURATION__ . '/header.inc.php');
31: ?>
32: <h1>Code Generator</h1>
33: <div class="headerLine"><span><strong>PHP Version:</strong> <?php _p(PHP_VERSION); ?>; <strong>Zend Engine Version:</strong> <?php _p(zend_version()); ?>; <strong>QCubed Version:</strong> <?php _p(QCUBED_VERSION); ?></span></div>
34:
35: <div class="headerLine"><span><?php if (array_key_exists('OS', $_SERVER)) printf('<strong>Operating System:</strong> %s; ', $_SERVER['OS']); ?><strong>Application:</strong> <?php _p($_SERVER['SERVER_SOFTWARE']); ?>; <strong>Server Name:</strong> <?php _p($_SERVER['SERVER_NAME']); ?></span></div>
36:
37: <div class="headerLine"><span><strong>Code Generated:</strong> <?php _p(date('l, F j Y, g:i:s A')); ?></span></div>
38:
39: <?php if (QCodeGen::$TemplatePaths) { ?>
40: <div>
41: <p><strong>Template Paths</strong></p>
42: <pre><code><?php DisplayMonospacedText(implode("\r\n", QCodeGen::$TemplatePaths)); ?></code></pre>
43: </div>
44: <?php } ?>
45:
46: <div>
47: <?php if ($strErrors = QCodeGen::$RootErrors) { ?>
48: <p><strong>The following root errors were reported:</strong></p>
49: <pre><code><?php DisplayMonospacedText($strErrors); ?></code></pre>
50: <?php } else { ?>
51: <p><strong>CodeGen Settings (as evaluated from <?php _p(QCodeGen::$SettingsFilePath); ?>):</strong></p>
52: <pre><code><?php DisplayMonospacedText(QCodeGen::GetSettingsXml()); ?></code></pre>
53: <?php } ?>
54:
55: <?php foreach (QCodeGen::$CodeGenArray as $objCodeGen) { ?>
56: <p><strong><?php _p($objCodeGen->GetTitle()); ?></strong></p>
57: <pre><code><p class="code_title"><?php _p($objCodeGen->GetReportLabel()); ?></p><?php
58: if (QCodeGen::DebugMode) {
59: DisplayMonospacedText($objCodeGen->GenerateAll());
60: } else {
61: @DisplayMonospacedText($objCodeGen->GenerateAll());
62: }
63: ?>
64: <?php if ($strErrors = $objCodeGen->Errors) { ?>
65: <p class="code_title">The following errors were reported:</p>
66: <?php DisplayMonospacedText($objCodeGen->Errors); ?>
67: <?php } ?>
68: <?php if ($strWarnings = $objCodeGen->Warnings) { ?>
69: <p class="code_title">The following warnings were reported:</p>
70: <?php DisplayMonospacedText($objCodeGen->Warnings); ?>
71: <?php } ?></code></pre>
72: <?php } ?>
73:
74: <?php
75: if (!$strErrors) {
76: foreach (QCodeGen::GenerateAggregate() as $strMessage) { ?>
77: <p><strong><?php _p($strMessage); ?></strong></p>
78: <?php }
79: } ?>
80: </div>
81:
82: <?php require(__CONFIGURATION__ . '/footer.inc.php'); ?>