Ejemplo n.º 1
0
 function fill_from_action(&$p_array, $p_style)
 {
     global $g_user;
     $profile = $g_user->get_profile();
     $cn = new Database(dossier::id());
     $sql = "select ag_id,to_char(ag_remind_date,'DD')::integer as ag_timestamp_day,ag_title,ag_hour,\n             coalesce(name,'interne') as str_name\n\t\t\t" . " from action_gestion " . "  left join vw_fiche_name  on (f_id=f_id_dest) " . " where " . " to_char(ag_remind_date,'MM')::integer=\$1 " . " and to_char(ag_remind_date,'YYYY')::integer=\$2 " . "  and ag_dest in (select p_granted from user_sec_action_profile where p_id =\$3)\n\t\t\t\t and ag_state IN (2, 3)\n\t\t\t\t";
     $array = $cn->get_array($sql, array($this->month, $this->year, $profile));
     for ($i = 0; $i < count($array); $i++) {
         $ind = $array[$i]['ag_timestamp_day'];
         $this->action[$ind][] = $array[$i]['ag_id'];
         $this->title[$ind][] = $array[$i]['ag_title'];
         $this->hour[$ind][] = $array[$i]['ag_hour'];
         $this->str_name[$ind][] = $array[$i]['str_name'];
     }
     /*
      * Fill foreach day
      */
     if ($p_style == "short") {
         foreach ($this->action as $day => $aAction) {
             if ($p_array[$day] == "") {
                 $p_array[$day] = '<span class="input_text" onclick="display_task(\'tsk' . $day . '\');">' . " " . count($aAction) . " " . _("Tâches") . '</span>';
             }
             $this->action_div[$day] = '<div id="tsk' . $day . '" class="inner_box" style="width:200;display:none">';
             $this->action_div[$day] .= HtmlInput::title_box($day . "/" . $this->month . "/" . $this->year, "tsk" . $day, "hide");
             $this->action_div[$day] .= "<ol>";
             for ($i = 0; $i < count($aAction); $i++) {
                 $this->action_div[$day] .= '<li>' . HtmlInput::detail_action($aAction[$i], $this->title[$day][$i]) . '</li>';
             }
             $this->action_div[$day] .= '</ol></div>';
         }
     } else {
         if ($p_style == "long") {
             foreach ($this->action as $day => $aAction) {
                 $p_array[$day] .= "<ol>";
                 for ($i = 0; $i < count($aAction); $i++) {
                     $p_array[$day] .= '<li>' . hb($this->str_name[$day][$i]) . '&rarr;' . HtmlInput::detail_action($aAction[$i], $this->hour[$day][$i] . " " . $this->title[$day][$i]) . '</li>';
                 }
                 $p_array[$day] .= '</ol>';
             }
         }
     }
 }
Ejemplo n.º 2
0
</h1>
  <?php 
}
/**
 * show possible linked actions
 */
echo '<ul style="list-style-type:square;">';
for ($i = 0; $i < count($a_followup); $i++) {
    $remove = '';
    if ($access == 'W') {
        $remove = HtmlInput::button_action_remove_operation($a_followup[$i]['ago_id']);
    }
    if ($div == 'popup') {
        echo '<li id="op' . $a_followup[$i]['ago_id'] . '">' . HtmlInput::detail_action($a_followup[$i]['ag_id'], h($a_followup[$i]['ag_ref'] . " " . $a_followup[$i]['ag_title']), 0) . $remove . '</li>';
    } else {
        echo '<li id="op' . $a_followup[$i]['ago_id'] . '">' . HtmlInput::detail_action($a_followup[$i]['ag_id'], h($a_followup[$i]['ag_ref'] . " " . $a_followup[$i]['ag_title']), 1) . $remove . '</li>';
    }
}
echo '</ul>';
$related = new IRelated_Action('related');
$related->id = 'related' . $div;
if ($access == 'W') {
    echo $related->input();
}
echo '</div>';
?>

<?php 
require_once NOALYSS_INCLUDE . '/template/ledger_detail_file.php';
?>
Ejemplo n.º 3
0
    <table style="width: 100%">
    <?php 
for ($i = 0; $i < $len_array; $i++) {
    ?>
        <tr class=" <?php 
    echo $i % 2 == 0 ? 'even' : 'odd';
    ?>
">
            <td class="box">
                <?php 
    echo smaller_date($array[$i]['ag_timestamp_fmt']);
    ?>
            </td>
            <td class="box">
                <?php 
    echo HtmlInput::detail_action($array[$i]['ag_id'], $array[$i]['ag_ref'], 1);
    ?>
            </td>
            <td class="box">
                <?php 
    echo mb_substr(h($array[$i]['quick_code']), 0, 15);
    ?>
            </td>
            <td class="box cut">
                <?php 
    echo h($array[$i]['ag_title']);
    ?>
            </td>
        </tr>
    <?php 
}
Ejemplo n.º 4
0
        echo $a_event[$i]['delta_days'], " " . _('jours');
    }
    ?>
            </td>
            <td>
                <?php 
    echo $a_event[$i]['str_date'];
    ?>
                &nbsp; 
                <?php 
    echo $a_event[$i]['ag_hour'];
    ?>
            </td>
            <td>
                <?php 
    echo HtmlInput::detail_action($a_event[$i]["ag_id"], $a_event[$i]["str_name"]);
    ?>
            </td>
            <td>
                <?php 
    echo h($a_event[$i]['ag_title']);
    ?>
            </td>
        </tr>
        
<?php 
}
?>
    </table>