Changeset 1068 for trunk/htdocs/cacher/cacher.php
- Timestamp:
- 07/28/2012 08:08:38 AM (10 months ago)
- Files:
-
- 1 modified
-
trunk/htdocs/cacher/cacher.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/htdocs/cacher/cacher.php
r1066 r1068 34 34 if ($config['percent_graph_type'] != 'free') { 35 35 $v = 1 - $v; 36 } 37 if ($k % 30 == 0) { 38 $v = 1; 36 39 } 37 40 $v = (int) ($v * $c); … … 86 89 $percent = (int) ($percent * 100); 87 90 $a = $active ? ' active' : ''; 91 $height = 20; 92 $valueHeight = ceil($height * $percent / 100); 93 $paddingHeight = $height - $valueHeight; 94 $valueHeight = $valueHeight ? $valueHeight . "px" : 0; 95 $paddingHeight = $paddingHeight ? $paddingHeight . "px" : 0; 88 96 return '<div title="' . $v . '">' 89 . '<div class="barf' . $a . '" style="height: ' . (100 - $percent) . '%"></div>'90 . '<div class="barv' . $a . '" style="background: rgb(' . "$r,$g,$b" . '); height: ' . $ percent . '%"></div>'97 . '<div class="barf' . $a . '" style="height: ' . $paddingHeight . '"></div>' 98 . '<div class="barv' . $a . '" style="background: rgb(' . "$r,$g,$b" . '); height: ' . $valueHeight . '"></div>' 91 99 . '</div>'; 92 100 }

