gproulx
Posts: 68
|
| Posted: 10/14/2008, 11:31 AM |
|
Hi,
i have created a calendar with events from the exemple pack. I have a login page where the user enter his login and password. Each user are in a special group (ex.: user, admin, technician, etc.) When a user logged in and go to see the calendar, I want to display only events depending on the group he's in.
I have the employees table who have emp_login, emp_password, emp_name, group_id, etc.
And i have the user_events table who have user_event_title, user_event_date, user_event_group, etc.
I work with CCS 4.1.00.027.
Hope im clear 
Thanks
|
 |
 |
quasimidi
Posts: 151
|
| Posted: 10/14/2008, 12:03 PM |
|
Hi,
I would specify the main calendar WHERE statment in the BeforeBuildSelect (see calendar Property page).
For example.
$group_id = CCGetGroupID(); //Retrives the group id for the current user logged in.
sql = "SELECT * FROM event WHERE event.group_id = $group id";
Hope this helps.
All the best for you,
_________________
RS |
 |
 |
|