function afficher_banque($recherche)
{
    $query = "SELECT * FROM BANQUE WHERE BAN_NO=" . $recherche;
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    $result = afficher('Nom de la banque : ', $row['BAN_NOM'], 'span3', 'span5', false) . sautLigne() . afficher('Code banque : ', $row['BAN_CDE_BAN'], 'span3', 'span3', false) . afficher('Code guichet : ', $row['BAN_CDE_GUI'], 'span3', 'span3', false) . sautLigne() . afficher('Numéro de compte banque : ', $row['BAN_NUM_CPT'], 'span3', 'span3', false) . afficher('Numéro de RIB : ', $row['BAN_RIB'], 'span3', 'span3', false);
    return $result;
}
function afficher_collaborateur_externe($recherche)
{
    //TODO:remettre correctement les liens...
    $query = "SELECT * FROM COLLABORATEUR C, EXTERNE E LEFT JOIN FOURNISSEUR F ON E.FOU_NO = F.FOU_NO WHERE E.COL_NO = C.COL_NO AND E.COL_NO = " . $recherche;
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    return creerFieldset('Identité :', afficher('Civilité :', $row['COL_CIVILITE'], 'span3', 'span3', false) . afficher('Prénom* :', $row['COL_PRENOM'], 'span3', 'span3', false) . sautLigne() . afficher('Nom* :', $row['COL_NOM'], 'span3', 'span3', false) . afficher('Nom de jeune fille :', $row['COL_NOMJEUNEFILLE'], 'span3', 'span3', false) . sautLigne() . afficher('Etat :', $row['COL_ETAT'] == 1 ? 'Actif' : 'Inactif', 'span3', 'span3', false) . afficher('Mnémonique* :', $row['COL_MNEMONIC'], 'span3', 'span3', false) . sautLigne() . afficher('Numéro de téléphone:', $row['COL_TEL'], 'span3', 'span3', false) . afficher('Numéro de téléphone portable*:', $row['COL_PRT'], 'span3', 'span3', false) . sautLigne() . afficher('E-mail :', $row['COL_EMAIL'], 'span3', 'span3', false) . afficher('Nom du fournisseur :', $row['FOU_NOM'], 'span3', 'span3', false) . sautLigne() . afficher('Archivé :', $row['COL_ARCHIVE'] == 1 ? 'Oui' : 'Non', 'span3', 'span3', false));
}
function afficher_entreprise($recherche)
{
    $query = "SELECT * FROM ENTREPRISE WHERE ENT_NO=" . $recherche;
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    $result = afficher('Nom de l\'entreprise : ', $row['ENT_NOM'], 'span3', 'span3', false) . afficher('Statut : ', $row['ENT_STATUT'], 'span3', 'span3', false) . sautLigne() . afficher('Adresse : ', $row['ENT_ADRESSE'], 'span3', 'span3', false) . afficher('Complément d\'adresse : ', $row['ENT_ADRESSE_2'], 'span3', 'span3', false) . sautLigne() . afficher('Code postal : ', $row['ENT_CP'], 'span3', 'span3', false) . afficher('Numéro de téléphone : ', $row['ENT_TEL'], 'span3', 'span3', false) . sautLigne() . afficher('Ville : ', $row['ENT_VILLE'], 'span3', 'span3', false) . afficher('Capital : ', $row['ENT_CAPITAL'], 'span3', 'span3', false) . sautLigne() . afficher('Numéro de TVA intracommunautaire : ', $row['ENT_TVA_INTRA'], 'span3', 'span3', false) . afficher('Numéro du RCS : ', $row['ENT_RCS'], 'span3', 'span3', false) . sautLigne() . afficher('Numéro SIRET : ', $row['ENT_SIRET'], 'span3', 'span3', false) . afficher('Numéro APE : ', $row['ENT_APE'], 'span3', 'span3', false) . sautLigne() . afficher('Adresse web : ', $row['ENT_SITE_WEB'], 'span3', 'span3', false) . sautLigne() . afficher_image('Logo entête : ', $row['ENT_LOGO'], 'span3', 'span3', true) . afficher_image('Logo pied : ', $row['ENT_LOGOPIED'], 'span3', 'span3', true);
    return $result;
}
function afficher_libdocument($recherche)
{
    $query = "SELECT * FROM LIBDOCUMENT L LEFT JOIN COLLABORATEUR COL ON COL.COL_NO=L.COL_NO WHERE L.DOC_NO=" . $recherche;
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    return afficher('Document :', $row['LDO_DOCNO'], 'span2', 'span3') . afficher('No d\'ordre :', $row['LDO_ORDRE'], 'offset1 span2', 'span3') . sautLigne() . afficher('Intitulé :', $row['LDO_NOM'], 'span2', 'span3') . sautLigne() . afficher_textarea('Contenu :', $row['LDO_CONTENU'], 2, 8, 6, 80, 'textarea800');
    return $result;
}
function afficher_modereglement($recherche)
{
    $query = "SELECT * FROM MODEREGLEMENT WHERE MOR_NO=" . $recherche;
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    $result = afficher('Code : ', $row['MOR_CODE'], 'span3', 'span3', false) . sautLigne() . afficher('Libellé : ', $row['MOR_LIBELLE'], 'span3', 'span6', false) . sautLigne();
    return $result;
}
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le libell� choisi puis validez';
    } else {
        $legende = 'Nouveau libell�';
    }
    return creerFieldset($legende, array(inputRO('Document :', 'DOCNOM', 2, 4), inputRO('No d\'ordre* :', 'ORDRE', 2, 2), sautLigne(), input('Intitul�* :', 'NOMD', 2, 4, true, 'text', '', 'input500'), input('', 'COL', 2, 4, false, 'hidden'), sautLigne(), textarea('Contenu* :', 'CONTENU', 2, 8, true, 10, 80, 'textarea800'), input('', 'DOCNO', 2, 4, false, 'hidden')));
}
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez la fonction choisie puis validez';
    } else {
        $legende = 'Nouvelle fonction';
    }
    return creerFieldset($legende, array(input('Libell� de la fonction* :', 'NOM', 3, 3, true), sautLigne()));
}
/**
 * affiche le formulaire correspondant � l'ajout ou � la modification d'un enregistrement
 * @param bool $modification
 */
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le mode de r�glement choisie puis validez';
    } else {
        $legende = 'Nouveau mode de r�glement';
    }
    $retour = creerFieldset($legende, array(input('Code :', 'CODE', 3, 3, true), sautLigne(), input('Libell� :', 'LIBELLE', 3, 3, true, 'text', '', 'input500'), sautLigne()));
    return $retour;
}
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le fournisseur choisi puis validez';
    } else {
        $legende = 'Nouveau fournisseur';
        $_POST['ARCHIVE'] = 0;
    }
    return creerFieldset($legende, array(input('Code fournisseur* :', 'CODE', 3, 3, true), input('Nom du fournisseur* :', 'NOM', 3, 3, true, 'text'), sautLigne(), input('Date de d�but de collaboration* :', 'DTCREATION', 3, 3, true, 'date'), radio('Etat du fournisseur :', 'ARCHIVE', 'Archiv�', 'Encours', 3, 1, 2)));
}
/**
 * affiche le formulaire correspondant � l'ajout ou � la modification d'un projet
 * @param bool $modification
 */
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez la banque choisie puis validez';
    } else {
        $legende = 'Nouvelle banque';
    }
    $retour = creerFieldset($legende, array(input('Nom de la banque :', 'NOM', 3, 5, true, 'text', '', 'input500'), sautLigne(), input('Code banque :', 'CDE_BAN', 3, 3, true), input('Code guichet :', 'CDE_GUI', 3, 3, true), sautLigne(), input('Num�ro de compte banque :', 'NUM_CPT', 3, 3, true), input('Num�ro de RIB :', 'RIB', 3, 3, true)));
    return $retour;
}
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le contact client choisi puis validez';
    } else {
        $legende = 'Nouveau contact client';
        $_POST['ARCHIVE'] = 0;
    }
    return creerFieldset($legende, array(select('Client :', 'CLIENT', donner_liste('CLIENT', 'CLI'), 3, 3), input('Nom du contact* :', 'NOM', 3, 3, true), sautLigne(), input('Prénom du contact* :', 'PRENOM', 3, 3, true), input('E-mail du contact* :', 'EMAIL', 3, 3, true), sautLigne(), input('Portable du contact* :', 'PRT', 3, 3, true), select('Fonction du contact* :', 'FONCTION', array('' => '') + donner_liste('FONCTION', 'FCT'), 3, 3, false), sautLigne(), radio('Etat du contact :', 'ARCHIVE', 'Archivé', 'Encours', 3, 1, 2), sautLigne(), input('Commentaire :', 'COMMENTAIRE', 3, 3)));
}
/**
 * affiche le formulaire correspondant à l'ajout ou à la modification d'un collaborateur interne
 * @param bool $modification
 */
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le collaborateur externe choisi puis validez';
        //$mailApsa = input('Email Apsaroke :', 'EMAILAPSA', 3, 3, true, 'hidden');
    } else {
        $legende = 'Nouveau collaborateur externe';
        //$mailApsa = input('Email Apsaroke :', 'EMAILAPSA', 3, 3, true, 'hidden');
    }
    return creerFieldset($legende, array(select('Civilité :', 'CIVILITE', array('M.' => 'M.', 'Mme.' => 'Mme.', 'Mlle.' => 'Mlle.'), 3, 3), input('Prénom* :', 'PRENOM', 3, 3, true), sautLigne(), input('Nom* :', 'NOM', 3, 3, true), input('Nom de jeune fille :', 'NOMJEUNEFILLE', 3, 3), sautLigne(), radio('Etat :', 'ETAT', 'Actif', 'Inactif', 3, 1, 1), inputMNEMO('Mnémonique* :', 'MNEMONIC', 3, 3, 'offset1'), '<span id="txtHint"></span>', sautLigne(), input('Numéro de téléphone :', 'TEL', 3, 3), input('Numéro de téléphone portable* :', 'PRT', 3, 3, true), sautLigne(), input('E-mail :', 'EMAIL', 3, 3), select('Fournisseur* :', 'FOURNISSEUR', donner_liste('fournisseur', 'FOU'), 3, 3), sautLigne(), radio('Archiver :', 'ARCHIVE', 'Oui', 'Non  ', 3, 1, 1)));
}
function afficher_collaborateur_interne($recherche)
{
    $query = "SELECT * FROM COLLABORATEUR C, INTERNE I LEFT JOIN FONCTION FCT ON FCT.FCT_NO=I.FCT_NO WHERE I.COL_NO = C.COL_NO AND I.COL_NO = " . $recherche;
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    $retour = creerFieldset('Identité :', afficher('Civilité :', $row['COL_CIVILITE'], 'span3', 'span3', false) . sautLigne() . afficher('Prénom* :', $row['COL_PRENOM'], 'span3', 'span3', false) . afficher('Nom* :', $row['COL_NOM'], 'span3', 'span3', false) . sautLigne() . afficher('Etat :', $row['COL_ETAT'] == 1 ? 'Actif' : 'Inactif', 'span3', 'span3', false) . afficher('Archivé :', $row['COL_ARCHIVE'] == 1 ? 'Oui' : 'Non', 'span3', 'span3', false) . sautLigne() . afficher('Mnémonique* :', $row['COL_MNEMONIC'], 'span3', 'span3', false) . afficher('Période d\'essai :', $row['INT_PERIODEESSAI'] == 1 ? 'Oui' : 'Non', 'span3', 'span3', false) . sautLigne() . afficher('Prolongation de la période d\'essai :', $row['INT_PPE'] == 1 ? 'Oui' : 'Non', 'span3', 'span3', false));
    $retour .= creerFieldset('Coordonnées :', afficher('Adresse* :', $row['INT_ADRESSE'], 'span3', 'span3', false) . afficher('Adresse 2 :', $row['INT_ADRESSE2'], 'span3', 'span3', false) . sautLigne() . afficher('Code postal* :', $row['INT_CP'], 'span3', 'span3', false) . afficher('Ville* :', $row['INT_VILLE'], 'span3', 'span3', false) . sautLigne() . afficher('Numéro de téléphone :', $row['COL_TEL'], 'span3', 'span3', false) . afficher('Numéro de téléphone portable* :', $row['COL_PRT'], 'span3', 'span3', false) . sautLigne() . afficher('E-mail :', $row['COL_EMAIL'], 'span3', 'span3', false) . afficher('E-mail Apsaroke :', $row['COL_EMAILAPSA'], 'span3', 'span3', false));
    $retour .= creerFieldset('Informations Complémentaires :', afficher('N° de sécurité sociale :', $row['INT_NSS'], 'span3', 'span3', false) . afficher('Date de naissance* :', format_date($row['INT_DTNAISSANCE']), 'span3', 'span3', false) . sautLigne() . afficher('Lieu de naissance* :', $row['INT_LIEUNAISSANCE'], 'span3', 'span3', false) . afficher('Nationalité :', $row['INT_NATIONALITE'], 'span3', 'span3', false));
    $retour .= creerFieldset('Détails :', afficher('Date d\'entrée* :', format_date($row['INT_DTENTREE']), 'span3', 'span3', false) . afficher('Date de départ :', format_date($row['INT_DTDEPART']), 'span3', 'span3', false) . sautLigne() . afficher('Fonction :', $row['FCT_NOM'], 'span3', 'span3', false) . afficher('Statut :', $row['INT_STATUT'], 'span3', 'span3', false) . sautLigne() . afficher('Coefficient :', $row['INT_COEFF'], 'span3', 'span3', false) . afficher('Position :', $row['INT_POSITION'], 'span3', 'span3', false) . sautLigne() . afficher('Type de contrat :', $row['INT_TYPECONTRAT'], 'span3', 'span3', false) . afficher('Type d\'horaire :', $row['INT_TYPEHORAIRE'], 'span3', 'span3', false) . sautLigne() . afficher('Rémunération fixe annuelle (euros) :', $row['INT_REMUNFIXE'], 'span3', 'span3', false) . afficher('Rémunération variable annuelle (euros) :', $row['INT_REMUNVAR'], 'span3', 'span3', false) . sautLigne() . afficher('Frais journaliers (euros) :', $row['INT_FRAIS'], 'span3', 'span3', false));
    $retour .= creerFieldset('Informations bancaires :', afficher('Nom de la banque :', $row['INT_NOMBANQUE'], 'span3', 'span3', false) . afficher('IBAN :', $row['INT_IBAN'], 'span3', 'span3', false) . sautLigne() . afficher('BIC :', $row['INT_BIC'], 'span3', 'span3', false));
    $retour .= creerFieldset('Spécification collaborateur', afficher('Facturable :', $row['INT_FACTURABLE'] == 1 ? 'Oui' : 'Non', 'span3', 'span3', false) . afficher('Coût GSM (euros) :', $row['INT_GSM'], 'span3', 'span3', false) . sautLigne() . afficher('Treizième mois :', $row['INT_TREIZIEME'] == 1 ? 'Oui' : 'Non', 'span3', 'span3', false) . afficher('Coût PEE mensuel (euros) :', $row['INT_PEE'], 'span3', 'span3', false) . sautLigne() . afficher('Prime variable :', $row['INT_PART_VARI'] == 1 ? 'Oui' : 'Non', 'span3', 'span3', false) . afficher('Prime d\'ancienneté (euros) :', $row['INT_PRIME_ANCI'], 'span3', 'span3', false) . sautLigne() . afficher('Tickets restaurants :', $row['INT_TR'] == 1 ? 'Oui' : 'Non', 'span3', 'span3', false));
    return $retour;
}
/**
 * affiche le formulaire correspondant � l'ajout ou � la modification d'un projet
 * @param bool $modification
 */
function afficherFormulaire($modification = false, $link = false)
{
    if ($modification) {
        $legende = 'Modifiez l\'entreprise choisie puis validez';
    } else {
        $legende = 'Nouvelle entreprise';
    }
    $_POST['IMGENT'] = $_POST['LOGO'];
    $_POST['IMGPIE'] = $_POST['LOGOPIED'];
    $retour = creerFieldset($legende, array(input('Nom de l\\entreprise : ', 'NOM', 3, 3, true), input('Statut de l\'entreprise : ', 'STATUT', 3, 3, true), sautLigne(), input('Adresse de l\'entreprise : ', 'ADRESSE', 3, 3, true), input('Compl�ment d\'adresse de l\'entreprise : ', 'ADRESSE_2', 3, 3, false), sautLigne(), input('Code postal de l\'entreprise : ', 'CP', 3, 3, true), input('Num�ro de t�l�phone l\'entreprise : ', 'TEL', 3, 3, true), sautLigne(), input('Ville de l\'entreprise : ', 'VILLE', 3, 3, true), input('Capital de l\'entreprise : ', 'CAPITAL', 3, 3, true), sautLigne(), input('Num�ro de TVA intracommunautaire de l\'entreprise : ', 'TVA_INTRA', 3, 3, true), input('Num�ro du RCS de l\'entreprise : ', 'RCS', 3, 3, true), sautLigne(), input('Num�ro SIRET de l\'entreprise : ', 'SIRET', 3, 3, true), input('Num�ro APE de l\'entreprise : ', 'APE', 3, 3, true), sautLigne(), input('Adresse web de l\'entreprise : ', 'SITE_WEB', 3, 3, false), sautLigne(), input('Logo ent�te : ', 'LOGO', 3, 3, false, 'file', '', '', $_POST['LOGO']), sautLigne(), input('Logo pied : ', 'LOGOPIED', 3, 3, false, 'file', '', '', $_POST['LOGOPIED']), input('', 'IMGENT', 0, 0, false, 'hidden'), input('', 'IMGPIE', 0, 0, false, 'hidden')));
    return $retour;
}
function afficher_client($recherche)
{
    $query = "SELECT * FROM CLIENT WHERE  CLI_NO='" . $recherche . "'";
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    $contenu = null;
    $image = null;
    if (isset($row['CLI_LOGO'])) {
        $contenu = $row['CLI_LOGO'];
        $image = true;
    } else {
        $contenu = 'Ce client n\'a pas de logo';
        $image = false;
    }
    return creerFieldset('Identité :', afficher('Code client :', $row['CLI_CODE'], 'span3', 'span3', false) . sautLigne() . afficher('Début de collaboration :', format_date($row['CLI_DTCREATION']), 'span3', 'span3', false) . afficher('Etat du client :', $row['CLI_ARCHIVE'] == 1 ? 'Archivé' : 'Actif', 'span3', 'span3') . sautLigne() . afficher('', '<b>Informations commerciales</b>', 'span2', 'span4', false) . afficher('', '<b>Informations facturation</b>', 'span2', 'span4', false) . sautLigne() . afficher('Nom  :', $row['CLI_NOM'], 'span3', 'span3', false) . afficher('Nom de facturation :', $row['CLI_NOMFAC'], 'span3', 'span3', false) . sautLigne() . afficher('1ère adresse :', $row['CLI_ADRCOM_1'], 'span3', 'span3', false) . afficher('1ère adresse :', $row['CLI_ADRFAC_1'], 'span3', 'span3', false) . sautLigne() . afficher('2ème adresse :', $row['CLI_ADRCOM_2'], 'span3', 'span3', false) . afficher('2ème adresse :', $row['CLI_ADRFAC_2'], 'span3', 'span3', false) . sautLigne() . afficher('Code postal :', $row['CLI_CPCOM'], 'span3', 'span3', false) . afficher('Code postal :', $row['CLI_CPFAC'], 'span3', 'span3', false) . sautLigne() . afficher('Ville :', $row['CLI_VILLECOM'], 'span3', 'span3', false) . afficher('Ville :', $row['CLI_VILLEFAC'], 'span3', 'span3', false) . sautLigne() . afficher('Pays :', $row['CLI_PAYS'], 'span3', 'span3', false) . afficher('Code fournisseur :', $row['CLI_CODE_FOUR'], 'span3', 'span3', false) . sautLigne() . afficher_image('Logo du client :', $contenu, 'span3', 'span3', $image));
}
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le client choisi puis validez';
    } else {
        $legende = 'Nouveau client';
    }
    $contenu = null;
    $image = null;
    if (isset($_POST['LOGO'])) {
        $contenu = $_POST['LOGO'];
        $image = true;
    } else {
        $contenu = 'Ce client n\'a pas de logo';
        $image = false;
    }
    return creerFieldset($legende, array(input('Code client* :', 'CODE', 3, 3, true), input('Début de collaboration* :', 'DTCREATION', 3, 3, true, 'date', 'offset2'), sautLigne(), input('Nom du client* :', 'NOM', 3, 3, true, 'text'), input('Nom de facturation :', 'NOMFAC', 3, 3, true, 'text', 'offset1'), sautLigne(), input('1ère adresse* :', 'ADRCOM_1', 3, 3, true), input('1ème adresse :', 'ADRFAC_1', 3, 3, false, 'text', 'offset1'), sautLigne(), input('2ère adresse :', 'ADRCOM_2', 3, 3, true), input('2ème adresse :', 'ADRFAC_2', 3, 3, false, 'text', 'offset1'), sautLigne(), input('Code postal* :', 'CPCOM', 3, 3, true), input('Code postal :', 'CPFAC', 3, 3, false, 'text', 'offset1'), sautLigne(), input('Ville* :', 'VILLECOM', 3, 3, true), input('Ville :', 'VILLEFAC', 3, 3, false, 'text', 'offset1'), sautLigne(), input('Pays :', 'PAYS', 3, 3, false), input('Code fournisseur :', 'CODE_FOUR', 3, 3, false, 'text', 'offset1'), sautLigne(), afficher_image('Logo du client :', $contenu, 'span3', 'span3', $image), sautLigne(), input('', 'LOGO', 0, 2, false, 'file'), '<input type="hidden" ordre="1" name="logo_client" value="' . $contenu . '"></input>', '<br/><br/><div class="row" style="background-color:#F5F5F5; ">', '<button name="supprime" class="btn btn-primary" type="button">Supprimer l\'image <i class="icon-ok"></i> </button>', '</div>'));
}
/**
 * affiche le formulaire correspondant à l'ajout ou à la modification d'un collaborateur interne
 * @param bool $modification
 */
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $mailApsa = input('Email Apsaroke :', 'EMAILAPSA', 3, 3, true);
    } else {
        $mailApsa = '';
    }
    $retour = creerFieldset('Identité :', array(select('Civilité :', 'CIVILITE', array('M.' => 'M.', 'Mme.' => 'Mme.', 'Mlle.' => 'Mlle.'), 3, 3), input('Prénom* :', 'PRENOM', 3, 3, true), sautLigne(), input('Nom* :', 'NOM', 3, 3, true), input('Nom de jeune fille :', 'NOMJEUNEFILLE', 3, 3), sautLigne(), inputMNEMO('Mnémonique* :', 'MNEMONIC', 3, 3), '<span id="txtHint"></span>'));
    $retour .= creerFieldset('Coordonnées :', array(input('Adresse* :', 'ADRESSE', 3, 3, true), input('Adresse 2 :', 'ADRESSE2', 3, 3), sautLigne(), input('Code postal* :', 'CP', 3, 3, true), input('Ville* :', 'VILLE', 3, 3, true), sautLigne(), input('Numéro de téléphone :', 'TEL', 3, 3), input('Numéro de téléphone portable* :', 'PRT', 3, 3, true), sautLigne(), input('E-mail :', 'EMAIL', 3, 3), $mailApsa));
    $retour .= creerFieldset('Informations Complémentaires :', array(input('N° de sécurité sociale :', 'NSS', 3, 3), input('Date de naissance* :', 'DTNAISSANCE', 3, 3, true, 'date'), sautLigne(), input('Lieu de naissance* :', 'LIEUNAISSANCE', 3, 3, true), input('Nationalité :', 'NATIONALITE', 3, 3)));
    $retour .= creerFieldset('Détails :', array(input('Date d\'entrée* :', 'DTENTREE', 3, 3, true, 'date'), input('Date de départ :', 'DTDEPART', 3, 3, false, 'date'), sautLigne(), select('Fonction :', 'FONCTION', array('' => '') + donner_liste('FONCTION', 'FCT'), 3, 3, false), input('Statut :', 'STATUT', 3, 3), sautLigne(), input('Coefficient :', 'COEFF', 3, 3), input('Position :', 'POSITION', 3, 3), sautLigne(), input('Type de contrat :', 'TYPECONTRAT', 3, 3), input('Type d\'horaire :', 'TYPEHORAIRE', 3, 3), sautLigne(), input('Rémunération fixe :', 'REMUNFIXE', 3, 3), input('Rémunération variable :', 'REMUNVAR', 3, 3), sautLigne(), input('Frais journaliers :', 'FRAIS', 3, 3), sautLigne(), radio('Etat :', 'ETAT', 'Actif', 'Inactif', 3, 1, 1), '<div class="span1"></div>', radio('Archiver :', 'ARCHIVE', 'Oui', 'Non  ', 3, 1, 1), '<div class="span1"></div>', sautLigne(), radio('Tickets restaurants :', 'TR', 'Oui', 'Non', 3, 1, 1), sautLigne(), radio('Période d\'essai :', 'PERIODEESSAI', 'Oui', 'Non', 3, 1, 1), '<div class="span1">&nbsp;</div>', radio('Prolongation de la période d\'essai :', 'PPE', 'Oui', 'Non', 3, 1, 1)));
    $retour .= creerFieldset('Informations bancaires :', array(input('Nom de la banque :', 'NOMBANQUE', 3, 3), input('IBAN :', 'IBAN', 3, 3), sautLigne(), input('BIC :', 'BIC', 3, 3)));
    $retour .= creerFieldset('Spécification collaborateur', array(radio('Facturable :', 'FACTURABLE', 'Oui', 'Non', 3, 1, 0), '<div class="span1"></div>', input('Coût GSM :', 'GSM', 3, 3), sautLigne(), radio('Treizième mois :', 'TREIZIEME', 'Oui', 'Non', 3, 1, 0), '<div class="span1"></div>', input('Coût PEE mensuel :', 'PEE', 3, 3), sautLigne(), radio('Prime variable :', 'PART_VARI', 'Oui', 'Non', 3, 1, 0), '<div class="span1"></div>', input('Prime d\'ancienneté :', 'PRIME_ANCI', 3, 3)));
    if ($_SESSION['accreditation'] < 2) {
        $retour .= creerFieldset('Accréditation :', array(select('Accréditation :', 'TAUNO', array('' => '') + donner_liste('TYPE_AUTORISATION', 'TAU'), 3, 3, false)));
    }
    return $retour;
}
/**
 * affiche le formulaire correspondant à l'ajout ou à la modification d'un projet
 * @param bool $modification
 */
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le projet choisi puis validez';
        $cloture = sautLigne() . radio('Etat du projet :', 'ARCHIVE', 'Archivé', 'Encours', 2, 1, 2) . '<div class="span1"></div>';
        $dtcloture = input('Date de cloture :', 'DTCLOTURE', 3, 3, false, 'date');
        //$mission = sautLigne() . afficher('<b>MISSION</b>', '', 'span2', 'span3');
        $mission = 'MISSION';
    } else {
        $legende = 'Nouveau projet';
        $cloture = '';
        $dtcloture = '';
        //$mission = sautLigne() . afficher('<b>Nouvelle MISSION</b>', '', 'span2', 'span3');
        $mission = 'Nouvelle MISSION';
    }
    if ($_POST['action'] == 'creer') {
        //$mission = sautLigne() . afficher('<b>Nouvelle MISSION</b>', '', 'span2', 'span3');
        $mission = 'Nouvelle MISSION';
    }
    $retour = creerFieldset($legende, array(select('Client :', 'CLIENT', array() + donner_liste('CLIENT', 'CLI'), 3, 3, true), input('Nom du projet :', 'NOM', 3, 3, true), sautLigne(), select('Contact client :', 'CTC', array() + donner_liste('CONTACT_CLIENT', 'CTC'), 3, 3, false), select('Contact fournisseur (si il y en a un) :', 'CTF', array('' => '') + donner_liste('CONTACT_FOURNISSEUR', 'CTF'), 3, 3, false), sautLigne(), input('Date de démarrage :', 'DTDEBUT', 3, 3, true, 'date'), input('Numéro de cde du projet :', 'NUMCMDE', 3, 3, true), sautLigne(), select('Collaborateur :', 'COL', array() + donner_liste('COLLABORATEUR', 'COL'), 3, 3, false), select('Projet suivi par :', 'SUIVIPAR', array() + donner_liste('COMMERCIAL', 'COL'), 3, 3, false), sautLigne(), input('Durée prévisionnelle (jours) :', 'NBJOURS', 3, 3, false), input('Date de fin prévue :', 'DTFINPREVUE', 3, 3, false, 'date'), sautLigne(), textarea('Détails :', 'DETAIL', 3, 8, true, 1, 80, 'textarea800'), sautLigne(), textarea('Modalités :', 'MODALITE', 3, 8, false, 4, 80, 'textarea800'), $cloture, $dtcloture, input('', 'NO', 2, 3, true, 'hidden')));
    // Partie mission
    $retour .= creerFieldset($mission, array(input('Nom de la mission :', 'MISNOM', 3, 3, true), sautLigne(), input('Numéro de cde :', 'MISNUMCMDE', 3, 3, true), input('Date de cde :', 'MISDATECMDE', 3, 3, true, 'date'), sautLigne(), input('Début de mission :', 'MISDTDEBUT', 3, 3, true, 'date'), input('Fin de mission :', 'MISDTFIN', 3, 3, true, 'date'), sautLigne(), input('Durée prévisionnelle (jours) :', 'MISNBJOURS', 3, 3, false), sautLigne(), radio('Forfait :', 'MISFORFAIT', 'Oui', 'Non', 3, 1, 1), '<div class="span1"></div>', input('Montant du forfait :', 'MISMONTFORFAIT', 3, 3, false), sautLigne(), input('Taux journalier :', 'MISTJM', 3, 3, false), input('Prix d\'achat :', 'MISPA', 3, 3, false), sautLigne(), textarea('Commentaire :', 'MISCOMMENTAIRE', 3, 8, false, 4, 80, 'textarea800'), input('', 'MISORDRE', 2, 3, false, 'hidden'), input('', 'MISNSEQUENTIEL', 2, 3, false, 'hidden'), input('', 'MISNO', 2, 3, false, 'hidden'), input('', 'PRONO', 2, 3, false, 'hidden'), input('', 'idmission', 2, 3, false, 'hidden'), input('', 'action', 2, 3, false, 'hidden')));
    ob_start();
    ?>
<script>
    $(document).ready(function() {
        $('[name="DETAIL"]').css('width', '800px');
        $('[name="NOM"]').change(function(){
            $('[name="MISNOM"]').val($('[name="NOM"]').val());
        });
        $('[name="NUMCMDE"]').change(function(){
            $('[name="MISNUMCMDE"]').val($('[name="NUMCMDE"]').val());
        });
    });
</script>
        <?php 
    $retour .= ob_get_contents();
    ob_end_clean();
    return $retour;
}
function afficher_projet($recherche, $idmission = 0)
{
    $query = "SELECT P.*, CLI_NOM, CTC_NOM, COL.COL_PRENOM AS COL_PRENOM, COL.COL_NOM AS COL_NOM, COM.COL_PRENOM AS COM_PRENOM, COM.COL_NOM AS COM_NOM FROM PROJET P LEFT JOIN COLLABORATEUR COL ON COL.COL_NO=P.COL_NO LEFT JOIN COLLABORATEUR COM ON COM.COL_NO=P.PRO_SUIVIPAR, CONTACT_CLIENT CTC, CLIENT C WHERE C.CLI_NO=P.CLI_NO AND CTC.CTC_NO=P.CTC_NO AND P.PRO_NO=" . $recherche;
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    // Mission : par défaut, c'est la dernière mission
    if (!isset($idmission) || $idmission == 0 || $idmission == null) {
        $query = "SELECT MIS_NO FROM MISSION WHERE PRO_NO=" . $row['PRO_NO'] . " AND MIS_ORDRE IN (SELECT MAX(MIS_ORDRE) FROM MISSION WHERE PRO_NO=" . $row['PRO_NO'] . ")";
        $results = $GLOBALS['connexion']->query($query)->fetch_assoc();
        $idmission = $results['MIS_NO'];
    }
    $q2 = "SELECT * FROM MISSION WHERE MIS_NO=" . $idmission;
    $row2 = $GLOBALS['connexion']->query($q2)->fetch_assoc();
    $cloture = "";
    if ($row2['MIS_ARCHIVE'] > 0) {
        $cloture = afficher('<b>Mission ARCHIVEE</b>', '', 'span2', 'span3');
    }
    if (is_null($row['CTF_NO'])) {
        $row['CTF_NOM'] = "Aucun";
    } else {
        $qctc = "SELECT CTF_NOM FROM CONTACT_FOURNISSEUR WHERE CTF_NO =" . $row['CTF_NO'];
        $row['CTF_NOM'] = $GLOBALS['connexion']->query($qctc)->fetch_assoc();
    }
    if ($row2['MIS_NSEQUENTIEL'] != '') {
        // recherche de l'id de l'historique pour la ré-impression
        $q1 = "SELECT * FROM HISTDOC WHERE HID_TYPE='OMI' AND HID_IDDOC=" . $idmission;
        $r1 = $GLOBALS['connexion']->query($q1)->fetch_assoc();
        $iddoc = $r1['HID_NO'];
        $NSEQ = button('', 'MIS_NSEQUENTIEL', $row2['MIS_NSEQUENTIEL'], 1, 3, $classe = '', $clsinput = 'btn btn-primary', $link = 'javascript:reimpOMI(' . $row['PRO_NO'] . ', ' . $iddoc . ');');
    } else {
        $NSEQ = button('', 'MIS_NSEQUENTIEL', 'Ordre de Mission', 1, 3, $classe = '', $clsinput = 'btn btn-primary', $link = 'javascript:impOMI(' . $row2['MIS_NO'] . ');');
        $PRO_NO = '<input type="hidden" name="PRO_NO" value="' . $row2['PRO_NO'] . '">';
    }
    $det = str_replace('\\n', '', $row['PRO_DETAIL']);
    $det = str_replace('\\r', '<br />', $det);
    $result = creerFieldset('Projet', array(afficher('Client :', $row['CLI_NOM'], 'span3', 'span3'), afficher('Nom du projet :', $row['PRO_NOM'], 'span3', 'span3'), sautLigne(), afficher('Contact client :', $row['CTC_NOM'], 'span3', 'span3'), afficher('Partenaire éventuel :', $row['CTF_NOM'], 'span3', 'span3'), sautLigne(), afficher('Début du projet :', format_date($row['PRO_DTDEBUT']), 'span3', 'span3'), afficher('Numéro de cde :', $row['PRO_NUMCMDE'], 'span3', 'span3'), sautLigne(), afficher('Collaborateur :', $row['COL_PRENOM'] . ' ' . $row['COL_NOM'], 'span3', 'span3'), afficher('Projet suivi par :', $row['COM_PRENOM'] . ' ' . $row['COM_NOM'], 'span3', 'span3'), sautLigne(), afficher('Durée prévisionnelle (jours) :', $row['PRO_NBJOURS'], 'span3', 'span3'), afficher('Date de fin prévue :', format_date($row['PRO_DTFINPREVUE']), 'span3', 'span3'), sautLigne(), afficher_textarea('Détails :', $row['PRO_DETAIL'], 3, 8, 1, 80, 'textarea800'), sautLigne(), afficher_textarea('Modalités :', $row['PRO_MODALITE'], 3, 8, 4, 80, 'textarea800'), sautLigne(), afficher('Etat du projet :', $row['PRO_ARCHIVE'] == 1 ? 'Archivé' : 'En cours', 'span3', 'span3'), afficher('Date de cloture :', format_date($row['PRO_DTCLOTURE']), 'span3', 'span3'), sautLigne(), '<div style="border-top: 1px solid #e5e5e5; width: 98%; margin-left: 30px;"><div>'));
    $result .= creerFieldset('Mission', array(select('<b>Mission :</b>', 'MISSION', array() + donner_liste('MISSION', 'MIS', 0, $idmission), 3, 3, false, $idmission), $cloture, sautLigne(), afficher('Nom de la mission :', $row2['MIS_NOM'], 'span3', 'span3'), $NSEQ, $PRO_NO, sautLigne(), afficher('Numéro de cde :', $row2['MIS_NUMCMDE'], 'span3', 'span3'), afficher('Date de cde :', $row2['MIS_DATECMDE'], 'span3', 'span3'), sautLigne(), afficher('Début de mission :', $row2['MIS_DTDEBUT'], 'span3', 'span3'), afficher('Fin de mission :', $row2['MIS_DTFIN'], 'span3', 'span3'), sautLigne(), afficher('Durée prévisionnelle (jours):', $row2['MIS_NBJOURS'], 'span3', 'span3'), sautLigne(), afficher('Forfait :', $row2['MIS_FORFAIT'] == 1 ? 'Oui' : 'Non', 'span3', 'span3'), afficher('Montant du forfait :', $row2['MIS_MONTFORFAIT'], 'span3', 'span3'), sautLigne(), afficher('Taux journalier :', $row2['MIS_TJM'], 'span3', 'span3'), afficher('Prix d\'achat :', $row2['MIS_PA'], 'span3', 'span3'), sautLigne(), afficher_textarea('Commentaire :', $row2['MIS_COMMENTAIRE'], 3, 8, 4, 80, 'textarea800'), input('', 'idmission', 2, 3, true, 'hidden')));
    return $result;
}
function afficher_contact_fournisseur($recherche)
{
    $query = "SELECT * FROM CONTACT_FOURNISSEUR CTF LEFT JOIN FONCTION FC ON CTF.FCT_NO = FC.FCT_NO, FOURNISSEUR F WHERE CTF.FOU_NO = F.FOU_NO AND CTF_NO = " . $recherche;
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    return afficher('Nom du fournisseur :', $row['FOU_NOM'], 'span3', 'span3') . afficher('Nom du contact :', $row['CTF_NOM'], 'span3', 'span3') . sautLigne() . afficher('Prénom du contact :', $row['CTF_PRENOM'], 'span3', 'span3') . afficher('E-mail du contact :', $row['CTF_EMAIL'], 'span3', 'span3') . sautLigne() . afficher('No de téléphone portable :', $row['CTF_PRT'], 'span3', 'span3') . afficher('Fonction du contact :', $row['FCT_NOM'], 'span3', 'span3') . sautLigne() . afficher('Etat du contact :', $row['CTF_ARCHIVE'] == 1 ? 'Archivé' : 'Actif', 'span3', 'span3') . sautLigne() . afficher('Commentaire :', $row['CTF_COMMENTAIRE'], 'span3', 'span3');
}
/**
 * Permet de boucler l'appel d'une méthode
 * 
 * @param string    $nomFonction
 * @param string    $titre
 * @param array     $contenu        Tous le contenu qui doit être affiché
 * @param string    $accesContenu   Clé du tableau associatif
 * @param string    $classeTitre
 * @param string    $classeContenu
 * @param int       $nbExec         Nombre de fois que la boucle devra être exécuté
 * 
 */
function boucleAff($nomFonction, $titre, $contenu, $classeTitre, $classeContenu, $nbExec, $accesContenu = null)
{
    //Paramètre de la fonction à ajouter
    $i = 0;
    $retour = "";
    while ($i < $nbExec) {
        if ($i % 2 != 0) {
            if ($accesContenu == null) {
                $contenu[$i] = str_replace("&shy", " - ", $contenu[$i]);
                $retour .= call_user_func_array($nomFonction, array($titre, $contenu[$i], 'offset1 ' . $classeTitre, $classeContenu));
            } else {
                $retour .= call_user_func_array($nomFonction, array($titre, $contenu[$i][$accesContenu], 'offset1 ' . $classeTitre, $classeContenu));
            }
            $retour .= sautLigne();
        } else {
            if ($accesContenu == null) {
                $contenu[$i] = str_replace("&shy", " - ", $contenu[$i]);
                $retour .= call_user_func_array($nomFonction, array($titre, $contenu[$i], $classeTitre, $classeContenu));
            } else {
                $retour .= call_user_func_array($nomFonction, array($titre, $contenu[$i][$accesContenu], $classeTitre, $classeContenu));
            }
        }
        $i++;
    }
    return $retour;
}
function afficher_contact_client($recherche)
{
    $query = "SELECT * FROM CONTACT_CLIENT CTC LEFT JOIN FONCTION FC ON CTC.FCT_NO = FC.FCT_NO, CLIENT C WHERE CTC.CLI_NO = C.CLI_NO AND CTC_NO=" . $recherche;
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    return afficher('Nom du client :', $row['CLI_NOM'], 'span3', 'span3') . afficher('Nom du contact :', $row['CTC_NOM'], 'span3', 'span3') . sautLigne() . afficher('Prénom du contact :', $row['CTC_PRENOM'], 'span3', 'span3') . afficher('E-mail du contact :', $row['CTC_EMAIL'], 'span3', 'span3') . sautLigne() . afficher('No de téléphone portable :', $row['CTC_PRT'], 'span3', 'span3') . afficher('Fonction du contact :', $row['FCT_NOM'], 'span3', 'span3') . sautLigne() . afficher('Etat du contact :', $row['CTC_ARCHIVE'] == 1 ? 'Archivé' : 'Actif', 'span3', 'span3') . sautLigne() . afficher('Commentaire :', $row['CTC_COMMENTAIRE'], 'span3', 'span3');
}
/**
 * affiche le formulaire de préparation à l'impression d'un CDI
 */
function afficherFormulaire()
{
    $retour = creerFieldset('1ère page :', array(input('Nom complet :', 'nomcol', 2, 4, true, 'text', '', 'input500'), input('', 'numdoc', 2, 2, true, 'hidden'), sautLigne(), input('Nationalité :', 'natcol', 2, 4, true, 'text', '', 'input500'), sautLigne(), input('Adresse :', 'adrcol', 2, 4, true, 'text', '', 'input500'), sautLigne(), input('No sécurité sociale :', 'nsscol', 2, 6, true, 'text', '', 'input500')));
    $retour .= creerFieldset('2ème page :', array(input('Titre 1 :', 't[0]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 1 :', 'p[0]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 2 :', 't[1]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 2 :', 'p[1]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 3 :', 't[2]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 3 :', 'p[2]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 4 :', 't[3]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 4 :', 'p[3]', 2, 8, true, 6, 80, 'textarea800')));
    $retour .= creerFieldset('3ème page :', array(input('Titre 5 :', 't[4]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 5 :', 'p[4]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 6 :', 't[5]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 6 :', 'p[5]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 7 :', 't[6]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 7 :', 'p[6]', 2, 8, true, 6, 80, 'textarea800')));
    $retour .= creerFieldset('4ème page :', array(input('Titre 8 :', 't[7]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 8 :', 'p[7]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 9 :', 't[8]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 9 :', 'p[8]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 10 :', 't[9]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 10 :', 'p[9]', 2, 8, true, 6, 80, 'textarea800')));
    $retour .= creerFieldset('5ème page :', array(input('Titre 11 :', 't[10]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 11 :', 'p[10]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 12 :', 't[11]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 12 :', 'p[11]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 13 :', 't[12]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 13 :', 'p[12]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 14 :', 't[13]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 14 :', 'p[13]', 2, 8, true, 6, 80, 'textarea800')));
    $retour .= creerFieldset('6ème page :', array(input('Titre 15 :', 't[14]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 15 :', 'p[14]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 16 :', 't[15]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 16 :', 'p[15]', 2, 8, true, 6, 80, 'textarea800')));
    $retour .= creerFieldset('7ème page :', array(input('Titre 17 :', 't[16]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 17 :', 'p[16]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 18 :', 't[17]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 18 :', 'p[17]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 19 :', 't[18]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 19 :', 'p[18]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Titre 20 :', 't[19]', 2, 3, true, 'text', '', 'input500'), sautLigne(), textarea('Article 20 :', 'p[19]', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), textarea('Lib signature :', 'p[20]', 2, 8, true, 6, 80, 'textarea800')));
    return $retour;
}
function afficher_fonction($recherche)
{
    $query = "SELECT * FROM FONCTION WHERE FCT_NO=" . $recherche;
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    return afficher('Libellé :', $row['FCT_NOM'], 'span3', 'span3') . sautLigne();
}
        <?php 
include 'head.php';
?>
        <title>Gestion du message accueil</title>
    </head>
    <body>
        <!-- Barre de menu-->
        <?php 
$GLOBALS['titre_page'] = '<div class="autre">' . $titre . '</div>';
include "menu/menu_global.php";
?>

        <div class="container-fluid ">
            <form id="message" action="rechercheMessage.php" method="post" class="form-horizontal well">
        <?php 
$contenu = creerFieldset($titre, array(input('Date* :', 'DATE', 2, 3, true, 'date'), sautLigne(), textarea('Message* :', 'NOTE', 2, 8, true, 8, 80, 'textarea800'), sautLigne()));
echo $contenu;
?>
                <div class="row-fluid">
                    <div class="offset3 span5">
        <?php 
if ($iddoc == 0) {
    ?>
                        <button class="btn btn-primary" name='creer' id='creer' type="button">Créer<i class="icon-ok"></i></button>
        <?php 
} else {
    ?>
                        <button class="btn btn-primary" name='modif' id='<?php 
    echo $iddoc;
    ?>
' type='button'>Modifier<i class="icon-ok"></i></button> 
function afficher_fournisseur($recherche)
{
    $query = "SELECT * FROM FOURNISSEUR WHERE FOU_NO=" . $recherche;
    $row = $GLOBALS['connexion']->query($query)->fetch_assoc();
    return afficher('Code fournisseur :', $row['FOU_CODE'], 'span3', 'span3') . afficher('Nom du fournisseur :', $row['FOU_NOM'], 'span3', 'span3') . sautLigne() . afficher('Date de début de collaboration :', format_date($row['FOU_DTCREATION']), 'span3', 'span3') . afficher('Etat du fournisseur :', $row['FOU_ARCHIVE'] == 1 ? 'Archivé' : 'Actif', 'span3', 'span3');
}
/**
 * affiche le formulaire de préparation à l'impression d'un ordre de mission
 */
function afficherFormulaire()
{
    $retour = creerFieldset('Ordre de mission :', array(input('Periode :', 'periode', 2, 4, false, 'text', '', 'input300'), input('No du document :', 'numdoc', 2, 2, true), sautLigne(), textarea('Rappel :', 'article', 2, 8, true, 6, 80, 'textarea800'), sautLigne(), input('Collaborateur :', 'nomcol', 2, 4, true, 'text', '', 'input500'), sautLigne(), input('Client :', 'nomcli', 2, 4, true, 'text', '', 'input500'), sautLigne(), input('Adresse client :', 'adrcli', 2, 4, false, 'text', '', 'input500'), sautLigne(), input('Nom du projet :', 'nompro', 2, 6, false, 'text', '', 'input500'), sautLigne(), input('Contact client :', 'nomctc', 2, 6, false, 'text', '', 'input500'), sautLigne(), input('Contact fournisseur :', 'nomctf', 2, 6, false, 'text', '', 'input500'), sautLigne(), input('Jours prévus :', 'nbjours', 2, 6, false, 'text', '', 'input500'), sautLigne(), textarea('Détail mission :', 'prodet', 2, 8, false, 6, 80, 'textarea800'), sautLigne(), textarea('Modalités :', 'promod', 2, 8, false, 6, 80, 'textarea800'), sautLigne(), input('Date du document :', 'djour', 2, 4, true)));
    return $retour;
}