예제 #1
0
 public function derniere_ligne($info_ponderation_complete, $moyenne_affichee, $moyenne_pourcentage_acquis)
 {
     $this->choisir_couleur_fond('gris_moyen');
     $this->CellFit($this->cases_largeur, $this->cases_hauteur, To::pdf('Moyenne ' . $info_ponderation_complete . ' sur 20'), 1, 0, 'C', TRUE);
     $this->CellFit($this->cases_largeur, $this->cases_hauteur, To::pdf($moyenne_affichee), 1, 0, 'C', TRUE);
     $this->CellFit($this->cases_largeur, $this->cases_hauteur, To::pdf($moyenne_pourcentage_acquis . '% d\'items acquis'), 1, 0, 'C', TRUE);
 }
예제 #2
0
 public function vignette($tab_vignette)
 {
     $espacement_x = 2;
     $espacement_y = 2;
     // On récupère les infos
     extract($tab_vignette);
     // $user_nom $user_prenom $img_width $img_height $img_src $img_title
     $img_width *= $this->coef_conv_pixel_to_mm;
     $img_height *= $this->coef_conv_pixel_to_mm;
     // retour à la ligne si manque de place
     if ($this->GetX() + $img_width + $this->marge_droite > $this->page_largeur) {
         $this->SetXY($this->marge_gauche, $this->GetY() + $this->cadre_photo_hauteur + $espacement_y);
         // saut de page si manque de place
         if ($this->GetY() + $this->cadre_photo_hauteur + $this->marge_bas > $this->page_hauteur) {
             $this->AddPage($this->orientation, 'A4');
         }
     }
     // image
     $memo_x = $this->GetX();
     $memo_y = $this->GetY();
     if ($img_src) {
         $this->MemImage(base64_decode($img_src), $memo_x, $memo_y, $img_width, $img_height, 'JPEG');
     } else {
         $this->Image('./_img/trombinoscope_vide.png', $memo_x, $memo_y, $img_width, $img_height, 'PNG');
     }
     // nom & prénom
     $this->SetXY($memo_x, $memo_y + $this->photo_hauteur_maxi + 0.5);
     $this->CellFit($img_width, 4, To::pdf($user_nom), 0, 2, 'C', FALSE);
     $this->CellFit($img_width, 4, To::pdf($user_prenom), 0, 2, 'C', FALSE);
     // positionnement pour la photo suivante
     $this->SetXY($memo_x + $img_width + $espacement_x, $memo_y);
 }
 public function appreciation_epreuve_eleves_collegues_tbody($epreuve_nom, $note, $appreciation)
 {
     $nb_lignes = max(1, ceil(mb_strlen($appreciation) / 125));
     // On prend une nouvelle page PDF si besoin
     $this->appreciation_page_break();
     $this->choisir_couleur_fond('gris_moyen');
     // cadre
     $memo_x = $this->GetX();
     $memo_y = $this->GetY();
     $this->Cell($this->page_largeur_moins_marges, $nb_lignes * $this->lignes_hauteur, '', 1, 0, 'L', FALSE);
     // épreuve, moyenne, appréciation
     $this->SetXY($memo_x, $memo_y);
     $this->SetFont('Arial', '', $this->taille_police);
     $this->CellFit($this->reference_largeur, $this->lignes_hauteur, To::pdf($epreuve_nom), 0, 1, 'L', FALSE);
     $this->Line($memo_x + $this->reference_largeur, $memo_y, $memo_x + $this->reference_largeur, $memo_y + $nb_lignes * $this->lignes_hauteur);
     // appréciations
     $this->SetXY($memo_x + $this->reference_largeur, $memo_y);
     $this->afficher_appreciation($this->cases_largeur, $nb_lignes * $this->lignes_hauteur, $this->taille_police, $this->lignes_hauteur, $note . ' - ' . $appreciation);
     $this->SetXY($memo_x, $memo_y + $nb_lignes * $this->lignes_hauteur);
 }
예제 #4
0
    $tab_eleves[$DB_ROW['user_id']] = $DB_ROW['user_reference'];
}
// Récupérer les notes enregistrées ; convertir si besoin en nombre de points correspondants
$tab_points = array();
$DB_TAB = DB_STRUCTURE_BREVET::DB_lister_brevet_notes_eleves($listing_eleve_id);
if (count($DB_TAB)) {
    foreach ($DB_TAB as $DB_ROW) {
        if ($DB_ROW['brevet_epreuve_code'] == CODE_BREVET_EPREUVE_TOTAL) {
            $tab_points[$DB_ROW['eleve_id']][$DB_ROW['brevet_epreuve_code']] = $DB_ROW['saisie_note'];
        } elseif ($DB_ROW['brevet_epreuve_point_sup_10']) {
            $tab_points[$DB_ROW['eleve_id']][$DB_ROW['brevet_epreuve_code']] = max(0, $DB_ROW['saisie_note'] - 10);
        } else {
            $tab_points[$DB_ROW['eleve_id']][$DB_ROW['brevet_epreuve_code']] = is_numeric($DB_ROW['saisie_note']) ? $DB_ROW['saisie_note'] * $DB_ROW['brevet_epreuve_coefficient'] : $DB_ROW['saisie_note'];
        }
    }
}
// Fabriquer le fichier csv
$csv_contenu = '';
$csv_separateur = '|';
foreach ($tab_eleves as $eleve_id => $user_reference) {
    foreach ($tab_points[$eleve_id] as $epreuve_code => $points) {
        $csv_code = $epreuve_code != CODE_BREVET_EPREUVE_TOTAL ? (string) $epreuve_code : 'TOT';
        $format = $epreuve_code != CODE_BREVET_EPREUVE_TOTAL ? "%05.2f" : "%06.2f";
        $csv_note = is_numeric($points) ? sprintf($format, $points) : (string) $points;
        $csv_contenu .= $user_reference . $csv_separateur . $csv_code . $csv_separateur . $csv_note . $csv_separateur . NL;
    }
}
// Enregistrer le fichier csv / Retour
$fichier_nom = 'export_notanet' . '_' . Clean::fichier($_SESSION['WEBMESTRE_UAI']) . '_' . fabriquer_fin_nom_fichier__date_et_alea() . '.txt';
FileSystem::ecrire_fichier(CHEMIN_DOSSIER_EXPORT . $fichier_nom, To::csv($csv_contenu));
exit($fichier_nom);
예제 #5
0
 public function item( $item_nom , $test_affichage_Pourcentage , $tab_item_pourcentage , $test_affichage_Validation , $tab_item_validation )
 {
   // Case pourcentage
   if($test_affichage_Pourcentage)
   {
     $this->afficher_pourcentage_acquis( '' , $tab_item_pourcentage , 'detail' /*affich*/ );
   }
   // Case intitulé
   $this->choisir_couleur_fond('gris_clair');
   $this->SetFont('Arial' , '' , $this->taille_police);
   $br = $test_affichage_Validation ? 0 : 1 ;
   $this->CellFit( $this->item_largeur , $this->cases_hauteur , To::pdf($item_nom) , 1 /*bordure*/ , $br , 'L' /*alignement*/ , $this->fond );
   // Case validation
   if($test_affichage_Validation)
   {
     $this->afficher_etat_validation('',$tab_item_validation);
   }
 }
예제 #6
0
 public function officiel_bloc_appreciation_generale($prof_id, $tab_infos, $tab_image_tampon_signature, $nb_lignes_appreciation_generale_avec_intitule, $bloc_largeur, $ligne_hauteur, $moyenne_generale_eleve, $moyenne_generale_classe)
 {
     $nb_lignes_appreciation_generale_hors_intitule = $nb_lignes_appreciation_generale_avec_intitule - 1;
     // Récupération des données de l'appréciation
     extract($tab_infos);
     // $prof_info $appreciation $note
     // Intitulé "Appréciation générale"
     $memoX = $this->GetX();
     $memoY = $this->GetY();
     $this->SetFont('Arial', 'B', $this->taille_police * 1.4);
     $this->Write($ligne_hauteur, To::pdf('Appréciation générale'));
     if ($prof_info) {
         $this->SetFont('Arial', '', $this->taille_police);
         $this->Write($ligne_hauteur, To::pdf('   [ ' . $prof_info . ' ]'));
     }
     // Moyenne générale éventuelle (élève & classe)
     $this->SetXY($memoX, $memoY);
     $largeur = $this->page_largeur_moins_marges;
     if ($moyenne_generale_eleve !== NULL) {
         $largeur_note = 10;
         $texte = $_SESSION['OFFICIEL']['BULLETIN_MOYENNE_CLASSE'] ? 'Moyenne générale élève (classe) :' : 'Moyenne générale élève :';
         $this->SetFont('Arial', '', $this->taille_police);
         $largueur_texte = $_SESSION['OFFICIEL']['BULLETIN_MOYENNE_CLASSE'] ? $largeur - 2 * $largeur_note : $largeur - $largeur_note;
         $this->Cell($largueur_texte, $ligne_hauteur, To::pdf($texte), 0, 0, 'R', FALSE);
         $moyenne_generale_eleve = $moyenne_generale_eleve !== NULL ? $_SESSION['OFFICIEL']['BULLETIN_CONVERSION_SUR_20'] ? number_format($moyenne_generale_eleve, 1, ',', '') : round($moyenne_generale_eleve * 5) . '%' : '-';
         $this->SetFont('Arial', 'B', $this->taille_police * 1.25);
         $this->Cell($largeur_note, $ligne_hauteur, To::pdf($moyenne_generale_eleve), 0, 0, 'C', FALSE);
         if ($_SESSION['OFFICIEL']['BULLETIN_MOYENNE_CLASSE']) {
             $moyenne_generale_classe = $moyenne_generale_classe !== NULL ? $_SESSION['OFFICIEL']['BULLETIN_CONVERSION_SUR_20'] ? number_format($moyenne_generale_classe, 1, ',', '') : round($moyenne_generale_classe * 5) . '%' : '-';
             $this->SetFont('Arial', '', $this->taille_police * 0.8);
             $this->Cell($largeur_note, $ligne_hauteur, To::pdf('(' . $moyenne_generale_classe . ')'), 0, 0, 'C', FALSE);
         }
     }
     $this->SetXY($memoX, $memoY + $ligne_hauteur);
     // préparation cadre appréciation
     $largeur_autorisee = $bloc_largeur;
     $hauteur_autorisee = $ligne_hauteur * $nb_lignes_appreciation_generale_hors_intitule;
     $memoX = $this->GetX();
     $memoY = $this->GetY();
     // signature
     $largeur_signature = $tab_image_tampon_signature ? $this->afficher_image($largeur_autorisee, $hauteur_autorisee, $tab_image_tampon_signature, 'signature') : min(50, $hauteur_autorisee);
     // contour cadre
     $this->SetXY($memoX, $memoY);
     $this->Cell($largeur_autorisee, $hauteur_autorisee, '', 1, 2, '', FALSE);
     // contenu appréciation
     $this->SetXY($memoX, $memoY);
     if ($prof_id) {
         $taille_police = $this->taille_police * 1.2;
         $taille_interligne = $ligne_hauteur * 0.8;
         $this->afficher_appreciation($largeur_autorisee - $largeur_signature, $hauteur_autorisee, $taille_police, $taille_interligne, $appreciation);
     }
     $this->SetXY($memoX, $memoY + $hauteur_autorisee);
 }
예제 #7
0
                $html = str_replace("<!--SO_HIDDEN-->", empty(Server::$Groups[$groupid]->ChatFunctions[1]) ? "none" : "", $html);
                $html = str_replace("<!--PR_HIDDEN-->", empty(Server::$Groups[$groupid]->ChatFunctions[2]) ? "none" : "", $html);
                $html = str_replace("<!--FV_HIDDEN-->", empty(Server::$Groups[$groupid]->ChatFunctions[4]) ? "none" : "", $html);
                $html = str_replace("<!--FU_HIDDEN-->", empty(Server::$Groups[$groupid]->ChatFunctions[5]) || !empty($_GET[GET_EXTERN_DYNAMIC_GROUP]) ? "none" : "", $html);
                $html = str_replace("<!--post_chat_js-->", base64_encode(Server::$Groups[$groupid]->PostJS), $html);
            }
            $html = str_replace("<!--TR_HIDDEN-->", strlen(Server::$Configuration->File["gl_otrs"]) > 1 ? "" : "none", $html);
            $html = str_replace("<!--ET_HIDDEN-->", !empty(Server::$Configuration->File["gl_retr"]) && !empty(Server::$Configuration->File["gl_soct"]) ? "" : "none", $html);
        }
    }
}
$header = IOStruct::GetFile(PATH_TEMPLATES . "header.tpl");
if (isset($_GET[GET_EXTERN_USER_HEADER]) && !empty($_GET[GET_EXTERN_USER_HEADER])) {
    $header = str_replace("<!--logo-->", "<img src=\"" . Encoding::Base64UrlDecode($_GET[GET_EXTERN_USER_HEADER]) . "\" border=\"0\"><br>", $header);
} else {
    if (!empty(Server::$Configuration->File["gl_cali"])) {
        $header = str_replace("<!--logo-->", "<img src=\"" . Server::$Configuration->File["gl_cali"] . "\" border=\"0\"><br>", $header);
    }
}
if (!empty(Server::$Configuration->File["gl_cahi"])) {
    $header = str_replace("<!--background-->", "<img src=\"" . Server::$Configuration->File["gl_cahi"] . "\" border=\"0\"><br>", $header);
}
$html = str_replace("<!--param-->", @Server::$Configuration->File["gl_cpar"], $html);
$html = str_replace("<!--header-->", $header, $html);
$html = str_replace("<!--server-->", LIVEZILLA_URL, $html);
$html = str_replace("<!--html-->", "<html dir=\"" . LocalizationManager::$Direction . "\">", $html);
$html = str_replace("<!--rtl-->", To::BoolString(LocalizationManager::$Direction == "rtl"), $html);
$html = str_replace("<!--dir-->", LocalizationManager::$Direction, $html);
$html = str_replace("<!--url_get_params-->", getParams(), $html);
Server::UnloadDataProvider();
exit(Server::Replace($html));
 static function Process($_userId, $_resId, $_value, $_type, $_title, $_disc, $_parentId, $_rank, $_size = 0, $_tags = "")
 {
     if ($_size == 0) {
         $_size = strlen($_title);
     }
     $result = DBManager::Execute(true, "SELECT `id`,`value` FROM `" . DB_PREFIX . DATABASE_RESOURCES . "` WHERE `id`='" . DBManager::RealEscape($_resId) . "'");
     if (DBManager::GetRowCount($result) == 0) {
         if (!$_disc) {
             DBManager::Execute(true, "INSERT INTO `" . DB_PREFIX . DATABASE_RESOURCES . "` (`id`,`owner`,`editor`,`value`,`edited`,`title`,`created`,`type`,`discarded`,`parentid`,`size`,`tags`) VALUES ('" . DBManager::RealEscape($_resId) . "','" . DBManager::RealEscape($_userId) . "','" . DBManager::RealEscape($_userId) . "','" . DBManager::RealEscape($_value) . "','" . DBManager::RealEscape(time()) . "','" . DBManager::RealEscape($_title) . "','" . DBManager::RealEscape(time()) . "','" . DBManager::RealEscape($_type) . "'," . intval(0) . ",'" . DBManager::RealEscape($_parentId) . "','" . DBManager::RealEscape($_size) . "','" . DBManager::RealEscape($_tags) . "')");
         }
     } else {
         $row = DBManager::FetchArray($result);
         DBManager::Execute(true, $result = "UPDATE `" . DB_PREFIX . DATABASE_RESOURCES . "` SET `value`='" . DBManager::RealEscape($_value) . "',`editor`='" . DBManager::RealEscape($_userId) . "',`tags`='" . DBManager::RealEscape($_tags) . "',`title`='" . DBManager::RealEscape($_title) . "',`edited`=" . intval(time()) . ",`discarded`='" . DBManager::RealEscape(To::BoolString($_disc, false)) . "',`parentid`='" . DBManager::RealEscape($_parentId) . "',`size`='" . DBManager::RealEscape($_size) . "' WHERE id='" . DBManager::RealEscape($_resId) . "' LIMIT 1");
         if (!empty($_disc) && ($_type == RESOURCE_TYPE_FILE_INTERNAL || $_type == RESOURCE_TYPE_FILE_EXTERNAL) && @file_exists("./uploads/" . $row["value"]) && strpos($row["value"], "..") === false) {
             @unlink("./uploads/" . $row["value"]);
         }
     }
 }
    // Pour avoir les élèves dans l'ordre alphabétique, il faut utiliser $tab_eleve_id.
    $archivage_tableau_PDF->SetXY($archivage_tableau_PDF->marge_gauche, $archivage_tableau_PDF->marge_haut + $archivage_tableau_PDF->etiquette_hauteur);
    foreach ($tab_eleve_id as $eleve_id) {
        extract($tab_eleve_infos[$eleve_id]);
        // $eleve_nom $eleve_prenom $date_naissance $eleve_brevet_serie
        $archivage_tableau_PDF->moyennes_reference_eleve($eleve_id, $eleve_nom . ' ' . $eleve_prenom);
        $archivage_tableau_CSV .= '"' . $eleve_nom . ' ' . $eleve_prenom . '"';
        foreach ($tab_brevet_serie as $serie_ref => $serie_nom) {
            foreach ($tab_brevet_epreuve[$serie_ref] as $epreuve_ref => $epreuve_nom) {
                $note = isset($tab_saisie[$eleve_id][$serie_ref . $epreuve_ref]) ? $tab_saisie[$eleve_id][$serie_ref . $epreuve_ref] : NULL;
                $archivage_tableau_PDF->moyennes_note($eleve_id, $epreuve_ref, $note, TRUE);
                $archivage_tableau_CSV .= $separateur . '"' . str_replace('.', ',', $note) . '"';
                // Remplacer le point décimal par une virgule pour le tableur.
            }
        }
        $archivage_tableau_PDF->SetXY($archivage_tableau_PDF->marge_gauche, $archivage_tableau_PDF->GetY() + $archivage_tableau_PDF->cases_hauteur);
        $archivage_tableau_CSV .= "\r\n";
    }
}
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Enregistrement et affichage du retour.
// ////////////////////////////////////////////////////////////////////////////////////////////////////
$fichier_export = 'saisies_' . $bilan_type . '_' . $annee_session_brevet . '_' . Clean::fichier($classe_nom) . '_' . $action . '_' . fabriquer_fin_nom_fichier__date_et_alea();
FileSystem::ecrire_sortie_PDF(CHEMIN_DOSSIER_EXPORT . $fichier_export . '.pdf', $archivage_tableau_PDF);
echo '<a target="_blank" href="' . URL_DIR_EXPORT . $fichier_export . '.pdf"><span class="file file_pdf">' . $tab_actions[$action] . ' (format <em>pdf</em>).</span></a>';
// Et le csv éventuel
if ($action == 'imprimer_donnees_eleves_moyennes') {
    FileSystem::ecrire_fichier(CHEMIN_DOSSIER_EXPORT . $fichier_export . '.csv', To::csv($archivage_tableau_CSV));
    echo '<br />' . NL . '<a target="_blank" href="./force_download.php?fichier=' . $fichier_export . '.csv"><span class="file file_txt">' . $tab_actions[$action] . ' (format <em>csv</em>).</span></a>';
}
exit;
if ($nb_add) {
    // On archive les nouveaux identifiants dans un fichier tableur (csv tabulé)
    $profil = $import_profil == 'eleve' ? 'eleve' : ($import_profil == 'parent' ? 'parent' : 'personnel');
    $fnom = 'identifiants_' . $_SESSION['BASE'] . '_' . $profil . '_' . fabriquer_fin_nom_fichier__date_et_alea();
    FileSystem::ecrire_fichier(CHEMIN_DOSSIER_LOGINPASS . $fnom . '.csv', To::csv($fcontenu_csv));
    // On archive les nouveaux identifiants dans un fichier pdf (classe fpdf + script étiquettes)
    $pdf = new PDF_Label(array('paper-size' => 'A4', 'metric' => 'mm', 'marginLeft' => 5, 'marginTop' => 5, 'NX' => 3, 'NY' => 8, 'SpaceX' => 7, 'SpaceY' => 5, 'width' => 60, 'height' => 30, 'font-size' => 11));
    $pdf->AddFont('Arial', '', 'arial.php');
    $pdf->SetFont('Arial');
    // Permet de mieux distinguer les "l 1" etc. que la police Times ou Courrier
    $pdf->AddPage();
    $pdf->SetFillColor(245, 245, 245);
    $pdf->SetDrawColor(145, 145, 145);
    sort($fcontenu_pdf_tab);
    foreach ($fcontenu_pdf_tab as $text) {
        $pdf->Add_Label(To::pdf($text));
    }
    FileSystem::ecrire_sortie_PDF(CHEMIN_DOSSIER_LOGINPASS . $fnom . '.pdf', $pdf);
}
$champ = $import_profil == 'eleve' ? 'Classe' : 'Profil';
echo '<p><label class="valide">' . $nb_debut_actuel . ' utilisateur' . $s_debut_actuel . ' actuel' . $s_debut_actuel . ' et ' . $nb_debut_ancien . ' utilisateur' . $s_debut_ancien . ' ancien' . $s_debut_ancien . ' &rarr; ' . $nb_mod . ' utilisateur' . $s_mod . ' modifié' . $s_mod . ' + ' . $nb_add . ' utilisateur' . $s_add . ' ajouté' . $s_add . ' &minus; ' . $nb_del . ' utilisateur' . $s_del . ' retiré' . $s_del . ' &rarr; ' . $nb_fin_actuel . ' utilisateur' . $s_fin_actuel . ' actuel' . $s_fin_actuel . ' et ' . $nb_fin_ancien . ' utilisateur' . $s_fin_ancien . ' ancien' . $s_fin_ancien . '.</label></p>' . NL;
if ($mode == 'complet') {
    echo '<table>' . NL;
    echo '<thead>' . NL;
    echo '<tr><th>Id Sconet</th><th>N° Sconet</th><th>Référence</th><th>' . $champ . '</th><th>Nom</th><th>Prénom</th><th>Login</th><th>Mot de passe</th><th>Sortie</th></tr>' . NL;
    echo '</thead>' . NL;
    echo '<tbody>' . NL;
    echo $lignes;
    echo '</tbody>' . NL;
    echo '</table>' . NL;
}
예제 #11
0
    }
    $fnom_export = 'saisie_deportee_' . $_SESSION['BASE'] . '_' . $_SESSION['USER_ID'] . '_' . Clean::fichier($BILAN_TYPE) . '_' . Clean::fichier($periode_nom) . '_' . Clean::fichier($groupe_nom) . '_' . $BILAN_ETAT . '_' . fabriquer_fin_nom_fichier__date_et_alea() . '.csv';
    FileSystem::ecrire_fichier(CHEMIN_DOSSIER_EXPORT . $fnom_export, To::csv($export_csv));
    exit($fnom_export);
}
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Cas 2 : réception d'un import csv (saisie déportée)
// ////////////////////////////////////////////////////////////////////////////////////////////////////
if ($ACTION == 'uploader_saisie_csv') {
    $fichier_nom = 'saisie_deportee_' . $_SESSION['BASE'] . '_' . $_SESSION['USER_ID'] . '_' . Clean::fichier($BILAN_TYPE) . '_' . $periode_id . '_' . $groupe_id . '_' . $BILAN_ETAT . '_' . fabriquer_fin_nom_fichier__date_et_alea();
    $result = FileSystem::recuperer_upload(CHEMIN_DOSSIER_IMPORT, $fichier_nom . '.<EXT>', array('txt', 'csv'), NULL, NULL, NULL);
    if ($result !== TRUE) {
        exit('Erreur : ' . $result);
    }
    $contenu_csv = file_get_contents(CHEMIN_DOSSIER_IMPORT . FileSystem::$file_saved_name);
    $contenu_csv = To::deleteBOM(To::utf8($contenu_csv));
    // Mettre en UTF-8 si besoin et retirer le BOM éventuel
    $tab_lignes = extraire_lignes($contenu_csv);
    // Extraire les lignes du fichier
    if (count($tab_lignes) < 4) {
        exit('Erreur : absence de données suffisantes (fichier comportant moins de 4 lignes) !');
    }
    $separateur = extraire_separateur_csv($tab_lignes[2]);
    // Déterminer la nature du séparateur
    // Données de la ligne d'en-tête
    $tab_elements = str_getcsv($tab_lignes[0], $separateur);
    unset($tab_lignes[0]);
    list($string_references, $titre) = $tab_elements + array_fill(0, 2, NULL);
    // Evite des NOTICE en initialisant les valeurs manquantes
    $tab_references = explode('_', $string_references);
    if (count($tab_references) != 5) {
예제 #12
0
 public function lignes_pied_cellules_debut( $info_ponderation )
 {
   $memo_y = $this->GetY()+2;
   $this->SetY( $memo_y );
   $this->choisir_couleur_fond('gris_moyen');
   $this->CellFit( $this->intitule_largeur , $this->cases_hauteur , To::pdf('moy. scores '.$info_ponderation.' [*]') , 1 , 2 , 'C' , $this->fond , '' );
   $this->CellFit( $this->intitule_largeur , $this->cases_hauteur , To::pdf('% items acquis [**]'                  ) , 1 , 0 , 'C' , $this->fond , '' );
   $memo_x = $this->GetX();
   $this->SetXY($memo_x,$memo_y);
 }
예제 #13
0
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Importer un fichier de validations
// ////////////////////////////////////////////////////////////////////////////////////////////////////

if( in_array( $action , array('import_sacoche','import_compatible') ) )
{
  // Si c'est un fichier zippé, on considère alors que c'est un zip devant venir de SACoche, et contenant import_validations.xml
  $fichier_nom = 'import_validations_'.$_SESSION['BASE'].'_'.fabriquer_fin_nom_fichier__date_et_alea().'.xml';
  $result = FileSystem::recuperer_upload( CHEMIN_DOSSIER_IMPORT /*fichier_chemin*/ , $fichier_nom /*fichier_nom*/ , array('xml','zip') /*tab_extensions_autorisees*/ , NULL /*tab_extensions_interdites*/ , NULL /*taille_maxi*/ , 'import_validations.xml' /*filename_in_zip*/ );
  if($result!==TRUE)
  {
    exit('Erreur : '.$result);
  }
  $fichier_contenu = file_get_contents(CHEMIN_DOSSIER_IMPORT.$fichier_nom);
  $fichier_contenu = To::deleteBOM(To::utf8($fichier_contenu)); // Mettre en UTF-8 si besoin et retirer le BOM éventuel
  $xml = @simplexml_load_string($fichier_contenu);
  if($xml===FALSE)
  {
    exit('Erreur : le fichier transmis n\'est pas un XML valide !');
  }
  // On extrait les infos du XML
  $tab_eleve_fichier = array();
  if( ($xml->donnees) && ($xml->donnees->eleve) )
  {
    foreach ($xml->donnees->eleve as $eleve)
    {
      $tab_eleve_fichier['sconet_id'][] = Clean::entier($eleve->attributes()->id);
      $tab_eleve_fichier['nom'][]       = Clean::nom($eleve->attributes()->nom);
      $tab_eleve_fichier['prenom'][]    = Clean::prenom($eleve->attributes()->prenom);
      // Indication des (in-)validations
 function ShowConnecting($_visitor)
 {
     $_visitor->AddFunctionCall("lz_chat_show_connected(" . To::BoolString(!empty(VisitorChat::$DynamicGroup)) . ");", false);
 }
 public function item($item_ref, $item_texte, $colspan_nb)
 {
     $br = $colspan_nb ? 0 : 1;
     $this->choisir_couleur_fond('gris_clair');
     $this->CellFit($this->reference_largeur, $this->cases_hauteur, To::pdf($item_ref), 1, 0, 'C', $this->fond);
     $this->CellFit($this->intitule_largeur, $this->cases_hauteur, To::pdf($item_texte), 1, $br, 'L', FALSE);
     $this->choisir_couleur_fond('blanc');
 }
예제 #16
0
}

// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Cas 2 : réception d'un import csv (saisie déportée)
// ////////////////////////////////////////////////////////////////////////////////////////////////////

if($ACTION=='uploader_saisie_csv')
{
  $fichier_nom = 'saisie_deportee_'.$_SESSION['BASE'].'_'.$_SESSION['USER_ID'].'_'.Clean::fichier($BILAN_TYPE).'_'.$periode_id.'_'.$groupe_id.'_'.$BILAN_ETAT.'_'.fabriquer_fin_nom_fichier__date_et_alea();
  $result = FileSystem::recuperer_upload( CHEMIN_DOSSIER_IMPORT /*fichier_chemin*/ , $fichier_nom.'.<EXT>' /*fichier_nom*/ , array('txt','csv') /*tab_extensions_autorisees*/ , NULL /*tab_extensions_interdites*/ , NULL /*taille_maxi*/ , NULL /*filename_in_zip*/ );
  if($result!==TRUE)
  {
    exit('Erreur : '.$result);
  }
  $contenu_csv = file_get_contents(CHEMIN_DOSSIER_IMPORT.FileSystem::$file_saved_name);
  $contenu_csv = To::deleteBOM(To::utf8($contenu_csv)); // Mettre en UTF-8 si besoin et retirer le BOM éventuel
  $tab_lignes = extraire_lignes($contenu_csv); // Extraire les lignes du fichier
  if(count($tab_lignes)<4)
  {
    exit('Erreur : absence de données suffisantes (fichier comportant moins de 4 lignes) !');
  }
  $separateur = extraire_separateur_csv($tab_lignes[2]); // Déterminer la nature du séparateur
  // Données de la ligne d'en-tête
  $tab_elements = str_getcsv($tab_lignes[0],$separateur);
  unset($tab_lignes[0]);
  list($string_references,$titre) = $tab_elements + array_fill(0,2,NULL); // Evite des NOTICE en initialisant les valeurs manquantes
  $tab_references = explode('_',$string_references);
  if(count($tab_references)!=5)
  {
    exit('Erreur : ligne d\'en-tête invalide !');
  }
예제 #17
0
 public function ligne_synthese( $synthese_nom , $tab_infos_synthese , $total , $hauteur_ligne_synthese , $avec_texte_nombre , $avec_texte_code )
 {
   $hauteur_ligne = $this->lignes_hauteur * $hauteur_ligne_synthese ;
   $largeur_diagramme = ($this->officiel) ? 20 : 40 ;
   $this->SetFont('Arial' , '' , $this->taille_police*0.8);
   $this->afficher_proportion_acquis( $largeur_diagramme , $hauteur_ligne , $tab_infos_synthese , $total,$avec_texte_nombre , $avec_texte_code );
   $intitule_synthese_largeur = ( ($this->officiel) && ($_SESSION['OFFICIEL']['BULLETIN_APPRECIATION_RUBRIQUE_LONGUEUR']) ) ? ( $this->page_largeur_moins_marges ) / 2 - $largeur_diagramme : $this->page_largeur_moins_marges - $largeur_diagramme ;
   // Intitulé synthèse
   $this->SetFont('Arial' , '' , $this->taille_police);
   $couleur_fond = ($this->couleur=='oui') ? 'gris_clair' : 'blanc' ; // Forcer un fonc blanc en cas d'impression en niveau de gris sinon c'est très confus
   $this->choisir_couleur_fond($couleur_fond);
   $this->CellFit( $intitule_synthese_largeur , $hauteur_ligne , To::pdf($synthese_nom) , 1 /*bordure*/ , 1 /*br*/ , 'L' /*alignement*/ , $this->fond );
 }
 public function complet_competence($item_ref, $item_intitule, $note, $cases_nb)
 {
     $memo_x = $this->GetX();
     $memo_y = $this->GetY();
     list($ref_matiere, $ref_suite) = explode('.', $item_ref, 2);
     $this->SetFont('Arial', '', 7);
     $this->CellFit($this->reference_largeur, $this->cases_hauteur / 2, To::pdf($ref_matiere), 0, 2, 'C', FALSE);
     $this->CellFit($this->reference_largeur, $this->cases_hauteur / 2, To::pdf($ref_suite), 0, 2, 'C', FALSE);
     $this->SetFont('Arial', '', 8);
     $this->SetXY($memo_x, $memo_y);
     $this->Cell($this->reference_largeur, $this->cases_hauteur, '', 1, 0, 'C', FALSE);
     $this->CellFit($this->intitule_largeur, $this->cases_hauteur, To::pdf($item_intitule), 1, 0, 'L', FALSE);
     if ($cases_nb == 1) {
         // Avec une case à remplir
         $this->afficher_note_lomer($note, 1, 1);
     } else {
         // Avec 5 cases dont une à cocher
         $tab_codes = array('RR' => TRUE, 'R' => TRUE, 'V' => TRUE, 'VV' => TRUE, 'X' => FALSE);
         foreach ($tab_codes as $note_code => $is_note) {
             if ($is_note) {
                 $coche = $note_code == $note ? 'XXX' : '';
                 $fill = $note_code == $note ? TRUE : FALSE;
                 $br = 0;
             } else {
                 $coche = $note && !isset($tab_codes[$note]) ? $note : '';
                 $fill = $note && !isset($tab_codes[$note]) ? TRUE : FALSE;
                 $br = 1;
             }
             $this->CellFit($this->cases_largeur, $this->cases_hauteur, To::pdf($coche), 1, $br, 'C', $fill);
         }
     }
 }
예제 #19
0
 public function pourcentage_eleve( $eleve_id , $eleve_nom , $eleve_prenom , $tab_score_socle_eleve , $tab_socle , $drapeau_langue )
 {
   $this->pourcentage_largeur = $this->cases_largeur;
   $this->choisir_couleur_fond('gris_moyen');
   $this->SetFont('Arial' , '' , $this->taille_police);
   $this->CellFit( $this->eleve_largeur , $this->cases_hauteur , To::pdf($eleve_nom.' '.$eleve_prenom) , 1 /*bordure*/ , 0 /*br*/ , 'L' /*alignement*/ , $this->fond );
   if($drapeau_langue)
   {
     $taille_image = min($this->cases_hauteur,5);
     $this->Image('./_img/drapeau/'.$drapeau_langue.'.gif',$this->GetX()-$taille_image-0.5,$this->GetY(),$taille_image,$taille_image,'GIF');
   }
   // - - - - -
   // Indication des pourcentages
   // - - - - -
   // Pour chaque entrée du socle...
   foreach($tab_socle as $pilier_id => $tab)
   {
     $this->SetX( $this->GetX()+1 );
     foreach($tab as $socle_id => $socle_nom)
     {
       $this->afficher_pourcentage_acquis( '' , $tab_score_socle_eleve[$socle_id][$eleve_id] , 'pourcentage' /*affich*/ );
     }
   }
   // positionnement pour la suite
   $this->SetXY( $this->marge_gauche , $this->GetY()+$this->cases_hauteur+1 );
 }
 $facture_PDF->CellFit(100, $hauteur_ligne, To::pdf($texte), 0, 2, 'L', FALSE);
 // date de règlement
 if ($DB_ROW['convention_paiement'] !== NULL) {
     $texte = 'Règlement acquitté le ' . convert_date_mysql_to_french($DB_ROW['convention_paiement']) . '.';
 } elseif ($DB_ROW['convention_signature'] !== NULL) {
     list($annee, $mois, $jour) = explode('-', $DB_ROW['convention_signature']);
     $timeunix_signature_plus2mois = mktime(0, 0, 0, $mois + 2, $jour, $annee);
     list($annee, $mois, $jour) = explode('-', $DB_ROW['convention_date_debut']);
     $timeunix_anneescolaire_plus3mois = mktime(0, 0, 0, $mois + 2, $jour, $annee);
     $date_limite = date("d/m/Y", max($timeunix_signature_plus2mois, $timeunix_anneescolaire_plus3mois));
     $texte = 'Date limite de règlement : ' . $date_limite . '.';
 } else {
     $texte = 'Date limite de règlement : 2 mois après la mise en service effective du connecteur.';
 }
 $facture_PDF->SetXY(20, 174);
 $facture_PDF->CellFit(180, $hauteur_ligne, To::pdf($texte), 0, 2, 'L', FALSE);
 // On enregistre la sortie PDF
 $facture_fichier_nom = 'convention_facture_' . fabriquer_fin_nom_fichier__date_et_alea() . '.pdf';
 FileSystem::ecrire_sortie_PDF(CHEMIN_DOSSIER_EXPORT . $facture_fichier_nom, $facture_PDF);
 //
 // Envoyer un courriel au contact.
 //
 if ($f_first_time == 'oui') {
     $titre = 'Convention connecteur ENT établissement - Documents générés';
     $texte = 'Bonjour ' . $DB_ROW2['structure_contact_prenom'] . ' ' . $DB_ROW2['structure_contact_nom'] . ',' . "\r\n";
     $texte .= "\r\n";
     $texte .= 'Vous venez de générer les documents associés à une convention pour un connecteur ENT :' . "\r\n";
     $texte .= 'Référence : ' . $connecteur_ref . "\r\n";
     $texte .= 'Établissement : ' . $_SESSION['ETABLISSEMENT']['DENOMINATION'] . "\r\n";
     $texte .= 'Période : du ' . convert_date_mysql_to_french($DB_ROW['convention_date_debut']) . ' au ' . convert_date_mysql_to_french($DB_ROW['convention_date_fin']) . "\r\n";
     $texte .= "\r\n";
예제 #21
0
 /**
  * Vérifier qu'une arborescence XML d'un référentiel est syntaxiquement valide.
  * 
  * @param string    $arbreXML
  * @return string   "ok" ou "Erreur..."
  */
 public static function verifier_arborescence_XML($arbreXML)
 {
   // On ajoute déclaration et doctype au fichier (évite que l'utilisateur ait à se soucier de cette ligne et permet de le modifier en cas de réorganisation
   // Attention, le chemin du DTD est relatif par rapport à l'emplacement du fichier XML (pas celui du script en cours) !
   $fichier_adresse = CHEMIN_DOSSIER_IMPORT.'referentiel_'.fabriquer_fin_nom_fichier__date_et_alea().'.xml';
   $fichier_contenu = '<?xml version="1.0" encoding="UTF-8"?>'."\r\n".'<!DOCTYPE arbre SYSTEM "../../_dtd/referentiel.dtd">'."\r\n".$arbreXML;
   $fichier_contenu = To::deleteBOM(To::utf8($fichier_contenu)); // Mettre en UTF-8 si besoin et retirer le BOM éventuel
   // On enregistre temporairement dans un fichier pour analyse
   FileSystem::ecrire_fichier($fichier_adresse,$fichier_contenu);
   // On lance le test
   $test_XML_valide = ServeurCommunautaire::analyser_XML($fichier_adresse);
   // On efface le fichier temporaire
   FileSystem::supprimer_fichier($fichier_adresse);
   return $test_XML_valide;
 }
예제 #22
0
     VisitorMonitoring::$Response = str_replace("<!--post_html-->", base64_encode(str_replace("<!--color-->", "#000000", str_replace("<!--lang_client_edit-->", strtoupper(LocalizationManager::$TranslationStrings["client_edit"]), IOStruct::GetFile(TEMPLATE_HTML_MESSAGE_OVERLAY_CHAT_EXTERN)))), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--add_html-->", base64_encode(IOStruct::GetFile(TEMPLATE_HTML_MESSAGE_OVERLAY_CHAT_ADD)), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--offline_message_pop-->", To::BoolString(!empty(Server::$Configuration->File["gl_om_pop_up"])), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--ec_t-->", $eca = Communication::GetParameter("eca", 0, $nu, FILTER_VALIDATE_INT), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--gtv2_api_key-->", strlen(Server::$Configuration->File["gl_otrs"]) > 1 ? base64_encode(Server::$Configuration->File["gl_otrs"]) : "", VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--no_ticket_when_online-->", To::BoolString(Communication::ReadParameter("ovlntwo", false)), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--shadow-->", To::BoolString(Communication::ReadParameter("ovlsc", "")), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--shadowx-->", Communication::ReadParameter("ovlsx", 0), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--shadowy-->", Communication::ReadParameter("ovlsy", 0), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--shadowb-->", Communication::ReadParameter("ovlsb", 0), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--shadowc-->", Communication::ReadParameter("ovlsc", ""), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--kb_suggest-->", To::BoolString(Server::$Configuration->File["gl_knbs"]), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--border_radius-->", Communication::ReadParameter("ovlbr", 6), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--hide_group_select_chat-->", To::BoolString(Communication::GetParameter("hcgs", false)), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--hide_group_select_ticket-->", To::BoolString(Communication::GetParameter("htgs", false)), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = str_replace("<!--require_group_selection-->", To::BoolString(Communication::GetParameter("rgs", false)), VisitorMonitoring::$Response);
     VisitorMonitoring::$Response = OverlayChat::ReplaceColors(VisitorMonitoring::$Response, false);
     if ($eca == 1) {
         VisitorMonitoring::$Response = str_replace("<!--ec_header_text-->", Encoding::Base64UrlEncode(Communication::GetParameter("echt", @LocalizationManager::$TranslationStrings["client_ec_text"], $c, FILTER_HTML_ENTITIES)), VisitorMonitoring::$Response);
         VisitorMonitoring::$Response = str_replace("<!--ec_header_sub_text-->", Encoding::Base64UrlEncode(Communication::GetParameter("echst", @LocalizationManager::$TranslationStrings["client_ec_sub_text"], $c, FILTER_HTML_ENTITIES)), VisitorMonitoring::$Response);
         VisitorMonitoring::$Response = str_replace("<!--ec_o_header_text-->", Encoding::Base64UrlEncode(Communication::GetParameter("ecoht", @LocalizationManager::$TranslationStrings["client_ec_o_text"], $c, FILTER_HTML_ENTITIES)), VisitorMonitoring::$Response);
         VisitorMonitoring::$Response = str_replace("<!--ec_o_header_sub_text-->", Encoding::Base64UrlEncode(Communication::GetParameter("ecohst", @LocalizationManager::$TranslationStrings["client_ec_o_sub_text"], $c, FILTER_HTML_ENTITIES)), VisitorMonitoring::$Response);
     } else {
         if ($eca == 2) {
             VisitorMonitoring::$Response = str_replace("<!--ec_image-->", Encoding::Base64UrlEncode(Communication::ReadParameter("eci", "")), VisitorMonitoring::$Response);
             VisitorMonitoring::$Response = str_replace("<!--ec_o_image-->", Encoding::Base64UrlEncode(Communication::ReadParameter("ecio", "")), VisitorMonitoring::$Response);
         }
     }
     VisitorMonitoring::$Response = Server::Replace(VisitorMonitoring::$Response, true, false);
 }
 VisitorMonitoring::$Response = str_replace("<!--user_name-->", Encoding::Base64UrlEncode(VisitorMonitoring::$Browser->UserData->Fullname), VisitorMonitoring::$Response);
예제 #23
0
    FileSystem::ecrire_fichier(CHEMIN_DOSSIER_IMPORT . $fichier_memo, serialize($tab_users_fichier));
    // On affiche la demande de confirmation
    exit('ok' . ']¤[' . html($date_export) . ']¤[' . html($periode_libelle) . ']¤[' . html($periode_date_debut) . ']¤[' . html($periode_date_fin));
}
// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Réception et analyse d'un fichier d'import issu de GEPI Absences 2
// ////////////////////////////////////////////////////////////////////////////////////////////////////
if ($action == 'import_gepi' && $periode_id) {
    // Récupération du fichier
    $result = FileSystem::recuperer_upload(CHEMIN_DOSSIER_IMPORT, $fichier_dest, $tab_extensions_autorisees, NULL, NULL, '');
    if ($result !== TRUE) {
        exit('Erreur : ' . $result);
    }
    // Récupération des données du fichier
    $contenu = file_get_contents(CHEMIN_DOSSIER_IMPORT . $fichier_dest);
    $contenu = To::deleteBOM(To::utf8($contenu));
    // Mettre en UTF-8 si besoin et retirer le BOM éventuel
    $tab_lignes = extraire_lignes($contenu);
    // Extraire les lignes du fichier
    $separateur = extraire_separateur_csv($tab_lignes[0]);
    // Déterminer la nature du séparateur
    unset($tab_lignes[0]);
    // Supprimer la 1e ligne
    // Aanalyse et maj du contenu de la base
    $tab_users_fichier = array();
    foreach ($tab_lignes as $ligne_contenu) {
        $tab_elements = str_getcsv($ligne_contenu, $separateur);
        $tab_elements = array_slice($tab_elements, 0, 7);
        if (count($tab_elements) == 7) {
            list($elenoet, $nom, $prenom, $classe, $nb_absence, $nb_absence_nj, $nb_retard) = $tab_elements;
            $tab_users_fichier[] = array(NULL, Clean::entier($elenoet), Clean::nom($nom), Clean::prenom($prenom), Clean::entier($nb_absence), Clean::entier($nb_absence_nj), Clean::entier($nb_retard), NULL);
예제 #24
0
 public function repartition_nominative_cases_eleves( $tab_repartition_nominatif_item )
 {
   foreach($tab_repartition_nominatif_item as $code=>$tab_eleves)
   {
     // Ecrire les noms ; plus court avec MultiCell() mais pb des retours à la ligne pour les noms trop longs
     $memo_X = $this->GetX();
     $memo_Y = $this->GetY();
     foreach($tab_eleves as $key => $eleve_texte)
     {
       $this->CellFit( $this->cases_largeur , $this->lignes_hauteur , To::pdf($eleve_texte) , 0 , 2 , 'L' , FALSE /*fond*/ , '' );
     }
     // Ajouter la bordure
     $this->SetXY($memo_X , $memo_Y);
     $this->Cell( $this->cases_largeur , $this->cases_hauteur , '' , 1 , 0 , 'C' , FALSE /*fond*/ , '' );
   }
   $this->SetXY( $this->marge_gauche , $this->GetY()+$this->cases_hauteur );
 }
function updateMembers($_dgroup = "")
{
    global $USER;
    Server::InitDataBlock(array("DBCONFIG"));
    $groupname = addslashes(Server::$Groups[$USER->Browsers[0]->DesiredChatGroup]->GetDescription($USER->Language));
    foreach (Server::$Groups as $group) {
        if ($group->IsDynamic && isset($group->Members[$USER->Browsers[0]->SystemId])) {
            $_dgroup = $group->Descriptions["EN"];
            foreach ($group->Members as $member => $persistent) {
                if (true || $member != $USER->Browsers[0]->SystemId) {
                    $isOperator = false;
                    $isBusyAway = false;
                    if (!empty(Server::$Operators[$member])) {
                        $isOperator = true;
                        if (Server::$Operators[$member]->Status == USER_STATUS_OFFLINE) {
                            continue;
                        }
                        if (Server::$Operators[$member]->Status != USER_STATUS_ONLINE || Server::$Operators[$member]->IsBot) {
                            $isBusyAway = true;
                        }
                        $name = Server::$Operators[$member]->Fullname;
                    } else {
                        $data = UserData::FromSystemId($member);
                        $name = $data->Fullname;
                        if (empty($name)) {
                            $name = LocalizationManager::$TranslationStrings["client_guest"];
                        }
                        if ($member != $USER->Browsers[0]->SystemId) {
                            $chatobj = VisitorChat::GetBySystemId($member);
                            if (!($chatobj != null && !$chatobj->ExternalClosed && !$chatobj->InternalClosed)) {
                                continue;
                            }
                        }
                    }
                    $USER->AddFunctionCall("lz_chat_set_room_member('" . base64_encode($member) . "','" . base64_encode($name) . "'," . To::BoolString($isOperator) . "," . To::BoolString($isBusyAway) . ",true);", false);
                }
            }
        }
    }
    foreach ($USER->Browsers[0]->Members as $sysid => $chatm) {
        if ($chatm->Status < 2 && empty($chatm->Declined) && Server::$Operators[$sysid]->Status != USER_STATUS_OFFLINE) {
            $USER->AddFunctionCall("lz_chat_set_room_member('" . base64_encode($sysid) . "','" . base64_encode(Server::$Operators[$sysid]->Fullname) . "',true," . To::BoolString(Server::$Operators[$sysid]->Status != USER_STATUS_ONLINE) . ",false);", false);
        }
    }
    $fb = !empty(Server::$Groups[$USER->Browsers[0]->DesiredChatGroup]->ChatFunctions[3]) && !empty(Server::$Configuration->Database["gl_fb"]);
    $USER->AddFunctionCall("lz_chat_set_host(\"" . base64_encode(Server::$Operators[$USER->Browsers[0]->OperatorId]->UserId) . "\",\"" . base64_encode(addslashes(Server::$Operators[$USER->Browsers[0]->OperatorId]->Fullname)) . "\",\"" . base64_encode($groupname) . "\",\"" . strtolower(Server::$Operators[$USER->Browsers[0]->OperatorId]->Language) . "\"," . To::BoolString(Server::$Operators[$USER->Browsers[0]->OperatorId]->Typing == $USER->Browsers[0]->SystemId) . "," . To::BoolString(!empty(Server::$Operators[$USER->Browsers[0]->OperatorId]->Profile) && Server::$Operators[$USER->Browsers[0]->OperatorId]->Profile->Public) . ",\"" . base64_encode($_dgroup) . "\"," . To::BoolString($fb) . ");", false);
}
예제 #26
0
        {
          if($make_html) { $releve_HTML_individuel .= Html::legende( TRUE /*codes_notation*/ , ($retroactif!='non') /*anciennete_notation*/ , $aff_etat_acquisition /*score_bilan*/ , FALSE /*etat_acquisition*/ , FALSE /*pourcentage_acquis*/ , FALSE /*etat_validation*/ , $make_officiel ); }
          if($make_pdf)  { $releve_PDF->legende(); }
        }
      }
    }
  }
  // Ajout du javascript en fin de fichier
  if($make_html)
  {
    $releve_HTML_individuel .= '<script type="text/javascript">'.$releve_HTML_individuel_javascript.'</script>'.NL;
  }
  // On enregistre les sorties HTML et PDF et CSV
  if($make_html) { FileSystem::ecrire_fichier(    CHEMIN_DOSSIER_EXPORT.str_replace('<REPLACE>','individuel',$fichier_nom).'.html' , $releve_HTML_individuel ); }
  if($make_pdf)  { FileSystem::ecrire_sortie_PDF( CHEMIN_DOSSIER_EXPORT.str_replace('<REPLACE>','individuel',$fichier_nom).'.pdf'  , $releve_PDF ); }
  if($make_csv)  { FileSystem::ecrire_fichier(    CHEMIN_DOSSIER_EXPORT.str_replace('<REPLACE>','individuel',$fichier_nom).'.csv'  , To::csv($releve_CSV) ); }
}

// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Elaboration de la synthèse collective en HTML et PDF
// ////////////////////////////////////////////////////////////////////////////////////////////////////

if($type_synthese)
{
  $releve_HTML_synthese  = $affichage_direct ? '' : '<style type="text/css">'.$_SESSION['CSS'].'</style>'.NL;
  $releve_HTML_synthese .= $affichage_direct ? '' : '<h1>Bilan '.$tab_titre[$releve_modele].'</h1>'.NL;
  $releve_HTML_synthese .= '<h2>'.html($matiere_et_groupe).'</h2>'.NL;
  if($texte_periode)
  {
    $releve_HTML_synthese .= '<h2>'.html($texte_periode).'</h2>'.NL;
  }
예제 #27
0
}
require LIVEZILLA_PATH . "_definitions/definitions.inc.php";
require LIVEZILLA_PATH . "_lib/functions.global.inc.php";
require LIVEZILLA_PATH . "_definitions/definitions.dynamic.inc.php";
require LIVEZILLA_PATH . "_definitions/definitions.protocol.inc.php";
require LIVEZILLA_PATH . "_lib/functions.external.inc.php";
@set_error_handler("handleError");
@error_reporting(E_ALL);
header("Pragma: no-cache");
header("Cache-Control: no-cache, must-revalidate");
header("Keep-Alive: timeout=5, max=100");
Server::InitDataProvider();
if (!empty($_GET["value"]) && strlen($_GET["value"]) == 16) {
    $ticket = VisitorChat::GetMatchingVoucher($_GET[GET_EXTERN_GROUP], $_GET["value"]);
    if (!empty($ticket) && !$ticket->CheckForVoid() && $ticket->Paid) {
        $ticket->UpdateVoucherChatTime(0, empty($ticket->FirstUsed));
        $sessions = $ticket->ChatSessionsMax < 0 ? 0 : $ticket->ChatSessionsMax;
        if ($result = DBManager::Execute(true, "SELECT `exit` FROM `" . DB_PREFIX . DATABASE_VISITOR_CHATS . "` WHERE `chat_ticket_id`='" . DBManager::RealEscape($ticket->Id) . "' AND `exit`=0 LIMIT 1;")) {
            if ($row = DBManager::FetchArray($result)) {
                exit("lz_validate_com_chat_input_result(false,true,1,'',0,0,0,false,false,false);");
            }
        }
        exit("lz_validate_com_chat_input_result(true,false,1,'" . $ticket->Id . "'," . $ticket->ChatTime . "," . $ticket->ChatTimeMax . "," . $ticket->ChatSessions . "," . $ticket->ChatSessionsMax . "," . $ticket->VoucherAutoExpire . "," . To::BoolString($ticket->VoucherAutoExpire < time()) . ");");
    } else {
        if (!empty($ticket)) {
            exit("lz_validate_com_chat_input_result(false,false,1,'',0,0,0,false,false,false);");
        }
    }
}
exit("lz_validate_com_chat_input_result(false,false,0,'',0,0,0,false,false,false);");
Server::UnloadDataProvider();
예제 #28
0
  echo'<p class="danger">Le fichier n\'existe pas : probablement qu\'aucune action sensible n\'a encore été effectuée !</p>'.NL;
}
else
{
  
  // 1 En extraire le plus récent (les 100 derniers enregistrements)
  $table_log_extrait = '<table class="p"><thead><tr><th>Date &amp; Heure</th><th>Utilisateur</th><th>Action</th></tr></thead><tbody>';
  $tab_lignes = extraire_lignes($fichier_log_contenu);
  $indice_ligne_debut = count($tab_lignes)-1 ;
  $indice_ligne_fin   = max(-1 , $indice_ligne_debut-100) ;
  $nb_lignes          = $indice_ligne_debut - $indice_ligne_fin ;
  $s = ($nb_lignes>1) ? 's' : '' ;
  for( $indice_ligne=$indice_ligne_debut ; $indice_ligne>$indice_ligne_fin ; $indice_ligne-- )
  {
    list( $balise_debut , $date_heure , $utilisateur , $action , $balise_fin ) = explode("\t",$tab_lignes[$indice_ligne]);
    $table_log_extrait .= '<tr><td>'.$date_heure.'</td><td>'.$utilisateur.'</td><td>'.$action.'</td></tr>'; // Pas de html(), cela a déjà été fait lors de l'enregistrement des logs
  }
  $table_log_extrait .= '</tbody></table>';
  // 2 Enregistrer un csv récupérable
  $fichier_log_contenu = str_replace(array('<?php /*','*/ ?>'),'',$fichier_log_contenu);
  $fichier_export_nom = 'log_'.$_SESSION['BASE'].'_'.fabriquer_fin_nom_fichier__date_et_alea();
  FileSystem::ecrire_fichier( CHEMIN_DOSSIER_EXPORT.$fichier_export_nom.'.csv' , To::csv($fichier_log_contenu) );
  // Afficher tout ça
  echo'<ul class="puce">'.NL;
  echo  '<li><a target="_blank" href="./force_download.php?fichier='.$fichier_export_nom.'.csv"><span class="file file_txt">Récupérer le fichier complet (format <em>csv</em>).</span></a></li>'.NL;
  echo  '<li>Consulter les derniers logs ('.$nb_lignes.' ligne'.$s.') :</li>'.NL;
  echo'</ul>'.NL;
  echo $table_log_extrait;
}
?>
예제 #29
0
      }
    }
    else
    {
      echo'<tr class="vide"><td class="nu" colspan="15"></td><td class="nu"></td></tr>'.NL;
    }
    ?>
  </tbody>
</table>

<?php
if( $find_doublon && !empty($DB_TAB) )
{
  // Finalisation de l'export CSV (archivage dans un fichier)
  $fnom = 'extraction_doublons_responsables_'.fabriquer_fin_nom_fichier__date_et_alea();
  FileSystem::ecrire_fichier( CHEMIN_DOSSIER_EXPORT.$fnom.'.csv' , To::csv($export_csv) );
  echo'<p><ul class="puce"><li><a target="_blank" href="./force_download.php?fichier='.$fnom.'.csv"><span class="file file_txt">Récupérer les données dans un fichier (format <em>csv</em></span>).</a></li></ul></p>'.NL;
}
?>

<div id="zone_actions" style="margin-left:3em">
  <div class="p"><span class="u">Pour les utilisateurs cochés :</span> <input id="listing_ids" name="listing_ids" type="hidden" value="" /><label id="ajax_msg_actions">&nbsp;</label></div>
  <button id="retirer" type="button" class="user_desactiver">Retirer</button> (date de sortie au <?php echo TODAY_FR ?>).<br />
  <button id="reintegrer" type="button" class="user_ajouter">Réintégrer</button> (retrait de la date de sortie).<br />
  <button id="supprimer" type="button" class="supprimer">Supprimer</button> sans attendre 3 ans (uniquement si déjà sortis).
</div>

<form action="#" method="post" id="form_gestion" class="hide">
  <h2>Ajouter | Modifier un utilisateur</h2>
  <p>
    <label class="tab" for="f_id_ent">Id. ENT <img alt="" src="./_img/bulle_aide.png" width="16" height="16" title="Uniquement en cas d'identification via un ENT." /> :</label><input id="f_id_ent" name="f_id_ent" type="text" value="" size="30" maxlength="63" /><br />
예제 #30
0
 public function ligne_tag($tag_date_heure_initiales)
 {
     $taille_police = 5;
     $ligne_hauteur = $taille_police * 0.4;
     $this->SetFont('Arial', '', $taille_police);
     $this->SetXY($this->marge_gauche - 1, $this->marge_haut + 8.5);
     $this->Cell($this->page_largeur_moins_marges, $ligne_hauteur, To::pdf($tag_date_heure_initiales), 0, 2, 'R', FALSE);
 }