Mercurial > dirlist-php
comparison index.php @ 57:aa12b7cbe1e8
Use short echo syntax
author | nanaya <me@myconan.net> |
---|---|
date | Tue, 04 Apr 2017 22:22:06 +0900 |
parents | d0b3c58c2781 |
children | 281a129299cf |
comparison
equal
deleted
inserted
replaced
56:d0b3c58c2781 | 57:aa12b7cbe1e8 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 define('DL_VERSION', '2.2.2'); | 3 define('DL_VERSION', '2.2.3'); |
4 // Required for strftime(). Set to UTC because :internet:. | 4 // Required for strftime(). Set to UTC because :internet:. |
5 date_default_timezone_set('UTC'); | 5 date_default_timezone_set('UTC'); |
6 | 6 |
7 // $uri: web-facing path | 7 // $uri: web-facing path |
8 $uri = $_SERVER["REQUEST_URI"]; | 8 $uri = $_SERVER["REQUEST_URI"]; |
154 header('Content-Type: text/html; charset=utf-8'); | 154 header('Content-Type: text/html; charset=utf-8'); |
155 ?> | 155 ?> |
156 <!doctype html> | 156 <!doctype html> |
157 <head> | 157 <head> |
158 <meta charset="utf-8"> | 158 <meta charset="utf-8"> |
159 <title>Index of <?php echo h($uri); ?></title> | 159 <title>Index of <?= h($uri); ?></title> |
160 <meta name="viewport" content="width=device-width, initial-scale=1.0"> | 160 <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
161 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/0.9.9/magnific-popup.css"> | 161 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/0.9.9/magnific-popup.css"> |
162 | 162 |
163 <style type="text/css"> | 163 <style type="text/css"> |
164 .mfp-content figure { margin: 0; } | 164 .mfp-content figure { margin: 0; } |
236 input { font-size: 18px; } | 236 input { font-size: 18px; } |
237 } | 237 } |
238 </style> | 238 </style> |
239 </head> | 239 </head> |
240 <body id="files"> | 240 <body id="files"> |
241 <h1>Index of <?php echo tree_link($uri); ?></h1> | 241 <h1>Index of <?= tree_link($uri); ?></h1> |
242 | 242 |
243 <input placeholder="search (non-recursive)" class="search" /> | 243 <input placeholder="search (non-recursive)" class="search" /> |
244 | 244 |
245 <table> | 245 <table> |
246 <thead> | 246 <thead> |
247 <tr> | 247 <tr> |
248 <th><span class="sort" data-sort="filename">File</span></th> | 248 <th><span class="sort" data-sort="filename">File</span></th> |
249 <th><span class="sort" data-sort="size">Size</span></th> | 249 <th><span class="sort" data-sort="size">Size</span></th> |
250 <th><span class="sort" data-sort="date">Date</span></th> | 250 <th><span class="sort" data-sort="date">Date</span></th> |
251 </tr> | 251 </tr> |
252 <?php echo up_link($uri); ?> | 252 <?= up_link($uri); ?> |
253 </thead> | 253 </thead> |
254 <tbody class="list"> | 254 <tbody class="list"> |
255 <?php echo file_rows($dir, $dirs, true); ?> | 255 <?= file_rows($dir, $dirs, true); ?> |
256 <?php echo file_rows($dir, $files, false); ?> | 256 <?= file_rows($dir, $files, false); ?> |
257 </tbody> | 257 </tbody> |
258 </table> | 258 </table> |
259 | 259 |
260 <footer> | 260 <footer> |
261 <hr> | 261 <hr> |
262 <em> | 262 <em> |
263 Running <a href="https://bitbucket.org/edogawaconan/dirlist-php">dirlist-php <?php echo DL_VERSION ?></a>. | 263 Running <a href="https://bitbucket.org/edogawaconan/dirlist-php">dirlist-php <?= DL_VERSION ?></a>. |
264 Powered by PHP <?php echo phpversion(); ?>. | 264 Powered by PHP <?= phpversion(); ?>. |
265 </em> | 265 </em> |
266 </footer> | 266 </footer> |
267 | 267 |
268 <script src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.1.6/zepto.min.js"></script> | 268 <script src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.1.6/zepto.min.js"></script> |
269 <script src="//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.0.0/jquery.magnific-popup.min.js"></script> | 269 <script src="//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.0.0/jquery.magnific-popup.min.js"></script> |
287 $("tbody td:nth-child(3n + 2)").addClass("size") | 287 $("tbody td:nth-child(3n + 2)").addClass("size") |
288 $("tbody td:nth-child(3n + 3)").addClass("date") | 288 $("tbody td:nth-child(3n + 3)").addClass("date") |
289 | 289 |
290 new List("files", { | 290 new List("files", { |
291 valueNames: ["filename", "size", "date"], | 291 valueNames: ["filename", "size", "date"], |
292 page: <?php echo count($dirs) + count($files); ?> | 292 page: <?= count($dirs) + count($files); ?> |
293 }) | 293 }) |
294 </script> | 294 </script> |
295 </body> | 295 </body> |