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>
|
2023-05-25 23:08:30 +02:00
|
|
|
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
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
|
|
|
|
2022-10-11 00:35:14 +02:00
|
|
|
//includes files
|
2023-06-15 19:28:23 +02:00
|
|
|
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
2019-06-16 18:00:34 +02:00
|
|
|
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
|
|
|
$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 {
|
2019-06-16 21:22:51 +02:00
|
|
|
$xml_string = trim(event_socket_request($fp, 'api conference xml_list'));
|
2019-06-16 18:02:00 +02:00
|
|
|
try {
|
2019-06-16 21:22:51 +02:00
|
|
|
$xml = new SimpleXMLElement($xml_string);
|
2019-06-16 18:02:00 +02:00
|
|
|
}
|
|
|
|
|
catch(Exception $e) {
|
|
|
|
|
//echo $e->getMessage();
|
|
|
|
|
}
|
2012-06-04 16:58:40 +02:00
|
|
|
|
2019-11-03 03:13:40 +01:00
|
|
|
echo "<table class='list'>\n";
|
|
|
|
|
echo "<tr class='list-header'>\n";
|
|
|
|
|
echo " <th>".$text['label-name']."</th>\n";
|
2023-01-31 20:59:08 +01:00
|
|
|
echo " <th>".$text['label-extension']."</th>\n";
|
2019-11-03 03:13:40 +01:00
|
|
|
echo " <th>".$text['label-participant-pin']."</th>\n";
|
2020-01-13 21:54:08 +01:00
|
|
|
echo " <th class='center'>".$text['label-member-count']."</th>\n";
|
2019-11-03 03:13:40 +01:00
|
|
|
if (permission_exists('conference_interactive_view')) {
|
|
|
|
|
echo " <td class='action-button'> </td>\n";
|
|
|
|
|
}
|
2019-06-16 18:02:00 +02:00
|
|
|
echo "</tr>\n";
|
2019-11-03 03:13:40 +01:00
|
|
|
$x = 0;
|
2019-06-16 18:02:00 +02:00
|
|
|
foreach ($xml->conference as $row) {
|
2021-05-27 10:30:49 +02:00
|
|
|
|
2019-06-16 18:02:00 +02:00
|
|
|
//set the variables
|
|
|
|
|
$name = $row['name'];
|
|
|
|
|
$member_count = $row['member-count'];
|
2021-05-27 10:30:49 +02:00
|
|
|
|
2019-06-16 18:02:00 +02:00
|
|
|
//show the conferences that have a matching domain
|
2019-06-16 21:22:51 +02:00
|
|
|
$name_array = explode('@', $name);
|
|
|
|
|
if ($name_array[1] == $_SESSION['domain_name']) {
|
2019-08-28 18:14:30 +02:00
|
|
|
$conference_uuid = $name_array[0];
|
2021-04-28 22:23:35 +02:00
|
|
|
|
|
|
|
|
//if uuid then lookup the conference name
|
|
|
|
|
if (isset($name_array[0]) && is_uuid($name_array[0])) {
|
2019-08-28 18:14:30 +02:00
|
|
|
//check for the conference center room
|
2019-06-16 18:02:00 +02:00
|
|
|
$sql = "select ";
|
2023-01-31 20:59:08 +01:00
|
|
|
$sql .= "cr.conference_room_name, ";
|
|
|
|
|
$sql .= "cc.conference_center_extension, ";
|
|
|
|
|
$sql .= "cr.participant_pin ";
|
|
|
|
|
$sql .= "from v_conference_rooms as cr ";
|
|
|
|
|
$sql .= "left join v_conference_centers as cc on cr.conference_center_uuid = cc.conference_center_uuid ";
|
|
|
|
|
$sql .= "where cr.conference_room_uuid = :conference_room_uuid ";
|
2021-05-27 10:30:49 +02:00
|
|
|
$parameters['conference_room_uuid'] = $conference_uuid;
|
2019-06-16 21:22:51 +02:00
|
|
|
$database = new database;
|
|
|
|
|
$conference = $database->select($sql, $parameters, 'row');
|
|
|
|
|
$conference_name = $conference['conference_room_name'];
|
2023-01-31 20:59:08 +01:00
|
|
|
$conference_extension = $conference['conference_center_extension'];
|
2019-06-16 21:22:51 +02:00
|
|
|
$participant_pin = $conference['participant_pin'];
|
|
|
|
|
unset ($parameters, $conference, $sql);
|
2023-01-31 20:59:08 +01:00
|
|
|
}
|
|
|
|
|
else if (isset($name_array[0]) && is_numeric($name_array[0])) {
|
2019-08-28 18:14:30 +02:00
|
|
|
//check the conference table
|
2023-01-31 20:59:08 +01:00
|
|
|
$sql = "select ";
|
|
|
|
|
$sql .= "conference_name, ";
|
|
|
|
|
$sql .= "conference_extension, ";
|
|
|
|
|
$sql .= "conference_pin_number ";
|
|
|
|
|
$sql .= "from ";
|
|
|
|
|
$sql .= "v_conferences ";
|
|
|
|
|
$sql .= "where ";
|
|
|
|
|
$sql .= "domain_uuid = :domain_uuid ";
|
|
|
|
|
$sql .= "and conference_extension = :conference_extension ";
|
|
|
|
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
|
|
|
|
$parameters['conference_extension'] = $name_array[0];
|
|
|
|
|
$database = new database;
|
|
|
|
|
$conference = $database->select($sql, $parameters, 'row');
|
|
|
|
|
$conference_name = $conference['conference_name'];
|
|
|
|
|
$conference_extension = $conference['conference_extension'];
|
|
|
|
|
$participant_pin = $conference['conference_pin_number'];
|
|
|
|
|
unset ($parameters, $sql);
|
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')) {
|
2019-11-03 03:13:40 +01:00
|
|
|
$list_row_url = 'conference_interactive.php?c='.urlencode($conference_uuid);
|
|
|
|
|
}
|
2021-04-28 22:23:35 +02:00
|
|
|
|
2019-11-03 03:13:40 +01:00
|
|
|
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
2020-01-13 21:54:08 +01:00
|
|
|
echo " <td>";
|
2019-11-03 03:13:40 +01:00
|
|
|
if (permission_exists('conference_interactive_view')) {
|
|
|
|
|
echo " <a href='".$list_row_url."'>".escape($conference_name)."</a>";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo escape($conference_name);
|
|
|
|
|
}
|
|
|
|
|
echo " </td>\n";
|
2023-01-31 20:59:08 +01:00
|
|
|
echo " <td>".escape($conference_extension)."</td>\n";
|
2020-01-13 21:54:08 +01:00
|
|
|
echo " <td>".escape($participant_pin)."</td>\n";
|
|
|
|
|
echo " <td class='center'>".escape($member_count)."</td>\n";
|
2023-05-25 23:08:30 +02:00
|
|
|
if (permission_exists('conference_interactive_view') && !empty($_SESSION['theme']['list_row_edit_button']['boolean']) && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
2019-11-03 03:13:40 +01:00
|
|
|
echo " <td class='action-button'>";
|
|
|
|
|
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]);
|
|
|
|
|
echo " </td>\n";
|
2019-06-16 18:02:00 +02:00
|
|
|
}
|
|
|
|
|
echo "</tr>\n";
|
2019-11-03 03:13:40 +01:00
|
|
|
$x++;
|
2019-06-16 18:02:00 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
echo "</table>\n";
|
|
|
|
|
echo "<br /><br />";
|
2012-06-04 16:58:40 +02:00
|
|
|
}
|
2019-08-10 20:06:51 +02:00
|
|
|
|
2023-05-25 23:08:30 +02:00
|
|
|
?>
|