in the querystring. DEVCHANGE install maintenance flag */ // set default reporting level //DEVCHANGE set to zero for production ini_set('display_errors',1); ini_set('html_errors',0); error_reporting(E_ALL | E_STRICT); // mark beginning $BINKCMS_start_time=microtime(true); require_once 'Class.Exceptions.inc'; // any elog() after this point *will* show up in the log // use output buffering for include file safety/error checks ob_start(); // initialize the main CMS object require_once 'Class.CMS.inc'; $BINKCMS = CMS::_obj(); elog("BinkCMS_entry:begin {$_GET['uri']}",7); $BINKCMS->InitSession(); elog("BinkCMS_entry:Loading {$_GET['uri']}",6); $BINKCMS->LoadPage(); // DEVCHANGE sanity checks for page load if (!(int)$BINKCMS->page->id) { // page not found $x=CMS::_clear_ob(); header("HTTP/1.1 404 The CMS could not find this page"); echo "This isn't the page you're looking for ..."; die(); } // load all code files $BINKCMS->LoadCode(); elog("BinkCMS_entry:Page initialized, begin rendering",7); /* DEVCHANGE add support for user-defined plugins // include user plugins if ($BINKCMS->userfile_plugin) { // DEVCHANGE check for missing file? include() generates its own warning if (!(CMS::_include($BINKCMS->userfile_plugin))) { elog("Could not include user plugins: {$BINKCMS->userfile_plugin}",3); } } */ $ret=$BINKCMS->page->Render(); if (array_key_exists('source',$_GET)) { echo nl2br(htmlentities($ret,ENT_QUOTES)); } else { echo $ret; } $BINKCMS_stop_time=microtime(true); $x=$BINKCMS_stop_time-$BINKCMS_start_time; elog("BinkCMS_entry:end after $x seconds, used " . cvt_readable_size(memory_get_peak_usage()),3); die(); ?>