while ($lig_note = mysqli_fetch_object($res_note)) { if ($lig_note->statut == 'v') { $note_enr[$lig_note->login] = ''; } elseif ($lig_note->statut != '') { $note_enr[$lig_note->login] = $lig_note->statut; } else { $note_enr[$lig_note->login] = $lig_note->note; } $commentaire[$lig_note->login] = $lig_note->comment; $csv .= "ELEVE;{$lig_note->login};{$lig_note->nom};{$lig_note->prenom};{$lig_note->classe};" . strtr($note_enr[$lig_note->login], ".", ",") . ";" . preg_replace('/[\\r\\n]/', ' ', $lig_note->comment) . ";\r\n"; } } $nom_fic = "cc_dev_" . $id_dev . "_eval_" . $id_eval . "_" . date("dmY") . ".csv"; send_file_download_headers('text/x-csv', $nom_fic); //echo $csv; echo echo_csv_encoded($csv); die; } $matiere_nom = $current_group["matiere"]["nom_complet"]; $matiere_nom_court = $current_group["matiere"]["matiere"]; $nom_classe = $current_group["classlist_string"]; //debug_var(); //------------------------------------------------------------------------------------------------------------------- if (isset($_POST['notes'])) { check_token(); $temp = $_POST['notes'] . " 1"; //echo "<pre>"; //echo "\$temp=$temp<br />"; $temp = my_ereg_replace("\\\\r", "\r", $temp); $temp = my_ereg_replace("\\\\n", "\n", $temp); //echo "\$temp=$temp<br />";
$ligne.=";"; } } if($cpt==0) {$fich.=$ligne_entete."\n";} $fich.=$ligne."\n"; $cpt++; } } $nom_fic="options_eleves_gepi_".suppr_accents(preg_replace("/'/","'",preg_replace('/[" ]/','',$projet)))."_".date("Ymd_Hi").".csv"; send_file_download_headers('text/x-csv',$nom_fic); //echo $fich; echo echo_csv_encoded($fich); die(); } else { $user_temp_directory=get_user_temp_directory(); $fichier_content_xml=fopen("../temp/".$user_temp_directory."/content.xml","w+"); $ecriture=fwrite($fichier_content_xml,'<?xml version="1.0" encoding="UTF-8"?> <office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2"><office:scripts/><office:font-face-decls><style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss"/><style:font-face style:name="Times New Roman" svg:font-family="'Times New Roman'" style:font-family-generic="swiss"/><style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/><style:font-face style:name="DejaVu Sans Condensed" svg:font-family="'DejaVu Sans Condensed'" style:font-family-generic="system" style:font-pitch="variable"/></office:font-face-decls><office:automatic-styles><style:style style:name="co1" style:family="table-column"><style:table-column-properties fo:break-before="auto" style:column-width="4.262cm"/></style:style><style:style style:name="co2" style:family="table-column"><style:table-column-properties fo:break-before="auto" style:column-width="1.956cm"/></style:style><style:style style:name="co3" style:family="table-column"><style:table-column-properties fo:break-before="auto" style:column-width="2.27cm"/></style:style><style:style style:name="co4" style:family="table-column"><style:table-column-properties fo:break-before="auto" style:column-width="2.267cm"/></style:style><style:style style:name="ro1" style:family="table-row"><style:table-row-properties style:row-height="0.497cm" fo:break-before="auto" style:use-optimal-row-height="true"/></style:style><style:style style:name="ro2" style:family="table-row"><style:table-row-properties style:row-height="0.499cm" fo:break-before="auto" style:use-optimal-row-height="true"/></style:style><style:style style:name="ta1" style:family="table" style:master-page-name="PageStyle_5f_Feuille1"><style:table-properties table:display="true" style:writing-mode="lr-tb"/></style:style><number:date-style style:name="N37" number:automatic-order="true"><number:day number:style="long"/><number:text>/</number:text><number:month number:style="long"/><number:text>/</number:text><number:year/></number:date-style><style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default"><style:table-cell-properties style:glyph-orientation-vertical="0" style:diagonal-bl-tr="none" style:diagonal-tl-br="none" style:text-align-source="fix" style:repeat-content="false" fo:wrap-option="no-wrap" fo:border="0.06pt solid #000000" style:direction="ltr" fo:padding="0.071cm" style:rotation-angle="0" style:rotation-align="none" style:shrink-to-fit="false" style:vertical-align="automatic" style:vertical-justify="auto"/><style:paragraph-properties fo:text-align="start" css3t:text-justify="auto" fo:margin-left="0cm" style:writing-mode="page"/></style:style><style:style style:name="ce2" style:family="table-cell" style:parent-style-name="Default"><style:table-cell-properties style:glyph-orientation-vertical="0" style:diagonal-bl-tr="none" style:diagonal-tl-br="none" style:text-align-source="fix" style:repeat-content="false" fo:wrap-option="no-wrap" fo:border="0.06pt solid #000000" style:direction="ltr" fo:padding="0.071cm" style:rotation-angle="0" style:rotation-align="none" style:shrink-to-fit="false" style:vertical-align="automatic" style:vertical-justify="auto"/><style:paragraph-properties fo:text-align="start" css3t:text-justify="auto" fo:margin-left="0cm" style:writing-mode="page"/><style:text-properties style:use-window-font-color="true" style:text-outline="false" style:text-line-through-style="none" style:font-name="Arial1" fo:font-size="10pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="normal" style:font-size-asian="10pt" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-name-complex="Arial1" style:font-size-complex="10pt" style:font-style-complex="normal" style:font-weight-complex="normal"/><style:map style:condition="is-true-formula(ISODD(ROW([Feuille1.A3])))" style:apply-style-name="Ligne_5f_impaire" style:base-cell-address="Feuille1.A3"/></style:style><style:style style:name="ce3" style:family="table-cell" style:parent-style-name="Default"><style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/><style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/></style:style><style:style style:name="ce4" style:family="table-cell" style:parent-style-name="Default"><style:table-cell-properties style:glyph-orientation-vertical="0" style:diagonal-bl-tr="none" style:diagonal-tl-br="none" style:text-align-source="fix" style:repeat-content="false" fo:wrap-option="no-wrap" fo:border="0.06pt solid #000000" style:direction="ltr" fo:padding="0.071cm" style:rotation-angle="0" style:rotation-align="none" style:shrink-to-fit="false" style:vertical-align="automatic" style:vertical-justify="auto"/><style:paragraph-properties fo:text-align="center" css3t:text-justify="auto" fo:margin-left="0cm" style:writing-mode="page"/></style:style><style:style style:name="ce5" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"><style:table-cell-properties style:glyph-orientation-vertical="0" style:diagonal-bl-tr="none" style:diagonal-tl-br="none" style:text-align-source="fix" style:repeat-content="false" fo:wrap-option="no-wrap" fo:border="0.06pt solid #000000" style:direction="ltr" fo:padding="0.071cm" style:rotation-angle="0" style:rotation-align="none" style:shrink-to-fit="false" style:vertical-align="automatic" style:vertical-justify="auto"/><style:paragraph-properties fo:text-align="center" css3t:text-justify="auto" fo:margin-left="0cm" style:writing-mode="page"/><style:map style:condition="is-true-formula(ISODD(ROW([Feuille1.A3])))" style:apply-style-name="Ligne_5f_impaire" style:base-cell-address="Feuille1.A3"/></style:style><style:style style:name="ce6" style:family="table-cell" style:parent-style-name="Default"><style:table-cell-properties style:glyph-orientation-vertical="0" style:text-align-source="fix" style:repeat-content="false" fo:wrap-option="no-wrap" style:direction="ltr" fo:padding="0.071cm" style:rotation-angle="0" style:rotation-align="none" style:shrink-to-fit="false" style:vertical-align="automatic" style:vertical-justify="auto"/><style:paragraph-properties fo:text-align="center" css3t:text-justify="auto" fo:margin-left="0cm" style:writing-mode="page"/></style:style><style:style style:name="ce7" style:family="table-cell" style:parent-style-name="Default"><style:table-cell-properties style:glyph-orientation-vertical="0" style:diagonal-bl-tr="none" style:diagonal-tl-br="none" style:text-align-source="fix" style:repeat-content="false" fo:wrap-option="no-wrap" fo:border="0.06pt solid #000000" style:direction="ltr" fo:padding="0.071cm" style:rotation-angle="0" style:rotation-align="none" style:shrink-to-fit="false" style:vertical-align="automatic" style:vertical-justify="auto"/><style:paragraph-properties fo:text-align="center" css3t:text-justify="auto" fo:margin-left="0cm" style:writing-mode="page"/><style:map style:condition="is-true-formula(ISODD(ROW([Feuille1.A3])))" style:apply-style-name="Ligne_5f_impaire" style:base-cell-address="Feuille1.A3"/></style:style><style:style style:name="ce8" style:family="table-cell" style:parent-style-name="Default"><style:table-cell-properties style:glyph-orientation-vertical="0" style:diagonal-bl-tr="none" style:diagonal-tl-br="none" style:text-align-source="fix" style:repeat-content="false" fo:wrap-option="no-wrap" fo:border="0.06pt solid #000000" style:direction="ltr" fo:padding="0.071cm" style:rotation-angle="0" style:rotation-align="none" style:shrink-to-fit="false" style:vertical-align="automatic" style:vertical-justify="auto"/><style:paragraph-properties fo:text-align="center" css3t:text-justify="auto" fo:margin-left="0cm" style:writing-mode="page"/><style:map style:condition="is-true-formula(ISODD(ROW([Feuille1.A3])))" style:apply-style-name="Ligne_5f_impaire" style:base-cell-address="Feuille1.A3"/></style:style><style:style style:name="ce9" style:family="table-cell" style:parent-style-name="Default"><style:table-cell-properties style:text-align-source="fix" style:repeat-content="false" fo:border="0.06pt solid #000000"/><style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/></style:style><style:style style:name="ce10" style:family="table-cell" style:parent-style-name="Default"><style:table-cell-properties fo:border="0.06pt solid #000000"/><style:map style:condition="is-true-formula(ISODD(ROW([Feuille1.A3])))" style:apply-style-name="Ligne_5f_impaire" style:base-cell-address="Feuille1.A3"/></style:style><style:style style:name="ce11" style:family="table-cell" style:parent-style-name="Default"><style:map style:condition="is-true-formula(ISODD(ROW([Feuille1.A3])))" style:apply-style-name="Ligne_5f_impaire" style:base-cell-address="Feuille1.A3"/></style:style></office:automatic-styles>'); $ecriture=fwrite($fichier_content_xml,'<office:body><office:spreadsheet><table:calculation-settings table:case-sensitive="false" table:use-regular-expressions="false"/><table:table table:name="Feuille1" table:style-name="ta1"><office:forms form:automatic-focus="false" form:apply-design-mode="false"/>'); $nb_lig=0; //==========================================
$classe = sql_query1("SELECT classe FROM classes WHERE id = '{$id_classe}'"); if ($referent == "une_periode") { $chaine_titre = "Classe_" . $classe . "_Resultats_CN_" . $nom_periode[$num_periode] . "_Annee_scolaire_" . getSettingValue("gepiYear"); } else { $chaine_titre = "Classe_" . $classe . "_Resultats_CN_Moyennes_annuelles_Annee_scolaire_" . getSettingValue("gepiYear"); } $now = gmdate('D, d M Y H:i:s') . ' GMT'; $nom_fic = $chaine_titre . "_" . $now; // Filtrer les caractères dans le nom de fichier: $nom_fic = preg_replace("/[^a-zA-Z0-9_.-]/", "", remplace_accents($nom_fic, 'all')); $nom_fic .= ".csv"; send_file_download_headers('text/x-csv', $nom_fic); $fd = ""; $fd .= affiche_tableau_csv2($nb_lignes_tableau, $nb_col, $ligne1_csv, $col, $col_csv); //echo $fd; echo echo_csv_encoded($fd); die; } elseif ($_GET['mode'] == "pdf") { /* debug_var(); echo "\$ligne1_csv<pre>"; print_r($ligne1_csv); echo "</pre>"; echo "\$col_csv<pre>"; print_r($col_csv); echo "</pre>"; echo "\$col<pre>"; print_r($col); echo "</pre>"; */ // On teste la présence d'au moins un coeff pour afficher la colonne des coef
$csv_ligne1 .= "Nom prénom;Etat du compte;Mail;Statut;Matières;Classes;\r\n"; } else { $csv_ligne1 .= "Nom prénom;Etat du compte;Statut;Matières;Classes;\r\n"; } } if (in_array($tab_result_recherche['personnel'][$loop]["login"], $checkbox_personnel)) { $csv_suite .= $tab_result_recherche['personnel'][$loop]["login"] . ";" . $tab_result_recherche['personnel'][$loop]["nom_prenom"] . ";" . $tab_result_recherche['personnel'][$loop]["compte"] . ";"; if (in_array($_SESSION['statut'], array('administrateur', 'scolarite', 'cpe'))) { $csv_suite .= $tab_result_recherche['personnel'][$loop]["email"] . ";"; } $csv_suite .= $tab_result_recherche['personnel'][$loop]["statut"] . ";" . $tab_result_recherche['personnel'][$loop]["matieres"] . ";" . $tab_result_recherche['personnel'][$loop]["classes"] . ";\r\n"; } } $nom_fic = "recherche_personnels_" . strftime("%Y%m%d_%H%M%S") . ".csv"; send_file_download_headers('text/x-csv', $nom_fic); echo echo_csv_encoded($csv_ligne1 . $csv_suite); die; } } $javascript_specifique[] = "lib/tablekit"; $dojo = true; $utilisation_tablekit = "ok"; //**************** EN-TETE ***************** $titre_page = "Recherche"; require_once "../lib/header.inc.php"; //************** FIN EN-TETE ***************** //debug_var(); if (isset($is_posted_recherche) || isset($is_posted_recherche2) || isset($is_posted_recherche2b) || isset($is_posted_recherche3) || isset($is_posted_recherche4)) { echo "<p><a href='" . $_SERVER['PHP_SELF'] . "'>Effectuer une autre recherche</a></p>"; /* echo "<pre>";