|
hfg 6/16/2009 |
Create a field in the user table call something like allowedareas |
D
|
d_gan author 6/18/2009 |
Create a field in the user table call something like allowedareas Put the areas that are allowed for that user in this field as if you were using an IN statement but without the (). For user B2 it would look like this: 'B2','B21','B22','B23' where as B11 would be like this: 'B11','B12' And B23 is simply 'B23' Add the following events After successful login (UAA is just my abbreviation for user allowed areas) $_SESSION["UAA"]=@$data["allowedareas"]; On the List Page Before SQL Query put this (where table and field are your table and fields) $strSQL = AddWhere($strSQL,"`Table`.`Field` in (".$_SESSION['UAA'].")"); Note, for an admin to see all you would either have to put all the allowed areas in the allowareas field, or create a separate view for just the admin that only the admins can see. Hope that helps
|
|
hfg 6/18/2009 |
I have not tried this, but you might try a LIKE statement within the Addwhere |
D
|
d_gan author 8/6/2009 |
Create a field in the user table call something like allowedareas Put the areas that are allowed for that user in this field as if you were using an IN statement but without the (). For user B2 it would look like this: 'B2','B21','B22','B23' where as B11 would be like this: 'B11','B12' And B23 is simply 'B23'
<?php
|