[SPIP][PLUGINS] v3.0-->v3.2
[lhc/web/www.git] / www / plugins-dist / medias / prive / vignettes / index.php
index 42124e0..5b38013 100644 (file)
@@ -5,21 +5,26 @@
        <link rel="up" href="../">
 </head>
 <body style="background: #fff; text-align: center;">
-       <h1>Index des vignettes de SPIP</h1>
-       <table>
-               <tr><th colspan='10'>Format png &amp; gif</th>
+<h1>Index des vignettes de SPIP</h1>
+<table>
+       <tr>
+               <th colspan='10'>Format png &amp; gif</th>
                <?php
-                       $myDir = opendir('.');
-                       $i= 0;
-                       while($file = readdir($myDir)) {
-                         if (preg_match(",\.(png|gif)$,i", $file)) {
+               $myDir = opendir('.');
+               $i = 0;
+               while ($file = readdir($myDir)) {
+                       if (preg_match(',\.(png|gif)$,i', $file)) {
                                $r = "\n\t<td style='text-align:center; padding:10px'>$file<br /><img src='$file' alt='$file' /></td>";
-                               if ($i%10) echo $r; else echo "</tr>\n<tr>", $r;
+                               if ($i % 10) {
+                                       echo $r;
+                               } else {
+                                       echo "</tr>\n<tr>", $r;
+                               }
                                $i++;
-                         }
                        }
+               }
                ?>
-               </tr>
-       </table>
+       </tr>
+</table>
 </body>
 </html>
\ No newline at end of file