$tids = array(83395, 83396, 83397, 83398, 83399);
function create_things_didnt_miss_page($tids) {
$nodes = array();
foreach ($tids as $tid) {
$sql = "SELECT nid FROM term_node WHERE tid = $tid";
$search = db_query($sql);
while ($result = db_fetch_object($search)) {
$nodes[] = $result->nid;
}
}
$nodes = implode(',', $nodes);
$sql = "SELECT nid FROM node WHERE nid IN ({$nodes}) AND status = 1 ORDER BY created DESC";
$search = db_query($sql);
$publ_nodes = array();
while ($result = db_fetch_object($search)) {
$publ_nodes[] = $result->nid;
}

$ongoing_events = array();
$count = 0;
$i = 0;
while ($node = node_load($publ_nodes[$i])) {
if (strtotime($node->field_pulp_event_start[0]['value2']) >= time()) {
$ongoing_events[] = $node;
$count++;
}
$i++;
}

foreach ($ongoing_events as $event) {
echo '

' . $event->title . '

';
$start = date('M d', strtotime($event->field_pulp_event_start[0]['value']));
$end = date('M d', strtotime($event->field_pulp_event_start[0]['value2']));
echo '

';
}
}

create_things_didnt_miss_page($tids);
?>