Beispiel #1
0
$text_classe_matiere = '';
if (isset($_GET['id_groupe'])) {
    $current_group = get_group((int) $_GET['id_groupe']);
    $text_classe_matiere = $current_group["description"];
    $text_classe_matiere .= " - Classe";
    if (count($current_group["classes"]["list"]) > 1) {
        $text_classe_matiere .= "s";
    }
    $text_classe_matiere .= " : " . $current_group["classlist_string"];
    if (isset($_GET['periode_num'])) {
        $text_classe_matiere .= " - Période : " . sql_query1("SELECT nom_periode FROM periodes WHERE\n        (\n        id_classe='" . $current_group["classes"]["list"][0] . "' and\n        num_periode='" . (int) $_GET['periode_num'] . "'\n        )");
    }
}
//if ($text_classe_matiere != '') $pdf->Cell(100, 8, $text_classe_matiere,$bord,0,"L",0);
if ($text_classe_matiere != '') {
    $pdf->Cell(100, 8, $text_classe_matiere, $bord, 0, "L", 0);
}
$pdf->ln();
//isset($_GET['titre']) ? $titre = unslashes($_GET['titre']) : $titre='' ;
isset($_GET['titre']) ? $titre = unslashes($_GET['titre']) : ($titre = '');
if ($titre != '') {
    //Positionnement du titre
    $w = $pdf->GetStringWidth($titre) + 6;
    $pdf->SetX((LargeurPage - $w) / 2);
    //Couleurs du cadre, du fond et du texte
    $pdf->SetDrawColor(0, 0, 0);
    $pdf->SetFillColor(255, 255, 255);
    $pdf->SetTextColor(0, 0, 0);
    //Titre centré
    $pdf->Cell($w, 9, $titre, $bord, 1, 'C', 0);
    //Saut de ligne
Beispiel #2
0
 $pdf->SetDrawColor(0, 0, 0);
 // Pour les tests : permet de voir les bords des cadres
 $bord = 0;
 // on appelle une nouvelle page pdf
 $pdf->AddPage("P");
 $pdf->SetFontSize(10);
 $titre = $nom_court_dev . " : " . $nom_complet_dev;
 //Positionnement du titre
 $w = $pdf->GetStringWidth($titre) + 6;
 $pdf->SetX((LargeurPage - $w) / 2);
 //Couleurs du cadre, du fond et du texte
 $pdf->SetDrawColor(0, 0, 0);
 $pdf->SetFillColor(255, 255, 255);
 $pdf->SetTextColor(0, 0, 0);
 //Titre centré
 $pdf->Cell($w, 9, $titre, $bord, 1, 'C', 0);
 //Saut de ligne
 //Initialisation pour le pdf
 $w_pdf = array();
 $w1 = "i";
 //largeur de la première colonne
 $w1b = "d";
 //largeur de la colonne "classe" si présente
 $w2 = "n";
 // largeur des colonnes "notes"
 $w3 = "c";
 // largeur des colonnes "commentaires"
 $header_pdf = array();
 $data_pdf = array();
 $sql = "SELECT * FROM cc_eval WHERE id_dev='{$id_dev}' ORDER BY date, nom_court, nom_complet;";
 //echo "$sql<br />";