--- ct-crm1.6/index.php.fix 2003-12-19 13:05:32.647847464 +0100 +++ ct-crm1.6/index.php 2003-12-19 13:07:02.443196496 +0100 @@ -338,22 +338,22 @@ print "$arr[OF_STAT]"; $pc1 = ($maxE/100); // dit is 1 procent $pc2 = ($maxEoNc/100); // dit is 1 procent van Not Closed Not Deleted - $apc = round($maxEo/$pc1); // dit is het percentage + if ($pc1) $apc = round($maxEo/$pc1); else $apc=0; // dit is het percentage print "     $arr[OPENED]$maxEo$apc%"; - $apc = round($maxEa/$pc1); // dit is het percentage + if ($pc1) $apc = round($maxEa/$pc1); else $apc=0; //edit is het percentage print "     $arr[AWAITING]$maxEa$apc%"; - $apc = round($maxEr/$pc1); // dit is het percentage + if ($pc1) $apc = round($maxEr/$pc1); else $apc=0; // dit is het percentage print "     $arr[REJECTED]$maxEr$apc%"; - $apc = round($maxEc/$pc1); // dit is het percentage + if ($pc1) $apc = round($maxEc/$pc1); else $apc=0; // dit is het percentage print "     $arr[CLOSED]$maxEc$apc%"; - $apc = round($delE/$pc1); // dit is het percentage + if ($pc1) $apc = round($delE/$pc1); else $apc=0;// dit is het percentage print "     $arr[DELETED]$delE$apc%"; print " "; - $apc = round($expE/$pc2); // dit is het percentage + if ($pc1) $apc = round($expE/$pc2); else $apc=0; // dit is het percentage if ($apc>30) { $a1 = ""; $a2 = ""; @@ -364,7 +364,7 @@ print "$arr[EXPIRED]$expE$a1$apc%$a2"; - $apc = round($obsE/$pc1); // dit is het percentage + if ($pc1) $apc = round($obsE/$pc1); else $apc=0; // dit is het percentage if ($apc>30) { $a1 = ""; $a2 = ""; @@ -374,7 +374,7 @@ } print "$arr[NON_EXISTING_AND_DEL]$obsE$a1$apc%$a2"; - $apc = round($waiE/$pc1); // dit is het percentage + if ($pc1) $apc = round($waiE/$pc1); else $apc=0; // dit is het percentage if ($apc>30) { $a1 = ""; $a2 = ""; @@ -479,7 +479,8 @@ $result= mysql_query($sql) or die (mysql_error()); $maxW = mysql_fetch_array($result); $maxWc = $maxW[0]; - print "$arr[ON_AVER] $avgc $arr[AN_EN] " . round($avg/$avgc) . " $arr[DDAYS] "; + if ($avgc) $zmienna=round($avg/$avgc); else $zmienna=0; + print "$arr[ON_AVER] $avgc $arr[AN_EN] " . $zmienna . " $arr[DDAYS] "; print "
"; print "$arr[DATA_OBT1] $maxWc $arr[DATA_OBT2]"; @@ -496,4 +497,4 @@ print ""; -?> \ Brak znaku nowej linii na końcu pliku +?>