當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。