2012-09-13 06:45:57 +02:00
< ? php
2012-10-05 07:50:20 +02:00
/*
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-12-19 04:14:29 +01:00
Portions created by the Initial Developer are Copyright ( C ) 2008 - 2019
2012-10-05 07:50:20 +02:00
the Initial Developer . All Rights Reserved .
Contributor ( s ) :
Mark J Crane < markjcrane @ fusionpbx . com >
*/
2018-06-06 18:33:52 +02:00
//includes
require_once " root.php " ;
require_once " resources/require.php " ;
require_once " resources/check_auth.php " ;
2020-01-06 19:14:01 +01:00
require_once " resources/paging.php " ;
2018-06-06 18:33:52 +02:00
//check permissions
if ( permission_exists ( 'conference_room_view' )) {
//access granted
}
else {
echo " access denied " ;
exit ;
}
2012-11-07 10:41:43 +01:00
//add multi-lingual support
2015-01-18 11:06:08 +01:00
$language = new text ;
$text = $language -> get ();
2012-11-07 10:41:43 +01:00
2020-01-14 01:15:42 +01:00
//get the http post data
if ( is_array ( $_POST [ 'conference_rooms' ])) {
$action = $_POST [ 'action' ];
$toggle_field = $_POST [ 'toggle_field' ];
$search = $_POST [ 'search' ];
$conference_rooms = $_POST [ 'conference_rooms' ];
}
//process the http post data by action
if ( $action != '' && is_array ( $conference_rooms ) && @ sizeof ( $conference_rooms ) != 0 ) {
switch ( $action ) {
case 'toggle' :
if ( permission_exists ( 'conference_room_edit' )) {
$obj = new conference_centers ;
$obj -> toggle_field = $toggle_field ;
$obj -> toggle_conference_rooms ( $conference_rooms );
}
break ;
case 'delete' :
if ( permission_exists ( 'conference_room_delete' )) {
$obj = new conference_centers ;
$obj -> delete_conference_rooms ( $conference_rooms );
}
break ;
}
header ( 'Location: conference_rooms.php' . ( $search != '' ? '?search=' . urlencode ( $search ) : null ));
exit ;
}
2013-02-28 19:55:36 +01:00
//get the meeting_uuid using the pin number
2019-07-04 23:57:04 +02:00
$search = preg_replace ( '{\D}' , '' , $_GET [ " search " ]);
2013-02-28 19:55:36 +01:00
if ( strlen ( $search ) > 0 ) {
2019-07-04 23:57:04 +02:00
$sql = " select meeting_uuid " ;
$sql .= " from v_meetings " ;
2019-06-03 18:53:58 +02:00
$sql .= " where domain_uuid = :domain_uuid " ;
2019-07-04 23:57:04 +02:00
$sql .= " and ( " ;
$sql .= " moderator_pin = :search " ;
$sql .= " or participant_pin = :search " ;
$sql .= " ) " ;
2019-06-03 18:53:58 +02:00
$parameters [ 'domain_uuid' ] = $_SESSION [ 'domain_uuid' ];
2019-07-04 23:57:04 +02:00
$parameters [ 'search' ] = '%' . $search . '%' ;
2019-06-03 18:53:58 +02:00
$database = new database ;
2019-06-08 17:31:03 +02:00
$meeting_uuid = $database -> select ( $sql , $parameters , 'column' );
2013-02-28 19:55:36 +01:00
}
2020-01-14 01:15:42 +01:00
/*
2012-11-07 09:51:36 +01:00
//if the $_GET array exists then process it
2013-02-28 19:55:36 +01:00
if ( count ( $_GET ) > 0 && strlen ( $_GET [ " search " ]) == 0 ) {
2012-11-07 09:51:36 +01:00
//get http GET variables and set them as php variables
2019-06-08 17:23:03 +02:00
$conference_room_uuid = $_GET [ " conference_room_uuid " ];
$record = $_GET [ " record " ];
$wait_mod = $_GET [ " wait_mod " ];
$announce = $_GET [ " announce " ];
$mute = $_GET [ " mute " ];
$sounds = $_GET [ " sounds " ];
$enabled = $_GET [ " enabled " ];
$meeting_uuid = $_GET [ " meeting_uuid " ];
2013-02-27 12:06:44 +01:00
2013-02-28 19:55:36 +01:00
//record announcement
2019-06-08 17:23:03 +02:00
if ( $record == " true " && is_uuid ( $meeting_uuid )) {
2013-02-27 12:06:44 +01:00
//prepare the values
$default_language = 'en' ;
$default_dialect = 'us' ;
$default_voice = 'callie' ;
2017-04-17 17:01:04 +02:00
$switch_cmd = " conference " . $meeting_uuid . " @ " . $_SESSION [ 'domain_name' ] . " play " . $_SESSION [ 'switch' ][ 'sounds' ][ 'dir' ] . " / " . $default_language . " / " . $default_dialect . " / " . $default_voice . " /ivr/ivr-recording_started.wav " ;
2013-02-27 12:06:44 +01:00
//connect to event socket
$fp = event_socket_create ( $_SESSION [ 'event_socket_ip_address' ], $_SESSION [ 'event_socket_port' ], $_SESSION [ 'event_socket_password' ]);
if ( $fp ) {
$switch_result = event_socket_request ( $fp , 'api ' . $switch_cmd );
}
}
2012-11-07 09:51:36 +01:00
2019-06-08 17:23:03 +02:00
//build the array
$array [ 'conference_rooms' ][ 0 ][ 'conference_room_uuid' ] = $conference_room_uuid ;
2012-11-07 09:51:36 +01:00
if ( strlen ( $record ) > 0 ) {
2019-06-08 17:23:03 +02:00
$array [ 'conference_rooms' ][ 0 ][ 'record' ] = $record ;
2012-11-07 09:51:36 +01:00
}
if ( strlen ( $wait_mod ) > 0 ) {
2019-06-08 17:23:03 +02:00
$array [ 'conference_rooms' ][ 0 ][ 'wait_mod' ] = $wait_mod ;
2012-11-07 09:51:36 +01:00
}
if ( strlen ( $announce ) > 0 ) {
2019-06-08 17:23:03 +02:00
$array [ 'conference_rooms' ][ 0 ][ 'announce' ] = $announce ;
2012-11-07 09:51:36 +01:00
}
if ( strlen ( $mute ) > 0 ) {
2019-06-08 17:23:03 +02:00
$array [ 'conference_rooms' ][ 0 ][ 'mute' ] = $mute ;
2012-11-07 09:51:36 +01:00
}
2013-02-01 13:23:39 +01:00
if ( strlen ( $sounds ) > 0 ) {
2019-06-08 17:23:03 +02:00
$array [ 'conference_rooms' ][ 0 ][ 'sounds' ] = $sounds ;
2013-02-01 13:23:39 +01:00
}
2012-11-07 09:51:36 +01:00
if ( strlen ( $enabled ) > 0 ) {
2019-06-08 17:23:03 +02:00
$array [ 'conference_rooms' ][ 0 ][ 'enabled' ] = $enabled ;
2012-11-07 09:51:36 +01:00
}
2019-06-08 17:23:03 +02:00
//save to the data
2019-06-03 18:53:58 +02:00
$database = new database ;
2019-06-08 17:23:03 +02:00
$database -> app_name = 'conference_rooms' ;
$database -> app_uuid = '8d083f5a-f726-42a8-9ffa-8d28f848f10e' ;
$database -> save ( $array );
$message = $database -> message ;
2019-07-04 23:57:04 +02:00
unset ( $array );
2012-11-07 09:51:36 +01:00
}
2020-01-14 01:15:42 +01:00
*/
2012-11-07 09:51:36 +01:00
2012-10-27 08:47:47 +02:00
//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 ) {
2012-11-06 20:31:58 +01:00
//connection to even socket failed
2012-10-27 08:47:47 +02:00
}
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' ]) {
2017-04-17 17:01:04 +02:00
$meeting_uuid = substr ( $conference_name , 0 , strlen ( $conference_name ) - strlen ( '@' . $_SESSION [ 'domain_name' ]));
2012-10-27 08:47:47 +02:00
$conference [ $meeting_uuid ][ " conference_name " ] = $conference_name ;
$conference [ $meeting_uuid ][ " session_uuid " ] = $session_uuid ;
$conference [ $meeting_uuid ][ " member_count " ] = $member_count ;
}
}
}
2012-09-13 06:45:57 +02:00
//get variables used to control the order
$order_by = $_GET [ " order_by " ];
$order = $_GET [ " order " ];
2020-01-14 01:15:42 +01:00
//get the conference room count
$conference_center = new conference_centers ;
$conference_center -> db = $db ;
$conference_center -> domain_uuid = $_SESSION [ 'domain_uuid' ];
if ( strlen ( $meeting_uuid ) > 0 ) {
$conference_center -> meeting_uuid = $meeting_uuid ;
}
if ( strlen ( $search ) > 0 ) {
$conference_center -> search = $search ;
}
$num_rows = $conference_center -> room_count ();
//prepare to page the results
$rows_per_page = ( $_SESSION [ 'domain' ][ 'paging' ][ 'numeric' ] != '' ) ? $_SESSION [ 'domain' ][ 'paging' ][ 'numeric' ] : 50 ;
$param = $search ? " &search= " . $search : null ;
if ( isset ( $_GET [ 'page' ])) {
$page = is_numeric ( $_GET [ 'page' ]) ? $_GET [ 'page' ] : 0 ;
list ( $paging_controls , $rows_per_page ) = paging ( $num_rows , $param , $rows_per_page );
list ( $paging_controls_mini , $rows_per_page ) = paging ( $num_rows , $param , $rows_per_page , true );
$offset = $rows_per_page * $page ;
}
//get the conference rooms
$conference_center -> rows_per_page = $rows_per_page ;
$conference_center -> offset = $offset ;
$conference_center -> order_by = $order_by ;
$conference_center -> order = $order ;
if ( strlen ( $meeting_uuid ) > 0 ) {
$conference_center -> meeting_uuid = $meeting_uuid ;
}
if ( strlen ( $search ) > 0 ) {
$conference_center -> search = $search ;
}
$result = $conference_center -> rooms ();
//create token
$object = new token ;
$token = $object -> create ( $_SERVER [ 'PHP_SELF' ]);
2020-01-06 19:14:01 +01:00
//include header
$document [ 'title' ] = $text [ 'title-conference_rooms' ];
require_once " resources/header.php " ;
2020-01-14 01:15:42 +01:00
//javascript for toggle select box
echo " <script language='javascript' type='text/javascript'> \n " ;
echo " function toggle_select() { \n " ;
echo " $ ('#conference_room_feature').fadeToggle(400, function() { \n " ;
echo " document.getElementById('conference_room_feature').selectedIndex = 0; \n " ;
echo " document.getElementById('conference_room_feature').focus(); \n " ;
echo " }); \n " ;
echo " } \n " ;
echo " </script> \n " ;
2012-09-13 06:45:57 +02:00
//show the content
2020-01-14 01:15:42 +01:00
echo " <div class='action_bar' id='action_bar'> \n " ;
echo " <div class='heading'><b> " . $text [ 'title-conference_rooms' ] . " ( " . $num_rows . " )</b></div> \n " ;
echo " <div class='actions'> \n " ;
2020-03-05 08:05:45 +01:00
echo button :: create ([ 'type' => 'button' , 'label' => $text [ 'button-back' ], 'icon' => $_SESSION [ 'theme' ][ 'button_icon_back' ], 'id' => 'btn_back' , 'style' => 'margin-right: 15px;' , 'link' => 'conference_centers.php' ]);
2020-01-14 01:15:42 +01:00
if ( permission_exists ( 'conference_room_add' )) {
2020-03-05 08:05:45 +01:00
echo button :: create ([ 'type' => 'button' , 'label' => $text [ 'button-add' ], 'icon' => $_SESSION [ 'theme' ][ 'button_icon_add' ], 'id' => 'btn_add' , 'link' => 'conference_room_edit.php' ]);
2020-01-14 01:15:42 +01:00
}
if ( permission_exists ( 'conference_room_edit' ) && $result ) {
2020-03-26 03:44:53 +01:00
echo button :: create ([ 'type' => 'button' , 'label' => $text [ 'button-toggle' ], 'icon' => $_SESSION [ 'theme' ][ 'button_icon_toggle' ], 'name' => 'btn_toggle' , 'onclick' => " toggle_select(); this.blur(); " ]);
echo " <select class='formfld' style='display: none; width: auto;' id='conference_room_feature' onchange= \" if (this.selectedIndex != 0) { modal_open('modal-toggle','btn_toggle'); } \" > " ;
2020-01-14 01:15:42 +01:00
echo " <option value='' selected='selected'> " . $text [ 'label-select' ] . " </option> " ;
echo " <option value='record'> " . $text [ 'label-record' ] . " </option> " ;
echo " <option value='wait_mod'> " . $text [ 'label-wait_moderator' ] . " </option> " ;
2020-04-02 04:26:50 +02:00
echo " <option value='announce_name'> " . $text [ 'label-announce_name' ] . " </option> " ;
echo " <option value='announce_count'> " . $text [ 'label-announce_count' ] . " </option> " ;
echo " <option value='announce_recording'> " . $text [ 'label-announce_recording' ] . " </option> " ;
2020-01-14 01:15:42 +01:00
echo " <option value='mute'> " . $text [ 'label-mute' ] . " </option> " ;
echo " <option value='sounds'> " . $text [ 'label-sounds' ] . " </option> " ;
echo " <option value='enabled'> " . $text [ 'label-enabled' ] . " </option> " ;
echo " </select> " ;
}
if ( permission_exists ( 'conference_room_delete' ) && $result ) {
2020-03-26 03:44:53 +01:00
echo button :: create ([ 'type' => 'button' , 'label' => $text [ 'button-delete' ], 'icon' => $_SESSION [ 'theme' ][ 'button_icon_delete' ], 'name' => 'btn_delete' , 'onclick' => " modal_open('modal-delete','btn_delete'); " ]);
2020-01-14 01:15:42 +01:00
}
echo " <form id='form_search' class='inline' method='get'> \n " ;
echo " <input type='text' class='txt list-search' name='search' id='search' value= \" " . escape ( $search ) . " \" placeholder= \" " . $text [ 'label-search' ] . " \" onkeydown='list_search_reset();'> " ;
echo button :: create ([ 'label' => $text [ 'button-search' ], 'icon' => $_SESSION [ 'theme' ][ 'button_icon_search' ], 'type' => 'submit' , 'id' => 'btn_search' , 'style' => ( $search != '' ? 'display: none;' : null )]);
echo button :: create ([ 'label' => $text [ 'button-reset' ], 'icon' => $_SESSION [ 'theme' ][ 'button_icon_reset' ], 'type' => 'button' , 'id' => 'btn_reset' , 'link' => 'bridges.php' , 'style' => ( $search == '' ? 'display: none;' : null )]);
if ( $paging_controls_mini != '' ) {
echo " <span style='margin-left: 15px;'> " . $paging_controls_mini . " </span> \n " ;
}
2013-02-28 19:55:36 +01:00
echo " </form> \n " ;
2020-01-14 01:15:42 +01:00
echo " </div> \n " ;
echo " <div style='clear: both;'></div> \n " ;
echo " </div> \n " ;
2020-03-26 03:44:53 +01:00
if ( permission_exists ( 'conference_room_edit' ) && $result ) {
echo modal :: create ([ 'id' => 'modal-toggle' , 'type' => 'toggle' , 'actions' => button :: create ([ 'type' => 'button' , 'label' => $text [ 'button-continue' ], 'icon' => 'check' , 'id' => 'btn_toggle' , 'style' => 'float: right; margin-left: 15px;' , 'collapse' => 'never' , 'onclick' => " modal_close(); document.getElementById('toggle_field').value = document.getElementById('conference_room_feature').options[document.getElementById('conference_room_feature').selectedIndex].value; list_action_set('toggle'); list_form_submit('form_list'); " ])]);
}
if ( permission_exists ( 'conference_room_delete' ) && $result ) {
echo modal :: create ([ 'id' => 'modal-delete' , 'type' => 'delete' , 'actions' => button :: create ([ 'type' => 'button' , 'label' => $text [ 'button-continue' ], 'icon' => 'check' , 'id' => 'btn_delete' , 'style' => 'float: right; margin-left: 15px;' , 'collapse' => 'never' , 'onclick' => " modal_close(); list_action_set('delete'); list_form_submit('form_list'); " ])]);
}
2020-01-14 01:15:42 +01:00
echo $text [ 'title_description-conference_rooms' ] . " \n " ;
echo " <br /><br /> \n " ;
echo " <form id='form_list' method='post'> \n " ;
echo " <input type='hidden' id='action' name='action' value=''> \n " ;
echo " <input type='hidden' id='toggle_field' name='toggle_field' value=''> \n " ;
echo " <input type='hidden' name='search' value= \" " . escape ( $search ) . " \" > \n " ;
echo " <table class='list'> \n " ;
echo " <tr class='list-header'> \n " ;
if ( permission_exists ( 'conference_room_add' ) || permission_exists ( 'conference_room_edit' ) || permission_exists ( 'conference_room_delete' )) {
echo " <th class='checkbox'> \n " ;
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' " . ( $result ? : " style='visibility: hidden;' " ) . " > \n " ;
echo " </th> \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> " . $text [ 'label-name' ] . " </th> \n " ;
echo " <th> " . $text [ 'label-moderator-pin' ] . " </th> \n " ;
echo " <th> " . $text [ 'label-participant-pin' ] . " </th> \n " ;
//echo th_order_by('profile', $text['label-profile'], $order_by, $order);
echo th_order_by ( 'record' , $text [ 'label-record' ], $order_by , $order , null , " class='center' " );
//echo th_order_by('max_members', 'Max', $order_by, $order);
echo th_order_by ( 'wait_mod' , $text [ 'label-wait_moderator' ], $order_by , $order , null , " class='center' " );
2020-04-02 04:26:50 +02:00
echo th_order_by ( 'announce' , $text [ 'label-announce_name' ], $order_by , $order , null , " class='center' " );
echo th_order_by ( 'announce' , $text [ 'label-announce_count' ], $order_by , $order , null , " class='center' " );
echo th_order_by ( 'announce' , $text [ 'label-announce_recording' ], $order_by , $order , null , " class='center' " );
2020-01-14 01:15:42 +01:00
//echo th_order_by('enter_sound', 'Enter Sound', $order_by, $order);
echo th_order_by ( 'mute' , $text [ 'label-mute' ], $order_by , $order , null , " class='center' " );
echo th_order_by ( 'sounds' , $text [ 'label-sounds' ], $order_by , $order , null , " class='center' " );
echo " <th class='center'> " . $text [ 'label-members' ] . " </th> \n " ;
echo " <th> " . $text [ 'label-tools' ] . " </th> \n " ;
if ( permission_exists ( 'conference_room_enabled' )) {
echo th_order_by ( 'enabled' , $text [ 'label-enabled' ], $order_by , $order , null , " class='center' " );
}
echo th_order_by ( 'description' , $text [ 'label-description' ], $order_by , $order , null , " class='hide-sm-dn' " );
if ( permission_exists ( 'conference_room_edit' ) && $_SESSION [ 'theme' ][ 'list_row_edit_button' ][ 'boolean' ] == 'true' ) {
echo " <td class='action-button'> </td> \n " ;
}
echo " </tr> \n " ;
2012-09-13 06:45:57 +02:00
2019-06-08 17:23:03 +02:00
//show the data
if ( is_array ( $result ) > 0 ) {
2020-01-14 01:15:42 +01:00
$x = 0 ;
foreach ( $result as $row ) {
2019-06-08 17:23:03 +02:00
$meeting_uuid = $row [ 'meeting_uuid' ];
$conference_room_name = $row [ 'conference_room_name' ];
$moderator_pin = $row [ 'moderator_pin' ];
$participant_pin = $row [ 'participant_pin' ];
if ( strlen ( $moderator_pin ) == 9 ) {
$moderator_pin = substr ( $moderator_pin , 0 , 3 ) . " - " . substr ( $moderator_pin , 3 , 3 ) . " - " . substr ( $moderator_pin , - 3 ) . " \n " ;
}
if ( strlen ( $participant_pin ) == 9 ) {
$participant_pin = substr ( $participant_pin , 0 , 3 ) . " - " . substr ( $participant_pin , 3 , 3 ) . " - " . substr ( $participant_pin , - 3 ) . " \n " ;
}
2013-02-01 13:23:39 +01:00
2020-01-14 01:15:42 +01:00
if ( permission_exists ( 'conference_room_edit' )) {
$list_row_url = " conference_room_edit.php?id= " . urlencode ( $row [ 'conference_room_uuid' ]);
}
echo " <tr class='list-row' href=' " . $list_row_url . " '> \n " ;
if ( permission_exists ( 'conference_room_add' ) || permission_exists ( 'conference_room_edit' ) || permission_exists ( 'conference_room_delete' )) {
echo " <td class='checkbox'> \n " ;
echo " <input type='checkbox' name='conference_rooms[ $x ][checked]' id='checkbox_ " . $x . " ' value='true' onclick= \" if (!this.checked) { document.getElementById('checkbox_all').checked = false; } \" > \n " ;
echo " <input type='hidden' name='conference_rooms[ $x ][uuid]' value=' " . escape ( $row [ 'conference_room_uuid' ]) . " ' /> \n " ;
echo " <input type='hidden' name='conference_rooms[ $x ][meeting_uuid]' value=' " . escape ( $meeting_uuid ) . " ' /> \n " ;
echo " </td> \n " ;
}
echo " <td><a href=' " . $list_row_url . " '> " . escape ( $conference_room_name ) . " </a> </td> \n " ;
echo " <td> " . $moderator_pin . " </td> \n " ;
echo " <td> " . $participant_pin . " </td> \n " ;
//echo " <td>".escape($row['conference_center_uuid'])." </td>\n";
//echo " <td>".escape($row['meeting_uuid'])." </td>\n";
//echo " <td>".escape($row['profile'])." </td>\n";
if ( permission_exists ( 'conference_room_edit' )) {
echo " <td class='no-link center'> \n " ;
echo button :: create ([ 'type' => 'submit' , 'class' => 'link' , 'label' => $text [ 'label-' . ( $row [ 'record' ] == " true " ? 'true' : 'false' )], 'title' => $text [ 'button-toggle' ], 'onclick' => " list_self_check('checkbox_ " . $x . " '); list_action_set('toggle'); document.getElementById('toggle_field').value = 'record'; list_form_submit('form_list') " ]);
2019-06-08 17:23:03 +02:00
}
else {
2020-01-14 01:15:42 +01:00
echo " <td class='center'> \n " ;
echo $text [ 'label-' . ( $row [ 'record' ] == " true " ? 'true' : 'false' )];
2019-06-08 17:23:03 +02:00
}
echo " </td> \n " ;
2020-01-14 01:15:42 +01:00
// echo " <td>";
// if ($row['record'] == "true") {
// echo "<a href='?conference_room_uuid=".urlencode($row['conference_room_uuid'])."&record=false&meeting_uuid=".urlencode($meeting_uuid)."'>".$text['label-true']."</a>";
// }
// else {
// echo "<a href='?conference_room_uuid=".urlencode($row['conference_room_uuid'])."&record=true&meeting_uuid=".urlencode($meeting_uuid)."'>".$text['label-false']."</a>";
// }
// echo " </td>\n";
//echo " <td>".$row['max_members']." </td>\n";
if ( permission_exists ( 'conference_room_edit' )) {
echo " <td class='no-link center'> \n " ;
echo button :: create ([ 'type' => 'submit' , 'class' => 'link' , 'label' => $text [ 'label-' . ( $row [ 'wait_mod' ] == " true " ? 'true' : 'false' )], 'title' => $text [ 'button-toggle' ], 'onclick' => " list_self_check('checkbox_ " . $x . " '); list_action_set('toggle'); document.getElementById('toggle_field').value = 'wait_mod'; list_form_submit('form_list') " ]);
2019-06-08 17:23:03 +02:00
}
else {
2020-01-14 01:15:42 +01:00
echo " <td class='center'> \n " ;
echo $text [ 'label-' . ( $row [ 'wait_mod' ] == " true " ? 'true' : 'false' )];
2019-06-08 17:23:03 +02:00
}
echo " </td> \n " ;
2020-01-14 01:15:42 +01:00
// echo " <td>";
// if ($row['wait_mod'] == "true") {
// echo "<a href='?conference_room_uuid=".escape($row['conference_room_uuid'])."&wait_mod=false'>".$text['label-true']."</a>";
// }
// else {
// echo "<a href='?conference_room_uuid=".escape($row['conference_room_uuid'])."&wait_mod=true'>".$text['label-false']."</a>";
// }
// echo " </td>\n";
2020-04-02 04:26:50 +02:00
if ( permission_exists ( 'conference_room_edit' ) && permission_exists ( 'conference_room_announce_name' )) {
echo " <td class='no-link center'> \n " ;
echo button :: create ([ 'type' => 'submit' , 'class' => 'link' , 'label' => $text [ 'label-' . ( $row [ 'announce_name' ] == " true " ? 'true' : 'false' )], 'title' => $text [ 'button-toggle' ], 'onclick' => " list_self_check('checkbox_ " . $x . " '); list_action_set('toggle'); document.getElementById('toggle_field').value = 'announce_name'; list_form_submit('form_list') " ]);
}
else {
echo " <td class='center'> \n " ;
echo $text [ 'label-' . ( $row [ 'announce_name' ] == " true " ? 'true' : 'false' )];
}
echo " </td> \n " ;
if ( permission_exists ( 'conference_room_edit' ) && permission_exists ( 'conference_room_announce_count' )) {
echo " <td class='no-link center'> \n " ;
echo button :: create ([ 'type' => 'submit' , 'class' => 'link' , 'label' => $text [ 'label-' . ( $row [ 'announce_count' ] == " true " ? 'true' : 'false' )], 'title' => $text [ 'button-toggle' ], 'onclick' => " list_self_check('checkbox_ " . $x . " '); list_action_set('toggle'); document.getElementById('toggle_field').value = 'announce_count'; list_form_submit('form_list') " ]);
}
else {
echo " <td class='center'> \n " ;
echo $text [ 'label-' . ( $row [ 'announce_count' ] == " true " ? 'true' : 'false' )];
}
echo " </td> \n " ;
if ( permission_exists ( 'conference_room_edit' ) && permission_exists ( 'conference_room_announce_recording' )) {
2020-01-14 01:15:42 +01:00
echo " <td class='no-link center'> \n " ;
2020-04-02 04:26:50 +02:00
echo button :: create ([ 'type' => 'submit' , 'class' => 'link' , 'label' => $text [ 'label-' . ( $row [ 'announce_recording' ] == " true " ? 'true' : 'false' )], 'title' => $text [ 'button-toggle' ], 'onclick' => " list_self_check('checkbox_ " . $x . " '); list_action_set('toggle'); document.getElementById('toggle_field').value = 'announce_recording'; list_form_submit('form_list') " ]);
2019-06-08 17:23:03 +02:00
}
else {
2020-01-14 01:15:42 +01:00
echo " <td class='center'> \n " ;
2020-04-02 04:26:50 +02:00
echo $text [ 'label-' . ( $row [ 'announce_recording' ] == " true " ? 'true' : 'false' )];
2019-06-08 17:23:03 +02:00
}
echo " </td> \n " ;
2020-01-14 01:15:42 +01:00
// echo " <td>";
// if ($row['announce'] == "true") {
// echo "<a href='?conference_room_uuid=".escape($row['conference_room_uuid'])."&announce=false'>".$text['label-true']."</a>";
// }
// else {
// echo "<a href='?conference_room_uuid=".escape($row['conference_room_uuid'])."&announce=true'>".$text['label-false']."</a>";
// }
// echo " </td>\n";
2012-11-07 09:51:36 +01:00
2020-01-14 01:15:42 +01:00
if ( permission_exists ( 'conference_room_edit' )) {
echo " <td class='no-link center'> \n " ;
echo button :: create ([ 'type' => 'submit' , 'class' => 'link' , 'label' => $text [ 'label-' . ( $row [ 'mute' ] == " true " ? 'true' : 'false' )], 'title' => $text [ 'button-toggle' ], 'onclick' => " list_self_check('checkbox_ " . $x . " '); list_action_set('toggle'); document.getElementById('toggle_field').value = 'mute'; list_form_submit('form_list') " ]);
2019-06-08 17:23:03 +02:00
}
else {
2020-01-14 01:15:42 +01:00
echo " <td class='center'> \n " ;
echo $text [ 'label-' . ( $row [ 'mute' ] == " true " ? 'true' : 'false' )];
2019-06-08 17:23:03 +02:00
}
echo " </td> \n " ;
2020-01-14 01:15:42 +01:00
// echo " <td>";
// if ($row['mute'] == "true") {
// echo "<a href='?conference_room_uuid=".escape($row['conference_room_uuid'])."&mute=false'>".$text['label-true']."</a> ";
// }
// else {
// echo "<a href='?conference_room_uuid=".escape($row['conference_room_uuid'])."&mute=true'>".$text['label-false']."</a> ";
// }
// echo " </td>\n";
2013-02-01 13:23:39 +01:00
2020-01-14 01:15:42 +01:00
if ( permission_exists ( 'conference_room_edit' )) {
echo " <td class='no-link center'> \n " ;
echo button :: create ([ 'type' => 'submit' , 'class' => 'link' , 'label' => $text [ 'label-' . ( $row [ 'sounds' ] == " true " ? 'true' : 'false' )], 'title' => $text [ 'button-toggle' ], 'onclick' => " list_self_check('checkbox_ " . $x . " '); list_action_set('toggle'); document.getElementById('toggle_field').value = 'sounds'; list_form_submit('form_list') " ]);
2019-06-08 17:23:03 +02:00
}
else {
2020-01-14 01:15:42 +01:00
echo " <td class='center'> \n " ;
echo $text [ 'label-' . ( $row [ 'sounds' ] == " true " ? 'true' : 'false' )];
2019-06-08 17:23:03 +02:00
}
echo " </td> \n " ;
2020-01-14 01:15:42 +01:00
// echo " <td>";
// if ($row['sounds'] == "true") {
// echo "<a href='?conference_room_uuid=".escape($row['conference_room_uuid'])."&sounds=false'>".$text['label-true']."</a>";
// }
// else {
// echo "<a href='?conference_room_uuid=".escape($row['conference_room_uuid'])."&sounds=true'>".$text['label-false']."</a>";
// }
// echo " </td>\n";
2019-06-08 17:23:03 +02:00
if ( strlen ( $conference [ $meeting_uuid ][ " session_uuid " ])) {
2020-01-14 01:15:42 +01:00
echo " <td class='center'> " . escape ( $conference [ $meeting_uuid ][ " member_count " ]) . " </td> \n " ;
2019-06-08 17:23:03 +02:00
}
else {
2020-01-14 01:15:42 +01:00
echo " <td class='center'>0</td> \n " ;
2019-06-08 17:23:03 +02:00
}
2020-01-14 01:18:55 +01:00
echo " <td class='no-link no-wrap'> \n " ;
2020-01-14 01:15:42 +01:00
echo " <a href=' " . PROJECT_PATH . " /app/conferences_active/conference_interactive.php?c= " . urlencode ( $row [ 'meeting_uuid' ]) . " '> " . $text [ 'label-view' ] . " </a> \n " ;
echo " <a href='conference_sessions.php?id= " . urlencode ( $row [ 'meeting_uuid' ]) . " '> " . $text [ 'label-sessions' ] . " </a> \n " ;
2019-06-08 17:23:03 +02:00
echo " </td> \n " ;
2013-02-01 13:23:39 +01:00
2019-06-08 17:23:03 +02:00
if ( permission_exists ( 'conference_room_enabled' )) {
2020-01-14 01:15:42 +01:00
if ( permission_exists ( 'conference_room_edit' )) {
echo " <td class='no-link center'> \n " ;
echo button :: create ([ 'type' => 'submit' , 'class' => 'link' , 'label' => $text [ 'label-' . ( $row [ 'enabled' ] == " true " ? 'true' : 'false' )], 'title' => $text [ 'button-toggle' ], 'onclick' => " list_self_check('checkbox_ " . $x . " '); list_action_set('toggle'); document.getElementById('toggle_field').value = 'enabled'; list_form_submit('form_list') " ]);
2013-01-25 10:02:15 +01:00
}
else {
2020-01-14 01:15:42 +01:00
echo " <td class='center'> \n " ;
echo $text [ 'label-' . ( $row [ 'enabled' ] == " true " ? 'true' : 'false' )];
2013-02-01 13:23:39 +01:00
}
echo " </td> \n " ;
2020-01-14 01:15:42 +01:00
// echo " <td>";
// if ($row['enabled'] == "true") {
// echo "<a href='?conference_room_uuid=".urlencode($row['conference_room_uuid'])."&enabled=false'>".$text['label-true']."</a>";
// }
// else {
// echo "<a href='?conference_room_uuid=".urlencode($row['conference_room_uuid'])."&enabled=true'>".$text['label-false']."</a>";
// }
// echo " </td>\n";
2019-06-08 17:23:03 +02:00
}
2013-02-01 13:23:39 +01:00
2020-01-14 01:15:42 +01:00
echo " <td class='description overflow hide-sm-dn'> " . escape ( $row [ 'description' ]) . " </td> \n " ;
if ( permission_exists ( 'conference_room_edit' ) && $_SESSION [ 'theme' ][ 'list_row_edit_button' ][ 'boolean' ] == 'true' ) {
echo " <td class='action-button'> \n " ;
echo button :: create ([ 'type' => 'button' , 'title' => $text [ 'button-edit' ], 'icon' => $_SESSION [ 'theme' ][ 'button_icon_edit' ], 'link' => $list_row_url ]);
echo " </td> \n " ;
2019-06-08 17:23:03 +02:00
}
echo " </tr> \n " ;
2020-01-14 01:15:42 +01:00
$x ++ ;
}
unset ( $result );
2019-06-08 17:23:03 +02:00
}
2012-09-13 06:45:57 +02:00
2020-01-14 01:15:42 +01:00
echo " </table> \n " ;
echo " <br /> \n " ;
echo " <div align='center'> " . $paging_controls . " </div> \n " ;
echo " <input type='hidden' name=' " . $token [ 'name' ] . " ' value=' " . $token [ 'hash' ] . " '> \n " ;
echo " </form> \n " ;
2012-09-13 06:45:57 +02:00
//include the footer
2013-07-06 08:29:50 +02:00
require_once " resources/footer.php " ;
2018-06-06 18:33:52 +02:00
2020-04-02 04:26:50 +02:00
?>