C
|
cgphp 1/17/2012 |
Keep a session in the "After successful login" where storing the work location. You need also a table where storing permissions for work locations on restricted records. |
C
|
copper21 author 1/17/2012 |
Cristian, thanks for the guidance. I was able to get this working and will post what I did hopefully to help someone else out... I did not have to make the additional table. |
C
|
cgphp 1/18/2012 |
I was able to set the work location as a session variable in the List Page: Before Process of the master table // Save Work Location as a Session variable $str = "select userid, work_location from events_users where userid = '".$_SESSION["UserID"]."'"; $rs = CustomQuery($str); $data = db_fetch_array($rs); $_SESSION["work_location"] = $data["work_location"];
I then added the following code to List Page: Before SQL query from the master table //Work locations with access to restricted records if ($_SESSION["work_location"]!= '00') if ($_SESSION["work_location"]!= '11') if ($_SESSION["work_location"]!= '12') if ($_SESSION["work_location"]!= '13') if ($_SESSION["work_location"]!= '14') if ($_SESSION["work_location"]!= '16') if ($_SESSION["work_location"]!= '28') if ($_SESSION["work_location"]!= '37') $strWhereClause = whereAdd($strWhereClause, "restricted = '0'"); This shows all events to the people from the listed work_locations and does not show records to people not from the listed work locations.
$locations = array('00','11','12','13','14','16','28','37'); |
C
|
copper21 author 1/18/2012 |
Thanks! |