fixes for additional modify_leads options

git-svn-id: svn://192.168.202.10@3297 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2020-09-17 17:04:27 +00:00
parent f1d363403f
commit 08a63b467a
5 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -2595,7 +2595,7 @@ if ($function == 'update_fields')
$row=mysqli_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt = "select count(*) from vicidial_users where user='$user' and modify_leads='1';";
$stmt = "select count(*) from vicidial_users where user='$user' and modify_leads IN('1','2','3','4');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
+1 -1
View File
@@ -168,7 +168,7 @@ $auth_message = user_authorization($user,$pass,'',0,0,0,0,'vdc_email_display');
if ($auth_message == 'GOOD')
{$auth=1;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and modify_leads='1';";
$stmt="SELECT count(*) from vicidial_users where user='$user' and modify_leads IN('1','2','3','4');";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
+1 -1
View File
@@ -306,7 +306,7 @@ $auth_message = user_authorization($user,$pass,'',0,$bcrypt,0,$auth_api_flag,'vd
if ($auth_message == 'GOOD')
{$auth=1;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and ( (modify_leads='1') or (qc_enabled='1') );";
$stmt="SELECT count(*) from vicidial_users where user='$user' and ( (modify_leads IN('1','2','3','4')) or (qc_enabled='1') );";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
+6 -6
View File
@@ -5313,7 +5313,7 @@ if ($function == 'update_list')
if ($delete_leads == 'Y')
{
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_lists='1' and delete_lists='1' and modify_leads='1' and user_level >= 8 and active='Y';";
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_lists='1' and delete_lists='1' and modify_leads IN('1','2','3','4') and user_level >= 8 and active='Y';";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$allowed_user=$row[0];
@@ -9459,7 +9459,7 @@ if ($function == 'lead_field_info')
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_leads='1' and user_level > 6 and active='Y';";
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_leads IN('1','2','3','4') and user_level > 6 and active='Y';";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$allowed_user=$row[0];
@@ -9714,7 +9714,7 @@ if ($function == 'lead_status_search')
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_leads='1' and user_level > 6 and active='Y';";
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_leads IN('1','2','3','4') and user_level > 6 and active='Y';";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$allowed_user=$row[0];
@@ -10105,7 +10105,7 @@ if ($function == 'update_log_entry')
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_leads='1' and user_level > 7 and active='Y';";
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_leads IN('1','2','3','4') and user_level > 7 and active='Y';";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$allowed_user=$row[0];
@@ -10255,7 +10255,7 @@ if ($function == 'add_lead')
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_leads='1' and user_level > 7 and active='Y';";
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_leads IN('1','2','3','4') and user_level > 7 and active='Y';";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$modify_leads=$row[0];
@@ -11070,7 +11070,7 @@ if ($function == 'update_lead')
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_leads='1' and user_level > 7 and active='Y';";
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_leads IN('1','2','3','4') and user_level > 7 and active='Y';";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$modify_leads=$row[0];
@@ -1433,7 +1433,7 @@ else
echo "</TABLE><BR><BR>\n";
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level >= 9 and modify_leads='1';";
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level >= 9 and modify_leads IN('1','2','3','4');";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
$rslt=mysql_to_mysqli($stmt, $link);