diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index c1140ea2..adf03794 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -161,6 +161,8 @@ OTHER CHANGES: 23. Admin HELP text moved to separate help.php script +24. Added option.php option to allow user ID click to pause code report from the + Agent Time Detail report diff --git a/agc_2-X/trunk/extras/did_recent_call.php b/agc_2-X/trunk/extras/did_recent_call.php new file mode 100644 index 00000000..d4db7396 --- /dev/null +++ b/agc_2-X/trunk/extras/did_recent_call.php @@ -0,0 +1,91 @@ + LICENSE: AGPLv2 +# +# This script searches the did log for a matching phone number and returns +# the number of matches, it was designed to be used with the ViciDial Inbound +# DID Filter Phone Group feature in the URL search type with the following URL: +# VARhttp://server/vicidial/did_recent_call.php?phone=--A--phone_number--B--&did=--A--did_pattern--B--&hours=48 +# +# OPTIONS: +# did - you can specify the DID, use the did_pattern or leave blank to search all DIDs +# hours - number of hours you want to search back to find matches or leave blank for no limit +# +# CHANGES +# 131108-0630 - First Build (based on vtiger_phone_match.php) +# + +header ("Content-type: text/html; charset=utf-8"); + +require("dbconnect_mysqli.php"); +require("functions.php"); + +if (isset($_GET["phone"])) {$phone=$_GET["phone"];} + elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} +if (isset($_GET["did"])) {$did=$_GET["did"];} + elseif (isset($_POST["did"])) {$did=$_POST["did"];} +if (isset($_GET["hours"])) {$hours=$_GET["hours"];} + elseif (isset($_POST["hours"])) {$hours=$_POST["hours"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} + +############################################################### +##### START SYSTEM_SETTINGS INFO LOOKUP ##### +$stmt = "SELECT use_non_latin,webroot_writable FROM system_settings;"; +$rslt=mysql_to_mysqli($stmt, $link); +$ss_conf_ct = mysqli_num_rows($rslt); +if ($ss_conf_ct > 0) + { + $row=mysqli_fetch_row($rslt); + $non_latin = $row[0]; + $webroot_writable = $row[1]; + } +##### END SYSTEM_SETTINGS INFO LOOKUP ##### +############################################################# + +if ($non_latin < 1) + { + $phone=preg_replace('/[^-_0-9a-zA-Z]/','',$phone); + $did=preg_replace('/[^-_0-9a-zA-Z]/','',$did); + } +else + { + $phone = preg_replace("/'|\"|\\\\|;/","",$phone); + $did = preg_replace("/'|\"|\\\\|;/","",$did); + } +$hours=preg_replace('/[^0-9]/','',$hours); + + +$phone_count=0; + +if (strlen($phone) > 6) + { + if ( ($did == 'ALL') or ($did == '') ) + {$didSQL='';} + else + {$didSQL=" and extension='$did'";} + if ( ($hours == 'ALL') or ($hours == '') ) + {$hoursSQL=' and (call_date < (NOW() - INTERVAL 10 SECOND))';} + else + {$hoursSQL=" and (call_date < (NOW() - INTERVAL 10 SECOND) and call_date > (NOW() - INTERVAL $hours HOUR))";} + + $stmt = "SELECT count(*) FROM vicidial_did_log where caller_id_number='$phone' $didSQL $hoursSQL;"; + $rslt=mysql_to_mysqli($stmt, $link); + $did_call_ct = mysqli_num_rows($rslt); + if ($did_call_ct > 0) + { + $row=mysqli_fetch_row($rslt); + $phone_count = $row[0]; + } + if ( ($DB > 0) and ($webroot_writable > 0) ) + { + $fp = fopen ("./did_recent_call_log.txt", "a"); + fwrite ($fp, "$date|$phone_count|$did_call_ct|$stmt\n"); + fclose($fp); + } + } + +echo "$phone_count\n"; + +?> diff --git a/agc_2-X/trunk/install.pl b/agc_2-X/trunk/install.pl index 3f348dcf..ec97e260 100644 --- a/agc_2-X/trunk/install.pl +++ b/agc_2-X/trunk/install.pl @@ -33,6 +33,7 @@ # 130716-1025 - Added mtemp sounds directory for sox concatenated temp audio # 130805-0818 - Added support for mysqli # 130902-1149 - Small fix for mysqli support +# 131121-1643 - Added robots.txt file to all web directories # ############################################ @@ -2523,6 +2524,11 @@ if ($NOWEB < 1) print "Copying web files...\n"; `cp -f -R ./www/* $PATHweb/`; + `cp -f ./www/vicidial/robots.txt $PATHweb/`; + `cp -f ./www/vicidial/robots.txt $PATHweb/agc/`; + `cp -f ./www/vicidial/robots.txt $PATHweb/vicidial/ploticus/`; + `cp -f ./www/vicidial/robots.txt $PATHweb/vicidial/agent_reports/`; + `cp -f ./www/vicidial/robots.txt $PATHweb/vicidial/server_reports/`; print "setting web scripts to executable...\n"; `chmod 0777 $PATHweb/`; diff --git a/agc_2-X/trunk/www/agc/options-example.php b/agc_2-X/trunk/www/agc/options-example.php index d065687a..a6ff9293 100644 --- a/agc_2-X/trunk/www/agc/options-example.php +++ b/agc_2-X/trunk/www/agc/options-example.php @@ -10,11 +10,12 @@ # 120214-1636 - Added consult_custom_delay option # 130903-2015 - Added window validation options # 131007-1346 - Added mrglock_ig_select_ct +# 131121-1719 - Fixed defaults mismatched, HKuser_level and FORM_COLOR # $conf_silent_prefix = '5'; # vicidial_conferences prefix to enter silently and muted for recording $dtmf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys +$HKuser_level = '1'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login $manual_dial_preview = '1'; # allow preview lead option when manual dial $multi_line_comments = '1'; # set to 1 to allow multi-line comment box @@ -56,6 +57,7 @@ $webphone_pad = 0; # set the table cellpadding for the webphone $webphone_location = 'right'; # set the location on the agent screen 'right' or 'bar' $MAIN_COLOR = '#CCCCCC'; # old default is E0C2D6 $SCRIPT_COLOR = '#E6E6E6'; # old default is FFE7D0 +$FORM_COLOR = '#EFEFEF'; $SIDEBAR_COLOR = '#F6F6F6'; $window_validation = 0; # set to 1 to disallow direct logins to vicidial.php diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php index 93dbcf29..56959d7f 100644 --- a/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php +++ b/agc_2-X/trunk/www/vicidial/AST_agent_time_detail.php @@ -30,6 +30,7 @@ # 130621-0821 - Added filtering of input to prevent SQL injection attacks and new user auth # 130704-0945 - Fixed issue #675 # 130829-2012 - Changed to mysqli PHP functions +# 131122-0657 - Added options.php atdr_login_logout_user_link option # $startMS = microtime(); @@ -37,6 +38,12 @@ $startMS = microtime(); require("dbconnect_mysqli.php"); require("functions.php"); +$atdr_login_logout_user_link=0; +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']; @@ -430,9 +437,11 @@ else if ($file_download < 1) { - echo "Agent Time Detail $NOW_TIME\n"; + $ASCII_text.="\nAgent Time Detail $NOW_TIME\n"; + $ASCII_text.="Time range: $query_date_BEGIN to $query_date_END\n\n"; - echo "Time range: $query_date_BEGIN to $query_date_END\n\n"; + $GRAPH.="Agent Time Detail $NOW_TIME\n"; + $GRAPH.="Time range: $query_date_BEGIN to $query_date_END\n\n"; } else { @@ -462,7 +471,7 @@ else $max_pause=1; $max_dead=1; $max_customer=1; - $GRAPH="
| CALLS | TIME CLOCK | AGENT TIME | "; if ($show_parks) { $GRAPH2.="PARKS | PARKTIME | AVGPARK | PARKS/CALL | "; @@ -938,9 +947,17 @@ else if ($file_download < 1) { - $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] |$park_AGENT_INFO $Swait[$m] | $Swaitpct[$m] | $Stalk[$m] | $Stalkpct[$m] | $Sdispo[$m] | $Sdispopct[$m] | $Spause[$m] | $Spausepct[$m] | $Sdead[$m] | $Sdeadpct[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; + if ($atdr_login_logout_user_link > 0) + { + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] |$park_AGENT_INFO $Swait[$m] | $Swaitpct[$m] | $Stalk[$m] | $Stalkpct[$m] | $Sdispo[$m] | $Sdispopct[$m] | $Spause[$m] | $Spausepct[$m] | $Sdead[$m] | $Sdeadpct[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; + } + else + { + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] |$park_AGENT_INFO $Swait[$m] | $Swaitpct[$m] | $Stalk[$m] | $Stalkpct[$m] | $Sdispo[$m] | $Sdispopct[$m] | $Spause[$m] | $Spausepct[$m] | $Sdead[$m] | $Sdeadpct[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; + } + $graph_stats[$m][0]=trim("$Suser[$m] - $Sname[$m]"); -#CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | | LOGIN | TRAIN | TOILET | PRECAL | BREAK | | LUNCH | LAGGED + $user_IDs[$m]=$Suser[$m]; } else { @@ -1143,7 +1160,10 @@ else $ASCII_text.="| TOTALS AGENTS:$hTOT_AGENTS | $hTOTcalls |$hTOTtimeTC |$hTOTALtime |$park_TOTALS$hTOTwait |$hTOTwaitpct |$hTOTtalk |$hTOTtalkpct |$hTOTdispo |$hTOTdispopct |$hTOTpause |$hTOTpausepct |$hTOTdead |$hTOTdeadpct |$hTOTcustomer | |$SUMstatusesHTML\n"; $ASCII_text.="+-----------------+----------+----------+------------+------------$park_HEADER_DIV+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) - {echo " * denotes AUTOLOGOUT from timeclock\n";} + { + $ASCII_text.= " * denotes AUTOLOGOUT from timeclock\n"; + $HTML_text.= " * denotes AUTOLOGOUT from timeclock\n"; + } $ASCII_text.="\n\n"; for ($e=0; $e".$graph_stats[$d][0]." | |
|---|---|---|---|---|---|---|---|---|
| ".$graph_stats[$d][0]." | ||||||||
| ".$graph_stats[$d][0]." | ||||||||
| ".$graph_stats[$d][0]." | ||||||||
| ".$graph_stats[$d][0]." | ||||||||
| ".$graph_stats[$d][0]." |