liquid79 Posted November 21, 2007 Share Posted November 21, 2007 Hi this is hard to explain but i will try and make it clear as possible. I have made a calendar, which displays weeks that are booked/available and provisional and depending if they are booked etc It will display those dates in a colors such as for booked: red, Green for available and grey for provisional. The weeks run from Sat to Sat. The problem: The last day of the week booked, which will always be the Saturday needs to show bg picture of a split of 2 colors, the pic it shows depends on what the weeks in front state is, for an example. Week 1 is available, which is green and week 2 is booked which is red so the last Saturday of week 1 will need to be split green/red. This could always change so one week could be red and the next green so it would need to show the pic of split red/green or if it was provisional it would be grey/green. My code i have at the moment is below but im not sure how i say if week before = show this Any help or hints will be great! $dec1 = $row->s_1st_8th; // if the result is A the color of that week will be the one shown below etc in my calender when i call booked in the tr. switch ($dec1) { case 'A': $booked = 'bgcolor="#0A8F5E"'; break; case 'B': $booked = 'bgcolor="#FF0000"'; break; case 'P': $booked = 'bgcolor="#999999"'; break; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.