$timezone_offset = $_SESSION['GO_SESSION']['timezone'] * 3600;
        }
        echo '<td>' . date($date_format, $next_recurrence_time + $timezone_offset) . '</td></tr>';
        $update_reminder = $cal2->get_next_recurrence_time(0, $next_recurrence_time, $event);
        if ($update_reminder > $next_recurrence_time) {
            $cal2->update_reminder($GO_SECURITY->user_id, $event['id'], $update_reminder);
        } else {
            $cal2->delete_reminder($GO_SECURITY->user_id, $event['id']);
        }
    }
}
if ($todo_count = $todos->get_todos_to_remind($GO_SECURITY->user_id)) {
    $todos2 = new todos();
    echo '<h2>' . $cal_todos . '</h2>';
    echo '<table border="0" cellspacing="0" cellpadding="0" width="450">' . '<tr height="20"><td class="TableHead2">' . $strName . '</td>' . '<td class="TableHead2">' . $sc_start_at . '</td>' . '<td class="TableHead2">' . $cal_due_at . '</td></tr>';
    while ($todos->next_record()) {
        $todos2->set_reminded($todos->f('id'));
        echo '<tr><td><a class="normal" href="javascript:goto_todo(\'' . $todos->f('id') . '\')">' . $todos->f('name') . '</a></td>' . '<td>' . date($_SESSION['GO_SESSION']['date_format'] . ' ' . $_SESSION['GO_SESSION']['time_format'], $todos->f('start_time')) . '</td>' . '<td>' . date($_SESSION['GO_SESSION']['date_format'] . ' ' . $_SESSION['GO_SESSION']['time_format'], $todos->f('due_time')) . '</td></tr>';
    }
}
echo '</table><br />';
$button = new button($cmdClose, "javascript:window.close()");
?>
<script type="text/javascript">
function goto_event(event_id)
{
	opener.parent.main.document.location=
		'<?php 
echo $GO_MODULES->url;
?>
event.php?event_id='+event_id+'&return_to='+escape(opener.parent.main.location);