} if (!isset($_GET['fct'])) { if ($current_context != $environment->getServerID()) { $current_function = 'detail'; } else { $current_function = 'index'; } } elseif (isset($_GET['fct'])) { $current_function = $_GET['fct']; } if ($current_function != 'index' and $current_function != 'detail' and $current_function != 'edit' and $current_function != 'getfile' and $current_function != 'move' and $current_function != 'forward' and $current_function != 'logout' and $current_function != 'login') { $current_function = 'detail'; } $environment->setCurrentContextID($current_context); $environment->setCurrentModule($current_module); $environment->setCurrentFunction($current_function); unset($current_context); unset($current_module); unset($current_function); $context_item_current = $environment->getCurrentContextItem(); if ($environment->inPortal() or $environment->inServer()) { $class_factory->setDesignTo6(); } else { $class_factory->setDesignTo7(); } /*********** SERVER INITIALIZATION AND JUMP TO HOMEPAGE INDEX ***********/ // send user to ... // homepage overview, if cid in URL was empty or current context does not exist if ($cid_not_set) { // redirect to module = homepage; function = index }
} else { if (!isset($_GET['mod']) or !isset($_GET['fct'])) { $current_module = 'home'; $current_function = 'index'; } else { if (isset($_GET['mod'])) { $current_module = $_GET['mod']; } if (isset($_GET['fct'])) { $current_function = $_GET['fct']; } } } $environment->setCurrentContextID($current_context); $environment->setCurrentModule($current_module); $environment->setCurrentFunction($current_function); unset($current_context); #unset($current_module); #unset($current_function); // HTML text area corrections $_POST = $environment->getTextConverter()->correctPostValuesForTextEditor($_POST); // set output mode: default is html if ($environment->getCurrentFunction() == 'index' and $environment->getCurrentModule() == type2Module(CS_MATERIAL_TYPE) or $environment->getCurrentModule() == 'ajax' or $environment->getCurrentModule() == 'scorm') { if (!empty($_GET['output'])) { $environment->setOutputMode($_GET['output']); } elseif (!empty($_POST['output'])) { $environment->setOutputMode($_POST['output']); } } if ($environment->inPortal() or $environment->inServer()) { $class_factory->setDesignTo6();