当前位置: 首页>>代码示例>>PHP>>正文


PHP calendar::get_events_to_remind方法代码示例

本文整理汇总了PHP中calendar::get_events_to_remind方法的典型用法代码示例。如果您正苦于以下问题:PHP calendar::get_events_to_remind方法的具体用法?PHP calendar::get_events_to_remind怎么用?PHP calendar::get_events_to_remind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在calendar的用法示例。


在下文中一共展示了calendar::get_events_to_remind方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: calendar

}
</script>
<title><?php 
echo $GO_CONFIG->title;
?>
</title>
<?php 
echo '<meta http-equiv="refresh" content="' . $GO_CONFIG->refresh_rate . ';url=' . $_SERVER['PHP_SELF'] . '">';
//if user uses the calendar then check for events to remind
$calendar_module = $GO_MODULES->get_module('calendar');
if ($calendar_module && ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $calendar_module['acl_read']) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $calendar_module['acl_write']))) {
    require_once $calendar_module['class_path'] . 'calendar.class.inc';
    require_once $calendar_module['class_path'] . 'todos.class.inc';
    $cal = new calendar();
    $todos = new todos();
    $remind_events = $cal->get_events_to_remind($GO_SECURITY->user_id);
    $remind_todos = $todos->get_todos_to_remind($GO_SECURITY->user_id);
    if ($remind_events || $remind_todos) {
        echo '<script language="javascript" type="text/javascript">popup("' . $calendar_module['url'] . 'reminder.php", "500", "200", "reminder");</script>';
    }
    unset($cal);
}
$_SESSION['notified_new_mail'] = isset($_SESSION['notified_new_mail']) ? $_SESSION['notified_new_mail'] : 0;
$_SESSION['new_mail'] = 0;
//check for email
$email_module = $GO_MODULES->get_module('email');
if ($email_module && ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $email_module['acl_read']) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $email_module['acl_write']))) {
    require_once $email_module['class_path'] . 'email.class.inc';
    require_once $GO_CONFIG->class_path . 'imap.class.inc';
    $imap = new imap();
    $email1 = new email();
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:checker.php

示例2: or

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.
*/
require "../../Group-Office.php";
$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>';
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:reminder.php


注:本文中的calendar::get_events_to_remind方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。