php_lib . "/base/common/organization.inc"; require_once $dotorg->php_lib . "/common/format_utils.inc"; require_once $dotorg->php_lib . "/base/workgroup/common/dbclasses/o_workgroup.inc"; require_once $dotorg->php_lib . "/base/workgroup/common/dbclasses/o_document.inc"; require_once $dotorg->php_lib . "/base/workgroup/common/dbclasses/o_calendar_event.inc"; require_once $dotorg->php_lib . "/base/workgroup/common/dbclasses/o_calendar_event_type.inc"; require_once $dotorg->php_lib . "/base/workgroup/common/dbclasses/o_wg_public.inc"; require_once $dotorg->php_lib . "/base/workgroup/common/wg_traversal_tree.inc"; require_once $dotorg->php_lib . "/base/common/help_tree.inc"; ////////////////////////////////////////////////////////////////////// // Ensure user input is clean (base/common/helpers.inc and // validate registered globals (base/common/validate.inc) ////////////////////////////////////////////////////////////////////// $_CLEAN['GET'] = clean($_GET); if (isset($_CLEAN['GET']['wg_abbrev'])) { $wg_abbrev = validateAbbrev($_CLEAN['GET']['wg_abbrev']); } if (isset($_CLEAN['GET']['event_id'])) { $event_id = validateInteger($_CLEAN['GET']['event_id']); } if (isset($_CLEAN['GET']['month'])) { $month = validateInteger($_CLEAN['GET']['month']); } if (isset($_CLEAN['GET']['year'])) { $year = validateInteger($_CLEAN['GET']['year']); } $_CLEAN['POST'] = clean($_POST); if (isset($_CLEAN['POST']['wg_abbrev'])) { $wg_abbrev = validateAbbrev($_CLEAN['POST']['wg_abbrev']); } if (isset($_CLEAN['POST']['event_id'])) { $event_id = validateInteger($_CLEAN['POST']['event_id']); } if (isset($_CLEAN['POST']['month'])) { $month = validateInteger($_CLEAN['POST']['month']); } if (isset($_CLEAN['POST']['year'])) { $year = validateInteger($_CLEAN['POST']['year']); } ////////////////////////////////////////////////////////////////////// // Declare local variables ////////////////////////////////////////////////////////////////////// $action_error = ''; // Public access $person_id = 0; $access_ok = FALSE; ////////////////////////////////////////////////////////////////////// // Declare form variables ////////////////////////////////////////////////////////////////////// if (!isset($wg_abbrev)) { $wg_abbrev = ''; } if (!isset($month)) { $month = ''; } if (!isset($year)) { $year = ''; } ////////////////////////////////////////////////////////////////////// // END OF VARIABLES ////////////////////////////////////////////////////////////////////// // For headers and footers $wg_public = new oWGPublic(); // Create a workgroup and event object here, // it will be used throughout the script $workgroup=new oWorkGroup(); $workgroup_tbl = new oWorkGroupTable(); // If a wg abbreviation has been passed in, find the workgroup if (isset($wg_abbrev) && $wg_abbrev != '') { $found_workgroup = $workgroup_tbl->retrieveObject("abbreviation='$wg_abbrev'", $workgroup); if ($found_workgroup) { $workgroup_id = $workgroup->getValue('id'); $header = $workgroup->getPublicHeader(); $footer = $workgroup->getPublicFooter(); $group_name = $workgroup->getValue('name'); } else { $header = $wg_public->getHeader(); $footer = $wg_public->getFooter(); $group_name = 'Groups'; } } else { $header = $wg_public->getHeader(); $footer = $wg_public->getFooter(); $group_name = 'Groups'; } $header = 'file://'. $_SERVER["DOCUMENT_ROOT"] .'/committees/standard_html_header_nobc'; $footer = 'file://'. $_SERVER["DOCUMENT_ROOT"] .'/committees/standard_html_footer'; $event = new oCalendarEvent(); $event_tbl = new oCalendarEventTable(); // Check to make sure we were passed a valid event_id if (!isset($event_id)) { $action_error = "
Error: No event id specified.
"; } elseif (isset($event_id) && empty($event_id)) { $action_error = "Error: Invalid event id specified.
"; } else { $found = $event_tbl->retrieveObject("id=$event_id", $event); if ($found) { $access_ok = $event->canPersonAccess($person_id); } } // populate the local workgroup if one is defined $workgroup_id = $workgroup->populateFromLocation(); ////////////////////////////////////////////////////////////////////// // Begin Output ////////////////////////////////////////////////////////////////////// // This section includes the standard header $page_title = ""; $query_string = "wg_abbrev=$wg_abbrev"; include_remote_header($header, $page_title, 'workgroup'); $organization_traversal->display(); $organization_help->display(); if (!empty($page_title)) { print "Sorry, you do not have permission to access this event.
"; include_remote_footer($footer, 'workgroup'); exit; } if ($found && $access_ok) { $event->printHTMLDetails(FALSE, TRUE, '', FALSE, FALSE, FALSE, TRUE); } if (!$found) { $event->printNotFoundMessage(); } // This section includes the standard footer include_remote_footer($footer, 'workgroup');