noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
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
31
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 ($g_user->check_module("COMPANY")==0)
48{
49 header('Content-type: text/xml; charset=UTF-8');
50 echo Manage_Table_SQL::ajax_error(_('Accès non autorisé'))->saveXML();
51 record_log("COMPANY security ");
52 return;
53
54}
55if ($action=="input")
56{
57 $parameter_extra->send_header();
58 echo $parameter_extra->ajax_input()->saveXML();
59 return;
60}elseif ($action == "save") {
61 $parameter_extra->send_header();
62 echo $parameter_extra->ajax_save()->saveXML();
63 return;
64} elseif ($action == "delete") {
65 $parameter_extra->send_header();
66 echo $parameter_extra->ajax_delete()->saveXML();
67 return;
68}
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
catch(Exception $e) $parameter_extra
_("actif, passif,charge,...")
manage the http input (get , post, request) and extract from an array
static ajax_error($p_message)
returns an XML object for error message as unauthorized access.
if( $delta< 0) elseif( $delta==0)
$table
Definition menu.inc.php:104