pharmacie = new Pharmacie(); } public function index() { // Ligne 1 $codePrestataire = $this->requete->getParametreFormulaire("codePrestataire"); $dateLivraison1 = $this->requete->getParametreDate("dateLivraison1"); $dateLivraison2 = $this->requete->getParametreDate("dateLivraison2"); $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); $numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire"); // Ligne 2 $codeMedecin = $this->requete->getParametreFormulaire("codeMedecin"); $numeroBonConsultation1 = $this->requete->getParametreFormulaire("numeroBonConsultation1"); $numeroBonConsultation2 = $this->requete->getParametreFormulaire("numeroBonConsultation2"); $numeroBonOrdonnance1 = $this->requete->getParametreFormulaire("numeroBonOrdonnance1"); $numeroBonOrdonnance2 = $this->requete->getParametreFormulaire("numeroBonOrdonnance2"); $numeroFeuilleMaladie1 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie1"); $numeroFeuilleMaladie2 = $this->requete->getParametreFormulaire("numeroFeuilleMaladie2"); $codePrestatairePrescription= $this->requete->getParametreFormulaire("codePrestatairePrescription"); // Ligne 3 $adherent = $this->requete->getParametreFormulaire("adherent"); $beneficiaire = $this->requete->getParametreFormulaire("beneficiaire"); // Ligne 4 $libelleMedicament = $this->requete->getParametreFormulaire("libelleMedicament"); // FIN Champs $_SESSION['codePrestataire_C'] = $codePrestataire; $_SESSION['debutRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison1"); $_SESSION['finRequeteFr_C'] = $this->requete->getParametreFormulaire("dateLivraison2"); $pharmacies = $this->pharmacie->requetespharmacieexport($codePrestataire, $dateLivraison1, $dateLivraison2, $numeroAdherent, $numeroBeneficiaire, $codeMedecin, $numeroBonConsultation1, $numeroBonConsultation2, $numeroBonOrdonnance1, $numeroBonOrdonnance2, $numeroFeuilleMaladie1, $numeroFeuilleMaladie2, $codePrestatairePrescription, $adherent, $beneficiaire, $libelleMedicament); // Excel if (isset($_SESSION['lang']) && $_SESSION['lang']=="en_US") { $headerXLS = array( 'Provider', 'date', 'NoFamily', 'Member', 'NoBenef', 'Beneficiairy', 'idPrestation', 'drug prescr', 'No Folder', 'Cons form', 'Drug', 'Price', 'quantity', 'Fees', 'U F', 'To pay', 'Exclu', 'Retained', 'Forced', 'To pay', 'valid', 'Rectif', 'Prescribed by', 'Doctor', 'NoDoctor'); } else { $headerXLS = array( 'prestataire', 'dateSysteme', 'NoAdherent', 'adherent', 'NoBeneficiaire', 'beneficiaire', 'idPrestation', 'NoBonOrd', 'NoFeuille', 'NoBonCons', 'Medicament', 'Prix', 'quantite', 'fraisReel', 'TM', 'Arembourser', 'Exclu', 'Retenu', 'MtForce', 'Apayer', 'valide', 'Redresse', 'prestatairePrescription', 'medecinPrescription', 'NoMedecin'); } $dataXLS = array(); foreach ($pharmacies as $pharmacie) { $dataXLS[]=$pharmacie; } $classeur = new PHPExcel(); $classeur->getProperties()->setCreator("INTER-SANTE"); $classeur->setActiveSheetIndex(0); $feuille=$classeur->getActiveSheet(); $feuille->setTitle('ACTES PHARAMACIE MEDICARE'); $feuille->fromArray($headerXLS, NULL, 'A1', true); $feuille->fromArray($dataXLS, NULL, 'A2', true); //Forcer le téléchargement vers le navigateur; $fichier = 'Temp/ACTES_PHARAMACIE_MEDICARE'."_".uniqid().".xlsx"; $writer = new PHPExcel_Writer_Excel2007($classeur); $writer->save($fichier); $t_html ='