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


PHP calendar::set_event_status方法代码示例

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


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

示例1: or

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;
                }
            }
        }
        require $GO_THEME->theme_path . 'header.inc';
        require_once $GO_CONFIG->root_path . 'lib/tkdlib.php';
        if ($getevent['end_time'] <= time()) {
            alert($sc_no_ok_in_past);
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:accept.php

示例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.
*/
require "../../Group-Office.php";
require $GO_MODULES->path . "classes/calendar.class.inc";
$cal = new calendar();
require $GO_LANGUAGE->get_language_file('calendar');
require $GO_THEME->theme_path . 'header.inc';
echo '<table border="0" cellpadding="10" cellspacing="0"><tr><td><h1>' . $sc_decline_title . '</h1>';
if ($_REQUEST['task'] == 'submit') {
    if ($_REQUEST['event_id'] > 0 && $_REQUEST['email'] != '') {
        if ($cal->set_event_status($_REQUEST['event_id'], '2', $_REQUEST['email'])) {
            $db = new db();
            $email = $_REQUEST['email'];
            $db->query("SELECT first_name, middle_name, last_name FROM users WHERE email='" . $email . "'");
            if ($db->next_record()) {
                $name = $db->f('last_name') . ' ' . $db->f('middle_name') . ' ' . $db->f('first_name');
            }
            //		$db->query("SELECT u.email, c.name FROM cal_events c INNER JOIN users u ON c.user_id = u.id WHERE c.id = '".$_REQUEST['event_id']."'");
            $db->query("SELECT u.email, u.date_format, u.time_format, u.DST, c.* FROM cal_events c INNER JOIN users u ON c.user_id = u.id WHERE c.id = '" . $_REQUEST['event_id'] . "'");
            if ($db->next_record()) {
                $mail_to = $db->f('email');
                $title = $db->f('name');
                require 'decline_mail.php';
                require_once $GO_CONFIG->root_path . 'lib/tkdlib.php';
                echo send_mail($mail_to, $mail_body, $sc_declined_mail_title, $name, $email);
                echo $sc_decline_confirm;
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:decline.php

示例3: urlencode

                 	      '</a>&nbsp|&nbsp;<a href="'.$GO_CONFIG->full_url.
                 	      'index.php?return_to='.urlencode($GO_MODULES->url.
                 		  'decline.php?event_id='.$event_id.'&member=true&email='.
                 		  $participants[$i]).'" class="blue">'.$sc_decline.'</a></p>';
                 */
                 $user_link = '<p class="cmd"><a href="' . $GO_CONFIG->full_url . 'index.php?return_to=' . urlencode($GO_MODULES->full_url . 'accept.php?event_id=' . $event_id . '&member=true&email=' . $participants[$i]) . '" class="blue">' . $sc_accept . '</a>&nbsp|&nbsp;<a href="' . $GO_CONFIG->full_url . 'index.php?return_to=' . urlencode($GO_MODULES->full_url . 'decline.php?event_id=' . $event_id . '&member=true&email=' . $participants[$i]) . '" class="blue">' . $sc_decline . '</a></p>';
                 if ($GO_SECURITY->user_id != $id) {
                     $mail->Body = $mail_body . $user_link;
                     $mail->ClearAllRecipients();
                     $mail->AddAddress($participants[$i]);
                     if ($mail->Send()) {
                         $cal->add_participant($event_id, addslashes($user_profile["email"]), $id);
                     }
                 } else {
                     $cal->add_participant($event_id, addslashes($user_profile["email"]), $id);
                     $cal->set_event_status($event_id, '1', $user_profile["email"]);
                 }
             }
         }
     }
     if ($_POST['close'] == 'true') {
         header('Location: ' . $return_to);
         exit;
     } else {
         $task = '';
         if (isset($_POST['emptyform']) && $_POST['emptyform'] == 'true') {
             $event_id = 0;
             $feedback .= '<p class="Success">' . sprintf($strSaveOk, $name) . '</p>';
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:event.php

示例4: calendar

require $GO_LANGUAGE->get_language_file('calendar');
require $GO_MODULES->path . 'classes/calendar.class.inc';
$cal = new calendar();
//get the local times
$local_time = get_time();
$year = isset($_REQUEST['year']) ? $_REQUEST['year'] : date("Y", $local_time);
$month = isset($_REQUEST['month']) ? $_REQUEST['month'] : date("m", $local_time);
$day = isset($_REQUEST['day']) ? $_REQUEST['day'] : date("j", $local_time);
$hour = isset($_REQUEST['hour']) ? $_REQUEST['hour'] : date("H", $local_time);
$min = isset($_REQUEST['min']) ? $_REQUEST['min'] : date("i", $local_time);
$task = isset($_POST['task']) ? $_POST['task'] : '';
$return_to = isset($_REQUEST['return_to']) ? $_REQUEST['return_to'] : $_SERVER['HTTP_REFERER'];
$calendar_id = isset($_REQUEST['calendar_id']) ? $_REQUEST['calendar_id'] : 0;
$event_id = isset($_REQUEST['event_id']) ? $_REQUEST['event_id'] : 0;
if (isset($_REQUEST['status'])) {
    $cal->set_event_status($event_id, $_REQUEST['status'], $_SESSION['GO_SESSION']['email']);
}
$event = $cal->get_event($event_id);
/*if ($calendar = $cal->get_calendar($calendar_id))
{
	$calendar['write_permission'] = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $calendar['acl_write']);
}else
{
	exit($strDataError);
}*/
require $GO_THEME->theme_path . 'header.inc';
echo '<form name="event" method="post" action="' . $_SERVER['PHP_SELF'] . '">';
echo '<input type="hidden" name="calendar_id" value="' . $calendar_id . '" />';
echo '<input type="hidden" name="event_id" value="' . $event_id . '" />';
echo '<input type="hidden" name="task" value="" />';
echo '<input type="hidden" name="return_to" value="' . $return_to . '" />';
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:show_event.php


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