noalyss Version-9
ajax_anc_key_choice.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19/**
20 * @file
21 * @brief show the available distribution keys for analytic activities. Expected
22 * parameter are
23 * - t for the table id
24 * - amount is the amount to distributed
25 *
26 */
27// Copyright (2014) Author Dany De Bontridder danydb@aevalys.eu
28if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
29
31
32try
33{
34 $amount=$http->get("amount", "number");
35 $table_id=$http->get("t");
36 $ledger=$http->get('led',"number");
37
38}
39catch (Exception $exc)
40{
41 error_log($exc->getTraceAsString());
42 return;
43}
44
45
46
47ob_start();
48echo HtmlInput::title_box(_("Choix d'une clef"), 'div_anc_key_choice');
49
51
52echo HtmlInput::button_close('div_anc_key_choice');
53$response = ob_get_clean();
55header('Content-type: text/xml; charset=UTF-8');
56echo <<<EOF
57<?xml version="1.0" encoding="UTF-8"?>
58<data>
59<ctl></ctl>
60<code>$html</code>
61</data>
62EOF;
63?>
static display_choice($p_amount, $p_target, $p_ledger)
display list of available keys
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".
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,...