protected function getlink($id = null, $username = null, $password = null) { $joinParams = array('meetingId' => $id, 'username' => $username, 'password' => $password, 'logoutUrl' => JUri::base()); $bbb = new BigBlueButton($this->salt, $this->url); $itsAllGood = true; try { $result = $bbb->getJoinMeetingURL($joinParams); } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; $itsAllGood = false; } if ($itsAllGood == true) { return $result; } }
<?php require "config_db.php"; require_once 'bbb-api-php/includes/bbb-api.php'; if (!isset($_SESSION["user_name"])) { header('Location: ' . $url_login); exit; } $conn = ConnectDB(); $sql = "select personal_fname_tha, personal_lname_tha from view_user_ad where user_name = '" . $_SESSION["user_name"] . "'"; $res = mssql_query($sql); $user = mssql_fetch_array($res, MSSQL_ASSOC); mssql_close($conn); $bbb = new BigBlueButton(); $joinParams = array('meetingId' => $_GET["room_id"], 'username' => iconv('ISO-8859-11', 'UTF-8', $user["personal_fname_tha"] . " " . $user["personal_lname_tha"]), 'password' => 'mp', 'createTime' => '', 'userId' => '', 'webVoiceConf' => ''); // Get the URL to join meeting: $itsAllGood = true; try { $result = $bbb->getJoinMeetingURL($joinParams); } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; $itsAllGood = false; } if ($itsAllGood == true) { header('Location: ' . $result); }
function joinAsModerator($meetingId, $userName) { // Instatiate the BBB class: $bbb = new BigBlueButton(); /* ___________ JOIN MEETING w/ OPTIONS ______ */ /* Determine the meeting to join via meetingId and join it. */ $joinParams = array('meetingId' => $meetingId, 'username' => $userName, 'password' => 'mp', 'createTime' => '', 'userId' => '', 'webVoiceConf' => ''); // Get the URL to join meeting: $itsAllGood = true; try { $result = $bbb->getJoinMeetingURL($joinParams); } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; $itsAllGood = false; } if ($itsAllGood == true) { //Output results to see what we're getting: echo $result; } }
$id_client = $modx->getOption('id_client', $scriptProperties, null, true); $user_type = $modx->getOption('user_type', $scriptProperties, 'attendee', true); $id_waitpage = $modx->getOption('id_waitpage', $scriptProperties, null, false); require_once $include_path . 'bbb-api.php'; //Подключаем api BigBlueButton $bbb_server = new BigBlueButton(); if ($meeting = $modx->getObject('Meetings', array('id_meeting' => $id_meeting))) { $client = $modx->getObject('Clients', array('id_client' => $id_client)); $joinParams = array('meetingId' => $meeting->get('id_meeting'), 'username' => $client->get('firstname') . ' ' . $client->get('lastname'), 'createTime' => '', 'userId' => $id_client, 'webVoiceConf' => ''); if ($user_type == 'moderator') { $joinParams['password'] = $meeting->get('moderatorPw'); } else { $joinParams['password'] = $meeting->get('attendeePw'); } $itsAllGood = true; try { $logonUrl = $bbb_server->getJoinMeetingURL($joinParams); } catch (Exception $e) { $logonUrl = ''; $modx->log(xPDO::LOG_LEVEL_ERROR, $e->getMessage(), '', 'getJoinMeetingUrl', __FILE__, __LINE__); $itsAllGood = false; } if ($itsAllGood == true) { $meeting_params = array('id_client' => $id_client, 'id_meeting' => $id_meeting, 'logonUrl' => $logonUrl); if (isset($id_waitpage)) { return $modx->getOption('site_url') . $modx->makeUrl($id_waitpage, '', $meeting_params); } else { return $logonUrl; } } }
/** * @brief create join as simple user link * @param type $meeting_id * @param type $att_pw * @param type $surname * @param type $name * @return type */ function bbb_join_user($meeting_id, $att_pw, $surname, $name) { $res = Database::get()->querySingle("SELECT running_at FROM bbb_session WHERE meeting_id = ?s",$meeting_id); if ($res) { $running_server = $res->running_at; } $res = Database::get()->querySingle("SELECT * FROM bbb_servers WHERE id = ?d", $running_server); $salt = $res->server_key; $bbb_url = $res->api_url; // Instatiate the BBB class: $bbb = new BigBlueButton($salt,$bbb_url); $joinParams = array( 'meetingId' => $meeting_id, // REQUIRED - We have to know which meeting to join. 'username' => $surname . " " . $name, // REQUIRED - The user display name that will show in the BBB meeting. 'password' => $att_pw, // REQUIRED - Must match either attendee or moderator pass for meeting. 'createTime' => '', // OPTIONAL - string 'userId' => '', // OPTIONAL - string 'webVoiceConf' => '' // OPTIONAL - string ); // Get the URL to join meeting: $result = $bbb->getJoinMeetingURL($joinParams); return $result; }
/** * @brief create join as simple user link * @param type $meeting_id * @param type $att_pw * @param type $surname * @param type $name * @return type */ function bbb_join_user($meeting_id, $att_pw, $surname, $name) { $res = Database::get()->querySingle("SELECT running_at FROM bbb_session WHERE meeting_id = ?s", $meeting_id); if ($res) { $running_server = $res->running_at; } $res = Database::get()->querySingle("SELECT * FROM bbb_servers WHERE id = ?d", $running_server); $salt = $res->server_key; $bbb_url = $res->api_url; // Instatiate the BBB class: $bbb = new BigBlueButton($salt, $bbb_url); $joinParams = array('meetingId' => $meeting_id, 'username' => $surname . " " . $name, 'password' => $att_pw, 'createTime' => '', 'userId' => '', 'webVoiceConf' => ''); // Get the URL to join meeting: $result = $bbb->getJoinMeetingURL($joinParams); return $result; }