X-Git-Url: http://git.pjr.cc/?p=glcas.git;a=blobdiff_plain;f=libglcas%2Fweb.php;h=a8d013a66a6608e71b2baabd415cfbd5d7036e9b;hp=6c3723b1926d4af7df41165ca1a53ac8a909e050;hb=f99212f7d29b648f3698cf31cbcda6bc04cda182;hpb=17d5412ef5bdde749ce57dbdd627243eb0d701a8
diff --git a/libglcas/web.php b/libglcas/web.php
index 6c3723b..a8d013a 100644
--- a/libglcas/web.php
+++ b/libglcas/web.php
@@ -29,21 +29,72 @@ class GLCASWeb {
}
+function GLCASMenuBuilder()
+{
+ global $BASE_URL;
+ ?>
+Home
+">Admin
+ Messages not implemented yet";
+}
+
function GLCASpageBuilder($bodyClass, $bodyFunction, $title="GLCAS")
{
- global $WEB_ROOT_FS;
+ global $WEB_ROOT_FS, $BASE_URL;
// TODO: load css
- // TODO: load js
// header
- echo "
$title";
+ echo "$title";
+
+ // load css
+ if(file_exists("$WEB_ROOT_FS/css")) {
+ $dh = opendir("$WEB_ROOT_FS/css");
+ if($dh) {
+ while(($file = readdir($dh))!==false) {
+ $mt = preg_match("/.*.css$/", $file);
+ if($mt > 0) {
+ error_log("loading css $file");
+ echo "";
+ //echo "required $basedir/$file\n";
+ }
+ }
+ }
+ }
+
+ // load js
+ if(file_exists("$WEB_ROOT_FS/js")) {
+ $dh = opendir("$WEB_ROOT_FS/js");
+ if($dh) {
+ while(($file = readdir($dh))!==false) {
+ $mt = preg_match("/.*.js$/", $file);
+ if($mt > 0) {
+ error_log("loading js $file");
+ echo "";
+ //echo "required $basedir/$file\n";
+ }
+ }
+ }
+ }
+
+
+ // start body
+ echo "";
// page top
echo "GLCAS
";
- echo "messages go here | |
";
+ echo "";
+ GLCASMessageBuilder();
+ echo " | | ";
// menu, then body
- echo "Menu goes here | ";
+ echo "";
+ GLCASMenuBuilder();
+ echo " | ";
// body
$url = "/";
if(isset($_REQUEST["q"])) {
|
|
|
|