function clash_mail(CAppUI $AppUI)
{
    $obj = new CEvent();
    if (!$obj->bind($_SESSION['add_event_post'])) {
        $AppUI->setMsg($obj->getError(), UI_MSG_ERROR);
    } else {
        $obj->notify($_SESSION['add_event_post']['event_assigned'], w2PgetParam($_REQUEST, 'event_id', 0) ? false : true, true);
        $AppUI->setMsg('Mail sent', UI_MSG_OK);
    }
    clear_clash();
    $AppUI->redirect();
}
<?php

/* $Id$ $URL$ */
if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
$del = (int) w2PgetParam($_POST, 'del', 0);
$obj = new CEvent();
if (!$obj->bind($_POST)) {
    $AppUI->setMsg($obj->getError(), UI_MSG_ERROR);
    $AppUI->redirect();
}
if ($obj->event_start_date) {
    $start_date = new w2p_Utilities_Date($obj->event_start_date . $_POST['start_time']);
    $obj->event_start_date = $start_date->format(FMT_DATETIME_MYSQL);
}
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();
Beispiel #3
0
function clash_mail()
{
    global $AppUI;
    $obj = new CEvent();
    if (!$obj->bind($_SESSION['add_event_post'])) {
        $AppUI->setMsg($obj->getError(), UI_MSG_ERROR);
    } else {
        $obj->notify(@$_SESSION['add_event_attendees'], $_REQUEST['event_id'] ? false : true, true);
        $AppUI->setMsg("Mail sent", UI_MSG_OK);
    }
    clear_clash();
    $AppUI->redirect();
}