Fixed admin logging bug for lists
enabled special characters fixes for modify lead and audit comments git-svn-id: svn://192.168.202.10@2081 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
<?php
|
||||
# audit_comments.php
|
||||
#
|
||||
# Copyright (C) 2013 poundteam.com,vicidial.org LICENSE: AGPLv2
|
||||
# Copyright (C) 2014 poundteam.com,vicidial.org LICENSE: AGPLv2
|
||||
#
|
||||
# This script is designed to display QC audit comments, contributed by poundteam.com
|
||||
#
|
||||
# changes:
|
||||
# 121116-1322 - First build, added to vicidial codebase
|
||||
# 130802-0957 - Changed to PHP mysqli functions
|
||||
# 140304-2154 - Enabled special characters in comments
|
||||
#
|
||||
|
||||
require_once("functions.php");
|
||||
@@ -28,7 +29,7 @@ function audit_comments($lead_id,$list_id,$format,$user,$mel,$NOW_TIME,$link,$se
|
||||
if (strlen($row[0]) > 0) {
|
||||
$comment=$row[0];
|
||||
//Put comment in comment table
|
||||
$stmt="INSERT INTO vicidial_comments (lead_id,user_id,list_id,campaign_id,comment) VALUES ('$lead_id','$user','$list_id','$campaign','$comment');";
|
||||
$stmt="INSERT INTO vicidial_comments (lead_id,user_id,list_id,campaign_id,comment) VALUES ('$lead_id','$user','$list_id','$campaign','".mysqli_real_escape_string($link, $comment)."');";
|
||||
if ($format=='debug') {
|
||||
echo "\n<!-- $stmt -->";
|
||||
}
|
||||
|
||||
@@ -3275,12 +3275,13 @@ else
|
||||
# 140206-1357 - Filter dashes from new or copied campaigns and in-groups
|
||||
# 140214-1643 - Added system settings dialplan reload timestamp
|
||||
# 140302-0958 - Added Webserver-URL Report
|
||||
# 140305-0846 - Bug fix for list modify admin logging issue
|
||||
#
|
||||
|
||||
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
|
||||
|
||||
$admin_version = '2.8-427a';
|
||||
$build = '140302-0958';
|
||||
$admin_version = '2.8-428a';
|
||||
$build = '140305-0846';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -12567,13 +12568,13 @@ if ($ADD==411)
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
## BEGIN QC Addition for Audited Comments
|
||||
$stmt="INSERT INTO vicidial_lists_custom (audit_comments, list_id) VALUES ('" . mysqli_real_escape_string($link, $audit_comments) . "','$list_id') ON DUPLICATE KEY UPDATE audit_comments='" . mysqli_real_escape_string($link, $audit_comments) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$stmtQC="INSERT INTO vicidial_lists_custom (audit_comments, list_id) VALUES ('" . mysqli_real_escape_string($link, $audit_comments) . "','$list_id') ON DUPLICATE KEY UPDATE audit_comments='" . mysqli_real_escape_string($link, $audit_comments) . "';";
|
||||
$rslt=mysql_to_mysqli($stmtQC, $link);
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
## END QC Addition for Audited Comments
|
||||
|
||||
### LOG INSERTION Admin Log Table ###
|
||||
$SQL_log = "$stmt|";
|
||||
$SQL_log = "$stmt|$stmtQC|";
|
||||
$SQL_log = preg_replace('/;/', '', $SQL_log);
|
||||
$SQL_log = addslashes($SQL_log);
|
||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='MODIFY', record_id='$list_id', event_code='ADMIN MODIFY LIST', event_sql=\"$SQL_log\", event_notes='';";
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
# 130901-0816 - Changed to mysqli PHP functions
|
||||
# 130926-2053 - Added option for viewing/modifying vicidial_list_archive leads
|
||||
# 140125-1100 - Fixed issue with Callback records having no campaign_id
|
||||
# 140304-2034 - Fixed issue with special characters in standard data fields
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -928,27 +929,27 @@ else
|
||||
else
|
||||
{
|
||||
echo "<tr><td align=right>$label_title: </td><td align=left><input type=text name=title size=4 maxlength=4 value=\"$title\"> \n";
|
||||
echo "$label_first_name: <input type=text name=first_name size=15 maxlength=30 value=\"$first_name\"> </td></tr>\n";
|
||||
echo "<tr><td align=right>$label_middle_initial: </td><td align=left><input type=text name=middle_initial size=4 maxlength=1 value=\"$middle_initial\"> \n";
|
||||
echo " $label_last_name: <input type=text name=last_name size=15 maxlength=30 value=\"$last_name\"> </td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address1 : </td><td align=left><input type=text name=address1 size=30 maxlength=30 value=\"$address1\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address2 : </td><td align=left><input type=text name=address2 size=30 maxlength=30 value=\"$address2\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address3 : </td><td align=left><input type=text name=address3 size=30 maxlength=30 value=\"$address3\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_city : </td><td align=left><input type=text name=city size=30 maxlength=30 value=\"$city\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_state: </td><td align=left><input type=text name=state size=2 maxlength=2 value=\"$state\"> \n";
|
||||
echo " $label_postal_code: <input type=text name=postal_code size=10 maxlength=10 value=\"$postal_code\"> </td></tr>\n";
|
||||
echo "$label_first_name: <input type=text name=first_name size=15 maxlength=30 value=\"".htmlentities($first_name)."\"> </td></tr>\n";
|
||||
echo "<tr><td align=right>$label_middle_initial: </td><td align=left><input type=text name=middle_initial size=4 maxlength=1 value=\"".htmlentities($middle_initia)."\"> \n";
|
||||
echo " $label_last_name: <input type=text name=last_name size=15 maxlength=30 value=\"".htmlentities($last_name)."\"> </td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address1 : </td><td align=left><input type=text name=address1 size=30 maxlength=30 value=\"".htmlentities($address1)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address2 : </td><td align=left><input type=text name=address2 size=30 maxlength=30 value=\"".htmlentities($address2)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address3 : </td><td align=left><input type=text name=address3 size=30 maxlength=30 value=\"".htmlentities($address3)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_city : </td><td align=left><input type=text name=city size=30 maxlength=30 value=\"".htmlentities($city)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_state: </td><td align=left><input type=text name=state size=2 maxlength=2 value=\"".htmlentities($state)."\"> \n";
|
||||
echo " $label_postal_code: <input type=text name=postal_code size=10 maxlength=10 value=\"".htmlentities($postal_code)."\"> </td></tr>\n";
|
||||
|
||||
echo "<tr><td align=right>$label_province : </td><td align=left><input type=text name=province size=30 maxlength=30 value=\"$province\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Country : </td><td align=left><input type=text name=country_code size=3 maxlength=3 value=\"$country_code\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_phone_number : </td><td align=left><input type=text name=phone_number size=20 maxlength=20 value=\"$phone_number\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_phone_code : </td><td align=left><input type=text name=phone_code size=10 maxlength=10 value=\"$phone_code\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_alt_phone : </td><td align=left><input type=text name=alt_phone size=20 maxlength=20 value=\"$alt_phone\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_email : </td><td align=left><input type=text name=email size=30 maxlength=50 value=\"$email\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_security_phrase : </td><td align=left><input type=text name=security size=30 maxlength=100 value=\"$security\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_vendor_lead_code : </td><td align=left><input type=text name=vendor_id size=30 maxlength=100 value=\"$vendor_id\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Rank : </td><td align=left><input type=text name=rank size=7 maxlength=5 value=\"$rank\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Owner : </td><td align=left><input type=text name=owner size=22 maxlength=20 value=\"$owner\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_comments : </td><td align=left><TEXTAREA name=comments ROWS=3 COLS=65>$comments</TEXTAREA></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_province : </td><td align=left><input type=text name=province size=30 maxlength=30 value=\"".htmlentities($province)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Country : </td><td align=left><input type=text name=country_code size=3 maxlength=3 value=\"".htmlentities($country_code)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_phone_number : </td><td align=left><input type=text name=phone_number size=20 maxlength=20 value=\"".htmlentities($phone_number)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_phone_code : </td><td align=left><input type=text name=phone_code size=10 maxlength=10 value=\"".htmlentities($phone_code)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_alt_phone : </td><td align=left><input type=text name=alt_phone size=20 maxlength=20 value=\"".htmlentities($alt_phone)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_email : </td><td align=left><input type=text name=email size=30 maxlength=50 value=\"".htmlentities($email)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_security_phrase : </td><td align=left><input type=text name=security size=30 maxlength=100 value=\"".htmlentities($security)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_vendor_lead_code : </td><td align=left><input type=text name=vendor_id size=30 maxlength=100 value=\"".htmlentities($vendor_id)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Rank : </td><td align=left><input type=text name=rank size=7 maxlength=5 value=\"".htmlentities($rank)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Owner : </td><td align=left><input type=text name=owner size=22 maxlength=20 value=\"".htmlentities($owner)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_comments : </td><td align=left><TEXTAREA name=comments ROWS=3 COLS=65>".htmlentities($comments)."</TEXTAREA></td></tr>\n";
|
||||
}
|
||||
|
||||
if ($lead_id != 'NEW')
|
||||
|
||||
Reference in New Issue
Block a user