Update conference_rooms.php
This commit is contained in:
parent
d18e90a30d
commit
5b625337cb
|
|
@ -47,7 +47,7 @@
|
|||
require_once "resources/paging.php";
|
||||
|
||||
//get the meeting_uuid using the pin number
|
||||
$search = check_str($_GET["search"]);
|
||||
$search = $_GET["search"];
|
||||
$search = preg_replace('{\D}', '', $search);
|
||||
if (strlen($search) > 0) {
|
||||
$sql = "select * from v_meetings ";
|
||||
|
|
@ -64,17 +64,17 @@
|
|||
//if the $_GET array exists then process it
|
||||
if (count($_GET) > 0 && strlen($_GET["search"]) == 0) {
|
||||
//get http GET variables and set them as php variables
|
||||
$conference_room_uuid = check_str($_GET["conference_room_uuid"]);
|
||||
$record = check_str($_GET["record"]);
|
||||
$wait_mod = check_str($_GET["wait_mod"]);
|
||||
$announce = check_str($_GET["announce"]);
|
||||
$mute = check_str($_GET["mute"]);
|
||||
$sounds = check_str($_GET["sounds"]);
|
||||
$enabled = check_str($_GET["enabled"]);
|
||||
$meeting_uuid = check_str($_GET["meeting_uuid"]);
|
||||
$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"];
|
||||
|
||||
//record announcement
|
||||
if ($record == "true") {
|
||||
if ($record == "true" && is_uuid($meeting_uuid)) {
|
||||
//prepare the values
|
||||
$default_language = 'en';
|
||||
$default_dialect = 'us';
|
||||
|
|
@ -87,34 +87,33 @@
|
|||
}
|
||||
}
|
||||
|
||||
//update the conference room
|
||||
$sql = "update v_conference_rooms set ";
|
||||
//build the array
|
||||
$array['conference_rooms'][0]['conference_room_uuid'] = $conference_room_uuid;
|
||||
if (strlen($record) > 0) {
|
||||
$sql .= "record = '$record' ";
|
||||
$array['conference_rooms'][0]['record'] = $record;
|
||||
}
|
||||
if (strlen($wait_mod) > 0) {
|
||||
$sql .= "wait_mod = '$wait_mod' ";
|
||||
$array['conference_rooms'][0]['wait_mod'] = $wait_mod;
|
||||
}
|
||||
if (strlen($announce) > 0) {
|
||||
$sql .= "announce = '$announce' ";
|
||||
$array['conference_rooms'][0]['announce'] = $announce;
|
||||
}
|
||||
if (strlen($mute) > 0) {
|
||||
$sql .= "mute = '$mute' ";
|
||||
$array['conference_rooms'][0]['mute'] = $mute;
|
||||
}
|
||||
if (strlen($sounds) > 0) {
|
||||
$sql .= "sounds = '$sounds' ";
|
||||
$array['conference_rooms'][0]['sounds'] = $sounds;
|
||||
}
|
||||
if (strlen($enabled) > 0) {
|
||||
$sql .= "enabled = '$enabled' ";
|
||||
$array['conference_rooms'][0]['enabled'] = $enabled;
|
||||
}
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and conference_room_uuid = :conference_room_uuid ";
|
||||
//echo $sql; //exit;
|
||||
//$db->exec(check_sql($sql));
|
||||
//unset($sql);
|
||||
$parameters['conference_room_uuid'] = $conference_room_uuid;
|
||||
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->select($sql, $parameters);
|
||||
$database->app_name = 'conference_rooms';
|
||||
$database->app_uuid = '8d083f5a-f726-42a8-9ffa-8d28f848f10e';
|
||||
$database->save($array);
|
||||
$message = $database->message;
|
||||
}
|
||||
|
||||
//get conference array
|
||||
|
|
@ -182,8 +181,8 @@
|
|||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "";
|
||||
$page = check_str($_GET['page']);
|
||||
$param = '';
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($row_count, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
|
@ -200,7 +199,6 @@
|
|||
$conference_center->search = $search;
|
||||
}
|
||||
$result = $conference_center->rooms();
|
||||
$result_count = $conference_center->count;
|
||||
|
||||
//prepare to alternate the row styles
|
||||
$c = 0;
|
||||
|
|
@ -239,8 +237,8 @@
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
//table data
|
||||
if ($result_count > 0) {
|
||||
//show the data
|
||||
if (is_array($result) > 0) {
|
||||
foreach($result as $row) {
|
||||
$meeting_uuid = $row['meeting_uuid'];
|
||||
$conference_room_name = $row['conference_room_name'];
|
||||
|
|
|
|||
Loading…
Reference in New Issue