noalyss Version-9
ajax_tag_detail.php
Go to the documentation of this file.
1<?php
2/**
3 *@file
4 * @brief display a window with the content of a tag
5 */
6//This file is part of NOALYSS and is under GPL
7//see licence.txt
8
9if ( !defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
10ob_start();
13$data=$tag->get_data();
14$data->t_id=$http->get("tag","number");
15if ($data->t_id == -1 && $g_user->check_action(TAGADD) == 0 ) return;
16$data->load();
17echo HtmlInput::title_box(_("Etiquette"), "tag_div","close","","y");
18
19?>
20<?php
21// save via POST and reload page
22if ($_GET['form']=='p') : ?>
23 <form id="tag_detail_frm" method="POST" >
24<?php
25/*
26 * save via javascript and don't reload page
27 */
28else :
29 ?>
30 <form id="tag_detail_frm" method="POST" onsubmit="return save_tag();">
31<?php endif; ?>
32 <?php
33 echo dossier::hidden();
34 echo HtmlInput::hidden('t_id', $http->get('tag') );
35 echo HtmlInput::hidden('ac',$http->get('ac'));
36
37
38 require_once NOALYSS_TEMPLATE.'/tag_detail.php';
39 echo HtmlInput::submit("save_tag_sb", "Valider");
40 echo HtmlInput::button_close("tag_div");
41
42 ?>
43</form>
44<?php
45 $response= ob_get_clean();
46if (headers_sent() && DEBUGNOALYSS > 0 ) {
47 echo $response;
48}else {
49 header('Content-type: text/xml; charset=UTF-8');
50}
52 echo <<<EOF
53<?xml version="1.0" encoding="UTF-8"?>
54<data>
55<ctl></ctl>
56<code>$html</code>
57</data>
58EOF;
59 exit();
60 ?>
global $g_user
if no group available , then stop
if(headers_sent() &&DEBUGNOALYSS > 0) else
$response
$_GET['qcode']
static button_close($div_name, $class='smallbutton')
close button for the HTML popup
static hidden($p_name, $p_value, $p_id="")
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 submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
manage the http input (get , post, request) and extract from an array
Tag operations or actions to linked them together.
Definition: tag.class.php:32
const TAGADD
for($e=0; $e< count($afiche); $e++) exit
escape_xml($p_xml)
When data are transfered thanks ajax in a xml document, the xml can not contains some character,...