Change conference center session link to conference rooms. Add conference session link and make it show only sessions for that conference room. Add ability to see how many conference members are in a room from conference rooms list.

This commit is contained in:
Mark Crane 2012-10-27 06:47:47 +00:00
parent 012e7e8b9b
commit 68095b2afa
4 changed files with 72 additions and 17 deletions

View File

@ -50,7 +50,7 @@ require_once "includes/paging.php";
echo "<table width='100%' border='0'>\n";
echo " <tr>\n";
echo "<td align='left' width='30%' nowrap='nowrap'><b>Conference Centers</b></td>\n";
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='conference_sessions.php'\" value='Sessions'></td>\n";
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='conference_rooms.php'\" value='back'></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align='left' colspan='2'>\n";

View File

@ -383,7 +383,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "<td align='left' width='30%' nowrap='nowrap'><b>Conference Room</b></td>\n";
echo "<td width='70%' align='right'>\n";
if (strlen($meeting_uuid) > 0) {
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='/app/conferences_active/conference_interactive.php?c=".$meeting_uuid."'\" value='View'>\n";
echo " <input type='button' class='btn' name='' alt='Session' onclick=\"window.location='conference_sessions.php?id=".$meeting_uuid."'\" value='Session'>\n";
echo " <input type='button' class='btn' name='' alt='View' onclick=\"window.location='".PROJECT_PATH."/app/conferences_active/conference_interactive.php?c=".$meeting_uuid."'\" value='View'>\n";
}
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='conference_rooms.php'\" value='Back'>\n";
echo "</td>\n";

View File

@ -36,6 +36,42 @@ else {
require_once "includes/header.php";
require_once "includes/paging.php";
//get conference array
$switch_cmd = "conference xml_list";
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if (!$fp) {
}
else {
$xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
try {
$xml = new SimpleXMLElement($xml_str, true);
}
catch(Exception $e) {
//echo $e->getMessage();
}
foreach ($xml->conference as $row) {
//convert the xml object to an array
$json = json_encode($row);
$row = json_decode($json, true);
//set the variables
$conference_name = $row['@attributes']['name'];
$session_uuid = $row['@attributes']['uuid'];
$member_count = $row['@attributes']['member-count'];
//show the conferences that have a matching domain
$tmp_domain = substr($conference_name, -strlen($_SESSION['domain_name']));
if ($tmp_domain == $_SESSION['domain_name']) {
$meeting_uuid = substr($conference_name, 0, strlen($conference_name) - strlen('-'.$_SESSION['domain_name']));
$conference[$meeting_uuid]["conference_name"] = $conference_name;
$conference[$meeting_uuid]["session_uuid"] = $session_uuid;
$conference[$meeting_uuid]["member_count"] = $member_count;
}
}
}
//echo "<pre>\n";
//print_r($conference);
//echo "</pre>\n";
//get variables used to control the order
$order_by = $_GET["order_by"];
$order = $_GET["order"];
@ -96,20 +132,23 @@ require_once "includes/paging.php";
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
//echo th_order_by('conference_center_uuid', 'Conference UUID', $order_by, $order);
//echo th_order_by('meeting_uuid', 'Meeting UUID', $order_by, $order);
echo th_order_by('profile', 'Profile', $order_by, $order);
echo th_order_by('record', 'Record', $order_by, $order);
echo th_order_by('max_members', 'Max Members', $order_by, $order);
echo th_order_by('wait_mod', 'Wait for Moderator', $order_by, $order);
echo th_order_by('max_members', 'Max', $order_by, $order);
echo th_order_by('wait_mod', 'Wait Moderator', $order_by, $order);
echo th_order_by('announce', 'Announce', $order_by, $order);
//echo th_order_by('enter_sound', 'Enter Sound', $order_by, $order);
echo th_order_by('mute', 'Mute', $order_by, $order);
//echo th_order_by('created', 'Created', $order_by, $order);
//echo th_order_by('created_by', 'Created By', $order_by, $order);
echo th_order_by('enabled', 'Enabled', $order_by, $order);
echo "<th>Count</th>\n";
echo "<th>Tools</th>\n";
echo th_order_by('description', 'Description', $order_by, $order);
echo "<td align='right' width='42'>\n";
echo "<td align='right' width='42' nowrap='nowrap'>\n";
if (permission_exists('conference_room_add')) {
echo " <a href='conference_room_edit.php' alt='add'>$v_link_label_add</a>\n";
}
@ -121,20 +160,32 @@ require_once "includes/paging.php";
if ($result_count > 0) {
foreach($result as $row) {
$meeting_uuid = $row['meeting_uuid'];
echo "<tr >\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['conference_center_uuid']."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['meeting_uuid']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['profile']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['record']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['max_members']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['wait_mod']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['announce']."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['enter_sound']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['mute']."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['created']."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['created_by']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['enabled']."&nbsp;</td>\n";
echo " <td valign='top' class='row_stylebg' width='30%'>".$row['description']."&nbsp;</td>\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['profile']."&nbsp;</td>\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['record']."&nbsp;</td>\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['max_members']."&nbsp;</td>\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['wait_mod']."&nbsp;</td>\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['announce']."&nbsp;</td>\n";
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['enter_sound']."&nbsp;</td>\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['mute']."&nbsp;</td>\n";
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['created']."&nbsp;</td>\n";
//echo " <td valign='middle' class='".$row_style[$c]."'>".$row['created_by']."&nbsp;</td>\n";
echo " <td valign='middle' class='".$row_style[$c]."'>".$row['enabled']."&nbsp;</td>\n";
if (strlen($conference[$meeting_uuid]["session_uuid"])) {
echo " <td valign='middle' class='".$row_style[$c]."'>".$conference[$meeting_uuid]["member_count"]."&nbsp;</td>\n";
}
else {
echo " <td valign='middle' class='".$row_style[$c]."'>0</td>\n";
}
echo " <td valign='middle' class='".$row_style[$c]."'>\n";
echo " <a href='".PROJECT_PATH."/app/conferences_active/conference_interactive.php?c=".$row['meeting_uuid']."'>View</a>&nbsp;\n";
echo " <a href='conference_sessions.php?id=".$row['meeting_uuid']."'>Sessions</a>\n";
echo " </td>\n";
echo " <td valign='middle' class='row_stylebg' width='20%' nowrap='nowrap'>".$row['description']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n";
if (permission_exists('conference_room_edit')) {
echo " <a href='conference_room_edit.php?id=".$row['conference_room_uuid']."' alt='edit'>$v_link_label_edit</a>\n";

View File

@ -36,6 +36,7 @@ require_once "includes/header.php";
require_once "includes/paging.php";
//set variables from the http values
$meeting_uuid = check_str($_GET["id"]);
$order_by = check_str($_GET["order_by"]);
$order = check_str($_GET["order"]);
@ -49,7 +50,7 @@ require_once "includes/paging.php";
echo "<table width='100%' border='0'>\n";
echo " <tr>\n";
echo " <td width='50%' align='left' nowrap='nowrap'><b>Conference Sessions</b></td>\n";
echo " <td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='conference_centers.php'\" value='Back'></td>\n";
echo " <td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='conference_rooms.php'\" value='Back'></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align='left' colspan='2'>\n";
@ -61,6 +62,7 @@ require_once "includes/paging.php";
//prepare to page the results
$sql = "select count(*) as num_rows from v_conference_sessions ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and meeting_uuid = '$meeting_uuid' ";
$prep_statement = $db->prepare($sql);
if ($prep_statement) {
$prep_statement->execute();
@ -84,6 +86,7 @@ require_once "includes/paging.php";
//get the list
$sql = "select * from v_conference_sessions ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and meeting_uuid = '$meeting_uuid' ";
if (strlen($order_by) == 0) {
$sql .= "order by start_epoch desc ";
}