當前位置: 首頁>>代碼示例>>PHP>>正文


PHP calendar::get_view方法代碼示例

本文整理匯總了PHP中calendar::get_view方法的典型用法代碼示例。如果您正苦於以下問題:PHP calendar::get_view方法的具體用法?PHP calendar::get_view怎麽用?PHP calendar::get_view使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在calendar的用法示例。


在下文中一共展示了calendar::get_view方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: header

                    $cal2->add_calendar_to_view($cal->f('id'), $view_id);
                }
            } else {
                if ($cal2->calendar_is_in_view($cal->f('id'), $view_id)) {
                    $cal2->remove_calendar_from_view($cal->f('id'), $view_id);
                }
            }
        }
        if ($_POST['close'] == 'true') {
            header('Location: ' . $return_to);
            exit;
        }
    }
}
if ($view_id > 0) {
    $view = $cal->get_view($view_id);
    $title = $view['name'];
    $has_write_permission = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $view['acl_write']);
} else {
    $view['start_hour'] = isset($_POST['view_start_hour']) ? $_POST['view_start_hour'] : '07';
    $view['end_hour'] = isset($_POST['view_end_hour']) ? $_POST['view_end_hour'] : '20';
    $view['name'] = isset($_POST['name']) ? smartstrip($_POST['name']) : '';
    $title = $cal_new_view;
    $has_write_permission = true;
}
$tabtable = new tabtable('view', $title, '100%', '400', '120', '', true);
if ($view_id > 0) {
    $tabtable->add_tab('view', $strProperties);
    $tabtable->add_tab('read_permissions', $strReadRights);
    $tabtable->add_tab('write_permissions', $strWriteRights);
}
開發者ID:BackupTheBerlios,項目名稱:hpt-obm-svn,代碼行數:31,代碼來源:view.php

示例2: calendar

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();
$post_action = isset($_REQUEST['post_action']) ? $_REQUEST['post_action'] : '';
$task = isset($_POST['task']) ? $_POST['task'] : '';
$return_to = isset($_REQUEST['return_to']) ? $_REQUEST['return_to'] : $_SERVER['HTTP_REFERER'];
$link_back = isset($_REQUEST['link_back']) ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI'];
$view_type = isset($_REQUEST['view_type']) ? $_REQUEST['view_type'] : 0;
$calendar_id = isset($_REQUEST['calendar_id']) ? $_REQUEST['calendar_id'] : 0;
$db = new db();
switch ($task) {
    case 'delete_view':
        $view = $cal->get_view($_POST['delete_view_id']);
        if ($GO_SECURITY->user_id == $view['user_id']) {
            if (isset($_POST['delete_view_id']) && $cal->delete_view($_POST['delete_view_id'])) {
                $GO_SECURITY->delete_acl($view['acl_write']);
                $GO_SECURITY->delete_acl($view['acl_read']);
            }
        }
        $db->query("SELECT view_id FROM cal_view_subscriptions WHERE user_id='" . $GO_SECURITY->user_id . "'");
        while ($db->next_record()) {
            $subscribed[] = $db->f('view_id');
        }
        break;
    case 'subscribe':
        $db->query("DELETE FROM cal_view_subscriptions WHERE user_id='" . $GO_SECURITY->user_id . "'");
        $subscribed = $_REQUEST['subscribed'];
        for ($i = 0; $i < sizeof($subscribed); $i++) {
開發者ID:BackupTheBerlios,項目名稱:hpt-obm-svn,代碼行數:31,代碼來源:views.php


注:本文中的calendar::get_view方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。