Beispiel #1
0
 include_once CMS_ROOTPATH . "source.php";
 $pdf->AddPage();
 // appendix on new page
 $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");
Beispiel #2
0
<?php

@set_time_limit(300);
if (isset($_GET["id"])) {
    // source.php is called from show_sources.php, sources.php
    $sourcenumber = $_GET["id"];
    source_display($sourcenumber);
}
/*--------------------[source_display]----------------------------
 * Show a single source.
 * RETURNS: shows a single source.
 *    NOTE: function can be called from sources.php and show_sources.php.
 *----------------------------------------------------------------
 */
function source_display($sourcenum)
{
    global $dbh, $db_functions, $tree_prefix_quoted, $dataDb, $user, $pdf, $screen_mode, $language;
    if ($screen_mode != "PDF") {
        include_once "header.php";
        //returns CMS_ROOTPATH constant
        include_once CMS_ROOTPATH . "menu.php";
        include_once CMS_ROOTPATH . "include/date_place.php";
        include_once CMS_ROOTPATH . "include/process_text.php";
    }
    // *** Check user authority ***
    if ($user['group_sources'] != 'j') {
        echo __('You are not authorised to see this page.');
        exit;
    }
    if ($screen_mode != "PDF") {
        include_once CMS_ROOTPATH . "include/language_date.php";