viewing paste Unknown #13905 | HTML5

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
                                                                <?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>
                            
                            
Viewed 1185 times, submitted by Pneuma.