/**
     * 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;
                    }
                }
            }
        }
    }
$link_limit = 3;		// Number of links to be displayed on "detail view" box

require_once("bbb_api_conf.php");
require_once("bbb_api.php");

$bbb_joinURL;
$_moderatorPassword="******";
$_attendeePassword="******";   
$_logoutUrl= $_base_href.'index.php';
$username=get_login(intval($_SESSION["member_id"]));
$meetingID=$_SESSION['course_id'];
$bbb_welcome = _AT('bbb_welcome');
$salt = $_config['bbb_salt'];
$url = $_config['bbb_url']."/bigbluebutton/";

$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);
Пример #4
0
require 'bbb_api_conf.php';
//enter the salt, and url in this file
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Join a Selected Course</title>
</head>
<body>
<br />
<?php 
if ($_REQUEST['action'] == 'Join' && trim($_REQUEST['username']) && trim($_REQUEST['meetingID'])) {
    $meetingID = trim($_REQUEST['meetingID']);
    $username = trim($_REQUEST['username']);
    $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);
Пример #5
0
                        if ( isMeeting ) {
                                window.location = "<?php 
        echo $joinURL;
        ?>
";
                        }
                }
</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);
    }
Пример #6
0
 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('&', '&amp;', $_url) . '">' . $lang->def('_JOIN_CONFERENCE') . '</a>';
     return $url;
 }
Пример #7
0
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Join a Selected Course</title>
</head>
<body>
<br />
<?php 
if ($_REQUEST['action'] == 'Join' && trim($_REQUEST['username']) && trim($_REQUEST['meetingID']) && trim($_REQUEST['password'])) {
    $meetingID = trim($_REQUEST['meetingID']);
    $username = trim($_REQUEST['username']);
    $password = trim($_REQUEST['password']);
    $meeting = $meetings[$meetingID];
    if ($password == $meeting['moderatorPW'] || $password == $meeting['attendeePW']) {
        $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);
            echo $joinURL;
            ?>
";
								window.location.reload(true);
                        }
                }
</script>
<?php 
        }
    } else {
        //
        // Join as Viewer, no wait check
        //
        //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 
Пример #9
0
//enter the salt, and url in this file
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>Join a Course</title>
</head>
<body>
<br />

<?php 
if ($_REQUEST['action'] == 'Join' && trim($_REQUEST['username'])) {
    //Calls endMeeting on the bigbluebutton server
    $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);
Пример #10
0
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
	<title>Conferência BigBlueButton</title>
</head>
<body>

<?php
require_once('bbb_api.php');
require_once('bbb_api_conf.php');

if(isset($_POST['criador'])) { // criação de nova sala
	$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>";
	}
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 
}