Fixed issue with SQL for permissions check

git-svn-id: svn://192.168.202.10@2319 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2015-05-13 02:50:35 +00:00
parent 001594e346
commit 575f6e9b75
72 changed files with 143 additions and 142 deletions
@@ -117,13 +117,13 @@ if ($auth_message == 'GOOD')
if ($auth > 0)
{
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7 and view_reports > 0;";
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7 and view_reports='1';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$admin_auth=$row[0];
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports > 0;";
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports='1';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);