Beispiel #1
0
 /**
  * The footer of the PDF file
  *
  * @return void
  */
 public function Footer()
 {
     global $PMF_LANG;
     $faqconfig = PMF_Configuration::getInstance();
     $currentTextColor = $this->TextColor;
     $this->SetTextColor(0, 0, 0);
     $this->SetY(-25);
     $this->SetFont('dejavusans', '', 10);
     $this->Cell(0, 10, $PMF_LANG['ad_gen_page'] . ' ' . $this->PageNo() . ' / ' . $this->getAliasNbPages(), 0, 0, 'C');
     $this->SetY(-20);
     $this->SetFont('dejavusans', 'B', 8);
     $this->Cell(0, 10, "(c) " . date("Y") . " " . $faqconfig->get('main.metaPublisher') . " <" . $faqconfig->get('main.administrationMail') . ">", 0, 1, "C");
     if ($this->enableBookmarks == false) {
         $this->SetY(-15);
         $this->SetFont('dejavusans', '', 8);
         $baseUrl = '/index.php';
         if (is_array($this->faq) && !empty($this->faq)) {
             $baseUrl .= '?action=artikel&amp;cat=' . $this->categories[$this->category]['id'];
             $baseUrl .= '&amp;id=' . $this->faq['id'];
             $baseUrl .= '&amp;artlang=' . $this->faq['lang'];
         }
         $url = PMF_Link::getSystemScheme() . $_SERVER['HTTP_HOST'] . $baseUrl;
         $urlObj = new PMF_Link($url);
         $urlObj->itemTitle = $this->thema;
         $_url = str_replace('&amp;', '&', $urlObj->toString());
         $this->Cell(0, 10, 'URL: ' . $_url, 0, 1, 'C', 0, $_url);
     }
     $this->TextColor = $currentTextColor;
 }
Beispiel #2
0
 /**
  * Returns the system URI
  * 
  * @return string
  */
 public static function getSystemUri($path = null)
 {
     // $_SERVER['HTTP_HOST'] is the name of the website or virtual host name (HTTP/1.1)
     // Precisely, it contains what the user has written in the Host request-header, see below.
     // RFC 2616: The Host request-header field specifies the Internet host and port number of the resource
     //           being requested, as obtained from the original URI given by the user or referring resource
     // Remove any ref to standard ports 80 and 443.
     $pattern[0] = '/:80$/';
     // HTTP: port 80
     $pattern[1] = '/:443$/';
     // HTTPS: port 443
     $sysUri = PMF_Link::getSystemScheme() . preg_replace($pattern, '', $_SERVER['HTTP_HOST']);
     return $sysUri . PMF_link::getSystemRelativeUri($path);
 }