Exemple #1
0
 $pdf->SetFont('Arial', "B", 14);
 $pdf->Write(8, __('Sources') . "\n\n");
 $pdf->SetFont('Arial', '', 10);
 // the $pdf_source array is set in show_sources.php with sourcenr as key and value if a linked source is given
 $count = 0;
 foreach ($pdf_source as $key => $value) {
     $count++;
     if (isset($pdf_source[$key])) {
         $pdf->SetLink($pdf_footnotes[$count - 1], -1);
         $pdf->SetFont('Arial', 'B', 10);
         $pdf->Write(6, $count . ". ");
         if ($user['group_sources'] == 'j') {
             source_display($pdf_source[$key]);
             // function source_display from source.php, called with source nr.
         } elseif ($user['group_sources'] == 't') {
             $sourceDb = $db_functions->get_source($pdf_source[$key]);
             if ($sourceDb->source_title) {
                 $pdf->SetFont('Arial', 'B', 10);
                 $pdf->Write(6, __('Title') . ": ");
                 $pdf->SetFont('Arial', '', 10);
                 $txt = ' ' . trim($sourceDb->source_title);
                 if ($sourceDb->source_date or $sourceDb->source_place) {
                     $txt .= " " . date_place($sourceDb->source_date, $sourceDb->source_place);
                 }
                 $pdf->Write(6, $txt . "\n");
             }
         }
         $pdf->Write(2, "\n");
         $pdf->SetDrawColor(200);
         // grey line
         $pdf->Cell(0, 2, " ", 'B', 1);