noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
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 ) {
16 header('Content-type: text/xml; charset=UTF-8');
17 $html=escape_xml(sprintf(
18'%s
19 <p class="error">
20%s
21</p>
22%s
23', HtmlInput::title_box(_("Etiquette"), "tag_div","close","","y")
24 ,_("Désolé, vous n'êtes pas autorisé à créer des étiquettes")
25 , HtmlInput::button_close("tag_div")
26 ));
27
28 echo <<<EOF
29<?xml version="1.0" encoding="UTF-8"?>
30<data>
31<ctl></ctl>
32<code>$html</code>
33</data>
34EOF;
35 return;
36}
37echo HtmlInput::title_box(_("Etiquette"), "tag_div","close","","y");
38$data->load();
39?>
40<?php
41// save via POST and reload page
42if ($_GET['form']=='p') : ?>
43 <form id="tag_detail_frm" method="POST" >
44<?php
45/*
46 * save via javascript and don't reload page
47 */
48else :
49 ?>
50 <form id="tag_detail_frm" method="POST" onsubmit="return save_tag();">
51<?php endif; ?>
52 <?php
53 echo dossier::hidden();
54 echo HtmlInput::hidden('t_id', $http->get('tag') );
55 echo HtmlInput::hidden('ac',$http->get('ac'));
56
57
58 require_once NOALYSS_TEMPLATE.'/tag_detail.php';
59 echo HtmlInput::submit("save_tag_sb", "Valider");
60 echo HtmlInput::button_close("tag_div");
61
62 ?>
63</form>
64<?php
65 $response= ob_get_clean();
66if (headers_sent() && DEBUGNOALYSS > 0 ) {
67 echo $response;
68}else {
69 header('Content-type: text/xml; charset=UTF-8');
70}
72 echo <<<EOF
73<?xml version="1.0" encoding="UTF-8"?>
74<data>
75<ctl></ctl>
76<code>$html</code>
77</data>
78EOF;
79 exit();
80 ?>
global $g_user
if no group available , then stop
if(headers_sent() &&DEBUGNOALYSS > 0) else
if(headers_sent() &&DEBUGNOALYSS > 0) $html
_("actif, passif,charge,...")
$_GET['qcode']
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n', $raw="", $refresh='')
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
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,...