From c670fe71b62d4765fceb5a1774a1ec54f251bbb7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Skej=C3=B8?= Date: Sat, 4 Apr 2009 15:00:02 +0200 Subject: [PATCH] index.php --- index.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index a739506..289c510 100644 --- a/index.php +++ b/index.php @@ -1,15 +1,27 @@ "AOOSModule", + "AOOSModel" => "AOOSModel2", + "AOOSCore" => "AOOSCore", + "AOOSException" => "AOOSException", + "AOOSTypeException" => "AOOSException", + "AOOSLangException" => "AOOSException" + ); + require("settings.php"); + if (in_array($class, array_keys($rootfiles))) { + require_once($rootfiles[$class].$settings["extension"]); + } + elseif (substr($class, 0, 4) == "AOOS") { require_once("lib/".$class.$settings["extension"]); } else @@ -18,22 +30,50 @@ function __autoload($class) { try { + global $c; if (!isset($_SESSION["core"])) { $c = new AOOSCore(); $_SESSION["core"] = serialize($c); } $c = unserialize($_SESSION["core"]); +/* + $data = new AOOSModel($c); + $index = array("foo", "bar", "baz"); + $data->setColumnIndex($index); + $data->setProperty("foo", + AOOSMODEL_TYPE_STRING, + AOOSMODEL_PROP_GUI_NOTEDITABLE| + AOOSMODEL_PROP_DATA_NOHTML); + $data->setProperty("bar", + AOOSMODEL_TYPE_STRING, + AOOSMODEL_PROP_DATA_QUOTES| + AOOSMODEL_PROP_FROM_DATABASE); + $data->setProperty("baz", + AOOSMODEL_TYPE_INTEGER, + AOOSMODEL_PROP_FROM_DATABASE| + AOOSMODEL_PROP_DATA_QUOTES| + AOOSMODEL_PROP_DATA_HASH + ); + + $data->setTable("Test"); + $data->setSource("mysql"); + $data->populate(); + print nl2br(print_r($data->data(),true)); + $data->save();*/ - $p = $c->getModule("Paginator"); +# $c->loadModule("Installer"); + $p = $c->loadModule("Paginator"); print $p->show(); + + print "

".$c->log2str()."

"; $_SESSION["core"] = serialize($c); } catch (AOOSException $e) { +# print $e; } -global $c; $c->printExceptions(); ?> -- 2.11.4.GIT