noalyss Version-9
ajax_tag_group.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * PhpCompta is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * PhpCompta is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with PhpCompta; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20// Copyright (2002-2020) Author Dany De Bontridder <danydb@noalyss.eu>
21
22if (!defined('ALLOWED'))
23 die('Appel direct ne sont pas permis');
24
25if ( $g_user->check_module('CFGTAG') == 0 ) {
26 record_log("forbidden : AJT01 ".__FILE__);
27 exit();
28}
29
30/**
31 * @file
32 * @brief Manage the group of tags
33 */
34try {
35 $table=$http->request('table');
36 $action=$http->request('action');
37 $p_id=$http->request('p_id', "number");
38 $ctl_id=$http->request('ctl');
39
40} catch(Exception $e) {
41 echo $e->getMessage();
42 return;
43}
44
45$obj=new Tag_Group_SQL($cn,$p_id);
47$obj_manage->set_callback("ajax_misc.php");
48$obj_manage->add_json_param("op", "tag_group");
49$obj_manage->set_object_name($ctl_id);
50
51
52if ($action=="input")
53{
54
55 header('Content-type: text/xml; charset=UTF-8');
56 echo $obj_manage->ajax_input()->saveXML();
57 return;
58}
59elseif ($action=="save")
60{
61 $xml=$obj_manage->ajax_save();
62 header('Content-type: text/xml; charset=UTF-8');
63 echo $xml->saveXML();
64}
65elseif ($action=="delete")
66{
67 $xml=$obj_manage->ajax_delete();
68 header('Content-type: text/xml; charset=UTF-8');
69 echo $xml->saveXML();
70}
record_log($p_message)
Record an error message into the log file of the server.
Definition: ac_common.php:1342
global $g_user
if no group available , then stop
switch($op2) $xml
Definition: ajax_card.php:806
$obj_manage
$action
catch(Exception $e) $obj
$ctl_id
manage tag_group table
for($e=0; $e< count($afiche); $e++) exit
if( $delta< 0) elseif( $delta==0)
$table
Definition: menu.inc.php:103