update pharext
[m6w6/replicator] / public / index.php
index fbb285b4fa293a57b6d0b522b9e3ec1c913b7207..639f1e2238881cd05222a21964538ad4c87051d3 100644 (file)
@@ -78,7 +78,6 @@
                                        <tr>
                                                <th class="text-left" colspan="4">Package</th>
                                                <th class="text-left">Date</th>
-                                               <th class="text-right">Size</th>
                                                <th class="text-right">Pharext</th>
                                        </tr>
                                </thead>
                                                <?php foreach ($phars as $ext => list($phar, $meta)) : ?>
                                                <td class="text-left">
                                                        <a href="<?= htmlspecialchars($phar) ?>"
-                                                          >ext.phar<?= htmlspecialchars($ext) ?></a>
+                                                          >ext.phar<?= htmlspecialchars($ext) ?></a><br>
+                                                       <small><?php
+
+                                                       $u = ["Bytes", "KB", "MB"];
+                                                       $s = filesize($phar);
+                                                       $l = floor(log10($s));
+                                                       printf("&#10507; %1.1F %s", $s/pow(10,$l-($l%3)), $u[$l/3]);
+
+                                                       ?></small>
                                                </td>
                                                <?php endforeach; ?>
                                                <?php for($i = 0; $i < 3-count($phars); ++$i) : ?>
 
                                                        $time = time();
                                                        $dsec = 86400;
-                                                       $lmod = filemtime($phar);
+                                                       $lmod = isset($meta["date"]) ? strtotime($meta["date"]) : filemtime($phar);
                                                        $days = [1 => "today", "yesterday"];
                                                        do {
                                                                for ($i = 1; $i < 7; ++$i) {
                                                        ?>
 
                                                </td>
-                                               <td class="text-right">
-                                                       <?php
-
-                                                       $u = ["Bytes", "KB", "MB"];
-                                                       $s = filesize($phar);
-                                                       $l = floor(log10($s));
-                                                       printf("%1.1F %s\n", $s/pow(10,$l-($l%3)), $u[$l/3]);
-
-                                                       ?>
-                                               </td>
                                                <td class="text-right">
                                                        <?php
                                                        if ($meta) {