function getPorts($NumPorts) { $HTML = ''; require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/list-of-ports.php'; $HTML .= freshports_ListOfPorts($this->_result, $this->_db, 'Y', $this->getShowCategoryHeaders(), $this->User, $NumPorts); return $HTML; }
if ($User->id) { $sql .= "\n LEFT OUTER JOIN\n (SELECT element_id as wle_element_id, COUNT(watch_list_id) as onwatchlist\n FROM watch_list JOIN watch_list_element\n ON watch_list.id = watch_list_element.watch_list_id\n AND watch_list.user_id = {$User->id}\n AND watch_list.in_service\n GROUP BY wle_element_id) AS TEMP2\n ON TEMP2.wle_element_id = ports.element_id"; } $sql .= "\n WHERE ports.date_added > (SELECT now() - interval '{$IntervalAdjust}')) AS\nTEMP, element, categories\n WHERE TEMP.category_id = categories.id\n and element.status = 'A'\n and TEMP.element_id = element.id\n "; $sql .= "\n order by {$sort} "; if ($Debug) { echo "<pre>{$sql}</pre>"; } $result = pg_exec($db, $sql); if (!$result) { echo pg_errormessage(); } else { $numrows = pg_numrows($result); } require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/list-of-ports.php'; echo freshports_ListOfPorts($result, $db, 'Y', $ShowCategoryHeaders, $User, $numrows); ?> </TABLE> <TD VALIGN="top" WIDTH="*" ALIGN="center"> <?php echo freshports_SideBar(); ?> </td> </TR> </TABLE> <?php echo freshports_ShowFooter();