<?php
$dir_pm = './Downloads';
$exclude_list = array(".", "..", "example.txt", "thumbs.db", ".listing");
$files = array_diff(scandir($dir_pm), $exclude_list);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Pneuma's Downloads</title>
<link rel="shortcut icon" href='http://pneuma.vhosted.us/favicon.ico'/>
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/sticky-footer-navbar.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Fixed navbar -->
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="./">Pneuma's Downloads</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="./">Home</a></li>
<li><a href="http://rathena.org/board/user/24349-pneuma/" target="_blank">Pneuma's Profile</a></li>
<li><a href="http://rathena.org/board" target="_blank">rAthena</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container">
<div class="page-header"><h1>Downloads</h1></div>
<?php foreach($files as $file): ?>
<?php if(is_dir($dir_pm.'/'.$file)): ?>
<div class="row">
<span>
<h3><?php echo $file ?></h3>
</span>
<table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td><strong>Filename</strong></td>
<td class="col-md-3"><strong>File Size</strong></td>
</tr>
<?php $idatafiles = array_diff(scandir($dir_pm.'/'.$file), $exclude_list); ?>
<?php foreach($idatafiles as $idatafile): ?>
<?php $filesize = filesize($dir_pm.'/'.$file.'/'.$idatafile); $filesizekb = $filesize / 1024 / 1024; $filesizekb = number_format($filesizekb,0); ?>
<tr>
<td><strong><a href="<?php echo $dir_pm.'/'.$file.'/'.$idatafile ?>"><?php echo $idatafile ?></a></strong></td>
<td><?php echo $filesizekb ?>MB</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
<?php endif ?>
<?php endforeach ?>
</div>
<div id="footer">
<div class="container">
<p class="text-muted">Pneuma's Downloads</p>
</div>
</div>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
</body>
</html>