noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
ajax_view_action.php
Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  *   This file is part of NOALYSS.
00005  *
00006  *   NOALYSS is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License as published by
00008  *   the Free Software Foundation; either version 2 of the License, or
00009  *   (at your option) any later version.
00010  *
00011  *   NOALYSS is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details.
00015  *
00016  *   You should have received a copy of the GNU General Public License
00017  *   along with NOALYSS; if not, write to the Free Software
00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00022 
00023 /**
00024  * @file
00025  * @brief show the detail of an action
00026  *
00027  */
00028 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00029 ob_start();
00030 require_once 'class_follow_up.php';
00031 require_once 'class_default_menu.php';
00032 
00033 echo HtmlInput::title_box(_("Détail action"), $div);
00034 $act = new Follow_Up($cn);
00035 $act->ag_id = $ag_id;
00036 $act->get();
00037 if ($g_user->can_write_action($ag_id) == true || $g_user->can_read_action($ag_id) == true || $act->ag_dest == -1)
00038 {   
00039         $menu=new Default_Menu();
00040         echo $act->Display('READ', false, "ajax", "");
00041         //$action=HtmlInput::array_to_string(array("gDossier","ag_id"), $_GET)."&ac=FOLLOW&sa=detail";
00042         $action=  "do.php?".http_build_query(array("gDossier"=>Dossier::id(),"ag_id"=>$ag_id,"ac"=>$menu->get('code_follow'),"sa"=>"detail"));
00043         if ( $_GET['mod']== 1) :
00044         ?>
00045 <a href="<?php echo $action?>" target="_blank" class="smallbutton"><?php echo _("Modifier")?> </a>
00046     <?php 
00047         endif;
00048 }
00049 else
00050 {
00051         echo h2(_("Ce document n'est pas accessible"),"error");
00052         ?>
00053         <div style="margin:0px;padding:0px;background-color:red;text-align:center;">
00054 <h2 class="error">Accès interdit : vous n'avez pas accès à cette information, contactez votre responsable</h2>;
00055 </div>
00056         <?php 
00057 }
00058 echo HtmlInput::button_close($div);
00059 $response =  ob_get_clean();
00060 $html=escape_xml($response);
00061 header('Content-type: text/xml; charset=UTF-8');
00062 echo <<<EOF
00063 <?xml version="1.0" encoding="UTF-8"?>
00064 <data>
00065 <ctl></ctl>
00066 <code>$html</code>
00067 </data>
00068 EOF;
00069 exit();
00070 
00071 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations