/** * Joins a meeting */ function join() { //get the meeting $id = JRequest::getVar('id'); $query = ' SELECT * FROM #__bbb WHERE id =' . $id; $db =& JFactory::getDBO(); $db->setQuery($query); $meeting = $db->loadObject(); if (!$meeting || $meeting == null) { $msg = "This meeting no longer exists."; $this->setRedirect('index.php?option=com_bigbluebuttonconferencing', $msg); } // This is the security salt that must match the value set in the BigBlueButton server // This is the URL for the BigBlueButton server $row =& JTable::getInstance('settings', 'Table'); $row->load(1); $row->name == 'salt' ? $salt = $row->varValue : ($url = $row->varValue); $row->load(2); $row->name == 'salt' ? $salt = $row->varValue : ($url = $row->varValue); if (!$salt || $salt == '' || !$url || $url == '') { $msg = "You have to fill out the salt and url in the settings menu before you can join a meeting."; $this->setRedirect('index.php?option=com_bigbluebuttonconferencing', $msg); return; } $user =& JFactory::getUser(); //Calls create meeting on the bigbluebutton server $response = BigBlueButton::createMeetingArray($user->name, $meeting->meetingName . "[" . $meeting->meetingVersion . "]", 'Welcome to ' . $meeting->meetingName . '.', $meeting->moderatorPW, $meeting->attendeePW, $salt, $url, JURI::base()); $createNew = false; //Analyzes the bigbluebutton server's response if (!$response) { //If the server is unreachable, then prompts the user of the necessary action $msg = "Unable to join the meeting. Please check the url of the bigbluebutton server AND check to see if the bigbluebutton server is running."; } else { if ($response['returncode'] == 'FAILED') { //The meeting was not created if ($response['messageKey'] == 'idNotUnique') { $createNew = true; } else { if ($response['messageKey'] == 'checksumError') { $msg = "A checksum error occured. Make sure you entered the correct salt."; } else { $msg = $response['message']; } } } else { if ($response['hasBeenForciblyEnded'] == 'true') { //The meeting was created, and the user will now be joined $createNew = true; } else { $bbb_joinURL = BigBlueButton::joinURL($meeting->meetingName . "[" . $meeting->meetingVersion . "]", $user->username, $meeting->moderatorPW, $salt, $url); ?> <script type="text/javascript"> window.location = "<?php echo $bbb_joinURL; ?> ";</script><?php return; } } } if ($createNew) { $meeting->meetingVersion = time(); $db->updateObject('#__bbb', $meeting, 'id', false); if ($db->getErrorNum()) { $msg = $db->getErrorMsg(); $this->setRedirect('index.php?option=com_bigbluebuttonconferencing', $msg); } //Calls create meeting on the bigbluebutton server $response = BigBlueButton::createMeetingArray($user->name, $meeting->meetingName . "[" . $meeting->meetingVersion . "]", 'Welcome to ' . $meeting->meetingName . '.', $meeting->moderatorPW, $meeting->attendeePW, $salt, $url, JURI::base()); if (!$response) { //If the server is unreachable, then prompts the user of the necessary action $msg = "Unable to join the meeting. Please check the url of the bigbluebutton server AND check to see if the bigbluebutton server is running."; } else { if ($response['returncode'] == 'FAILED') { //The meeting was not created if ($response['messageKey'] == 'checksumError') { $msg = "A checksum error occured. Make sure you entered the correct salt."; } else { $msg = $response['message']; } } else { $bbb_joinURL = BigBlueButton::joinURL($meeting->meetingName . "[" . $meeting->meetingVersion . "]", $user->username, $meeting->moderatorPW, $salt, $url); ?> <script type="text/javascript"> window.location = "<?php echo $bbb_joinURL; ?> ";</script><?php return; } } } $this->setRedirect('index.php?option=com_bigbluebuttonconferencing', $msg); return; }
function join($params) { $meetingName = JRequest::getVar('meetingName'); $name = JRequest::getVar('display_name'); $pwd = JRequest::getVar('pwd'); $query = "SELECT * FROM #__bbb WHERE meetingName ='" . $meetingName . "'"; $db =& JFactory::getDBO(); $db->setQuery($query); $meeting = $db->loadObject(); if (!$meeting || $meeting == null) { $msg['message'] = "This meeting no longer exists."; return $msg; } if ($meeting->moderatorPW != $pwd && $meeting->attendeePW != $pwd) { $msg['message'] = "Incorrect Password."; return $msg; } // This is the security salt that must match the value set in the BigBlueButton server // This is the URL for the BigBlueButton server $query = "SELECT * FROM #__bbb_settings WHERE name = 'salt'"; $db->setQuery($query); $salt = $db->loadObject(); $query = "SELECT * FROM #__bbb_settings WHERE name = 'url'"; $db->setQuery($query); $url = $db->loadObject(); if (!$salt || $salt->varValue == '' || !$url || $url->varValue == '') { $msg['message'] = "You have to fill out the salt and url in the settings menu before you can join a meeting."; return $msg; } for (;;) { $response = BigBlueButton::createMeetingArray($name, $meeting->meetingName . "[" . $meeting->meetingVersion . "]", 'Welcome to ' . $meeting->meetingName . '.', $meeting->moderatorPW, $meeting->attendeePW, $salt->varValue, $url->varValue, JURI::base()); //Analyzes the bigbluebutton server's response if (!$response) { //If the server is unreachable, then prompts the user of the necessary action $msg['message'] = "Unable to join the meeting. Please check the url of the bigbluebutton server AND check to see if the bigbluebutton server is running."; return $msg; } else { if ($response['returncode'] == 'FAILED' && $response['messageKey'] != 'idNotUnique') { //The meeting was not created if ($response['messageKey'] == 'checksumError') { $msg['message'] = "A checksum error occured. Make sure you entered the correct salt."; } else { $msg['message'] = $response['message']; } return $msg; } else { if ($response['messageKey'] == 'idNotUnique' || $response['hasBeenForciblyEnded'] == 'true') { $meeting->meetingVersion = time(); $db->updateObject('#__bbb', $meeting, 'id', false); if ($db->getErrorNum()) { $msg['message'] = $db->getErrorMsg(); return $msg; } } else { //The meeting was created, and the user will now be joined $bbb_joinURL = BigBlueButton::joinURL($meeting->meetingName . "[" . $meeting->meetingVersion . "]", $name, $pwd, $salt->varValue, $url->varValue); if ($meeting->waitForModerator == 'yes' && $meeting->moderatorPW != $pwd && !BigBlueButton::isMeetingRunning($meeting->meetingName . "[" . $meeting->meetingVersion . "]", $url->varValue, $salt->varValue)) { $msg['message'] = "redirect"; $msg['bbb_joinURL'] = $bbb_joinURL; $msg['name'] = $name; //$msg['meetingID'] = urlencode($meeting->meetingName."[".$meeting->meetingVersion."]"); $msg['meetingID'] = BigBlueButton::isMeetingRunningURL($meeting->meetingName . "[" . $meeting->meetingVersion . "]", $url->varValue, $salt->varValue); return $msg; } ?> <script type="text/javascript"> window.location = "<?php echo $bbb_joinURL; ?> ";</script><?php return; } } } } }
$response = BigBlueButton::createMeetingArray($username,$meetingID,$bbb_welcome, $_moderatorPassword,$_attendeePassword, $salt, $url,$_logoutUrl); //Analyzes the bigbluebutton server's response if(!$response){//If the server is unreachable $msg->addError("UNABLE_TO_CONNECT_TO_BBB"); } else if( $response['returncode'] == 'FAILED' ) { //The meeting was not created if($response['messageKey'] == 'checksumError'){ $msg->addError("CHECKSUM_ERROR_BBB"); } else{ $msg = $response['message']; } } else{//"The meeting was created, and the user will now be joined " $bbb_joinURL = BigBlueButton::joinURL($meetingID,$username,"ap", $salt, $url); } $sql = "SELECT * from ".TABLE_PREFIX."bigbluebutton WHERE course_id = '$meetingID'"; $result = mysql_query($sql, $db); if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { /**** * SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY are defined in include/lib/constance.lib.inc * SUBLINK_TEXT_LEN determins the maxium length of the string to be displayed on "detail view" box. *****/ $list[] = '<a href="'.$bbb_joinURL.'"'. (strlen(htmlentities_utf8($row['message'])) > SUBLINK_TEXT_LEN ? ' title="'.htmlentities_utf8($row['course_timing']).'"' : '') .' title="'.htmlentities_utf8($row['course_timing']).'">'. validate_length(htmlentities_utf8($row['message']), SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY) .'</a>';
$response = BigBlueButton::createMeetingArray($username, $meetingID, null, "mp", "ap", $salt, $url, "http://bigbluebutton.org"); //Analyzes the bigbluebutton server's response if (!$response) { //If the server is unreachable $msg = 'Unable to join the meeting. Please check the url of the bigbluebutton server AND check to see if the bigbluebutton server is running.'; } else { if ($response['returncode'] == 'FAILED') { //The meeting was not created if ($response['messageKey'] == 'checksumError') { $msg = 'A checksum error occured. Make sure you entered the correct salt.'; } else { $msg = $response['message']; } } else { //The meeting was created, and the user will now be joined $bbb_joinURL = BigBlueButton::joinURL($meetingID, $username, $response['moderatorPW'], $salt, $url); ?> <script type="text/javascript"> window.location = "<?php echo $bbb_joinURL; ?> ";</script><?php return; } } } else { if ($_REQUEST['action'] == 'Join') { $msg = "All fields need to be filled"; } } include 'demo_header.php'; ?>
function getUrl($idConference, $room_type) { $lang =& DoceboLanguage::createInstance('conference', 'lms'); $conf = new Conference_Manager(); $conference = $conf->roomInfo($idConference); $acl_manager =& Docebo::user()->getAclManager(); $username = Docebo::user()->getUserName(); $u_info = $acl_manager->getUser(getLogUserId(), false); $user_email = $u_info[ACL_INFO_EMAIL]; $query2 = "SELECT * FROM " . $this->_getRoomTable() . " WHERE idConference = '" . $idConference . "'"; $re_room = $this->_query($query2); $room = $this->nextRow($re_room); if ($room["audiovideosettings"] == 0) { $av = "audio"; } else { $av = "av"; } $exit_url = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"] . "?modname=conference&op=list"; $clientId = ""; /*$res = $this->api_join_meeting(); if ($res && $res->result) { $clientId = ""; }*/ $name = $this->getRoomName($idConference); $url = Get::sett('bbb_server', ""); $salt = Get::sett('bbb_salt', ""); $moderator_password = Get::sett('bbb_password_moderator', ""); $viewer_password = Get::sett('bbb_password_viewer', ""); $response = BigBlueButton::createMeetingArray($username, $name, null, $moderator_password, $viewer_password, $salt, $url, $returnurl); if (checkPerm('mod', true)) { $password = $moderator_password; } else { $password = $viewer_password; } if (!$response) { //If the server is unreachable $msg = 'Unable to join the meeting. Please check the url of the video conference server AND check to see if the video conference server is running.'; } else { if ($response['returncode'] == 'FAILED') { //The meeting was not created if ($response['messageKey'] == 'checksumError') { $msg = 'A checksum error occured. Make sure you entered the correct salt.'; } else { $msg = $response['message']; } } else { $_url = BigBlueButton::joinURL($name, $username, $password, $salt, $url); } } //////////////////////////////////////////////////// $url = '<a onclick="window.open(this.href, \'\', \'\');return false;" href="' . str_replace('&', '&', $_url) . '">' . $lang->def('_JOIN_CONFERENCE') . '</a>'; return $url; }
/** *This method creates a meeting and returnS the join url for moderators. * *@param username *@param meetingID -- the unique meeting identifier used to store the meeting in the bigbluebutton server *@param welcomeString -- the welcome message to be displayed when a user logs in to the meeting *@param mPW -- the moderator password of the meeting *@param aPW -- the attendee password of the meeting *@param SALT -- the security salt of the bigbluebutton server *@param URL -- the url of the bigbluebutton server *@param logoutURL -- the url the user should be redirected to when they logout of bigbluebutton * *@return The joinURL if successful or an error message if unsuccessful */ public function createMeetingAndGetJoinURL( $username, $meetingID, $welcomeString, $mPW, $aPW, $SALT, $URL, $logoutURL ) { $xml = bbb_wrap_simplexml_load_file( BigBlueButton::createMeetingURL($username, $meetingID, $aPW, $mPW, $welcomeString, $logoutURL, $SALT, $URL ) ); if( $xml && $xml->returncode == 'SUCCESS' ) { return ( BigBlueButton::joinURL( $meetingID, $username, $mPW, $SALT, $URL, $logoutURL ) ); } else if( $xml ) { return ( $xml->messageKey.' : '.$xml->message ); } else { return ('Unable to fetch URL '.$url_create.$params.'&checksum='.sha1("create".$params.$SALT) ); } }
$response = BigBlueButton::createMeetingArray($_REQUEST['username'], $meetingID, null, $meeting['moderatorPW'], $meeting['attendeePW'], $salt, $url, "http://bigbluebutton.org"); //Analyzes the bigbluebutton server's response if (!$response) { //If the server is unreachable $msg = 'Unable to join the meeting. Please check the url of the bigbluebutton server AND check to see if the bigbluebutton server is running.'; } else { if ($response['returncode'] == 'FAILED') { //The meeting was not created if ($response['messageKey'] == 'checksumError') { $msg = 'A checksum error occured. Make sure you entered the correct salt.'; } else { $msg = $response['message']; } } else { //The meeting was created, and the user will now be joined $bbb_joinURL = BigBlueButton::joinURL($meetingID, $_REQUEST['username'], $password, $salt, $url); ?> <script type="text/javascript"> window.location = "<?php echo $bbb_joinURL; ?> ";</script><?php return; } } } else { $msg = 'Incorrect Password'; } } else { if ($_REQUEST['action'] == 'Join') { $msg = "All fields need to be filled"; }
?> "; } } </script> <?php } else { // // Join as Viewer, no wait check // print "<br />" . get_string('view_login_viewer', 'bigbluebutton') . "<br /><br />"; print "<center><img src='loading.gif' /></center>"; $response = BigBlueButton::createMeetingArray("", $bigbluebutton->meetingid, "", $modPW, $viewerPW, $salt, $url, $logoutURL); if (!$response) { // If the server is unreachable, then prompts the user of the necessary action error('Unable to join the meeting. Please contact your administrator.'); } if ($response['returncode'] == "FAILED") { // The meeting was not created if ($response['messageKey'] == "checksumError") { error(get_string('index_checksum_error', 'bigbluebutton')); } else { error($response['message']); } } $joinURL = BigBlueButton::joinURL($bigbluebutton->meetingid, $username, $viewerPW, $salt, $url, $userID); redirect($joinURL); } } // Finish the page print_footer($course);
//print "<br />".get_string('view_login_viewer', 'livewebteaching' )."<br /><br />"; //print "<center><img src='loading.gif' /></center>"; $response = BigBlueButton::createMeetingArray("", $livewebteaching->meetingid, $welcome_text, $modPW, $viewerPW, $salt, $url, $logoutURL); if (!$response) { // If the server is unreachable, then prompts the user of the necessary action error('Unable to join the live session. Please contact your administrator.'); } if ($response['returncode'] == "FAILED") { // The meeting was not created if ($response['messageKey'] == "checksumError") { error(get_string('index_checksum_error', 'livewebteaching')); } else { error($response['message']); } } $joinURL = BigBlueButton::joinURL($livewebteaching->meetingid, $username, $viewerPW, $salt, $url, $userID); ?> <iframe src ="<?php echo $joinURL; ?> " width="100%" height="100%" style="position: absolute: bottom: 0px; border: 0px;overflow:hidden;"></iframe> <?php } } ?> </div> <div id="footer_wcr_v3"> <span style="float: right; margin-top: 15px; margin-right: 10px; font-family: 'Trebuchet MS';">Powered by <a style="color: #fff;" href="http://www.livewebteaching.com" target="_blank">LiveWebTeaching.com</a></span> </div> </body>
$response = BigBlueButton::createMeetingArray($_REQUEST['username'], "Demo Meeting", null, "mp", "ap", $salt, $url, "http://bigbluebutton.org"); //Analyzes the bigbluebutton server's response if (!$response) { //If the server is unreachable $msg = 'Unable to join the meeting. Please check the url of the bigbluebutton server AND check to see if the bigbluebutton server is running.'; } else { if ($response['returncode'] == 'FAILED') { //The meeting was not created if ($response['messageKey'] == 'checksumError') { $msg = 'A checksum error occured. Make sure you entered the correct salt.'; } else { $msg = $response['message']; } } else { //The meeting was created, and the user will now be joined $bbb_joinURL = BigBlueButton::joinURL("Demo Meeting", $_REQUEST['username'], "mp", $salt, $url); ?> <script type="text/javascript"> window.location = "<?php echo $bbb_joinURL; ?> ";</script><?php return; } } } else { if ($_REQUEST['action'] == 'Join') { $msg = "You must enter your name."; } } include 'demo_header.php'; ?>
$ret = BigBlueButton::createMeetingArray($_POST['criador'], $_POST['sala'], null, 'serpromod', 'serpro', $salt, $url, 'http://10.200.118.193/git/bbb/'); if(!$ret) die('Pau geral, servidor nao respondeu.'); $ret = (object)$ret; if($ret->returncode == 'FAILED') die("Erro ({$ret->messageKey}): {$ret->message}"); else if($ret->returncode == 'SUCCESS' && $ret->messageKey == 'duplicateWarning') die("Já existe uma sala chamada \"{$ret->meetingID}\", escolha outro nome."); $urlmod = BigBlueButton::joinURL($_POST['sala'], $_POST['criador'], 'serpromod', $salt, $url); echo 'URLs dos convidados (copie os links e envie a cada um deles):<ul>'; for($i = 1; $i <= 8; ++$i) { $conv = $_POST["convidado_$i"]; if(!strlen($conv)) continue; $ismod = isset($_POST["mod_$i"]); $urlconv = BigBlueButton::joinURL($_POST['sala'], $conv, $ismod ? 'serpromod' : 'serpro', $salt, $url); echo "<li><a target=\"_blank\" href=\"$urlconv\">URL de $conv</a></li>"; } echo '</ul>'; echo "<p><a target=\"_blank\" href=\"$urlmod\">Sua URL para entrar na sala</a> (clique para entrar)</p>"; } else { ?> <!-- primeira exibição da página --> <h2>Criar sala de conferência</h2> <form method="post"> <p>Informe seu login (ex.: fulano.silva): <input type="text" name="criador"/></p> <p>Nome da sala: <input type="text" name="sala"/></p> Logins dos convidados (ex.: fulano.silva):<ul> <? for($i = 1; $i <= 8; ++$i) { ?> <li><?=$i?> <input type="text" name="convidado_<?=$i?>"/> <label><input type="checkbox" name="mod_<?=$i?>"/> moderador</label></li>
function bbb_list_meetings() { global $wpdb; $table_name = $wpdb->prefix . "bbb_meetingRooms"; global $url_name, $salt_name, $meetingID_name, $meetingVersion_name, $moderatorPW_name, $current_user, $attendeePW_name; //Displays the title of the page echo "<h2>List of Meeting Rooms</h2>"; $url_val = get_option($url_name); $salt_val = get_option($salt_name); //---------------------------------------------------JOIN----------------------------------------------- if (isset($_POST['Submit'])) { //Creates then joins the meeting. If any problems occur the error is displayed // Read the posted value and delete $meetingID = $_POST[$meetingID_name]; $found = $wpdb->get_row("SELECT * FROM " . $table_name . " WHERE meetingID = '" . $meetingID . "'"); $moderatorPW = $found->moderatorPW; $attendeePW = $found->attendeePW; $meetingVersion = $found->meetingVersion; if ($_POST['Submit'] == 'Join') { //Calls create meeting on the bigbluebutton server $response = BigBlueButton::createMeetingArray($current_user->display_name, $meetingID . "[" . $meetingVersion . "]", "", $moderatorPW, $attendeePW, $salt_val, $url_val, get_option('siteurl')); $createNew = false; //Analyzes the bigbluebutton server's response if (!$response) { //If the server is unreachable, then prompts the user of the necessary action echo '<div class="updated"><p><strong>Unable to join the meeting. Please check the url of the bigbluebutton server AND check to see if the bigbluebutton server is running.</strong></p></div>'; } else { if ($response['returncode'] == 'FAILED') { //The meeting was not created if ($response['messageKey'] == 'idNotUnique') { $createNew = true; } else { if ($response['messageKey'] == 'checksumError') { echo '<div class="updated"><p><strong>A checksum error occured. Make sure you entered the correct salt.</strong></p></div>'; } else { echo '<div class="updated"><p><strong>' . $response['message'] . '</strong></p></div>'; } } } else { $bbb_joinURL = BigBlueButton::joinURL($meetingID . "[" . $meetingVersion . "]", $current_user->display_name, $moderatorPW, $salt_val, $url_val); ?> <script type="text/javascript"> window.location = "<?php echo $bbb_joinURL; ?> ";</script><?php return; } } } else { if ($_POST['Submit'] == 'End') { //Obtains the meeting information of the meeting that is going to be terminated //Calls endMeeting on the bigbluebutton server $response = BigBlueButton::endMeeting($meetingID . "[" . $meetingVersion . "]", $moderatorPW, $url_val, $salt_val); //Analyzes the bigbluebutton server's response if (!$response) { //If the server is unreachable, then prompts the user of the necessary action echo '<div class="updated"><p><strong>Unable to terminate the meeting. Please check the url of the bigbluebutton server AND check to see if the bigbluebutton server is running.</strong></p></div>'; } else { if ($response['returncode'] == 'SUCCESS') { //The meeting was terminated echo '<div class="updated"><p><strong>' . $meetingID . ' meeting has been terminated.</strong></p></div>'; //In case the meeting is created again it sets the meeting version to the time stamp. Therefore the meeting can be recreated before the 1 hour rule without any problems. $meetingVersion = time(); $wpdb->update($table_name, array($meetingVersion_name => $meetingVersion), array($meetingID_name => $meetingID)); } else { //If the meeting was unable to be termindated if ($response['messageKey'] == 'checksumError') { echo '<div class="updated"><p><strong>A checksum error occured. Make sure you entered the correct salt.</strong></p></div>'; } else { echo '<div class="updated"><p><strong>' . $response['message'] . '</strong></p></div>'; } } } } else { if ($_POST['Submit'] == 'Delete') { //Obtains the meeting information of the meeting that is going to be delete //Calls endMeeting on the bigbluebutton server $response = BigBlueButton::endMeeting($meetingID . "[" . $meetingVersion . "]", $moderatorPW, $url_val, $salt_val); //Analyzes the bigbluebutton server's response if (!$response) { //If the server is unreachable, then prompts the user of the necessary action echo '<div class="updated"><p><strong>Unable to delete the meeting. Please check the url of the bigbluebutton server AND check to see if the bigbluebutton server is running.</strong></p></div>'; } else { if ($response['returncode'] != 'SUCCESS' && $response['messageKey'] != 'notFound') { //If the meeting was unable to be deleted due to an error if ($response['messageKey'] == 'checksumError') { echo '<div class="updated"><p><strong>A checksum error occured. Make sure you entered the correct salt.</strong></p></div>'; } else { echo '<div class="updated"><p><strong>' . $response['message'] . '</strong></p></div>'; } } else { //The meeting was terminated $wpdb->query("DELETE FROM " . $table_name . " WHERE meetingID = '" . $meetingID . "'"); echo '<div class="updated"><p><strong>' . $meetingID . ' meeting has been deleted.</strong></p></div>'; } } } } } } //Gets all the meetings from the wordpress db $listOfMeetings = $wpdb->get_results("SELECT meetingID, meetingVersion, attendeePW, moderatorPW, waitForModerator FROM " . $table_name . " ORDER BY meetingID"); //Checks to see if there are no meetings in the wordpress db and if so alerts the user if (count($listOfMeetings) == 0) { echo '<div class="updated"><p><strong>There are no meeting rooms.</strong></p></div>'; return; } //Iinitiallizes the table $printed = false; //Displays the meetings in the wordpress database that have not been created yet. Avoids displaying //duplicate meetings, meaning if the same meeting already exists in the bbb server then it is //not displayed again in this for loop foreach ($listOfMeetings as $meeting) { $info = BigBlueButton::getMeetingInfoArray($meeting->meetingID . "[" . $meeting->meetingVersion . "]", $meeting->moderatorPW, $url_val, $salt_val); //Analyzes the bigbluebutton server's response if (!$info) { //If the server is unreachable, then prompts the user of the necessary action echo '<div class="updated"><p><strong>Unable to display the meetings. Please check the url of the bigbluebutton server AND check to see if the bigbluebutton server is running.</strong></p></div>'; return; } else { if ($info['returncode'] && $info['messageKey'] != 'notFound' && $info['messageKey'] != 'invalidPassword') { //If the meeting was unable to be deleted due to an error if ($info['messageKey'] == 'checksumError') { echo '<div class="updated"><p><strong>A checksum error occured. Make sure you entered the correct salt.</strong></p></div>'; } else { echo '<div class="updated"><p><strong>' . $info['message'] . '</strong></p></div>'; } return; } else { if ($info['returncode'] && ($info['messageKey'] == 'notFound' || $info['messageKey'] != 'invalidPassword')) { //The meeting exists only in the wordpress db if (!$printed) { bbb_print_table_header(); $printed = true; } ?> <form name="form1" method="post" action=""> <input type="hidden" name="<?php echo $meetingID_name; ?> " value="<?php echo $meeting->meetingID; ?> "> <tr> <td><?php echo $meeting->meetingID; ?> </td> <td><?php echo $meeting->attendeePW; ?> </td> <td><?php echo $meeting->moderatorPW; ?> </td> <td> <?php if ($meeting->waitForModerator) { echo "Yes"; } else { echo "No"; } ?> </td> <td>No</td> <td> <input type="submit" name="Submit" class="button-primary" value="Join" /> <input type="submit" name="Submit" onClick="return confirm('Are you sure you want to delete the meeting?')" class="button-primary" value="Delete"/> </td> </tr> </form> <?php } else { //The meeting exists in the bbb server if (!$printed) { bbb_print_table_header(); $printed = true; } ?> <form name="form1" method="post" action=""> <input type="hidden" name="<?php echo $meetingID_name; ?> " value="<?php echo $meeting->meetingID; ?> "> <tr> <td><?php echo $meeting->meetingID; ?> </td> <td><?php echo $meeting->attendeePW; ?> </td> <td><?php echo $meeting->moderatorPW; ?> </td> <td> <?php if ($meeting->waitForModerator) { echo "Yes"; } else { echo "No"; } ?> </td> <td> <?php if ($info['running'] == 'true') { echo "Yes"; } else { echo "No"; } ?> </td> <?php if ($info['hasBeenForciblyEnded'] == 'false') { ?> <td> <input type="submit" name="Submit" class="button-primary" value="Join" /> <input type="submit" name="Submit" onClick="return confirm('Are you sure you want to end the meeting?')" class="button-primary" value="End" /> <input type="submit" name="Submit" onClick="return confirm('Are you sure you want to delete the meeting?')" class="button-primary" value="Delete" /> </td> <?php } else { ?> <td> <!-- Meeting has ended and is temporarily unavailable. --> <input type="submit" name="Submit" class="button-primary" value="Join" /> <input type="submit" name="Submit" onClick="return confirm('Are you sure you want to delete the meeting?')" class="button-primary" value="Delete" /> </td> <?php } ?> </tr> </form> <?php } } } } ?> </table> </div> <?php }
break; case 'isMeetingRunning': /* * This function proxy the request "isMeetingRunning" through PHP Script to BBB Server so we don't have any AJAX security issue */ ob_clean(); $checkMeetingStatus = BigBlueButton::isMeetingRunningURL($_REQUEST['meetingID'], $url, $salt); echo file_get_contents($checkMeetingStatus); die; break; case 'join': /* * We have an invite request to join an existing meeting and the meeting is running * We don't need to pass a meeting description as it's already been set by the first time the meeting was created. */ $bbb_joinURL = BigBlueButton::joinURL($_REQUEST['meetingID'], $_REQUEST['username'], "ap", $salt, $url); ?> <script language="javascript" type="text/javascript">window.location.href="<?php echo $bbb_joinURL; ?> ";</script> <?php break; default: break; } switch ($step) { case '1': include 'demo_header.php'; ?> <h2>Demo #5: Create Your Own Meeting</h2>