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 >
2014-03-05 22:16:51 +01:00
Portions created by the Initial Developer are Copyright ( C ) 2008 - 2014
2012-10-05 07:50:20 +02:00
the Initial Developer . All Rights Reserved .
Contributor ( s ) :
Mark J Crane < markjcrane @ fusionpbx . com >
2015-02-13 22:17:02 +01:00
Luis Daniel Lucio Quiroz < dlucio @ okay . com . mx >
2012-10-05 07:50:20 +02:00
*/
2012-09-13 06:45:57 +02:00
require_once " root.php " ;
2013-07-06 08:03:27 +02:00
require_once " resources/require.php " ;
2013-07-06 07:50:55 +02:00
require_once " resources/check_auth.php " ;
2012-10-05 01:04:39 +02:00
if ( permission_exists ( 'conference_room_add' ) || permission_exists ( 'conference_room_edit' )) {
2012-09-13 06:45:57 +02:00
//access granted
}
else {
echo " access denied " ;
exit ;
}
2012-11-07 11:58:42 +01:00
//add multi-lingual support
2015-01-18 11:06:08 +01:00
$language = new text ;
$text = $language -> get ();
2012-11-07 11:58:42 +01:00
2012-09-13 06:45:57 +02:00
//action add or update
if ( isset ( $_REQUEST [ " id " ])) {
$action = " update " ;
2012-10-05 01:04:39 +02:00
$conference_room_uuid = check_str ( $_REQUEST [ " id " ]);
2012-09-13 06:45:57 +02:00
}
else {
$action = " add " ;
}
//get http post variables and set them to php variables
2012-10-20 01:36:27 +02:00
if ( count ( $_POST ) > 0 ) {
2012-10-05 01:04:39 +02:00
$conference_center_uuid = check_str ( $_POST [ " conference_center_uuid " ]);
2012-10-20 01:36:27 +02:00
$meeting_uuid = check_str ( $_POST [ " meeting_uuid " ]);
2014-11-30 04:43:04 +01:00
$conference_room_name = check_str ( $_POST [ 'conference_room_name' ]);
2013-01-05 14:03:00 +01:00
$moderator_pin = check_str ( $_POST [ " moderator_pin " ]);
$participant_pin = check_str ( $_POST [ " participant_pin " ]);
2012-10-14 01:17:59 +02:00
$profile = check_str ( $_POST [ " profile " ]);
2012-10-13 21:26:45 +02:00
$record = check_str ( $_POST [ " record " ]);
2012-09-13 06:45:57 +02:00
$user_uuid = check_str ( $_POST [ " user_uuid " ]);
$max_members = check_str ( $_POST [ " max_members " ]);
2014-11-29 22:21:26 +01:00
$start_datetime = check_str ( $_POST [ " start_datetime " ]);
$stop_datetime = check_str ( $_POST [ " stop_datetime " ]);
2012-09-13 06:45:57 +02:00
$wait_mod = check_str ( $_POST [ " wait_mod " ]);
$announce = check_str ( $_POST [ " announce " ]);
2013-02-01 13:23:39 +01:00
$sounds = check_str ( $_POST [ " sounds " ]);
2012-09-13 06:45:57 +02:00
$mute = check_str ( $_POST [ " mute " ]);
$created = check_str ( $_POST [ " created " ]);
$created_by = check_str ( $_POST [ " created_by " ]);
$enabled = check_str ( $_POST [ " enabled " ]);
$description = check_str ( $_POST [ " description " ]);
//remove any pin number formatting
2013-01-05 14:03:00 +01:00
$moderator_pin = preg_replace ( '{\D}' , '' , $moderator_pin );
$participant_pin = preg_replace ( '{\D}' , '' , $participant_pin );
2012-09-13 06:45:57 +02:00
}
2014-07-04 00:52:17 +02:00
//get the conference centers array and set a default conference center
$sql = " select * from v_conference_centers " ;
$sql .= " where domain_uuid = ' $domain_uuid ' " ;
$sql .= " order by conference_center_name asc " ;
$prep_statement = $db -> prepare ( check_sql ( $sql ));
$prep_statement -> execute ();
$conference_centers = $prep_statement -> fetchAll ( PDO :: FETCH_ASSOC );
2013-05-08 12:35:23 +02:00
if ( strlen ( $conference_center_uuid ) == 0 ) {
$conference_center_uuid = $conference_centers [ 0 ][ " conference_center_uuid " ];
}
2013-04-16 10:30:06 +02:00
//define fucntion get_meeting_pin - used to find a unique pin number
function get_meeting_pin ( $length , $meeting_uuid ) {
global $db ;
$pin = generate_password ( $length , 1 );
$sql = " select count(*) as num_rows from v_meetings " ;
$sql .= " where domain_uuid = ' " . $_SESSION [ 'domain_uuid' ] . " ' " ;
//$sql .= "and meeting_uuid <> '".$meeting_uuid."' ";
$sql .= " and (moderator_pin = ' " . $pin . " ' or participant_pin = ' " . $pin . " ') " ;
$prep_statement = $db -> prepare ( check_sql ( $sql ));
if ( $prep_statement ) {
$prep_statement -> execute ();
$row = $prep_statement -> fetch ( PDO :: FETCH_ASSOC );
if ( $row [ 'num_rows' ] == 0 ) {
return $pin ;
}
else {
get_meeting_pin ( $length , $uuid );
}
2013-01-08 21:58:49 +01:00
}
}
2013-02-27 12:06:44 +01:00
//record announcment
if ( $record == " true " ) {
//prepare the values
$default_language = 'en' ;
$default_dialect = 'us' ;
$default_voice = 'callie' ;
$switch_cmd = " conference " . $meeting_uuid . " - " . $_SESSION [ 'domain_name' ] . " play " . $_SESSION [ 'switch' ][ 'sounds' ][ 'dir' ] . " / " . $default_language . " / " . $default_dialect . " / " . $default_voice . " /ivr/ivr-recording_started.wav " ;
//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 );
}
}
2013-01-08 21:58:49 +01:00
//generate the pins
2013-01-08 22:09:18 +01:00
$sql = " select conference_center_pin_length from v_conference_centers " ;
$sql .= " where domain_uuid = ' " . $_SESSION [ 'domain_uuid' ] . " ' " ;
2013-04-16 10:30:06 +02:00
if ( strlen ( $conference_center_uuid ) > 0 ) {
$sql .= " and conference_center_uuid = ' " . $conference_center_uuid . " ' " ;
}
2013-01-08 22:09:18 +01:00
$prep_statement = $db -> prepare ( check_sql ( $sql ));
if ( $prep_statement ) {
$prep_statement -> execute ();
$row = $prep_statement -> fetch ( PDO :: FETCH_ASSOC );
$pin_length = $row [ 'conference_center_pin_length' ];
}
if ( strlen ( $moderator_pin ) == 0 ) {
$moderator_pin = get_meeting_pin ( $pin_length , $meeting_uuid );
}
if ( strlen ( $participant_pin ) == 0 ) {
$participant_pin = get_meeting_pin ( $pin_length , $meeting_uuid );
2013-01-08 21:58:49 +01:00
}
2012-10-05 07:50:20 +02:00
//delete the user
2016-01-19 06:06:45 +01:00
if ( $_GET [ " a " ] == " delete " && permission_exists ( 'conference_room_delete' )) {
2012-09-13 06:45:57 +02:00
if ( strlen ( $_REQUEST [ " meeting_user_uuid " ]) > 0 ) {
//set the variables
$meeting_user_uuid = check_str ( $_REQUEST [ " meeting_user_uuid " ]);
2012-10-05 01:04:39 +02:00
$conference_room_uuid = check_str ( $_REQUEST [ " conference_room_uuid " ]);
2012-09-13 06:45:57 +02:00
//delete the extension from the ring_group
$sql = " delete from v_meeting_users " ;
$sql .= " where domain_uuid = ' " . $_SESSION [ 'domain_uuid' ] . " ' " ;
$sql .= " and meeting_user_uuid = ' $meeting_user_uuid ' " ;
$db -> exec ( check_sql ( $sql ));
unset ( $sql );
}
2014-02-21 04:56:30 +01:00
$_SESSION [ " message " ] = $text [ 'message-delete' ];
header ( " Location: conference_room_edit.php?id= " . $conference_room_uuid );
return ;
2012-09-13 06:45:57 +02:00
}
2013-01-08 21:58:49 +01:00
2012-10-20 01:36:27 +02:00
if ( count ( $_POST ) > 0 && strlen ( $_POST [ " persistformvar " ]) == 0 ) {
2012-09-13 06:45:57 +02:00
$msg = '' ;
if ( $action == " update " ) {
2012-10-05 01:04:39 +02:00
$conference_room_uuid = check_str ( $_POST [ " conference_room_uuid " ]);
2012-09-13 06:45:57 +02:00
}
2012-10-20 07:05:10 +02:00
//check for a unique pin number and length
2013-04-25 00:25:44 +02:00
if ( strlen ( $moderator_pin ) > 0 || strlen ( $participant_pin ) > 0 ) {
2013-04-16 10:30:06 +02:00
//make sure the moderator pin number is unique
$sql = " select count(*) as num_rows from v_meetings " ;
$sql .= " where domain_uuid = ' " . $_SESSION [ 'domain_uuid' ] . " ' " ;
2014-07-04 00:16:29 +02:00
if ( strlen ( $meeting_uuid ) > 0 ) {
$sql .= " and meeting_uuid <> ' " . $meeting_uuid . " ' " ;
}
2013-04-25 00:25:44 +02:00
$sql .= " and (moderator_pin = ' " . $moderator_pin . " ' or participant_pin = ' " . $moderator_pin . " ') " ;
2013-04-16 10:30:06 +02:00
$prep_statement = $db -> prepare ( check_sql ( $sql ));
if ( $prep_statement ) {
$prep_statement -> execute ();
$row = $prep_statement -> fetch ( PDO :: FETCH_ASSOC );
if ( $row [ 'num_rows' ] > 0 ) {
2015-02-25 19:15:16 +01:00
$msg .= $text [ 'message-unique_moderator_pin' ] . " <br /> \n " ;
2013-04-16 10:30:06 +02:00
}
}
2013-04-25 00:25:44 +02:00
2013-04-16 10:30:06 +02:00
//make sure the participant pin number is unique
$sql = " select count(*) as num_rows from v_meetings " ;
$sql .= " where domain_uuid = ' " . $_SESSION [ 'domain_uuid' ] . " ' " ;
2014-07-04 00:16:29 +02:00
if ( strlen ( $meeting_uuid ) > 0 ) {
$sql .= " and meeting_uuid <> ' " . $meeting_uuid . " ' " ;
}
2013-04-25 00:25:44 +02:00
$sql .= " and (moderator_pin = ' " . $participant_pin . " ' or participant_pin = ' " . $participant_pin . " ') " ;
2013-04-16 10:30:06 +02:00
$prep_statement = $db -> prepare ( check_sql ( $sql ));
if ( $prep_statement ) {
$prep_statement -> execute ();
$row = $prep_statement -> fetch ( PDO :: FETCH_ASSOC );
if ( $row [ 'num_rows' ] > 0 ) {
2015-02-25 19:15:16 +01:00
$msg .= $text [ 'message-unique_participant_pin' ] . " <br /> \n " ;
2013-04-16 10:30:06 +02:00
}
}
2013-04-25 00:25:44 +02:00
2013-04-16 10:30:06 +02:00
//additional checks
if ( $moderator_pin == $participant_pin ) {
2015-02-25 19:15:16 +01:00
$msg .= $text [ 'message-non_unique_pin' ] . " <br /> \n " ;
2013-04-16 10:30:06 +02:00
}
2015-02-25 19:15:16 +01:00
if ( strlen ( $moderator_pin ) < $pin_length || strlen ( $participant_pin ) < $pin_length ) {
$msg .= $text [ 'message-minimum_pin_length' ] . " " . $pin_length . " <br /> \n " ;
2012-10-20 01:36:27 +02:00
}
}
2012-09-13 06:45:57 +02:00
//check for all required data
2012-10-05 01:04:39 +02:00
//if (strlen($conference_center_uuid) == 0) { $msg .= "Please provide: Conference UUID<br>\n"; }
2012-09-13 06:45:57 +02:00
//if (strlen($max_members) == 0) { $msg .= "Please provide: Max Members<br>\n"; }
2014-11-29 22:21:26 +01:00
//if (strlen($start_datetime) == 0) { $msg .= "Please provide: Start Date/Time<br>\n"; }
//if (strlen($stop_datetime) == 0) { $msg .= "Please provide: Stop Date/Time<br>\n"; }
2012-09-13 06:45:57 +02:00
//if (strlen($wait_mod) == 0) { $msg .= "Please provide: Wait for the Moderator<br>\n"; }
2013-01-08 21:58:49 +01:00
//if (strlen($profile) == 0) { $msg .= "Please provide: Conference Profile<br>\n"; }
//if (strlen($announce) == 0) { $msg .= "Please provide: Announce<br>\n"; }
2012-09-13 06:45:57 +02:00
//if (strlen($enter_sound) == 0) { $msg .= "Please provide: Enter Sound<br>\n"; }
2013-01-08 21:58:49 +01:00
//if (strlen($mute) == 0) { $msg .= "Please provide: Mute<br>\n"; }
2013-02-01 13:23:39 +01:00
//if (strlen($sounds) == 0) { $msg .= "Please provide: Sounds<br>\n"; }
2012-09-13 06:45:57 +02:00
//if (strlen($created) == 0) { $msg .= "Please provide: Created<br>\n"; }
//if (strlen($created_by) == 0) { $msg .= "Please provide: Created By<br>\n"; }
2013-01-08 21:58:49 +01:00
//if (strlen($enabled) == 0) { $msg .= "Please provide: Enabled<br>\n"; }
2012-09-13 06:45:57 +02:00
//if (strlen($description) == 0) { $msg .= "Please provide: Description<br>\n"; }
if ( strlen ( $msg ) > 0 && strlen ( $_POST [ " persistformvar " ]) == 0 ) {
2013-07-06 08:29:50 +02:00
require_once " resources/header.php " ;
2013-07-06 08:21:12 +02:00
require_once " resources/persist_form_var.php " ;
2012-09-13 06:45:57 +02:00
echo " <div align='center'> \n " ;
echo " <table><tr><td> \n " ;
echo $msg . " <br /> " ;
echo " </td></tr></table> \n " ;
persistformvar ( $_POST );
echo " </div> \n " ;
2013-07-06 08:29:50 +02:00
require_once " resources/footer.php " ;
2012-10-20 01:36:27 +02:00
exit ;
2012-09-13 06:45:57 +02:00
}
//add or update the database
if ( $_POST [ " persistformvar " ] != " true " ) {
2012-10-05 01:04:39 +02:00
if ( $action == " add " && permission_exists ( 'conference_room_add' )) {
2013-01-08 21:58:49 +01:00
//set default values
if ( strlen ( $profile ) == 0 ) { $profile = 'default' ; }
if ( strlen ( $record ) == 0 ) { $record = 'false' ; }
if ( strlen ( $max_members ) == 0 ) { $max_members = 0 ; }
if ( strlen ( $wait_mod ) == 0 ) { $wait_mod = 'true' ; }
if ( strlen ( $announce ) == 0 ) { $announce = 'true' ; }
if ( strlen ( $mute ) == 0 ) { $mute = 'false' ; }
if ( strlen ( $enabled ) == 0 ) { $enabled = 'true' ; }
2013-02-01 13:23:39 +01:00
if ( strlen ( $sounds ) == 0 ) { $sounds = 'false' ; }
2013-01-08 21:58:49 +01:00
2012-09-13 06:45:57 +02:00
//add a meeting
$meeting_uuid = uuid ();
$sql = " insert into v_meetings " ;
$sql .= " ( " ;
$sql .= " domain_uuid, " ;
$sql .= " meeting_uuid, " ;
2013-04-16 09:03:17 +02:00
$sql .= " moderator_pin, " ;
$sql .= " participant_pin, " ;
$sql .= " enabled, " ;
$sql .= " description " ;
2013-04-16 10:30:06 +02:00
$sql .= " ) " ;
2012-09-13 06:45:57 +02:00
$sql .= " values " ;
$sql .= " ( " ;
$sql .= " ' $domain_uuid ', " ;
$sql .= " ' $meeting_uuid ', " ;
2013-04-16 09:03:17 +02:00
$sql .= " ' $moderator_pin ', " ;
$sql .= " ' $participant_pin ', " ;
2012-09-13 06:45:57 +02:00
$sql .= " ' $enabled ', " ;
$sql .= " ' $description ' " ;
$sql .= " ) " ;
$db -> exec ( check_sql ( $sql ));
unset ( $sql );
2012-10-05 07:50:20 +02:00
//add a conference room
2012-10-05 01:04:39 +02:00
$conference_room_uuid = uuid ();
$sql = " insert into v_conference_rooms " ;
2012-09-13 06:45:57 +02:00
$sql .= " ( " ;
$sql .= " domain_uuid, " ;
2012-10-05 01:04:39 +02:00
$sql .= " conference_room_uuid, " ;
$sql .= " conference_center_uuid, " ;
2012-09-13 06:45:57 +02:00
$sql .= " meeting_uuid, " ;
2014-11-30 04:43:04 +01:00
$sql .= " conference_room_name, " ;
2012-10-14 01:17:59 +02:00
$sql .= " profile, " ;
2012-10-13 21:26:45 +02:00
$sql .= " record, " ;
2012-09-13 06:45:57 +02:00
$sql .= " max_members, " ;
2014-11-29 22:21:26 +01:00
$sql .= " start_datetime, " ;
$sql .= " stop_datetime, " ;
2012-09-13 06:45:57 +02:00
$sql .= " wait_mod, " ;
$sql .= " announce, " ;
2013-02-01 13:23:39 +01:00
$sql .= " sounds, " ;
2012-09-13 06:45:57 +02:00
$sql .= " mute, " ;
$sql .= " created, " ;
$sql .= " created_by, " ;
$sql .= " enabled, " ;
$sql .= " description " ;
2012-10-05 07:50:20 +02:00
$sql .= " ) " ;
2012-09-13 06:45:57 +02:00
$sql .= " values " ;
$sql .= " ( " ;
$sql .= " ' $domain_uuid ', " ;
2012-10-05 01:04:39 +02:00
$sql .= " ' $conference_room_uuid ', " ;
$sql .= " ' $conference_center_uuid ', " ;
2012-09-13 06:45:57 +02:00
$sql .= " ' $meeting_uuid ', " ;
2014-11-30 04:43:04 +01:00
$sql .= " ' $conference_room_name ', " ;
2012-10-14 01:17:59 +02:00
$sql .= " ' $profile ', " ;
2012-10-13 21:26:45 +02:00
$sql .= " ' $record ', " ;
2012-09-13 06:45:57 +02:00
$sql .= " ' $max_members ', " ;
2014-11-29 22:21:26 +01:00
$sql .= " ' $start_datetime ', " ;
$sql .= " ' $stop_datetime ', " ;
2012-09-13 06:45:57 +02:00
$sql .= " ' $wait_mod ', " ;
$sql .= " ' $announce ', " ;
2013-02-01 13:23:39 +01:00
$sql .= " ' $sounds ', " ;
2012-09-13 06:45:57 +02:00
$sql .= " ' $mute ', " ;
$sql .= " now(), " ;
$sql .= " ' " . $_SESSION [ 'user_uuid' ] . " ', " ;
$sql .= " ' $enabled ', " ;
$sql .= " ' $description ' " ;
$sql .= " ) " ;
$db -> exec ( check_sql ( $sql ));
unset ( $sql );
2012-10-27 17:49:06 +02:00
//assign the logged in user to the meeting
if ( strlen ( $_SESSION [ " user_uuid " ]) > 0 ) {
$meeting_user_uuid = uuid ();
$sql = " insert into v_meeting_users " ;
$sql .= " ( " ;
$sql .= " domain_uuid, " ;
$sql .= " meeting_user_uuid, " ;
$sql .= " meeting_uuid, " ;
$sql .= " user_uuid " ;
2013-04-16 10:30:06 +02:00
$sql .= " ) " ;
2012-10-27 17:49:06 +02:00
$sql .= " values " ;
$sql .= " ( " ;
$sql .= " ' $domain_uuid ', " ;
$sql .= " ' $meeting_user_uuid ', " ;
$sql .= " ' $meeting_uuid ', " ;
$sql .= " ' " . $_SESSION [ " user_uuid " ] . " ' " ;
$sql .= " ) " ;
$db -> exec ( check_sql ( $sql ));
unset ( $sql );
}
2014-02-21 04:56:30 +01:00
$_SESSION [ " message " ] = $text [ 'message-add' ];
2012-09-13 06:45:57 +02:00
} //if ($action == "add")
2012-10-05 01:04:39 +02:00
if ( $action == " update " && permission_exists ( 'conference_room_edit' )) {
2012-09-13 06:45:57 +02:00
//get the meeting_uuid
2012-10-20 01:36:27 +02:00
if ( count ( $_GET ) > 0 && $_POST [ " persistformvar " ] != " true " ) {
2012-10-05 01:04:39 +02:00
$conference_room_uuid = check_str ( $_GET [ " id " ]);
$sql = " select * from v_conference_rooms " ;
2012-09-13 06:45:57 +02:00
$sql .= " where domain_uuid = ' $domain_uuid ' " ;
2012-10-05 01:04:39 +02:00
$sql .= " and conference_room_uuid = ' $conference_room_uuid ' " ;
2012-09-13 06:45:57 +02:00
$prep_statement = $db -> prepare ( check_sql ( $sql ));
$prep_statement -> execute ();
$result = $prep_statement -> fetchAll ();
foreach ( $result as & $row ) {
$meeting_uuid = $row [ " meeting_uuid " ];
}
unset ( $prep_statement );
}
//update conference meetings
$sql = " update v_meetings set " ;
2013-04-16 09:03:17 +02:00
$sql .= " moderator_pin = ' $moderator_pin ', " ;
$sql .= " participant_pin = ' $participant_pin ', " ;
2012-09-13 06:45:57 +02:00
$sql .= " enabled = ' $enabled ', " ;
$sql .= " description = ' $description ' " ;
$sql .= " where domain_uuid = ' $domain_uuid ' " ;
$sql .= " and meeting_uuid = ' $meeting_uuid ' " ;
$db -> exec ( check_sql ( $sql ));
unset ( $sql );
2012-10-05 07:50:20 +02:00
//update the conference room
2012-10-05 01:04:39 +02:00
$sql = " update v_conference_rooms set " ;
$sql .= " conference_center_uuid = ' $conference_center_uuid ', " ;
2012-09-13 06:45:57 +02:00
//$sql .= "meeting_uuid = '$meeting_uuid', ";
2014-11-30 04:43:04 +01:00
$sql .= " conference_room_name = ' $conference_room_name ', " ;
2013-01-08 21:58:49 +01:00
if ( strlen ( $profile ) > 0 ) {
$sql .= " profile = ' $profile ', " ;
}
if ( strlen ( $record ) > 0 ) {
$sql .= " record = ' $record ', " ;
}
if ( strlen ( $max_members ) > 0 ) {
$sql .= " max_members = ' $max_members ', " ;
}
2014-11-30 04:08:02 +01:00
$sql .= " start_datetime = ' " . $start_datetime . " ', " ;
$sql .= " stop_datetime = ' " . $stop_datetime . " ', " ;
2013-01-08 21:58:49 +01:00
if ( strlen ( $wait_mod ) > 0 ) {
$sql .= " wait_mod = ' $wait_mod ', " ;
}
if ( strlen ( $announce ) > 0 ) {
$sql .= " announce = ' $announce ', " ;
}
2013-01-05 12:38:10 +01:00
//$sql .= "enter_sound = '$enter_sound', ";
2013-01-08 21:58:49 +01:00
if ( strlen ( $mute ) > 0 ) {
$sql .= " mute = ' $mute ', " ;
}
2013-02-01 13:23:39 +01:00
$sql .= " sounds = ' $sounds ', " ;
2013-01-08 21:58:49 +01:00
if ( strlen ( $enabled ) > 0 ) {
$sql .= " enabled = ' $enabled ', " ;
}
2012-09-13 06:45:57 +02:00
$sql .= " description = ' $description ' " ;
$sql .= " where domain_uuid = ' $domain_uuid ' " ;
2012-10-05 01:04:39 +02:00
$sql .= " and conference_room_uuid = ' $conference_room_uuid ' " ;
2012-09-13 06:45:57 +02:00
$db -> exec ( check_sql ( $sql ));
unset ( $sql );
2014-02-21 04:56:30 +01:00
$_SESSION [ " message " ] = $text [ 'message-update' ];
2012-09-13 06:45:57 +02:00
} //if ($action == "update")
//assign the user to the meeting
2012-10-27 17:49:06 +02:00
if ( strlen ( $user_uuid ) > 0 && $_SESSION [ " user_uuid " ] != $user_uuid ) {
2012-09-13 06:45:57 +02:00
$meeting_user_uuid = uuid ();
$sql = " insert into v_meeting_users " ;
$sql .= " ( " ;
$sql .= " domain_uuid, " ;
$sql .= " meeting_user_uuid, " ;
$sql .= " meeting_uuid, " ;
$sql .= " user_uuid " ;
$sql .= " ) " ;
$sql .= " values " ;
$sql .= " ( " ;
$sql .= " ' $domain_uuid ', " ;
$sql .= " ' $meeting_user_uuid ', " ;
$sql .= " ' $meeting_uuid ', " ;
$sql .= " ' $user_uuid ' " ;
$sql .= " ) " ;
//echo $sql; //exit;
$db -> exec ( check_sql ( $sql ));
unset ( $sql );
2014-02-21 04:56:30 +01:00
$_SESSION [ " message " ] = $text [ 'message-add' ];
2012-09-13 06:45:57 +02:00
}
2013-01-05 14:03:00 +01:00
2014-02-21 04:56:30 +01:00
header ( " Location: conference_room_edit.php?id= " . $conference_room_uuid );
return ;
2012-09-13 06:45:57 +02:00
} //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
//pre-populate the form
2012-10-20 01:36:27 +02:00
if ( count ( $_GET ) > 0 && $_POST [ " persistformvar " ] != " true " ) {
2013-04-16 09:03:17 +02:00
//get the conference room details
$conference_room_uuid = check_str ( $_REQUEST [ " id " ]);
2013-04-16 10:30:06 +02:00
$sql = " select * from v_conference_rooms as r, v_meetings as m " ;
$sql .= " where r.domain_uuid = ' $domain_uuid ' " ;
$sql .= " and r.meeting_uuid = m.meeting_uuid " ;
$sql .= " and r.conference_room_uuid = ' $conference_room_uuid ' " ;
2013-04-16 09:03:17 +02:00
$prep_statement = $db -> prepare ( check_sql ( $sql ));
$prep_statement -> execute ();
$result = $prep_statement -> fetchAll ();
foreach ( $result as & $row ) {
$conference_center_uuid = $row [ " conference_center_uuid " ];
$meeting_uuid = $row [ " meeting_uuid " ];
2013-04-16 10:30:06 +02:00
$moderator_pin = $row [ " moderator_pin " ];
$participant_pin = $row [ " participant_pin " ];
2014-11-30 04:43:04 +01:00
$conference_room_name = $row [ " conference_room_name " ];
2013-04-16 09:03:17 +02:00
$profile = $row [ " profile " ];
$record = $row [ " record " ];
$max_members = $row [ " max_members " ];
2014-11-29 22:21:26 +01:00
$start_datetime = $row [ " start_datetime " ];
$stop_datetime = $row [ " stop_datetime " ];
2013-04-16 09:03:17 +02:00
$wait_mod = $row [ " wait_mod " ];
$announce = $row [ " announce " ];
$sounds = $row [ " sounds " ];
$mute = $row [ " mute " ];
$created = $row [ " created " ];
$created_by = $row [ " created_by " ];
$enabled = $row [ " enabled " ];
$description = $row [ " description " ];
}
2016-01-18 22:15:21 +01:00
unset ( $prep_statement , $sql );
}
//get the users array
$sql = " SELECT * FROM v_users " ;
$sql .= " where domain_uuid = ' " . $_SESSION [ 'domain_uuid' ] . " ' " ;
$sql .= " order by username asc " ;
$prep_statement = $db -> prepare ( check_sql ( $sql ));
$prep_statement -> execute ();
$users = $prep_statement -> fetchAll ( PDO :: FETCH_NAMED );
unset ( $prep_statement , $sql );
//get the users assigned to this meeting
$sql = " SELECT * FROM v_users as u, v_meeting_users as m " ;
$sql .= " where u.user_uuid = m.user_uuid " ;
$sql .= " and m.domain_uuid = ' " . $_SESSION [ 'domain_uuid' ] . " ' " ;
$sql .= " and m.meeting_uuid = ' $meeting_uuid ' " ;
$sql .= " order by u.username asc " ;
$prep_statement = $db -> prepare ( check_sql ( $sql ));
$prep_statement -> execute ();
$meeting_users = $prep_statement -> fetchAll ( PDO :: FETCH_NAMED );
unset ( $prep_statement , $sql );
2012-09-13 06:45:57 +02:00
2014-02-06 05:01:22 +01:00
//set default profile
if ( strlen ( $profile ) == 0 ) { $profile = 'default' ; }
2013-04-16 09:03:17 +02:00
//get default pins
if ( strlen ( $moderator_pin ) == 0 ) {
$moderator_pin = get_meeting_pin ( $pin_length , $meeting_uuid );
}
if ( strlen ( $participant_pin ) == 0 ) {
$participant_pin = get_meeting_pin ( $pin_length , $meeting_uuid );
2013-01-05 14:03:00 +01:00
}
2013-01-08 21:58:49 +01:00
//format the pins
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 " ;
}
2012-09-13 06:45:57 +02:00
//set default values
2012-10-13 21:26:45 +02:00
if ( strlen ( $record ) == 0 ) { $record = 'false' ; }
2012-09-13 06:45:57 +02:00
if ( strlen ( $max_members ) == 0 ) { $max_members = 0 ; }
2013-01-05 12:51:51 +01:00
if ( strlen ( $wait_mod ) == 0 ) { $wait_mod = 'true' ; }
2012-09-13 06:45:57 +02:00
if ( strlen ( $announce ) == 0 ) { $announce = 'true' ; }
if ( strlen ( $mute ) == 0 ) { $mute = 'false' ; }
2013-02-01 13:23:39 +01:00
if ( strlen ( $sounds ) == 0 ) { $sounds = 'false' ; }
2012-09-13 06:45:57 +02:00
if ( strlen ( $enabled ) == 0 ) { $enabled = 'true' ; }
//show the header
2013-07-06 08:29:50 +02:00
require_once " resources/header.php " ;
2012-09-13 06:45:57 +02:00
//show the content
echo " <form method='post' name='frm' action=''> \n " ;
2014-11-29 22:21:26 +01:00
echo " <table width='100%' border='0' cellpadding='0' cellspacing='0'> \n " ;
2012-09-13 06:45:57 +02:00
echo " <tr> \n " ;
2015-08-03 23:17:05 +02:00
echo " <td align='left' valign='top' width='30%' nowrap='nowrap'><b> " . $text [ 'title-conference_rooms' ] . " </b></td> \n " ;
2014-11-29 22:21:26 +01:00
echo " <td width='70%' align='right' valign='top'> \n " ;
2014-04-27 01:37:41 +02:00
echo " <input type='button' class='btn' name='' alt=' " . $text [ 'button-back' ] . " ' onclick= \" window.location='conference_rooms.php' \" value=' " . $text [ 'button-back' ] . " '> \n " ;
2012-09-13 06:45:57 +02:00
if ( strlen ( $meeting_uuid ) > 0 ) {
2012-11-07 11:58:42 +01:00
echo " <input type='button' class='btn' name='' alt=' " . $text [ 'button-sessions' ] . " ' onclick= \" window.location='conference_sessions.php?id= " . $meeting_uuid . " ' \" value=' " . $text [ 'button-sessions' ] . " '> \n " ;
echo " <input type='button' class='btn' name='' alt=' " . $text [ 'button-view' ] . " ' onclick= \" window.location=' " . PROJECT_PATH . " /app/conferences_active/conference_interactive.php?c= " . $meeting_uuid . " ' \" value=' " . $text [ 'button-view' ] . " '> \n " ;
2012-09-13 06:45:57 +02:00
}
2014-04-27 01:37:41 +02:00
echo " <input type='submit' name='submit' class='btn' value=' " . $text [ 'button-save' ] . " '> \n " ;
2013-09-18 17:49:17 +02:00
echo " <br /> \n " ;
echo " <br /> \n " ;
2012-09-13 06:45:57 +02:00
echo " </td> \n " ;
echo " </tr> \n " ;
2013-05-22 02:58:29 +02:00
echo " <tr> \n " ;
2015-08-03 23:17:05 +02:00
echo " <td class='vncell' valign='top' align='left' nowrap='nowrap'> " . $text [ 'label-conference_name' ] . " </td> \n " ;
2013-05-22 02:58:29 +02:00
echo " <td class='vtable' align='left'> \n " ;
echo " <select class='formfld' name='conference_center_uuid'> \n " ;
foreach ( $conference_centers as & $row ) {
if ( $conference_center_uuid == $row [ " conference_center_uuid " ]) {
echo " <option value=' " . $row [ " conference_center_uuid " ] . " ' selected='selected'> " . $row [ " conference_center_name " ] . " </option> \n " ;
}
else {
echo " <option value=' " . $row [ " conference_center_uuid " ] . " '> " . $row [ " conference_center_name " ] . " </option> \n " ;
2012-09-13 06:45:57 +02:00
}
}
2013-05-22 02:58:29 +02:00
unset ( $prep_statement );
echo " </select> \n " ;
echo " <br /> \n " ;
echo " \n " ;
echo " </td> \n " ;
echo " </tr> \n " ;
2013-01-08 21:58:49 +01:00
echo " <tr> " ;
2014-11-30 04:43:04 +01:00
echo " <td class='vncell' valign='top'> " . $text [ 'label-room-name' ] . " </td> " ;
echo " <td class='vtable' align='left'> " ;
echo " <input class='formfld' type='text' name='conference_room_name' maxlength='255' value=' $conference_room_name '> \n " ;
echo " <br /> \n " ;
echo " " . $text [ 'description-room-name' ] . " \n " ;
echo " </td> " ;
echo " </tr> " ;
echo " <tr> " ;
echo " <td class='vncell' valign='top'> " . $text [ 'label-moderator-pin' ] . " </td> " ;
2013-01-08 21:58:49 +01:00
echo " <td class='vtable' align='left'> " ;
echo " <input class='formfld' type='text' name='moderator_pin' maxlength='255' value=' $moderator_pin '> \n " ;
echo " <br /> \n " ;
2015-08-03 23:17:05 +02:00
echo " " . $text [ 'description-moderator_pin' ] . " \n " ;
2013-01-08 21:58:49 +01:00
echo " </td> " ;
echo " </tr> " ;
echo " <tr> " ;
2014-11-30 04:43:04 +01:00
echo " <td class='vncell' valign='top'> " . $text [ 'label-participant-pin' ] . " </td> " ;
2013-01-08 21:58:49 +01:00
echo " <td class='vtable' align='left'> " ;
echo " <input class='formfld' type='text' name='participant_pin' maxlength='255' value=' $participant_pin '> \n " ;
echo " <br /> \n " ;
echo " " . $text [ 'description-participant-pin' ] . " \n " ;
echo " </td> " ;
echo " </tr> " ;
2012-09-13 06:45:57 +02:00
2015-02-13 22:17:02 +01:00
if ( if_group ( " superadmin " ) || if_group ( " admin " )) {
2016-01-18 22:15:21 +01:00
echo " <tr> " ;
echo " <td class='vncell' valign='top'> " . $text [ 'label-users' ] . " </td> " ;
echo " <td class='vtable' align='left'> " ;
if ( $action == " update " ) {
echo " <table border='0' style='width : 235px;'> \n " ;
foreach ( $meeting_users as $field ) {
echo " <tr> \n " ;
echo " <td class='vtable'> " . $field [ 'username' ] . " </td> \n " ;
echo " <td style='width: 25px;' align='right'> \n " ;
2016-01-19 06:06:45 +01:00
if ( permission_exists ( 'conference_room_delete' )) {
echo " <a href='conference_room_edit.php?meeting_user_uuid= " . $field [ 'meeting_user_uuid' ] . " &conference_room_uuid= " . $conference_room_uuid . " &a=delete' alt='delete' onclick= \" return confirm( " . $text [ 'confirm-delete' ] . " ) \" > $v_link_label_delete </a> \n " ;
}
2016-01-18 22:15:21 +01:00
echo " </td> \n " ;
echo " </tr> \n " ;
2013-02-27 11:10:24 +01:00
}
2016-01-18 22:15:21 +01:00
echo " </table> \n " ;
2012-09-13 06:45:57 +02:00
}
2016-01-18 22:15:21 +01:00
echo " <br /> \n " ;
2016-01-19 06:06:45 +01:00
if ( permission_exists ( 'conference_room_add' )) {
echo " <select name= \" user_uuid \" class='formfld' style='width: auto;'> \n " ;
echo " <option value= \" \" ></option> \n " ;
foreach ( $users as $field ) {
echo " <option value=' " . $field [ 'user_uuid' ] . " '> " . $field [ 'username' ] . " </option> \n " ;
}
echo " </select> " ;
if ( $action == " update " ) {
echo " <input type= \" submit \" class='btn' value= \" " . $text [ 'button-add' ] . " \" > \n " ;
}
unset ( $users );
echo " <br> \n " ;
2016-01-18 22:15:21 +01:00
}
echo " " . $text [ 'description-users' ] . " \n " ;
echo " </td> " ;
echo " </tr> " ;
2015-02-13 22:17:02 +01:00
}
2013-01-08 21:58:49 +01:00
if ( permission_exists ( 'conference_room_profile' )) {
echo " <tr> \n " ;
2014-11-30 04:43:04 +01:00
echo " <td class='vncellreq' valign='top' align='left' nowrap='nowrap'> " . $text [ 'label-profile' ] . " </td> \n " ;
2013-01-08 21:58:49 +01:00
echo " <td class='vtable' align='left'> \n " ;
2013-12-21 17:14:42 +01:00
echo " <input class='formfld' type='text' name='profile' maxlength='255' value=' $profile '> \n " ;
echo " <br /> \n " ;
echo " " . $text [ 'description-profile' ] . " \n " ;
2013-01-08 21:58:49 +01:00
echo " </td> \n " ;
echo " </tr> \n " ;
2012-10-13 21:26:45 +02:00
}
2013-12-21 17:14:42 +01:00
if ( permission_exists ( 'conference_room_record' )) {
2013-01-08 21:58:49 +01:00
echo " <tr> \n " ;
2014-11-30 04:43:04 +01:00
echo " <td class='vncell' valign='top' align='left' nowrap='nowrap'> " . $text [ 'label-record' ] . " </td> \n " ;
2013-01-08 21:58:49 +01:00
echo " <td class='vtable' align='left'> \n " ;
echo " <select class='formfld' name='record'> \n " ;
echo " <option value=''></option> \n " ;
2014-02-21 04:56:30 +01:00
if ( $record == " true " ) {
2013-01-08 21:58:49 +01:00
echo " <option value='true' selected='selected'> " . $text [ 'label-true' ] . " </option> \n " ;
}
else {
echo " <option value='true'> " . $text [ 'label-true' ] . " </option> \n " ;
}
2014-02-21 04:56:30 +01:00
if ( $record == " false " ) {
2013-01-08 21:58:49 +01:00
echo " <option value='false' selected='selected'> " . $text [ 'label-false' ] . " </option> \n " ;
}
else {
echo " <option value='false'> " . $text [ 'label-false' ] . " </option> \n " ;
}
echo " </select> \n " ;
echo " <br /> \n " ;
echo " </td> \n " ;
echo " </tr> \n " ;
2012-09-13 06:45:57 +02:00
}
2013-01-08 21:58:49 +01:00
if ( permission_exists ( 'conference_room_max_members' )) {
echo " <tr> \n " ;
2014-11-30 04:43:04 +01:00
echo " <td class='vncell' valign='top' align='left' nowrap='nowrap'> " . $text [ 'label-max-members' ] . " </td> \n " ;
2013-01-08 21:58:49 +01:00
echo " <td class='vtable' align='left'> \n " ;
echo " <input class='formfld' type='text' name='max_members' maxlength='255' value=' $max_members '> \n " ;
echo " <br /> \n " ;
echo " \n " ;
echo " </td> \n " ;
echo " </tr> \n " ;
2012-09-13 06:45:57 +02:00
}
2013-01-08 21:58:49 +01:00
2014-11-29 22:21:26 +01:00
echo " <tr> \n " ;
2014-11-30 04:43:04 +01:00
echo " <td class='vncell' valign='top' nowrap='nowrap' width='30%'> " . $text [ 'label-schedule' ] . " </td> \n " ;
2014-11-29 22:21:26 +01:00
echo " <td class='vtable' width='70%' align='left' style='white-space: nowrap;'> \n " ;
2016-03-25 23:29:20 +01:00
echo " <div class='row'> \n " ;
echo " <div class='col-sm-12'> \n " ;
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px; max-width: 115px;' name='start_datetime' id='start_datetime' placeholder=' " . $text [ 'label-from' ] . " ' value=' " . $start_datetime . " '> \n " ;
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px; max-width: 115px;' name='stop_datetime' id='stop_datetime' placeholder=' " . $text [ 'label-to' ] . " ' value=' " . $stop_datetime . " '> \n " ;
echo " </div> \n " ;
echo " </div> \n " ;
2014-11-29 22:21:26 +01:00
echo " <br> " . $text [ 'description-schedule' ];
echo " </td> \n " ;
echo " </tr> \n " ;
2013-01-08 21:58:49 +01:00
if ( permission_exists ( 'conference_room_wait_mod' )) {
echo " <tr> \n " ;
2015-08-03 23:17:05 +02:00
echo " <td class='vncell' valign='top' align='left' nowrap='nowrap'> " . $text [ 'label-wait_for_moderator' ] . " </td> \n " ;
2013-01-08 21:58:49 +01:00
echo " <td class='vtable' align='left'> \n " ;
echo " <select class='formfld' name='wait_mod'> \n " ;
echo " <option value=''></option> \n " ;
2014-02-21 04:56:30 +01:00
if ( $wait_mod == " true " ) {
2013-01-08 21:58:49 +01:00
echo " <option value='true' selected='selected'> " . $text [ 'label-true' ] . " </option> \n " ;
}
else {
echo " <option value='true'> " . $text [ 'label-true' ] . " </option> \n " ;
}
2014-02-21 04:56:30 +01:00
if ( $wait_mod == " false " ) {
2013-01-08 21:58:49 +01:00
echo " <option value='false' selected='selected'> " . $text [ 'label-false' ] . " </option> \n " ;
}
else {
echo " <option value='false'> " . $text [ 'label-false' ] . " </option> \n " ;
}
echo " </select> \n " ;
echo " <br /> \n " ;
echo " </td> \n " ;
echo " </tr> \n " ;
2012-09-13 06:45:57 +02:00
}
2013-01-08 21:58:49 +01:00
if ( permission_exists ( 'conference_room_announce' )) {
echo " <tr> \n " ;
2014-11-30 04:43:04 +01:00
echo " <td class='vncell' valign='top' align='left' nowrap='nowrap'> " . $text [ 'label-announce' ] . " </td> \n " ;
2013-01-08 21:58:49 +01:00
echo " <td class='vtable' align='left'> \n " ;
echo " <select class='formfld' name='announce'> \n " ;
echo " <option value=''></option> \n " ;
2014-02-21 04:56:30 +01:00
if ( $announce == " true " ) {
2013-01-08 21:58:49 +01:00
echo " <option value='true' selected='selected'> " . $text [ 'label-true' ] . " </option> \n " ;
}
else {
echo " <option value='true'> " . $text [ 'label-true' ] . " </option> \n " ;
}
2014-02-21 04:56:30 +01:00
if ( $announce == " false " ) {
2013-01-08 21:58:49 +01:00
echo " <option value='false' selected='selected'> " . $text [ 'label-false' ] . " </option> \n " ;
}
else {
echo " <option value='false'> " . $text [ 'label-false' ] . " </option> \n " ;
}
echo " </select> \n " ;
echo " <br /> \n " ;
echo " </td> \n " ;
echo " </tr> \n " ;
2012-09-13 06:45:57 +02:00
}
2013-01-05 12:38:10 +01:00
//echo "<tr>\n";
//echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
2015-02-15 07:50:00 +01:00
//echo " ".$text['label-enter-sound']."\n";
2013-01-05 12:38:10 +01:00
//echo "</td>\n";
//echo "<td class='vtable' align='left'>\n";
//echo " <input class='formfld' type='text' name='enter_sound' maxlength='255' value=\"$enter_sound\">\n";
//echo "<br />\n";
//echo "\n";
//echo "</td>\n";
//echo "</tr>\n";
2012-09-13 06:45:57 +02:00
2013-01-08 21:58:49 +01:00
if ( permission_exists ( 'conference_room_mute' )) {
echo " <tr> \n " ;
2014-11-30 04:43:04 +01:00
echo " <td class='vncell' valign='top' align='left' nowrap='nowrap'> " . $text [ 'label-mute' ] . " </td> \n " ;
2013-01-08 21:58:49 +01:00
echo " <td class='vtable' align='left'> \n " ;
echo " <select class='formfld' name='mute'> \n " ;
echo " <option value=''></option> \n " ;
2014-02-21 04:56:30 +01:00
if ( $mute == " true " ) {
2013-01-08 21:58:49 +01:00
echo " <option value='true' selected='selected'> " . $text [ 'label-true' ] . " </option> \n " ;
}
else {
echo " <option value='true'> " . $text [ 'label-true' ] . " </option> \n " ;
}
2014-02-21 04:56:30 +01:00
if ( $mute == " false " ) {
2013-01-08 21:58:49 +01:00
echo " <option value='false' selected='selected'> " . $text [ 'label-false' ] . " </option> \n " ;
}
else {
echo " <option value='false'> " . $text [ 'label-false' ] . " </option> \n " ;
}
echo " </select> \n " ;
echo " <br /> \n " ;
echo " \n " ;
echo " </td> \n " ;
echo " </tr> \n " ;
2012-09-13 06:45:57 +02:00
}
2013-01-08 21:58:49 +01:00
if ( permission_exists ( 'conference_room_profile' )) {
echo " <tr> \n " ;
2014-11-30 04:43:04 +01:00
echo " <td class='vncell' valign='top' align='left' nowrap='nowrap'> " . $text [ 'label-enabled' ] . " </td> \n " ;
2013-01-08 21:58:49 +01:00
echo " <td class='vtable' align='left'> \n " ;
echo " <select class='formfld' name='enabled'> \n " ;
echo " <option value=''></option> \n " ;
2014-02-21 04:56:30 +01:00
if ( $enabled == " true " ) {
2013-01-08 21:58:49 +01:00
echo " <option value='true' selected='selected'> " . $text [ 'label-true' ] . " </option> \n " ;
}
else {
echo " <option value='true'> " . $text [ 'label-true' ] . " </option> \n " ;
}
2014-02-21 04:56:30 +01:00
if ( $enabled == " false " ) {
2013-01-08 21:58:49 +01:00
echo " <option value='false' selected='selected'> " . $text [ 'label-false' ] . " </option> \n " ;
}
else {
echo " <option value='false'> " . $text [ 'label-false' ] . " </option> \n " ;
}
echo " </select> \n " ;
echo " <br /> \n " ;
echo " \n " ;
echo " </td> \n " ;
echo " </tr> \n " ;
2012-09-13 06:45:57 +02:00
}
2013-02-27 11:10:24 +01:00
if ( permission_exists ( 'conference_room_sounds' )) {
echo " <tr> \n " ;
2014-11-30 04:43:04 +01:00
echo " <td class='vncell' valign='top' align='left' nowrap='nowrap'> " . $text [ 'label-sounds' ] . " </td> \n " ;
2013-02-27 11:10:24 +01:00
echo " <td class='vtable' align='left'> \n " ;
echo " <select class='formfld' name='sounds'> \n " ;
echo " <option value=''></option> \n " ;
2014-02-21 04:56:30 +01:00
if ( $sounds == " true " ) {
2013-02-27 11:10:24 +01:00
echo " <option value='true' selected='selected'> " . $text [ 'label-true' ] . " </option> \n " ;
}
else {
echo " <option value='true'> " . $text [ 'label-true' ] . " </option> \n " ;
}
2014-02-21 04:56:30 +01:00
if ( $sounds == " false " ) {
2013-02-27 11:10:24 +01:00
echo " <option value='false' selected='selected'> " . $text [ 'label-false' ] . " </option> \n " ;
}
else {
echo " <option value='false'> " . $text [ 'label-false' ] . " </option> \n " ;
}
echo " </select> \n " ;
echo " <br /> \n " ;
echo " \n " ;
echo " </td> \n " ;
echo " </tr> \n " ;
2013-02-01 13:23:39 +01:00
}
echo " <tr> \n " ;
2014-11-30 04:43:04 +01:00
echo " <td class='vncell' valign='top' align='left' nowrap='nowrap'> " . $text [ 'label-description' ] . " </td> \n " ;
2012-09-13 06:45:57 +02:00
echo " <td class='vtable' align='left'> \n " ;
echo " <input class='formfld' type='text' name='description' maxlength='255' value= \" $description\ " > \n " ;
echo " <br /> \n " ;
echo " \n " ;
echo " </td> \n " ;
echo " </tr> \n " ;
2014-11-30 04:43:04 +01:00
echo " <tr> \n " ;
echo " <td colspan='2' align='right'> \n " ;
echo " <br> " ;
2012-09-13 06:45:57 +02:00
if ( $action == " update " ) {
2014-11-30 04:43:04 +01:00
echo " <input type='hidden' name='conference_center_uuid' value=' $conference_center_uuid '> \n " ;
echo " <input type='hidden' name='meeting_uuid' value=' $meeting_uuid '> \n " ;
echo " <input type='hidden' name='conference_room_uuid' value=' $conference_room_uuid '> \n " ;
2012-09-13 06:45:57 +02:00
}
2014-11-30 04:43:04 +01:00
echo " <input type='submit' name='submit' class='btn' value=' " . $text [ 'button-save' ] . " '> \n " ;
echo " </td> \n " ;
echo " </tr> " ;
2012-09-13 06:45:57 +02:00
echo " </table> " ;
2014-11-30 04:08:02 +01:00
echo " <br> " ;
2014-11-29 22:21:26 +01:00
2012-09-13 06:45:57 +02:00
echo " </form> " ;
//include the footer
2013-07-06 08:29:50 +02:00
require_once " resources/footer.php " ;
2015-02-13 22:17:02 +01:00
?>