Added coding to remove tab characters from the data download in the calls/leads export reports
git-svn-id: svn://192.168.202.10@2533 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
# 150909-0747 - Fixed issues with translated select list values, issue #885
|
||||
# 151125-1621 - Added search archive option
|
||||
# 160121-1236 - Added EXTENDED_2 option with term_reason field
|
||||
# 160510-2100 - Added coding to remove tab characters from the data
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -587,6 +588,11 @@ if ($run_export > 0)
|
||||
{$data_temp = $row[28]; $row[28] = preg_replace("/./",'X',$data_temp);}
|
||||
}
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$export_fieldsDATA='';
|
||||
if ($export_fields == 'ALTERNATE_1')
|
||||
{
|
||||
@@ -701,6 +707,11 @@ if ($run_export > 0)
|
||||
{$data_temp = $row[28]; $row[28] = preg_replace("/./",'X',$data_temp);}
|
||||
}
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$export_fieldsDATA='';
|
||||
if ($export_fields == 'ALTERNATE_1')
|
||||
{
|
||||
@@ -835,6 +846,12 @@ if ($run_export > 0)
|
||||
while ($recordings_ct > $u)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$rec_id .= "$row[0]|";
|
||||
$rec_filename .= "$row[1]|";
|
||||
$rec_location .= "$row[2]|";
|
||||
@@ -873,6 +890,10 @@ if ($run_export > 0)
|
||||
if ($vle_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[0]=preg_replace('/\t/', ' -- ', $row[0]);
|
||||
|
||||
$extended_data_a = "$row[0]";
|
||||
$export_call_id[$i] = $row[0];
|
||||
}
|
||||
@@ -895,6 +916,12 @@ if ($run_export > 0)
|
||||
if ($vle_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$extended_data_a = "\t$row[0]\t$row[1]";
|
||||
$export_call_id[$i] = $row[0];
|
||||
}
|
||||
@@ -906,6 +933,12 @@ if ($run_export > 0)
|
||||
if ($vcarl_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$extended_data_b = "\t$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]";
|
||||
}
|
||||
|
||||
@@ -916,6 +949,8 @@ if ($run_export > 0)
|
||||
if ($vcpdl_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[0]=preg_replace('/\t/', ' -- ', $row[0]);
|
||||
$extended_data_c = "\t$row[0]";
|
||||
}
|
||||
|
||||
@@ -926,6 +961,12 @@ if ($run_export > 0)
|
||||
if ($vcdid_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$extended_data_d = "\t$row[0]\t$row[1]";
|
||||
|
||||
$stmt = "SELECT did_description from vicidial_inbound_dids where did_id='$row[1]' LIMIT 1;";
|
||||
@@ -935,6 +976,8 @@ if ($run_export > 0)
|
||||
if ($vcdidx_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[0]=preg_replace('/\t/', ' -- ', $row[0]);
|
||||
$extended_data_d .= "\t$row[0]";
|
||||
}
|
||||
else
|
||||
@@ -965,6 +1008,10 @@ if ($run_export > 0)
|
||||
if ($notes_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[0]=preg_replace('/\t/', ' -- ', $row[0]);
|
||||
|
||||
$notes_data = $row[0];
|
||||
}
|
||||
$notes_data = preg_replace("/\r\n/",' ',$notes_data);
|
||||
@@ -991,6 +1038,10 @@ if ($run_export > 0)
|
||||
while ($u < $logs_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[0]=preg_replace('/\t/', ' -- ', $row[0]);
|
||||
|
||||
$ivr_path .= "$row[0]$IVRdelimiter";
|
||||
$u++;
|
||||
}
|
||||
@@ -1121,6 +1172,8 @@ if ($run_export > 0)
|
||||
$field_temp_val = $row[$t];
|
||||
$row[$t] = preg_replace("/./",'X',$field_temp_val);
|
||||
}
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
$custom_data .= "\t$row[$t]";
|
||||
$t++;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# 150727-2144 - Enabled user features for hiding phone numbers and lead data
|
||||
# 150903-1537 - Added compatibility for custom fields data options
|
||||
# 150909-0748 - Fixed issues with translated select list values, issue #885
|
||||
# 160510-2100 - Added coding to remove tab characters from the data
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -468,6 +469,11 @@ if ($run_export > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$row[28] = preg_replace("/\n|\r/",'!N',$row[28]);
|
||||
|
||||
$export_status[$k] = $row[2];
|
||||
@@ -591,6 +597,11 @@ if ($run_export > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$row[28] = preg_replace("/\n|\r/",'!N',$row[28]);
|
||||
|
||||
$export_status[$k] = $row[2];
|
||||
@@ -788,6 +799,12 @@ if ($run_export > 0)
|
||||
while ($recordings_ct > $u)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$rec_id .= "$row[0]|";
|
||||
$rec_filename .= "$row[1]|";
|
||||
$rec_location .= "$row[2]|";
|
||||
@@ -827,6 +844,8 @@ if ($run_export > 0)
|
||||
if ($vle_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[0]=preg_replace('/\t/', ' -- ', $row[0]);
|
||||
$extended_data_a = "$row[0]";
|
||||
$export_call_id[$i] = $row[0];
|
||||
}
|
||||
@@ -849,6 +868,12 @@ if ($run_export > 0)
|
||||
if ($vle_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$extended_data_a = "\t$row[0]\t$row[1]";
|
||||
$export_call_id[$i] = $row[0];
|
||||
}
|
||||
@@ -860,6 +885,12 @@ if ($run_export > 0)
|
||||
if ($vcarl_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$extended_data_b = "\t$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]";
|
||||
}
|
||||
|
||||
@@ -870,6 +901,8 @@ if ($run_export > 0)
|
||||
if ($vcpdl_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[0]=preg_replace('/\t/', ' -- ', $row[0]);
|
||||
$extended_data_c = "\t$row[0]";
|
||||
}
|
||||
|
||||
@@ -880,6 +913,12 @@ if ($run_export > 0)
|
||||
if ($vcdid_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$extended_data_d = "\t$row[0]\t$row[1]";
|
||||
|
||||
$stmt = "SELECT did_description from vicidial_inbound_dids where did_id='$row[1]' LIMIT 1;";
|
||||
@@ -889,6 +928,8 @@ if ($run_export > 0)
|
||||
if ($vcdidx_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[0]=preg_replace('/\t/', ' -- ', $row[0]);
|
||||
$extended_data_d .= "\t$row[0]";
|
||||
}
|
||||
else
|
||||
@@ -902,6 +943,12 @@ if ($run_export > 0)
|
||||
if ($vcval_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
}
|
||||
|
||||
$cust_sec = ($row[0] - $row[1]);
|
||||
if ($cust_sec < 1) {$cust_sec=0;}
|
||||
$total_sec = ($cust_sec + $export_queue_time[$i]);
|
||||
@@ -936,6 +983,8 @@ if ($run_export > 0)
|
||||
if ($notes_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[0]=preg_replace('/\t/', ' -- ', $row[0]);
|
||||
$notes_data = $row[0];
|
||||
}
|
||||
$notes_data = preg_replace("/\r\n/",' ',$notes_data);
|
||||
@@ -962,6 +1011,8 @@ if ($run_export > 0)
|
||||
while ($u < $logs_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[0]=preg_replace('/\t/', ' -- ', $row[0]);
|
||||
$ivr_path .= "$row[0]$IVRdelimiter";
|
||||
$u++;
|
||||
}
|
||||
@@ -1092,6 +1143,8 @@ if ($run_export > 0)
|
||||
$field_temp_val = $row[$t];
|
||||
$row[$t] = preg_replace("/./",'X',$field_temp_val);
|
||||
}
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
$custom_data .= "\t$row[$t]";
|
||||
$t++;
|
||||
}
|
||||
|
||||
@@ -959,6 +959,8 @@ if ($run_export > 0)
|
||||
$field_temp_val = $row[$t];
|
||||
$row[$t] = preg_replace("/./",'X',$field_temp_val);
|
||||
}
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[$t]=preg_replace('/\t/', ' -- ', $row[$t]);
|
||||
$custom_data .= "\t$row[$t]";
|
||||
$t++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user