From 18fbe521ba478aa8566b120af413aa9feb037671 Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 10 Feb 2015 11:21:07 +0000 Subject: [PATCH] Fixed some issues with web lead loader git-svn-id: svn://192.168.202.10@2271 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../www/vicidial/admin_listloader_fourth_gen.php | 16 +++++++++++----- .../www/vicidial/leadloader_template_display.php | 6 ++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/agc_2-X/trunk/www/vicidial/admin_listloader_fourth_gen.php b/agc_2-X/trunk/www/vicidial/admin_listloader_fourth_gen.php index 3f192b61..52c70f14 100644 --- a/agc_2-X/trunk/www/vicidial/admin_listloader_fourth_gen.php +++ b/agc_2-X/trunk/www/vicidial/admin_listloader_fourth_gen.php @@ -2,7 +2,7 @@ # admin_listloader_fourth_gen.php - version 2.10 # (based upon - new_listloader_superL.php script) # -# Copyright (C) 2014 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2015 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # ViciDial web-based lead loader from formatted file # @@ -58,10 +58,11 @@ # 141001-2200 - Finalized adding QXZ translation to all admin files # 141118-1955 - Added more debug output # 141229-1814 - Added code for on-the-fly language translations display +# 150209-2113 - Added master_list_override option to override template setting # -$version = '2.10-56'; -$build = '141229-1814'; +$version = '2.10-57'; +$build = '150209-2113'; require("dbconnect_mysqli.php"); require("functions.php"); @@ -140,6 +141,8 @@ if (isset($_GET["owner_field"])) {$owner_field=$_GET["owner_field"];} if (isset($_GET["list_id_override"])) {$list_id_override=$_GET["list_id_override"];} elseif (isset($_POST["list_id_override"])) {$list_id_override=$_POST["list_id_override"];} $list_id_override = (preg_replace("/\D/","",$list_id_override)); +if (isset($_GET["master_list_override"])) {$master_list_override=$_GET["master_list_override"];} + elseif (isset($_POST["master_list_override"])) {$master_list_override=$_POST["master_list_override"];} if (isset($_GET["lead_file"])) {$lead_file=$_GET["lead_file"];} elseif (isset($_POST["lead_file"])) {$lead_file=$_POST["lead_file"];} if (isset($_GET["dupcheck"])) {$dupcheck=$_GET["dupcheck"];} @@ -541,7 +544,7 @@ if ( (!$OK_to_process) or ( ($leadfile) and ($file_layout!="standard" && $file_l $count++; } ?> - + (override template setting) @@ -1195,7 +1198,10 @@ if (($leadfile) && ($LF_path)) $template_id=$template_row["template_id"]; $template_name=$template_row["template_name"]; $template_description=$template_row["template_description"]; - $list_id_override=$template_row["list_id"]; + # JCJ - Added 2/9/2015 to allow dropdown to override template + if (!$master_list_override) { + $list_id_override=$template_row["list_id"]; + } $standard_variables=$template_row["standard_variables"]; $custom_table=$template_row["custom_table"]; $custom_variables=$template_row["custom_variables"]; diff --git a/agc_2-X/trunk/www/vicidial/leadloader_template_display.php b/agc_2-X/trunk/www/vicidial/leadloader_template_display.php index c16d6d16..80b83aee 100644 --- a/agc_2-X/trunk/www/vicidial/leadloader_template_display.php +++ b/agc_2-X/trunk/www/vicidial/leadloader_template_display.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2015 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # CHANGES # 120402-2238 - First Build @@ -14,6 +14,7 @@ # 130824-2320 - Changed to mysqli PHP functions # 141007-2203 - Finalized adding QXZ translation to all admin files # 141229-2021 - Added code for on-the-fly language translations display +# 150210-0619 - Fixed small display issue # require("dbconnect_mysqli.php"); @@ -73,6 +74,7 @@ else $PHP_AUTH_PW = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_PW); $PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER); } +$list_id = preg_replace('/in_file/', '0', $list_id); $list_id = preg_replace('/[^0-9]/', '', $list_id); $stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';"; @@ -200,7 +202,7 @@ if ($form_action=="prime_file" && $sample_template_file_name) $field_check=explode($delimiter, $buffer); flush(); } -else if ($list_id && $form_action=="no_template") +else if ($list_id>=0 && $form_action=="no_template") { $campaign_stmt="select campaign_id from vicidial_lists where list_id='$list_id'"; $campaign_rslt=mysql_to_mysqli($campaign_stmt, $link);