Example #1
0
 *
 */
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
ob_start();
require_once NOALYSS_INCLUDE . '/class_follow_up.php';
require_once NOALYSS_INCLUDE . '/class_default_menu.php';
echo HtmlInput::title_box(_("Détail action"), $div);
$act = new Follow_Up($cn);
$act->ag_id = $ag_id;
$act->get();
$code = 'nok';
if ($g_user->can_write_action($ag_id) == true || $g_user->can_read_action($ag_id) == true || $act->ag_dest == -1) {
    $menu = new Default_Menu();
    echo $act->Display('READ', false, "ajax", "");
    //$action=HtmlInput::array_to_string(array("gDossier","ag_id"), $_GET)."&ac=FOLLOW&sa=detail";
    $action = "do.php?" . http_build_query(array("gDossier" => Dossier::id(), "ag_id" => $ag_id, "ac" => $menu->get('code_follow'), "sa" => "detail"));
    $code = 'ok';
    if ($_GET['mod'] == 1) {
        $forbidden = _("Accès interdit : vous n'avez pas accès à cette information, contactez votre responsable");
        ?>
<a href="<?php 
        echo $action;
        ?>
" target="_blank" class="smallbutton"><?php 
        echo _("Modifier");
        ?>
 </a>
    <?php 
        $code = 'nok';
// Add an action
if ($sub_action == "add_action") {
    $act = new Follow_Up($cn);
    $act->fromArray($_POST);
    $act->ag_id = 0;
    $act->d_id = 0;
    echo '<div class="content">';
    // Add hidden tag
    echo '<form method="post" action="do.php" name="form_add" id="form_add" enctype="multipart/form-data" >';
    echo $supl_hidden;
    echo dossier::hidden();
    $act->ag_comment = isset($_POST['ag_comment']) ? Decode($_POST['ag_comment']) : "";
    if (isset($_REQUEST['qcode'])) {
        $act->qcode_dest = $_REQUEST['qcode'];
    }
    echo $act->Display('NEW', false, $base, $retour);
    echo '<input type="hidden" name="ac" value="' . $_REQUEST["ac"] . '">';
    echo '<input type="hidden" name="sa" value="save_action_st2">';
    echo '<input type="hidden" name="save_action_st2" value="save_action_st2">';
    echo '<input type="submit" class="button" name="save_action_st2" value="' . _('Enregistrer') . '">';
    echo '</form>';
    echo '</div>';
}
if ($error_id != 0) {
    $error[10] = 'dt_id';
    $error[20] = 'ag_timestamp';
    $error[30] = 'ag_remind_date';
    $div = $error[$error_id];
    $js = <<<EOF
    <script>\$('{$div}').style.borderColor="red";
   \$('info_div').innerHTML='erreur';     
Example #3
0
 static function action_print($cn, $p_array)
 {
     global $g_user;
     $mag_id = $p_array['mag_id'];
     for ($i = 0; $i < count($mag_id); $i++) {
         if ($g_user->can_read_action($mag_id[$i]) == false) {
             continue;
         }
         $a = new Follow_Up($cn, $mag_id[$i]);
         $a->get();
         echo '<div class="content">';
         echo $a->Display("READ", false, "");
         echo '</div>';
         echo '<P id="breakhere"> - - </p>';
     }
 }