/home/mip/public_html_/old-website/diskspace.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Disk Usage</title>
</head>
<link rel="stylesheet" type="text/css" href="irisonline/css/jquery-ui.css">
<script type="text/javascript" src="irisonline/jquery.js"></script>
<script type="text/javascript" src="irisonline/js/jquery-ui.js"></script>
<body>
<?php
require_once("config.php");
$remove = array("G","GB","M","MB");
if(strstr(showdiskspace(),"M")) {
	$diskusage = trim(substr(str_replace($remove,"",showdiskspace()),0,-1))/1024;
} else {
	$diskusage = trim(substr(str_replace($remove,"",showdiskspace()),0,-1));
}

function showdiskspace() {
	/*$output = exec('du -sh ');
	return "$output";*/
	$file = file_get_contents("diskspacewriteiris.php");
	return $file;
}  
if($diskusage>$diskspace) {
	$perc = '100';
} else {
	$perc = $diskusage/$diskspace*100;
}
?>
<script>
$(function() {
$( "#progressbar" ).progressbar({
	value: <?php echo $perc; ?>
});
});
</script>
<style>
#progressbar { width:340px; }
</style>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
	<td width="45%" valign="top" style="font-family:Verdana; font-size:12px"><p>&nbsp;</p>
	<p>Disk Space Available:<b><u>&nbsp;&nbsp;&nbsp;&nbsp;<?=$diskspace?>&nbsp;&nbsp;&nbsp;&nbsp;</u></b>GB
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Used:<b><u>&nbsp;&nbsp;&nbsp;&nbsp;<?=$diskusage?>&nbsp;&nbsp;&nbsp;&nbsp;</u></b> GB</p>
	
	<p><div id="progressbar"></div></p>
	
	<p>Need more disk space? contact <a href="mailto:support@quantumx.com"><font size="2" face="verdana" color="black">Quantum X, Inc.</font></a></p>
	</td>
	<td><img src="<?=$urliris?>report_diskusagegraph.php?diskspace=<?=$diskspace?>&diskusage=<?=$diskusage?>" /></td>		
</tr>
</table>
</body>
</html>