I think this calendar is exactly what I've spent dozens of hours searching for. You're right, everything else out there is too simple or too complex. This one's just right. But I'm having a problem getting it to run. I've properly changed the settings in db_connect.inc.php and uploaded all the files to the server. The table was successfully created in my database using db_table_create.php (checked it using phpMyAdmin).
When I run index.php in Firefox, I get the following error:
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home2/dewhicke/public_html/bayviewnetwork/availability/functions.inc.php on line 69
This is the code in functions.inc.php that seem to be causing the trouble, beginning on line 69:
68. // check if day is available
69. if(array_key_exists($this_date,$booked_days)){
70. //echo "<br>".$booked_days[$this_date];
71. if($booked_days[$this_date]=="am") $day_image='cal_am_'.$day_counter.'.png';
72. elseif($booked_days[$this_date]=="pm") $day_image='cal_pm_'.$day_counter.'.png';
73. else $day_image='cal_on_'.$day_counter.'.png';
74. }
This message displays over and over and over again -- something like 300 times.
Then. at the bottom of this repeating error, the Availability Calendar finally appears. It looks great, but when I select a date, I get another error:
ERROR INSERTING. INSERT INTO bookings_cal SET id_item='2', the_date='2009-08-07', state=''
I'm hoping somebody can tell me what's going on here.
I would really like to be able to use this terrific calendar.
Thanks