noalyss  Version-9
ajax_tag_list.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 // Copyright Author Dany De Bontridder danydb@aevalys.eu
20  /**
21  *@file
22  *@brief Display the list of tags
23  */
24 if ( !defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
25 
26 ob_start();
28 $tag->select();
29 
30 //------------------- Propose to add a tag
31 
32 $js=sprintf("onclick=\"show_tag('%s','%s','%s','j')\"",Dossier::id(),'','-1');
33 if ( $g_user->check_action(TAGADD) == 1) { echo HtmlInput::button("tag_add", _("Ajout d'un tag"), $js);}
34 echo HtmlInput::button_close("tag_div");
35 
36 $response= ob_get_clean();
37 if (headers_sent() && DEBUGNOALYSS > 0 ){
38  echo $response;
39 } else {
40  header('Content-type: text/xml; charset=UTF-8');
41 }
43 echo <<<EOF
44 <?xml version="1.0" encoding="UTF-8"?>
45 <data>
46 <ctl></ctl>
47 <code>$html</code>
48 </data>
49 EOF;
50 exit();
51 
52 
53 ?>
Tag_Action
concerns the tags linked to an action
Definition: tag_action.class.php:35
$tag
$tag
Definition: ajax_tag_list.php:27
HtmlInput\button_close
static button_close($div_name)
close button for the HTML popup
Definition: html_input.class.php:430
HtmlInput\button
static button($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
Definition: html_input.class.php:206
$html
$html
Definition: ajax_tag_list.php:42
$response
$response
Definition: ajax_tag_list.php:36
$g_user
global $g_user
Find the default module or the first one.
Definition: action.inc.php:24
TAGADD
const TAGADD
Definition: constant.security.php:25
escape_xml
escape_xml($p_xml)
When data are transfered thanks ajax in a xml document, the xml can not contains some character,...
Definition: function_javascript.php:2720
exit
for($e=0; $e< count($afiche); $e++) exit
Definition: export_fiche_balance_csv.php:109
$cn
$cn
Definition: ajax_anc_accounting.php:30
Dossier\id
static id()
return the $_REQUEST['gDossier'] after a check
Definition: dossier.class.php:55
$js
$js
Definition: ajax_tag_list.php:32