+require('../../include/init.php');
+
+/* date_intl() */
+include_once(SM_PATH . 'functions/date.php');
+
+/* Calendar plugin required files. */
+include_once(SM_PATH . 'plugins/calendar/calendar_data.php');
+include_once(SM_PATH . 'plugins/calendar/functions.php');
+
+/* get globals */
+if (! sqGetGlobalVar('year',$year,SQ_FORM) || ! is_numeric($year)) {
+ unset($year);
+}
+if (! sqGetGlobalVar('month',$month,SQ_FORM) || ! is_numeric($month)) {
+ unset($month);
+}
+if (! sqGetGlobalVar('day',$day,SQ_FORM) || ! is_numeric($day)) {
+ unset($day);
+}
+if (! sqGetGlobalVar('hour',$hour,SQ_FORM) || ! is_numeric($hour)) {
+ unset($hour);
+}
+if (! sqGetGlobalVar('event_hour',$event_hour,SQ_POST) || ! is_numeric($event_hour)) {
+ unset($event_hour);
+}
+if (! sqGetGlobalVar('event_minute',$event_minute,SQ_POST) || ! is_numeric($event_minute)) {
+ unset($event_minute);
+}
+if (! sqGetGlobalVar('event_length',$event_length,SQ_POST) || ! is_numeric($event_length)) {
+ unset($event_length);
+}
+if (! sqGetGlobalVar('event_priority',$event_priority,SQ_POST) || ! is_numeric($event_priority)) {
+ unset($event_priority);
+}