From 68095b2afa4a6e4e0f8035477d6303d5deb32f31 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 27 Oct 2012 06:47:47 +0000 Subject: [PATCH] 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. --- app/conference_centers/conference_centers.php | 2 +- .../conference_room_edit.php | 3 +- app/conference_centers/conference_rooms.php | 79 +++++++++++++++---- .../conference_sessions.php | 5 +- 4 files changed, 72 insertions(+), 17 deletions(-) diff --git a/app/conference_centers/conference_centers.php b/app/conference_centers/conference_centers.php index 1abca3cdc..68025242a 100644 --- a/app/conference_centers/conference_centers.php +++ b/app/conference_centers/conference_centers.php @@ -50,7 +50,7 @@ require_once "includes/paging.php"; echo "\n"; echo " \n"; echo "\n"; - echo "\n"; + echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "\n"; diff --git a/app/conference_centers/conference_rooms.php b/app/conference_centers/conference_rooms.php index 638223b01..b10899cde 100644 --- a/app/conference_centers/conference_rooms.php +++ b/app/conference_centers/conference_rooms.php @@ -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 "
\n";
+	//print_r($conference);
+	//echo "
\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 "
\n"; echo "
Conference Centers
\n"; diff --git a/app/conference_centers/conference_room_edit.php b/app/conference_centers/conference_room_edit.php index c36c3d761..258c4131e 100644 --- a/app/conference_centers/conference_room_edit.php +++ b/app/conference_centers/conference_room_edit.php @@ -383,7 +383,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "Conference Room\n"; if (strlen($meeting_uuid) > 0) { - echo " \n"; + echo " \n"; + echo " \n"; } echo " \n"; echo "
\n"; echo "\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 "\n"; + echo "\n"; echo th_order_by('description', 'Description', $order_by, $order); - echo "\n"; //echo " \n"; //echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - //echo " \n"; - echo " \n"; - //echo " \n"; - //echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + //echo " \n"; + echo " \n"; + //echo " \n"; + //echo " \n"; + echo " \n"; + if (strlen($conference[$meeting_uuid]["session_uuid"])) { + echo " \n"; + } + else { + echo " \n"; + } + echo " \n"; + echo " \n"; echo "
CountTools\n"; + echo "\n"; if (permission_exists('conference_room_add')) { echo " $v_link_label_add\n"; } @@ -121,20 +160,32 @@ require_once "includes/paging.php"; if ($result_count > 0) { foreach($result as $row) { + $meeting_uuid = $row['meeting_uuid']; echo "
".$row['conference_center_uuid']." ".$row['meeting_uuid']." ".$row['profile']." ".$row['record']." ".$row['max_members']." ".$row['wait_mod']." ".$row['announce']." ".$row['enter_sound']." ".$row['mute']." ".$row['created']." ".$row['created_by']." ".$row['enabled']." ".$row['description']." ".$row['profile']." ".$row['record']." ".$row['max_members']." ".$row['wait_mod']." ".$row['announce']." ".$row['enter_sound']." ".$row['mute']." ".$row['created']." ".$row['created_by']." ".$row['enabled']." ".$conference[$meeting_uuid]["member_count"]." 0\n"; + echo " View \n"; + echo " Sessions\n"; + + echo " ".$row['description']." \n"; if (permission_exists('conference_room_edit')) { echo " $v_link_label_edit\n"; diff --git a/app/conference_centers/conference_sessions.php b/app/conference_centers/conference_sessions.php index 6612c72a6..8da12ad39 100644 --- a/app/conference_centers/conference_sessions.php +++ b/app/conference_centers/conference_sessions.php @@ -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 "\n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo "
Conference Sessions
\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 "; }