There you have it, I've altered my orriginal calender script, to handle breakfast/Lunch/Dinner instead of time specified actions.
You can get it
from here The main thing in it, theres a
mysql.inc.php file, this contains every mysql connection and settings needed for it to run, in here theres a
authorise() function, this is to allow people to add/edit/delete what ever is supposed to be placed in the meal plan.
Normaly on my domain, this function will check the current user, for what usergroup they are in and what level of admin group their part of, so at some point one may add something, but can't delete/edit, and some might be able to edit their own but can't edit others etc.
In the version for you, I've simplyfied that function, so it only says
yes or
no you will have to alter that to fit your current login handling for the person who is supposed to maintain it.
Else it's just to include the
calender.inc.php file, and call the
print_calender() function, like shown in the
index.php file.
And use the
calender.sql file to create the needed calender mysql table.
Once you start using it, you'll notice theres also a progress bar, showing now many meals every day has been assigned, this can be used to make a fast estimate on what day theres much todo, or that was what I used it for. It can be removed if it is disturbing, it's placed in the
scale_day() function called in line 112 and 114 in the
print_month() function, but during adding of meals it is nice to have someway of knowing which days has been filled, and which still needs the meals assigned.
I know I havn't commentet too much on the orriginal code, but basicaly the functions you want to take a closer look at, is the
print_day() function, which actualy makes all the work, I've simplyfied it abit from my orriginal, since your's only has to display three items per day, not like mine where you would show for every hour, or specific the current hour.
I hope it can be of use, if not theres not much lost in it, as I said it was some simplified way of making a calender thingy, which for a long time hasn't been in use.
I had it done at 5pm yesterday, but due to the fact that the machine I was working on wasn't connected to the net, and no working interfaces between it an one which was connected (floppy/network/usb-stick) I had to wait till today befor posting it.