From a14418969bd945f3d926b1837c5cb265ac38283f Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 14 Jan 2020 16:06:14 -0700 Subject: [PATCH] Conference Centers: More list and button updates. --- .../conference_room_edit.php | 52 +++--- .../conference_session_details.php | 155 ++++++++---------- .../conference_sessions.php | 138 +++++++--------- resources/app_languages.php | 20 +++ 4 files changed, 167 insertions(+), 198 deletions(-) diff --git a/app/conference_centers/conference_room_edit.php b/app/conference_centers/conference_room_edit.php index b9a3c86e0d..19af468efd 100644 --- a/app/conference_centers/conference_room_edit.php +++ b/app/conference_centers/conference_room_edit.php @@ -561,24 +561,24 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //show the content echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'style'=>'margin-left: 15px;']); + echo " \n"; + echo "
\n"; + echo "\n"; + + echo "
".$text['title-conference_room']."\n"; - echo " \n"; + echo "
\n"; + echo "
".$text['title-conference_room']."
\n"; + echo "
\n"; + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'link'=>'conference_rooms.php']); if (is_uuid($meeting_uuid)) { - echo " \n"; - echo " \n"; + echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'style'=>'margin-left: 15px;','link'=>'../conferences_active/conference_interactive.php?c='.urlencode($meeting_uuid)]); + echo button::create(['type'=>'button','label'=>$text['button-sessions'],'icon'=>'list','link'=>'conference_sessions.php?id='.urlencode($meeting_uuid)]); } - echo " \n"; - echo "
\n"; - echo "
\n"; - echo "
\n"; echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; - echo "\n"; - echo " \n"; - echo ""; + echo "
".$text['label-conference_name']."\n"; + echo "".$text['label-conference_name']."\n"; echo "
\n"; - echo "
"; - if ($action == "update") { - echo " \n"; - echo " \n"; - echo " \n"; - } - echo " \n"; - echo " \n"; - echo "
\n"; + echo "

\n"; - echo ""; - echo "
"; + if ($action == "update") { + echo "\n"; + echo "\n"; + echo "\n"; + } + echo "\n"; echo "
"; //include the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file diff --git a/app/conference_centers/conference_session_details.php b/app/conference_centers/conference_session_details.php index ba8d54a640..751d24477a 100644 --- a/app/conference_centers/conference_session_details.php +++ b/app/conference_centers/conference_session_details.php @@ -27,6 +27,7 @@ require_once "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; + require_once "resources/paging.php"; //check permissions if (permission_exists('conference_session_view')) { @@ -41,10 +42,6 @@ $language = new text; $text = $language->get(); -//additional includes - require_once "resources/header.php"; - require_once "resources/paging.php"; - //set variables from the http values $order_by = $_GET["order_by"] != '' ? $_GET["order_by"] : 'start_epoch'; $order = $_GET['order'] != '' ? $_GET['order'] : 'asc'; @@ -77,44 +74,6 @@ $tmp_month = date("M", $start_epoch); $tmp_day = date("d", $start_epoch); -//show the content - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
".$text['title-conference_session_details']."\n"; - $tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day; - $tmp_name = ''; - if (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.mp3')) { - $tmp_name = $row['conference_session_uuid'].".mp3"; - } - elseif (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.wav')) { - $tmp_name = $row['conference_session_uuid'].".wav"; - } - if (strlen($tmp_name) > 0 && file_exists($tmp_dir.'/'.$tmp_name)) { - if (permission_exists('conference_session_play')) { - echo " \n"; - //echo " ".$text['label-play']."\n"; - echo " \n"; - //echo " \n"; - echo "  \n"; - } - echo " \n"; - //echo " ".$text['label-download']."\n"; - echo " \n"; - //echo " \n"; - //echo " \n"; - echo "  \n"; - } - echo " \n"; - echo "
\n"; - echo " ".$text['description-conference_session_details']."

\n"; - echo "
\n"; - //prepare to page the results $sql = "select count(*) from v_conference_session_details "; $sql .= "where domain_uuid = :domain_uuid "; @@ -128,9 +87,9 @@ $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; $param = ''; if (isset($_GET['page'])) { - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_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; } @@ -145,14 +104,40 @@ $conference_session_details = $database->select($sql, $parameters, 'all'); unset($sql, $parameters); -//show the styles - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; +//include the header + require_once "resources/header.php"; -//show the conent - echo "\n"; - echo "\n"; +//show the content + echo "
\n"; + echo "
".$text['title-conference_session_details']."
\n"; + echo "
\n"; + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'link'=>'conference_sessions.php']); + $tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day; + $tmp_name = ''; + if (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.mp3')) { + $tmp_name = $row['conference_session_uuid'].".mp3"; + } + elseif (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.wav')) { + $tmp_name = $row['conference_session_uuid'].".wav"; + } + if (strlen($tmp_name) > 0 && file_exists($tmp_dir.'/'.$tmp_name)) { + echo button::create(['type'=>'button','label'=>$text['button-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'style'=>'margin-left: 15px;','link'=>'../recordings/recordings.php?a=download&type=rec&t=bin&filename='.base64_encode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)]); + if (permission_exists('conference_session_play')) { + echo button::create(['type'=>'button','label'=>$text['button-play'],'icon'=>$_SESSION['theme']['button_icon_play'],'onclick'=>"window.open('".PROJECT_PATH."/app/recordings/recording_play.php?a=download&type=moh&filename=".urlencode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)."', 'play',' width=420,height=150,menubar=no,status=no,toolbar=no');"]); + } + } + if ($paging_controls_mini != '') { + echo "".$paging_controls_mini."\n"; + } + echo "
\n"; + echo "
\n"; + echo "
\n"; + + echo $text['description-conference_session_details']."\n"; + echo "

\n"; + + echo "
\n"; + echo "\n"; //echo th_order_by('meeting_uuid', 'Meeting UUID', $order_by, $order); //echo th_order_by('conference_uuid', 'Conference UUID', $order_by, $order); //echo th_order_by('username', $text['label-username'], $order_by, $order); @@ -164,8 +149,8 @@ echo "\n"; echo th_order_by('start_epoch', $text['label-start'], $order_by, $order); echo th_order_by('end_epoch', $text['label-end'], $order_by, $order); - if (permission_exists('conference_session_details')) { - echo "\n"; + if (permission_exists('conference_session_details') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { + echo " \n"; } echo "\n"; @@ -183,46 +168,42 @@ $time_difference = $row['end_epoch'] - $row['start_epoch']; $time_difference = gmdate("G:i:s", $time_difference); } - $tr_link = (permission_exists('conference_session_details')) ? "href='/app/xml_cdr/xml_cdr_details.php?id=".escape($row['uuid'])."'" : null; - echo "\n"; - //echo " \n"; - //echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; if (permission_exists('conference_session_details')) { - echo " \n"; + //echo " \n"; + //echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + if (permission_exists('conference_session_details') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { + echo " \n"; } echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach + + } unset($conference_session_details); - } //end if results + } - echo "\n"; - echo "\n"; - echo "\n"; - - echo "
".$text['label-time']."  
".$row['meeting_uuid']." ".$row['conference_session_uuid']." ".escape($row['caller_id_name'])." ".escape($row['caller_id_number'])." ".ucwords(escape($row['moderator']))." ".escape($row['network_addr'])." ".$time_difference." ".$start_date." ".$end_date." "; - echo " $v_link_label_view"; + $list_row_url = "../xml_cdr/xml_cdr_details.php?id=".urlencode($row['uuid']); + } + echo "
".$row['meeting_uuid']." ".$row['conference_session_uuid']." "; + if (permission_exists('conference_session_details')) { + echo " ".escape($row['caller_id_name'])."\n"; + } + else { + echo " ".escape($row['caller_id_name']); + } + echo " ".escape($row['caller_id_number'])." ".ucwords(escape($row['moderator']))." ".escape($row['network_addr'])." ".$time_difference." ".$start_date." ".$end_date." \n"; + echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]); echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 $paging_controls\n"; - echo "  \n"; - echo "
\n"; - echo "
"; - echo "

"; + echo "\n"; + echo "
\n"; + echo "
".$paging_controls."
\n"; //include the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file diff --git a/app/conference_centers/conference_sessions.php b/app/conference_centers/conference_sessions.php index cec6f44ce9..cfa9e37bd9 100644 --- a/app/conference_centers/conference_sessions.php +++ b/app/conference_centers/conference_sessions.php @@ -27,6 +27,7 @@ require_once "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; + require_once "resources/paging.php"; //check permissions if (permission_exists('conference_session_view')) { @@ -41,10 +42,6 @@ $language = new text; $text = $language->get(); -//additional includes - require_once "resources/header.php"; - require_once "resources/paging.php"; - //set variables from the http values $meeting_uuid = $_GET["id"]; $order_by = $_GET["order_by"] != '' ? $_GET["order_by"] : 'start_epoch'; @@ -55,19 +52,6 @@ $_SESSION['meeting']['uuid'] = $meeting_uuid; } -//show the content - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
".$text['title-conference_sessions']."
\n"; - echo " ".$text['description-conference_sessions']."

\n"; - echo "
\n"; - //prepare to page the results $sql = "select count(*) from v_conference_sessions "; $sql .= "where domain_uuid = :domain_uuid "; @@ -82,9 +66,9 @@ $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; $param = ''; if (isset($_GET['page'])) { - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_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; } @@ -100,12 +84,10 @@ $conference_sessions = $database->select($sql, $parameters, 'all'); unset($sql, $parameters); -//set the row style - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; +//includes the header + require_once "resources/header.php"; -//show the content +//styles echo "\n"; echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; +//show the content + echo "
\n"; + echo "
".$text['title-conference_sessions']." (".$num_rows.")
\n"; + echo "
\n"; + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'link'=>'conference_rooms.php']); + if ($paging_controls_mini != '') { + echo "".$paging_controls_mini."\n"; + } + echo "
\n"; + echo "
\n"; + echo "
\n"; + + echo $text['description-conference_sessions']."\n"; + echo "

\n"; + + echo "
".$text['label-time']."
\n"; + echo "\n"; echo th_order_by('start_epoch', $text['label-start'], $order_by, $order); echo th_order_by('end_epoch', $text['label-end'], $order_by, $order); + echo "\n"; echo th_order_by('profile', $text['label-profile'], $order_by, $order); //echo th_order_by('recording', $text['label-recording'], $order_by, $order); echo "\n"; - echo "\n"; + if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { + echo " \n"; + } echo "\n"; if (is_array($conference_sessions) && sizeof($conference_sessions) != 0) { @@ -151,12 +150,12 @@ } if (strlen( $row['start_epoch']) > 0) { - $tr_link = "href='conference_session_details.php?uuid=".escape($row['conference_session_uuid'])."'"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; + $list_row_url = "conference_session_details.php?uuid=".urlencode($row['conference_session_uuid']); + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; $tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day; $tmp_name = ''; if (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.mp3')) { @@ -165,69 +164,44 @@ elseif (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.wav')) { $tmp_name = $row['conference_session_uuid'].".wav"; } - echo " \n"; - echo " \n"; + if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { + echo " \n"; + } echo "\n"; + } - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results + } + unset($result); + } - echo "\n"; - echo "\n"; - echo "\n"; - - echo "
".$text['label-time']."".$text['label-tools']."  
".$time_difference." ".$start_date." ".$end_date." ".escape($row['profile'])." 
".$start_date." ".$end_date." ".$time_difference." ".escape($row['profile'])." \n"; + echo " \n"; - echo " \n"; - //echo " "; - echo " $v_link_label_view\n"; - echo " \n"; - echo " \n"; + echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]); + echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 $paging_controls\n"; - echo "  \n"; - echo "
\n"; - echo "
"; - echo "

"; + echo "\n"; + echo "
\n"; + echo "
".$paging_controls."
\n"; //include the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file diff --git a/resources/app_languages.php b/resources/app_languages.php index 6f06e39e03..7fab916390 100644 --- a/resources/app_languages.php +++ b/resources/app_languages.php @@ -1462,6 +1462,26 @@ $text['button-continue']['ru-ru'] = "Продолжить"; $text['button-continue']['sv-se'] = "Fortsätt"; $text['button-continue']['uk-ua'] = "Продовжити"; +$text['button-play']['en-us'] = "Play"; +$text['button-play']['ar-eg'] = ""; +$text['button-play']['de-at'] = "Play"; //copied from de-de +$text['button-play']['de-ch'] = "Play"; //copied from de-de +$text['button-play']['de-de'] = "Play"; +$text['button-play']['es-cl'] = "Reproducir"; +$text['button-play']['es-mx'] = "Reproducir"; //copied from es-cl +$text['button-play']['fr-ca'] = "Lire"; //copied from fr-fr +$text['button-play']['fr-fr'] = "Lire"; +$text['button-play']['he-il'] = "נגן"; +$text['button-play']['it-it'] = "Suona"; +$text['button-play']['nl-nl'] = "Spelen"; +$text['button-play']['pl-pl'] = "Odtwórz"; +$text['button-play']['pt-br'] = "Tocar"; //copied from pt-pt +$text['button-play']['pt-pt'] = "Tocar"; +$text['button-play']['ro-ro'] = ""; +$text['button-play']['ru-ru'] = "Проиграть"; +$text['button-play']['sv-se'] = "Spela Upp"; +$text['button-play']['uk-ua'] = "Відтворити"; + $text['label-installed']['en-us'] = "Installed"; $text['label-installed']['ar-eg'] = "Installed"; $text['label-installed']['de-at'] = "Installed";