89 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			89 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<!--Force IE6 into quirks mode with this comment tag-->
 | 
						|
<!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" lang="en" xml:lang="en">
 | 
						|
<head>
 | 
						|
<!--This script should appear below your LINK stylesheet tags -->
 | 
						|
 | 
						|
<script src="styleswitch.js" type="text/javascript">
 | 
						|
 | 
						|
/***********************************************
 | 
						|
* Style Sheet Switcher v1.1- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
 | 
						|
* This notice MUST stay intact for legal use
 | 
						|
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
 | 
						|
***********************************************/
 | 
						|
 | 
						|
</script>
 | 
						|
<script type="text/javascript">
 | 
						|
window.onload=function(){
 | 
						|
var formref=document.getElementById("switchform")
 | 
						|
indicateSelected(formref.switchcontrol)
 | 
						|
}
 | 
						|
</script>
 | 
						|
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js" type="text/javascript"></script>
 | 
						|
    <style>
 | 
						|
        .hiddenRow { display: none; }
 | 
						|
    </style>
 | 
						|
    <script>
 | 
						|
        function toggleNextRow(row) {
 | 
						|
            var nextRow = $(row).next();
 | 
						|
            nextRow.toggle();
 | 
						|
        }
 | 
						|
    </script>
 | 
						|
</head>
 | 
						|
 | 
						|
<body>
 | 
						|
<?php include '../config.php';?>
 | 
						|
<?php
 | 
						|
 | 
						|
/**
 | 
						|
 * Disk Status Class - Example
 | 
						|
 *
 | 
						|
 * http://pmav.eu/stuff/php-disk-status/
 | 
						|
 *
 | 
						|
 * 22/Aug/2009
 | 
						|
 */
 | 
						|
 | 
						|
require_once 'DiskStatus.class.php';
 | 
						|
 | 
						|
    try {
 | 
						|
  $diskStatusC = new DiskStatus("$drive3");
 | 
						|
 | 
						|
  $freeSpaceC = $diskStatusC->freeSpace();
 | 
						|
  $totalSpaceC = $diskStatusC->totalSpace();
 | 
						|
  $barWidthC = ($diskStatusC->usedSpace()/100) * 150;
 | 
						|
 | 
						|
} catch (Exception $e) {
 | 
						|
  echo 'Error ('.$e->getMessage().')';
 | 
						|
  exit();
 | 
						|
} 
 | 
						|
 | 
						|
 | 
						|
 catch (Exception $e) {
 | 
						|
  echo 'Error ('.$e->getMessage().')';
 | 
						|
  exit();
 | 
						|
}
 | 
						|
 | 
						|
?>
 | 
						|
<body>
 | 
						|
<div id="drivebox2" style="font:10pt Arial; color:#0066FF;">
 | 
						|
<table width='190' border='0' cellspacing='0' cellpadding='0'>
 | 
						|
  <tr onclick="toggleNextRow(this)" BGCOLOR='#FFFFFF'>
 | 
						|
    <th style='text-align: left;'><font color='#0066FF'><?php echo $drive3;?>\<?= $freeSpaceC ?> (of <?= $totalSpaceC ?>)</font></th>
 | 
						|
  </tr>
 | 
						|
   </tr>
 | 
						|
  <tr class="hiddenRow">
 | 
						|
            <td bgcolor='#FFFFFF'>
 | 
						|
                <div class="disk">
 | 
						|
                    <div class="used" style="width: <?= $barWidthC ?>px"><?= $diskStatusC->usedSpace() ?>% </div>
 | 
						|
                </div>
 | 
						|
            </td>
 | 
						|
        </tr>
 | 
						|
</form>
 | 
						|
</td>
 | 
						|
</table>
 | 
						|
</div>
 | 
						|
 | 
						|
</body>
 | 
						|
 | 
						|
</html>
 |