Multiple Apps: Integrate content cards.

This commit is contained in:
fusionate 2024-09-04 16:55:24 -06:00
parent 73c15de84c
commit d234fb185a
No known key found for this signature in database
23 changed files with 95 additions and 25 deletions

View File

@ -154,6 +154,7 @@
}
//list the agents
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo "<th>".$text['label-name']."</th>\n";
@ -270,6 +271,7 @@
} //foreach
} //if
echo "</table>\n\n";
echo "</div>\n";
//add vertical spacing
echo "<br /><br /><br />";
@ -310,6 +312,7 @@
echo $text['description-queue']."\n";
echo "<br /><br />\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo "<th>".$text['label-time']."</th>\n";
@ -382,6 +385,7 @@
}
}
echo "</table>\n";
echo "</div>\n";
}

View File

@ -104,6 +104,7 @@
echo $text['description-active_call_center']."\n";
echo "<br /><br />\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo th_order_by('queue_name', $text['label-queue_name'], $order_by, $order);
@ -150,6 +151,7 @@
}
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";

View File

@ -348,6 +348,7 @@
echo "<form id='form_list' method='post'>\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo " <th class='pct-20'>".$text['label-agent']."</th>\n";
@ -436,6 +437,7 @@
}
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";

View File

@ -160,6 +160,7 @@
echo "<form id='form_list' method='post' action='calls_exec.php'>\n";
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
if (permission_exists('call_active_hangup')) {
@ -262,6 +263,7 @@
}
echo "</table>\n";
echo "</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";

View File

@ -150,6 +150,7 @@
echo "<strong>".$text['label-members'].": ".escape($member_count ?? '')."</strong>\n";
echo "<br /><br />\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo "<th width='1px'>&nbsp;</th>\n";
@ -273,6 +274,7 @@
}
}
echo "</table>\n";
echo "</div>\n";
echo "<br /><br />";
}

View File

@ -66,6 +66,7 @@
//echo $e->getMessage();
}
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo " <th>".$text['label-name']."</th>\n";
@ -153,6 +154,7 @@
}
}
echo "</table>\n";
echo "</div>\n";
echo "<br /><br />";
}

View File

@ -139,7 +139,8 @@
if (permission_exists('xml_cdr_search')) {
echo "<form name='frm' id='frm' method='get'>\n";
echo "<div class='form_grid' style='padding-bottom: 35px;'>\n";
echo "<div class='card' style='margin-bottom: 30px;'>\n";
echo "<div class='form_grid'>\n";
echo " <div class='form_set'>\n";
echo " <div class='label'>\n";
@ -189,6 +190,7 @@
echo " </div>\n";
echo " </div>\n";
echo "</div>\n";
echo "</div>\n";
if (!empty($_GET['show']) && $_GET['show'] == 'all' && permission_exists('destination_summary_all')) {
@ -199,6 +201,7 @@
}
//show the results
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo " <tr class='list-header'>\n";
if (!empty($_GET['show']) && $_GET['show'] === "all" && permission_exists('destination_summary_all')) {
@ -236,6 +239,7 @@
}
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
//show the footer

View File

@ -307,6 +307,7 @@
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<input type='hidden' name='search' value=\"".escape($search ?? '')."\">\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
if (permission_exists('email_queue_add') || permission_exists('email_queue_edit') || permission_exists('email_queue_delete')) {
@ -380,6 +381,7 @@
}
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";

View File

@ -329,6 +329,7 @@
}
}
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
@ -531,6 +532,7 @@
}
echo "</table>";
echo "</div>";
echo "<br /><br />";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";

View File

@ -183,6 +183,7 @@ if ($emergency_logs) {
echo $text['title_description-emergency_logs']."\n";
echo "<br /><br />\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
if (!empty($show) && $show == 'all' && permission_exists('emergency_logs_view_all')) {
@ -212,6 +213,7 @@ if (!empty($emergency_logs) && is_array($emergency_logs) && @sizeof($emergency_l
}
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";

View File

@ -228,6 +228,7 @@
}
}
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
@ -309,6 +310,7 @@
echo "</tr>\n";
echo "</table>";
echo "</div>";
echo "<br /><br />";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";

View File

@ -220,6 +220,7 @@
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<input type='hidden' name='search' value=\"".escape($search ?? '')."\">\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
if (permission_exists('event_guard_log_add') || permission_exists('event_guard_log_edit') || permission_exists('event_guard_log_delete')) {
@ -284,6 +285,7 @@
}
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";

View File

@ -290,6 +290,7 @@
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<input type='hidden' name='search' value=\"".escape($search ?? '')."\">\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
if (permission_exists('fax_queue_add') || permission_exists('fax_queue_edit') || permission_exists('fax_queue_delete')) {
@ -360,6 +361,7 @@
}
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";

View File

@ -275,6 +275,7 @@
}
}
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
//echo "<tr>\n";
@ -461,6 +462,7 @@
echo "</tr>\n";
echo "</table>";
echo "</div>";
echo "<br /><br />";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";

View File

@ -98,6 +98,7 @@
echo "</div>\n";
//show the content
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
/*
echo "<tr>\n";
@ -196,6 +197,7 @@
}
}
echo "</table>\n";
echo "</div>\n";
//Current logged members
//set the alternating row styles
@ -209,6 +211,7 @@
echo "<br><br>Logged in agents<br><br>\n";
//show the content
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<th>".$text['label-username']."</th>\n";
@ -235,6 +238,7 @@
}
}
echo "</table>\n";
echo "</div>\n";
}
?>

View File

@ -77,6 +77,7 @@
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
echo "<div class='card'>\n";
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<th>".$text['label-name']."</th>\n";
@ -129,6 +130,7 @@
$c = $c ? 0 : 1;
}
echo "</table>\n";
echo "</div>\n";
}
?>

View File

@ -169,6 +169,7 @@
echo "<input type='hidden' name='search' value=\"".escape($search ?? '')."\">\n";
echo "<input type='hidden' name='profile' value='".escape($profile ?? '')."'>";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo " <th class='checkbox'>\n";
@ -252,6 +253,7 @@
unset($registrations);
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
echo "<div align='center'>".($paging_controls ?? '')."</div>\n";

View File

@ -131,6 +131,8 @@
echo "<br />\n";
echo "<div id='sofia_status' style='margin-top: 20px; margin-bottom: 40px;'>";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo " <th>".$text['label-name']."</th>\n";
@ -217,6 +219,7 @@
echo "</table>\n";
echo "</div>\n";
echo "</div>\n";
unset($gateways, $xml, $xml_gateways);
}
@ -258,6 +261,8 @@
echo "</div>\n";
echo "<div id='".escape($sip_profile_name)."' style='display: none; margin-bottom: 30px;'>";
echo "<div class='card'>\n";
echo "<table width='100%' cellspacing='0' cellpadding='5'>\n";
echo "<tr><th colspan='2' style='font-size: 1px; padding: 0;'>&nbsp;</th></tr>\n";
@ -302,6 +307,7 @@
}
echo "</table>\n";
echo "</div>";
echo "</div>";
unset($xml);
}
}
@ -311,10 +317,12 @@
$response = event_socket::api("status");
echo "<b><a href='javascript:void(0);' onclick=\"$('#status').slideToggle();\">".$text['title-status']."</a></b>\n";
echo "<div id='status' style='margin-top: 20px; font-size: 9pt;'>";
echo "<pre>";
echo "<div class='card'>\n";
echo "<pre style='margin-bottom: 0;'>";
echo trim(escape($response));
echo "</pre>\n";
echo "</div>";
echo "</div>";
}
//include the footer

View File

@ -122,6 +122,7 @@
echo "<b>".$text['header-sys-status']."</b>";
echo "<br><br>";
echo "<div class='card'>\n";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo " <th class='th' colspan='2' align='left'>".$text['title-sys-info']."</th>\n";
@ -137,8 +138,8 @@
echo "</tr>\n";
$git_path = $system_information['git']['path'];
if(file_exists($git_path)){
if($system_information['git']['status'] === 'unknown'){
if (file_exists($git_path)){
if ($system_information['git']['status'] === 'unknown') {
echo "<tr>\n";
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
echo " ".$text['label-git_info']."\n";
@ -147,7 +148,8 @@
echo " ".$text['label-git_corrupted']."\n";
echo " </td>\n";
echo "</tr>\n";
}else{
}
else {
echo "<tr>\n";
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
echo " ".$text['label-git_info']."\n";
@ -178,7 +180,7 @@
echo " </td>\n";
echo " <td class=\"row_style1\">{$system_information['switch']['version']} ({$system_information['switch']['bits']})</td>\n";
echo "</tr>\n";
if($system_information['switch']['git']['info'] !== 'connection failed'){
if ($system_information['switch']['git']['info'] !== 'connection failed') {
echo "<tr>\n";
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
echo " ".$text['label-switch']." ".$text['label-git_info']."\n";
@ -195,8 +197,14 @@
echo " <td class=\"row_style1\">".$system_information['php']['version']."</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</div>\n";
echo "<div class='card'>\n";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo " <th class='th' colspan='2' align='left' style='padding-top:2em'>".$text['title-os-info']."</th>\n";
echo " <th class='th' colspan='2' align='left'>".$text['title-os-info']."</th>\n";
echo "</tr>\n";
if ($system_information['os']['name'] !== 'permission denied') {
@ -250,11 +258,12 @@
echo " </td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<br /><br>";
echo "</div>\n";
//memory information
if (permission_exists('system_view_ram')) {
if ($system_information['os']['mem'] !== 'unknown' && $system_information['os']['mem'] !== 'permission denied') {
echo "<div class='card'>\n";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"7\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo " <th colspan='2' align='left' valign='top'>".$text['title-mem']."</th>\n";
@ -270,13 +279,14 @@
echo " </td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<br /><br />";
echo "</div>\n";
}
}
//cpu information
if (permission_exists('system_view_cpu')) {
if ($system_information['os']['cpu'] !== 'unknown' && $system_information['os']['cpu'] !== 'permission denied') {
echo "<div class='card'>\n";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"7\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo " <th class='th' colspan='2' align='left' valign='top'>".$text['title-cpu']."</th>\n";
@ -292,15 +302,14 @@
echo " </td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<br /><br />";
echo "</div>\n";
}
}
//drive space
if (permission_exists('system_view_hdd')) {
if (stristr(PHP_OS, 'Linux') || stristr(PHP_OS, 'FreeBSD')) {
echo "<!--\n";
echo "-->\n";
echo "<div class='card'>\n";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"7\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo " <th class='th' colspan='2' align='left'>".$text['title-drive']."</th>\n";
@ -316,7 +325,9 @@
echo " </td>\n";
echo "</tr>\n";
echo "</table>\n";
} else if (stristr(PHP_OS, 'WIN')) {
echo "</div>\n";
}
else if (stristr(PHP_OS, 'WIN')) {
//disk_free_space returns the number of bytes available on the drive;
//1 kilobyte = 1024 byte
//1 megabyte = 1024 kilobyte
@ -325,6 +336,7 @@
$disk_size_free = round(disk_free_space($drive_letter)/1024/1024, 2);
$disk_percent_available = round(($disk_size_free/$disk_size) * 100, 2);
echo "<div class='card'>\n";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"7\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo " <th class='th' colspan='2' align='left'>".$text['label-drive']."</th>\n";
@ -356,14 +368,15 @@
echo " </td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</div>\n";
}
echo "<br /><br />";
}
//database information
if (permission_exists('system_view_database')) {
if ($system_information['database']['type'] == 'pgsql') {
echo "<div class='card'>\n";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"7\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo " <th class='th' colspan='2' align='left'>".$text['title-database']."</th>\n";
@ -401,12 +414,13 @@
echo "</tr>\n";
echo "</table>\n";
echo "</div>\n";
}
echo "<br /><br />";
}
//memcache information
if (permission_exists("system_view_memcache") && file_exists($_SERVER["PROJECT_ROOT"]."/app/sip_status/app_config.php")){
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='7' cellspacing='0'>\n";
echo " <tr>\n";
echo " <th class='th' colspan='2' align='left'>".$text['title-memcache']."</th>\n";
@ -430,24 +444,22 @@
}
echo "</table>\n";
echo "<br /><br />\n";
echo "</div>\n";
}
if (permission_exists("system_view_support")) {
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='7' cellspacing='0'>\n";
echo "<tr>\n";
echo " <th class='th' align='left'>".$text['label-support']."</th>\n";
echo " <th class='th' style='text-align: right;'>\n";
echo " <th align='left' style='border-bottom: none;'>".$text['label-support']."</th>\n";
echo " <th style='text-align: right; padding-right: 0; border-bottom: none;'>\n";
echo " <button type='button' class='btn btn-default' id='btn_copy' alt=\"".$text['label-copy']."\" title=\"".$text['label-copy']."\" onclick='do_copy();'>".$text['label-copy']."<i class='fas fa-regular fa-clipboard pl-5'></i></button>\n";
echo " </th>\n";
echo "</tr>\n";
echo "<tr>\n";
echo " <td width='20%' class='vncell' style='text-align: left;'>\n";
echo " &nbsp;\n";
echo " </td>\n";
echo " <td class='row_style1'>\n";
echo " <td colspan='2' style='padding: 0;'>\n";
echo " <textarea class='formfld' id='system_information' name='system_information' style='display: none;'>".json_encode($system_information, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)."</textarea>\n";
echo " <div id='editor'></div>\n";
echo " <div id='editor' style='border-radius: 4px;'></div>\n";
echo " <table cellpadding='0' cellspacing='0' border='0' style='float: right; padding-top: 5px;'>\n";
echo " <tr>\n";
echo " <td valign='middle' style='padding-left: 6px;'><i class='fas fa-list-ul fa-lg ace_control' title=\"".$text['label-toggle_line_numbers']."\" onclick=\"toggle_option('numbering');\"></i></td>\n";

View File

@ -129,7 +129,8 @@
if (permission_exists('xml_cdr_search')) {
echo "<form name='frm' id='frm' method='get'>\n";
echo "<div class='form_grid' style='padding-bottom: 35px;'>\n";
echo "<div class='card' style='margin-bottom: 30px;'>\n";
echo "<div class='form_grid'>\n";
echo " <div class='form_set'>\n";
echo " <div class='label'>\n";
@ -179,6 +180,7 @@
echo " </div>\n";
echo " </div>\n";
echo "</div>\n";
echo "</div>\n";
if (!empty($_GET['show']) && $_GET['show'] == 'all' && permission_exists('xml_cdr_extension_summary_all')) {
@ -189,6 +191,7 @@
}
//show the results
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo " <tr class='list-header'>\n";
if (!empty($_GET['show']) && $_GET['show'] === "all" && permission_exists('xml_cdr_extension_summary_all')) {
@ -237,6 +240,7 @@
}
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
//show the footer

View File

@ -156,11 +156,12 @@
echo $text['label-call-statistics-description']."\n";
echo "<br /><br />\n";
echo "<div class='card'>\n";
?>
<script src='/resources/chartjs/chart.min.js'></script>
<script src='/resources/chartjs/chartjs-adapter-date-fns.bundle.min.js'></script>
<div align='center' style="justify-content: center;">
<div align='center' style="justify-content: center; margin-bottom: 25px;">
<div style="max-width: 100%; width: 800px; height: 280px;">
<canvas id="cdr_stats_chart" style="width: 100%; height: 100%;"></canvas>
</div>
@ -334,6 +335,7 @@
$i++;
}
echo "</table>\n";
echo "</div>\n";
echo "<br><br>";
//include the footer

View File

@ -74,6 +74,7 @@
echo $text['title_description-user_logs']."\n";
echo "<br /><br />\n";
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
@ -200,6 +201,7 @@
echo "</tr>\n";
echo "</table>";
echo "</div>";
echo "<br /><br />";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";

View File

@ -232,6 +232,7 @@
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<input type='hidden' name='search' value=\"".escape($search ?? '')."\">\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
if (permission_exists('user_log_delete')) {
@ -286,6 +287,7 @@
}
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";