Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 define ('ALLOWED',1);
00037 require_once '../include/constant.php';
00038 require_once ('class_dossier.php');
00039 require_once ('class_todo_list.php');
00040 require_once ('class_database.php');
00041 require_once ('class_user.php');
00042 mb_internal_encoding("UTF-8");
00043
00044 $cn= Dossier::connect();
00045 global $g_user;
00046 $g_user=new User($cn);
00047 $g_user->check(true);
00048 $g_user->check_dossier(Dossier::id(),true);
00049 ajax_disconnected('add_todo_list');
00050
00051 if (isset($_REQUEST['show']))
00052 {
00053 $cn=new Database(dossier::id());
00054 $todo=new Todo_list($cn);
00055 $todo->set_parameter('id',$_REQUEST['id']);
00056 $todo->load();
00057 header('Content-type: text/xml; charset=UTF-8');
00058 header ('<?xml version="1.0" encoding="UTF-8"?>');
00059 echo $todo->toXML();
00060 exit();
00061 }
00062
00063 if (isset($_REQUEST['del']))
00064 {
00065 $cn=new Database(dossier::id());
00066 $todo=new Todo_list($cn);
00067 $todo->set_parameter('id',$_REQUEST['id']);
00068 $todo->delete();
00069 exit();
00070 }