Переглянути джерело

Clientside Bar Charts - http://opengamepanel.org/forum/viewthread.php?thread_id=5326

own3mall 9 роки тому
батько
коміт
b91acd1229

+ 1 - 0
modules/status/include/status_functions.php

@@ -1,5 +1,6 @@
 <?php
 <?php
 	function drawBarDiv($percent, $type){
 	function drawBarDiv($percent, $type){
+		$percent = round($percent, 2); // Round it to two decimal places
 		echo '<div class="progress"><div class="progress-bar inline-block" data="' . $percent . '" type="' . $type . '" title="' . strtoupper($type) . ' Percentage Use: ' . $percent . '%"></div></div>';
 		echo '<div class="progress"><div class="progress-bar inline-block" data="' . $percent . '" type="' . $type . '" title="' . strtoupper($type) . ' Percentage Use: ' . $percent . '%"></div></div>';
 	}
 	}
 ?>
 ?>

+ 1 - 2
modules/status/status.php

@@ -113,8 +113,7 @@ function exec_ogp_module()
 				    
 				    
 				    drawBarDiv($hddbarusage, "HDD");
 				    drawBarDiv($hddbarusage, "HDD");
 				    
 				    
-				    echo "<br>
-				    ".get_lang('storage_free').": " . $hddfreespace . "</b>
+				    echo get_lang('storage_free').": " . $hddfreespace . "</b>
 				    </div>
 				    </div>
 				   </div>
 				   </div>
 				  </div>";
 				  </div>";