<?php # # $Id: index.php,v 1.2 2006-12-17 12:06:22 dan Exp $ # # Copyright (c) 1998-2003 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'] . '/../classes/commit_record.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/latest_commits.php'; # JUST IN CASE THIS ISN'T SET ALREADY if (!isset($MaxNumberOfPortsLong)) { $MaxNumberOfPortsLong = 100; } $NumCommits = $MaxNumberOfPortsLong; if (isset($_REQUEST["numcommits"])) { $NumCommits = intval(AddSlashes($_REQUEST["numcommits"])); $NumCommits = min($MaxNumberOfPortsLong, max(10, $NumCommits)); } $LatestCommits = new LatestCommits($db); $LatestCommits->SetMaxNumberOfPorts($NumCommits); $LatestCommits->SetDaysMarkedAsNew($DaysMarkedAsNew); $LatestCommits->CreateHTML(); echo $LatestCommits->HTML; $Statistics->Save();
if ($User->id == '') { if (file_exists(CACHEFILE) && is_readable(CACHEFILE)) { $UseCache = TRUE; } } if ($UseCache) { readfile(CACHEFILE); } else { require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/latest_commits.php'; $LatestCommits = new LatestCommits($db); $LatestCommits->Debug = $Debug; # $LatestCommits->SetFilter('/ports/sysutils/%'); # $LatestCommits->SetFilter("(EP.pathname like '/ports/sysutils/%' or EP.pathname like '/ports/net-p2p/%')"); $LatestCommits->SetFilter("(EP.pathname like '/ports/lang/%')"); # $LatestCommits->SetFilter($User->filter); $LatestCommits->SetMaxNumberOfPorts($MaxNumberOfPortsLong); $LatestCommits->SetDaysMarkedAsNew($DaysMarkedAsNew); $LatestCommits->SetUserID($User->id); $LatestCommits->SetWatchListAsk($User->watch_list_add_remove); $LatestCommits->CreateHTML(); echo $LatestCommits->HTML; } } ?> </TABLE> </TD> <TD VALIGN="top" WIDTH="*" ALIGN="center"> <?php echo freshports_SideBar(); ?>