function disk() { $tpl = new templates(); $sys = new systeminfos(); $hash = $sys->DiskUsages(); $page = CurrentPageName(); if (!is_array($hash)) { return null; } $img = "<img src='img/fw_bold.gif'>"; $html = "\n\t<table style='width:100%'>\n<tr>\n\t<td align='right' colspan=2>" . imgtootltip('icon_refresh-20.gif', '{refresh}', "LoadAjax('disk','{$page}?disk=yes');") . "</td>\n</tr>\t\n\t\t<tr>\n\t\t<td width=1% valign='top'><img src='img/disk-64.png'></td>\n\t\t<td valign='top'>\n\t\t\t<H5>{disks_usage}</h5>\n\t\t\t<table style='width:100%' align=center>\n\t\t\t\t<tr style='background-color:#CCCCCC'>\n\t\t\t\t\t<td> </td>\n\t\t\t\t\t<td><strong>{Filesystem}</strong></td>\n\t\t\t\t\t<td><strong>{size}</strong></td>\n\t\t\t\t\t<td><strong>{used}</strong></td>\n\t\t\t\t\t<td><strong>{available}</strong></td>\n\t\t\t\t\t<td align='center'><strong>{pourcent}</strong></td>\n\t\t\t\t\t<td><strong>{mounted_on}</strong></td>\n\t\t\t\t</tr>\n\t"; while (list($num, $ligne) = each($hash)) { $html = $html . "<tr " . CellRollOver() . ">\n\t \t<td width=1% class=bottom>{$img}</td>\n\t \t<td class=bottom>{$ligne[0]}</td>\n\t \t<td class=bottom>{$ligne[2]}</td>\n\t \t<td class=bottom>{$ligne[3]}</td>\n\t \t<td class=bottom>{$ligne[4]}</td>\n\t \t<td align='center' class=bottom><strong>{$ligne[5]}</strong></td>\n\t \t<td class=bottom>{$ligne[6]}</td>\n\t \t</tr>\n\t \t"; } $html = $html . "</table>"; return RoundedLightWhite($tpl->_ENGINE_parse_body($html) . "</td></tr></table></td></tr></table>"); }
function disk(){ $tpl=new templates(); $sys=new systeminfos(); $hash=$sys->DiskUsages(); if(!is_array($hash)){return null;} $img="<img src='img/fw_bold.gif'>"; $html="<H4>{disks_usage}:</h4> <table style='width:600px' align=center> <tr style='background-color:#CCCCCC'> <td> </td> <td class=legend>{Filesystem}:</strong></td> <td class=legend>{size}:</strong></td> <td class=legend>{used}:</strong></td> <td class=legend>{available}:</strong></td> <td align='center'><strong>{use%}:</strong></td> <td class=legend>{mounted_on}:</strong></td> </tr> "; while (list ($num, $ligne) = each ($hash) ){ $html=$html . "<tr " . CellRollOver()."> <td width=1% class=bottom>$img</td> <td class=bottom>{$ligne[0]}:</td> <td class=bottom>{$ligne[2]}:</td> <td class=bottom>{$ligne[3]}:</td> <td class=bottom>{$ligne[4]}:</td> <td align='center' class=bottom><strong>{$ligne[5]}:</strong></td> <td class=bottom>{$ligne[6]}:</td> </tr> "; } return $html . "</table>"; }