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             $forbidden=_("Accès interdit : vous n'avez pas accès à cette information, contactez votre responsable");
00045         ?>
00046 <a href="<?php echo $action?>" target="_blank" class="smallbutton"><?php echo _("Modifier")?> </a>
00047     <?php 
00048         endif;
00049 }
00050 else
00051 {
00052         echo h2(_("Ce document n'est pas accessible"),"error");
00053         ?>
00054         <div style="margin:0px;padding:0px;background-color:red;text-align:center;">
00055         <h2 class="error"><?php echo $forbidden ?></h2>;
00056 </div>
00057         <?php 
00058 }
00059 echo HtmlInput::button_close($div);
00060 $response =  ob_get_clean();
00061 $html=escape_xml($response);
00062 header('Content-type: text/xml; charset=UTF-8');
00063 echo <<<EOF
00064 <?xml version="1.0" encoding="UTF-8"?>
00065 <data>
00066 <ctl></ctl>
00067 <code>$html</code>
00068 </data>
00069 EOF;
00070 exit();
00071 
00072 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations