Ejemplo n.º 1
0
     }
 }
 $showSelCol = false;
 //show selected columns
 $showUserCol = !has_value($group_by, 'user_id');
 $showTitleCol = !has_value($group_by, 'id');
 if (!$showUserCol) {
     $totCols--;
 }
 if (!$showTitleCol) {
     $totCols--;
 }
 if (!$showBillingCol) {
     $totCols--;
 }
 if (count_extra_cols($columns) > 0) {
     $showSelCol = true;
 }
 $previousTSRow = null;
 $isAlt = true;
 foreach ($timeslotsArray as $ts) {
     $showHeaderRow = false;
     //to skip showing workspaces in case there are conditions
     if (isset($has_conditions) && $has_conditions) {
         continue;
     }
     //Footers
     for ($i = $sectionDepth - 1; $i >= 0; $i--) {
         $has_difference = false;
         for ($j = 0; $j <= $i; $j++) {
             $has_difference = $has_difference || has_difference($previousTSRow, $ts, $group_by[$j]);
Ejemplo n.º 2
0
	$hasGroupBy = is_array($group_by) && count($group_by) > 0;
	$sectionDepth = $hasGroupBy ? count($group_by) : 0;
	$c = 0;
	for ($i = 0; $i < $sectionDepth; $i++) {
		if ($group_by[$i] == 'project_id'){
			$group_by[$i] = 'project_id_' . $c;
			$c++;
		}
	}
	$showSelCol = false; //show selected columns
	$showUserCol = !in_array('user_id', $group_by);
	$showTitleCol = !in_array('id', $group_by);
	if (!$showUserCol) $totCols--;
	if (!$showTitleCol) $totCols--;
	if (!$showBillingCol) $totCols--;
	if (count_extra_cols($columns)>0) $showSelCol = true;
	
	$previousTSRow = null;
        $isAlt = true;
	foreach ($timeslotsArray as $ts)	{
		$showHeaderRow = false;
		//to skip showing workspaces in case there are conditions
		if (isset($has_conditions) && $has_conditions) continue;
		//Footers
		for ($i = $sectionDepth - 1; $i >= 0; $i--){
			$has_difference = false;
			for ($j = 0; $j <= $i; $j++) {
				$has_difference = $has_difference || has_difference($previousTSRow,$ts, $group_by[$j]);
			}
			
			if ($has_difference){