Exemplo n.º 1
0
    }
}
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':
            enable_bbb_session($_GET['id']);
            break;
        case 'do_join':
            #check if there is any record-capable bbb server. Otherwise notify users
            if ($_GET['record'] == 'true' && Database::get()->querySingle("SELECT count(*) count FROM bbb_servers WHERE enabled='true' AND enable_recordings='true'")->count == 0) {
                $tool_content .= "<div class='alert alert-info'>{$langBBBNoServerForRecording}</div>";
                break;
Exemplo n.º 2
0
{
    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':
            disable_bbb_session(getDirectReference($_GET['id']));
            break;
        case 'do_enable':
            enable_bbb_session(getDirectReference($_GET['id']));
            break;
        case 'do_join':
            #check if there is any record-capable bbb server. Otherwise notify users
            if($_GET['record']=='true' && Database::get()->querySingle("SELECT count(*) count FROM bbb_servers WHERE enabled='true' AND enable_recordings='true'")->count == 0)
            {
                $tool_content .= "<div class='alert alert-warning'>$langBBBNoServerForRecording</div>";