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


PHP CEvent::load方法代码示例

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


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

示例1: die

<?php

/* CALENDAR $Id$ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$event_id = intval(dPgetParam($_GET, 'event_id', 0));
// check permissions for this record
$canAuthor = getPermission('events', 'add', $event_id);
$canEdit = getPermission('events', 'edit', $event_id);
// check if this record has dependencies to prevent deletion
$msg = '';
$obj = new CEvent();
$canDelete = $obj->canDelete($msg, $event_id);
// load the record data
if (!$obj->load($event_id)) {
    $AppUI->setMsg('Event');
    $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
    $AppUI->redirect();
} else {
    $AppUI->savePlace();
}
// load the event types
$types = dPgetSysVal('EventType');
// load the event recurs types
$recurs = array('Never', 'Hourly', 'Daily', 'Weekly', 'Bi-Weekly', 'Every Month', 'Quarterly', 'Every 6 months', 'Every Year');
$assigned = $obj->getAssigned();
if ($obj->event_owner != $AppUI->user_id && !getPermission('admin', 'view')) {
    $canEdit = false;
}
$df = $AppUI->getPref('SHDATEFORMAT');
开发者ID:slawekmikula,项目名称:dotproject,代码行数:31,代码来源:view.php

示例2: die

<?php

if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
// @todo    convert to template
$event_id = (int) w2PgetParam($_GET, 'event_id', 0);
$event = new CEvent();
if (!$event->load($event_id)) {
    $AppUI->redirect(ACCESS_DENIED);
}
$canEdit = $event->canEdit();
$canDelete = $event->canDelete();
// load the event recurs types
$recurs = array('Never', 'Hourly', 'Daily', 'Weekly', 'Bi-Weekly', 'Every Month', 'Quarterly', 'Every 6 months', 'Every Year');
$assigned = $event->getAssigned();
$start_date = $event->event_start_date ? new w2p_Utilities_Date($event->event_start_date) : new w2p_Utilities_Date();
$end_date = $event->event_end_date ? new w2p_Utilities_Date($event->event_end_date) : new w2p_Utilities_Date();
if ($event->event_project) {
    $project = new CProject();
    $event_project = $project->load($event->event_project)->project_name;
}
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('View Event', 'icon.png', $m);
$titleBlock->addCrumb('?m=events&a=year_view&date=' . $start_date->format(FMT_TIMESTAMP_DATE), 'year view');
$titleBlock->addCrumb('?m=events&amp;date=' . $start_date->format(FMT_TIMESTAMP_DATE), 'month view');
$titleBlock->addCrumb('?m=events&a=week_view&date=' . $start_date->format(FMT_TIMESTAMP_DATE), 'week view');
$titleBlock->addCrumb('?m=events&amp;a=day_view&amp;date=' . $start_date->format(FMT_TIMESTAMP_DATE) . '&amp;tab=0', 'day view');
if ($canEdit) {
    $titleBlock->addCell();
    $titleBlock->addCell('
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:view.php

示例3: intval

$event_id = intval(dPgetParam($_GET, 'event_id', 0));
$is_clash = isset($_SESSION['event_is_clash']) ? $_SESSION['event_is_clash'] : false;
// check permissions
$canAuthor = getPermission('events', 'add', $event_id);
$canEdit = getPermission('events', 'edit', $event_id);
if (!($canEdit && $event_id || $canAuthor && !$event_id)) {
    $AppUI->redirect('m=public&a=access_denied');
}
// get the passed timestamp (today if none)
$date = dPgetCleanParam($_GET, 'date', null);
// load the record data
$obj = new CEvent();
if ($is_clash) {
    $obj->bind($_SESSION['add_event_post']);
} else {
    if (!$obj->load($event_id) && $event_id) {
        $AppUI->setMsg('Event');
        $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
        $AppUI->redirect();
    }
}
// load the event types
$types = dPgetSysVal('EventType');
// Load the users
$perms =& $AppUI->acl();
$users = $perms->getPermittedUsers('calendar');
// Load the assignees
$assigned = array();
if ($is_clash) {
    $assignee_list = $_SESSION['add_event_attendees'];
    if (isset($assignee_list) && $assignee_list) {
开发者ID:srinivasulurao,项目名称:jonel,代码行数:31,代码来源:addedit.php

示例4: CEvent

//$new_mysql_formatted_date = $w2p_date_object->format(FMT_DATETIME_MYSQL);
//$startm=date('Y-m-d H:i:s', $start);
//$endm=$AppUI->convertToSystemTZ($end);
/*
 * $w2p_date_object = new w2p_Utilities_Date($original_mysql_formatted_date);
$new_mysql_formatted_date = $w2p_date_object->format(FMT_DATETIME_MYSQL);
*/
/*
$FF=fopen("C:\Bitnami\apache2\htdocs\w2pdpl/post.txt","w");
fputs($FF, "$id  $start   $end    $startm ; $w2p_date_object  ; $endm");
fclose($FF);
*/
if ($task_id == 0) {
    $ev1 = new CEvent();
    if ($id > 0) {
        $ev1->load($id);
    }
    if ($id == 0) {
        $ev1->event_name = $event_name;
        $ev1->event_owner = $user_id;
        $ev1->event_private = $event_private;
        //otherwise not shown in myevent filter in dayview/events
        $ev1->event_description = $event_descript;
    }
    $ev1->event_start_date = $start;
    $ev1->event_end_date = $end;
    $res = false;
    //
    $res = $ev1->store();
    //echo "0";
    if ($res) {
开发者ID:caseysoftware,项目名称:web2project-planner,代码行数:31,代码来源:test.php


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