This topic is locked
[SOLVED]

 how to filter the costom views with session = operator_i

10/13/2011 3:18:44 AM
PHPRunner General questions
M
mumtaz author

how to filter the costom views with session = operator_id?

I've made $ _SESSION ["operator_id"] = $ data ['operator_id "];

In after_successfull_login on global events.
And in the Process List Page Before I've made:

$ rstmp = CustomQuery ("select operator_id from trans_qurban_z where operatorid ='".$ SESSION [" operator_id "]."'");

$ datatmp = db_fetch_array ($ rstmp);

$ _SESSION ["Operator_id"] = $ datatmp ["operator_id"];
But when a user who has operator_id = xx can still see all the data, not just data that has the same operator_id.
What should I do that the user could see only the data corresponding to operator_id that he has

C
cgphp 10/13/2011

In the "Before SQL query" event of the List page, enter this code:

$strWhereClause = whereAdd($strWhereClause, "operator_id=".$ _SESSION ["operator_id"]);
M
mumtaz author 10/13/2011



In the "Before SQL query" event of the List page, enter this code:

$strWhereClause = whereAdd($strWhereClause, "operator_id=".$ _SESSION ["operator_id"]);



Ok, Thx Cristian. Its running well