コード例 #1
0
    $_POST['openmeetings_wb_w'] = intval($_POST['openmeetings_wb_w']);
    $_POST['openmeetings_wb_h'] = intval($_POST['openmeetings_wb_h']);
    intval($_POST['openmeetings_show_fp']) == 1 ? $_POST['openmeetings_show_fp'] = 'true' : ($_POST['openmeetings_show_fp'] = 'false');
    $_POST['openmeetings_fp_w'] = intval($_POST['openmeetings_fp_w']);
    $_POST['openmeetings_fp_h'] = intval($_POST['openmeetings_fp_h']);
    //create a new room
    if (isset($_POST['create_room'])) {
        //Get the room id
        //TODO: Course title added/removed after creation.  Affects the algo here.
        if (isset($_SESSION['course_title']) && $_SESSION['course_title'] != '') {
            $room_name = $_SESSION['course_title'];
        } else {
            $room_name = 'course_' . $course_id;
        }
        //add the room with the given parameters.
        $om_obj->om_addRoom($room_name, $_POST);
        $msg->addFeedback('OPENMEETINGS_ADDED_SUCEEDED');
        header('Location: index.php');
        exit;
    } elseif (isset($_POST['update_room'])) {
        //update a room
        $om_obj->om_updateRoom(intval($_POST['room_id']), $_POST);
        $msg->addFeedback('OPENMEETINGS_UPDATE_SUCEEDED');
        header('Location: index.php');
        exit;
    }
} elseif (isset($_POST['cancel'])) {
    $msg->addFeedback('OPENMEETINGS_CANCELLED');
    header('Location: index.php');
    exit;
} elseif (isset($_REQUEST['edit_room']) && isset($_POST['room_id'])) {
コード例 #2
0
$course_id = $_SESSION['course_id'];
// Check access
checkAccess($course_id);
$_GET['gid'] = intval($_GET['gid']);
//Initiate Openmeeting
$om_obj = new Openmeetings($course_id, $_SESSION['member_id']);
//Login
$om_obj->om_login();
//Group meetings
$sql = "SELECT title FROM " . TABLE_PREFIX . "groups WHERE group_id={$_GET['gid']} ORDER BY title";
//TODO: Check group permission from group table.
$result = mysql_query($sql, $db);
$row = mysql_fetch_assoc($result);
if (mysql_numrows($result) == 0) {
    echo '<div class="openmeetings">' . _AT('openmeetings_no_group_meetings') . '</div>';
    require AT_INCLUDE_PATH . 'footer.inc.php';
    exit;
}
//Check in the db and see if this group has a meeting alrdy, create on if not.
$om_obj->setGid($_GET['gid']);
if ($om_obj->om_getRoom()) {
    //Log into the room
    $room_id = $om_obj->om_addRoom($room_name);
    header('Location: ' . AT_BASE_HREF . 'mods/openmeetings/view_meetings.php?room_id=' . $room_id . SEP . 'sid=' . $om_obj->getSid());
    exit;
} else {
    //Header begins here
    require AT_INCLUDE_PATH . 'header.inc.php';
    echo '<div class="openmeetings">' . $row['title'] . '<a href="mods/openmeetings/add_group_meetings.php?group_id=' . $_GET['gid'] . '"> Start a conference </a></div>';
    require AT_INCLUDE_PATH . 'footer.inc.php';
}