noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
ajax_tag_detail.php
Go to the documentation of this file.
00001 <?php
00002 /**
00003  * @brief display a window with the content of a tag
00004  */
00005 //This file is part of NOALYSS and is under GPL 
00006 //see licence.txt
00007 
00008 if ( !defined ('ALLOWED') )  die('Appel direct ne sont pas permis');
00009 require_once 'class_tool_uos.php';
00010 require_once 'class_tag.php';
00011 ob_start();
00012 $tag=new Tag($cn);
00013 $tag->data->t_id=$_GET['tag'];
00014 $tag->data->load();
00015 echo HtmlInput::title_box(_("Détail du dossier ou tag"), "tag_div");
00016 
00017 ?>
00018 <?php
00019 // save via POST and reload page 
00020 if ($_GET['form']=='p') :    ?>
00021     <form id="tag_detail_frm" method="POST" >
00022 <?php 
00023 /*
00024  * save via javascript and don't reload page
00025  */
00026 else :
00027     ?>
00028     <form id="tag_detail_frm" method="POST" onsubmit="return save_tag();">
00029 <?php        endif; ?>        
00030     <?php
00031     echo dossier::hidden();
00032     echo HtmlInput::hidden('t_id', $_GET['tag']);
00033     echo HtmlInput::hidden('ac',$_GET['ac']);
00034     $data=$tag->data;
00035     require_once 'template/tag_detail.php';
00036     echo HtmlInput::submit("save_tag_sb", "Valider");
00037     ?>
00038 </form>
00039 <?php
00040     $response=  ob_get_clean();
00041     $html=escape_xml($response);
00042     header('Content-type: text/xml; charset=UTF-8');
00043     echo <<<EOF
00044 <?xml version="1.0" encoding="UTF-8"?>
00045 <data>
00046 <ctl></ctl>
00047 <code>$html</code>
00048 </data>
00049 EOF;
00050     exit();
00051     ?>
 All Data Structures Namespaces Files Functions Variables Enumerations