From a99b22bde810177fdd5beb09004693819deb921e Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 14 Jun 2007 06:41:28 +0000 Subject: [PATCH] Added Status Categories allowing for grouping of statuses and campaign-statuses Changed the System Statuses and Campaign Statuses screens to allow modification without deletion. Added an IE-incompatibilities document git-svn-id: svn://192.168.202.10@639 3d104415-ff17-0410-8863-d5cf3c621b8a --- UPGRADE | 6 + docs/BASE_INSTALL.txt | 32 +- docs/IE_INCOMPATIBILITIES.txt | 29 + docs/SCRATCH_INSTALL.txt | 32 +- extras/MySQL_AST_CREATE_tables.sql | 11 +- extras/upgrade_2.0.4.sql | 13 + .../TO_BE_TRANSLATED_2.0.4.txt | 25 + www/vicidial/admin.php | 568 +++++++++++++++--- 8 files changed, 601 insertions(+), 115 deletions(-) create mode 100644 docs/IE_INCOMPATIBILITIES.txt diff --git a/UPGRADE b/UPGRADE index 26b33134..2e7e5237 100644 --- a/UPGRADE +++ b/UPGRADE @@ -22,6 +22,12 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom mkdir $PATHweb/vicidial/server_reports/ chmod 0777 $PATHweb/vicidial/server_reports/ +4. A new set of changes have been made to the statuses sections in the admin.php + pages allowing for categorizing statuse and modifyig them without delete + +5. The admin.php interface has had more sections broken into sub-sections for + easier management and rapid modifications. + diff --git a/docs/BASE_INSTALL.txt b/docs/BASE_INSTALL.txt index 5d0090b6..ef5e118f 100644 --- a/docs/BASE_INSTALL.txt +++ b/docs/BASE_INSTALL.txt @@ -451,23 +451,23 @@ insert into vicidial_list values('','2004-01-07','','NEW','','','TEST01','101',' insert into vicidial_list values('','2004-01-07','','NEW','','','TEST01','101','TESTCAMP','N','1','7275551212','Mr','Matt','X','lead07','1234 Fake St.','','','Clearwater','FL','','33760','USA','M','1970-01-01','','test@test.com','suprise','comments go here','0'); ### these first 5 must be in all VICIDIAL systems for it to work properly # -insert into vicidial_statuses values('NEW','New Lead','N'); -insert into vicidial_statuses values('QUEUE','Lead To Be Called','N'); -insert into vicidial_statuses values('INCALL','Lead Being Called','N'); -insert into vicidial_statuses values('DROP','Agent Not Available','N'); -insert into vicidial_statuses values('NA','No Answer AutoDial','N'); +insert into vicidial_statuses values('NEW','New Lead','N','N','UNDEFINED'); +insert into vicidial_statuses values('QUEUE','Lead To Be Called','N','N','UNDEFINED'); +insert into vicidial_statuses values('INCALL','Lead Being Called','N','N','UNDEFINED'); +insert into vicidial_statuses values('DROP','Agent Not Available','N','Y','UNDEFINED'); +insert into vicidial_statuses values('NA','No Answer AutoDial','N','N','UNDEFINED'); -insert into vicidial_statuses values('CALLBK','Call Back','Y'); -insert into vicidial_statuses values('A','Answering Machine','Y'); -insert into vicidial_statuses values('B','Busy','Y'); -insert into vicidial_statuses values('DC','Disconnected Number','Y'); -insert into vicidial_statuses values('DEC','Declined Sale','Y'); -insert into vicidial_statuses values('DNC','DO NOT CALL','Y'); -insert into vicidial_statuses values('SALE','Sale Made','Y'); -insert into vicidial_statuses values('N','No Answer','Y'); -insert into vicidial_statuses values('NI','Not Interested','Y'); -insert into vicidial_statuses values('NP','No Pitch No Price','Y'); -insert into vicidial_statuses values('XFER','Call Transferred','Y'); +insert into vicidial_statuses values('CALLBK','Call Back','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('A','Answering Machine','Y','N','UNDEFINED'); +insert into vicidial_statuses values('B','Busy','Y','N','UNDEFINED'); +insert into vicidial_statuses values('DC','Disconnected Number','Y','N','UNDEFINED'); +insert into vicidial_statuses values('DEC','Declined Sale','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('DNC','DO NOT CALL','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('SALE','Sale Made','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('N','No Answer','Y','N','UNDEFINED'); +insert into vicidial_statuses values('NI','Not Interested','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('NP','No Pitch No Price','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('XFER','Call Transferred','Y','Y','UNDEFINED'); quit diff --git a/docs/IE_INCOMPATIBILITIES.txt b/docs/IE_INCOMPATIBILITIES.txt new file mode 100644 index 00000000..25bed9fb --- /dev/null +++ b/docs/IE_INCOMPATIBILITIES.txt @@ -0,0 +1,29 @@ +Microsoft Internet Explorer Incompatibilities with VICIDIAL Agent Interface 2007-06-13 + +There are quite a few issues with using Microsoft Internet Explorer(IE) with VICIDIAL because of incompatibilites with the W3C standards as well as stability and architectural issues. + +The decision was made to stop testing on IE because of time constraints as well as the lack of cross-compatibility of IE and lack of compatibility with standards. Firefox meets both of those requirements which is why that is the recommended platform for VICIDIAL agents. + +If enough time is available during developent of 2.0.4, there will be some time put into addressing these IE incompatibilities. + + +Some of the issues include the following: +- Because ActiveX is used for AJAX with IE(and no other browser) it is difficult to debug the issue with faulty garabage collection where IE, or rather ActiveX, will not delete any of the XMLHTTPRequest events that it grabs resulting in the eventual crashing of IE after it hits its memory limit. I have heard that with IE7 and newer ActiveX there is a potential way around this through using some different Javascript commands. +- Using a span with NOSCROLL and a form element inside of it are sometimes ignored by IE, not sure why, but using spans with form elements may need to be changed to accomodate IE in the future. + Changed: + .cust_form {font-family: sans-serif; font-size: 10px; overflow:} + To: + .cust_form {font-family: sans-serif; font-size: 10px} +- For some reason form elements inside of a hidden span cannot be given focus or blur(Causing Hotkeys not to work): + Commented out the following lines: + document.vicidial_form.inert_button.focus(); + document.vicidial_form.inert_button.blur(); +- There are issues with Hotkeys key-binding working with some versions of IE dues to the Javascript used to achieve the function. +- Sometimes document elements will error out as undefined even though Firefox ses them just fine, for example: + Commented out the folowing lines(3 locations): + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} + Changed to: + if (dialed_label=='NONE') {dialed_label='MAIN';} + Making these changes allows IE to work with 2.0.3 but does not allow for color status bar changes on inbound calls. + + diff --git a/docs/SCRATCH_INSTALL.txt b/docs/SCRATCH_INSTALL.txt index d47d2994..48ddbbb7 100644 --- a/docs/SCRATCH_INSTALL.txt +++ b/docs/SCRATCH_INSTALL.txt @@ -2876,23 +2876,23 @@ insert into vicidial_list values('','2004-01-07','','NEW','','','TEST01','101',' insert into vicidial_list values('','2004-01-07','','NEW','','','TEST01','101','TESTCAMP','N','1','7275551212','Mr','Matt','X','lead07','1234 Fake St.','','','Clearwater','FL','','33760','USA','M','1970-01-01','','test@test.com','suprise','comments go here','0'); ### these first 5 must be in all VICIDIAL systems for it to work properly # -insert into vicidial_statuses values('NEW','New Lead','N'); -insert into vicidial_statuses values('QUEUE','Lead To Be Called','N'); -insert into vicidial_statuses values('INCALL','Lead Being Called','N'); -insert into vicidial_statuses values('DROP','Agent Not Available','N'); -insert into vicidial_statuses values('NA','No Answer AutoDial','N'); +insert into vicidial_statuses values('NEW','New Lead','N','N','UNDEFINED'); +insert into vicidial_statuses values('QUEUE','Lead To Be Called','N','N','UNDEFINED'); +insert into vicidial_statuses values('INCALL','Lead Being Called','N','N','UNDEFINED'); +insert into vicidial_statuses values('DROP','Agent Not Available','N','Y','UNDEFINED'); +insert into vicidial_statuses values('NA','No Answer AutoDial','N','N','UNDEFINED'); -insert into vicidial_statuses values('CALLBK','Call Back','Y'); -insert into vicidial_statuses values('A','Answering Machine','Y'); -insert into vicidial_statuses values('B','Busy','Y'); -insert into vicidial_statuses values('DC','Disconnected Number','Y'); -insert into vicidial_statuses values('DEC','Declined Sale','Y'); -insert into vicidial_statuses values('DNC','DO NOT CALL','Y'); -insert into vicidial_statuses values('SALE','Sale Made','Y'); -insert into vicidial_statuses values('N','No Answer','Y'); -insert into vicidial_statuses values('NI','Not Interested','Y'); -insert into vicidial_statuses values('NP','No Pitch No Price','Y'); -insert into vicidial_statuses values('XFER','Call Transferred','Y'); +insert into vicidial_statuses values('CALLBK','Call Back','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('A','Answering Machine','Y','N','UNDEFINED'); +insert into vicidial_statuses values('B','Busy','Y','N','UNDEFINED'); +insert into vicidial_statuses values('DC','Disconnected Number','Y','N','UNDEFINED'); +insert into vicidial_statuses values('DEC','Declined Sale','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('DNC','DO NOT CALL','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('SALE','Sale Made','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('N','No Answer','Y','N','UNDEFINED'); +insert into vicidial_statuses values('NI','Not Interested','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('NP','No Pitch No Price','Y','Y','UNDEFINED'); +insert into vicidial_statuses values('XFER','Call Transferred','Y','Y','UNDEFINED'); quit ######------ END Mysql data entry ------###### diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 0d414e68..dc0e9ee5 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -542,7 +542,8 @@ list_lastcalldate DATETIME status VARCHAR(6) PRIMARY KEY NOT NULL, status_name VARCHAR(30), selectable ENUM('Y','N'), -human_answered ENUM('Y','N') default 'N' +human_answered ENUM('Y','N') default 'N', +category VARCHAR(20) default 'UNDEFINED' ); CREATE TABLE vicidial_campaign_statuses ( @@ -551,6 +552,7 @@ status_name VARCHAR(30), selectable ENUM('Y','N'), campaign_id VARCHAR(8), human_answered ENUM('Y','N') default 'N', +category VARCHAR(20) default 'UNDEFINED', index (campaign_id) ); @@ -898,9 +900,16 @@ status ENUM('ACTIVE','INACTIVE') default 'INACTIVE', index (campaign_id) ); + CREATE TABLE vicidial_status_categories ( +vsc_id VARCHAR(20) PRIMARY KEY NOT NULL, +vsc_name VARCHAR(50), +vsc_description VARCHAR(255), +tovdad_display ENUM('Y','N') default 'N' +); INSERT INTO system_settings (version,install_date) values('2.0.X', CURDATE()); +INSERT INTO vicidial_status_categories (vsc_id,vsc_name) values('UNDEFINED','Default Category'); INSERT INTO vicidial_user_groups SET user_group='ADMIN',group_name='VICIDIAL ADMINISTRATORS',allowed_campaigns=' -ALL-CAMPAIGNS- - -'; diff --git a/extras/upgrade_2.0.4.sql b/extras/upgrade_2.0.4.sql index 757360a5..7853b7e1 100644 --- a/extras/upgrade_2.0.4.sql +++ b/extras/upgrade_2.0.4.sql @@ -16,6 +16,19 @@ status ENUM('ACTIVE','INACTIVE') default 'INACTIVE', index (campaign_id) ); + CREATE TABLE vicidial_status_categories ( +vsc_id VARCHAR(20) PRIMARY KEY NOT NULL, +vsc_name VARCHAR(50), +vsc_description VARCHAR(255), +tovdad_display ENUM('Y','N') default 'N' +); + +ALTER TABLE vicidial_campaign_statuses ADD category VARCHAR(20) default 'UNDEFINED'; +ALTER TABLE vicidial_statuses ADD category VARCHAR(20) default 'UNDEFINED'; + +INSERT INTO vicidial_status_categories (vsc_id,vsc_name) values('UNDEFINED','Default Category'); + + diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt index 7e469164..f9bcb18e 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt @@ -44,6 +44,31 @@ LEAD RECYCLES|| CAMPAIGN LEAD AUTO-ALT DIAL LISTINGS:|| CAMPAIGN AGENT PAUSE CODE LISTINGS:|| CAMPAIGN LIST MIX LISTINGS:|| +The Category option allows you to group several statuses into a catogy that can be used for statistical analysis.|| +MODIFY VICIDIAL STATUS CATEGORIES|| +ADDING VICIDIAL STATUS CATEGORY|| + Status Categories || + System Statuses || +MODIFY VICIDIAL SYSTEM STATUSES|| +MODIFY VICIDIAL STATUS CATEGORY|| +Through the use of system statuses, you can have statuses that exist for campaign and in-group. The Status must be 1-6 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as an agent disposition. The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls. The Category option allows you to group several statuses into a catogy that can be used for statistical analysis|| +Through the use of system status categories, you can group together statuses to allow for statistical analysis on a group of statuses. The Category ID must be 2-20 characters in length with no spaces, the name must be 2-50 characters in length, the description is optional and TimeonVDAD Display defines whether that status will be one of the upto 4 statuses that can be calculated and displayed on the Time On VDAD Real-Time report|| +ADD NEW STATUS CATEGORY|| +STATUS CATEGORY NOT ADDED|| +there is already a status category in the system with this ID|| +ID must be between 2 and 20 characters in length|| +name name must be between 2 and 50 characters in length|| +STATUS CATEGORY NOT MODIFIED|| +the status category cannot be a reserved category: || +the status category needs to be at least 2 characters in length|| +STATUS CATEGORY DELETED|| +STATUS CATEGORY MODIFIED|| +Category: || +the system status name needs to be at least 1 characters in length|| +SYSTEM STATUS NOT MODIFIED|| +SYSTEM STATUS MODIFIED|| +ERROR: There are already 4 Status Categories set to TimeOnVDAD Display|| +CUSTOM CAMPAIGN STATUS MODIFIED|| ############################################################ CLIENT diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 118d0e2a..0533a540 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -15,8 +15,8 @@ require("dbconnect.php"); ###################################################################################################### ###################################################################################################### -$page_width='750'; -$section_width='700'; +$page_width='770'; +$section_width='720'; $header_font_size='3'; $subheader_font_size='2'; $subcamp_font_size='2'; @@ -47,6 +47,7 @@ $reports_color = '#99FF33'; $conference_color = '#FF33FF'; $server_color = '#FF33FF'; $settings_color = '#FF33FF'; + $status_color = '#FF33FF'; $users_font = 'BLACK'; $campaigns_font = 'BLACK'; $lists_font = 'BLACK'; @@ -62,6 +63,7 @@ $reports_font = 'BLACK'; $conference_font = 'BLACK'; $server_font = 'BLACK'; $settings_font = 'BLACK'; + $status_font = 'BLACK'; $subcamp_color = '#FF9933'; $subcamp_font = 'BLACK'; @@ -615,6 +617,17 @@ if (isset($_GET["mix_method"])) {$mix_method=$_GET["mix_method"];} elseif (isset($_POST["mix_method"])) {$mix_method=$_POST["mix_method"];} if (isset($_GET["human_answered"])) {$human_answered=$_GET["human_answered"];} elseif (isset($_POST["human_answered"])) {$human_answered=$_POST["human_answered"];} +if (isset($_GET["category"])) {$category=$_GET["category"];} + elseif (isset($_POST["category"])) {$category=$_POST["category"];} +if (isset($_GET["vsc_id"])) {$vsc_id=$_GET["vsc_id"];} + elseif (isset($_POST["vsc_id"])) {$vsc_id=$_POST["vsc_id"];} +if (isset($_GET["vsc_name"])) {$vsc_name=$_GET["vsc_name"];} + elseif (isset($_POST["vsc_name"])) {$vsc_name=$_POST["vsc_name"];} +if (isset($_GET["vsc_description"])) {$vsc_description=$_GET["vsc_description"];} + elseif (isset($_POST["vsc_description"])) {$vsc_description=$_POST["vsc_description"];} +if (isset($_GET["tovdad_display"])) {$tovdad_display=$_GET["tovdad_display"];} + elseif (isset($_POST["tovdad_display"])) {$tovdad_display=$_POST["tovdad_display"];} + if (isset($script_id)) {$script_id= strtoupper($script_id);} if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} @@ -771,6 +784,7 @@ $campaign_stats_refresh = ereg_replace("[^NY]","",$campaign_stats_refresh); $disable_alter_custdata = ereg_replace("[^NY]","",$disable_alter_custdata); $no_hopper_leads_logins = ereg_replace("[^NY]","",$no_hopper_leads_logins); $human_answered = ereg_replace("[^NY]","",$human_answered); +$tovdad_display = ereg_replace("[^NY]","",$tovdad_display); ### ALPHA-NUMERIC ONLY ### $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); @@ -864,6 +878,8 @@ $alter_custdata_override = ereg_replace("[^-\_0-9a-zA-Z]","",$alter_custdata_ove $list_order_mix = ereg_replace("[^-\_0-9a-zA-Z]","",$list_order_mix); $vcl_id = ereg_replace("[^-\_0-9a-zA-Z]","",$vcl_id); $mix_method = ereg_replace("[^-\_0-9a-zA-Z]","",$mix_method); +$category = ereg_replace("[^-\_0-9a-zA-Z]","",$category); +$vsc_id = ereg_replace("[^-\_0-9a-zA-Z]","",$vsc_id); ### ALPHA-NUMERIC and spaces $lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order); @@ -899,6 +915,8 @@ $pause_code_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$pause_code_name); $campaign_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_description); $list_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_description); $vcl_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$vcl_name); +$vsc_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$vsc_name); +$vsc_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$vsc_description); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot $call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); @@ -1043,11 +1061,12 @@ $list_mix_container = ereg_replace(";","",$list_mix_container); # 70602-1300 - More development on List mix admin interface, more javascript # 70608-1459 - Added option to set LIVE Callbacks to INACTIVE after one month # 70612-1451 - Added Callback INACTIVE link for after one week, sort by user/group/entrydate +# 70614-0231 - Added Status Categories, ability to Modify Statuses, moved system statuses to sub-section # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.0.4-104'; -$build = '70612-1451'; +$admin_version = '2.0.4-105'; +$build = '70614-0231'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -1202,7 +1221,8 @@ if ($ADD==211111111111) {$hh='admin'; $sh='server'; echo "ADDING NEW SERVER";} if ($ADD==221111111111) {$hh='admin'; $sh='server'; echo "ADDING NEW SERVER VICIDIAL TRUNK RECORD";} if ($ADD==2111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW CONFERENCE";} if ($ADD==21111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW VICIDIAL CONFERENCE";} -if ($ADD==221111111111111) {$hh='admin'; $sh='settings'; echo "ADDING VICIDIAL SYSTEM STATUSES";} +if ($ADD==221111111111111) {$hh='admin'; $sh='status'; echo "ADDING VICIDIAL SYSTEM STATUSES";} +if ($ADD==231111111111111) {$hh='admin'; $sh='status'; echo "ADDING VICIDIAL STATUS CATEGORY";} if ($ADD==3) {$hh='users'; echo "Modify User";} if ($ADD==30) {$hh='campaigns'; echo "Campaign Not Allowed";} if ($ADD==31) @@ -1237,6 +1257,8 @@ if ($ADD==311111111111) {$hh='admin'; $sh='server'; echo "MODIFY SERVER";} if ($ADD==3111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY CONFERENCE";} if ($ADD==31111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} if ($ADD==311111111111111) {$hh='admin'; $sh='settings'; echo "MODIFY VICIDIAL SYSTEM SETTINGS";} +if ($ADD==321111111111111) {$hh='admin'; $sh='status'; echo "MODIFY VICIDIAL SYSTEM STATUSES";} +if ($ADD==331111111111111) {$hh='admin'; $sh='status'; echo "MODIFY VICIDIAL STATUS CATEGORY";} if ($ADD=="4A") {$hh='users'; echo "Modify User - Admin";} if ($ADD=="4B") {$hh='users'; echo "Modify User - Admin";} if ($ADD==4) {$hh='users'; echo "Modify User";} @@ -1261,7 +1283,8 @@ if ($ADD==421111111111) {$hh='admin'; $sh='server'; echo "MODIFY SERVER VICIDIAL if ($ADD==4111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY CONFERENCE";} if ($ADD==41111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} if ($ADD==411111111111111) {$hh='admin'; $sh='settings'; echo "MODIFY VICIDIAL SYSTEM SETTINGS";} -if ($ADD==421111111111111) {$hh='admin'; $sh='settings'; echo "MODIFY VICIDIAL SYSTEM STATUSES";} +if ($ADD==421111111111111) {$hh='admin'; $sh='status'; echo "MODIFY VICIDIAL SYSTEM STATUSES";} +if ($ADD==431111111111111) {$hh='admin'; $sh='status'; echo "MODIFY VICIDIAL STATUS CATEGORIES";} if ($ADD==5) {$hh='users'; echo "Delete User";} if ($ADD==51) {$hh='campaigns'; $sh='detail'; echo "Delete Campaign";} if ($ADD==52) {$hh='campaigns'; $sh='detail'; echo "Logout Agents";} @@ -2254,7 +2277,7 @@ echo "> @@ -3512,7 +3554,8 @@ if (strlen($admin_hh) > 1) { - + + 1) { @@ -3535,6 +3578,10 @@ if (strlen($admin_hh) > 1) { ?> > 1) { + ?> + > + CAMPAIGN STATUS ADDED: $campaign_id - $status\n"; - $stmt="INSERT INTO vicidial_campaign_statuses (status,status_name,selectable,campaign_id,human_answered) values('$status','$status_name','$selectable','$campaign_id','$human_answered');"; + $stmt="INSERT INTO vicidial_campaign_statuses (status,status_name,selectable,campaign_id,human_answered,category) values('$status','$status_name','$selectable','$campaign_id','$human_answered','$category');"; $rslt=mysql_query($stmt, $link); ### LOG CHANGES TO LOG FILE ### @@ -5042,7 +5089,7 @@ if ($ADD==221111111111111) { echo "
SYSTEM STATUS ADDED: $status_name - $status\n"; - $stmt="INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered) values('$status','$status_name','$selectable','$human_answered');"; + $stmt="INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,category) values('$status','$status_name','$selectable','$human_answered','$category');"; $rslt=mysql_query($stmt, $link); ### LOG CHANGES TO LOG FILE ### @@ -5055,7 +5102,57 @@ if ($ADD==221111111111111) } } } -$ADD=311111111111111; +$ADD=321111111111111; +} + + +###################### +# ADD=231111111111111 adds the new status category to the system +###################### + +if ($ADD==231111111111111) +{ + + echo ""; + $stmt="SELECT count(*) from vicidial_status_categories where vsc_id='$vsc_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
STATUS CATEGORY NOT ADDED - there is already a status category in the system with this ID: $row[0]\n";} + else + { + if ( (strlen($vsc_id) < 2) or (strlen($vsc_id) > 20) or (strlen($vsc_name) < 2) ) + { + echo "
STATUS CATEGORY NOT ADDED - Please go back and look at the data you entered\n"; + echo "
ID must be between 2 and 20 characters in length\n"; + echo "
name name must be between 2 and 50 characters in length\n"; + } + else + { + echo "
STATUS CATEGORY ADDED: $vsc_id - $vsc_name\n"; + + $stmt="SELECT count(*) from vicidial_status_categories where tovdad_display='Y' and vsc_id NOT IN('$vsc_id');"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ( ($row[0] > 3) and (ereg('Y',$tovdad_display)) ) + { + $tovdad_display = 'N'; + echo "
ERROR: There are already 4 Status Categories set to TimeOnVDAD Display\n"; + } + + $stmt="INSERT INTO vicidial_status_categories (vsc_id,vsc_name,vsc_description,tovdad_display) values('$vsc_id','$vsc_name','$vsc_description','$tovdad_display');"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|ADD A NEW STATUS CATEGORY |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=331111111111111; } @@ -5276,7 +5373,7 @@ $ADD=31; # go to campaign modification form below } ###################### -# ADD=42 delete campaign status in the system +# ADD=42 modify/delete campaign status in the system ###################### if ($ADD==42) @@ -5293,17 +5390,35 @@ if ($ADD==42) } else { - echo "
CUSTOM CAMPAIGN STATUS DELETED: $campaign_id - $status\n"; - - $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) + if (ereg('delete',$stage)) { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status'|\n"); - fclose($fp); + echo "
CUSTOM CAMPAIGN STATUS DELETED: $campaign_id - $status\n"; + + $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + if (ereg('modify',$stage)) + { + echo "
CUSTOM CAMPAIGN STATUS MODIFIED: $campaign_id - $status\n"; + + $stmt="UPDATE vicidial_campaign_statuses SET status_name='$status_name',selectable='$selectable',human_answered='$human_answered',category='$category' where campaign_id='$campaign_id' and status='$status';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } } } } @@ -6143,7 +6258,7 @@ $ADD=311111111111111; # go to vicidial system settings form below ###################### -# ADD=421111111111111 delete system status in the system +# ADD=421111111111111 modify/delete system status in the system ###################### if ($ADD==421111111111111) @@ -6152,25 +6267,52 @@ if ($ADD==421111111111111) { echo ""; - if ( (strlen($status) < 1) or (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$status)) ) + if (ereg('delete',$stage)) { - echo "
SYSTEM STATUS NOT DELETED - Please go back and look at the data you entered\n"; - echo "
the system status cannot be a reserved status: B,NA,DNC,NA,DROP,INCALL,QUEUE,NEW\n"; - echo "
the system status needs to be at least 1 characters in length\n"; - } - else - { - echo "
SYSTEM STATUS DELETED: $status\n"; - - $stmt="DELETE FROM vicidial_statuses where status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) + if ( (strlen($status) < 1) or (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$status)) ) { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE SYSTEM STATUS |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); + echo "
SYSTEM STATUS NOT DELETED - Please go back and look at the data you entered\n"; + echo "
the system status cannot be a reserved status: B,NA,DNC,NA,DROP,INCALL,QUEUE,NEW\n"; + echo "
the system status needs to be at least 1 characters in length\n"; + } + else + { + echo "
SYSTEM STATUS DELETED: $status\n"; + + $stmt="DELETE FROM vicidial_statuses where status='$status';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE SYSTEM STATUS |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + if (ereg('modify',$stage)) + { + if ( (strlen($status) < 1) or (strlen($status_name) < 2) ) + { + echo "
SYSTEM STATUS NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
the system status needs to be at least 1 characters in length\n"; + echo "
the system status name needs to be at least 1 characters in length\n"; + } + else + { + echo "
SYSTEM STATUS MODIFIED: $status\n"; + + $stmt="UPDATE vicidial_statuses SET status_name='$status_name',selectable='$selectable',human_answered='$human_answered',category='$category' where status='$status';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY SYSTEM STATUS |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } } } } @@ -6179,10 +6321,80 @@ if ($ADD==421111111111111) echo "You do not have permission to view this page\n"; exit; } -$ADD=311111111111111; # go to system settings modification form below +$ADD=321111111111111; # go to system settings modification form below } +###################### +# ADD=431111111111111 modify/delete status category in the system +###################### + +if ($ADD==431111111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + if ( (strlen($vsc_id) < 2) or (preg_match("/^UNDEFINED$/i",$vsc_id)) ) + { + echo "
STATUS CATEGORY NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
the status category cannot be a reserved category: UNDEFINED\n"; + echo "
the status category needs to be at least 2 characters in length\n"; + } + else + { + if (ereg('delete',$stage)) + { + echo "
STATUS CATEGORY DELETED: $vsc_id\n"; + + $stmt="DELETE FROM vicidial_status_categories where vsc_id='$vsc_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE STATUS CATEGORY|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + if (ereg('modify',$stage)) + { + echo "
STATUS CATEGORY MODIFIED: $vsc_id\n"; + + $stmt="SELECT count(*) from vicidial_status_categories where tovdad_display='Y' and vsc_id NOT IN('$vsc_id');"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ( ($row[0] > 3) and (ereg('Y',$tovdad_display)) ) + { + $tovdad_display = 'N'; + echo "
ERROR: There are already 4 Status Categories set to TimeOnVDAD Display\n"; + } + + $stmt="UPDATE vicidial_status_categories SET vsc_name='$vsc_name',vsc_description='$vsc_description',tovdad_display='$tovdad_display' where vsc_id='$vsc_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY STATUS CATEGORY|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=331111111111111; # go to system settings modification form below +} + + + + ###################################################################################################### ###################################################################################################### ####### 5 series, delete records confirmation @@ -8014,26 +8226,62 @@ if ($ADD==31) if ($SUB==22) { + + ##### get status category listings for dynamic pulldown + $stmt="SELECT vsc_id,vsc_name from vicidial_status_categories order by vsc_id desc"; + $rslt=mysql_query($stmt, $link); + $cats_to_print = mysql_num_rows($rslt); + $cats_list=""; + + $o=0; + while ($cats_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $cats_list .= "\n"; + $catsname_list["$rowx[0]"] = substr($rowx[1],0,20); + $o++; + } + + echo "
\n"; echo "
CUSTOM STATUSES WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_statuses$NWE
\n"; echo "
VICIDIAL_CAMPAIGN_STATUSES TABLE


-Through the use of custom campaign statuses, you can have statuses that only exist for a specific campaign. The Status must be 1-8 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as a disposition. The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls. +Through the use of custom campaign statuses, you can have statuses that only exist for a specific campaign. The Status must be 1-8 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as a disposition. The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls. The Category option allows you to group several statuses into a catogy that can be used for statistical analysis. @@ -3001,6 +3024,23 @@ The VICIDIAL basic web-based lead loader is designed simply to take a lead file +



+ +VICIDIAL_STATUSES TABLE

+
+
+Through the use of system statuses, you can have statuses that exist for campaign and in-group. The Status must be 1-6 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as an agent disposition. The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls. The Category option allows you to group several statuses into a catogy that can be used for statistical analysis. + + +



+ +VICIDIAL_STATUS_CATEGORIES TABLE

+
+
+Through the use of system status categories, you can group together statuses to allow for statistical analysis on a group of statuses. The Category ID must be 2-20 characters in length with no spaces, the name must be 2-50 characters in length, the description is optional and TimeonVDAD Display defines whether that status will be one of the upto 4 statuses that can be calculated and displayed on the Time On VDAD Real-Time report. + + +















@@ -3503,8 +3543,10 @@ if (strlen($admin_hh) > 1) { else {$server_sh=''; $server_fc='BLACK';} if ($sh=='conference') {$conference_sh="bgcolor=\"$server_color\""; $conference_fc="$server_font";} # pink else {$conference_sh=''; $conference_fc='BLACK';} - if ($sh=='settings') {$settings_sh="bgcolor=\"$server_color\""; $settings_fc="$server_font";} # pink + if ($sh=='settings') {$settings_sh="bgcolor=\"$settings_color\""; $settings_fc="$settings_font";} # pink else {$settings_sh=''; $settings_fc='BLACK';} + if ($sh=='status') {$status_sh="bgcolor=\"$status_color\""; $status_fc="$status_font";} # pink + else {$status_sh=''; $status_fc='BLACK';} ?>
COLSPAN=2> SIZE=> Phones COLSPAN=2> SIZE=> Conferences COLSPAN=1> SIZE=> Servers COLSPAN=3> SIZE=> System Settings COLSPAN=1> SIZE=> System Settings COLSPAN=2> SIZE=> System Statuses
> System Settings
> System Statuses   |   > Status Categories
\n"; echo "\n"; - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; + $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id'"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $AScategory = $rowx[5]; + $o++; if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; - + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } echo "
STATUSDESCRIPTIONSELECTABLEHUMAN ANSWERDELETE
$rowx[0]$rowx[1]$rowx[2]$rowx[4]DELETE
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "$rowx[0]
\n"; + echo "\n"; + echo "         \n"; + echo "   \n"; + echo "DELETE\n"; + echo "
\n"; @@ -8045,6 +8293,11 @@ if ($ADD==31) echo "Description:   \n"; echo "Selectable:   \n"; echo "Human Answer:   \n"; + echo "Category: \n"; + echo "  
\n"; echo "
\n"; echo "
\n"; @@ -9131,15 +9384,6 @@ echo "\n"; } -# if ($ADD==32) {$hh='campaigns'; $sh='status'; echo "Campaign Statuses";} -# if ($ADD==33) {$hh='campaigns'; $sh='hotkey'; echo "Campaign HotKeys";} -# if ($ADD==35) {$hh='campaigns'; $sh='recycle'; echo "Campaign Lead Recycle Entries";} -# if ($ADD==36) {$hh='campaigns'; $sh='autoalt'; echo "Campaign Auto Alt Dial Statuses";} -# if ($ADD==37) {$hh='campaigns'; $sh='pause'; echo "Campaign Agent Pause Codes";} -# if ($ADD==38) {$hh='campaigns'; $sh='dialstat'; echo "Campaign Dial Statuses";} -# if ($ADD==39) {$hh='campaigns'; $sh='listmix'; echo "Campaign List Mixes";} - - @@ -10616,50 +10860,108 @@ if ($ADD==311111111111111) echo "\n"; echo "\n"; - - echo "
\n"; + echo "\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} - echo "
\n"; - echo "
VICIDIAL STATUSES WITHIN THIS SYSTEM:   $NWB#vicidial_statuses$NWE
\n"; - echo "\n"; - echo "\n"; - $stmt="SELECT * from vicidial_statuses order by status;"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; + + +###################### +# ADD=321111111111111 modify vicidial system statuses +###################### + +if ($ADD==321111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
STATUSDESCRIPTIONSELECTABLEHUMAN ANSWERDELETE
\n"; + echo ""; + + echo "
\n"; + echo "VICIDIAL STATUSES WITHIN THIS SYSTEM:   $NWB#vicidial_statuses$NWE
\n"; + echo "\n"; + echo "\n"; + + ##### get status category listings for dynamic pulldown + $stmt="SELECT vsc_id,vsc_name from vicidial_status_categories order by vsc_id desc"; + $rslt=mysql_query($stmt, $link); + $cats_to_print = mysql_num_rows($rslt); + $cats_list=""; + + $o=0; + while ($cats_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $cats_list .= "\n"; + $catsname_list["$rowx[0]"] = substr($rowx[1],0,20); + $o++; + } + + + $stmt="SELECT * from vicidial_statuses order by status;"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $AScategory = $rowx[4]; + $o++; if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; - + echo "\n"; } echo "
STATUSDESCRIPTIONSELECT-
ABLE
HUMAN
ANSWER
CATEGORYMODIFY/DELETE
$rowx[0]$rowx[1]$rowx[2]$rowx[3]\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "$rowx[0]
\n"; + echo "\n"; + echo "         \n"; + echo "   \n"; + if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0])) { echo "DELETE\n"; } else { - echo "DELETE\n"; + echo "DELETE\n"; } - echo "
\n"; echo "
ADD NEW SYSTEM STATUS
\n"; echo "\n"; - echo "Status:   \n"; - echo "Description:   \n"; + echo "Status:   \n"; + echo "Description:
\n"; echo "Selectable:   \n"; echo "Human Answer:   \n"; + echo "Category: \n"; + echo "  
\n"; echo "
\n"; echo "

\n"; @@ -10676,6 +10978,108 @@ if ($ADD==311111111111111) +###################### +# ADD=331111111111111 modify vicidial status categories +###################### + +if ($ADD==331111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + echo "
\n"; + echo "VICIDIAL STATUS CATEGORIES:   $NWB#vicidial_status_categories$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_status_categories order by vsc_id;"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + + $Avsc_id[$o] = $rowx[0]; + $Avsc_name[$o] = $rowx[1]; + $Avsc_description[$o] = $rowx[2]; + $Atovdad_display[$o] = $rowx[3]; + + $o++; + } + $p=0; + while ($o > $p) + { + if (eregi("1$|3$|5$|7$|9$", $p)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $CATstatuses=''; + $stmt="SELECT status from vicidial_statuses where category='$Avsc_id[$p]' order by status;"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $q=0; + while ($statuses_to_print > $q) + { + $rowx=mysql_fetch_row($rslt); + $CATstatuses.=" $rowx[0]"; + $q++; + } + $stmt="SELECT status from vicidial_campaign_statuses where category='$Avsc_id[$p]' order by status;"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $q=0; + while ($statuses_to_print > $q) + { + $rowx=mysql_fetch_row($rslt); + $CATstatuses.=" $rowx[0]"; + $q++; + } + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + $p++; + } + + echo "
CATEGORYNAMETOVDADSTATUSES IN THIS CATEGORY
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "$Avsc_id[$p]
\n"; + echo "$CATstatuses"; + echo "
Description:
        \n"; + echo "   DELETE
 
\n"; + + echo "
ADD NEW STATUS CATEGORY
\n"; + echo "\n"; + echo "Category ID:   \n"; + echo "Name:   \n"; + echo "TimeOnVDAD Display:  
\n"; + echo "Description:   \n"; + echo "
\n"; + + echo "

\n"; + + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + + ###################### @@ -11550,12 +11954,12 @@ $ENDtime = date("U"); $RUNtime = ($ENDtime - $STARTtime); -echo "\n\n\n


\n\n"; +echo "\n\n\n


\n
\n"; echo "\n\n\n


\nscript runtime: $RUNtime seconds"; -echo "             VERSION: $admin_version"; -echo "             BUILD: $build
\n"; +echo "                   VERSION: $admin_version"; +echo "                   BUILD: $build
\n"; ?>