Chapter 10: Intranet Calendar Manager 337 Table 10-1 (Web site counters)
Chapter 10: Intranet Calendar Manager 337 Table 10-1 provides the details of the database tables. TABLE 10-1 CALENDAR DATABASE TABLES Table Description CALENDAR_EVENT This table is the integral part of this database. It holds the event number (EVENT_ID), user ID (USER_ID), event title (EVENT_TITLE), event date (EVENT_DATE), event description (EVENT_DESC), reminder ID (REMINDER_ID), and a check flag (FLAG). The event number (EVENT_ID) is automatically generated by the database. CALENDAR_EVENT_VIEWER Holds the calendar event viewer information. The calendar event viewer consists of the EVENT_ID and VIEWER_ID. CALENDAR_REPETITIVE_EVENTS Holds the calendar repetitive event information. The calendar repetitive event consists of EVENT_ID and repeat mode (REPEAT_MODE). The ch10/sql/calendar.sql file in the CDROM contains all the table creation statements for the CALENDAR database. You can create this CALENDAR database in your MySQL server by running the following commands. mysqladmin -u root -p create CALENDAR mysql -u root -p -D CALENDAR < calendar.sql Make sure you change the user name (root) to whatever is appropriate for your system. With the intranet calendar manager database established, it s time to look at the PHP classes that are needed to implement the applications. The Intranet Calendar Application Event Class We need only one new object, the Event object, to implement the intranet calendar manager, as you can see in Figure 10-2, which shows the system diagram. The Message object was discussed in Chapter 7.