コード例 #1
0
ファイル: index.php プロジェクト: kostastzo/openeclass
        $tool_content .= action_bar(array(array('title' => $langBack, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}", 'icon' => 'fa-reply', 'level' => 'primary-label')));
    } else {
        if (isset($_GET['id'])) {
            $tool_content .= action_bar(array(array('title' => $langBack, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}", 'icon' => 'fa-reply', 'level' => 'primary-label')));
        } else {
            $tool_content .= action_bar(array(array('title' => $langNewBBBSession, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&add=1", 'icon' => 'fa-calendar', 'level' => 'primary-label')));
        }
    }
}
if (isset($_GET['add'])) {
    $navigation[] = array('url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}", 'name' => $langBBB);
    new_bbb_session();
} elseif (isset($_POST['update_bbb_session'])) {
    $startDate_obj = DateTime::createFromFormat('d-m-Y H:i', $_POST['start_session']);
    $start = $startDate_obj->format('Y-m-d H:i:s');
    update_bbb_session($_GET['id'], $_POST['title'], $_POST['desc'], $start, $_POST['type'], $_POST['status'], isset($_POST['notifyUsers']) ? '1' : '0', $_POST['minutes_before'], $_POST['external_users'], $_POST['record'], $_POST['sessionUsers']);
    Session::Messages($langBBBAddSuccessful, 'alert-success');
    redirect("index.php?course={$course_code}");
} elseif (isset($_GET['choice'])) {
    $navigation[] = array('url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}", 'name' => $langBBB);
    switch ($_GET['choice']) {
        case 'edit':
            edit_bbb_session($_GET['id']);
            break;
        case 'do_delete':
            delete_bbb_session($_GET['id']);
            break;
        case 'do_disable':
            disable_bbb_session($_GET['id']);
            break;
        case 'do_enable':
コード例 #2
0
ファイル: index.php プロジェクト: nikosv/openeclass
                      'show' => get_total_bbb_servers())));
        }
    }
}

if (isset($_GET['add'])) {
    $navigation[] = array('url' => "$_SERVER[SCRIPT_NAME]?course=$course_code", 'name' => $langBBB);
    new_bbb_session();
}
elseif(isset($_POST['update_bbb_session']))
{
    if (!isset($_POST['token']) || !validate_csrf_token($_POST['token'])) csrf_token_error();
    $startDate_obj = DateTime::createFromFormat('d-m-Y H:i', $_POST['start_session']);
    $start = $startDate_obj->format('Y-m-d H:i:s');
    //update_bbb_session($_GET['id'],$_POST['title'], $_POST['desc'], $start, $_POST['type'] ,$_POST['status'],(isset($_POST['notifyUsers']) ? '1' : '0'),$_POST['minutes_before'],$_POST['external_users'],$_POST['record'],$_POST['sessionUsers']);
    update_bbb_session(getDirectReference($_GET['id']),$_POST['title'], $_POST['desc'], $start, '0' ,$_POST['status'],(isset($_POST['notifyUsers']) ? '1' : '0'),$_POST['minutes_before'],$_POST['external_users'],$_POST['record'],$_POST['sessionUsers']);
    Session::Messages($langBBBAddSuccessful, 'alert-success');
    redirect("index.php?course=$course_code");
}
elseif(isset($_GET['choice']))
{
    $navigation[] = array('url' => "$_SERVER[SCRIPT_NAME]?course=$course_code", 'name' => $langBBB);
    switch($_GET['choice'])
    {
        case 'edit':
            edit_bbb_session(getDirectReference($_GET['id']));
            break;
        case 'do_delete':
            delete_bbb_session(getDirectReference($_GET['id']));
            break;
        case 'do_disable':