$end) {
$endtmp=$end;
$end=$begin;
$begin=$endtmp;
}
if (!$group_id) {
exit_no_group();
}
$group=group_get_object($group_id);
if (!$group || !is_object($group)) {
exit_permission_denied();
}
site_project_header(array('title'=>_('Activity'),'group'=>$group_id,'toptab'=>'activity'));
$ids=array();
$ids[]='commit';
$ids[]='trackeropen';
$ids[]='trackerclose';
$ids[]='frsrelease';
$ids[]='forumpost';
$texts=array();
$texts[]=_('Commits');
$texts[]=_('Tracker Opened');
$texts[]=_('Tracker Closed');
$texts[]=_('FRS Release');
$texts[]=_('Forum Post');
if (count($show) < 1) {
$show=$ids;
}
foreach ($show as $showthis) {
if (array_search($showthis,$ids) === false) {
exit_error('Error','Invalid Data Passed to query');
}
}
$multiselect=html_build_multiple_select_box_from_arrays($ids,$texts,'show[]',$show,5,false);
$sql="SELECT * FROM activity_vw WHERE activity_date BETWEEN '".$begin."' AND '".$end."'
AND group_id='$group_id' AND section IN ('".implode("','",$show)."') ORDER BY activity_date DESC";
//echo $sql;
$res=db_query($sql);
echo db_error();
$rows=db_numrows($res);
if ($rows<1) {
echo _('No Activity Found');
} else {
?>
listTableTop($theader);
$j=0;
while ($arr =& db_fetch_array($res)) {
if ($last_day != date('Y-M-d',$arr['activity_date'])) {
// echo $HTML->listTableBottom($theader);
echo ''.date(_('Y-m-d'),$arr['activity_date']).' |
';
// echo $HTML->listTableTop($theader);
$last_day=date('Y-M-d',$arr['activity_date']);
}
switch ($arr['section']) {
case 'commit': {
$icon=html_image("ic/cvs16b.png","20","20",array("border"=>"0","ALT"=>"SCM"));
$url='Commit for Tracker Item [#'.$arr['subref_id'].'] '.$arr['description'].' ';
break;
}
case 'trackeropen': {
$icon=html_image("ic/tracker20g.png",'20','20',array('alt'=>'Tracker'));
$url='Tracker Item [#'.$arr['subref_id'].' '.$arr['description'].' ] Opened';
break;
}
case 'trackerclose': {
$icon=html_image("ic/tracker20g.png",'20','20',array('alt'=>'Tracker'));
$url='Tracker Item [#'.$arr['subref_id'].' '.$arr['description'].' ] Closed';
break;
}
case 'frsrelease': {
$icon=html_image("ic/cvs16b.png","20","20",array("border"=>"0","ALT"=>"SCM"));
$url='FRS Release '.$arr['description'].'';
break;
}
case 'forumpost': {
$icon=html_image("ic/forum20g.png","20","20",array("border"=>"0","ALT"=>"Forum"));
$url='Forum Post '.$arr['description'].'';
break;
}
}
echo 'boxGetAltRowStyle($j++) . '>
'.date('H:i:s',$arr['activity_date']).' |
'.$icon .' '.$url.' |
'.$arr['realname'].' |
';
}
echo $HTML->listTableBottom($theader);
}
site_project_footer(array());
?>