function toHTML()
 {
     $this->addBodyContent('<TR><TD>' . $this->getDescription() . '</TD></TR>');
     // make sure the value for $sort is valid
     $SortStatement = "<TR><TD>\nThis page is " . $this->getSortedbyHTML() . "</TD></TR>\n";
     $this->addBodyContent($SortStatement);
     $NumPorts = $this->getRowCount();
     $numrows = $this->ExecuteQuery();
     $PageLinks = $this->pageLinks();
     if ($PageLinks != '') {
         $this->AddBodyContent('<tr><td align="center">');
         $this->AddBodyContent($PageLinks);
         $this->AddBodyContent('</td></tr>');
     }
     $this->addBodyContent($this->getPorts($NumPorts));
     $this->addBodyContent($SortStatement);
     if ($PageLinks != '') {
         $this->AddBodyContent('<tr><td align="center">');
         $this->AddBodyContent($PageLinks);
         $this->AddBodyContent('</td></tr>');
     }
     return parent::toHTML();
 }
Пример #2
0
<?php

#
# $Id: newsfeeds.php,v 1.2 2006-12-17 12:06:22 dan Exp $
#
# Copyright (c) 1998-2006 DVL Software Limited
#
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/common.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/freshports.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/databaselogin.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/getvalues.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/freshports_page.php';
$page = new freshports_page();
$page->setDB($db);
$page->setTitle('Newsfeeds');
$page->addBodyContent('
	</tr><TR><TD valign="top">
	We have five newsfeeds:
	');
$ServerName = str_replace('freshports', 'FreshPorts', $_SERVER['SERVER_NAME']);
$URL = "http://{$ServerName}/backend/news.php";
$HREF = "<A HREF=\"{$URL}\">{$URL}</A>";
$page->addBodyContent('
	<OL>
	<LI>An RSS feed : ' . $HREF . '
	<p>Take your pick of different formats:');
$URL = "http://{$ServerName}/backend/";
$HREF = "<A HREF=\"{$URL}\">{$URL}</A>";
$page->addBodyContent($HREF . '
	
	<p>This RSS feed takes the following optional parameters: