コード例 #1
0
if ($dailysummary) {
    for ($i = 0; $i < $dailysummary; $i++) {
        freshports_SummaryForDay($i);
    }
} else {
    if ($NumberOfDays) {
        $Today = time();
        echo '
<TABLE WIDTH="155" BORDER="1" CELLSPACING="0" CELLPADDING="5">
	<TR>
		<TD BGCOLOR="' . BACKGROUND_COLOUR . '" height="30"><FONT COLOR="#FFFFFF"><BIG><B>Previous days</B></BIG></FONT></TD>
	</TR>
	<TR><TD>
';
        for ($i = 1; $i <= $NumberOfDays; $i++) {
            echo freshports_LinkToDate($Today - $i * 86400) . "<br>\n";
        }
        echo '
	</TD></TR>
</TABLE>

';
    }
}
?>
 </TD>
</TR>
</TABLE>

<BR>
コード例 #2
0
ファイル: filter.php プロジェクト: brycied00d/freshports
            echo freshports_LinkToDate($Today - $i * 86400) . "<br>\n";
        }
        echo '
	</TD></TR>
</TABLE>

';
    }
}
?>
 </TD>
</TR>
</TABLE>

<BR>

<?php 
define('RELATIVE_DATE_24HOURS', 24 * 60 * 60);
# seconds in a day
$Date = date('Y/m/d');
$Yesterday = freshports_LinkToDate(strtotime($Date) - RELATIVE_DATE_24HOURS, "Yesterday's Commits");
echo '&lt; ' . $Yesterday . ' &gt;';
?>

<?php 
echo freshports_ShowFooter();
?>

</body>
</html>
コード例 #3
0
ファイル: date.php プロジェクト: brycied00d/freshports
<?php 
#echo "That date is " . $Date . '<br>';
#echo 'which is ' . strtotime($Date) . '<br>';
define('RELATIVE_DATE_24HOURS', 24 * 60 * 60);
# seconds in a day
$Today = '<a href="/commits.php">Latest commits</a>';
$Yesterday = freshports_LinkToDate(strtotime($Date) - RELATIVE_DATE_24HOURS);
$Tomorrow = freshports_LinkToDate(strtotime($Date) + RELATIVE_DATE_24HOURS);
if (strtotime($Date) + RELATIVE_DATE_24HOURS == strtotime(date('Y/m/d'))) {
    $Yesterday = freshports_LinkToDate(strtotime($Date) - RELATIVE_DATE_24HOURS);
    $DateLinks = '&lt; ' . $Today . ' | ' . $Yesterday . ' &gt;';
} else {
    $Today = '<a href="/commits.php">Latest commits</a>';
    $Yesterday = freshports_LinkToDate(strtotime($Date) - RELATIVE_DATE_24HOURS);
    $Tomorrow = freshports_LinkToDate(strtotime($Date) + RELATIVE_DATE_24HOURS);
    $DateLinks = '&lt; ' . $Today . ' | ' . $Tomorrow . ' | ' . $Yesterday . ' &gt;';
}
echo $DateLinks;
if ($NumCommits > 0) {
    echo " | Number of commits: " . $NumCommits;
}
?>

<?php 
echo freshports_MainTable();
?>

<TR><TD VALIGN="top" WIDTH="100%">
<?php 
echo freshports_MainContentTable();