5 $BASE_URLS["wp"]["base"] = "";
6 $BASE_URLS["wp"]["function"] = "wp_pageBuilder";
7 $MENU_ITEMS["wp"]["title"] = "Home";
8 $MENU_ITEMS["wp"]["link"] = "/";
10 function goWebProcessor($calls)
12 if(isset($calls["needs_base_page"])) {
13 if($calls["needs_base_page"] == true) {
15 // echo "here base\n";
18 $func = $calls["page_builder"];
26 function wp_pageBuilder()
28 $calls["needs_base_page"] = true;
33 function www_basePage($calls)
37 if(isset($calls["header_function"])) {
38 $func = $calls["header_function"];
44 echo "<table><tr><td colspan=\"2\">";
47 if(isset($calls["top_function"])) {
48 $func = $calls["top_function"];
54 echo "</td></tr><tr valign=\"top\"><td>";
57 if(isset($calls["left_menu_function"])) {
58 $func = $calls["left_menu_function"];
67 if(isset($calls["content_pane_function"])) {
68 $func = $calls["content_pane_function"];
74 echo "</td></tr><tr colspan=\"2\"><td>";
77 if(isset($calls["footer_function"])) {
78 $func = $calls["footer_function"];
84 echo "</td></tr></table>";
87 if(isset($calls["page_end_function"])) {
88 $func = $calls["page_end_function"];
99 echo "<link rel=\"stylesheet\" href=\"".urlCreate("/css/content.css")."\" type=\"text/css\" media=\"screen, projection\" /> ";
100 echo "</head><body>";
105 echo "<h1>Welcome to GLCAS</h1>";
108 global $MENU_ITEMS, $GLOBAL_BASE_URL;
109 foreach($MENU_ITEMS as $mes) {
110 $mtext = $mes["title"];
111 $mlink = "$GLOBAL_BASE_URL/".$mes["link"];
112 // remove the excess /'s
113 $mlink2 = preg_replace("/\/[\/]+/", "/", $mlink);
114 //echo "went from $mlink to $mlink2\n";
115 echo "<td><a href=\"$mlink2\">$mtext</a></td>";
118 echo "</tr></table>";
119 if(function_exists("msg_haveMessages")) if(msg_haveMessages()) {
120 echo "<table bgcolor=\"#eeeeff\">";
121 $msgs = msg_getMessages();
123 foreach($msgs as $msg) {
124 $msgtime = msg_toDate($msg["msgdate"]);
125 $msgcol = $msg["msgcolour"];
126 $msgtxt = $msg["msgtext"];
127 $msgid = $msg["messages_id"];
129 echo "<tr><td><font color=\"$msgcol\">$msgtime - $msgtxt</font></td>";
130 echo "<td><a href=\"".urlCreate("/msg/acknowledge/$msgid")."\">Acknowledge</a></td></tr>";
136 function www_leftmenu()
138 echo "i be a left menu, yar";
141 function www_contentpane()
143 echo "i be a content pane, yar";
146 function www_footer()
148 echo "i be a footer, yar";
152 function www_pageend()
154 echo "</body></html>";
157 function urlCreate($from)
159 global $MENU_ITEMS, $GLOBAL_BASE_URL;
161 $mlink = "$GLOBAL_BASE_URL/".$from;
162 $mlink = preg_replace("/\/[\/]+/", "/", $mlink);