Exemplo n.º 1
0
     */
    $gestion = new Follow_Up($cn);
    $gestion->ag_priority = $event_priority;
    $gestion->ag_title = $title;
    $gestion->ag_dest = $event_group;
    $gestion->ag_type = $type_event;
    $gestion->f_id_dest = $dest_id;
    $gestion->ag_state = 3;
    $gestion->dt_id = $type_event;
    $gestion->ag_comment = h($summary);
    $gestion->ag_timestamp = $date_event;
    $gestion->ag_remind_date = $date_event;
    $content = _('Sauvé');
    $status = 'OK';
    try {
        $gestion->save_short();
    } catch (Exception $ex) {
        $content = $ex->getMessage();
        $status = 'NOK';
    }
    header('Content-type: text/xml; charset=UTF-8');
    $dom = new DOMDocument('1.0', 'UTF-8');
    $xml_content = $dom->createElement('content', _("Sauvé"));
    $xml_status = $dom->createElement('status', "OK");
    $root = $dom->createElement("root");
    $root->appendChild($xml_content);
    $root->appendChild($xml_status);
    $dom->appendChild($root);
    echo $dom->saveXML();
    return;
}