function LoginBar($mobile = False) { $ui = $GLOBALS['ui']; $workspace_id = $ui->WorkspaceID(); $teamspace_id = $ui->TeamspaceID(); $s = "<table class='plain' width='100%'>\n"; $s .= "<tr>\n"; $s .= "<td><a href='index.php'>Home</a> | "; if ($GLOBALS['use_wiki_help']) { $s .= "<a href='" . GetWikiUrlHelp() . "' target='new'>Help</a> | "; } if (!empty($workspace_id) && $mobile == False) { $s .= "You are logged into: <a href='bin/workspace/unset.php'>" . GetColumnValue("name", "core_workspace_master", "workspace_id", $workspace_id) . "</a>"; } if (!empty($teamspace_id)) { $s .= "<img src='images/nuvola/16x16/actions/forward.png' height='16' width='16'><a href='bin/teamspace/unset.php'>" . GetColumnValue("name", "core_teamspace_master", "teamspace_id", $teamspace_id) . "</a>"; } $s .= "</td>\n"; if (!empty($workspace_id)) { $s .= "<form method='post' action='index.php?dtask=deactivate_workspace'><td><input type='submit' value='Logout Workspace' class='buttonstyle'></td></form>\n"; } if ($mobile == False) { $s .= "<td align='right'>Welcome, " . $ui->FullName() . "</td>\n"; } $s .= "<form method='post' action='index.php?dtask=logout'><td><input type='submit' value='Logout' class='buttonstyle'></td></form>\n"; $s .= "</tr>\n"; $s .= "</table>\n"; return $s; }
function ShowMoreInfo() { return GetColumnValue("intro_description", "core_help_more_info", "module", EscapeData($_GET['module']), ""); }
function Body() { $dr = $GLOBALS['dr']; $wb = $GLOBALS['wb']; global $mi; /* PUT THE MODULE ID IN THE GLOBAL CONTEXT */ $c = "<table align='center' width='780' cellpadding='0' cellspacing='0' border='0' class='plain'>\n"; $c .= "<tr>\n"; $c .= "<td width='20' bgcolor='#3399CC'><img src='" . $wb . "images/curves/top_left.gif' width='20' height='42'></td>\n"; //$c.="<td width='740' bgcolor='#66CC33'><a href='index.php'></a></td>\n"; $c .= "<td width='740' bgcolor='#66CC33'><a href='index.php'>" . $GLOBALS['site_logo'] . "</a></td>\n"; $c .= "<td width='20' bgcolor='#3399CC'><img src='" . $wb . "images/curves/top_right.gif' width='20' height='42'></td>\n"; $c .= "</tr>\n"; $c .= "<tr>\n"; $c .= "<td bgcolor='#99CCFF' colspan='3'>\n"; if (isset($_SESSION['user_id'])) { require_once $dr . "include/functions/design/login_bar.php"; $c .= LoginBar(); } else { require_once $dr . "include/functions/design/logout_bar.php"; $c .= LogoutBar(); } $c .= "</td>\n"; $c .= "</tr>\n"; /* NOT LOGGED IN AND NO MODULE IN QUERYSTRING */ if (!isset($_SESSION['user_id']) && !isset($_GET['module'])) { require_once $dr . "modules/core/functions/forms/login_form.php"; $c .= "<tr bgcolor='#ffffff' align='center'>\n"; $c .= "<td colspan='3'>\n"; if (isset($_COOKIE['mvh_username'])) { $c .= LoginFormCookie(); } else { $c .= LoginForm(); } $c .= "</td>\n"; $c .= "</tr>\n"; } elseif (isset($_SESSION['user_id']) && !isset($_GET['module']) && isset($GLOBALS['ui']) && isset($GLOBALS['wui'])) { /* PROCESS THE ACTIVATION AND DEACTIVATION OF MODULES IN THE WORKSPACE HERE AS WE NEED UI TO BE SET */ if (isset($_GET['wtask']) && $_GET['wtask'] == "install_workspace_user_module") { require_once $dr . "modules/workspace/classes/add_remove_user_workspace_module.php"; $aruwm = new AddRemoveUserWorkspaceModule(); $aruwm->SetParameters($_GET['module_id']); $result = $aruwm->AddRemove(); //if (!$result) { echo Alert("3",$at->ShowErrors()); } } /* ACTIVATE THE TEAMSPACE MODULES */ if (isset($_GET['wtask']) && $_GET['wtask'] == "install_teamspace_user_module") { require_once $dr . "modules/teamspace/classes/add_remove_user_teamspace_module.php"; $arutm = new AddRemoveUserTeamspaceModule(); $arutm->SetParameters($_GET['module_id']); $result = $arutm->AddRemove(); //if (!$result) { echo Alert("3",$at->ShowErrors()); } } /* INCLUDE THE MAIN FILES FOR THE WORKSPACE */ require_once $dr . "modules/workspace/functions/browse/non_enterprise_workspace_modules.php"; require_once $dr . "include/functions/design/teamspace_slider.php"; require_once $dr . "include/functions/teamspace/user_teamspaces.php"; /* TODO: CHANGE THIS TO THE WORKSPACE FOLDER */ //require_once($dr."modules/teamspace/functions/browse/user_available_modules.php"); require_once $dr . "modules/teamspace/classes/user_available_modules.php"; // $c .= "<tr>\n"; $c .= "<td colspan='3'>\n"; $c .= "<table cellspacing='0'>\n"; $c .= "<tr>\n"; if (IS_NUMERIC($GLOBALS['teamspace_id'])) { $c .= "<td width='150' valign='top'>" . UserAvailableModules() . "</td>\n"; } else { $obj_uam = new UserAvailableModules(); if ($obj_uam->CountUserAvailableModules() > 0) { $c .= "<td width='150' valign='top'>" . TeamspaceSliderItems() . "</td>\n"; } } $c .= "<td width='630'>" . CurveBox(NonEnterpriseModules($GLOBALS['ui']->WorkspaceID(), $_SESSION['user_id'], $GLOBALS['wui']->RoleID(), True)) . "</td>\n"; $c .= "<td width='150' valign='top'>" . UserTeamspaces() . "</td>\n"; $c .= "</tr>\n"; $c .= "</table>\n"; $c .= "</td>\n"; $c .= "</tr>\n"; } elseif (isset($_SESSION['user_id']) && !isset($_GET['module']) && empty($workspace_id)) { require_once $dr . "modules/workspace/functions/browse/select_workspace.php"; require_once $dr . "modules/workspace/functions/misc/menu.php"; $c .= "<tr>\n"; $c .= "<td colspan='3'>\n"; $c .= "<table cellspacing='0' class='plain_border'>\n"; $c .= "<tr>\n"; $c .= "<td>" . SelectWorkspace() . "</td>\n"; if ($GLOBALS['ui']->GetInfo("default_role") != "y") { $c .= "<td width='150' valign='top'>" . Menu() . "</td>\n"; } $c .= "</tr>\n"; $c .= "</table>\n"; $c .= "</td>\n"; $c .= "</tr>\n"; //$c.=CurveBox(SelectWorkspace()); } elseif (isset($_GET['module']) && file_exists($dr . "modules/" . $_GET['module'] . ".php")) { $module_id = GetColumnValue("module_id", "core_module_master", "name", $_GET['module']); require_once $dr . "modules/" . $_GET['module'] . ".php"; require_once $dr . "classes/modules/module_id.php"; $mi = new ModuleID(); $module_result = $mi->Info($module_id); $anonymous_access = $mi->GetInfo("anonymous_access"); $c .= "<tr>\n"; $c .= "<td colspan='3'>"; /* CHECK FOR ERRORS OR ACCESS DENIED */ if ($module_result && $mi->CheckACL()) { $c .= LoadModule($module_id, $anonymous_access); } else { $c .= CurveBox("Access to module denied"); } $c .= "</td>\n"; $c .= "</tr>\n"; } $c .= "<tr>\n"; $c .= "<td width='20' bgcolor='#3399CC'><img src='" . $wb . "images/curves/white_bottom_left.gif' width='20' height='20'></td>\n"; $c .= "<td width='780' bgcolor='#ffffff' align='center'>" . $GLOBALS['copyright_notice'] . "</td>\n"; $c .= "<td width='20' bgcolor='#3399CC'><img src='" . $wb . "images/curves/white_bottom_right.gif' width='20' height='20'></td>\n"; $c .= "</tr>\n"; $c .= "</table>\n"; return $c; }