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


PHP calendar::get_default_calendar方法代码示例

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


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

示例1: 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";
$GO_SECURITY->authenticate();
$GO_MODULES->authenticate('calendar');
require $GO_LANGUAGE->get_language_file('calendar');
require $GO_MODULES->path . 'classes/calendar.class.inc';
$cal = new calendar();
$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'] : $cal->get_default_calendar($GO_SECURITY->user_id);
$event_id = isset($_REQUEST['event_id']) ? $_REQUEST['event_id'] : 0;
$calendar = $cal->get_calendar($calendar_id);
$event = $cal->get_event($_REQUEST['event_id']);
if ($calendar) {
    $calendar['write_permission'] = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $calendar['acl_write']);
}
if ($event) {
    $event['write_permission'] = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $event['acl_write']);
} else {
    exit($strDataError);
}
switch ($task) {
    case 'delete':
        if ($event['write_permission']) {
            $cal->delete_event($event_id);
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:delete_event.php

示例2: run_on_start

<?php

require_once 'class/class.local_calendar.php';
$calendar = new calendar();
$default_calendar = $calendar->get_default_calendar();
?>
<script>
function run_on_start(){
    $('#mycal').fullCalendar({
        events: 'calendar.json.php?calendar=<?php 
echo $default_calendar;
?>
&source=local',
        eventClick: function(calEvent, jsEvent, view) {
            //alert(calEvent);
            slimcrm.calEvent = calEvent;
            slimcrm.jsEvent = jsEvent;
            slimcrm.view = view;
            calendar.display_event( calEvent.id , {target: 'event_details',onUpdate: function(response,root){ $('.datetimepicker').datetimepicker({timeFormat: 'hh:mm:ss',dateFormat: 'yy-mm-dd'}); }});
            if(calEvent.url){
                
               // alert(calEvent.url);
                return false;
            }
        },
        dayClick: function(date, allDay, jsEvent, view) {
            //alert(allDay + view.name);
            if (allDay) {
                if( view.name == 'month'){
                    $('#mycal').fullCalendar('gotoDate',date.getFullYear() ,date.getMonth() ,date.getDate() );$('#mycal').fullCalendar('changeView','agendaWeek');
                } else {
开发者ID:name256,项目名称:crm42,代码行数:31,代码来源:calendar.main.php


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