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