Added new web pages for mobile application
git-svn-id: svn://192.168.202.10@3068 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -386,6 +386,8 @@ OTHER CHANGES:
|
||||
107. Added options to define the static prompts to use for the Inbound Group
|
||||
"Play Place in Line" feature
|
||||
|
||||
108. Added new web pages for mobile application
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -275,3 +275,227 @@ TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
|
||||
THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
|
||||
|
||||
The above AGPLv2 license is what the entire VICIdial codebase is released under.
|
||||
|
||||
|
||||
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
|
||||
|
||||
We have also incorporated another small open-soruce project's code into VICIdial
|
||||
, pure-knob, that is under the Apache 2.0 License, which is shown below:
|
||||
|
||||
|
||||
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
@@ -0,0 +1,872 @@
|
||||
<?php
|
||||
# AST_rt_whiteboard_rpt_mobile.php
|
||||
#
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com>, Joe Johnson <joej@vicidial.com> LICENSE: AGPLv2
|
||||
#
|
||||
# Mobile version of real-time report that allows users to create a customized, graphical display of various data sets
|
||||
#
|
||||
# 190227-1259 - Initial build
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
|
||||
if (file_exists('options.php'))
|
||||
{
|
||||
require('options.php');
|
||||
}
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
|
||||
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
|
||||
if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];}
|
||||
elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];}
|
||||
if (isset($_GET["query_time"])) {$query_time=$_GET["query_time"];}
|
||||
elseif (isset($_POST["query_time"])) {$query_time=$_POST["query_time"];}
|
||||
if (isset($_GET["end_time"])) {$end_time=$_GET["end_time"];}
|
||||
elseif (isset($_POST["end_time"])) {$end_time=$_POST["end_time"];}
|
||||
if (isset($_GET["campaigns"])) {$campaigns=$_GET["campaigns"];}
|
||||
elseif (isset($_POST["campaigns"])) {$campaigns=$_POST["campaigns"];}
|
||||
if (isset($_GET["users"])) {$users=$_GET["users"];}
|
||||
elseif (isset($_POST["users"])) {$users=$_POST["users"];}
|
||||
if (isset($_GET["user_groups"])) {$user_groups=$_GET["user_groups"];}
|
||||
elseif (isset($_POST["user_groups"])) {$user_groups=$_POST["user_groups"];}
|
||||
if (isset($_GET["groups"])) {$groups=$_GET["groups"];}
|
||||
elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];}
|
||||
if (isset($_GET["dids"])) {$dids=$_GET["dids"];}
|
||||
elseif (isset($_POST["dids"])) {$dids=$_POST["dids"];}
|
||||
if (isset($_GET["file_download"])) {$file_download=$_GET["file_download"];}
|
||||
elseif (isset($_POST["file_download"])) {$file_download=$_POST["file_download"];}
|
||||
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
||||
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
||||
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
||||
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
||||
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
||||
if (isset($_GET["report_display_type"])) {$report_display_type=$_GET["report_display_type"];}
|
||||
elseif (isset($_POST["report_display_type"])) {$report_display_type=$_POST["report_display_type"];}
|
||||
|
||||
if (!$query_date) {$query_date=date("Y-m-d");}
|
||||
if (!$end_date) {$end_date=date("Y-m-d");}
|
||||
if (!$query_time) {$query_time="08:00:00";}
|
||||
if (!$end_time) {$end_time="17:00:00";}
|
||||
|
||||
if (strlen($shift)<2) {$shift='ALL';}
|
||||
$report_name="Real-Time Whiteboard Report";
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method,admin_screen_colors FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$non_latin = $row[0];
|
||||
$outbound_autodial_active = $row[1];
|
||||
$slave_db_server = $row[2];
|
||||
$reports_use_slave_db = $row[3];
|
||||
$SSenable_languages = $row[4];
|
||||
$SSlanguage_method = $row[5];
|
||||
$admin_screen_colors = $row[6];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
|
||||
if ( (strlen($slave_db_server)>5) and (preg_match("/$report_name/",$reports_use_slave_db)) )
|
||||
{
|
||||
mysqli_close($link);
|
||||
$use_slave_server=1;
|
||||
$db_source = 'S';
|
||||
require("dbconnect_mysqli.php");
|
||||
$MAIN.="<!-- Using slave server $slave_db_server $db_source -->\n";
|
||||
}
|
||||
|
||||
$stmt = "SELECT local_gmt FROM servers where active='Y' limit 1;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$gmt_conf_ct = mysqli_num_rows($rslt);
|
||||
$dst = date("I");
|
||||
if ($gmt_conf_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$local_gmt = $row[0];
|
||||
$epoch_offset = (($local_gmt + $dst) * 3600);
|
||||
}
|
||||
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
$PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER);
|
||||
$PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_PW);
|
||||
}
|
||||
else
|
||||
{
|
||||
$PHP_AUTH_PW = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_PW);
|
||||
$PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER);
|
||||
}
|
||||
|
||||
$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$sl_ct = mysqli_num_rows($rslt);
|
||||
if ($sl_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$VUselected_language = $row[0];
|
||||
}
|
||||
|
||||
$auth=0;
|
||||
$reports_auth=0;
|
||||
$admin_auth=0;
|
||||
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'REPORTS',1);
|
||||
if ($auth_message == 'GOOD')
|
||||
{$auth=1;}
|
||||
|
||||
if ($auth > 0)
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7 and view_reports='1';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$admin_auth=$row[0];
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports='1';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$reports_auth=$row[0];
|
||||
|
||||
if ($reports_auth < 1)
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("You are not allowed to view reports");
|
||||
Header ("Content-type: text/html; charset=utf-8");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
if ( ($reports_auth > 0) and ($admin_auth < 1) )
|
||||
{
|
||||
$ADD=999999;
|
||||
$reports_only_user=1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
|
||||
if ($auth_message == 'LOCK')
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
|
||||
Header ("Content-type: text/html; charset=utf-8");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$stmt="SELECT user_group from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
if ($DB) {$MAIN.="|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGuser_group = $row[0];
|
||||
|
||||
$stmt="SELECT allowed_campaigns,allowed_reports,admin_viewable_groups,admin_viewable_call_times from vicidial_user_groups where user_group='$LOGuser_group';";
|
||||
if ($DB) {$MAIN.="|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGallowed_campaigns = $row[0];
|
||||
$LOGallowed_reports = $row[1];
|
||||
$LOGadmin_viewable_groups = $row[2];
|
||||
$LOGadmin_viewable_call_times = $row[3];
|
||||
|
||||
if ( (!preg_match("/$report_name,/",$LOGallowed_reports)) and (!preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo _QXZ("You are not allowed to view this report").": |$PHP_AUTH_USER|$report_name|\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$LOGadmin_viewable_groupsSQL='';
|
||||
$whereLOGadmin_viewable_groupsSQL='';
|
||||
if ( (!preg_match('/\-\-ALL\-\-/i',$LOGadmin_viewable_groups)) and (strlen($LOGadmin_viewable_groups) > 3) )
|
||||
{
|
||||
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups);
|
||||
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL);
|
||||
$LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||
$whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||
}
|
||||
|
||||
$LOGadmin_viewable_call_timesSQL='';
|
||||
$whereLOGadmin_viewable_call_timesSQL='';
|
||||
if ( (!preg_match('/\-\-ALL\-\-/i', $LOGadmin_viewable_call_times)) and (strlen($LOGadmin_viewable_call_times) > 3) )
|
||||
{
|
||||
$rawLOGadmin_viewable_call_timesSQL = preg_replace("/ -/",'',$LOGadmin_viewable_call_times);
|
||||
$rawLOGadmin_viewable_call_timesSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_call_timesSQL);
|
||||
$LOGadmin_viewable_call_timesSQL = "and call_time_id IN('---ALL---','$rawLOGadmin_viewable_call_timesSQL')";
|
||||
$whereLOGadmin_viewable_call_timesSQL = "where call_time_id IN('---ALL---','$rawLOGadmin_viewable_call_timesSQL')";
|
||||
}
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!isset($groups)) {$groups = array();}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
if (!isset($end_date)) {$end_date = $NOW_DATE;}
|
||||
|
||||
$stmt="SELECT user_group from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
if ($DB) {$MAIN.="|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGuser_group = $row[0];
|
||||
|
||||
$stmt="SELECT allowed_campaigns,allowed_reports,admin_viewable_groups,admin_viewable_call_times from vicidial_user_groups where user_group='$LOGuser_group';";
|
||||
if ($DB) {$MAIN.="|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGallowed_campaigns = $row[0];
|
||||
$LOGallowed_reports = $row[1];
|
||||
$LOGadmin_viewable_groups = $row[2];
|
||||
$LOGadmin_viewable_call_times = $row[3];
|
||||
|
||||
if ( (!preg_match("/$report_name/",$LOGallowed_reports)) and (!preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo _QXZ("You are not allowed to view this report").": |$PHP_AUTH_USER|$report_name|\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$stmt="SELECT campaign_id from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;";
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$campaigns_to_print = mysqli_num_rows($rslt);
|
||||
$i=0;
|
||||
$campaign_string='|';
|
||||
$campaigns_selected=count($campaigns);
|
||||
while ($i < $campaigns_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$campaign_list[$i] = $row[0];
|
||||
$campaign_string .= "$campaign_list[$i]|";
|
||||
for ($j=0; $j<$campaigns_selected; $j++) {
|
||||
if ($campaigns[$j] && $campaign_list[$i]==$campaigns[$j]) {$campaign_name_str.="$campaign_list[$i] - $campaign_names[$i], ";}
|
||||
if ($campaigns[$j]=="--ALL--") {$campaigns_selected_str.="'$campaign_list[$i]', ";}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
$i=0;
|
||||
$users_string='|';
|
||||
$users_ct = count($users);
|
||||
while($i < $users_ct)
|
||||
{
|
||||
$users_string .= "$users[$i]|";
|
||||
$i++;
|
||||
}
|
||||
$stmt="SELECT user, full_name from vicidial_users $whereLOGadmin_viewable_groupsSQL order by user";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$users_to_print = mysqli_num_rows($rslt);
|
||||
$i=0;
|
||||
$user_array=array(); # For quick full-name reference
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$user_list[$i]=$row[0];
|
||||
$user_names[$i]=$row[1];
|
||||
$user_array["$row[0]"]=$row[1];
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
$i=0;
|
||||
$user_groups_string='|';
|
||||
$user_groups_ct = count($user_groups);
|
||||
while($i < $user_groups_ct)
|
||||
{
|
||||
$user_groups_string .= "$user_groups[$i]|";
|
||||
$i++;
|
||||
}
|
||||
$stmt="SELECT user_group, group_name from vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$user_groups_to_print = mysqli_num_rows($rslt);
|
||||
$i=0;
|
||||
$user_group_array=array(); # For quick full-name reference
|
||||
while ($i < $user_groups_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$user_group_list[$i]=$row[0];
|
||||
$user_group_names[$i]=$row[1];
|
||||
$user_group_array["$row[0]"]=$row[1];
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
$stmt="SELECT group_id,group_name from vicidial_inbound_groups $whereLOGadmin_viewable_groupsSQL order by group_id;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$groups_to_print = mysqli_num_rows($rslt);
|
||||
$i=0;
|
||||
#$LISTgroups[$i]='---NONE---';
|
||||
#$i++;
|
||||
# $groups_to_print++;
|
||||
$groups_string='|';
|
||||
while ($i < $groups_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LISTgroups[$i] = $row[0];
|
||||
$LISTgroup_names[$i] = $row[1];
|
||||
$LISTgroup_ids[$i] = $row[2];
|
||||
$groups_string .= "$LISTgroups[$i]|";
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
$i=0;
|
||||
$group_string='|';
|
||||
$group_ct = count($groups);
|
||||
while($i < $group_ct)
|
||||
{
|
||||
if ( (strlen($groups[$i]) > 0) and (preg_match("/\|$groups[$i]\|/",$groups_string)) )
|
||||
{
|
||||
$group_string .= "$groups[$i]|";
|
||||
$group_SQL .= "'$groups[$i]',";
|
||||
$groupQS .= "&groups[]=$groups[$i]";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if ( (preg_match('/\s\-\-NONE\-\-\s/',$group_string) ) or ($group_ct < 1) )
|
||||
{
|
||||
$group_SQL = "''";
|
||||
}
|
||||
else
|
||||
{
|
||||
$group_SQL = preg_replace('/,$/i', '',$group_SQL);
|
||||
}
|
||||
if (strlen($group_SQL)<3) {$group_SQL="''";}
|
||||
|
||||
|
||||
$i=0;
|
||||
$dids_string='|';
|
||||
$dids_ct = count($dids);
|
||||
while($i < $dids_ct)
|
||||
{
|
||||
$dids_string .= "$dids[$i]|";
|
||||
$i++;
|
||||
}
|
||||
$stmt="SELECT did_pattern,did_description,did_id from vicidial_inbound_dids $whereLOGadmin_viewable_groupsSQL order by did_pattern;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$dids_to_print = mysqli_num_rows($rslt);
|
||||
$i=0;
|
||||
$did_array=array(); # For quick full-name reference
|
||||
while ($i < $dids_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$did_pattern[$i]=$row[0];
|
||||
$did_description[$i]=$row[1];
|
||||
$did_ids[$i]=$row[2];
|
||||
$did_array["$row[0]"]=$row[1];
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$MT[0]='';
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!isset($campaigns)) {$campaign = array();}
|
||||
if (!isset($users)) {$users = array();}
|
||||
if (!isset($user_groups)) {$user_groups = array();}
|
||||
if (!isset($dids)) {$dids = array();}
|
||||
if (!isset($groups)) {$groups = array();}
|
||||
if (!isset($report_display_type)) {$report_display_type = "HTML";}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
if (!isset($end_date)) {$end_date = $NOW_DATE;}
|
||||
|
||||
$i=0;
|
||||
$campaigns_string='|';
|
||||
$campaign_ct = count($campaigns);
|
||||
while($i < $campaign_ct)
|
||||
{
|
||||
if (in_array("--ALL--", $campaigns))
|
||||
{
|
||||
$campaigns_string = "--ALL--";
|
||||
$campaign_SQL .= "'$campaigns[$i]',";
|
||||
$campaignQS = "&campaign[]=--ALL--";
|
||||
}
|
||||
else if ( (strlen($campaigns[$i]) > 0) and (!preg_match("/\|$campaigns[$i]\|/",$campaigns_string)) )
|
||||
{
|
||||
$campaigns_string .= "$campaigns[$i]|";
|
||||
$campaign_SQL .= "'$campaigns[$i]',";
|
||||
$campaignQS .= "&campaigns[]=$campaigns[$i]";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if ( (preg_match('/\-\-ALL\-\-/',$campaign_string) ) or ($campaign_ct < 1) )
|
||||
{
|
||||
$campaign_SQL = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$campaign_SQL = preg_replace('/,$/i', '',$campaign_SQL);
|
||||
$WHEREcampaign_SQL=" where campaign_id in ($campaign_SQL) ";
|
||||
$campaign_SQL=" and campaign_id in ($campaign_SQL) ";
|
||||
}
|
||||
if (strlen($campaign_SQL)<3)
|
||||
{
|
||||
$campaign_SQL="";
|
||||
}
|
||||
|
||||
$i=0;
|
||||
$users_string='|';
|
||||
$user_ct = count($users);
|
||||
while($i < $user_ct)
|
||||
{
|
||||
if (in_array("--ALL--", $users))
|
||||
{
|
||||
$users_string = "--ALL--";
|
||||
$user_SQL .= "'$users[$i]',";
|
||||
$userQS = "&users[]=--ALL--";
|
||||
}
|
||||
else if ( (strlen($users[$i]) > 0) and (!preg_match("/\|$users[$i]\|/",$users_string)) )
|
||||
{
|
||||
$users_string .= "$users[$i]|";
|
||||
$user_SQL .= "'$users[$i]',";
|
||||
$userQS .= "&users[]=$users[$i]";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if ( (preg_match('/\-\-ALL\-\-/',$users_string) ) or ($user_ct < 1) )
|
||||
{
|
||||
$user_SQL = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_SQL = preg_replace('/,$/i', '',$user_SQL);
|
||||
$user_SQL = "and agent_user IN($user_SQL)";
|
||||
}
|
||||
if (strlen($user_SQL)<3) {$user_SQL="";}
|
||||
|
||||
$i=0;
|
||||
$user_groups_string='|';
|
||||
$user_group_ct = count($user_groups);
|
||||
while($i < $user_group_ct)
|
||||
{
|
||||
if (in_array("--ALL--", $user_groups))
|
||||
{
|
||||
$user_groups_string = "--ALL--";
|
||||
$user_group_SQL .= "'$user_groups[$i]',";
|
||||
$user_groupQS = "&users[]=--ALL--";
|
||||
}
|
||||
else if ( (strlen($user_groups[$i]) > 0) and (!preg_match("/\|$user_groups[$i]\|/",$user_groups_string)) )
|
||||
{
|
||||
$user_groups_string .= "$user_groups[$i]|";
|
||||
$user_group_SQL .= "'$user_groups[$i]',";
|
||||
$user_groupQS .= "&users[]=$user_groups[$i]";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if ( (preg_match('/\-\-ALL\-\-/',$user_groups_string) ) or ($user_group_ct < 1) )
|
||||
{
|
||||
$user_group_SQL = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_group_SQL = preg_replace('/,$/i', '',$user_group_SQL);
|
||||
$user_group_SQL = "and user_group IN($user_group_SQL)";
|
||||
}
|
||||
if (strlen($user_group_SQL)<3) {$user_group_SQL="";}
|
||||
|
||||
$i=0;
|
||||
$groups_string='|';
|
||||
$group_ct = count($groups);
|
||||
while($i < $group_ct)
|
||||
{
|
||||
if (in_array("--ALL--", $groups))
|
||||
{
|
||||
$groups_string = "--ALL--";
|
||||
$group_SQL .= "'$groups[$i]',";
|
||||
$groupQS = "&users[]=--ALL--";
|
||||
}
|
||||
else if ( (strlen($groups[$i]) > 0) and (!preg_match("/\|$groups[$i]\|/",$groups_string)) )
|
||||
{
|
||||
$groups_string .= "$groups[$i]|";
|
||||
$group_SQL .= "'$groups[$i]',";
|
||||
$groupQS .= "&users[]=$groups[$i]";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if ( (preg_match('/\-\-ALL\-\-/',$groups_string) ) or ($group_ct < 1) )
|
||||
{
|
||||
$group_SQL = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$group_SQL = preg_replace('/,$/i', '',$group_SQL);
|
||||
$group_SQL = "and agent_user IN($group_SQL)";
|
||||
}
|
||||
if (strlen($group_SQL)<3) {$group_SQL="";}
|
||||
|
||||
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
if ($admin_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$admin_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
# $NWB = " <a href=\"javascript:openNewWindow('help.php?ADD=99999";
|
||||
# $NWE = "')\"><IMG SRC=\"help.png\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
|
||||
|
||||
$NWB = "<IMG SRC=\"help.png\" onClick=\"FillAndShowHelpDiv(event, '";
|
||||
$NWE = "')\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP>";
|
||||
|
||||
$rerun_rpt_URL="$PHP_SELF?query_date=$query_date&end_date=$end_date&report_display_type=$report_display_type$campaignQS$userQS$managerQS&SUBMIT=$SUBMIT";
|
||||
|
||||
$HEADER.="<HTML>\n";
|
||||
$HEADER.="<HEAD>\n";
|
||||
|
||||
$HEADER.="<link rel=\"stylesheet\" type=\"text/css\" href=\"vicidial_stylesheet.php\">\n";
|
||||
$HEADER.="<script language=\"JavaScript\" src=\"help.js\"></script>\n";
|
||||
$HEADER.="<div id='HelpDisplayDiv' class='help_info' style='display:none;'></div>";
|
||||
|
||||
$HEADER.="<script language=\"JavaScript\" src=\"calendar_db.js\"></script>\n";
|
||||
$HEADER.="<link rel=\"stylesheet\" href=\"calendar.css\">\n";
|
||||
$HEADER.="<link rel=\"stylesheet\" href=\"horizontalbargraph.css\">\n";
|
||||
# $HEADER.="<link rel=\"stylesheet\" type=\"text/css\" href=\"vicidial_stylesheet.css\" />\n";
|
||||
$HEADER.="<script src='chart/Chart.js'></script>\n";
|
||||
$HEADER.="<script language=\"JavaScript\" src=\"vicidial_chart_functions.js\"></script>\n";
|
||||
$HEADER.="<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
|
||||
$HEADER.="<TITLE>"._QXZ("$report_name")."</TITLE></HEAD><BODY BGCOLOR='$SSframe_background' marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
||||
|
||||
$MAIN.="<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>\n";
|
||||
$MAIN.="<b>"._QXZ("$report_name")."</b> $NWB#rt_whiteboard_report$NWE\n";
|
||||
|
||||
$MAIN.="<span id='report_control_panel' style='display:block'>";
|
||||
$MAIN.="<TABLE CELLPADDING=3 CELLSPACING=3 border='0' class=\"panel_td\" style='width:95vw'><TR>";
|
||||
$MAIN.="<TD VALIGN='TOP' class='mobile_whiteboard_td_sm' align='center' colspan='2'><FONT class='embossed android_whiteboard_small'>"._QXZ("Report Type").":</font> $NWB#rt_whiteboard_report-report_type$NWE";
|
||||
$MAIN.="<SELECT NAME=report_type ID=report_type class='form_field sm_shadow round_corners mobile_whiteboard_select' onChange=HighlightRelatedFields(this.value)>\n";
|
||||
$MAIN.="<option value='' selected>-- "._QXZ("Select a report")." --</option>";
|
||||
$MAIN.="<option value='status_performance_total'>"._QXZ("Disposition Totals")."</option>";
|
||||
$MAIN.="<option value='agent_performance_total'>"._QXZ("Agent Performance Totals")."</option>";
|
||||
$MAIN.="<option value='agent_performance_rates'>"._QXZ("Agent Performance Rates")."</option>";
|
||||
$MAIN.="<option value='team_performance_total'>"._QXZ("Team Performance Totals")."</option>";
|
||||
$MAIN.="<option value='team_performance_rates'>"._QXZ("Team Performance Rates")."</option>";
|
||||
$MAIN.="<option value='floor_performance_total'>"._QXZ("Floor Performance Totals (ticker)")."</option>";
|
||||
$MAIN.="<option value='floor_performance_rates'>"._QXZ("Floor Performance Rates (ticker)")."</option>";
|
||||
$MAIN.="<option value='ingroup_performance_total'>"._QXZ("Ingroup Performance Total")."</option>"; # (ticker)
|
||||
$MAIN.="<option value='ingroup_performance_rates'>"._QXZ("Ingroup Performance Rates")."</option>"; # (ticker)
|
||||
$MAIN.="<option value='did_performance_total'>"._QXZ("DID Performance Total")."</option>"; # (ticker)
|
||||
$MAIN.="<option value='did_performance_rates'>"._QXZ("DID Performance Rates")."</option>"; # (ticker)
|
||||
$MAIN.="</SELECT>\n";
|
||||
$MAIN.="</TD>\n";
|
||||
$MAIN.="</TR>\n";
|
||||
|
||||
$MAIN.="<TR><TD VALIGN=TOP class='mobile_whiteboard_td_sm'> <FONT class='embossed android_whiteboard_small'>"._QXZ("Campaigns").":</font> $NWB#rt_whiteboard_report-parameters$NWE<BR>";
|
||||
$MAIN.="<SELECT SIZE=5 NAME=campaigns ID=campaigns multiple class='form_field sm_shadow round_corners mobile_whiteboard_select'>\n";
|
||||
#if (preg_match('/\-\-ALL\-\-/',$campaign_string))
|
||||
# {$MAIN.="<option value=\"--ALL--\" selected>-- "._QXZ("ALL CAMPAIGNS")." --</option>\n";}
|
||||
#else
|
||||
# {$MAIN.="<option value=\"--ALL--\">-- "._QXZ("ALL CAMPAIGNS")." --</option>\n";}
|
||||
$MAIN.="<option value=\"--ALL--\"".(in_array("--ALL--", $campaigns) ? " selected" : "").">-- "._QXZ("ALL CAMPAIGNS")." --</option>\n";
|
||||
$o=0;
|
||||
# $campaign_SQL="";
|
||||
while ($campaigns_to_print > $o)
|
||||
{
|
||||
$selected="";
|
||||
if (in_array($campaign_list[$o], $campaigns) && !in_array("--ALL--", $campaigns)) {
|
||||
$selected="selected";
|
||||
}
|
||||
if (in_array($campaign_list[$o], $campaigns) || in_array("--ALL--", $campaigns)) {
|
||||
# $campaign_SQL.="'$campaigns[$o]',";
|
||||
}
|
||||
$MAIN.="<option $selected value=\"$campaign_list[$o]\">$campaign_list[$o]</option>\n";
|
||||
$o++;
|
||||
}
|
||||
# $campaign_SQL=preg_replace("/,$/", "", $campaign_SQL);
|
||||
$MAIN.="</SELECT>\n";
|
||||
$MAIN.="</TD>\n";
|
||||
|
||||
$MAIN.="<TD VALIGN=TOP ALIGN='LEFT' class='mobile_whiteboard_td_lg'>";
|
||||
$MAIN.="<FONT class='embossed android_whiteboard_small'>"._QXZ("Status flags").":</font> $NWB#rt_whiteboard_report-parameters$NWE<BR>";
|
||||
$MAIN.="<SELECT SIZE=5 NAME='status_flags' ID='status_flags' multiple class='form_field sm_shadow round_corners mobile_whiteboard_select'>\n";
|
||||
$MAIN.="<option value='--ALL--'>"._QXZ("ALL FLAGS")."</option>\n";
|
||||
$MAIN.="<option value='selectable'>"._QXZ("AGENT SELECTABLE")."</option>\n";
|
||||
$MAIN.="<option value='human_answered'>"._QXZ("HUMAN ANSWERED")."</option>\n";
|
||||
$MAIN.="<option value='sale'>"._QXZ("SALE")."</option>\n";
|
||||
$MAIN.="<option value='dnc'>"._QXZ("DNC")."</option>\n";
|
||||
$MAIN.="<option value='customer_contact'>"._QXZ("CUSTOMER CONTACT")."</option>\n";
|
||||
$MAIN.="<option value='not_interested'>"._QXZ("NOT INTERESTED")."</option>\n";
|
||||
$MAIN.="<option value='unworkable'>"._QXZ("UNWORKABLE")."</option>\n";
|
||||
$MAIN.="<option value='scheduled_callback'>"._QXZ("SCHEDULED CALLBACK")."</option>\n";
|
||||
$MAIN.="<option value='completed'>"._QXZ("COMPLETED CALL")."</option>\n";
|
||||
$MAIN.="<option value='answering_machine'>"._QXZ("ANSWERING MACHINE")."</option>\n";
|
||||
$MAIN.="</SELECT>\n";
|
||||
$MAIN.="</TD>\n";
|
||||
$MAIN.="</TR>\n";
|
||||
|
||||
/*
|
||||
$MAIN.="<TR>";
|
||||
|
||||
$MAIN.="</TR>\n";
|
||||
*/
|
||||
|
||||
$MAIN.="<TR>";
|
||||
|
||||
$MAIN.="<TD VALIGN=TOP class='mobile_whiteboard_td_sm'><FONT class='embossed android_whiteboard_small'>"._QXZ("In-groups").": $NWB#rt_whiteboard_report-parameters$NWE</font><BR>";
|
||||
$MAIN.="<SELECT SIZE=5 NAME=groups ID=groups multiple class='form_field sm_shadow round_corners mobile_whiteboard_select'>\n";
|
||||
if (preg_match('/\-\-ALL\-\-/',$groups_string))
|
||||
{$MAIN.="<option value=\"--ALL--\" selected>-- "._QXZ("ALL IN-GROUPS")." --</option>\n";}
|
||||
else
|
||||
{$MAIN.="<option value=\"--ALL--\">-- "._QXZ("ALL IN-GROUPS")." --</option>\n";}
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
if (preg_match("/$LISTgroups[$o]\|/i",$groups_string)) {$MAIN.="<option selected value=\"$LISTgroups[$o]\">$LISTgroups[$o] - $LISTgroup_names[$o]</option>\n";}
|
||||
else {$MAIN.="<option value=\"$LISTgroups[$o]\">$LISTgroups[$o] - $LISTgroup_names[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
$MAIN.="</SELECT>\n";
|
||||
$MAIN.="</TD>\n";
|
||||
|
||||
$MAIN.="<TD VALIGN=TOP class='mobile_whiteboard_td_sm'><FONT class='embossed android_whiteboard_small'>"._QXZ("DIDs").": $NWB#rt_whiteboard_report-parameters$NWE</font><BR>";
|
||||
$MAIN.="<SELECT SIZE=5 NAME=dids ID=dids multiple class='form_field sm_shadow round_corners mobile_whiteboard_select'>\n";
|
||||
if (preg_match('/\-\-ALL\-\-/',$dids_string))
|
||||
{$MAIN.="<option value=\"--ALL--\" selected>-- "._QXZ("ALL DIDS")." --</option>\n";}
|
||||
else
|
||||
{$MAIN.="<option value=\"--ALL--\">-- "._QXZ("ALL DIDS")." --</option>\n";}
|
||||
$o=0;
|
||||
while ($dids_to_print > $o)
|
||||
{
|
||||
if (preg_match("/$did_ids[$o]\|/i",$dids_string)) {$MAIN.="<option selected value=\"$did_ids[$o]\">$did_pattern[$o] - $did_description[$o]</option>\n";}
|
||||
else {$MAIN.="<option value=\"$did_ids[$o]\">$did_pattern[$o] - $did_description[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
$MAIN.="</SELECT>\n";
|
||||
$MAIN.="</TD>\n";
|
||||
$MAIN.="</TR>";
|
||||
|
||||
$MAIN.="<TR>";
|
||||
$MAIN.="<TD VALIGN=TOP class='mobile_whiteboard_td_sm'><FONT class='embossed android_whiteboard_small'>"._QXZ("User Groups").": $NWB#rt_whiteboard_report-parameters$NWE</font><BR>";
|
||||
$MAIN.="<SELECT SIZE=5 NAME='user_groups' ID='user_groups' multiple class='form_field sm_shadow round_corners mobile_whiteboard_select'>\n";
|
||||
if (preg_match('/\-\-ALL\-\-/',$user_groups_string))
|
||||
{$MAIN.="<option value=\"--ALL--\" selected>-- "._QXZ("ALL USER GROUPS")." --</option>\n";}
|
||||
else
|
||||
{$MAIN.="<option value=\"--ALL--\">-- "._QXZ("ALL USER GROUPS")." --</option>\n";}
|
||||
$o=0;
|
||||
while ($user_groups_to_print > $o)
|
||||
{
|
||||
if (preg_match("/$user_group_list[$o]\|/i",$user_groups_string)) {$MAIN.="<option selected value=\"$user_group_list[$o]\">$user_group_list[$o] - $user_group_names[$o]</option>\n";}
|
||||
else {$MAIN.="<option value=\"$user_group_list[$o]\">$user_group_list[$o] - $user_group_names[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
$MAIN.="</SELECT>\n";
|
||||
$MAIN.="</TD>\n";
|
||||
|
||||
$MAIN.="<TD VALIGN=TOP class='mobile_whiteboard_td_sm'><FONT class='embossed android_whiteboard_small'>"._QXZ("Users").": $NWB#rt_whiteboard_report-parameters$NWE</font><BR>";
|
||||
$MAIN.="<SELECT SIZE=5 NAME='users' ID='users' multiple class='form_field sm_shadow round_corners mobile_whiteboard_select'>\n";
|
||||
if (preg_match('/\-\-ALL\-\-/',$users_string))
|
||||
{$MAIN.="<option value=\"--ALL--\" selected>-- "._QXZ("ALL USERS")." --</option>\n";}
|
||||
else
|
||||
{$MAIN.="<option value=\"--ALL--\">-- "._QXZ("ALL USERS")." --</option>\n";}
|
||||
$o=0;
|
||||
while ($users_to_print > $o)
|
||||
{
|
||||
if (preg_match("/$user_list[$o]\|/i",$users_string)) {$MAIN.="<option selected value=\"$user_list[$o]\">$user_list[$o] - $user_names[$o]</option>\n";}
|
||||
else {$MAIN.="<option value=\"$user_list[$o]\">$user_list[$o] - $user_names[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
$MAIN.="</SELECT>\n";
|
||||
$MAIN.="</TD>\n";
|
||||
$MAIN.="</TR>\n";
|
||||
|
||||
$MAIN.="<TR>\n";
|
||||
$MAIN.="<TD VALIGN=MIDDLE ALIGN='LEFT' nowrap class='mobile_whiteboard_td_lg'> <FONT class='embossed android_whiteboard_small'>"._QXZ("Start date/time").":</font>";
|
||||
$MAIN.="<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\"><BR>\n";
|
||||
$MAIN.="<INPUT TYPE=TEXT NAME=query_date ID=query_date SIZE=6 MAXLENGTH=10 VALUE=\"$query_date\" class='form_field sm_shadow round_corners'>";
|
||||
|
||||
$MAIN.="<script language=\"JavaScript\">\n";
|
||||
$MAIN.="function openNewWindow(url)\n";
|
||||
$MAIN.=" {\n";
|
||||
$MAIN.=" window.open (url,\"\",'width=620,height=300,scrollbars=yes,menubar=yes,address=yes');\n";
|
||||
$MAIN.=" }\n";
|
||||
$MAIN.="var o_cal = new tcal ({\n";
|
||||
$MAIN.=" // form name\n";
|
||||
$MAIN.=" 'formname': 'vicidial_report',\n";
|
||||
$MAIN.=" // input name\n";
|
||||
$MAIN.=" 'controlname': 'query_date'\n";
|
||||
$MAIN.="});\n";
|
||||
$MAIN.="o_cal.a_tpl.yearscroll = false;\n";
|
||||
$MAIN.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
|
||||
$MAIN.="</script>\n";
|
||||
|
||||
$MAIN.=" <INPUT TYPE=TEXT NAME=query_time ID=query_time SIZE=6 MAXLENGTH=8 VALUE=\"$query_time\" class='form_field sm_shadow round_corners'> $NWB#rt_whiteboard_report-start_date$NWE";
|
||||
|
||||
$MAIN.="<BR><FONT class='embossed android_whiteboard_small'>"._QXZ("OR")."</font><BR>";
|
||||
$MAIN.="<FONT class='embossed android_whiteboard_small'>"._QXZ("Results for the past")." <input type='text' class='form_field sm_shadow round_corners' size='2' maxlength='2' name='hourly_display' id='hourly_display' value=''> "._QXZ("hours")."</font> $NWB#rt_whiteboard_report-show_results$NWE";
|
||||
$MAIN.="</TD>\n";
|
||||
|
||||
$MAIN.="<TD VALIGN='TOP' ALIGN='left' class='mobile_whiteboard_td_lg'>";
|
||||
$MAIN.="<table border='0' cellpadding='2' cellspacing='0' class='mobile_whiteboard_td_lg'>";
|
||||
$MAIN.="<tr>";
|
||||
$MAIN.="<td align='right' VALIGN='TOP' class='panel_td'><FONT class='embossed android_whiteboard_small'>"._QXZ("Target per unit").":</font></td>";
|
||||
$MAIN.="<td align='left' VALIGN='TOP' class='panel_td'><input type='text' size='5' maxlength='5' name='target_per_agent' id='target_per_agent' value='$target_per_agent' class='form_field sm_shadow round_corners'> $NWB#rt_whiteboard_report-target_per_unit$NWE</td>";
|
||||
$MAIN.="</tr><tr>";
|
||||
$MAIN.="<td align='right' VALIGN='TOP' class='panel_td'><FONT class='embossed android_whiteboard_small'>"._QXZ("Target gross sales").":</font></td>";
|
||||
$MAIN.="<td align='left' VALIGN='TOP' class='panel_td'><input type='text' size='5' maxlength='5' name='target_gross' id='target_gross' value='$target_gross' class='form_field sm_shadow round_corners'> $NWB#rt_whiteboard_report-target_gross_sales$NWE</td>";
|
||||
$MAIN.="</tr></table>";
|
||||
$MAIN.="</TD>\n";
|
||||
$MAIN.="</TR>\n";
|
||||
|
||||
$MAIN.="<TR>";
|
||||
$MAIN.="<TD align='center' colspan='2'><INPUT TYPE=button NAME='run_report' class='green_btn_mobile sm_shadow round_corners mobile_whiteboard_button' VALUE='"._QXZ("RUN REPORT")."' onClick='StartRefresh()'></TD>";
|
||||
# $MAIN.="<TD align='center'><INPUT TYPE=button NAME='goto_reports' ID='goto_reports' class='red_btn_mobile sm_shadow round_corners mobile_whiteboard_button' VALUE='"._QXZ("REPORTS")."'></TD>";
|
||||
$MAIN.="</TR></TABLE></span>\n";
|
||||
|
||||
|
||||
########################
|
||||
|
||||
|
||||
$MAIN.="<span id='report_display_panel' style='display:none'>";
|
||||
$MAIN.="<TABLE CELLPADDING=0 border='0' CELLSPACING=3 BGCOLOR='#".$SSframe_background."' style='width:95vw' class=\"panel_td\"><TR>";
|
||||
|
||||
$MAIN.="<TD ALIGN=right valign='top' class='embossed android_whiteboard_small'>";
|
||||
$MAIN.="<input type='button' id='stop_report' name='stop_report' class='red_btn_mobile_lg sm_shadow round_corners' value='<<< "._QXZ("CONTROL PANEL")."' onClick='StopRefresh()'>";
|
||||
$MAIN.="</TD>";
|
||||
|
||||
$MAIN.="<TD ALIGN=center width='*' class='embossed android_whiteboard_small'>";
|
||||
$MAIN.=_QXZ("Refresh rate").": ";
|
||||
$MAIN.="<select name='refresh_rate' id='refresh_rate' class='form_field sm_shadow round_corners'>";
|
||||
$MAIN.="<option value='5'>5 "._QXZ("seconds")."</option>";
|
||||
$MAIN.="<option value='10'>10 "._QXZ("seconds")."</option>";
|
||||
$MAIN.="<option value='15'>15 "._QXZ("seconds")."</option>";
|
||||
# $MAIN.="<option value='20'>20 "._QXZ("seconds")."</option>";
|
||||
$MAIN.="<option value='30' selected>30 "._QXZ("seconds")."</option>";
|
||||
$MAIN.="<option value='45'>45 "._QXZ("seconds")."</option>";
|
||||
$MAIN.="<option value='60'>60 "._QXZ("seconds")."</option>";
|
||||
$MAIN.="<option value='120'>2 "._QXZ("minutes")."</option>";
|
||||
$MAIN.="<option value='300'>5 "._QXZ("minutes")."</option>";
|
||||
$MAIN.="</select>";
|
||||
$MAIN.="<BR>";
|
||||
$MAIN.=_QXZ("Start date/time").": ";
|
||||
$MAIN.="<INPUT TYPE=TEXT NAME=query_date2 ID=query_date2 SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\" class='form_field sm_shadow round_corners'>";
|
||||
$MAIN.="<script language=\"JavaScript\">\n";
|
||||
$MAIN.="function openNewWindow(url)\n";
|
||||
$MAIN.=" {\n";
|
||||
$MAIN.=" window.open (url,\"\",'width=620,height=300,scrollbars=yes,menubar=yes,address=yes');\n";
|
||||
$MAIN.=" }\n";
|
||||
$MAIN.="var o_cal = new tcal ({\n";
|
||||
$MAIN.=" // form name\n";
|
||||
$MAIN.=" 'formname': 'vicidial_report',\n";
|
||||
$MAIN.=" // input name\n";
|
||||
$MAIN.=" 'controlname': 'query_date'\n";
|
||||
$MAIN.="});\n";
|
||||
$MAIN.="o_cal.a_tpl.yearscroll = false;\n";
|
||||
$MAIN.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
|
||||
$MAIN.="</script>\n";
|
||||
$MAIN.="<INPUT TYPE=TEXT NAME=query_time2 ID=query_time2 SIZE=10 MAXLENGTH=8 VALUE=\"$query_time\" class='form_field sm_shadow round_corners'>";
|
||||
|
||||
$MAIN.="<BR>"._QXZ("OR")." "._QXZ("Show results for the past")." <input type='text' class='form_field sm_shadow round_corners' size='2' maxlength='2' name='hourly_display2' id='hourly_display2' value=''> "._QXZ("hours");
|
||||
$MAIN.="</TD>";
|
||||
|
||||
$MAIN.="<TD ALIGN=left valign='top' class='embossed android_whiteboard_small'>";
|
||||
$MAIN.="<input type='button' id='adjust_report' name='adjust_report' class='green_btn_mobile_lg sm_shadow round_corners' value='"._QXZ("ADJUST RATE/TIME")."'>";
|
||||
$MAIN.="</TD>";
|
||||
|
||||
$MAIN.="<TD VALIGN=TOP align='left' rowspan=3 class='embossed android_whiteboard_small autosize_12'><BR><BR><BR>"; #
|
||||
$MAIN.="<div class='embossed autosize_10 border2px round_corners sm_shadow std_row1'>"._QXZ("Total Calls").":<BR><span id='total_calls_div'></span> </div><BR>";
|
||||
$MAIN.="<div class='embossed autosize_10 border2px round_corners sm_shadow std_row2'>"._QXZ("Total Sales").":<BR><span id='total_sales_div'></span> </div><BR>";
|
||||
$MAIN.="<div class='embossed autosize_10 border2px round_corners sm_shadow std_row3'>"._QXZ("Total Conv Rate").":<BR><span id='total_conv_div'></span> </div><BR>";
|
||||
$MAIN.="<div class='embossed autosize_10 border2px round_corners sm_shadow std_row4'>"._QXZ("Total Time").":<BR><span id='total_time_div'></span> </div><BR>";
|
||||
$MAIN.="<div class='embossed autosize_10 border2px round_corners sm_shadow std_row5'>"._QXZ("Total CPH").":<BR><span id='total_cph_div'></span> </div><BR>";
|
||||
$MAIN.="<div class='embossed autosize_10 border2px round_corners sm_shadow std_row1'>"._QXZ("Total SPH").":<BR><span id='total_sph_div'></span> </div>";
|
||||
$MAIN.="</TD>";
|
||||
$MAIN.="</TR>";
|
||||
|
||||
$MAIN.="<TR>";
|
||||
$MAIN.="<TD VALIGN=TOP align='center' colspan='3'>";
|
||||
###### DISPLAY SPANS ####
|
||||
$MAIN.="<span id='top_10_display' style='display:none'>";
|
||||
$MAIN.="</span>";
|
||||
|
||||
$MAIN.="<div align='center' id='loading_display' style='display:none'>";
|
||||
$MAIN.="<BR><BR><BR><BR><BR><div align='center' class='embossed border2px round_corners sm_shadow' style='background-color:#FFF;width:250px;height:125px'><BR><BR>"._QXZ("LOADING. PLEASE WAIT...")."<BR><BR><img src='/vicidial/images/loader.gif' width='220' height='19'></div>";
|
||||
$MAIN.="</div>";
|
||||
|
||||
$MAIN.="<div id='graph_display' style='display:block; height: 75vh; width: 80vw'>";
|
||||
$MAIN.="<canvas id='MainReportCanvas' height='50vh'></canvas>";
|
||||
$MAIN.="<p align='center'><input type='button' class='green_btn_mobile sm_shadow round_corners' style='width:25vw; max-width:250px' value='"._QXZ("SHOW TOP 10 PERFORMERS")."' onClick=\"ToggleVisibility('top_10_display'); ToggleVisibility('graph_display'); document.getElementById('graph_or_chart').value='chart'\"></p>";
|
||||
$MAIN.="</div>";
|
||||
##########################
|
||||
$MAIN.="</TD>";
|
||||
$MAIN.="</TR>";
|
||||
|
||||
|
||||
$MAIN.="<TR>";
|
||||
$MAIN.="<TD VALIGN=TOP colspan='3'>";
|
||||
$MAIN.="<span style='display:none' id='parameters_span'></span>"; # Hidden for this report - unnecessary
|
||||
$MAIN.="</TD>";
|
||||
$MAIN.="</TR></TABLE>";
|
||||
|
||||
|
||||
$MAIN.="</span>";
|
||||
$MAIN.="</TD></TR></TABLE>";
|
||||
$MAIN.="<input type='hidden' size='50' name='hidden_display' id='hidden_display'>";
|
||||
$MAIN.="<input type='hidden' size='50' name='graph_or_chart' id='graph_or_chart' value='graph'>";
|
||||
$MAIN.="</FORM>";
|
||||
|
||||
|
||||
$MAIN.="</BODY>";
|
||||
$MAIN.="<script language=\"JavaScript\" src=\"vicidial_whiteboard_functions.php?mobile=1\"></script>\n";
|
||||
$MAIN.="</HTML>";
|
||||
|
||||
header("Content-type: text/html; charset=utf-8");
|
||||
|
||||
echo "$HEADER";
|
||||
$android_header=1;
|
||||
require("admin_header.php");
|
||||
echo "$MAIN";
|
||||
flush();
|
||||
|
||||
?>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# AST_timeonVDADall.php
|
||||
#
|
||||
# Copyright (C) 2018 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# live real-time stats for the VICIDIAL Auto-Dialer all servers
|
||||
#
|
||||
@@ -108,6 +108,7 @@
|
||||
# 170409-1556 - Added IP List validation code
|
||||
# 170615-0023 - Added DIAL status for manual dial agent calls that have not been answered
|
||||
# 180204-1538 - Added display of LIVE Inbound Callback Queue Calls
|
||||
# 190206-1616 - Added mobile device display variable
|
||||
#
|
||||
|
||||
$version = '2.14-96';
|
||||
@@ -191,6 +192,8 @@ if (isset($_GET["droppedOFtotal"])) {$droppedOFtotal=$_GET["droppedOFtotal"];
|
||||
elseif (isset($_POST["droppedOFtotal"])) {$droppedOFtotal=$_POST["droppedOFtotal"];}
|
||||
if (isset($_GET["report_display_type"])) {$report_display_type=$_GET["report_display_type"];}
|
||||
elseif (isset($_POST["report_display_type"])) {$report_display_type=$_POST["report_display_type"];}
|
||||
if (isset($_GET["mobile_device"])) {$mobile_device=$_GET["mobile_device"];}
|
||||
elseif (isset($_POST["mobile_device"])) {$mobile_device=$_POST["mobile_device"];}
|
||||
|
||||
|
||||
$report_name = 'Real-Time Main Report';
|
||||
@@ -653,7 +656,7 @@ $NFB = '<b><font size=6 face="courier">';
|
||||
$NFE = '</font></b>';
|
||||
$F=''; $FG=''; $B=''; $BG='';
|
||||
|
||||
$select_list = "<TABLE WIDTH=700 CELLPADDING=5 BGCOLOR=\"#D9E6FE\"><TR><TD VALIGN=TOP>"._QXZ("Select Campaigns").": <BR>";
|
||||
$select_list = "<TABLE class=\"realtime_settings_table\" CELLPADDING=5 BGCOLOR=\"#D9E6FE\"><TR><TD VALIGN=TOP>"._QXZ("Select Campaigns").": <BR>";
|
||||
$select_list .= "<SELECT SIZE=15 NAME=groups[] multiple>";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
@@ -1724,7 +1727,7 @@ if (preg_match('/O/',$with_inbound))
|
||||
$AVG_ANSWERagent_non_pause_sec = round($AVG_ANSWERagent_non_pause_sec, 2);
|
||||
$AVG_ANSWERagent_non_pause_sec = sprintf("%01.2f", $AVG_ANSWERagent_non_pause_sec);
|
||||
|
||||
if ( ($report_display_type!='WALL_1') and ($report_display_type!='WALL_2') and ($report_display_type!='WALL_3') and ($report_display_type!='WALL_4') )
|
||||
if ( ($report_display_type!='WALL_1') and ($report_display_type!='WALL_2') and ($report_display_type!='WALL_3') and ($report_display_type!='WALL_4') and !$mobile_device)
|
||||
{
|
||||
echo "<BR><table cellpadding=0 cellspacing=0><TR>";
|
||||
echo "<TD ALIGN=RIGHT><font class='top_settings_key'>"._QXZ("CALLS TODAY").":</font></TD><TD ALIGN=LEFT><font class='top_settings_val'> $callsTODAY </TD>";
|
||||
@@ -1906,7 +1909,7 @@ else
|
||||
$agentsONEMIN = sprintf("%01.2f", $agentsONEMIN);
|
||||
$diffONEMIN = sprintf("%01.2f", $diffONEMIN);
|
||||
|
||||
if ( ($report_display_type!='WALL_1') and ($report_display_type!='WALL_2') and ($report_display_type!='WALL_3') and ($report_display_type!='WALL_4') )
|
||||
if ( ($report_display_type!='WALL_1') and ($report_display_type!='WALL_2') and ($report_display_type!='WALL_3') and ($report_display_type!='WALL_4') and !$mobile_device)
|
||||
{
|
||||
echo "<BR><table cellpadding=0 cellspacing=0><TR>";
|
||||
echo "<TD ALIGN=RIGHT><font class=\"top_settings_key\">"._QXZ("DIAL LEVEL").":</font></TD><TD ALIGN=LEFT><font class=\"top_settings_val\"> $DIALlev </TD>";
|
||||
@@ -2014,31 +2017,38 @@ else
|
||||
|
||||
if ( ($report_display_type!='WALL_1') and ($report_display_type!='WALL_2') and ($report_display_type!='WALL_3') and ($report_display_type!='WALL_4') )
|
||||
{
|
||||
echo "<TR>";
|
||||
echo "<TD ALIGN=LEFT COLSPAN=8>";
|
||||
if ( (!preg_match('/NULL/i',$VSCcat1)) and (strlen($VSCcat1)>0) )
|
||||
{echo "<font class=\"top_settings_key\">$VSCcat1:</font><font class=\"top_settings_val\"> $VSCcat1tally </font>\n";}
|
||||
if ( (!preg_match('/NULL/i',$VSCcat2)) and (strlen($VSCcat2)>0) )
|
||||
{echo "<font class=\"top_settings_key\">$VSCcat2:</font><font class=\"top_settings_val\"> $VSCcat2tally </font>\n";}
|
||||
if ( (!preg_match('/NULL/i',$VSCcat3)) and (strlen($VSCcat3)>0) )
|
||||
{echo "<font class=\"top_settings_key\">$VSCcat3:</font><font class=\"top_settings_val\"> $VSCcat3tally </font>\n";}
|
||||
if ( (!preg_match('/NULL/i',$VSCcat4)) and (strlen($VSCcat4)>0) )
|
||||
{echo "<font class=\"top_settings_key\">$VSCcat4:</font><font class=\"top_settings_val\"> $VSCcat4tally </font>\n";}
|
||||
echo "</TD></TR>";
|
||||
echo "<TR>";
|
||||
|
||||
if (!$mobile_device)
|
||||
{
|
||||
echo "<TR>";
|
||||
echo "<TD ALIGN=LEFT COLSPAN=8>";
|
||||
if ( (!preg_match('/NULL/i',$VSCcat1)) and (strlen($VSCcat1)>0) )
|
||||
{echo "<font class=\"top_settings_key\">$VSCcat1:</font><font class=\"top_settings_val\"> $VSCcat1tally </font>\n";}
|
||||
if ( (!preg_match('/NULL/i',$VSCcat2)) and (strlen($VSCcat2)>0) )
|
||||
{echo "<font class=\"top_settings_key\">$VSCcat2:</font><font class=\"top_settings_val\"> $VSCcat2tally </font>\n";}
|
||||
if ( (!preg_match('/NULL/i',$VSCcat3)) and (strlen($VSCcat3)>0) )
|
||||
{echo "<font class=\"top_settings_key\">$VSCcat3:</font><font class=\"top_settings_val\"> $VSCcat3tally </font>\n";}
|
||||
if ( (!preg_match('/NULL/i',$VSCcat4)) and (strlen($VSCcat4)>0) )
|
||||
{echo "<font class=\"top_settings_key\">$VSCcat4:</font><font class=\"top_settings_val\"> $VSCcat4tally </font>\n";}
|
||||
echo "</TD></TR>";
|
||||
echo "<TR>";
|
||||
}
|
||||
echo "<TD ALIGN=LEFT COLSPAN=8>";
|
||||
|
||||
echo "$ingroup_detail";
|
||||
|
||||
if ($RTajax < 1)
|
||||
{
|
||||
if ($adastats<2)
|
||||
if (!$mobile_device)
|
||||
{
|
||||
echo "<a href=\"$PHP_SELF?$usergroupQS$groupQS&RR=$RR&DB=$DB&adastats=2&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">+ "._QXZ("VIEW MORE")."</font></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<a href=\"$PHP_SELF?$usergroupQS$groupQS&RR=$RR&DB=$DB&adastats=1&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">- "._QXZ("VIEW LESS")."</font></a>";
|
||||
if ($adastats<2)
|
||||
{
|
||||
echo "<a href=\"$PHP_SELF?$usergroupQS$groupQS&RR=$RR&DB=$DB&adastats=2&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">+ "._QXZ("VIEW MORE")."</font></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<a href=\"$PHP_SELF?$usergroupQS$groupQS&RR=$RR&DB=$DB&adastats=1&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">- "._QXZ("VIEW LESS")."</font></a>";
|
||||
}
|
||||
}
|
||||
if ($UGdisplay>0)
|
||||
{
|
||||
@@ -2117,7 +2127,7 @@ if ( ($with_inbound != 'O') and ($NOLEADSalert == 'YES') )
|
||||
if ($ctp > 0)
|
||||
{
|
||||
echo "<span style=\"position:absolute;left:0px;top:47px;z-index:15;\" id=no_dialable_leads_span>\n";
|
||||
echo "<TABLE WIDTH=700 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E9E6EE\"><TR><TD ALIGN=CENTER>\n";
|
||||
echo "<TABLE class=\"realtime_settings_table\" CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"#E9E6EE\"><TR><TD ALIGN=CENTER>\n";
|
||||
echo "<BR><BR><BR><BR><a href=\"#\" onclick=\"closeAlert('no_dialable_leads_span');\">"._QXZ("Close Alert")."</a>";
|
||||
echo "<BR><BR><BR><BR><BR><b>"._QXZ("Campaigns with no dialable leads").":<BR><BR>$NDLcampaigns<b><BR>";
|
||||
echo "<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> ";
|
||||
@@ -2386,45 +2396,45 @@ if ( ($report_display_type=='HTML') or ($report_display_type=='WALL_2') )
|
||||
$section_width=860;
|
||||
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||
|
||||
echo "<TABLE width=$section_width cellpadding=3 cellspacing=0 border=0>\n";
|
||||
echo "<TABLE class='realtime_table' cellpadding=3 cellspacing=0 border=0>\n";
|
||||
echo "<tr>";
|
||||
# echo "<td width=5 rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_calls.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_calls.png\" class='realtime_img_icon'></td>";
|
||||
if ($campaign_allow_inbound > 0)
|
||||
{
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("current active calls")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font class=\"realtime_img_text\">"._QXZ("current active calls")."</font></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("calls being placed")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font class=\"realtime_img_text\">"._QXZ("calls being placed")."</font></td>";
|
||||
}
|
||||
echo "<td width=6 rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_ringing.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("calls ringing")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_ringing.png\" class='realtime_img_icon'></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font class=\"realtime_img_text\">"._QXZ("calls ringing")."</font></td>";
|
||||
echo "<td width=6 rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_callswaiting.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("calls waiting for agents")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_callswaiting.png\" class='realtime_img_icon'></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font class=\"realtime_img_text\">"._QXZ("calls waiting for agents")."</font></td>";
|
||||
echo "<td width=6 rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_callsinivr.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("calls in IVR")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_callsinivr.png\" class='realtime_img_icon'></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font class=\"realtime_img_text\">"._QXZ("calls in IVR")."</font></td>";
|
||||
echo "<td width=6 rowspan=2> </td>";
|
||||
|
||||
if ($allow_chats)
|
||||
{
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_chatswaiting.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("chats waiting for agents")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_chatswaiting.png\" class='realtime_img_icon'></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font class=\"realtime_img_text\">"._QXZ("chats waiting for agents")."</font></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<td align='center' valign='middle' rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\"> </font></td>";
|
||||
echo "<td align='center' valign='middle'><font class=\"realtime_img_text\"> </font></td>";
|
||||
}
|
||||
# echo "<td align='center' valign='middle' rowspan=2> </td>";
|
||||
|
||||
|
||||
echo "<td width=6 rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_callswaiting.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("callback queue calls")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_callswaiting.png\" class='realtime_img_icon'></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font class=\"realtime_img_text\">"._QXZ("callback queue calls")."</font></td>";
|
||||
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
@@ -2530,7 +2540,7 @@ while($p<$k)
|
||||
}
|
||||
else
|
||||
{
|
||||
$Cecho .= "<tr class=\"csc$CDcampaign_id[$p]\">";
|
||||
$Cecho .= "<tr class=\"csc$CDcampaign_id[$p] top_head_val\">";
|
||||
$Cecho .= "<td NOWRAP align=center>$G$Cstatus$EG</td>";
|
||||
$Cecho .= "<td NOWRAP align=right>$G$Ccampaign_id$EG</td>";
|
||||
$Cecho .= "<td NOWRAP align=right>$G$Cphone_number$EG</td>";
|
||||
@@ -2597,7 +2607,7 @@ if ($report_display_type=='TEXT')
|
||||
if ($report_display_type=='HTML')
|
||||
{
|
||||
$Aecho = '';
|
||||
$Aecho .= "<table cellpadding=1 cellspacing=1 border=0 width=860>";
|
||||
$Aecho .= "<table cellpadding=1 cellspacing=1 border=0 class='realtime_table'>";
|
||||
$Aecho .= "<tr>";
|
||||
$Aecho .= "<td colspan=4><font class='top_head_key'> "._QXZ("Agents Time On Calls Campaign").":</font></td>";
|
||||
$Aecho .= "<td colspan=3><font class='top_settings_val'> </font></td>";
|
||||
@@ -3552,23 +3562,23 @@ if ( ($report_display_type=='HTML') or ($report_display_type=='WALL_2') )
|
||||
# echo "<TABLE width=$section_width cellpadding=3 cellspacing=0>\n";
|
||||
echo "<tr>";
|
||||
# echo "<td width=5 rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_users.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("agents logged in")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_users.png\" class='realtime_img_icon'></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font class=\"realtime_img_text\">"._QXZ("agents logged in")."</font></td>";
|
||||
echo "<td width=6 rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_agentsincalls.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("agents in calls")."$AIDtx</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_agentsincalls.png\" class='realtime_img_icon'></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font class=\"realtime_img_text\">"._QXZ("agents in calls")."$AIDtx</font></td>";
|
||||
echo "<td width=6 rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_agentswaiting.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("agents waiting")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91' rowspan=2><img src=\"images/icon_agentswaiting.png\" class='realtime_img_icon'></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font class=\"realtime_img_text\">"._QXZ("agents waiting")."</font></td>";
|
||||
echo "<td width=6 rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#808000' rowspan=2><img src=\"images/icon_agentspaused.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#808000'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("paused agents")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#808000' rowspan=2><img src=\"images/icon_agentspaused.png\" class='realtime_img_icon'></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#808000'><font class=\"realtime_img_text\">"._QXZ("paused agents")."</font></td>";
|
||||
echo "<td width=6 rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='black' rowspan=2><img src=\"images/icon_agentsindeadcalls.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='black'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("agents in dead calls")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='black' rowspan=2><img src=\"images/icon_agentsindeadcalls.png\" class='realtime_img_icon'></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='black'><font class=\"realtime_img_text\">"._QXZ("agents in dead calls")."</font></td>";
|
||||
echo "<td width=6 rowspan=2> </td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#808000' rowspan=2><img src=\"images/icon_agentsindispo.png\" width=42 height=42></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#808000'><font style=\"font-family:HELVETICA;font-size:11;color:white;font-weight:bold;\">"._QXZ("agents in dispo")."</font></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#808000' rowspan=2><img src=\"images/icon_agentsindispo.png\" class='realtime_img_icon'></td>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#808000'><font class=\"realtime_img_text\">"._QXZ("agents in dispo")."</font></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td align='center' valign='middle' bgcolor='#015b91'><font style=\"font-family:HELVETICA;font-size:18;color:white;font-weight:bold;\">$agent_total</font></td>";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+18
-5
@@ -4476,12 +4476,13 @@ else
|
||||
# 190207-2301 - Fix for user-group, in-group and campaign allowed/permissions matching issues
|
||||
# 190221-1831 - Added force_fronter_audio_stop API function
|
||||
# 190223-0850 - Added static prompt fields for in-group play-place-in-line
|
||||
# 190302-1745 - Added disclaimers for pure-knob code
|
||||
#
|
||||
|
||||
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
||||
|
||||
$admin_version = '2.14-700a';
|
||||
$build = '190223-0850';
|
||||
$admin_version = '2.14-701a';
|
||||
$build = '190302-1745';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -41727,16 +41728,28 @@ if ($ADD==999995)
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right valign=top><B><font size=3>"._QXZ("Trademark").": </B></td><td align=left> \"VICIDIAL\" "._QXZ("is a registered trademark of the")." <a href=\"http://www.vicidial.com/\" target=\"_blank\">ViciDial Group</a>. Here is our <a href=\"http://www.vicidial.com/?page_id=262\" target=\"_blank\">"._QXZ("trademark use policy")."</a></td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right valign=top><B><font size=3>"._QXZ("License").": </B></td><td align=left> "._QXZ("The ViciDial Contact Center Suite is released under the")." <a href=\"http://www.vicidial.com/?page_id=260\" target=\"_blank\">AGPLv2 "._QXZ("open source license")."</a></td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right valign=top><B><font size=3>"._QXZ("License").": </B></td><td align=left> "._QXZ("The ViciDial Contact Center Suite is released under the")." <a href=\"http://www.vicidial.com/?page_id=260\" target=\"_blank\">AGPLv2 "._QXZ("open source license")."</a>.</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right valign=top nowrap><B><font size=3>"._QXZ("Source Code").": </B></td><td align=left> "._QXZ("The ViciDial Call Center Suite software is available for download, and for use, free of cost. You can download the easy to install")." <a href=\"http://vicibox.com/server/index.html\" target=\"_blank\">"._QXZ("ViciBox CD ISO version")."</a>, "._QXZ("or only the")." <a href=\"http://sourceforge.net/projects/astguiclient/files/\" target=\"_blank\">"._QXZ("source code")."</a></td></tr>\n";
|
||||
|
||||
echo "</TABLE></center></form>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
if ($first_login_link > 0)
|
||||
{
|
||||
echo "<BR><BR>";
|
||||
echo "<BR><center><a href=\"$PHP_SELF?ADD=999996\"><B><font size=4>"._QXZ("Continue on to the Initial Setup")."</font></b></a></center><BR> \n";
|
||||
echo "<BR><center><a href=\"$PHP_SELF?ADD=999996\"><B><font size=4>"._QXZ("Continue on to the Initial Setup")."</font></b></a></center><BR><BR><BR> \n";
|
||||
}
|
||||
|
||||
echo "<br><br><B> "._QXZ("Other integrated software disclaimers").":</B><BR><BR>\n";
|
||||
echo "<center><TABLE width=$section_width cellspacing=5 cellpadding=2>\n";
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right valign=top><B><font size=2>"._QXZ("Pure-knob Copyright").": </B></td><td align=left><font size=1> "._QXZ("The pure-knob javascript library was written by Andre Plötze").", © 2018</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right valign=top><B><font size=2>"._QXZ("Pure-knob License").": </B></td><td align=left><font size=1> "._QXZ("Pure-knob is licensed under the")." <a href=\"https://github.com/andrepxx/pure-knob/blob/master/LICENSE\" target=\"_blank\">Apache 2.0 "._QXZ("open source license")."</a></td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right valign=top nowrap><B><font size=2>"._QXZ("Pure-knob Source Code").": </B></td><td align=left><font size=1> "._QXZ("Pure-knob source code is available at")." <a href=\"https://github.com/andrepxx/pure-knob/\" target=\"_blank\">"._QXZ("this link")."</a>.</td></tr>\n";
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
}
|
||||
##### END copyright trademark license page #####
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# admin_header.php - VICIDIAL administration header
|
||||
#
|
||||
# Copyright (C) 2018 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
|
||||
# CHANGES
|
||||
@@ -77,7 +77,7 @@
|
||||
# 180512-1105 - Changed to dynamic DB help
|
||||
# 180614-2200 - Modified audio chooser window to appear at height where mouse was clicked in JS functions
|
||||
# 180618-2300 - Modified calls to audio file chooser function
|
||||
# 180716-2120 - Fix for audio chooser bug on call menu screen
|
||||
# 190121-1803 - Added special streamlined header option for mobile devices
|
||||
#
|
||||
|
||||
$stmt="SELECT admin_home_url,enable_tts_integration,callcard_enabled,custom_fields_enabled,allow_emails,level_8_disable_add,allow_chats,enable_languages,admin_row_click,admin_screen_colors,user_new_lead_limit,user_territories_active,qc_features_active,agent_soundboards,enable_drop_lists,allow_ip_lists from system_settings;";
|
||||
@@ -339,6 +339,21 @@ if($short_header)
|
||||
######################### SMALL HTML HEADER END #######################################
|
||||
|
||||
|
||||
######################### MOBILE HTML HEADER BEGIN ####################################
|
||||
else if ($android_header)
|
||||
{
|
||||
?>
|
||||
<TABLE CELLPADDING=0 CELLSPACING=0 BGCOLOR=#<?php echo "$SSmenu_background" ?> width='100%'><TR>
|
||||
<TD><A HREF="./admin_mobile.php"><IMG SRC="<?php echo $selected_small_logo; ?>" WIDTH=71 HEIGHT=22 BORDER=0 ALT="System logo"></A> </TD>
|
||||
<TD align='left'> <A HREF="admin_mobile.php?ADD=999990" ALT="Admin" STYLE="text-decoration:none;"><?php echo $admin_icon ?> <FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><?php echo _QXZ("Admin"); ?></B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<?php
|
||||
}
|
||||
######################### ANDROID HTML HEADER END ######################################
|
||||
|
||||
|
||||
|
||||
######################### FULL HTML HEADER BEGIN #######################################
|
||||
else
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,629 @@
|
||||
<?php
|
||||
# campaign_summary_mobile_report.php
|
||||
#
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# Back-end PHP script that generates text output to be interpreted by AST_timeonVDADallSUMMARY_mobile.php
|
||||
#
|
||||
# STOP=4000, SLOW=40, GO=4 seconds refresh interval
|
||||
#
|
||||
# changes:
|
||||
#
|
||||
# 181212-2329 - Initial build
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
if (isset($_GET["RR"])) {$RR=$_GET["RR"];}
|
||||
elseif (isset($_POST["RR"])) {$RR=$_POST["RR"];}
|
||||
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
||||
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
||||
if (isset($_GET["adastats"])) {$adastats=$_GET["adastats"];}
|
||||
elseif (isset($_POST["adastats"])) {$adastats=$_POST["adastats"];}
|
||||
if (isset($_GET["types"])) {$types=$_GET["types"];}
|
||||
elseif (isset($_POST["types"])) {$types=$_POST["types"];}
|
||||
if (isset($_GET["current_displayed_report"])) {$current_displayed_report=$_GET["current_displayed_report"];}
|
||||
elseif (isset($_POST["current_displayed_report"])) {$current_displayed_report=$_POST["current_displayed_report"];}
|
||||
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
||||
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
||||
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
||||
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
if (isset($_GET["file_download"])) {$file_download=$_GET["file_download"];}
|
||||
elseif (isset($_POST["file_download"])) {$file_download=$_POST["file_download"];}
|
||||
if (isset($_GET["browser_dimension"])) {$browser_dimension=$_GET["browser_dimension"];}
|
||||
elseif (isset($_POST["browser_dimension"])) {$browser_dimension=$_POST["browser_dimension"];}
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$non_latin = $row[0];
|
||||
$outbound_autodial_active = $row[1];
|
||||
$slave_db_server = $row[2];
|
||||
$reports_use_slave_db = $row[3];
|
||||
$SSenable_languages = $row[4];
|
||||
$SSlanguage_method = $row[5];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
|
||||
if ( (strlen($slave_db_server)>5) and (preg_match("/$report_name/",$reports_use_slave_db)) )
|
||||
{
|
||||
mysqli_close($link);
|
||||
$use_slave_server=1;
|
||||
$db_source = 'S';
|
||||
require("dbconnect_mysqli.php");
|
||||
$MAIN.="<!-- Using slave server $slave_db_server $db_source -->\n";
|
||||
}
|
||||
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
$PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER);
|
||||
$PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_PW);
|
||||
}
|
||||
else
|
||||
{
|
||||
$PHP_AUTH_PW = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_PW);
|
||||
$PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER);
|
||||
}
|
||||
|
||||
$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$sl_ct = mysqli_num_rows($rslt);
|
||||
if ($sl_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$VUselected_language = $row[0];
|
||||
}
|
||||
|
||||
$auth=0;
|
||||
$reports_auth=0;
|
||||
$admin_auth=0;
|
||||
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'REPORTS',1,0);
|
||||
if ($auth_message == 'GOOD')
|
||||
{$auth=1;}
|
||||
|
||||
if ($auth > 0)
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7 and view_reports='1';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$admin_auth=$row[0];
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports='1';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$reports_auth=$row[0];
|
||||
|
||||
if ($reports_auth < 1)
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("You are not allowed to view reports");
|
||||
Header ("Content-type: text/html; charset=utf-8");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
if ( ($reports_auth > 0) and ($admin_auth < 1) )
|
||||
{
|
||||
$ADD=999999;
|
||||
$reports_only_user=1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
|
||||
if ($auth_message == 'LOCK')
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
|
||||
Header ("Content-type: text/html; charset=utf-8");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
if ($auth_message == 'IPBLOCK')
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("Your IP Address is not allowed") . ": $ip";
|
||||
Header ("Content-type: text/html; charset=utf-8");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$stmt="SELECT user_group from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
if ($DB) {$MAIN.="|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGuser_group = $row[0];
|
||||
|
||||
$stmt="SELECT allowed_campaigns,allowed_reports from vicidial_user_groups where user_group='$LOGuser_group';";
|
||||
if ($DB) {$MAIN.="|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGallowed_campaigns = $row[0];
|
||||
$LOGallowed_reports = $row[1];
|
||||
|
||||
if ( (!preg_match("/$report_name/",$LOGallowed_reports)) and (!preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo _QXZ("You are not allowed to view this report").": |$PHP_AUTH_USER|$report_name|"._QXZ("$report_name")."|\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
|
||||
$LOGallowed_campaignsSQL='';
|
||||
$whereLOGallowed_campaignsSQL='';
|
||||
if ( (!preg_match('/\-ALL/i', $LOGallowed_campaigns)) )
|
||||
{
|
||||
$rawLOGallowed_campaignsSQL = preg_replace("/ -/",'',$LOGallowed_campaigns);
|
||||
$rawLOGallowed_campaignsSQL = preg_replace("/ /","','",$rawLOGallowed_campaignsSQL);
|
||||
$LOGallowed_campaignsSQL = "and campaign_id IN('$rawLOGallowed_campaignsSQL')";
|
||||
$whereLOGallowed_campaignsSQL = "where campaign_id IN('$rawLOGallowed_campaignsSQL')";
|
||||
}
|
||||
|
||||
$campaign_typeSQL='';
|
||||
if (count($types)<2) {
|
||||
if (in_array('LIST ALL CAMPAIGNS', $types)) {$campaign_typeSQL="";}
|
||||
else if (in_array('AUTO-DIAL ONLY', $types)) {$campaign_typeSQL="and dial_method IN('RATIO','ADAPT_HARD_LIMIT','ADAPT_TAPERED','ADAPT_AVERAGE')";}
|
||||
else if (in_array('MANUAL ONLY', $types)) {$campaign_typeSQL="and dial_method IN('MANUAL','INBOUND_MAN')";}
|
||||
else if (in_array('INBOUND ONLY', $types)) {$campaign_typeSQL="and campaign_allow_inbound='Y'";}
|
||||
else {$campaign_typeSQL="and campaign_id='".implode("', '", $types)."'";}
|
||||
} else {
|
||||
if (!in_array('LIST ALL CAMPAIGNS', $types)) {
|
||||
$campaign_typeSQL='and (';
|
||||
if (in_array('AUTO-DIAL ONLY', $types))
|
||||
{
|
||||
$campaign_typeSQL.="dial_method IN('RATIO','ADAPT_HARD_LIMIT','ADAPT_TAPERED','ADAPT_AVERAGE') or "; #
|
||||
$index = array_search('AUTO-DIAL ONLY', $types);
|
||||
unset($types[$index]);
|
||||
}
|
||||
if (in_array('MANUAL ONLY', $types))
|
||||
{
|
||||
$campaign_typeSQL.="dial_method IN('MANUAL','INBOUND_MAN') or ";
|
||||
$index = array_search('MANUAL ONLY', $types);
|
||||
unset($types[$index]);
|
||||
} #
|
||||
if (in_array('INBOUND ONLY', $types))
|
||||
{
|
||||
$campaign_typeSQL.="campaign_allow_inbound='Y' or ";
|
||||
$index = array_search('INBOUND ONLY', $types);
|
||||
unset($types[$index]);
|
||||
} #
|
||||
array_values($types);
|
||||
$campaign_typeSQL.="campaign_id in ('".implode("', '", $types)."')";
|
||||
$campaign_typeSQL.=')';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$stmt="select campaign_id from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL $campaign_typeSQL order by campaign_id;";
|
||||
# echo $stmt; die;
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if (!isset($DB)) {$DB=0;}
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$groups_to_print = mysqli_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $groups_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
|
||||
$output_text="";
|
||||
$k=0;
|
||||
while($k<$groups_to_print)
|
||||
{
|
||||
$group = $groups[$k];
|
||||
$output_text.="$group|";
|
||||
$stmt = "select count(*) from vicidial_campaigns where campaign_id='$group' and campaign_allow_inbound='Y';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$campaign_allow_inbound = $row[0];
|
||||
|
||||
$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysqli_real_escape_string($link, $group) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$DIALlev["$group"] = $row[0];
|
||||
$DIALstatusA["$group"] = $row[1];
|
||||
$DIALstatusB["$group"] = $row[2];
|
||||
$DIALstatusC["$group"] = $row[3];
|
||||
$DIALstatusD["$group"] = $row[4];
|
||||
$DIALstatusE["$group"] = $row[5];
|
||||
$DIALorder["$group"] = $row[6];
|
||||
$DIALfilter["$group"] = $row[7];
|
||||
$HOPlev["$group"] = $row[8];
|
||||
$DIALmethod["$group"] = $row[9];
|
||||
$maxDIALlev["$group"] = $row[10];
|
||||
$DROPmax["$group"] = $row[11];
|
||||
$targetDIFF["$group"] = $row[12];
|
||||
$ADAintense["$group"] = $row[13];
|
||||
$ADAavailonly["$group"] = $row[14];
|
||||
$TAPERtime["$group"] = $row[15];
|
||||
$CALLtime["$group"] = $row[16];
|
||||
$DIALtimeout["$group"] = $row[17];
|
||||
$DIALstatuses["$group"] = $row[18];
|
||||
$DIALstatuses["$group"] = (preg_replace("/ -$|^ /","",$DIALstatuses["$group"]));
|
||||
$DIALstatuses["$group"] = (preg_replace('/\s/', ', ', $DIALstatuses["$group"]));
|
||||
|
||||
$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysqli_real_escape_string($link, $group) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$VDhop["$group"] = $row[0];
|
||||
|
||||
$stmt="select dialable_leads,calls_today,drops_today,drops_answers_today_pct,differential_onemin,agents_average_onemin,balance_trunk_fill,answers_today,status_category_1,status_category_count_1,status_category_2,status_category_count_2,status_category_3,status_category_count_3,status_category_4,status_category_count_4,agent_calls_today,agent_wait_today,agent_custtalk_today,agent_acw_today,agent_pause_today from vicidial_campaign_stats where campaign_id='" . mysqli_real_escape_string($link, $group) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$DAleads["$group"] = $row[0];
|
||||
$callsTODAY["$group"] = $row[1];
|
||||
$dropsTODAY["$group"] = $row[2];
|
||||
$drpctTODAY["$group"] = $row[3];
|
||||
$diffONEMIN["$group"] = $row[4];
|
||||
$agentsONEMIN["$group"] = $row[5];
|
||||
$balanceFILL["$group"] = $row[6];
|
||||
$answersTODAY["$group"] = $row[7];
|
||||
$VSCcat1["$group"] = $row[8];
|
||||
$VSCcat1tally["$group"] = $row[9];
|
||||
$VSCcat2["$group"] = $row[10];
|
||||
$VSCcat2tally["$group"] = $row[11];
|
||||
$VSCcat3["$group"] = $row[12];
|
||||
$VSCcat3tally["$group"] = $row[13];
|
||||
$VSCcat4["$group"] = $row[14];
|
||||
$VSCcat4tally["$group"] = $row[15];
|
||||
$VSCagentcalls["$group"] = $row[16];
|
||||
$VSCagentwait["$group"] = $row[17];
|
||||
$VSCagentcust["$group"] = $row[18];
|
||||
$VSCagentacw["$group"] = $row[19];
|
||||
$VSCagentpause["$group"] = $row[20];
|
||||
|
||||
$diffpctONEMIN = ( MathZDC($diffONEMIN["$group"], $agentsONEMIN["$group"]) * 100);
|
||||
$diffpctONEMIN = sprintf("%01.2f", $diffpctONEMIN);
|
||||
$diffpctONEMIN_ary["$group"] = $diffpctONEMIN;
|
||||
|
||||
$stmt="select sum(local_trunk_shortage) from vicidial_campaign_server_stats where campaign_id='" . mysqli_real_escape_string($link, $group) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$balanceSHORT["$group"] = $row[0];
|
||||
################################################################################
|
||||
### START calculating calls/agents
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
###### OUTBOUND CALLS
|
||||
################################################################################
|
||||
if ($campaign_allow_inbound > 0)
|
||||
{
|
||||
$stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysqli_real_escape_string($link, $group) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$closer_campaigns = preg_replace("/^ | -$/","",$row[0]);
|
||||
$closer_campaigns = preg_replace("/ /","','",$closer_campaigns);
|
||||
$closer_campaigns = "'$closer_campaigns'";
|
||||
|
||||
$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysqli_real_escape_string($link, $group) . "' and call_type='OUT') );";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($group=='XXXX-ALL-ACTIVE-XXXX') {$groupSQL = '';}
|
||||
else {$groupSQL = " and campaign_id='" . mysqli_real_escape_string($link, $group) . "'";}
|
||||
|
||||
$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') $groupSQL;";
|
||||
}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$parked_to_print = mysqli_num_rows($rslt);
|
||||
if ($parked_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
$out_total["$group"]=0;
|
||||
$out_ring["$group"]=0;
|
||||
$out_live["$group"]=0;
|
||||
$in_ivr["$group"]=0;
|
||||
while ($i < $parked_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
if (preg_match("/LIVE/i",$row[0]))
|
||||
{$out_live["$group"]++;}
|
||||
else
|
||||
{
|
||||
if (preg_match("/IVR/i",$row[0]))
|
||||
{$in_ivr["$group"]++;}
|
||||
if (preg_match("/CLOSER/i",$row[0]))
|
||||
{$nothing=1;}
|
||||
else
|
||||
{$out_ring["$group"]++;}
|
||||
}
|
||||
$out_total["$group"]++;
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($out_live > 0) {$F='<FONT class="r1">'; $FG='</FONT>';}
|
||||
if ($out_live > 4) {$F='<FONT class="r2">'; $FG='</FONT>';}
|
||||
if ($out_live > 9) {$F='<FONT class="r3">'; $FG='</FONT>';}
|
||||
if ($out_live > 14) {$F='<FONT class="r4">'; $FG='</FONT>';}
|
||||
|
||||
}
|
||||
|
||||
###################################################################################
|
||||
###### TIME ON SYSTEM
|
||||
###################################################################################
|
||||
|
||||
$agent_incall["$group"]=0;
|
||||
$agent_ready["$group"]=0;
|
||||
$agent_paused["$group"]=0;
|
||||
$agent_total["$group"]=0;
|
||||
|
||||
$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysqli_real_escape_string($link, $group) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$talking_to_print = mysqli_num_rows($rslt);
|
||||
if ($talking_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
$agentcount=0;
|
||||
while ($i < $talking_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if (preg_match("/READY|PAUSED/i",$row[3]))
|
||||
{
|
||||
$row[5]=$row[6];
|
||||
}
|
||||
$Lstatus = $row[3];
|
||||
$status = sprintf("%-6s", $row[3]);
|
||||
if (!preg_match("/INCALL|QUEUE/i",$row[3]))
|
||||
{$call_time_S = ($STARTtime - $row[6]);}
|
||||
else
|
||||
{$call_time_S = ($STARTtime - $row[5]);}
|
||||
|
||||
$call_time_M = MathZDC($call_time_S, 60);
|
||||
$call_time_M = round($call_time_M, 2);
|
||||
$call_time_M_int = intval("$call_time_M");
|
||||
$call_time_SEC = ($call_time_M - $call_time_M_int);
|
||||
$call_time_SEC = ($call_time_SEC * 60);
|
||||
$call_time_SEC = round($call_time_SEC, 0);
|
||||
if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
|
||||
$call_time_MS = "$call_time_M_int:$call_time_SEC";
|
||||
$call_time_MS = sprintf("%7s", $call_time_MS);
|
||||
$G = ''; $EG = '';
|
||||
if (preg_match("/PAUSED/i",$row[3]))
|
||||
{
|
||||
if ($call_time_M_int >= 30)
|
||||
{$i++; continue;}
|
||||
else
|
||||
{
|
||||
$agent_paused["$group"]++;
|
||||
$agent_total["$group"]++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( (preg_match("/INCALL/i",$status)) or (preg_match("/QUEUE/i",$status)) ) {$agent_incall["$group"]++; $agent_total["$group"]++;}
|
||||
if ( (preg_match("/READY/i",$status)) or (preg_match("/CLOSER/i",$status)) ) {$agent_ready["$group"]++; $agent_total["$group"]++;}
|
||||
$agentcount++;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($VSCagentcalls > 0)
|
||||
{
|
||||
$avgpauseTODAY = MathZDC($VSCagentpause["$group"], $VSCagentcalls["$group"]);
|
||||
$avgpauseTODAY = round($avgpauseTODAY, 0);
|
||||
$avgpauseTODAY = sprintf("%01.0f", $avgpauseTODAY);
|
||||
$avgpauseTODAY_ary["$group"]=$avgpauseTODAY;
|
||||
|
||||
$avgwaitTODAY = MathZDC($VSCagentwait["$group"], $VSCagentcalls["$group"]);
|
||||
$avgwaitTODAY = round($avgwaitTODAY, 0);
|
||||
$avgwaitTODAY = sprintf("%01.0f", $avgwaitTODAY);
|
||||
$avgwaitTODAY_ary["$group"]=$avgwaitTODAY;
|
||||
|
||||
$avgcustTODAY = MathZDC($VSCagentcust["$group"], $VSCagentcalls["$group"]);
|
||||
$avgcustTODAY = round($avgcustTODAY, 0);
|
||||
$avgcustTODAY = sprintf("%01.0f", $avgcustTODAY);
|
||||
$avgcustTODAY_ary["$group"]=$avgcustTODAY;
|
||||
|
||||
$avgacwTODAY = MathZDC($VSCagentacw["$group"], $VSCagentcalls["$group"]);
|
||||
$avgacwTODAY = round($avgacwTODAY, 0);
|
||||
$avgacwTODAY = sprintf("%01.0f", $avgacwTODAY);
|
||||
$avgacwTODAY_ary["$group"]=$avgacwTODAY;
|
||||
}
|
||||
|
||||
$k++;
|
||||
}
|
||||
$output_text.="\n";
|
||||
|
||||
# Output all arrays
|
||||
$n=0;
|
||||
$DIALlev_output='';
|
||||
$DIALstatusA_output='';
|
||||
$DIALstatusB_output='';
|
||||
$DIALstatusC_output='';
|
||||
$DIALstatusD_output='';
|
||||
$DIALstatusE_output='';
|
||||
$DIALorder_output='';
|
||||
$DIALfilter_output='';
|
||||
$HOPlev_output='';
|
||||
$DIALmethod_output='';
|
||||
$maxDIALlev_output='';
|
||||
$DROPmax_output='';
|
||||
$targetDIFF_output='';
|
||||
$ADAintense_output='';
|
||||
$ADAavailonly_output='';
|
||||
$TAPERtime_output='';
|
||||
$CALLtime_output='';
|
||||
$DIALtimeout_output='';
|
||||
$DIALstatuses_output='';
|
||||
$VDhop_output='';
|
||||
$DAleads_output='';
|
||||
$callsTODAY_output='';
|
||||
$dropsTODAY_output='';
|
||||
$drpctTODAY_output='';
|
||||
$diffONEMIN_output='';
|
||||
$agentsONEMIN_output='';
|
||||
$balanceFILL_output='';
|
||||
$answersTODAY_output='';
|
||||
$VSCcat1_output='';
|
||||
$VSCcat1tally_output='';
|
||||
$VSCcat2_output='';
|
||||
$VSCcat2tally_output='';
|
||||
$VSCcat3_output='';
|
||||
$VSCcat3tally_output='';
|
||||
$VSCcat4_output='';
|
||||
$VSCcat4tally_output='';
|
||||
$VSCagentcalls_output='';
|
||||
$VSCagentwait_output='';
|
||||
$VSCagentcust_output='';
|
||||
$VSCagentacw_output='';
|
||||
$VSCagentpause_output='';
|
||||
$diffpctONEMIN_ary_output='';
|
||||
$balanceSHORT_output='';
|
||||
$out_total_output='';
|
||||
$out_ring_output='';
|
||||
$out_live_output='';
|
||||
$in_ivr_output='';
|
||||
$agent_incall_output='';
|
||||
$agent_ready_output='';
|
||||
$agent_paused_output='';
|
||||
$agent_total_output='';
|
||||
$avgpauseTODAY_ary_output='';
|
||||
$avgwaitTODAY_ary_output='';
|
||||
$avgcustTODAY_ary_output='';
|
||||
$avgacwTODAY_ary_output='';
|
||||
|
||||
|
||||
while ($n<$groups_to_print) {
|
||||
# $DIALlev["$group"] = $row[0];
|
||||
$DIALlev_output .= $DIALlev[$groups[$n]]."|";
|
||||
$DIALstatusA_output .= $DIALstatusA[$groups[$n]]."|";
|
||||
$DIALstatusB_output .= $DIALstatusB[$groups[$n]]."|";
|
||||
$DIALstatusC_output .= $DIALstatusC[$groups[$n]]."|";
|
||||
$DIALstatusD_output .= $DIALstatusD[$groups[$n]]."|";
|
||||
$DIALstatusE_output .= $DIALstatusE[$groups[$n]]."|";
|
||||
$DIALorder_output .= $DIALorder[$groups[$n]]."|";
|
||||
$DIALfilter_output .= $DIALfilter[$groups[$n]]."|";
|
||||
$HOPlev_output .= $HOPlev[$groups[$n]]."|";
|
||||
$DIALmethod_output .= $DIALmethod[$groups[$n]]."|";
|
||||
$maxDIALlev_output .= $maxDIALlev[$groups[$n]]."|";
|
||||
$DROPmax_output .= $DROPmax[$groups[$n]]."|";
|
||||
$targetDIFF_output .= $targetDIFF[$groups[$n]]."|";
|
||||
$ADAintense_output .= $ADAintense[$groups[$n]]."|";
|
||||
$ADAavailonly_output .= $ADAavailonly[$groups[$n]]."|";
|
||||
$TAPERtime_output .= $TAPERtime[$groups[$n]]."|";
|
||||
$CALLtime_output .= $CALLtime[$groups[$n]]."|";
|
||||
$DIALtimeout_output .= $DIALtimeout[$groups[$n]]."|";
|
||||
$DIALstatuses_output .= $DIALstatuses[$groups[$n]]."|";
|
||||
$VDhop_output .= $VDhop[$groups[$n]]."|";
|
||||
$DAleads_output .= $DAleads[$groups[$n]]."|";
|
||||
$callsTODAY_output .= $callsTODAY[$groups[$n]]."|";
|
||||
$dropsTODAY_output .= $dropsTODAY[$groups[$n]]."|";
|
||||
$drpctTODAY_output .= $drpctTODAY[$groups[$n]]."|";
|
||||
$diffONEMIN_output .= $diffONEMIN[$groups[$n]]."|";
|
||||
$agentsONEMIN_output .= $agentsONEMIN[$groups[$n]]."|";
|
||||
$balanceFILL_output .= $balanceFILL[$groups[$n]]."|";
|
||||
$answersTODAY_output .= $answersTODAY[$groups[$n]]."|";
|
||||
$VSCcat1_output .= $VSCcat1[$groups[$n]]."|";
|
||||
$VSCcat1tally_output .= $VSCcat1tally[$groups[$n]]."|";
|
||||
$VSCcat2_output .= $VSCcat2[$groups[$n]]."|";
|
||||
$VSCcat2tally_output .= $VSCcat2tally[$groups[$n]]."|";
|
||||
$VSCcat3_output .= $VSCcat3[$groups[$n]]."|";
|
||||
$VSCcat3tally_output .= $VSCcat3tally[$groups[$n]]."|";
|
||||
$VSCcat4_output .= $VSCcat4[$groups[$n]]."|";
|
||||
$VSCcat4tally_output .= $VSCcat4tally[$groups[$n]]."|";
|
||||
$VSCagentcalls_output .= $VSCagentcalls[$groups[$n]]."|";
|
||||
$VSCagentwait_output .= $VSCagentwait[$groups[$n]]."|";
|
||||
$VSCagentcust_output .= $VSCagentcust[$groups[$n]]."|";
|
||||
$VSCagentacw_output .= $VSCagentacw[$groups[$n]]."|";
|
||||
$VSCagentpause_output .= $VSCagentpause[$groups[$n]]."|";
|
||||
$diffpctONEMIN_ary_output .= $diffpctONEMIN_ary[$groups[$n]]."|";
|
||||
$balanceSHORT_output .= $balanceSHORT[$groups[$n]]."|";
|
||||
$out_total_output .= $out_total[$groups[$n]]."|";
|
||||
$out_ring_output .= $out_ring[$groups[$n]]."|";
|
||||
$out_live_output .= $out_live[$groups[$n]]."|";
|
||||
$in_ivr_output .= $in_ivr[$groups[$n]]."|";
|
||||
$agent_incall_output .= $agent_incall[$groups[$n]]."|";
|
||||
$agent_ready_output .= $agent_ready[$groups[$n]]."|";
|
||||
$agent_paused_output .= $agent_paused[$groups[$n]]."|";
|
||||
$agent_total_output .= $agent_total[$groups[$n]]."|";
|
||||
$avgpauseTODAY_ary_output .= $avgpauseTODAY_ary[$groups[$n]]."|";
|
||||
$avgwaitTODAY_ary_output .= $avgwaitTODAY_ary[$groups[$n]]."|";
|
||||
$avgcustTODAY_ary_output .= $avgcustTODAY_ary[$groups[$n]]."|";
|
||||
$avgacwTODAY_ary_output .= $avgacwTODAY_ary[$groups[$n]]."|";
|
||||
$n++;
|
||||
}
|
||||
|
||||
$DIALlev_output.="\n";
|
||||
$DIALstatusA_output.="\n";
|
||||
$DIALstatusB_output.="\n";
|
||||
$DIALstatusC_output.="\n";
|
||||
$DIALstatusD_output.="\n";
|
||||
$DIALstatusE_output.="\n";
|
||||
$DIALorder_output.="\n";
|
||||
$DIALfilter_output.="\n";
|
||||
$HOPlev_output.="\n";
|
||||
$DIALmethod_output.="\n";
|
||||
$maxDIALlev_output.="\n";
|
||||
$DROPmax_output.="\n";
|
||||
$targetDIFF_output.="\n";
|
||||
$ADAintense_output.="\n";
|
||||
$ADAavailonly_output.="\n";
|
||||
$TAPERtime_output.="\n";
|
||||
$CALLtime_output.="\n";
|
||||
$DIALtimeout_output.="\n";
|
||||
$DIALstatuses_output.="\n";
|
||||
$VDhop_output.="\n";
|
||||
$DAleads_output.="\n";
|
||||
$callsTODAY_output.="\n";
|
||||
$dropsTODAY_output.="\n";
|
||||
$drpctTODAY_output.="\n";
|
||||
$diffONEMIN_output.="\n";
|
||||
$agentsONEMIN_output.="\n";
|
||||
$balanceFILL_output.="\n";
|
||||
$answersTODAY_output.="\n";
|
||||
$VSCcat1_output.="\n";
|
||||
$VSCcat1tally_output.="\n";
|
||||
$VSCcat2_output.="\n";
|
||||
$VSCcat2tally_output.="\n";
|
||||
$VSCcat3_output.="\n";
|
||||
$VSCcat3tally_output.="\n";
|
||||
$VSCcat4_output.="\n";
|
||||
$VSCcat4tally_output.="\n";
|
||||
$VSCagentcalls_output.="\n";
|
||||
$VSCagentwait_output.="\n";
|
||||
$VSCagentcust_output.="\n";
|
||||
$VSCagentacw_output.="\n";
|
||||
$VSCagentpause_output.="\n";
|
||||
$diffpctONEMIN_ary_output.="\n";
|
||||
$balanceSHORT_output.="\n";
|
||||
$out_total_output.="\n";
|
||||
$out_ring_output.="\n";
|
||||
$out_live_output.="\n";
|
||||
$in_ivr_output.="\n";
|
||||
$agent_incall_output.="\n";
|
||||
$agent_ready_output.="\n";
|
||||
$agent_paused_output.="\n";
|
||||
$agent_total_output.="\n";
|
||||
$avgpauseTODAY_ary_output.="\n";
|
||||
$avgwaitTODAY_ary_output.="\n";
|
||||
$avgcustTODAY_ary_output.="\n";
|
||||
$avgacwTODAY_ary_output.="\n";
|
||||
|
||||
$output_text.=$DIALlev_output.$DIALstatusA_output.$DIALstatusB_output.$DIALstatusC_output.$DIALstatusD_output.$DIALstatusE_output.$DIALorder_output.$DIALfilter_output.$HOPlev_output.$DIALmethod_output.$maxDIALlev_output.$DROPmax_output.$targetDIFF_output.$ADAintense_output.$ADAavailonly_output.$TAPERtime_output.$CALLtime_output.$DIALtimeout_output.$DIALstatuses_output.$VDhop_output.$DAleads_output.$callsTODAY_output.$dropsTODAY_output.$drpctTODAY_output.$diffONEMIN_output.$agentsONEMIN_output.$balanceFILL_output.$answersTODAY_output.$VSCcat1_output.$VSCcat1tally_output.$VSCcat2_output.$VSCcat2tally_output.$VSCcat3_output.$VSCcat3tally_output.$VSCcat4_output.$VSCcat4tally_output.$VSCagentcalls_output.$VSCagentwait_output.$VSCagentcust_output.$VSCagentacw_output.$VSCagentpause_output.$diffpctONEMIN_ary_output.$balanceSHORT_output.$out_total_output.$out_ring_output.$out_live_output.$in_ivr_output.$agent_incall_output.$agent_ready_output.$agent_paused_output.$agent_total_output.$avgpauseTODAY_ary_output.$avgwaitTODAY_ary_output.$avgcustTODAY_ary_output.$avgacwTODAY_ary_output;
|
||||
$output_text=preg_replace('/\|\n/', "\n", $output_text);
|
||||
|
||||
|
||||
print $output_text;
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,13 @@
|
||||
<?php
|
||||
# vicidial_stylesheet.php
|
||||
#
|
||||
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CSS/PHP file that uses the system-defined screen colors to display report elements
|
||||
#
|
||||
# 170830-2123 - First build
|
||||
# 180501-0045 - New elements added
|
||||
# 190129-1303 - New mobile display elements added
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
@@ -71,6 +72,79 @@ redalert {font-size: 18px; font-weight:bold; font-family: Arial, Sans-Serif; col
|
||||
|
||||
.border2px {border:solid 2px #<?php echo $SSmenu_background; ?>}
|
||||
|
||||
.android_standard {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 8pt;
|
||||
}
|
||||
.android_large {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 10pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
.android_auto {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: calc(14px + (26 - 14) * ((100vw - 300px) / (1600 - 300)));
|
||||
line-height: calc(1.3em + (1.5 - 1.2) * ((100vw - 300px)/(1600 - 300)));
|
||||
}
|
||||
.android_auto_small {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: calc(8px + (18 - 8) * ((100vw - 300px) / (1600 - 300)));
|
||||
line-height: calc(1.3em + (1.5 - 1.2) * ((100vw - 300px)/(1600 - 300)));
|
||||
}
|
||||
.android_whiteboard_small {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: calc(8px + (16 - 8) * ((100vw - 300px) / (1600 - 300)));
|
||||
line-height: calc(1.3em + (1.5 - 1.2) * ((100vw - 300px)/(1600 - 300)));
|
||||
}
|
||||
.android_campaign_header {
|
||||
FONT-FAMILY: Courier;
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: calc(4px + (18 - 4) * ((100vw - 300px) / (1600 - 300)));
|
||||
}
|
||||
.android_auto_percent {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
width: 24vw;
|
||||
font-size: calc(14px + (26 - 14) * ((100vw - 300px) / (1600 - 300)));
|
||||
line-height: calc(1.3em + (1.5 - 1.2) * ((100vw - 300px)/(1600 - 300)));
|
||||
}
|
||||
.mobile_whiteboard_td_lg {width: 40vw; max-width: 400px;}
|
||||
.mobile_whiteboard_td_sm {width: 30vw; max-width: 300px;}
|
||||
.mobile_whiteboard_select {width: 27vw; max-width: 270px;}
|
||||
.mobile_whiteboard_button {width: 15vw; max-width: 150px;}
|
||||
.mobile_whiteboard_display {width: 80vw; max-width:800px; height:70vh; max-height:800px;}
|
||||
|
||||
.autosize_10 {width: 10vw; max-width: 160px;}
|
||||
.autosize_12 {width: 12vw; max-width: 180px;}
|
||||
|
||||
/*
|
||||
LEVEL ONE MENU
|
||||
*/
|
||||
ul.dropdown_android { position: relative;}
|
||||
ul.dropdown_android li { font-weight: bold; float: left; }
|
||||
ul.dropdown_android a:hover { color: #000; }
|
||||
ul.dropdown_android a:active { color: #ffa500; }
|
||||
ul.dropdown_android li a { display: block; border-right: 1px solid #333; color: #222; }
|
||||
ul.dropdown_android li:last-child a { border-right: none; } /* Doesn't work in IE */
|
||||
ul.dropdown_android li.hover,
|
||||
ul.dropdown_android li:hover { position: relative; }
|
||||
|
||||
|
||||
/*
|
||||
LEVEL TWO MENU
|
||||
*/
|
||||
ul.dropdown_android ul { width: calc(25px + (150 - 25) * ((100vw - 300px) / (1600 - 300))); visibility: hidden; position: absolute; top: 100%; left: -40;}
|
||||
ul.dropdown_android ul li { font-weight: normal; float: none; top: 100%; margin-top:-4;}
|
||||
|
||||
/* IE 6 & 7 Needs Inline Block */
|
||||
ul.dropdown_android ul li a { border-right: none; width: 100%; display: inline-block; }
|
||||
|
||||
/*
|
||||
LEVEL THREE MENU
|
||||
*/
|
||||
ul.dropdown_android ul ul { left: 100%; top: 0; }
|
||||
ul.dropdown_android li:hover > ul { visibility: visible; }
|
||||
|
||||
|
||||
.records_list_x{
|
||||
@@ -133,6 +207,10 @@ redalert {font-size: 18px; font-weight:bold; font-family: Arial, Sans-Serif; col
|
||||
padding: 2px;
|
||||
border: solid 1px #<?php echo $SSmenu_background; ?>;
|
||||
}
|
||||
.form_field_android {
|
||||
font-family: Arial, Sans-Serif;
|
||||
FONT-SIZE: calc(4px + (12 - 4) * ((100vw - 300px) / (1600 - 300)));
|
||||
}
|
||||
.required_field {
|
||||
font-family: Arial, Sans-Serif;
|
||||
font-size: 10px;
|
||||
@@ -174,6 +252,34 @@ input.red_btn{
|
||||
border-right-color:#330000;
|
||||
border-bottom-color:#330000;
|
||||
}
|
||||
input.red_btn_mobile{
|
||||
font-family: Arial, Sans-Serif;
|
||||
font-size: calc(4px + (12 - 4) * ((100vw - 300px) / (1600 - 300)));
|
||||
width: 10vw;
|
||||
max-width:250px;
|
||||
color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
background-color:#990000;
|
||||
border:2px solid;
|
||||
border-top-color:#FFCCCC;
|
||||
border-left-color:#FFCCCC;
|
||||
border-right-color:#330000;
|
||||
border-bottom-color:#330000;
|
||||
}
|
||||
input.red_btn_mobile_lg{
|
||||
font-family: Arial, Sans-Serif;
|
||||
font-size: calc(4px + (12 - 4) * ((100vw - 300px) / (1600 - 300)));
|
||||
width: 15vw;
|
||||
max-width:200px;
|
||||
color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
background-color:#990000;
|
||||
border:2px solid;
|
||||
border-top-color:#FFCCCC;
|
||||
border-left-color:#FFCCCC;
|
||||
border-right-color:#330000;
|
||||
border-bottom-color:#330000;
|
||||
}
|
||||
input.green_btn{
|
||||
font-family: Arial, Sans-Serif;
|
||||
font-size: 12px;
|
||||
@@ -186,6 +292,34 @@ input.green_btn{
|
||||
border-right-color:#003300;
|
||||
border-bottom-color:#003300;
|
||||
}
|
||||
input.green_btn_mobile{
|
||||
font-family: Arial, Sans-Serif;
|
||||
font-size: calc(4px + (12 - 4) * ((100vw - 300px) / (1600 - 300)));
|
||||
width: 10vw;
|
||||
max-width:250px;
|
||||
color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
background-color:#009900;
|
||||
border:2px solid;
|
||||
border-top-color:#CCFFCC;
|
||||
border-left-color:#CCFFCC;
|
||||
border-right-color:#003300;
|
||||
border-bottom-color:#003300;
|
||||
}
|
||||
input.green_btn_mobile_lg{
|
||||
font-family: Arial, Sans-Serif;
|
||||
font-size: calc(4px + (12 - 4) * ((100vw - 300px) / (1600 - 300)));
|
||||
width: 15vw;
|
||||
max-width:200px;
|
||||
color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
background-color:#009900;
|
||||
border:2px solid;
|
||||
border-top-color:#CCFFCC;
|
||||
border-left-color:#CCFFCC;
|
||||
border-right-color:#003300;
|
||||
border-bottom-color:#003300;
|
||||
}
|
||||
input.blue_btn{
|
||||
font-family: Arial, Sans-Serif;
|
||||
font-size: 12px;
|
||||
@@ -198,6 +332,18 @@ input.blue_btn{
|
||||
border-right-color:#000033;
|
||||
border-bottom-color:#000033;
|
||||
}
|
||||
input.blue_btn_mobile{
|
||||
font-family: Arial, Sans-Serif;
|
||||
font-size: calc(4px + (10 - 4) * ((100vw - 300px) / (1600 - 300)));
|
||||
color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
background-color:#000099;
|
||||
border:2px solid;
|
||||
border-top-color:#CCCCFF;
|
||||
border-left-color:#CCCCFF;
|
||||
border-right-color:#000033;
|
||||
border-bottom-color:#000033;
|
||||
}
|
||||
input.tiny_red_btn{
|
||||
color:#FFFFFF;
|
||||
font-size:9px;
|
||||
@@ -277,6 +423,16 @@ TABLE.help_td {
|
||||
vertical-align: top;
|
||||
border:solid 4px #<?php echo $SSmenu_background; ?>
|
||||
}
|
||||
TABLE.panel_td {
|
||||
padding: 5px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: black;
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
background: #<?php echo $SSframe_background; ?>;
|
||||
color: #000000;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
TD.panel_td {
|
||||
padding: 5px;
|
||||
@@ -302,6 +458,16 @@ TD.search_td {
|
||||
vertical-align: top;
|
||||
border:solid 2px #600
|
||||
}
|
||||
TD.bbottom {
|
||||
border-bottom:1pt solid black;
|
||||
}
|
||||
TD.btop {
|
||||
border-top:1pt solid black;
|
||||
}
|
||||
TD.bsides {
|
||||
border-left:1pt solid black;
|
||||
border-right:1pt solid black;
|
||||
}
|
||||
|
||||
/* DIV ELEMENTS */
|
||||
div.shadowbox
|
||||
@@ -360,8 +526,165 @@ FONT-FAMILY: Courier;
|
||||
padding-left:10px;
|
||||
}
|
||||
|
||||
div.android_switchbutton
|
||||
{
|
||||
background-color:#FFCCCC;
|
||||
box-shadow: 3px 3px 1px #000000;
|
||||
border:2px solid;
|
||||
WIDTH: calc(25px + (200 - 25) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: calc(6px + (24 - 6) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-FAMILY: Courier;
|
||||
padding-left:3px;
|
||||
padding-right:3px;
|
||||
}
|
||||
div.android_switchbutton_blue
|
||||
{
|
||||
background-color:#99CCFF;
|
||||
box-shadow: 3px 3px 1px #000000;
|
||||
border:2px solid;
|
||||
WIDTH: calc(25px + (200 - 25) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: calc(6px + (24 - 6) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-FAMILY: Courier;
|
||||
padding-left:3px;
|
||||
padding-right:3px;
|
||||
}
|
||||
div.android_offbutton
|
||||
{
|
||||
background-color:#CCCCCC;
|
||||
box-shadow: 3px 3px 1px #000000;
|
||||
border:2px solid;
|
||||
WIDTH: calc(25px + (200 - 25) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-WEIGHT: bold;
|
||||
font-color: white;
|
||||
FONT-SIZE: calc(6px + (24 - 6) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-FAMILY: Courier;
|
||||
padding-left:3px;
|
||||
padding-right:3px;
|
||||
}
|
||||
div.android_onbutton
|
||||
{
|
||||
background-color:#FFFFFF;
|
||||
box-shadow: 3px 3px 1px #000000;
|
||||
border:2px solid;
|
||||
WIDTH: calc(25px + (200 - 25) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: calc(6px + (24 - 6) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-FAMILY: Courier;
|
||||
padding-left:3px;
|
||||
padding-right:3px;
|
||||
}
|
||||
div.android_offbutton_noshadow
|
||||
{
|
||||
background-color:#CCCCCC;
|
||||
border:2px solid;
|
||||
WIDTH: calc(25px + (200 - 25) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-WEIGHT: bold;
|
||||
font-color: white;
|
||||
FONT-SIZE: calc(6px + (24 - 6) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-FAMILY: Courier;
|
||||
padding-left:3px;
|
||||
padding-right:3px;
|
||||
}
|
||||
div.android_onbutton_noshadow
|
||||
{
|
||||
background-color:#FFFFFF;
|
||||
border:2px solid;
|
||||
WIDTH: calc(25px + (200 - 25) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: calc(6px + (24 - 6) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-FAMILY: Courier;
|
||||
padding-left:3px;
|
||||
padding-right:3px;
|
||||
}
|
||||
div.dropdown_android_button
|
||||
{
|
||||
background-color:#CCCCCC;
|
||||
box-shadow: 3px 3px 1px #000000;
|
||||
border:2px solid;
|
||||
WIDTH: calc(25px + (200 - 25) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: calc(6px + (24 - 6) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-FAMILY: Courier;
|
||||
padding-left:3px;
|
||||
padding-right:3px;
|
||||
}
|
||||
div.dropdown_android_button:hover{
|
||||
background-color: #F3D673;
|
||||
color: black;
|
||||
}
|
||||
div.android_offbutton_large
|
||||
{
|
||||
background-color:#999999;
|
||||
box-shadow: 3px 3px 1px #000000;
|
||||
border:2px solid;
|
||||
WIDTH: calc(50px + (320 - 50) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-WEIGHT: bold;
|
||||
font-color: white;
|
||||
FONT-SIZE: calc(6px + (24 - 6) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-FAMILY: Courier;
|
||||
padding-left:3px;
|
||||
padding-right:3px;
|
||||
}
|
||||
div.android_onbutton_large
|
||||
{
|
||||
background-color:#FFFFFF;
|
||||
box-shadow: 3px 3px 1px #000000;
|
||||
border:2px solid;
|
||||
WIDTH: calc(60px + (320 - 60) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: calc(6px + (24 - 6) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-FAMILY: Courier;
|
||||
padding-left:3px;
|
||||
padding-right:3px;
|
||||
}
|
||||
div.android_table
|
||||
{
|
||||
WIDTH: 100vw;
|
||||
border:5px solid;
|
||||
border-radius:5px;
|
||||
padding-left:3px;
|
||||
border-color:#<?php echo $SSframe_background; ?>;
|
||||
background-color:#<?php echo $SSframe_background; ?>;
|
||||
}
|
||||
div.android_settings_table
|
||||
{
|
||||
WIDTH: 94vw;
|
||||
border:5px solid;
|
||||
border-radius:5px;
|
||||
padding-left:3px;
|
||||
border-color:#<?php echo $SSframe_background; ?>;
|
||||
background-color:#<?php echo $SSframe_background; ?>;
|
||||
}
|
||||
div.help_info {position:absolute; top:0; left:0; display:none;}
|
||||
|
||||
span.android_offbutton
|
||||
{
|
||||
background-color:#999999;
|
||||
box-shadow: 3px 3px 1px #000000;
|
||||
border:2px solid;
|
||||
border-radius:5px;
|
||||
FONT-WEIGHT: bold;
|
||||
font-color: white;
|
||||
FONT-SIZE: calc(8px + (14 - 8) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-FAMILY: Courier;
|
||||
padding-left:3px;
|
||||
padding-right:3px;
|
||||
}
|
||||
span.android_onbutton
|
||||
{
|
||||
background-color:#FFFFFF;
|
||||
box-shadow: 3px 3px 1px #000000;
|
||||
border:2px solid;
|
||||
border-radius:5px;
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: calc(8px + (14 - 8) * ((100vw - 300px) / (1600 - 300)));
|
||||
FONT-FAMILY: Courier;
|
||||
padding-left:3px;
|
||||
padding-right:3px;
|
||||
}
|
||||
|
||||
.button_active {
|
||||
background-color: #4CAF50; /* Green */
|
||||
border: 1px solid green;
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
<?php
|
||||
header('Content-Type: application/javascript');
|
||||
require("functions.php");
|
||||
|
||||
if (isset($_GET["mobile"])) {$mobile=$_GET["mobile"];}
|
||||
elseif (isset($_POST["mobile"])) {$mobile=$_POST["mobile"];}
|
||||
|
||||
?>
|
||||
// vicidial_whiteboard_functions.php
|
||||
//
|
||||
// Copyright (C) 2017 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
// Copyright (C) 2019 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
//
|
||||
// Javascript file used in AST_rt_whiteboard_reports.php
|
||||
// Javascript file used in AST_rt_whiteboard_reports.php and AST_rt_whiteboard_report_mobile.php
|
||||
//
|
||||
// 171027-2352 - First build
|
||||
// 190226-1645 - Added mobile variable for mobile versions of reports
|
||||
//
|
||||
|
||||
var main_canvas = document.getElementById("MainReportCanvas");
|
||||
@@ -36,7 +41,7 @@ var TGArray_holder=new Array();
|
||||
|
||||
function StartRefresh(refresh_rate) {
|
||||
document.getElementById("loading_display").style.display="block";
|
||||
if (!refresh_rate) {refresh_rate=5;}
|
||||
if (!refresh_rate) {refresh_rate=30; RefreshReportWindow();}
|
||||
document.getElementById("query_date2").value=document.getElementById("query_date").value;
|
||||
// document.getElementById("end_date2").value=document.getElementById("end_date").value;
|
||||
document.getElementById("query_time2").value=document.getElementById("query_time").value;
|
||||
@@ -110,9 +115,11 @@ function HighlightRelatedFields(report_type) {
|
||||
}
|
||||
}
|
||||
|
||||
<?php if (!$mobile) { ?>
|
||||
document.getElementById("goto_reports").onclick = function() {
|
||||
location.href = "./admin.php?ADD=999999";
|
||||
};
|
||||
<?php } ?>
|
||||
document.getElementById("adjust_report").onclick = function() {
|
||||
document.getElementById("query_date").value=document.getElementById("query_date2").value;
|
||||
// document.getElementById("end_date").value=document.getElementById("end_date2").value;
|
||||
@@ -126,7 +133,6 @@ document.getElementById("adjust_report").onclick = function() {
|
||||
|
||||
|
||||
function RefreshReportWindow() {
|
||||
document.getElementById("loading_display").style.display="none";
|
||||
var query_date=document.getElementById("query_date").value;
|
||||
// var end_date=document.getElementById("end_date").value;
|
||||
var query_time=document.getElementById("query_time").value;
|
||||
@@ -289,6 +295,7 @@ function RefreshReportWindow() {
|
||||
var Top10Entries=0;
|
||||
var PrevTop10Value=0;
|
||||
var Top10Limit="off";
|
||||
var alert_text="";
|
||||
|
||||
for (var i = 0; i < arrayLength; i++)
|
||||
{
|
||||
@@ -335,6 +342,7 @@ function RefreshReportWindow() {
|
||||
SPHArray[i]=agent_array[7];
|
||||
TotalCallCountArray[i]=agent_array[8]; TotalCallCount=agent_array[8];
|
||||
TotalSaleCountArray[i]=agent_array[9]; TotalSaleCount=agent_array[9];
|
||||
alert_text=agent_array[10];
|
||||
TPAArray[i]=target_per_agent;
|
||||
TGArray[i]=target_gross;
|
||||
}
|
||||
@@ -344,7 +352,7 @@ function RefreshReportWindow() {
|
||||
|
||||
var Top10HTMLChart="<div class='embossed border2px round_corners sm_shadow alt_row1' align='center'><table cellpadding='8' valign='top'>";
|
||||
Top10HTMLChart+="<tr>";
|
||||
Top10HTMLChart+="<th colspan='3'><font size='+2'><?php echo _QXZ("TOP 10 PERFORMERS"); ?></font></th>";
|
||||
Top10HTMLChart+="<th colspan='3'><font size='+2'><?php echo _QXZ("TOP 10 PERFORMERS"); ?></font>"+"<BR>"+alert_text+"</th>";
|
||||
Top10HTMLChart+="<td align='right'><input type='button' class='red_btn sm_shadow' style='width:20px;height:20px' value=' X' onClick=\"ToggleVisibility('top_10_display'); ToggleVisibility('graph_display');\"></td>";
|
||||
Top10HTMLChart+="</tr>";
|
||||
Top10HTMLChart+="<tr>";
|
||||
@@ -641,6 +649,8 @@ function RefreshReportWindow() {
|
||||
// MainGraph.update();
|
||||
}
|
||||
|
||||
document.getElementById("loading_display").style.display="none";
|
||||
|
||||
|
||||
/*
|
||||
myLineChart.destroy();
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
# whiteboard_reports.php
|
||||
#
|
||||
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# A PHP file that is for generating the stats that are displayed in the whiteboard report. Returns values.
|
||||
#
|
||||
# 171027-2352 - First build
|
||||
# 190302-1707 - Added code to exclude active calls from being counted with some stats
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -70,6 +71,10 @@ if ($hourly_display)
|
||||
|
||||
$rpt_string="";
|
||||
|
||||
$exclude_statuses=array("INCALL", "DISPO", "QUEUE", "DONEM");
|
||||
$exc_status_SQL=" and status not in ('".implode("','", $exclude_statuses)."') ";
|
||||
|
||||
|
||||
$query_date=preg_replace("/[^0-9\-]/", "", $query_date);
|
||||
$end_date=preg_replace("/[^0-9\-]/", "", $end_date);
|
||||
$query_time=preg_replace("/[^0-9\:]/", "", $query_time);
|
||||
@@ -123,7 +128,7 @@ if (preg_match("/status_performance/", $rpt_type)) {
|
||||
$status_SQL=" and status in ($status_str) ";
|
||||
}
|
||||
|
||||
$sale_stmt="SELECT distinct status from vicidial_statuses where sale='Y' $status_SQL UNION SELECT distinct status from vicidial_campaign_statuses where sale='Y' $campaign_id_SQL $status_SQL";
|
||||
$sale_stmt="SELECT distinct status from vicidial_statuses where sale='Y' $status_SQL $exc_status_SQL UNION SELECT distinct status from vicidial_campaign_statuses where sale='Y' $campaign_id_SQL $status_SQL $exc_status_SQL";
|
||||
$sale_rslt=mysql_to_mysqli($sale_stmt, $link);
|
||||
$sale_dispos=array();
|
||||
if ($DB) {$rpt_string.=$sale_stmt."<BR>\n";}
|
||||
@@ -134,13 +139,13 @@ if (preg_match("/status_performance/", $rpt_type)) {
|
||||
$shift_start="$query_date $query_time";
|
||||
$shift_end="$end_date $end_time";
|
||||
|
||||
$outbound_max_time_stmt="SELECT if(min(call_date) is null, 0, min(call_date)), if(max(call_date) is null, 0, max(call_date)) From vicidial_log where call_date>='$query_date $query_time' and call_date<='$end_date $end_time' $campaign_id_SQL $user_SQL $status_SQL";
|
||||
$outbound_max_time_stmt="SELECT if(min(call_date) is null, 0, min(call_date)), if(max(call_date) is null, 0, max(call_date)) From vicidial_log where call_date>='$query_date $query_time' and call_date<='$end_date $end_time' $campaign_id_SQL $user_SQL $status_SQL $exc_status_SQL";
|
||||
$rslt=mysql_to_mysqli($outbound_max_time_stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if ($row[0]>0) {$shift_start=$row[0];}
|
||||
if ($row[1]>0) {$shift_end=$row[1];}
|
||||
|
||||
$inbound_max_time_stmt="SELECT if(min(call_date) is null, 0, min(call_date)), if(max(call_date) is null, 0, max(call_date)) From vicidial_closer_log where call_date>='$query_date $query_time' and call_date<='$end_date $end_time' $group_SQL $user_SQL $status_SQL";
|
||||
$inbound_max_time_stmt="SELECT if(min(call_date) is null, 0, min(call_date)), if(max(call_date) is null, 0, max(call_date)) From vicidial_closer_log where call_date>='$query_date $query_time' and call_date<='$end_date $end_time' $group_SQL $user_SQL $status_SQL $exc_status_SQL";
|
||||
$rslt=mysql_to_mysqli($inbound_max_time_stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if ($row[0]>0 && preg_replace("/[^0-9]/", "", $row[0])<preg_replace("/[^0-9]/", "", $shift_start)) {$shift_start=$row[0];}
|
||||
@@ -151,7 +156,7 @@ if (preg_match("/status_performance/", $rpt_type)) {
|
||||
$time_row=mysqli_fetch_row($time_rslt);
|
||||
$shift_duration=$time_row[0];
|
||||
|
||||
$outbound_stmt="SELECT status, count(*) From vicidial_log where call_date>='$query_date $query_time' and call_date<='$end_date $end_time' $campaign_id_SQL $user_SQL $status_SQL group by status order by status";
|
||||
$outbound_stmt="SELECT status, count(*) From vicidial_log where call_date>='$query_date $query_time' and call_date<='$end_date $end_time' and end_epoch is not null $campaign_id_SQL $user_SQL $status_SQL $exc_status_SQL group by status order by status";
|
||||
$status_counts=array();
|
||||
$rslt=mysql_to_mysqli($outbound_stmt, $link);
|
||||
while ($row=mysqli_fetch_row($rslt)) {
|
||||
@@ -164,7 +169,7 @@ if (preg_match("/status_performance/", $rpt_type)) {
|
||||
$status_counts["$row[0]"][2]+=$row[2];
|
||||
}
|
||||
|
||||
$inbound_stmt="SELECT status, count(*) from vicidial_closer_log where call_date>='$query_date $query_time' and call_date<='$end_date $end_time' $group_SQL $user_SQL $status_SQL group by status order by status";
|
||||
$inbound_stmt="SELECT status, count(*) from vicidial_closer_log where call_date>='$query_date $query_time' and call_date<='$end_date $end_time' and end_epoch is not null $group_SQL $user_SQL $status_SQL $exc_status_SQL group by status order by status";
|
||||
$rslt=mysql_to_mysqli($inbound_stmt, $link);
|
||||
while ($row=mysqli_fetch_row($rslt)) {
|
||||
if ($row[1]!="") {
|
||||
@@ -176,21 +181,38 @@ if (preg_match("/status_performance/", $rpt_type)) {
|
||||
$status_counts["$row[0]"][2]+=$row[2];
|
||||
}
|
||||
|
||||
while (list($key, $val)=each($status_counts)) {
|
||||
$kstatus_counts[]=array('status' => $key, 'counts' => $val[0], 'sales' => $val[1], 'dead' => $val[2]);
|
||||
}
|
||||
|
||||
foreach ($kstatus_counts as $key2 => $row2) {
|
||||
$status_ary[$key2] = $row2['status'];
|
||||
$counts_ary[$key2] = $row2['counts'];
|
||||
$sales_ary[$key2] = $row2['sales'];
|
||||
$dead_ary[$key2] = $row2['dead'];
|
||||
}
|
||||
|
||||
array_multisort($status_ary, SORT_ASC, $counts_ary, SORT_ASC, $sales_ary, SORT_ASC, $dead_ary, SORT_ASC, $kstatus_counts);
|
||||
|
||||
if (count($status_counts)==0) {
|
||||
$rpt_string="REPORT RETURNED NO RESULTS";
|
||||
} else {
|
||||
while(list($key, $val)=each($status_counts)) {
|
||||
# while(list($key, $val)=each($status_counts)) {
|
||||
foreach ($kstatus_counts as $row) {
|
||||
$key=$row['status'];
|
||||
$val0=$row['counts'];
|
||||
$val1=$row['sales'];
|
||||
|
||||
$val[0]+=0;
|
||||
$val[1]+=0;
|
||||
$total_calls+=$val[0];
|
||||
$total_sales+=$val[1];
|
||||
$val0+=0;
|
||||
$val1+=0;
|
||||
$total_calls+=$val0;
|
||||
$total_sales+=$val1;
|
||||
|
||||
|
||||
$conv_rate=sprintf("%.2f", 100*MathZDC($val[1], $val[0])); # Conversion rate
|
||||
$cph=sprintf("%.2f", (MathZDC($val[0], ($shift_duration/3600)))); # SPH - this is based on total time since start_time. Switch to $val[2] if you want it based on the individual agent's total time in the dialer.
|
||||
$sph=sprintf("%.2f", (MathZDC($val[1], ($shift_duration/3600)))); # SPH - this is based on total time since start_time. Switch to $val[2] if you want it based on the individual agent's total time in the dialer.
|
||||
$rpt_string.="$key|$full_name|$val[0]|$val[1]|$shift_duration|$conv_rate|$cph|$sph|$total_calls|$total_sales\n";
|
||||
$rpt_string.="$key|$full_name|$val0|$val1|$shift_duration|$conv_rate|$cph|$sph|$total_calls|$total_sales|$inbound_stmt - $outbound_stmt\n";
|
||||
# Agent/user group, total calls, total sales, total time, conversion rate, sales per hour
|
||||
}
|
||||
}
|
||||
@@ -243,7 +265,7 @@ if (preg_match("/(agent|team)_performance/", $rpt_type)) {
|
||||
$time_row=mysqli_fetch_row($time_rslt);
|
||||
$shift_duration=$time_row[0];
|
||||
|
||||
$sale_stmt="SELECT distinct status from vicidial_statuses where sale='Y' $status_SQL UNION SELECT distinct status from vicidial_campaign_statuses where sale='Y' $campaign_id_SQL $status_SQL";
|
||||
$sale_stmt="SELECT distinct status from vicidial_statuses where sale='Y' $status_SQL $exc_status_SQL UNION SELECT distinct status from vicidial_campaign_statuses where sale='Y' $campaign_id_SQL $status_SQL $exc_status_SQL";
|
||||
$sale_rslt=mysql_to_mysqli($sale_stmt, $link);
|
||||
$sale_dispos=array();
|
||||
if ($DB) {$rpt_string.=$sale_stmt."<BR>\n";}
|
||||
@@ -252,9 +274,9 @@ if (preg_match("/(agent|team)_performance/", $rpt_type)) {
|
||||
}
|
||||
|
||||
if (preg_match("/agent_performance/", $rpt_type)) {
|
||||
$stmt="SELECT user, status, sum(pause_sec+wait_sec+talk_sec+dispo_sec), count(*) from vicidial_agent_log where event_time>='$query_date $query_time' and event_time<='$end_date $end_time' $campaign_id_SQL $user_SQL $user_group_SQL $status_SQL group by user, status order by user, status";
|
||||
$stmt="SELECT user, status, sum(pause_sec+wait_sec+talk_sec+dispo_sec), count(*) from vicidial_agent_log where event_time>='$query_date $query_time' and event_time<='$end_date $end_time' $campaign_id_SQL $user_SQL $user_group_SQL $status_SQL $exc_status_SQL group by user, status order by user, status";
|
||||
} else if (preg_match("/team_performance/", $rpt_type)) {
|
||||
$stmt="SELECT user_group, status, sum(pause_sec+wait_sec+talk_sec+dispo_sec), count(*) from vicidial_agent_log where event_time>='$query_date $query_time' and event_time<='$end_date $end_time' $campaign_id_SQL $user_SQL $user_group_SQL $status_SQL group by user_group, status order by user_group, status";
|
||||
$stmt="SELECT user_group, status, sum(pause_sec+wait_sec+talk_sec+dispo_sec), count(*) from vicidial_agent_log where event_time>='$query_date $query_time' and event_time<='$end_date $end_time' $campaign_id_SQL $user_SQL $user_group_SQL $status_SQL $exc_status_SQL group by user_group, status order by user_group, status";
|
||||
}
|
||||
|
||||
if ($DB) {$rpt_string.=$stmt."<BR>\n";}
|
||||
@@ -275,7 +297,12 @@ if (preg_match("/(agent|team)_performance/", $rpt_type)) {
|
||||
$rpt_string="REPORT RETURNED NO RESULTS";
|
||||
} else {
|
||||
while(list($key, $val)=each($agent_counts)) {
|
||||
$user_stmt="SELECT full_name from vicidial_users where user='$key'";
|
||||
$full_name="";
|
||||
if (preg_match('/team_performance/', $rpt_type)) {
|
||||
$user_stmt="select group_name from vicidial_user_groups where user_group='$key'";
|
||||
} else {
|
||||
$user_stmt="SELECT full_name from vicidial_users where user='$key'";
|
||||
}
|
||||
$user_rslt=mysql_to_mysqli($user_stmt, $link);
|
||||
while ($user_row=mysqli_fetch_row($user_rslt)) {
|
||||
$full_name=$user_row[0];
|
||||
@@ -344,7 +371,7 @@ if (preg_match("/floor_performance/", $rpt_type)) {
|
||||
$status_SQL=" and status in ($status_str) ";
|
||||
}
|
||||
|
||||
$sale_stmt="SELECT distinct status from vicidial_statuses where sale='Y' $status_SQL UNION SELECT distinct status from vicidial_campaign_statuses where sale='Y' and campaign_id in ('".implode("','", $campaigns)."') $status_SQL";
|
||||
$sale_stmt="SELECT distinct status from vicidial_statuses where sale='Y' $status_SQL $exc_status_SQL UNION SELECT distinct status from vicidial_campaign_statuses where sale='Y' and campaign_id in ('".implode("','", $campaigns)."') $status_SQL $exc_status_SQL";
|
||||
# $rpt_string.="$sale_stmt\n";
|
||||
$sale_rslt=mysql_to_mysqli($sale_stmt, $link);
|
||||
$sale_dispos=array();
|
||||
@@ -352,7 +379,7 @@ if (preg_match("/floor_performance/", $rpt_type)) {
|
||||
array_push($sale_dispos, $sale_row[0]);
|
||||
}
|
||||
|
||||
$stmt="SELECT substr(event_time+INTERVAL (pause_sec+wait_sec+talk_sec+dispo_sec) SECOND, 1, 16) as call_end_time_min, status, count(*) from vicidial_agent_log where event_time>='$query_date $query_time' and event_time<='$end_date $end_time' $campaign_id_SQL $user_SQL $user_group_SQL $status_SQL group by call_end_time_min, status order by call_end_time_min, status";
|
||||
$stmt="SELECT substr(event_time+INTERVAL (pause_sec+wait_sec+talk_sec+dispo_sec) SECOND, 1, 16) as call_end_time_min, status, count(*) from vicidial_agent_log where event_time>='$query_date $query_time' and event_time<='$end_date $end_time' $campaign_id_SQL $user_SQL $user_group_SQL $status_SQL $exc_status_SQL group by call_end_time_min, status order by call_end_time_min, status";
|
||||
# $rpt_string.="$stmt\n";
|
||||
if ($DB) {$rpt_string.=$stmt."<BR>\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
@@ -473,7 +500,7 @@ if (preg_match("/(did|ingroup)_performance/", $rpt_type)) {
|
||||
}
|
||||
}
|
||||
|
||||
$sale_stmt="SELECT distinct status from vicidial_statuses where sale='Y' $status_SQL UNION SELECT distinct status from vicidial_campaign_statuses where sale='Y' $campaign_id_SQL $status_SQL"; # Leave it for all campaigns, given the nature.
|
||||
$sale_stmt="SELECT distinct status from vicidial_statuses where sale='Y' $status_SQL $exc_status_SQL UNION SELECT distinct status from vicidial_campaign_statuses where sale='Y' $campaign_id_SQL $status_SQL $exc_status_SQL"; # Leave it for all campaigns, given the nature.
|
||||
# $rpt_string.="$sale_stmt\n";
|
||||
$sale_rslt=mysql_to_mysqli($sale_stmt, $link);
|
||||
$sale_dispos=array();
|
||||
@@ -483,10 +510,10 @@ if (preg_match("/(did|ingroup)_performance/", $rpt_type)) {
|
||||
|
||||
if (preg_match("/did_performance/", $rpt_type)) {
|
||||
# $stmt="SELECT user, status, sum(pause_sec+wait_sec+talk_sec+dispo_sec), count(*) from vicidial_agent_log where event_time>='$query_date $query_time' and event_time<='$end_date $end_time' $campaign_id_SQL $user_SQL $user_group_SQL group by user, status order by user, status";
|
||||
$stmt="SELECT vid.did_pattern, vcl.status, sum(vcl.length_in_sec-vcl.queue_seconds) as call_length, count(*) From vicidial_closer_log vcl, vicidial_did_log vdl, vicidial_inbound_dids vid where vcl.call_date>='$query_date $query_time' and vcl.call_date<='$end_date $end_time' and vcl.uniqueid=vdl.uniqueid and vdl.did_id=vid.did_id $did_SQL $status_SQL group by did_pattern, did_description, status order by did_pattern, status";
|
||||
$stmt="SELECT vid.did_pattern, vcl.status, sum(vcl.length_in_sec-vcl.queue_seconds) as call_length, count(*) From vicidial_closer_log vcl, vicidial_did_log vdl, vicidial_inbound_dids vid where vcl.call_date>='$query_date $query_time' and vcl.call_date<='$end_date $end_time' and vcl.uniqueid=vdl.uniqueid and vdl.did_id=vid.did_id $did_SQL $status_SQL $exc_status_SQL group by did_pattern, did_description, status order by did_pattern, status";
|
||||
} else if (preg_match("/ingroup_performance/", $rpt_type)) {
|
||||
# $stmt="SELECT user_group, status, sum(pause_sec+wait_sec+talk_sec+dispo_sec), count(*) from vicidial_agent_log where event_time>='$query_date $query_time' and event_time<='$end_date $end_time' $campaign_id_SQL $user_SQL $user_group_SQL group by user_group, status order by user_group, status";
|
||||
$stmt="SELECT campaign_id, status, sum(length_in_sec-queue_seconds), count(*) from vicidial_closer_log where call_date>='$query_date $query_time' and call_date<='$end_date $end_time' $group_SQL $status_SQL group by campaign_id, status order by campaign_id, status";
|
||||
$stmt="SELECT campaign_id, status, sum(length_in_sec-queue_seconds), count(*) from vicidial_closer_log where call_date>='$query_date $query_time' and call_date<='$end_date $end_time' $group_SQL $status_SQL $exc_status_SQL group by campaign_id, status order by campaign_id, status";
|
||||
}
|
||||
|
||||
if ($DB) {$rpt_string.=$stmt."<BR>\n";}
|
||||
@@ -561,7 +588,7 @@ if ($rpt_type=="floor_performance_hourly") {
|
||||
$status_SQL=" and status in ($status_str) ";
|
||||
}
|
||||
|
||||
$sale_stmt="SELECT distinct status from vicidial_statuses where sale='Y' $status_SQL UNION SELECT distinct status from vicidial_campaign_statuses where sale='Y' and campaign_id in ('".implode("','", $campaigns)."') $status_SQL";
|
||||
$sale_stmt="SELECT distinct status from vicidial_statuses where sale='Y' $status_SQL $exc_status_SQL UNION SELECT distinct status from vicidial_campaign_statuses where sale='Y' and campaign_id in ('".implode("','", $campaigns)."') $status_SQL $exc_status_SQL";
|
||||
# $rpt_string.="$sale_stmt\n";
|
||||
$sale_rslt=mysql_to_mysqli($sale_stmt, $link);
|
||||
$sale_dispos=array();
|
||||
@@ -569,7 +596,7 @@ if ($rpt_type=="floor_performance_hourly") {
|
||||
array_push($sale_dispos, $sale_row[0]);
|
||||
}
|
||||
|
||||
$stmt="SELECT substr(event_time+INTERVAL (pause_sec+wait_sec+talk_sec+dispo_sec) SECOND, 1, 13) as call_end_time_hour, count(*) from vicidial_agent_log where event_time>='$query_date $query_time' and event_time<='$end_date $end_time' and status in ('".implode("','", $sale_dispos)."') $campaign_id_SQL $status_SQL group by call_end_time_hour order by call_end_time_hour";
|
||||
$stmt="SELECT substr(event_time+INTERVAL (pause_sec+wait_sec+talk_sec+dispo_sec) SECOND, 1, 13) as call_end_time_hour, count(*) from vicidial_agent_log where event_time>='$query_date $query_time' and event_time<='$end_date $end_time' and status in ('".implode("','", $sale_dispos)."') $campaign_id_SQL $status_SQL $exc_status_SQL group by call_end_time_hour order by call_end_time_hour";
|
||||
$rpt_string.="$stmt\n";
|
||||
if ($DB) {$rpt_string.=$stmt."<BR>\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
Reference in New Issue
Block a user