noalyss Version-9
ajax_company.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
25/**
26 * @file
27 * @brief called from company.inc.php , add or modify extra parameter
28 */
29global $g_user;
30
31if ($g_user->check_module("COMPANY")==0) die();
32
33
35try {
36 $table=$http->request('table');
37 $action=$http->request('action');
38 $p_id=$http->request('p_id', "number");
39 $ctl_id=$http->request('ctl');
40
41} catch(Exception $e) {
42 echo $e->getMessage();
43 return;
44}
46$parameter_extra->set_object_name($ctl_id);
47if ($action=="input")
48{
49 $parameter_extra->send_header();
50 echo $parameter_extra->ajax_input()->saveXML();
51 return;
52}elseif ($action == "save") {
53 $parameter_extra->send_header();
54 echo $parameter_extra->ajax_save()->saveXML();
55 return;
56} elseif ($action == "delete") {
57 $parameter_extra->send_header();
58 echo $parameter_extra->ajax_delete()->saveXML();
59 return;
60}
$p_id
global $g_user
$http
catch(Exception $e) $parameter_extra
$action
$ctl_id
manage the http input (get , post, request) and extract from an array
if( $delta< 0) elseif( $delta==0)
$table
Definition: menu.inc.php:103