forked from rewardjs/leaderboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
32 lines (24 loc) · 762 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
# TODO: get config info on how to retrieve the latest commits
# (for now, we'll hard-code this, but long-term, that won't
# work if other projects beyond jQuery UI get involved)
$trackerType = 'trac';
$trackerDomain = 'bugs.jqueryui.com';
# load module to fetch the commit info
if ($trackerType == 'trac') {
include('trac.php');
}
# get requested report (defaults to today)
$report = $_GET['report'];
if ($report == 'week') {
$commits = getCommitsForThisWeek($trackerDomain);
} else {
$report = 'today';
$commits = getCommitsForToday($trackerDomain);
}
# return the proper output
header('Content-type: text/html');
# TODO: use a templating language (e.g. h2o) instead of
# hard-coding it in the php.
include('index.tmpl');
?>