noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
ajax_cfgaction.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');
25
26
27/**
28 * @file
29 * @brief call for document_type in follow up
30 */
31try
32{
33 $table=$http->request('table');
34 $ctl_id=$http->request('ctl');
35 $action=$http->request('action');
36 $p_id=$http->request('p_id', "number");
37}
38catch (Exception $ex)
39{
41 return;
42}
43
44
45
46
47
50
51$action_document_type->set_callback("ajax_misc.php");
52$action_document_type->add_json_param("op", "cfgaction");
53$action_document_type->set_object_name($ctl_id);
54// check right
55if ( $g_user->check_module("C0ACT")==0)
56{
57 header('Content-type: text/xml; charset=UTF-8');
58 echo $action_document_type->ajax_error(_('Accès non autorisé'))->saveXML();
59 record_log("cfgaction01 security ");
60 return;
61}
62
63
64if ($action=="input")
65{
66 $action_document_type->set_order(["dt_id", "dt_value","dt_prefix"]);
67
68 header('Content-type: text/xml; charset=UTF-8');
69 echo $action_document_type->ajax_input()->saveXML();
70 return;
71}
72elseif ($action=="save")
73{
74 $action_document_type->set_order(["dt_id", "dt_prefix","dt_value"]);
75 $xml=$action_document_type->ajax_save();
76 header('Content-type: text/xml; charset=UTF-8');
77 echo $xml->saveXML();
78}
79elseif ($action=="delete")
80{
81 $xml=$action_document_type->ajax_delete();
82 header('Content-type: text/xml; charset=UTF-8');
83 echo $xml->saveXML();
84}
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...
global $g_user
if no group available , then stop
switch($op2) $xml
$action_document_type
catch(Exception $ex) $doc_type
_("actif, passif,charge,...")
$ex
display , modify and add document_type for follow up
abstract of the table public.document_type
manage the http input (get , post, request) and extract from an array
if( $delta< 0) elseif( $delta==0)
$table
Definition menu.inc.php:104