本文整理汇总了PHP中calendar::get_event方法的典型用法代码示例。如果您正苦于以下问题:PHP calendar::get_event方法的具体用法?PHP calendar::get_event怎么用?PHP calendar::get_event使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calendar
的用法示例。
在下文中一共展示了calendar::get_event方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
break;
case -1:
$mon = isset($_POST['repeat_days_2']) ? '1' : '0';
$tue = isset($_POST['repeat_days_3']) ? '1' : '0';
$wed = isset($_POST['repeat_days_4']) ? '1' : '0';
$thu = isset($_POST['repeat_days_5']) ? '1' : '0';
$fri = isset($_POST['repeat_days_6']) ? '1' : '0';
$sat = isset($_POST['repeat_days_0']) ? '1' : '0';
$sun = isset($_POST['repeat_days_1']) ? '1' : '0';
break;
}
if ($event_id > 0) {
if (!$cal->update_event($event_id, $start_time, $end_time, $all_day_event, $name, smart_addslashes($_POST['description']), $_POST['contact_id'], $_POST['reminder'], smart_addslashes($_POST['location']), $_POST['background'], $_POST['repeat_type'], $repeat_end_time, $month_time, $repeat_forever, $repeat_every, $mon, $tue, $wed, $thu, $fri, $sat, $sun)) {
$feedback .= '<p class="Error">' . $strSaveError . '</p>';
} else {
if ($event = $cal->get_event($event_id)) {
switch ($_POST['permissions']) {
case 'everybody_read':
$GO_SECURITY->delete_group_from_acl($GO_CONFIG->group_everyone, $event['acl_write']);
if (!$GO_SECURITY->group_in_acl($GO_CONFIG->group_everyone, $event['acl_read'])) {
$GO_SECURITY->add_group_to_acl($GO_CONFIG->group_everyone, $event['acl_read']);
}
break;
case 'everybody_write':
$GO_SECURITY->delete_group_from_acl($GO_CONFIG->group_everyone, $event['acl_read']);
if (!$GO_SECURITY->group_in_acl($GO_CONFIG->group_everyone, $event['acl_write'])) {
$GO_SECURITY->add_group_to_acl($GO_CONFIG->group_everyone, $event['acl_write']);
}
break;
case 'private':
$GO_SECURITY->delete_group_from_acl($GO_CONFIG->group_everyone, $event['acl_write']);
示例2: or
Version: 1.0 Release date: 08 July 2003
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
*/
//date('Ymd', time())
require "../../Group-Office.php";
if ($calendar_module = $GO_MODULES->get_module('calendar')) {
require $calendar_module['path'] . "classes/calendar.class.inc";
}
$cal = new calendar();
require $GO_LANGUAGE->get_language_file('calendar');
//echo '1=='.$_REQUEST['event_id'];
$getevent = $cal->get_event($_REQUEST['event_id']);
//echo '2=='.$getevent['end_time'].'-->'.time();
if ($_SERVER['REQUEST_METHOD'] == "POST") {
if (isset($_POST['calendars'])) {
$cal->set_event_status($_REQUEST['event_id'], '1', $_POST['email']);
while ($calendar_id = array_shift($_POST['calendars'])) {
if (!$cal->event_is_subscribed($_POST['event_id'], $calendar_id)) {
if ($cal->subscribe_event($_POST['event_id'], $calendar_id)) {
if (!$cal->set_event_status($_POST['event_id'], '1', $_POST['email'])) {
$error = true;
}
} else {
$error = true;
}
}
}
示例3: calendar
$GO_SECURITY->authenticate();
$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']);