%s |
%s |
%s |
%s |
%s/%s |
|
T;
if ($total > 0) {
echo getcwd();
foreach ($pkgs as $key => $p) {
if (trim($p['package']) == '') {
continue;
}
$s .= sprintf($tmpl,
$p['type'],
timediff(key2timestamp($key)) . ' ago',
$p['user'], $p['user'],
$p['revision'],
addslashes($p['summary']),
$p['package'],
$p['version'],
$p['media'], $p['section']
);
$typelink = '';
if ($p['type'] == 'failure') {
$typelink = '/uploads/' . $p['type'] . '/' . $p['path'];
} elseif ($p['type'] == 'rejected') {
$typelink = '/uploads/' . $p['type'] . '/' . $p['path'] . '.youri';
} else {
$typelink = '/uploads/done/' . $p['path'];
echo ".$typelink", ' = ', print_r(is_dir(".$typelink"), true), '
';
if (!is_dir(".$typelink")) {
$typelink = '';
}
}
$typestr = $p['type'];
if ($p['status']['build']) {
$typealt = 'Building on';
foreach ($p['status']['build'] as $h) {
$typealt .= " $h";
}
$typestr = "$typestr";
}
$s .= '';
$s .= ($typelink != '') ?
sprintf('%s', $typelink, $typestr) :
$typestr;
$s .= ' | ';
if ($p['type'] == 'uploaded') {
$tdiff = timediff($p['buildtime']['start'], $p['buildtime']['end']); // use $p['buildtime']['diff']; instead?
$s .= $tdiff;
$tdiff = floor(($p['buildtime']['end'] - $p['buildtime']['start']) / 60)*60;
@$buildtime_stats[timediff(0, $tdiff)] += 1;
}
$s .= ' | ';
$s .= '';
}
echo sprintf('%d packages submitted in the past %d hours:
', $total, $max_modified * 24);
// Last submitted packages
echo '',
'Submitted | User |
Package | Target | Media |
Status | Build time |
',
'', $s, '',
'
';
// Stats
$s = '
';
$s .= sprintf(
'
Total time | %s hours |
Average | %s minutes |
Builds count | %s |
',
round($buildtime_total / 60, 2),
$buildtime_avg,
$build_count
);
$s .= '
';
echo $s, '