本文整理汇总了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);
示例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 {