/* let PHP run just as long as it has to */ ini_set('max_execution_time', '0'); $no_http_headers = true; require dirname(__FILE__) . '/include/global.php'; $event_manager_interval = read_config_option('event_manager_interval'); log_save('Event Manager Starting', SEV_INFO, FACIL_POLLER, '', 0, 0, 0, true); $counter = time() - $event_manager_interval; while (true) { /* We want to have the event manager process every XX seconds, so sleep until its processing time */ while ($counter > time() - $event_manager_interval) { Sleep(1); } /* Start our timer now, so it includes the actual processing time in the processing interval */ $counter = time(); /* Set the status to show which events are being processed */ $status_id = event_save_status(); /* Get all events so we can begin processing */ $events = event_list(array('status' => $status_id)); /* Loop through each event for processing */ foreach ($events as $event) { log_save('Processing Event ' . $event['id'], SEV_INFO, FACIL_POLLER, '', 0, 0, 0, true); event_process($event['id']); } /* Remove all events that were set to be processed */ event_deleted_processed($status_id); if (date('s', time()) < $event_manager_interval) { unset($_SESSION['sess_config_array']['event_manager_interval']); $event_manager_interval = read_config_option('event_manager_interval'); } } log_save('Event Manager exitting', SEV_INFO, FACIL_POLLER, '', 0, 0, 0, true);
function event_select(&$db, &$state) { if (!isset($_GET["selectedOption"])) { return; } $rec = strval($_GET["selectedOption"]); event_list($db, $state); //restore the record list if (!array_key_exists($rec, $state->records)) { throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid event id " . $rec, true); } if ($state->records[$rec][1] != "") { $inactive = new DateTime($state->records[$rec][1]); if ($inactive < $state->inactive_date) { $state->inactive_date = $inactive; } } $state->event_id = $rec; $state->msgStatus = ""; }
function event_list_view($display = 'all', $sens = 'ASC'){ global $langNoEvents; $events = get_list_course_events($display, $sens); if (count($events) > 0) { return event_list($events, $sens); }else{ return "<div class='alert alert-warning text-center'>$langNoEvents</div>"; } }
/** * Output an event list to a page outside of Helios Calendar. * @since 2.0.0 * @version 2.0.0 * @param integer $type list to output, 0 = Billboard Events, 1 = Most Popular Events, 2 = Newest Events (Default:0) * @param integer $eTime [optional] 0 = do NOT include start time, 1 = include event start time in list (Default:0) * @return void */ function int_event_list($type, $eTime) { event_list($type, $eTime); }
function change_event(&$state) { global $_DB; event_list($state); //restore the record list if (!array_key_exists($state->event_id, $state->records)) { throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid eventing id " . $state->event_id, true); } log_list($state, $state->row); //find this row's records $record = reset($state->records); $old_event = $record["event_id"]; if ($state->event_id == $old_event) { return; } foreach ($state->records as $ID => $record) { if ($record["column"] < $state->columns[COL_OPEN]) { continue; } $sql = "UPDATE " . $_DB->prefix . "b10_eventlog\n\t\t\t\tSET event_idref=" . $state->event_id . " WHERE eventlog_id=" . $ID . ";"; $_DB->exec($sql); } }
'level' => 'primary-label'), array('title' => $langiCalExport, 'url' => "icalendar.php", 'icon' => 'fa-calendar', 'level' => 'primary'), )); if (isset($_GET['id'])) { require_once 'modules/agenda/course_calendar.inc.php'; $id = intval($_GET['id']); if (isset($_GET['admin'])) { $personal_event = array('0' => Calendar_Events::get_admin_event($id)); $tool_content .= event_list($personal_event, 'ASC', 'admin'); } else { $personal_event = array('0' => Calendar_Events::get_event($id)); $tool_content .= event_list($personal_event, 'ASC', 'personal'); } } else { /* display events */ $day = (isset($_GET['day'])) ? intval($_GET['day']) : null; $month = (isset($_GET['month'])) ? intval($_GET['month']) : null; $year = (isset($_GET['year'])) ? intval($_GET['year']) : null; $tool_content .= '<div id="calendar_wrapper" class="row"> <div class="col-md-12"> <div class="row calendar-header"> <div class="col-md-12"> <div id="calendar-header"> <div class="pull-right form-inline"> <div class="btn-group"> <button class="btn btn-default btn-sm" data-calendar-nav="prev"><i class="fa fa-caret-left"></i> ' . '' . '</button>
function event_select(&$state, &$HTML, $rec = -1) { if ($rec < 0) { //checking returned if (!isset($_GET["row"])) { return; } $rec = strval($_GET["row"]); } event_list($state); //restore the record list if (!array_key_exists($rec, $state->records)) { throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid event id " . $rec, true); } $record = $state->records[$rec]; if ($record[1] != "") { $inactive = new DateTime($record[1]); if ($inactive < $state->inactive_date) { $state->inactive_date = $inactive; } $record[0] .= "<br>(inactive as of " . $record[1] . ")"; } $state->event_id = $rec; $state->msgStatus = ""; $HTML .= "cell = document.getElementById('EV_0');\n"; $HTML .= "cell.innerHTML = '" . $record[0] . "';\n"; }
<?php event_list(0); ?> </div> <div id="hc_popular" style="display:none;"> <?php event_list(1); ?> </div> <div id="hc_newest" style="display:none;"> <?php event_list(2); ?> </div> <h2>Theme: <?php select_theme(); ?> </h2> <h2> </h2> <?php theme_links(); ?> </aside>
} } else { $content = $fail; } } break; } } $menu = get_menu(); $cardblock = $_SESSION['card_remind'] ? get_cardblock($admin_config) : ''; $arrival_list = arrival_list(); //Unserialize($_SESSION['arrival_remind']) : ''; $siteorder_id = (int) @$siteorder_id; list($curorder_block, $new_order) = get_curord_list($siteorder_id); $attention_list = attention_list(); $event_list = event_list(); if ($attention_win) { if (($p == 'order' || $p == 'pay') && isset($order_id) && isset($attention_win[$order_id]) || $p == 'event' || $p == 'search' && isset($attention)) { unset($attention_win); $attention_win = ''; } if (count($attention_win) <= $settings['attention_count']) { unset($attention_win); $attention_win = ''; } } $innernews = get_innernews(); $title = ''; foreach ($nav as $v) { $s = $title ? " - " : ""; $title .= $s . $v['name'];
function event_list_view($sens = 'ASC') { global $langNoEvents; $events = get_list_course_events($sens); if (count($events) > 0) { return event_list($events, $sens); } else { return "<p class='alert alert-warning text-center'>{$langNoEvents}</p>"; } }