2012-06-04 16:58:40 +02:00
|
|
|
<?php
|
|
|
|
|
/*
|
|
|
|
|
FusionPBX
|
|
|
|
|
Version: MPL 1.1
|
|
|
|
|
|
|
|
|
|
The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
|
1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
http://www.mozilla.org/MPL/
|
|
|
|
|
|
|
|
|
|
Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
|
for the specific language governing rights and limitations under the
|
|
|
|
|
License.
|
|
|
|
|
|
|
|
|
|
The Original Code is FusionPBX
|
|
|
|
|
|
|
|
|
|
The Initial Developer of the Original Code is
|
|
|
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
2019-06-16 18:00:34 +02:00
|
|
|
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
2012-06-04 16:58:40 +02:00
|
|
|
the Initial Developer. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
Contributor(s):
|
|
|
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
2012-11-24 18:58:54 +01:00
|
|
|
James Rose <james.o.rose@gmail.com>
|
2012-06-04 16:58:40 +02:00
|
|
|
*/
|
2019-06-16 18:00:34 +02:00
|
|
|
|
|
|
|
|
//includes
|
|
|
|
|
include "root.php";
|
|
|
|
|
require_once "resources/require.php";
|
|
|
|
|
require_once "resources/check_auth.php";
|
|
|
|
|
|
|
|
|
|
//check permissions
|
|
|
|
|
if (permission_exists('conference_active_view')) {
|
|
|
|
|
//access granted
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo "access denied";
|
|
|
|
|
exit;
|
|
|
|
|
}
|
2012-06-04 16:58:40 +02:00
|
|
|
|
2012-11-24 18:58:54 +01:00
|
|
|
//add multi-lingual support
|
2015-01-18 11:06:08 +01:00
|
|
|
$language = new text;
|
|
|
|
|
$text = $language->get();
|
2012-11-24 18:58:54 +01:00
|
|
|
|
2019-06-16 18:00:34 +02:00
|
|
|
//show content
|
2019-06-16 18:02:00 +02:00
|
|
|
$switch_cmd = 'conference xml_list';
|
|
|
|
|
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
|
|
|
|
if (!$fp) {
|
|
|
|
|
$msg = "<div align='center'>".$text['message-connection']."<br /></div>";
|
|
|
|
|
echo "<div align='center'>\n";
|
|
|
|
|
echo "<table width='40%'>\n";
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<th align='left'>".$text['label-message']."</th>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td class='row_style1'><strong>$msg</strong></td>\n";
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
echo "</table>\n";
|
|
|
|
|
echo "</div>\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
}
|
2019-06-16 18:02:00 +02:00
|
|
|
else {
|
|
|
|
|
$xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
|
|
|
|
try {
|
|
|
|
|
$xml = new SimpleXMLElement($xml_str);
|
|
|
|
|
}
|
|
|
|
|
catch(Exception $e) {
|
|
|
|
|
//echo $e->getMessage();
|
|
|
|
|
}
|
2012-06-04 16:58:40 +02:00
|
|
|
|
2019-06-16 18:02:00 +02:00
|
|
|
$c = 0;
|
|
|
|
|
$row_style["0"] = "row_style0";
|
|
|
|
|
$row_style["1"] = "row_style1";
|
2012-06-04 16:58:40 +02:00
|
|
|
|
2019-06-16 18:02:00 +02:00
|
|
|
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<th>".$text['label-name']."</th>\n";
|
|
|
|
|
echo "<th>".$text['label-participant-pin']."</th>\n";
|
|
|
|
|
echo "<th>".$text['label-member-count']."</th>\n";
|
|
|
|
|
echo "<th> </th>\n";
|
|
|
|
|
echo "</tr>\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
|
2019-06-16 18:02:00 +02:00
|
|
|
foreach ($xml->conference as $row) {
|
|
|
|
|
//set the variables
|
|
|
|
|
$name = $row['name'];
|
|
|
|
|
$member_count = $row['member-count'];
|
|
|
|
|
//show the conferences that have a matching domain
|
|
|
|
|
$tmp_domain = substr($name, -strlen($_SESSION['domain_name']));
|
|
|
|
|
if ($tmp_domain == $_SESSION['domain_name']) {
|
|
|
|
|
$conference_name = substr($name, 0, strlen($name) - strlen('@'.$_SESSION['domain_name']));
|
|
|
|
|
if (is_uuid($conference_name)) {
|
|
|
|
|
$meeting_uuid = $conference_name;
|
|
|
|
|
$sql = "select ";
|
|
|
|
|
$sql .= "cr.conference_room_name, ";
|
|
|
|
|
$sql .= "v.participant_pin ";
|
|
|
|
|
$sql .= "from ";
|
|
|
|
|
$sql .= "v_meetings as v, ";
|
|
|
|
|
$sql .= "v_conference_rooms as cr ";
|
|
|
|
|
$sql .= "where ";
|
|
|
|
|
$sql .= "v.meeting_uuid = cr.meeting_uuid ";
|
|
|
|
|
$sql .= "and v.meeting_uuid = '".$conference_name."' ";
|
|
|
|
|
$prep_statement = $db->prepare(check_sql($sql));
|
|
|
|
|
$prep_statement->execute();
|
|
|
|
|
$result = $prep_statement->fetchAll();
|
|
|
|
|
foreach ($result as $row2) {
|
|
|
|
|
$conference_name = $row2['conference_room_name'];
|
|
|
|
|
$participant_pin = $row2['participant_pin'];
|
|
|
|
|
}
|
|
|
|
|
unset ($prep_statement, $row2);
|
2015-01-17 07:59:12 +01:00
|
|
|
}
|
2019-06-16 18:02:00 +02:00
|
|
|
else {
|
|
|
|
|
$meeting_uuid = $conference_name;
|
|
|
|
|
$sql = "select ";
|
|
|
|
|
$sql .= "conference_pin_number ";
|
|
|
|
|
$sql .= "from ";
|
|
|
|
|
$sql .= "v_conferences ";
|
|
|
|
|
$sql .= "where ";
|
|
|
|
|
$sql .= "domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
|
|
|
|
$sql .= "and conference_name = '".$conference_name."' ";
|
|
|
|
|
$prep_statement = $db->prepare(check_sql($sql));
|
|
|
|
|
$prep_statement->execute();
|
|
|
|
|
$result = $prep_statement->fetchAll();
|
|
|
|
|
foreach ($result as $row3) {
|
|
|
|
|
$participant_pin = $row3['conference_pin_number'];
|
|
|
|
|
}
|
|
|
|
|
unset ($prep_statement, $row3);
|
2015-02-12 03:09:59 +01:00
|
|
|
}
|
2015-01-17 07:59:12 +01:00
|
|
|
|
2019-06-16 18:02:00 +02:00
|
|
|
if (permission_exists('conference_interactive_view')) {
|
|
|
|
|
$td_onclick = "onclick=\"document.location.href='conference_interactive.php?c=".escape($meeting_uuid)."'\"";
|
|
|
|
|
}
|
|
|
|
|
echo "<tr>\n";
|
|
|
|
|
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">";
|
|
|
|
|
echo (permission_exists('conference_interactive_view')) ? "<a href='conference_interactive.php?c=".escape($meeting_uuid)."'>".escape($conference_name)."</a>" : escape($conference_name);
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".escape($participant_pin)."</td>\n";
|
|
|
|
|
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".escape($member_count)."</td>\n";
|
|
|
|
|
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">";
|
|
|
|
|
echo (permission_exists('conference_interactive_view')) ? "<a href='conference_interactive.php?c=".escape($meeting_uuid)."'>".$text['button-view']."</a>" : " ";
|
|
|
|
|
echo "</td>\n";
|
|
|
|
|
echo "</tr>\n";
|
2012-06-04 16:58:40 +02:00
|
|
|
|
2019-06-16 18:02:00 +02:00
|
|
|
if ($c==0) { $c=1; } else { $c=0; }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
echo "</table>\n";
|
|
|
|
|
echo "<br /><br />";
|
2012-06-04 16:58:40 +02:00
|
|
|
}
|
2019-06-16 18:00:34 +02:00
|
|
|
?>
|