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


PHP CEvent::store方法代码示例

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


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

示例1:

}
if ($obj->event_end_date) {
    $end_date = new w2p_Utilities_Date($obj->event_end_date . $_POST['end_time']);
    $obj->event_end_date = $end_date->format(FMT_DATETIME_MYSQL);
}
$action = $del ? 'deleted' : 'stored';
$clashRedirect = false;
if ($del) {
    $result = $obj->delete();
} else {
    if ($_POST['event_assigned'] > '' && ($clash = $obj->checkClash($_POST['event_assigned']))) {
        $last_a = $a;
        $GLOBALS['a'] = "clash";
        $clashRedirect = true;
    } else {
        $result = $obj->store();
        if (isset($_POST['event_assigned'])) {
            $obj->updateAssigned(explode(',', $_POST['event_assigned']));
        }
        if (isset($_POST['mail_invited'])) {
            $obj->notify($_POST['event_assigned'], false);
        }
    }
}
//TODO: I hate this clash param.. there should be a better way.
if (!$clashRedirect) {
    if (is_array($result)) {
        $AppUI->setMsg($result, UI_MSG_ERROR, true);
        $AppUI->holdObject($obj);
        $AppUI->redirect('m=calendar&a=addedit');
    }
开发者ID:caseysoftware,项目名称:web2project-planner,代码行数:31,代码来源:do_event_aed.php

示例2: clash_accept

function clash_accept(CAppUI $AppUI)
{
    global $do_redirect;
    $AppUI->setMsg('Event');
    $obj = new CEvent();
    $obj->bind($_SESSION['add_event_post']);
    $GLOBALS['a'] = $_SESSION['add_event_caller'];
    $is_new = $obj->event_id == 0;
    $result = $obj->store($AppUI);
    if ($result) {
        if (isset($_SESSION['add_event_attendees']) && $_SESSION['add_event_attendees']) {
            $obj->updateAssigned(explode(',', $_SESSION['add_event_attendees']));
        }
        if (isset($_SESSION['add_event_mail']) && $_SESSION['add_event_mail'] == 'on') {
            $obj->notify($_SESSION['add_event_attendees'], !$is_new);
        }
        $AppUI->setMsg('Event Stored', UI_MSG_OK, true);
    } else {
        $AppUI->setMsg($msg, UI_MSG_ERROR);
    }
    clear_clash();
    $AppUI->redirect();
}
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:23,代码来源:cleanup_functions.php

示例3:

}
if ($obj->event_end_date) {
    $end_date = new w2p_Utilities_Date($obj->event_end_date . $_POST['end_time']);
    $obj->event_end_date = $end_date->format(FMT_DATETIME_MYSQL);
}
$action = $del ? 'deleted' : 'stored';
$clashRedirect = false;
if ($del) {
    $result = $obj->delete($AppUI);
} else {
    if ($_POST['event_assigned'] > '' && ($clash = $obj->checkClash($_POST['event_assigned']))) {
        $last_a = $a;
        $GLOBALS['a'] = "clash";
        $clashRedirect = true;
    } else {
        $result = $obj->store($AppUI);
        if (isset($_POST['event_assigned'])) {
            $obj->updateAssigned(explode(',', $_POST['event_assigned']));
        }
        if (isset($_POST['mail_invited'])) {
            $obj->notify($_POST['event_assigned'], false);
        }
    }
}
//TODO: I hate this clash param.. there should be a better way.
if (!$clashRedirect) {
    if (is_array($result)) {
        $AppUI->setMsg($result, UI_MSG_ERROR, true);
        $AppUI->holdObject($obj);
        $AppUI->redirect('m=calendar&a=addedit');
    }
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:do_event_aed.php

示例4: CustomFields

    } else {
        $AppUI->setMsg("deleted", UI_MSG_OK, true);
    }
    $AppUI->redirect('m=calendar');
} else {
    $isNotNew = @$_POST['event_id'];
    if (!$isNotNew) {
        $obj->event_owner = $AppUI->user_id;
    }
    // Check for existence of clashes.
    if ($_POST['event_assigned'] > '' && ($clash = $obj->checkClash($_POST['event_assigned']))) {
        $last_a = $a;
        $GLOBALS['a'] = "clash";
        $do_redirect = false;
    } else {
        if ($msg = $obj->store()) {
            $AppUI->setMsg($msg, UI_MSG_ERROR);
        } else {
            $custom_fields = new CustomFields('calendar', 'addedit', $obj->event_id, "edit");
            $custom_fields->bind($_POST);
            $sql = $custom_fields->store($obj->event_id);
            // Store Custom Fields
            $AppUI->setMsg($isNotNew ? 'updated' : 'added', UI_MSG_OK, true);
            if (isset($_POST['event_assigned'])) {
                $obj->updateAssigned(explode(",", $_POST['event_assigned']));
            }
            if (isset($_POST['mail_invited'])) {
                $obj->notify(@$_POST['event_assigned'], $isNotNew);
            }
        }
    }
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:do_event_aed.php

示例5: CEvent

    $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) {
        echo "{$ev1->event_id}";
        $ass = array();
        $ass = $AppUI->user_id;
        if ($id == 0) {
            $ev1->updateAssigned($ass);
        }
    } else {
        echo "0";
    }
} else {
    $tsk = new CTask();
    $tsk->load($task_id);
    if ($do_task === "resize") {
开发者ID:caseysoftware,项目名称:web2project-planner,代码行数:31,代码来源:test.php


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