noalyss Version-9
ajax_contact_option_list.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 add option for contact
28 * @see contact_option_list
29 * @see action_document_type_mtable::input()
30 */
31try
32{
33 $contact_option_id=$http->request("p_id");
34 $ctl_id=$http->request("ctl");
35 $action=$http->request("action");
36}
37catch (Exception $ex)
38{
39 record_log(__FILE__." no p_id");
40 return;
41}
43
44// document_option id from document_option where do_code='contact_multiple' and document_type_id=p_id
46
48
49$contact_mtable->set_callback("ajax_misc.php");
50$contact_mtable->set_object_name("s_contact_option");
51$contact_mtable->set_dialog_box("db_contact_option");
52$contact_mtable->add_json_param("op", "contact_option_list");
53$contact_mtable->set_object_name($ctl);
54$contact_mtable->set_pk($contact_option_id);
55
56if ($action == "input") {
57 $contact_mtable->send_header();
58 echo $contact_mtable->ajax_input()->saveXML();
59} elseif($action == "save") {
60 $contact_mtable->send_header();
61
62 echo $contact_mtable->ajax_save()->saveXML();
63} elseif ($action == "delete") {
64 $contact_mtable->send_header();
65 $contact_mtable->ajax_delete();
66}
record_log($p_message)
Record an error message into the log file of the server.
Definition: ac_common.php:1342
catch(Exception $ex) $cn
$ex
Definition: balance.inc.php:45
Manage the Options for the Card_Multiple in the Follow Up.
abstract of the table public.contact_option_ref
static connect()
if( $delta< 0) elseif( $delta==0)