Esempio n. 1
0
// fill invites and save the entry
invitees_filling($bean);
//$bean->save($GLOBALS['check_notify']);
if ($r_id = $bean->id) {
    $u = new User();
    $u->retrieve($bean->assigned_user_id);
    /*if(empty($_POST['user_invitees'])){
    		$bean->set_accept_status($u, 'none');
    		$_POST['user_invitees'] = $bean->assigned_user_id;
    	}*/
    $arr_rec = array();
    if (empty($_REQUEST['rec_id_c']) && empty($_REQUEST['no_recurence']) && $_REQUEST['repeat_type_c'] != '') {
        include "modules/ECalendar/SaveReccurence.php";
    }
    if (empty($_REQUEST['rec_id_c']) && $_REQUEST['repeat_type_c'] == '') {
        remove_recurence($bean, $table_name, $jn, $bean->id);
    }
    $bean->retrieve($r_id);
    global $timedate;
    $start = to_timestamp_from_uf($bean->date_start);
    if ($_REQUEST['cur_module'] == 'Calls') {
        $users = $bean->get_call_users();
    }
    if ($_REQUEST['cur_module'] == 'Meetings') {
        $users = $bean->get_meeting_users();
    }
    $user_ids = array();
    foreach ($users as $u) {
        $user_ids[] = $u->id;
    }
    $description = $bean->description;
Esempio n. 2
0
<?php

if (!defined('sugarEntry') || !sugarEntry) {
    die('Not A Valid Entry Point');
}
require_once "modules/Calls/Call.php";
require_once "modules/Meetings/Meeting.php";
require_once "modules/ECalendar/functions.php";
if ($_REQUEST['cur_module'] == 'Calls') {
    $bean = new Call();
    $table_name = 'calls';
    $jn = "call_id_c";
}
if ($_REQUEST['cur_module'] == 'Meetings') {
    $bean = new Meeting();
    $table_name = 'meetings';
    $jn = "meeting_id_c";
}
$bean->retrieve($_REQUEST['record']);
if (!$bean->ACLAccess('delete')) {
    die;
}
$bean->mark_deleted($_REQUEST['record']);
if ($_REQUEST['delete_recurring']) {
    remove_recurence($bean, $table_name, $jn, $_REQUEST['record']);
}
$json_arr = array('succuss' => 'yes');
ob_clean();
echo json_encode($json_arr);