コード例 #1
0
ファイル: homepage.php プロジェクト: a2call/commsy
        $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
}
/*********** SESSION AND AUTHENTICATION ***********/
// get Session ID (SID)
if (!empty($_COOKIE['SID_homepage'])) {
    $SID = $_COOKIE['SID_homepage'];
    // session id in a cookie
コード例 #2
0
ファイル: commsy.php プロジェクト: a2call/commsy
$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();
} else {
    $class_factory->setDesignTo7();
}
$server_item = $environment->getServerItem();
if ($server_item->showOutOfService()) {
    $current_context_id_save = $environment->getCurrentContextID();
    $current_module_save = $current_module;
    $current_function_save = $current_function;
    $current_module = 'home';
    $current_function = 'outofservice';
    $environment->setCurrentModule($current_module);
    $environment->setCurrentFunction($current_function);
    $environment->setCurrentContextID($server_item->getItemID());
    $outofservice = true;