Rewrote HELP display in web admin screens to function as database-driven
javascript popup. git-svn-id: svn://192.168.202.10@2979 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
<?php
|
||||
# list_merge.php - merge smaller lists into a larger one. Part of Admin Utilities.
|
||||
#
|
||||
# Copyright (C) 2017 Matt Florell,Joseph Johnson <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2018 Matt Florell,Joseph Johnson <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 161004-2240 - Initial Build
|
||||
# 170409-1548 - Added IP List validation code
|
||||
# 170819-1000 - Added allow_manage_active_lists option
|
||||
# 180508-2215 - Added new help display
|
||||
|
||||
#
|
||||
|
||||
$version = '2.14-3';
|
||||
@@ -194,6 +196,11 @@ echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"vicidial_stylesheet.css\" />";
|
||||
echo "<script language=\"JavaScript\" src=\"functions.js\"></script>\n";
|
||||
|
||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"vicidial_stylesheet.php\">\n";
|
||||
echo "<script language=\"JavaScript\" src=\"help.js\"></script>\n";
|
||||
echo "<div id='HelpDisplayDiv' class='help_info' style='display:none;'></div>";
|
||||
|
||||
echo "<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>\n";
|
||||
echo "<!-- "._QXZ("VERSION").": <?php echo $version ?> "._QXZ("BUILD").": <?php echo $build ?> -->\n";
|
||||
echo "<title>"._QXZ("ADMINISTRATION: List Merge Tool")."</title>\n";
|
||||
@@ -215,8 +222,11 @@ $SSadmin_color = '#FFFF99';
|
||||
$admin_font = 'BLACK';
|
||||
$SSadmin_color = '#E6E6E6';
|
||||
$subcamp_color = '#C6C6C6';
|
||||
$NWB = " <a href=\"javascript:openNewWindow('help.php";
|
||||
$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
|
||||
# $NWB = " <a href=\"javascript:openNewWindow('help.php?ADD=99999";
|
||||
# $NWE = "')\"><IMG SRC=\"help.png\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
|
||||
|
||||
$NWB = "<IMG SRC=\"help.png\" onClick=\"FillAndShowHelpDiv(event, '";
|
||||
$NWE = "')\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP>";
|
||||
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
@@ -376,7 +386,7 @@ if ($submit == "submit" )
|
||||
{
|
||||
echo "<p>$destination_list_id "._QXZ("is not a valid list id in the system.")."</p>\n";
|
||||
echo "<p><a href='$PHP_SELF'>"._QXZ("Click here to start over.")."</a></p>\n";
|
||||
echo "</body>\n</html>\n";
|
||||
echo "</body>\n</html>\n";
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
@@ -404,17 +414,18 @@ if ($submit == "submit" )
|
||||
echo "<center><form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=available_lists value='".implode("|", $available_lists)."'>\n";
|
||||
echo "<input type=hidden name=orig_count value='$orig_count'>\n";
|
||||
echo "<input type=hidden name=destination_list_id value='$destination_list_id'>\n";
|
||||
echo "<input type=hidden name=destination_list_id value='$destination_list_id'>\n";
|
||||
echo "<input type=hidden name=new_list_id value='$new_list_id'>\n";
|
||||
␍ echo "<input type=hidden name=new_list_name value='$new_list_name'>\n";
|
||||
|
||||
echo "<input type=hidden name=new_list_name value='$new_list_name'>\n";
|
||||
echo "<input type=hidden name=new_list_description value='$new_list_description'>\n";
|
||||
echo "<input type=hidden name=campaign_id value='$campaign_id'>\n";
|
||||
echo "<input type=hidden name=active value='$active'>\n";
|
||||
echo "<input type=hidden name=create_new_list value='$create_new_list'>\n";
|
||||
echo "<input type=hidden name=retain_original_list value='$retain_original_list'>\n";
|
||||
|
||||
# keep debug active
|
||||
echo "<input type=hidden name=DB value='$DB'>\n";
|
||||
# keep debug active
|
||||
echo "<input type=hidden name=DB value='$DB'>\n";
|
||||
|
||||
echo "<input type=submit name='confirm' class='red_btn' value='CONFIRM'>\n";
|
||||
echo "</form>\n";
|
||||
@@ -458,13 +469,14 @@ if ($confirm == "CONFIRM")
|
||||
$admin_log_rslt=mysql_to_mysqli($admin_log_stmt, $link);
|
||||
}
|
||||
*/
|
||||
␍
|
||||
|
||||
|
||||
# move the leads to the new list from the old list
|
||||
$move_lead_stmt = "UPDATE vicidial_list SET list_id = '$destination_list_id' WHERE list_id in ('".implode("', '", $available_lists_array)."');";
|
||||
if ($DB) { echo "|$move_lead_stmt|\n"; }
|
||||
$move_lead_rslt = mysql_to_mysqli($move_lead_stmt, $link);
|
||||
$move_lead_count = mysqli_affected_rows($link);
|
||||
|
||||
|
||||
# insert a record into the admin change log for the mvoe into new list
|
||||
$SQL_log = "$move_lead_stmt";
|
||||
$SQL_log = preg_replace('/;/', '', $SQL_log);
|
||||
@@ -472,10 +484,11 @@ if ($confirm == "CONFIRM")
|
||||
$admin_log_stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='OTHER', record_id='$destination_list_id', event_code='ADMIN LIST MERGE', event_sql=\"$SQL_log\", event_notes='$move_lead_count LEADS MOVED';";
|
||||
if ($DB) {echo "|$admin_log_stmt|\n";}
|
||||
$admin_log_rslt=mysql_to_mysqli($admin_log_stmt, $link);
|
||||
|
||||
# reset the PHP max execution so this script does not exit prematurely
|
||||
|
||||
# reset the PHP max execution so this script does not exit prematurely
|
||||
set_time_limit( 120 );
|
||||
␍
|
||||
|
||||
|
||||
echo "<p>"._QXZ("List(s)")." ".implode(", ", $available_lists_array)." "._QXZ("was merged into list")." $destination_list_id "._QXZ("with")." $move_lead_count "._QXZ("lead(s) moved.")."</p>";
|
||||
echo "<p><a href='$PHP_SELF'>"._QXZ("Click here to start over.")."</a></p>\n";
|
||||
}
|
||||
@@ -585,8 +598,8 @@ if (($submit != "submit" ) && ($confirm != "CONFIRM"))
|
||||
echo "</select>$NWB#lists-campaign_id$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row1_background><td align=right>"._QXZ("Active").": </td><td align=left><select size=1 name='active'><option value='Y'>"._QXZ("Y")."</option><option SELECTED>N</option></select>$NWB#lists-active$NWE</td></tr>\n";
|
||||
|
||||
# keep debug active
|
||||
echo "<input type=hidden name=DB value='$DB'>\n";
|
||||
# keep debug active
|
||||
echo "<input type=hidden name=DB value='$DB'>\n";
|
||||
|
||||
# Submit
|
||||
echo "<tr bgcolor=#$SSstd_row2_background><td colspan=2 align=center><input type=submit name=submit value=submit></td></tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user