Esempio n. 1
0
/**
 * Créer un objet HTML de type calendrier
 * @param <type> $champ
 * @param <type> $table
 * @param <type> $value
 * @param <type> $editable
 */
function html_calendar($champ, $table, $value, $editable = false, $warning_update = false)
{
    //Date d'échéance de la FTA
    //$champ="date_echeance_fta";
    //$table="fta";
    $bloc = "";
    ${'NOM_' . $champ} = DatabaseOperation::getColumnInfoLabel($table, $champ);
    $html_image_modif = "&nbsp;<img src=../lib/images/exclamation.png alt=\"\" title=\"Information mise à jour\" width=\"20\" height=\"18\" border=\"0\" />";
    $html_color_modif = "bgcolor=#B0FFFE";
    //Versionning
    $image_modif = "";
    $color_modif = "";
    if ($warning_update) {
        $image_modif = $html_image_modif;
        $color_modif = $html_color_modif;
    }
    $bloc .= "<tr class=contenu><td  width=\"40%\" {$color_modif}>{${'NOM_' . $champ}}:</td><td {$color_modif}>";
    if ($editable) {
        $bloc .= calendrier($champ, $value);
        $bloc .= "<i>&nbsp;Effacer cette échéance pour supprimer toutes les autres échéances de processus</i>";
    } else {
        $bloc .= "{$value}";
    }
    $bloc .= "{$image_modif}</td></tr>";
    return $bloc;
}