Changeset 1084 for trunk/htdocs/cacher/index.php
- Timestamp:
- 2012-07-30T07:28:15+02:00 (11 months ago)
- File:
-
- 1 edited
-
trunk/htdocs/cacher/index.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/htdocs/cacher/index.php
r1081 r1084 85 85 $g = $b = 220 - (int) ($percent * 220); 86 86 $percent = (int) ($percent * 100); 87 $a = $active ? ' active' : '';88 $height = 20 ;87 $a = $active ? ' class="active"' : ''; 88 $height = 20 - 1 * 2; 89 89 $valueHeight = ceil($height * $percent / 100); 90 90 $paddingHeight = $height - $valueHeight; 91 91 $valueHeight = $valueHeight ? $valueHeight . "px" : 0; 92 92 $paddingHeight = $paddingHeight ? $paddingHeight . "px" : 0; 93 return '< div title="' . $v . '">'94 . '<div class="barf' . $a . '" style="height: ' . $paddingHeight . '"></div>'95 . '<div class="barv' . $a . '" style="background: rgb(' . "$r,$g,$b" . '); height: ' . $valueHeight . '"></div>'96 . '</ div>';93 return '<a title="' . $v . '" href="javascript:;"' . $a . '>' 94 . ($paddingHeight ? '<div style="height: ' . $paddingHeight . '"></div>' : '') 95 . ($valueHeight ? '<div style="background: rgb(' . "$r,$g,$b" . '); height: ' . $valueHeight . '"></div>' : '') 96 . '</a>'; 97 97 } 98 98 // }}} … … 110 110 } 111 111 $t = (time() / (60 * 60)) % 24; 112 112 113 $html = array(); 114 static $cssOut = false; 115 if (!$cssOut) { 116 $cssOut = true; 117 $html[] = '<style type="text/css">'; 118 $html[] = '.hitsgraph a { width: 2px; height: 20px; border-top-width: 1px; border-bottom-width: 1px; }'; 119 $html[] = '</style>'; 120 } 121 122 $width = count($ci[$key]) * 2; 123 $html[] = '<div class="hitsgraph" style="width: ' . $width . 'px">'; 113 124 foreach ($ci[$key] as $i => $v) { 114 125 $html[] = bar_hits_percent($v, $v / $max, $i == $t); 115 126 } 127 $html[] = "</div>"; 116 128 return implode('', $html); 117 129 }
Note: See TracChangeset
for help on using the changeset viewer.

