3 // if i believed in name spacing in php, i'd use it.
4 error_log("glcasweb loaded");
8 function __construct($config)
10 $this->config = $config;
13 function go($urlhandlers)
16 if(isset($_REQUEST["q"])) {
17 $url = $_REQUEST["q"];
20 // create a url parser
21 $urlparser = new GLCASUrlParser($urlhandlers, $this->config);
24 $call_class = $urlparser->getClass($url);
25 $call_class->go($url);
32 function GLCASpageBuilder($bodyClass, $bodyFunction, $title="GLCAS")
39 echo "<html><title>$title</title><body>";
42 echo "<h1>GLCAS</h1><br>";
43 echo "<table><tr><td>messages go here<td></tr><tr><td>";
46 echo "<table><tr><td>Menu goes here</td></tr><tr><td>";
49 if(isset($_REQUEST["q"])) {
50 $url = $_REQUEST["q"];
53 if($bodyClass != null) {
54 $bodyClass->$bodyFunction($url);
55 } else $bodyFunction($url);
56 echo "</td></tr></table>";
59 // close the big wrap-around table
60 echo "</td></tr></table>";
63 echo "<br><font size=\"-1\">Copyright 2011, PJR</font><br></body></html>";