Add in index.php on tbdev.net(netmaniack's edition)1.6
Code:
<h2>Server load</h2><table width=100% border=1 cellspacing=0 cellpadding=10><tr><td align="center"><table class="main" border="0" width="402" height="15"><tbody><tr><td style="padding: 0px; background-image: url(./pic/loadbarbg.gif); background-repeat: repeat-x;"><?$perc = get_server_load();$percent = min(100, $perc);if ($percent <= 70) $pic = "loadbargreen.gif";elseif ($percent <= 90) $pic = "loadbaryellow.gif";else $pic = "loadbarred.gif";$width = $percent * 4;print("<img height=15 width=$width src=./pic/$pic alt='$percent%'></td></tr>"); ?></tbody></table></td></td></tr></table></td></tr></table>
Add in global.php on tbdev.net(netmaniack's edition)1.6
Code:
function get_server_load($windows = 0) {if(class_exists("COM")) { $wmi = new COM("WinMgmts:\\\\."); $cpus = $wmi->InstancesOf("Win32_Processor"); $i = 1; // Use the while loop on PHP 4 and foreach on PHP 5 //while ($cpu = $cpus->Next()) { foreach($cpus as $cpu) { $cpu_stats += $cpu->LoadPercentage; $i++; } return round($cpu_stats/2); // remove /2 for single processor systems}}