Skip to content
Snippets Groups Projects
Commit 248fa786 authored by Chris Jones's avatar Chris Jones
Browse files

a much neater fix from arthur

parent 9b873788
No related branches found
No related tags found
No related merge requests found
......@@ -11,8 +11,8 @@
$o.="\t<tr><td align=\"center\">$user</td><td align=\"center\">${size}B</td></tr>\n";
}
exec("df -m /home",$dfraw);
$dfout=explode(" ",$dfraw[1]);
$o.="\t<tr><td align=\"center\" colspan=\"2\">".floor($dfout[9]/1024)."GB used of ".floor($dfout[8]/1024). "GB (".floor($dfout[13]/1024)."GB available)</td></tr>\n";
$dfout = preg_split('/[ ]+/', $dfraw[1]);
$o.="\t<tr><td align=\"center\" colspan=\"2\">".floor($dfout[2]/1024)."GB used of ".floor($dfout[1]/1024). "GB (".floor($dfout[3]/1024)."GB available)</td></tr>\n";
$o.="</table>\n";
$o.=$Shame[count($Shame) - 1];
$o.="<br />\n";
......@@ -37,7 +37,7 @@
list($u,$d)=parseLine($Shame[$i+1]);
$others+=$d;
}
$out.="data.setValue(0, 0, 'Free Space');\ndata.setValue(0,1,".$dfout[13]." );\n";
$out.="data.setValue(0, 0, 'Free Space');\ndata.setValue(0,1,".$dfout[3]." );\n";
$out.="\t\tvar chart = new google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, {width: 500, height: 360, backgroundColor: 'none', is3D: true, title: 'Disk Usage',sliceVisibilityThreshold: 1/180});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment