Fixed some issues with web lead loader

git-svn-id: svn://192.168.202.10@2271 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2015-02-10 11:21:07 +00:00
parent d37b03db13
commit 61e1cf7ca3
2 changed files with 15 additions and 7 deletions
+11 -5
View File
@@ -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 <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2015 Matt Florell,Joe Johnson <vicidial@gmail.com> 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++;
}
?>
</select>
</select><input type='checkbox' name='master_list_override' value='1'>(override template setting)
</font></td>
</tr>
<tr>
@@ -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"];
+4 -2
View File
@@ -1,7 +1,7 @@
<?php
# leadloader_template_display.php - version 2.10
#
# Copyright (C) 2014 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2015 Matt Florell,Joe Johnson <vicidial@gmail.com> 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);