$pc = new PWEL_CONTROLLER(); $pr = new PWEL_ROUTING(); $db = new eDB("."); $select = new eDB_Select("docsdb", array("type" => "collection")); foreach ($select->result as $row) { print '<li><a href="' . $pc->validateLink($row["url"]) . '">' . $row["name"] . '</a></li>'; if ($param == str_replace("/", "", $row["url"])) { $name = $row["name"]; } } ?> </ul> </div> <div class="content"> <div class="smalltitle"><?php print $name; ?> </div> <div class="padding"> <?php if ($pc->displayExists($param . ".html")) { $pc->display($param . ".html"); } else { $pr->displayError(); } ?> </div> </div> </body> </html>
/** * Inizialize the cool framework */ public function initialize() { PWEL_ROUTING::locateRelativePath(); $this->getConfig(); try { if (self::$configured == false) { $this->autoConfigRouting(); } $routing = new PWEL_ROUTING(); $routing->loadAutoInject(); $components = new PWEL_COMPONENTS(func_get_args()); $routing->start(); $this->disablePlugins(); } catch (Exception $e) { if (PWEL::$config['pwel']['status'] == strtolower('development')) { print '<div style="padding:5px;">'; print '<strong>Message:</strong> ' . $e->getMessage() . '<br />'; print '<strong>File:</strong> ' . $e->getFile() . '<br />'; print '<strong>Line:</strong> ' . $e->getLine() . '<br />'; print '<strong>Trace:</strong> <pre><code>' . $e->getTraceAsString() . '</code></pre><br />'; print '</div>'; } else { $routing = new PWEL_ROUTING(); $routing->displayError(); } } }