Added example admin_trigger_launch.php script
Added new format option for Calls Export Report(EXTENDED_3) which includes more DID custom fields git-svn-id: svn://192.168.202.10@2595 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -0,0 +1,252 @@
|
||||
<?php
|
||||
# admin_launch_trigger.php
|
||||
#
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This script is designed to launch a CLI script on the voicemail server through
|
||||
# the triggering process
|
||||
#
|
||||
# CHANGELOG:
|
||||
# 161016-2014 - First build of script based upon admin_NANPA_updater.php
|
||||
#
|
||||
|
||||
$version = '2.12-1';
|
||||
$build = '161016-2014';
|
||||
$startMS = microtime();
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
|
||||
$server_ip=$WEBserver_ip;
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
if (isset($_GET["stage"])) {$stage=$_GET["stage"];}
|
||||
elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];}
|
||||
if (isset($_GET["container_id"])) {$container_id=$_GET["container_id"];}
|
||||
elseif (isset($_POST["container_id"])) {$container_id=$_POST["container_id"];}
|
||||
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
||||
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
||||
|
||||
$block_scheduling_while_running=0;
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,active_voicemail_server,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];
|
||||
$active_voicemail_server = $row[4];
|
||||
$SSenable_languages = $row[5];
|
||||
$SSlanguage_method = $row[6];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
$container_id = preg_replace('/[^-_0-9a-zA-Z]/','',$container_id);
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
|
||||
$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];
|
||||
}
|
||||
|
||||
$user_auth=0;
|
||||
$auth=0;
|
||||
$reports_auth=0;
|
||||
$qc_auth=0;
|
||||
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'QC',1);
|
||||
if ($auth_message == 'GOOD')
|
||||
{$user_auth=1;}
|
||||
|
||||
if ($user_auth > 0)
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 8;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$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];
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 1 and qc_enabled='1';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$qc_auth=$row[0];
|
||||
|
||||
$reports_only_user=0;
|
||||
$qc_only_user=0;
|
||||
if ( ($reports_auth > 0) and ($auth < 1) )
|
||||
{
|
||||
$ADD=999999;
|
||||
$reports_only_user=1;
|
||||
}
|
||||
if ( ($qc_auth > 0) and ($reports_auth < 1) and ($auth < 1) )
|
||||
{
|
||||
if ( ($ADD != '881') and ($ADD != '100000000000000') )
|
||||
{
|
||||
$ADD=100000000000000;
|
||||
}
|
||||
$qc_only_user=1;
|
||||
}
|
||||
if ( ($qc_auth < 1) and ($reports_auth < 1) and ($auth < 1) )
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("You do not have permission to be here");
|
||||
Header ("Content-type: text/html; charset=utf-8");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
if (strlen($active_voicemail_server)<7)
|
||||
{
|
||||
echo _QXZ("ERROR: Admin -> System Settings -> Active Voicemail Server is not set")."\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
if ($SSnocache_admin=='1')
|
||||
{
|
||||
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
header ("Pragma: no-cache"); // HTTP/1.0
|
||||
}
|
||||
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<!-- VERSION: $admin_version BUILD: $build ADD: $ADD PHP_SELF: $PHP_SELF-->\n";
|
||||
echo "<META NAME=\"ROBOTS\" CONTENT=\"NONE\">\n";
|
||||
echo "<META NAME=\"COPYRIGHT\" CONTENT=\"© 2016 ViciDial Group\">\n";
|
||||
echo "<META NAME=\"AUTHOR\" CONTENT=\"ViciDial Group\">\n";
|
||||
if ($SSnocache_admin=='1')
|
||||
{
|
||||
echo "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n";
|
||||
echo "<META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">\n";
|
||||
echo "<META HTTP-EQUIV=\"CACHE-CONTROL\" CONTENT=\"NO-CACHE\">\n";
|
||||
}
|
||||
if ( ($SSadmin_modify_refresh > 1) and (preg_match("/^3/",$ADD)) )
|
||||
{
|
||||
$modify_refresh_set=1;
|
||||
if (preg_match("/^3/",$ADD)) {$modify_url = "$PHP_SELF?$QUERY_STRING";}
|
||||
echo "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"$SSadmin_modify_refresh;URL=$modify_url\">\n";
|
||||
}
|
||||
echo "<title>"._QXZ("ADMIN LAUNCH TRIGGER")."</title>";
|
||||
echo "</head>\n";
|
||||
$ADMIN=$PHP_SELF;
|
||||
$short_header=1;
|
||||
|
||||
|
||||
echo "\n<BODY BGCOLOR=WHITE marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
||||
|
||||
require("admin_header.php");
|
||||
|
||||
|
||||
|
||||
if ( ($stage=="LAUNCH") && (strlen($container_id) > 1) )
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_settings_containers where container_id='$container_id';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$container_ct=$row[0];
|
||||
|
||||
if ($container_ct < 1)
|
||||
{
|
||||
echo "ERROR: Container does not exist: $container_id";
|
||||
exit;
|
||||
}
|
||||
|
||||
$options="--container=$container_id ";
|
||||
|
||||
$uniqueid=rand(1, 9999);
|
||||
$TRIGGERdate = date("YmdHis");
|
||||
|
||||
$ins_stmt="INSERT into vicidial_process_triggers (trigger_id, trigger_name, server_ip, trigger_time, trigger_run, user, trigger_lines) VALUES('D".$TRIGGERdate."X".$uniqueid."', 'TEST Send Manual Trigger', '$active_voicemail_server', now()+INTERVAL 2 MINUTE, '1', '$PHP_AUTH_USER', '/usr/share/astguiclient/TEST_script.pl $options')";
|
||||
$ins_rslt=mysql_to_mysqli($ins_stmt, $link);
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
|
||||
echo "<BR><BR><B>Process D".$TRIGGERdate."X".$uniqueid." has been triggered!<BR>It will start in 2 minutes using Container $container_id.($affected_rows)</B><BR><BR>\n";
|
||||
if ($DB) {echo "DEBUG: |$ins_stmt|<BR><BR>\n";}
|
||||
}
|
||||
|
||||
|
||||
echo "<form action='$PHP_SELF' method='get'><input type=hidden name=stage value='LAUNCH'>\n";
|
||||
|
||||
echo "<BR><BR>Custom Process trigger page for TEST. Select a Container below and click SUBMIT to launch the process.<BR><BR>\n";
|
||||
|
||||
echo "<BR> <table align=left width='770' border=1 cellpadding=0 cellspacing=0 bgcolor=#D9E6FE>";
|
||||
|
||||
echo "<tr bgcolor=white><td align=right>"._QXZ("Container").": </td><td align=left><select size=1 name=container_id>\n";
|
||||
|
||||
$stmt="SELECT container_id,container_notes from vicidial_settings_containers order by container_id;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$containers_to_print = mysqli_num_rows($rslt);
|
||||
$containers_list='';
|
||||
|
||||
$o=0;
|
||||
while ($containers_to_print > $o)
|
||||
{
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
$containers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||
$o++;
|
||||
}
|
||||
echo "$containers_list";
|
||||
echo "<option SELECTED value=\"X\">--- PLEASE SELECT A CONTAINER ---</option>\n";
|
||||
echo "</select></td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=center colspan=2><input type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'></td></tr>\n";
|
||||
echo "</TABLE></center></form>\n";
|
||||
|
||||
echo "</td></tr>";
|
||||
echo "</table>";
|
||||
echo "</td></tr>";
|
||||
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
echo "</body>";
|
||||
echo "</html>";
|
||||
?>
|
||||
@@ -49,6 +49,7 @@
|
||||
# 160121-1236 - Added EXTENDED_2 option with term_reason field
|
||||
# 160510-2100 - Added coding to remove tab characters from the data
|
||||
# 160914-2200 - Added option to grab reports by either call date or entry date
|
||||
# 161017-1242 - Added DID custom variables to EXTENDED_3 output option
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -485,6 +486,11 @@ if ($run_export > 0)
|
||||
$export_fields_SQL = ",entry_date,vl.called_count,last_local_call_time,modify_date,called_since_last_reset,term_reason";
|
||||
$EFheader = "\tentry_date\tcalled_count\tlast_local_call_time\tmodify_date\tcalled_since_last_reset\tterm_reason";
|
||||
}
|
||||
if ($export_fields == 'EXTENDED_3')
|
||||
{
|
||||
$export_fields_SQL = ",entry_date,vl.called_count,last_local_call_time,modify_date,called_since_last_reset,term_reason";
|
||||
$EFheader = "\tentry_date\tcalled_count\tlast_local_call_time\tmodify_date\tcalled_since_last_reset\tterm_reason";
|
||||
}
|
||||
if ($export_fields == 'ALTERNATE_1')
|
||||
{
|
||||
$export_fields_SQL = ",vl.called_count,last_local_call_time";
|
||||
@@ -511,7 +517,7 @@ if ($run_export > 0)
|
||||
$k=0;
|
||||
if ($RUNcampaign > 0)
|
||||
{
|
||||
if ( ($export_fields == 'EXTENDED') or ($export_fields == 'EXTENDED_2') )
|
||||
if ( ($export_fields == 'EXTENDED') or ($export_fields == 'EXTENDED_2') or ($export_fields == 'EXTENDED_3') )
|
||||
{
|
||||
$stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id,vl.uniqueid,vi.entry_list_id, ifnull(val.dispo_sec+val.dead_sec,0)$export_fields_SQL from vicidial_users vu,vicidial_list vi,".$vicidial_log_table." vl LEFT OUTER JOIN ".$vicidial_agent_log_table." val ON vl.uniqueid=val.uniqueid and vl.lead_id=val.lead_id and vl.user=val.user where ".$date_field." >= '$query_date 00:00:00' and ".$date_field." <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by ".$date_field." limit 100000;";
|
||||
}
|
||||
@@ -619,6 +625,8 @@ if ($run_export > 0)
|
||||
{$export_fieldsDATA = "$row[39]\t$row[40]\t$row[41]\t$row[42]\t$row[43]\t";}
|
||||
if ($export_fields == 'EXTENDED_2')
|
||||
{$export_fieldsDATA = "$row[39]\t$row[40]\t$row[41]\t$row[42]\t$row[43]\t$row[44]\t";}
|
||||
if ($export_fields == 'EXTENDED_3')
|
||||
{$export_fieldsDATA = "$row[39]\t$row[40]\t$row[41]\t$row[42]\t$row[43]\t$row[44]\t";}
|
||||
$export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t$export_fieldsDATA";
|
||||
}
|
||||
$i++;
|
||||
@@ -630,7 +638,7 @@ if ($run_export > 0)
|
||||
|
||||
if ($RUNgroup > 0)
|
||||
{
|
||||
if ( ($export_fields == 'EXTENDED') or ($export_fields == 'EXTENDED_2') )
|
||||
if ( ($export_fields == 'EXTENDED') or ($export_fields == 'EXTENDED_2') or ($export_fields == 'EXTENDED_3') )
|
||||
{
|
||||
$stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id,vl.closecallid,vi.entry_list_id,vl.uniqueid, ifnull(val.dispo_sec+val.dead_sec,0)$export_fields_SQL from vicidial_users vu,vicidial_list vi,".$vicidial_closer_log_table." vl LEFT OUTER JOIN ".$vicidial_agent_log_table." val ON vl.uniqueid=val.uniqueid and vl.lead_id=val.lead_id and vl.user=val.user where ".$date_field." >= '$query_date 00:00:00' and ".$date_field." <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by ".$date_field." limit 100000;";
|
||||
}
|
||||
@@ -738,6 +746,8 @@ if ($run_export > 0)
|
||||
{$export_fieldsDATA = "$row[40]\t$row[41]\t$row[42]\t$row[43]\t$row[44]\t";}
|
||||
if ($export_fields == 'EXTENDED_2')
|
||||
{$export_fieldsDATA = "$row[40]\t$row[41]\t$row[42]\t$row[43]\t$row[44]\t$row[45]\t";}
|
||||
if ($export_fields == 'EXTENDED_3')
|
||||
{$export_fieldsDATA = "$row[40]\t$row[41]\t$row[42]\t$row[43]\t$row[44]\t$row[45]\t";}
|
||||
$export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t$export_fieldsDATA";
|
||||
}
|
||||
$i++;
|
||||
@@ -779,6 +789,8 @@ if ($run_export > 0)
|
||||
{$RFheader = "\trecording_id\trecording_filename\trecording_location";}
|
||||
if ( ($export_fields=='EXTENDED') or ($export_fields=='EXTENDED_2') )
|
||||
{$EXheader = "\twrapup_time\tqueue_time\tuniqueid\tcaller_code\tserver_ip\thangup_cause\tdialstatus\tchannel\tdial_time\tanswered_time\tcpd_result\tdid_pattern\tdid_id\tdid_description";}
|
||||
if ($export_fields=='EXTENDED_3')
|
||||
{$EXheader = "\twrapup_time\tqueue_time\tuniqueid\tcaller_code\tserver_ip\thangup_cause\tdialstatus\tchannel\tdial_time\tanswered_time\tcpd_result\tdid_pattern\tdid_id\tdid_description\tdid_custom_one\tdid_custom_two\tdid_custom_three\tdid_custom_four\tdid_custom_five\tdid_carrier_description";}
|
||||
if ($export_fields == 'ALTERNATE_1')
|
||||
{$EXheader = "|caller_code";}
|
||||
if ($call_notes=='YES')
|
||||
@@ -886,6 +898,7 @@ if ($run_export > 0)
|
||||
$extended_data_b='';
|
||||
$extended_data_c='';
|
||||
$extended_data_d='';
|
||||
$extended_data_e='';
|
||||
if ($export_fields=='ALTERNATE_1')
|
||||
{
|
||||
$extended_data = '';
|
||||
@@ -912,7 +925,7 @@ if ($run_export > 0)
|
||||
{$extended_data_a = "";}
|
||||
$extended_data .= "$extended_data_a";
|
||||
}
|
||||
if ( ($export_fields=='EXTENDED') or ($export_fields=='EXTENDED_2') )
|
||||
if ( ($export_fields=='EXTENDED') or ($export_fields=='EXTENDED_2') or ($export_fields=='EXTENDED_3') )
|
||||
{
|
||||
$extended_data = "\t$export_wrapup_time[$i]\t$export_queue_time[$i]\t$export_uniqueid[$i]";
|
||||
if (strlen($export_uniqueid[$i]) > 0)
|
||||
@@ -973,13 +986,14 @@ if ($run_export > 0)
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
for ($t=0; $t<count($row); $t++){
|
||||
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;";
|
||||
$stmt = "SELECT did_description,custom_one,custom_two,custom_three,custom_four,custom_five,did_carrier_description from vicidial_inbound_dids where did_id='$row[1]' LIMIT 1;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$vcdidx_ct = mysqli_num_rows($rslt);
|
||||
@@ -989,9 +1003,13 @@ if ($run_export > 0)
|
||||
### PARSE TAB CHARACTERS FROM THE DATA ITSELF
|
||||
$row[0]=preg_replace('/\t/', ' -- ', $row[0]);
|
||||
$extended_data_d .= "\t$row[0]";
|
||||
$extended_data_e .= "\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]";
|
||||
}
|
||||
else
|
||||
{$extended_data_d .= "\t";}
|
||||
{
|
||||
$extended_data_d .= "\t";
|
||||
$extended_data_e .= "\t\t\t\t\t\t";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1003,7 +1021,11 @@ if ($run_export > 0)
|
||||
{$extended_data_c = "\t";}
|
||||
if (strlen($extended_data_d)<1)
|
||||
{$extended_data_d = "\t\t\t";}
|
||||
$extended_data .= "$extended_data_a$extended_data_b$extended_data_c$extended_data_d";
|
||||
if (strlen($extended_data_e)<1)
|
||||
{$extended_data_e = "\t\t\t\t\t\t";}
|
||||
if ($export_fields!='EXTENDED_3')
|
||||
{$extended_data_e='';}
|
||||
$extended_data .= "$extended_data_a$extended_data_b$extended_data_c$extended_data_d$extended_data_e";
|
||||
}
|
||||
|
||||
$notes_data='';
|
||||
@@ -1432,7 +1454,7 @@ else
|
||||
echo "<BR><BR>\n";
|
||||
|
||||
echo "<B>"._QXZ("Export Fields").":</B><BR>\n";
|
||||
echo "<select size=1 name=export_fields><option selected value=\"STANDARD\">"._QXZ("STANDARD")."</option><option value=\"EXTENDED\">"._QXZ("EXTENDED")."</option><option value=\"EXTENDED_2\">"._QXZ("EXTENDED_2")."</option><option value=\"ALTERNATE_1\">ALTERNATE_1</option></select>\n";
|
||||
echo "<select size=1 name=export_fields><option selected value=\"STANDARD\">"._QXZ("STANDARD")."</option><option value=\"EXTENDED\">"._QXZ("EXTENDED")."</option><option value=\"EXTENDED_2\">"._QXZ("EXTENDED_2")."</option><option value=\"EXTENDED_3\">"._QXZ("EXTENDED_3")."</option><option value=\"ALTERNATE_1\">ALTERNATE_1</option></select>\n";
|
||||
|
||||
|
||||
if ($archives_available=="Y")
|
||||
@@ -1555,4 +1577,4 @@ if ($file_exported > 0)
|
||||
|
||||
exit;
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user