|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Events based on login
I was just curious if anyone knows how I could setup the calendar to show only certain events based on the users login. I would like to have a the admin login be able to see all and then each user be able to see only events that are specific to them. I would think that this could be achieved easily by setting up a category for each user and make some sort of condition to show only those events based on the users login. If I am headed in the right direction please let me know. I am still new to php coding but I have done some tinkering with other languages. Any help or information is greatly appreciated.
|
|
#2
|
|||
|
|||
|
RE: Events based on login
I assume you are using MySQL database, why not just label one column 'Calendar_Event' and the second column 'User_Name'. When the user is logged in as 'Bill' or 'Henry' simply send an SQL statement to retrieve all Calendar_Events with User_Name='Bill' or User_Name='Henry'. Otherwise if you are lagged in as administrator then send an SQL statement to retrieve all (designated by '*') calendar entries.
What I wrote above assumes you have a fair amount of knowledge about MySQL and SQL queries in general and creating HTML forms and posting the values to your server. I trust you will use MD5 hashes for your passwords and usernames, also since this information will be sent to your server unencrypted I would hope you use an SSL to send the data, usually achieved by prefacing your webpage with https://yoursite.com - it will depend on how your hosting provider has set up their SSL certificates. |
|
#3
|
|||
|
|||
|
RE: Events based on login
Actually I've been thinking about this for the next release!
1) Add a column to the Event Table named "owner". 2) Change the "day_event" column to "status" column. Then make it a bitmap with bit 0 = "day_event" so existing calendars don't take a lot of upgrade work, and bit 1 = "private". When an event is added, the "owner" is set to the current user (if "edit" privs) or any user (if admin priv), and the option of making an event "private" to the owner or "public" so everyone can see it is set too. On the display side, everyone sees "public" events, owners see their "private" events, admins see "all" events (maybe by a toggle?). Then in the day & event display, add who "owns" the event. Since there is not any referential integrity in the db, maybe the db tool needs to look for "orphan" events where the owner no longer exists. Or, maybe we finally add it. I'm thinking sometime this winter I'll be starting..... However, if you want to try to code it, I'll offer guidence & testing services for you! |
|
#4
|
|||
|
|||
|
RE: Events based on login
Unfortunately I have a full time job and my own online store to take care of. I've got time to help others out of simple jams like connecting to their databases, IF/ELSE statements and the like. You obviously know what you are doing, just short on time like everyone else ;-)
|
|
#5
|
|||
|
|||
|
RE: Events based on login
Actually, I was suggesting the anonymous user do the work since he is looking for the feature...
|
|
#6
|
|||
|
|||
|
RE: Events based on login
Thanks for the replies. I may try to tackle this soon. One other question, will future versions include anyway to export or synch with Outlook or a PDA?
|
|
#7
|
|||
|
|||
|
RE: Events based on login
GO to www.zend.com and click on "PHP 5 - Future of PHP" to see what is coming. Perhaps you can drop them a line and let them know you think these are important features to add.
|
|
#8
|
|||
|
|||
|
RE: Events based on login
None that I know of.
I guess we could export a .csv file that you could import into either of those. I don't know about writing a full blown Palm conduit though. |
|
#9
|
|||
|
|||
|
RE: Events based on login
Just curious. I have seen some calendar scripts recently while looking that would allow you to export and import to vCal or iCal files.
|
![]() |
| Viewing: Codewalkers Forums > Projects > ltwCalendar > Events based on login |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|