noalyss Version-9
ajax_action_concerned_list.php
Go to the documentation of this file.
1<?php
2
3/*
4 * Copyright (C) 2020 Dany De Bontridder <dany@alchimerys.be>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program 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 this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
23try {
24 // follow_up id
25 $ag_id=$http->request("ag_id","number");
26} catch (Exception $ex) {
27 record_log(__FILE__.$ex->getMessage().$ex->getTraceAsString());
28 return;
29}
30/*
31 * security Who can do it ?
32 */
33if ( ! $g_user->can_write_action($ag_id) ) {
34 record_log(__FILE__."security : access refused");
35 return;
36}
37ob_start();
38echo HtmlInput::title_box(_("Liste Autres Fiches"), "action_concerned_list_dv");
39
41$follow->display_table();
42
43echo $follow->button_action_add_concerned_card( );
44$csv="export.php?".
45 http_build_query(["gDossier"=>Dossier::id(),
46 "act"=>"CSV:FollowUpContactOption",
47 "ag_id"=>$ag_id]);
48echo HtmlInput::button_anchor(_("Export CSV"), $csv,"",' title="Export Contacts options"','smallbutton');
49
50echo HtmlInput::button_close("action_concerned_list_dv");
51$response = ob_get_clean();
52
53if ( headers_sent() && DEBUGNOALYSS > 0) {
54 echo $response;
55}
57header('Content-type: text/xml; charset=UTF-8');
58echo <<<EOF
59<?xml version="1.0" encoding="UTF-8"?>
60<data>
61<ctl>$ctl</ctl>
62<code>$html</code>
63</data>
64EOF;
65?>
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
$ag_id
Definition: action.inc.php:54
if(headers_sent() &&DEBUGNOALYSS > 0) $html
$ex
Definition: balance.inc.php:45
static id()
return the 'gDossier' value after a check
Others concerned card in an action.
static button_close($div_name, $class='smallbutton')
close button for the HTML popup
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n')
Title for boxes, you can customize the symbol thanks symbol with the mode "custom".
static button_anchor($p_label, $p_value, $p_name="", $p_javascript="", $p_class="smallbutton")
create a button with a ref
manage the http input (get , post, request) and extract from an array
escape_xml($p_xml)
When data are transfered thanks ajax in a xml document, the xml can not contains some character,...