26if (!defined(
'ALLOWED'))
27 die(
'Appel direct ne sont pas permis');
31if (
$op==
'action_show')
37 $array=$gestion->get_last(35);
39 require_once NOALYSS_TEMPLATE.
'/action_show.php';
45 $gestion->display_short();
48if (
$op==
'action_save')
56 $date_event=
$http->get(
"date_event",
"string",
"");
58 $event_group=
$http->get(
"event_group",
"string",0);
59 $event_priority=
$http->get(
"event_priority",
"string",0);
62 $type_event=
$http->get(
'type_event',
"string",-1);
63 $hour_event=
$http->get(
'hour_event',
"string",
null);
64 if ($date_event==-1||
isDate($date_event)==0)
65 throw new Exception(
_(
'Date invalide'));
74 throw new Exception(
_(
'Destinataire invalide'));
77 throw new Exception(
_(
'Type invalide'));
79 throw new Exception(
_(
'Aucun titre'));
86 header(
'Content-type: text/xml; charset=UTF-8');
89 $xml_content=$dom->createElement(
'content',
$ex->getMessage());
90 $xml_status=$dom->createElement(
'status',
"NOK");
91 $root=$dom->createElement(
"root");
92 $root->appendChild($xml_content);
93 $root->appendChild($xml_status);
94 $dom->appendChild(
$root);
102 $gestion->ag_priority=$event_priority;
103 $gestion->ag_title=
$title;
104 $gestion->ag_dest=$event_group;
105 $gestion->ag_type=$type_event;
106 $gestion->f_id_dest=$dest_id;
107 $gestion->ag_state=3;
108 $gestion->dt_id=$type_event;
109 $gestion->ag_comment=strip_tags(
$summary);
111 $gestion->ag_timestamp=$date_event;
112 $gestion->ag_remind_date=$date_event;
113 $gestion->ag_hour=$hour_event;
117 $gestion->save_short();
118 }
catch (Exception
$ex)
121 $content=
$ex->getMessage();
124 if (! headers_sent())
126 header(
'Content-type: text/xml; charset=UTF-8');
129 $xml_content=$dom->createElement(
'content', $content);
130 $xml_status=$dom->createElement(
'status',
$status);
131 $root=$dom->createElement(
"root");
132 $root->appendChild($xml_content);
133 $root->appendChild($xml_status);
134 $dom->appendChild(
$root);
135 echo $dom->saveXML();
isDate($p_date)
Verifie qu'une date est bien formaté en d.m.y et est valable.
record_log($p_message)
Record an error message into the log file of the server or in the log folder of NOALYSS Record also t...
_("actif, passif,charge,...")
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
class_action for manipulating actions action can be :