Beispiel #1
0
}
// On récupére la liste des id
$res = $db->prepare($sql . $whereSQL . $orderSQL . $limitSQL);
$res->execute($rechercheFiltre);
while ($res_f = $res->fetch()) {
    $listeServices[$res_f['id']] = getServiceInfo($res_f['id']);
}
/*
	Téléchargement de la liste des services au format CSV
*/
if ($action == 'dl') {
    /*
    	Création de l'array à retourner
    */
    $servicesCSV = array(array('id', LANG_ADMIN_SERVICES_LISTE_TABLE_TITLE_HOPITAL, LANG_ADMIN_SERVICES_LISTE_TABLE_TITLE_SPECIALITE, LANG_ADMIN_SERVICES_LISTE_TABLE_TITLE_CHEF, LANG_ADMIN_SERVICES_LISTE_TABLE_TITLE_CHEF, LANG_ADMIN_SERVICES_NOM));
    foreach (getServiceList() as $service) {
        $servicesCSV[] = array($service['id'], $service['hopital']['nom'], $service['specialite']['nom'], $service['chef']['nom'], $service['chef']['prenom'], $service['nom']);
    }
    // Téléchargement du CSV
    downloadCSV($servicesCSV, 'services.csv');
}
if ($action == 'list') {
    /**
    		2. Création de la pagination
    	**/
    $pagination = creerPagination(8, 4, $pageActuelle, $nbTotalPages);
    /**
    		Affichage des résultats
    	**/
    /*
    	Liste des services
Beispiel #2
0
</h1>
					<div class = "barreNavigation">
						<a href = "<?php 
                        echo ROOT . CURRENT_FILE . '?' . http_build_query($tempGET) . '&action2=liste&id=' . $userData['id'];
                        ?>
"><i class="fa fa-list barreNavigationBouton"></i></a></a>
					</div>
					<?php 
                    }
                    ?>
				
				<form class = "formEvaluation" method = "POST">
				<fieldset>
					<!-- Nom du service -->
					<?php 
                    $listeServices = getServiceList();
                    // Valeur à pré-sélectionner
                    if (isset($_POST['service']) && isset($listeServices[$_POST['service']])) {
                        $defaultValue = $_POST['service'];
                    } else {
                        if (isset($affectationData['service']['id']) && isset($listeServices[$affectationData['service']['id']])) {
                            $defaultValue = $affectationData['service']['id'];
                        }
                    }
                    ?>
					<label for = "service"><?php 
                    echo LANG_ADMIN_SERVICES_NOM;
                    ?>
</label>
					<select id = "service" name = "service" class = "<?php 
                    if ($action2 != 'edit' && $action2 != 'add') {