function freshports_ListOfPorts($result, $db, $ShowDateAdded, $ShowCategoryHeaders, $User, $PortCount = -1) { require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/ports.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/port-display.php'; $port_display = new port_display($db, $User); $port_display->SetDetailsReports(); $port = new Port($db); $port->LocalResult = $result; $LastCategory = ''; $GlobalHideLastChange = 'N'; $numrows = pg_numrows($result); if ($PortCount == -1) { $PortCount = $numrows; } $PortCountText = "<TR><TD>{$PortCount} ports found."; if ($numrows != $PortCount) { $PortCountText .= " (showing only {$numrows} ports on this page)"; } $PortCountText .= "</TD></TR>\n"; $HTML = $PortCountText; $HTML .= "<TR><TD>\n"; $HTML .= "<br><center>\n" . Ad_728x90() . "\n</center>\n"; if ($numrows > 0 && $ShowCategoryHeaders) { $HTML .= '<DL>'; } for ($i = 0; $i < $numrows; $i++) { $port->FetchNth($i); if ($ShowCategoryHeaders) { $Category = $port->category; if ($LastCategory != $Category) { if ($i > 0) { $HTML .= "\n</DD>\n"; } $LastCategory = $Category; if ($ShowCategoryHeaders) { $HTML .= '<DT>'; } $HTML .= '<BIG><BIG><B><a href="/' . $Category . '/">' . $Category . '</a></B></BIG></BIG>'; if ($ShowCategoryHeaders) { $HTML .= "</DT>\n<DD>"; } } } $port_display->port = $port; $Port_HTML = $port_display->Display(); $HTML .= $port_display->ReplaceWatchListToken($port->{'onwatchlist'}, $Port_HTML, $port->{'element_id'}); $HTML .= '<BR>'; } if ($numrows && $ShowCategoryHeaders) { $HTML .= "\n</DD>\n</DL>\n"; } $HTML .= "</TD></TR>\n"; $HTML .= $PortCountText; return $HTML; }
$Action = "add"; $Verb = 'added'; $FromTo = 'to'; $Object = pg_escape_string($_REQUEST["add"]); } else { die("I don't know whether you are removing or adding, so I'll just stop here shall I?"); } } if ($Object == '') { die('I have no idea what I\'m supposed to add or remove here...'); } $port = new Port($db); $port->FetchByElementID($Object, $User->id); require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/port-display.php'; $port_display = new port_display($db, $User); $port_display->SetDetailsReports(); $port_display->port = $port; $Port_HTML = $port_display->Display(); $HTML = $port_display->ReplaceWatchListToken($port->{'onwatchlist'}, $Port_HTML, $port->{'element_id'}); echo $HTML; ?> Please select the watch lists which should contain this port: <blockquote> <form action="<?php echo $PostURL; ?> " method="POST" NAME=f> <?php echo freshports_WatchListDDLB($db, $User->id, '', 10, TRUE, TRUE, $Object); ?> <br><br>