本文整理汇总了PHP中calendar::get_next_recurrence_time方法的典型用法代码示例。如果您正苦于以下问题:PHP calendar::get_next_recurrence_time方法的具体用法?PHP calendar::get_next_recurrence_time怎么用?PHP calendar::get_next_recurrence_time使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calendar
的用法示例。
在下文中一共展示了calendar::get_next_recurrence_time方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
while ($cal->next_record()) {
if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $cal->f('acl_write'))) {
if (in_array($cal->f('id'), $_POST['calendars'])) {
if (!$cal2->event_is_subscribed($event_id, $cal->f('id'))) {
$cal2->subscribe_event($event_id, $cal->f('id'));
}
} else {
if ($cal2->event_is_subscribed($event_id, $cal->f('id'))) {
$cal2->unsubscribe_event($event_id, $cal->f('id'));
}
}
}
}
//set the reminder
if ($_POST['reminder'] > 0) {
$next_recurrence_time = $cal->get_next_recurrence_time($event_id);
$remind_time = $next_recurrence_time - $_POST['reminder'];
$cal->insert_reminder($GO_SECURITY->user_id, $event_id, $remind_time);
}
if (trim($_POST['to']) != '' && $send_invitation) {
//remove participants and add them if invitation is sent succesfully
$cal->remove_participants($event_id);
$send_invitation = false;
//send an invitation mail to all participants
$participants = cut_address($_POST['to'], $charset);
$mail_body = '<html><body>' . $sc_invited . '<br /><br />';
$mail_body .= '<table border="0"><tr><td>' . $sc_title . ':</td><td>' . $name . '</td></tr>';
if ($_POST['contact_id'] > 0) {
$mail_body .= '<tr><td>' . $sc_client . ':</td>';
$mail_body .= '<td>' . show_contact($_POST['contact_id']) . '</td></tr>';
}
示例2: calendar
$GO_MODULES->authenticate('calendar');
require $GO_LANGUAGE->get_language_file('calendar');
require_once $GO_MODULES->path . 'classes/calendar.class.inc';
require_once $GO_MODULES->path . 'classes/todos.class.inc';
$cal = new calendar();
$todos = new todos();
$page_title = $sc_reminder;
require $GO_THEME->theme_path . "header.inc";
echo '<embed src="' . $GO_THEME->sounds['reminder'] . '" hidden="true" autostart="true"><noembed><bgsound src="' . $GO_THEME->sounds['reminder'] . '"></noembed>';
if ($event_count = $cal->get_events_to_remind($GO_SECURITY->user_id)) {
echo '<h2>' . $sc_events . '</h2>';
echo '<table border="0" cellspacing="0" cellpadding="0" width="450">' . '<tr height="20"><td class="TableHead2">' . $strName . '</td>' . '<td class="TableHead2">' . $strDate . '</td></tr>';
$cal2 = new calendar();
while ($cal->next_record()) {
$event = $cal2->get_event($cal->f('event_id'));
$next_recurrence_time = $cal2->get_next_recurrence_time(0, 0, $event);
echo '<tr><td><a class="normal" href="javascript:goto_event(\'' . $cal->f('event_id') . '\')">' . $event['name'] . '</a></td>';
if ($event['all_day_event']) {
$date_format = $_SESSION['GO_SESSION']['date_format'];
$timezone_offset = 0;
} else {
$date_format = $_SESSION['GO_SESSION']['date_format'] . ' ' . $_SESSION['GO_SESSION']['time_format'];
$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']);
}