36if ( ! defined (
'ALLOWED') ) die (_(
'Aucun accès direct'));
37mb_internal_encoding(
"UTF-8");
58 header(
'Content-type: text/xml; charset=UTF-8');
59 $dom=
new DOMDocument(
'1.0',
'UTF-8');
60 $tl_id=
$dom->createElement(
'tl_id',
$todo->get_parameter(
'id'));
66 $root->appendChild($tl_id);
67 $root->appendChild($tl_content);
97 if ($id <> 0 ) {
$todo->load(); }
100 $todo->set_parameter(
"owner", $_SESSION[SESSION_KEY.
'g_user']);
103 $todo->set_parameter(
"date",
$http->post(
"p_date_todo",
"string",
""));
104 $todo->set_parameter(
"title",
$http->post(
"p_title",
"string",
""));
105 $todo->set_parameter(
"desc",
$http->post(
"p_desc",
"string",
""));
106 $todo->set_is_public(
$http->post(
"p_public",
"string",
"N"));
109 if (
$todo->get_parameter(
'owner') == $_SESSION[SESSION_KEY.
'g_user'] )
$todo->save();
111 $dom=
new DOMDocument(
'1.0',
'UTF-8');
113 if (
$todo->get_parameter(
"id")==0)
115 $tl_id=
$dom->createElement(
'tl_id', 0);
116 $tl_content=
$dom->createElement(
'row',
'');
118 $todo_class=
$todo->get_class();
119 $todo_class=($todo_class==
"")?
' odd ':$todo_class;
120 $class=
$dom->createElement(
"style", $todo_class);
125 $tl_id=
$dom->createElement(
'tl_id',
$todo->get_parameter(
'id'));
126 $tl_content=
$dom->createElement(
'row',
$todo->display_row(
'class="odd"',
'N'));
128 $todo_class=
$todo->get_class();
129 $todo_class=($todo_class==
"")?
' odd ':$todo_class;
130 $class=
$dom->createElement(
"style", $todo_class);
132 header(
'Content-type: text/xml; charset=UTF-8');
136 $root->appendChild($tl_id);
137 $root->appendChild($tl_content);
141 echo
$dom->saveXML();
148if (
$ac==
'shared_note')
150 $id=
$http->get(
"todo_id",
"string",-1);
154 header(
'Content-type: text/xml; charset=UTF-8');
155 $dom=
new DOMDocument(
'1.0',
'UTF-8');
156 $tl_id=
$dom->createElement(
'content', _(
"Erreur : note invalide"));
157 $dom->appendChild($tl_id);
158 echo
$dom->saveXML();
165 echo
'<p class="notice">';
166 echo _(
"Vous devez d'abord sauver");
168 echo
'<p style="text-align:center">';
174 header(
'Content-type: text/xml; charset=UTF-8');
175 $dom=
new DOMDocument(
'1.0',
'UTF-8');
177 $dom->appendChild($tl_id);
178 echo
$dom->saveXML();
186 header(
'Content-type: text/xml; charset=UTF-8');
187 $dom=
new DOMDocument(
'1.0',
'UTF-8');
188 $tl_id=
$dom->createElement(
'content', _(
"Cette note n'est pas à vous").
190 $dom->appendChild($tl_id);
191 echo
$dom->saveXML();
196 header(
'Content-type: text/xml; charset=UTF-8');
197 $dom=
new DOMDocument(
'1.0',
'UTF-8');
198 $tl_id=
$dom->createElement(
'content', _(
"Accès interdit"));
199 $dom->appendChild($tl_id);
200 echo
$dom->saveXML();
205 $todo->display_user();
206 echo
'<p style="text-align:center">';
212 header(
'Content-type: text/xml; charset=UTF-8');
213 $dom=
new DOMDocument(
'1.0',
'UTF-8');
215 $dom->appendChild($tl_id);
216 echo
$dom->saveXML();
222if (
$ac==
"set_share")
224 $id=
$http->get(
"todo_id",
"string",0);
225 $p_login=
$http->get(
"login",
"string",
"");
229 header(
'Content-type: text/xml; charset=UTF-8');
230 $dom=
new DOMDocument(
'1.0',
'UTF-8');
231 $tl_id=
$dom->createElement(
'content', _(
"Erreur : paramètre invalide"));
232 $dom->appendChild($tl_id);
233 echo
$dom->saveXML();
241 header(
'Content-type: text/xml; charset=UTF-8');
242 $dom=
new DOMDocument(
'1.0',
'UTF-8');
243 $tl_id=
$dom->createElement(
'content', _(
"Cette note n'est pas à vous"));
244 $dom->appendChild($tl_id);
245 echo
$dom->saveXML();
250 header(
'Content-type: text/xml; charset=UTF-8');
251 $dom=
new DOMDocument(
'1.0',
'UTF-8');
252 $tl_id=
$dom->createElement(
'content', _(
"Cette note n'est pas à vous"));
253 $dom->appendChild($tl_id);
254 echo
$dom->saveXML();
259 header(
'Content-type: text/xml; charset=UTF-8');
260 $dom=
new DOMDocument(
'1.0',
'UTF-8');
261 $tl_id=
$dom->createElement(
'content', _(
"Accès interdit"));
262 $dom->appendChild($tl_id);
263 echo
$dom->saveXML();
266 if (
$todo->is_shared_with($p_login) == 0 )
269 $todo->add_share($p_login);
273 $todo->remove_share($p_login);
280if (
$ac==
"remove_share")
282 $id=
$http->get(
"todo_id",
"string", 0);
283 $p_login=
$http->get(
"login",
"string",
"");
287 header(
'Content-type: text/xml; charset=UTF-8');
288 $dom=
new DOMDocument(
'1.0',
'UTF-8');
290 $tl_id=
$dom->createElement(
'content', _(
"Erreur : paramètre invalide"));
292 $dom->appendChild($tl_id);
293 echo
$dom->saveXML();
299 $todo->remove_share($p_login);
301 header(
'Content-type: text/xml; charset=UTF-8');
302 $dom=
new DOMDocument(
'1.0',
'UTF-8');
305 echo
$dom->saveXML();
set_language()
set the lang thanks the _SESSION['g_lang'] var.
if(isset( $_REQUEST[ 'show'])) if(isset($_REQUEST['del'])) $ac
static id()
return the 'gDossier' value after a check
static close($p_div)
Return a html string with an anchor which close the inside popup.
Data & function about connected users.
This class manages the table todo_list.
for($e=0; $e< count($afiche); $e++) exit
escape_xml($p_xml)
When data are transfered thanks ajax in a xml document, the xml can not contains some character,...