Added admin_web_directory system settings variable for non-default admin web directories

git-svn-id: svn://192.168.202.10@1450 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-06-21 14:39:59 +00:00
parent 87e06eef59
commit 7e7f7448cd
8 changed files with 74 additions and 51 deletions
+10 -8
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# ADMIN_audio_store_sync.pl version 2.2.0
# ADMIN_audio_store_sync.pl version 2.4
#
# DESCRIPTION:
# syncronizes audio between audio store and this server
@@ -12,6 +12,7 @@
# 90513-0458 - First Build
# 90518-2107 - Added force-upload option
# 90831-1349 - Added music-on-hold sync
# 100621-1018 - Added admin_web_directory variable use
#
# constants
@@ -167,21 +168,22 @@ $sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$active_asterisk_server = "$aryA[0]";
$active_asterisk_server = $aryA[0];
}
$sthA->finish();
### Grab system_settings values from the database
$stmtA = "SELECT sounds_central_control_active,sounds_web_server,sounds_web_directory FROM system_settings;";
$stmtA = "SELECT sounds_central_control_active,sounds_web_server,sounds_web_directory,admin_web_directory FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$sounds_central_control_active = "$aryA[0]";
$sounds_web_server = "$aryA[1]";
$sounds_web_directory = "$aryA[2]";
$sounds_central_control_active = $aryA[0];
$sounds_web_server = $aryA[1];
$sounds_web_directory = $aryA[2];
$admin_web_directory = $aryA[3];
}
$sthA->finish();
@@ -232,7 +234,7 @@ else
}
$URL = "http://$sounds_web_server/vicidial/audio_store.php?action=LIST&audio_server_ip=$VARserver_ip";
$URL = "http://$sounds_web_server/$admin_web_directory/audio_store.php?action=LIST&audio_server_ip=$VARserver_ip";
$URL =~ s/&/\\&/gi;
if ($DB)
@@ -357,7 +359,7 @@ if ($upload > 0)
if ( ($found_file < 1) || ($force_upload > 0) )
{
$curloptions = "-s 'http://$sounds_web_server/vicidial/audio_store.php?action=AUTOUPLOAD&audio_server_ip=$VARserver_ip' -F \"audiofile=\@$PATHsounds/$soundname\"";
$curloptions = "-s 'http://$sounds_web_server/$admin_web_directory/audio_store.php?action=AUTOUPLOAD&audio_server_ip=$VARserver_ip' -F \"audiofile=\@$PATHsounds/$soundname\"";
`$curlbin $curloptions`;
$event_string = "UPLOADING: $soundname $soundsize";
if ($DB > 0) {print " $event_string\n|$curlbin $curloptions|\n";}
+3 -2
View File
@@ -1271,7 +1271,8 @@ queuemetrics_loginout ENUM('STANDARD','CALLBACK') default 'STANDARD',
callcard_enabled ENUM('1','0') default '0',
queuemetrics_callstatus ENUM('0','1') default '1',
default_codecs VARCHAR(100) default '',
custom_fields_enabled ENUM('0','1') default '0'
custom_fields_enabled ENUM('0','1') default '0',
admin_web_directory VARCHAR(255) default 'vicidial'
);
CREATE TABLE vicidial_campaigns_list_mix (
@@ -2248,7 +2249,7 @@ ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT N
CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log;
UPDATE system_settings SET db_schema_version='1226',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1227',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+4
View File
@@ -359,3 +359,7 @@ UPDATE system_settings SET db_schema_version='1225',db_schema_update_date=NOW();
ALTER TABLE vicidial_call_menu_options MODIFY option_route_value_context VARCHAR(1000);
UPDATE system_settings SET db_schema_version='1226',db_schema_update_date=NOW();
ALTER TABLE system_settings ADD admin_web_directory VARCHAR(255) default 'vicidial';
UPDATE system_settings SET db_schema_version='1227',db_schema_update_date=NOW();
@@ -211,6 +211,8 @@ VID ID Number Filename||
VID Confirm Filename||
VID Digits||
Search Method defines how the queue will find the next agent, recommend leave this on LB. List ID is the list that the new lead is inserted into, also if the Method is not a LOOKUP method and the lead is not found. Campaign ID is the campaign to search lists through if one of the RC methods is used. Phone Code is the phone_code field entry for the lead that is inserted with. VID Enter Filename is used if the Method is set to one of the VIDPROMPT methods, it is the audio prompt played to ask the customer to enter their ID. VID ID Number Filename is used if the Method is set to one of the VIDPROMPT methods, it is the audio prompt played after customer enters their ID, something like YOU HAVE ENTERED. VID Confirm Filename is used if the Method is set to one of the VIDPROMPT methods, it is the audio prompt played to confirm their ID, something like PRESS 1 TO CONFIRM AND 2 TO REENTER. VID Digits is used if the Method is set to one of the VIDPROMPT methods, if it is set to a number it is the number of digits that must be ebtered by the customer when prompted for their ID, if set to empty or X then the customer will have to press pound or hash to finish their entry of their ID||
Admin Web Directory||
This is the directory that your administation web content, like admin.php, are in. Default is vicidial. To figure out your Admin web directory, it is everything that is between the domain name and the admin.php in the URL on this page, without the beginning and ending slashes||
AST_VICIDIAL_ingrouplist.php
+8 -6
View File
@@ -9,10 +9,11 @@
# 80525-2351 - Added an audit log that is not to be editable
# 80602-0641 - Fixed status update bug
# 90508-0727 - Changed to PHP long tags
# 100621-1023 - Added admin_web_directory variable
#
$version = '2.2.0-5';
$build = '90508-0727';
$version = '2.2.0-6';
$build = '100621-1023';
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -87,7 +88,7 @@ require("dbconnect.php");
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,admin_home_url FROM system_settings;";
$stmt = "SELECT use_non_latin,admin_home_url,admin_web_directory FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
@@ -95,8 +96,9 @@ $i=0;
while ($i < $qm_conf_ct)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$welcomeURL = $row[1];
$non_latin = $row[0];
$welcomeURL = $row[1];
$admin_web_directory = $row[2];
$i++;
}
##### END SETTINGS LOOKUP #####
@@ -338,7 +340,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ($referrer=='agent')
{$BACKlink = "<A HREF=\"./vicidial.php?pl=$phone_login&pp=$phone_pass&VD_login=$user\"><font color=\"#003333\">BACK to Agent Login Screen</font></A>";}
if ($referrer=='admin')
{$BACKlink = "<A HREF=\"../vicidial/admin.php\"><font color=\"#003333\">BACK to Administration</font></A>";}
{$BACKlink = "<A HREF=\"/$admin_web_directory/admin.php\"><font color=\"#003333\">BACK to Administration</font></A>";}
if ($referrer=='welcome')
{$BACKlink = "<A HREF=\"$welcomeURL\"><font color=\"#003333\">BACK to Welcome Screen</font></A>";}
+1 -1
View File
@@ -1161,7 +1161,7 @@ if ($CARRIERstats > 0)
$CARRIERstatsHTML .= "</TD></TR>";
}
# http://svn.eflo.net:40080/vicidial/AST_timeonVDADall.php?&groups[]=ALL-ACTIVE&RR=4000&DB=0&adastats=&SIPmonitorLINK=&IAXmonitorLINK=&usergroup=&UGdisplay=1&UidORname=1&orderby=timeup&SERVdisplay=0&CALLSdisplay=1&PHONEdisplay=0&CUSTPHONEdisplay=0&with_inbound=Y&monitor_active=&monitor_phone=350a&ALLINGROUPstats=1&DROPINGROUPstats=0&NOLEADSalert=&CARRIERstats=1
# http://server/vicidial/AST_timeonVDADall.php?&groups[]=ALL-ACTIVE&RR=4000&DB=0&adastats=&SIPmonitorLINK=&IAXmonitorLINK=&usergroup=&UGdisplay=1&UidORname=1&orderby=timeup&SERVdisplay=0&CALLSdisplay=1&PHONEdisplay=0&CUSTPHONEdisplay=0&with_inbound=Y&monitor_active=&monitor_phone=350a&ALLINGROUPstats=1&DROPINGROUPstats=0&NOLEADSalert=&CARRIERstats=1
##### INBOUND ONLY ###
if (ereg('O',$with_inbound))
+17 -5
View File
@@ -1285,6 +1285,8 @@ if (isset($_GET["hold_time_option_no_block"])) {$hold_time_option_no_block=$_G
elseif (isset($_POST["hold_time_option_no_block"])) {$hold_time_option_no_block=$_POST["hold_time_option_no_block"];}
if (isset($_GET["hold_time_option_prompt_seconds"])) {$hold_time_option_prompt_seconds=$_GET["hold_time_option_prompt_seconds"];}
elseif (isset($_POST["hold_time_option_prompt_seconds"])) {$hold_time_option_prompt_seconds=$_POST["hold_time_option_prompt_seconds"];}
if (isset($_GET["admin_web_directory"])) {$admin_web_directory=$_GET["admin_web_directory"];}
elseif (isset($_POST["admin_web_directory"])) {$admin_web_directory=$_POST["admin_web_directory"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -1298,7 +1300,7 @@ if (strlen($dial_status) > 0)
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,enable_queuemetrics_logging,enable_vtiger_integration,qc_features_active,outbound_autodial_active,sounds_central_control_active,enable_second_webform,user_territories_active,custom_fields_enabled FROM system_settings;";
$stmt = "SELECT use_non_latin,enable_queuemetrics_logging,enable_vtiger_integration,qc_features_active,outbound_autodial_active,sounds_central_control_active,enable_second_webform,user_territories_active,custom_fields_enabled,admin_web_directory FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
@@ -1314,6 +1316,7 @@ if ($qm_conf_ct > 0)
$SSenable_second_webform = $row[6];
$SSuser_territories_active = $row[7];
$SScustom_fields_enabled = $row[8];
$SSadmin_web_directory = $row[9];
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -1818,6 +1821,7 @@ if ($non_latin < 1)
$thursday_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$thursday_afterhours_filename_override);
$friday_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$friday_afterhours_filename_override);
$saturday_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$saturday_afterhours_filename_override);
$admin_web_directory = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$admin_web_directory);
### ALPHA-NUMERIC and underscore and dash and comma
$logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list);
@@ -2250,11 +2254,12 @@ else
# 100518-0643 - Added inbound_queue_no_dial and call time after hours override features
# 100523-0840 - Added inbound prompt and no-block options
# 100616-2232 - Added VIDPROMPT call menu options
# 100621-1010 - Added admin_web_directory system setting
#
# 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.4-257';
$build = '100616-2232';
$admin_version = '2.4-258';
$build = '100621-1010';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -6333,6 +6338,11 @@ if ($ADD==99999)
<BR>
<B>Sounds Web Directory -</B> This auto-generated directory name is created at random by the system as the place that the audio store will be kept. All audio files will reside in this directory.
<BR>
<A NAME="settings-admin_web_directory">
<BR>
<B>Admin Web Directory -</B> This is the directory that your administation web content, like admin.php, are in. Default is vicidial. To figure out your Admin web directory, it is everything that is between the domain name and the admin.php in the URL on this page, without the beginning and ending slashes.
<BR>
<A NAME="settings-active_voicemail_server">
<BR>
@@ -14132,7 +14142,7 @@ if ($ADD==411111111111111)
echo "<br>VICIDIAL SYSTEM SETTINGS MODIFIED\n";
$stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='$webphone_url',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs';";
$stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='$webphone_url',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory';";
$rslt=mysql_query($stmt, $link);
### LOG INSERTION Admin Log Table ###
@@ -23384,7 +23394,7 @@ if ($ADD==311111111111111)
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs from system_settings;";
$stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory from system_settings;";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$version = $row[0];
@@ -23441,6 +23451,7 @@ if ($ADD==311111111111111)
$callcard_enabled = $row[51];
$queuemetrics_callstatus = $row[52];
$default_codecs = $row[53];
$admin_web_directory = $row[54];
echo "<br>MODIFY VICIDIAL SYSTEM SETTINGS<form action=$PHP_SELF method=POST>\n";
echo "<input type=hidden name=ADD value=411111111111111>\n";
@@ -23504,6 +23515,7 @@ if ($ADD==311111111111111)
echo "<tr bgcolor=#B6D3FC><td align=right>Central Sound Control Active: </td><td align=left><select size=1 name=sounds_central_control_active><option>1</option><option>0</option><option selected>$sounds_central_control_active</option></select>$NWB#settings-sounds_central_control_active$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Sounds Web Server: </td><td align=left><input type=text name=sounds_web_server size=30 maxlength=50 value=\"$sounds_web_server\">$NWB#settings-sounds_web_server$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Sounds Web Directory: </td><td align=left><a href=\"http://$sounds_web_server/$sounds_web_directory\">$sounds_web_directory</a> $NWB#settings-sounds_web_directory$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Admin Web Directory: </td><td align=left><input type=text name=admin_web_directory size=50 maxlength=255 value=\"$admin_web_directory\">$NWB#settings-admin_web_directory$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Active Voicemail Server: </td><td align=left><select size=1 name=active_voicemail_server>\n";
##### get server listing for dynamic pulldown
+29 -29
View File
@@ -30,11 +30,12 @@
# 90721-1339 - Added rank and owner as vicidial_list fields
# 91112-0616 - Added title/alt-phone duplicate checking
# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA)
# 100621-1026 - Added admin_web_directory variable
#
# make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time.
$version = '2.2.0-34';
$build = '100118-0543';
$version = '2.2.0-35';
$build = '100621-1026';
require("dbconnect.php");
@@ -133,16 +134,15 @@ if (isset($_GET["phone_code_override"])) {$phone_code_override=$_GET["phone_co
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin FROM system_settings;";
$stmt = "SELECT use_non_latin,admin_web_directory FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$i++;
$non_latin = $row[0];
$admin_web_directory = $row[1];
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -666,7 +666,7 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
{
print "<BR><BR>PHONE CODE OVERRIDE FOR THIS FILE: $phone_code_override<BR><BR>\n";
}
# print "|$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field,$rank_field,$owner_field, --forcelistid=$list_id_override --lead_file=$lead_file|";
# print "|$WeBServeRRooT/$admin_web_directory/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field,$rank_field,$owner_field, --forcelistid=$list_id_override --lead_file=$lead_file|";
$dupcheckCLI=''; $postalgmtCLI='';
if (eregi("DUPLIST",$dupcheck)) {$dupcheckCLI='--duplicate-check';}
if (eregi("DUPCAMP",$dupcheck)) {$dupcheckCLI='--duplicate-campaign-check';}
@@ -674,13 +674,13 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
if (eregi("DUPTITLEALTPHONELIST",$dupcheck)) {$dupcheckCLI='--duplicate-tap-list-check';}
if (eregi("DUPTITLEALTPHONESYS",$dupcheck)) {$dupcheckCLI='--duplicate-tap-system-check';}
if (eregi("POSTAL",$postalgmt)) {$postalgmtCLI='--postal-code-gmt';}
passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field,$rank_field,$owner_field, --forcelistid=$list_id_override --forcephonecode=$phone_code_override --lead-file=$lead_file $postalgmtCLI $dupcheckCLI");
passthru("$WeBServeRRooT/$admin_web_directory/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field,$rank_field,$owner_field, --forcelistid=$list_id_override --forcephonecode=$phone_code_override --lead-file=$lead_file $postalgmtCLI $dupcheckCLI");
} else {
# copy($leadfile, "./vicidial_temp_file.csv");
$file=fopen("$lead_file", "r");
if ($WeBRooTWritablE > 0)
{$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");}
{$stmt_file=fopen("$WeBServeRRooT/$admin_web_directory/listloader_stmts.txt", "w");}
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing CSV file... \n";
if (strlen($list_id_override)>0)
@@ -932,7 +932,7 @@ if ($leadfile) {
if ($WeBRooTWritablE > 0)
{
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt");
copy($LF_path, "$WeBServeRRooT/$admin_web_directory/vicidial_temp_file.txt");
$lead_file = "./vicidial_temp_file.txt";
}
else
@@ -942,7 +942,7 @@ if ($leadfile) {
}
$file=fopen("$lead_file", "r");
if ($WeBRooTWritablE > 0)
{$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");}
{$stmt_file=fopen("$WeBServeRRooT/$admin_web_directory/listloader_stmts.txt", "w");}
$buffer=fgets($file, 4096);
$tab_count=substr_count($buffer, "\t");
@@ -1196,8 +1196,8 @@ if ($leadfile) {
{
if ($WeBRooTWritablE > 0)
{
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls");
$lead_file = "$WeBServeRRooT/vicidial/vicidial_temp_file.xls";
copy($LF_path, "$WeBServeRRooT/$admin_web_directory/vicidial_temp_file.xls");
$lead_file = "$WeBServeRRooT/$admin_web_directory/vicidial_temp_file.xls";
}
else
{
@@ -1206,7 +1206,7 @@ if ($leadfile) {
}
$file=fopen("$lead_file", "r");
# echo "|$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override --lead-file=$lead_file|";
# echo "|$WeBServeRRooT/$admin_web_directory/listloader.pl --forcelistid=$list_id_override --lead-file=$lead_file|";
$dupcheckCLI=''; $postalgmtCLI='';
if (eregi("DUPLIST",$dupcheck)) {$dupcheckCLI='--duplicate-check';}
if (eregi("DUPCAMP",$dupcheck)) {$dupcheckCLI='--duplicate-campaign-check';}
@@ -1214,15 +1214,15 @@ if ($leadfile) {
if (eregi("DUPTITLEALTPHONELIST",$dupcheck)) {$dupcheckCLI='--duplicate-tap-list-check';}
if (eregi("DUPTITLEALTPHONESYS",$dupcheck)) {$dupcheckCLI='--duplicate-tap-system-check';}
if (eregi("POSTAL",$postalgmt)) {$postalgmtCLI='--postal-code-gmt';}
passthru("$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override --forcephonecode=$phone_code_override --lead-file=$lead_file $postalgmtCLI $dupcheckCLI");
passthru("$WeBServeRRooT/$admin_web_directory/listloader.pl --forcelistid=$list_id_override --forcephonecode=$phone_code_override --lead-file=$lead_file $postalgmtCLI $dupcheckCLI");
}
else
{
if ($WeBRooTWritablE > 0)
{
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv");
$lead_file = "$WeBServeRRooT/vicidial/vicidial_temp_file.csv";
copy($LF_path, "$WeBServeRRooT/$admin_web_directory/vicidial_temp_file.csv");
$lead_file = "$WeBServeRRooT/$admin_web_directory/vicidial_temp_file.csv";
}
else
{
@@ -1231,7 +1231,7 @@ if ($leadfile) {
}
$file=fopen("$lead_file", "r");
if ($WeBRooTWritablE > 0)
{$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");}
{$stmt_file=fopen("$WeBServeRRooT/$admin_web_directory/listloader_stmts.txt", "w");}
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing CSV file... \n";
@@ -1479,8 +1479,8 @@ if ($leadfile) {
{
if ($WeBRooTWritablE > 0)
{
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt");
$lead_file = "$WeBServeRRooT/vicidial/vicidial_temp_file.txt";
copy($LF_path, "$WeBServeRRooT/$admin_web_directory/vicidial_temp_file.txt");
$lead_file = "$WeBServeRRooT/$admin_web_directory/vicidial_temp_file.txt";
}
else
{
@@ -1489,7 +1489,7 @@ if ($leadfile) {
}
$file=fopen("$lead_file", "r");
if ($WeBRooTWritablE > 0)
{$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");}
{$stmt_file=fopen("$WeBServeRRooT/$admin_web_directory/listloader_stmts.txt", "w");}
$buffer=fgets($file, 4096);
$tab_count=substr_count($buffer, "\t");
@@ -1538,8 +1538,8 @@ if ($leadfile) {
{
if ($WeBRooTWritablE > 0)
{
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls");
$lead_file = "$WeBServeRRooT/vicidial/vicidial_temp_file.xls";
copy($LF_path, "$WeBServeRRooT/$admin_web_directory/vicidial_temp_file.xls");
$lead_file = "$WeBServeRRooT/$admin_web_directory/vicidial_temp_file.xls";
}
else
{
@@ -1547,7 +1547,7 @@ if ($leadfile) {
$lead_file = "/tmp/vicidial_temp_file.xls";
}
# echo "|$WeBServeRRooT/vicidial/listloader_rowdisplay.pl --lead-file=$lead_file|";
# echo "|$WeBServeRRooT/$admin_web_directory/listloader_rowdisplay.pl --lead-file=$lead_file|";
$dupcheckCLI=''; $postalgmtCLI='';
if (eregi("DUPLIST",$dupcheck)) {$dupcheckCLI='--duplicate-check';}
if (eregi("DUPCAMP",$dupcheck)) {$dupcheckCLI='--duplicate-campaign-check';}
@@ -1555,14 +1555,14 @@ if ($leadfile) {
if (eregi("DUPTITLEALTPHONELIST",$dupcheck)) {$dupcheckCLI='--duplicate-tap-list-check';}
if (eregi("DUPTITLEALTPHONESYS",$dupcheck)) {$dupcheckCLI='--duplicate-tap-system-check';}
if (eregi("POSTAL",$postalgmt)) {$postalgmtCLI='--postal-code-gmt';}
passthru("$WeBServeRRooT/vicidial/listloader_rowdisplay.pl --lead-file=$lead_file $postalgmtCLI $dupcheckCLI");
passthru("$WeBServeRRooT/$admin_web_directory/listloader_rowdisplay.pl --lead-file=$lead_file $postalgmtCLI $dupcheckCLI");
}
else
{
if ($WeBRooTWritablE > 0)
{
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv");
$lead_file = "$WeBServeRRooT/vicidial/vicidial_temp_file.csv";
copy($LF_path, "$WeBServeRRooT/$admin_web_directory/vicidial_temp_file.csv");
$lead_file = "$WeBServeRRooT/$admin_web_directory/vicidial_temp_file.csv";
}
else
{
@@ -1572,7 +1572,7 @@ if ($leadfile) {
$file=fopen("$lead_file", "r");
if ($WeBRooTWritablE > 0)
{$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");}
{$stmt_file=fopen("$WeBServeRRooT/$admin_web_directory/listloader_stmts.txt", "w");}
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing CSV file... \n";