Typo
[AOOS.git] / index.php
blob7df10170237eeece7d066100e0a7573ef02ea516
1 <?php
2 session_start();
3 if (!isset($_SESSION["files"])) {
4 $_SESSION["files"] = array();
6 include("tmp/header.php");
7 //include("tmp/translatebox.php");
9 require_once("AOOSCore.php");
10 require_once("AOOSModule.php");
11 require_once("AOOSModel.php");
12 //require_once("AOOSStorageDevice.php");
14 function __autoload($class) {
15 $p = false;
16 foreach ($_SESSION["files"] as $path => $c) {
17 if ($c == $class) {
18 $p = $path;
21 if (!$p) {
22 exit("Couldn't find definition of $class");
24 require_once($p);
27 try {
28 global $c;
29 // unset($_SESSION); //FOR DEBUGGING
30 if (!isset($_SESSION["core"])) {
31 $c = new AOOSCore();
32 $_SESSION["core"] = serialize($c);
34 $c = unserialize($_SESSION["core"]);
37 $p = $c->getModule("Paginator");
38 $f = $c->getModule("Form");
39 print $p->show();
42 print "<p>".$c->log2str()."</p>";
43 $_SESSION["core"] = serialize($c);
44 } catch (AOOSException $e) {
45 print $e;
48 $c->printExceptions();