'----------------------------------------------------------------------------------------------
'- WEB Calendar Application - Version 3.3 - 25 April 2006
'----------------------------------------------------------------------------------------------

Database driven daily event web or intranet calendar with event add, edit and delete.

Add a dynamic events calendar to your website or intranet, manage and display daily, weekly or montly events. Simply click into specific days and navigate montly or yearly forwards and backwards. An Access or MSSQL database is used as backend. Can either be password protected, or allow anyone to add/edit events. Multilanguage with autoselection. Easily configurable. Upcoming events display, yearly recursive events, like birthdays or national holidays edited once. Event email reminder. External configurable WYSIWYG event editor. Selectable event category filter. Montly or yearly calendar layout.


LICENSE:

You can read the complete License agreement here
You can ask for more info at: - http://www.livio.net/


INSTALLATION:

-- extract and save in the root of your site with full path info
-- open the file "/calendar/_calendar.asp" and edit the database path configuration details
-- run the file "CalendarTest.asp"

The zip file contains a fully functional example with an empty database.

NOTE: the database path should have write permission on server to be able to add, edit and delete records and manage online configuration. Move the database to your Web Server database directory, if any, and change the configuration variable dbRemotePath accordingly.

NOTE: starting from version 3.1 the database is NOT down compatible with previous versions.
The following modifications have been made to the database in version 3.1:
  • The "Event_Category" field has been added to the table "tblEvents".
  • Starting from version 3.0 the table "tblConfig" has been added to the database, it is changed in version 3.1.
  • Starting from version 3.1 the table "tblCategory" has been added to the database.
    The following modifications have been made to the database in version 3.3:
  • The "sSort_Dir" and " bEvent_Repeat" fields has been added to the table "tblConfig".


    CONFIGURATION tips:

    -- open the file "/calendar/_calendar.asp" and edit the following configuration details:

    sCalendarEventsPage = ""
    '--- Your Calendar Events ASP page name (refered to the ROOT dir)
       (Leave blank to show events in the same page of the Calendar)

    sScriptDir ="/calendar/"             '--- The calendar files path refered to the root path

    sExtEditorDir ="/fckeditor/"       '--- The path containing the external WYSIWYG editor files, refered to the root path

    ' dbType = "MSSQL"
    dBType = "Access"
    '--- The database type, either "Access" or "MSSQL" (comment out one line with an apex at the line beginning)

    '-------- MS Access configuration

    dbCalendar = "calendar33.mdb"      '--- The calendar MS Access database name

    dbCalRemotePath = "C:\inetpub\wwwroot\yourdomain\calendar\database\" 
    '--- The physical database path on Server (this dir MUST have write permissions)
       ( If the database path is under the root dir could be alternatively defined:
        dbRemotePath = Server.MapPath("/calendar/database") & "/" )

    dBCalLocalPath = "C:\inetpub\wwwroot\calendar\database\"  
    '--- The local physical database path (OPTIONAL, for local PWS debugging purpose only)
       ( dBLocalPath = Server.MapPath("/calendar/database") & "/" )

    '-------- MSSQL configuration

    sMSSQLServerName = "MASTERSERVER" 'Holds the name of the SQL Server
    sMSSQLUserName = "YOURUSERNAME" 'Holds the user name (for SQL Server Authentication)
    sMSSQLPassword = "YOURPASSWORD" 'Holds the password (for SQL Server Authentication)
    sMSSQLDBName = "calendar33" '-- The MSSQL database name


    Add your language traslation (if not already available), the language ID in uppercase and your country Locale ID (LCID) number. For a complete list of language IDs and corresponding LCID numbers visit: http://www.livio.net/main/charset.asp

    As alternative you can show the calendar events in a pop-up window, if the case then set the configuration variable bCalendarPopUp = True.

    To get access to the configuration form first run the Calendar Login , enter your username and password, then click the Configuration Manager icon and edit the configuration items to suit your preferences. To allow event administration the Event Manager replaces the Upcoming events window with an "All events window" including events not active or already passed. The administrator is then able to manage all recorded events. The new icon opens the event category management and configuration.

    NOTE: For security reasons dont forget to change the default Administrator Login
    USERNAME = admin and PASSWORD = pass

    NOTE: to be sure the Email Event Reminder feature works correctly it needs that the web calendar page get at least one hit during the intEmailDays period, I suggest to include the web calendar in pages that are often visited and, if your site has low traffic, set a long intEmailDays period.

    WYSIWYG Editor: as option you can include an external WYSIWYG editor, in this example the Calendar can host FCKeditor. Follow steps below to install it:
  • Carefully read here the "Closed Distribution License" agreement from FCKeditor web site if you intend to use it in your own or in a commercial application.
  • Download it directly from the http://www.fckeditor.net/ web site.
  • Unzip in your root maintaining the original folder names and directory structure.
  • Follow FCKeditor instructions for installation, configuration and customization.
  • For any question or problem about FCKeditor REFER TO THE AUTHOR and the original instructions and help available on the author web site. I dont feed any support for it.
  • Enable the WYSIWYG Editor in the Calendar Configuration.

    The Web Calendar is already arranged and configured to recognize FCKeditor installation and automatically replace the TEXTAREA in the events details form. If no external editor is found then the Calendar events will be edited as normal text.

    If you prefer, many other available favorite external WYSIWYG editors able to replace TEXTAREA can be used instead of FCKeditor, if the case follow original instructions and, in the files "_calendar.asp" and "include/_events33.asp", modify the "External WYSIWYG Editor management" script lines accordingly.


    How to include the Web Calendar 3.3 into your .ASP pages:

    copy the following include line near the top of your .ASP page or pages where you want to show the calendar and/or events:

    <!-- #include virtual = "/calendar/_calendar.asp" -->
    (should be included near the top of the page)

    Then place the following calls everywhere you want in your ASP page

    <% Call TheCalendar() %>   (Displays the Montly Calendar box)

    <% Call YearlyEvents() %>   (Displays the Yearly events box)

    <% Call FilterEvents() %>   (Displays the Category filter list box)

    <% Call NextEvents() %>   (Displays the Upcoming events box)

    <% Call Events() %>   (Displays selected events)

    If you prefer to display the calendar for a whole year instead of one month a time then use the calls below, in this case the YearlyEvents box and the FilterEvents box are no longer needed since they are already included in the calendar box.

    <% Call TheYearlyCalendar() %>   (Displays the Yearly Calendar box)

    <% Call NextEvents() %>   (Displays the Upcoming events box)

    <% Call Events() %>   (Displays selected events)

    An example on how to include the calendar into your pages can be found in the "CalendarTest.asp" and "CalendarTest1.asp" example pages respectively.


    REVISION HISTORY:

    V 3.3:
    --- added configurable support for MS Access or MSSQL database types
    --- added configurable selection to list long range events day by day or only once
    --- added configurable selection to sort events by date either ascending or descending
    --- added Slovenian language translation, thanks to Jože Koleric
    --- added evidence in the code to configure new fields added to the event database table
    --- grouped daily, weekly and montly event list in a single Sub
    --- improved different date format by country locale ID selection routines
    --- only the event selected by the upcoming event list is shown instead of all events of the day
    --- fixed bug "no event added when 'anyone can add event' is enabled"
    --- fixed bug "added event always requires administrator approval when not logged in"
    --- fixed bug "no event shown in the pop-up window when a different category is selected"
    --- fixed bug "long range events starting in the past not listed in the upcoming event box"
    --- fixed bug "email reminder enabled events starting one year later are emailed immediately"
    --- ( the table 'tblConfig' is changed in the database )


    V 3.1:
    --- added an alternative calendar panel to put into evidence events for the whole year
    --- added event categories and management
    --- added event categories selection and event filter by category
    --- added configurable selection to allow anyone to add event
    --- added configurable selection to allow administrator approval for added event
    --- added selectable calendar window layout to best fit small navigation columns
    --- added configurable Pop-up windows width and height
    --- modified the script for easier inclusion into your pages
    --- improved event emailer routine thanks to Kelvin Aston
    --- improved yearly events box with total year events counter
    --- modified date display in the upcoming events box with event date range
    --- fixed wrong previous month end day numbers
    --- small bugs fixed
    --- added Turkish language translation, thanks to Okan Soylu
    --- added Dutch language translation, thanks to Pieter Vermeer
    --- ( the database is NOT down compatible with previous revisions )


    V 3.0:
    --- added the configuration manager with easy form handling and a database backend
    --- added montly events view
    --- added the option to include an external WYSIWYG event HTML editor
         (www.FCKeditor.net)
    --- added configurable column for montly week numbers
    --- added Turkish day and month names handling
    --- added hover link properties to CSS
    --- added configurable colors for event window
    --- added event delete and editor name form input configuration controls
    --- added many comments in the code for easier customization
    --- improved weekly events view
    --- fixed the "email function not working" bug
    --- fixed form re-submit bug when a required field is blank
    --- fixed wrong display of passed recursive events

    V 2.6:
    --- added the Calendar yearly window
    --- added auto selection for the first day of week (sunday/monday)
    --- added auto selection for the date format (MM/DD/YYYY, DD/MM/YYYY)
    --- added configurable HTML strip from input form
    --- fixed calendar format problem with latin America languages
    --- danish language translation, thanks to Kim Andersen
    --- small layout changes
    --- ( the database is down compatible with the rev. 2.5)

    V 2.5a:
    --- added the capability to hide/show the Calendar
    --- now events pop-up window works also in the upcoming event list
    --- HTML Tags stripped out from form input

    V 2.5:
    -- highly adaptable calendar layout, now you can include the calendar and upcoming
        events into your pages and link to your own events page by clicking into a specific day
    -- added configurable email event reminder
    -- added auto hyper link for http, https, ftp, and email addresses in the event header and
        description (requires vbScript 5.0 or higher installed on server)
    -- added daily and weekly events views with toggle checkbox
    -- fixed 80040E57 error when saving an event detail string longer than 255 characters
    -- fixed 800a0009 Subscript out of range error when all events are deleted from database
    -- fixed "unmanaged long range events that start and end in different months" bug
    -- changed "Pick a date" pop-up script
    -- improved presentation and minor bugs fixed

    V 2.2:
    -- added the capability to edit only once the yearly recursive events, like birthdays or
        national holidays
    -- added password protection for admin add, edit and delete events (configurable)
    -- added event manager window
    -- added the capability to activate/deactivate events without delete them
    -- added toggle hide/show for upcoming events window
    -- added help and info windows
    -- fixed wrong LCID date format, MM/DD/YYYY-DD/MM/YYYY for non US english language
        countries
    -- some minor layout changes and bugs fixed

    V 2.1:
    -- added the capability tho show configurable upcoming events

    V 2.0: First release



    That's it! Easy, enjoy!