5 <title
>Replicator
</title
>
6 <link rel
="stylesheet" href
="concise/css/concise.min.css">
7 <link href
="//fonts.googleapis.com/css?family=Droid+Sans" rel
="stylesheet" type
="text/css">
8 <meta name
="viewport" content
="width=device-width, initial-scale=1">
25 box
-shadow
: 0px
0px
1em
.4em
#89a;
32 .header h1 a
, .footer a
:hover
{
33 text
-decoration
: none
;
36 text
-decoration
: underline
;
39 /* normalize browser difference */
42 .header h1 big
, .footer
, .footer a
{
44 text
-shadow
: grey
0 0 .1em
;
48 text
-shadow
: white
0 0 .2em
;
51 list-style
-type
: circle
;
58 <h1
class="container">
59 <a href
="?"><big
>Replicator
</big
></a
><br
>
60 <small
>Replicating PECL releases
as pharext packages since
2015</small
>
62 <a href
="https://github.com/m6w6/replicator"><img style
="position: absolute; top: 0; right: 0; border: 0;" src
="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt
="Fork me on GitHub" data
-canonical
-src
="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></a
>
65 <div
class="container">
68 $packages = array_map("basename", glob("phars/*", GLOB_NOSORT|GLOB_ONLYDIR
));
69 sort($packages, SORT_NATURAL|SORT_FLAG_CASE
);
73 <?php
if ($_SERVER["QUERY_STRING"] && in_array($_SERVER["QUERY_STRING"], $packages, true)) : ?
>
75 <h2
><?
= $package = $_SERVER["QUERY_STRING"]; ?
></h2
>
76 <table
class="table table-full">
79 <th
class="text-left">Package
</th
>
80 <th
class="text-left">Date
</th
>
81 <th
class="text-right">Size
</th
>
85 <?php
foreach (array_reverse(glob("phars/$package/*.ext.phar*")) as $phar) : ?
>
88 <td
class="text-left">
89 <a href
="<?= htmlspecialchars($phar) ?>"
90 ><?
= htmlspecialchars(basename($phar)) ?
></a
>
92 <td
class="text-left">
97 $lmod = filemtime($phar);
98 $days = [1 => "today", "yesterday"];
100 for ($i = 1; $i < 7; ++
$i) {
101 if ($lmod > $time - $dsec * $i) {
115 echo date("Y-m-d", $lmod);
121 <td
class="text-right">
124 $u = ["Bytes", "KB", "MB"];
125 $s = filesize($phar);
126 $l = floor(log10($s));
127 printf("%1.1F %s\n", $s/pow(10,$l-($l%3
)), $u[$l/3]);
138 <h2
>Available Packages
</h2
>
139 <ul
class="list-inline">
140 <?php
foreach (array_map("htmlspecialchars", $packages) as $index => $package) : ?
>
141 <?php
$next = strtolower($package{0}); ?
>
142 <?php
if (isset($prev) && $next != $prev) : ?
>
145 <ul
class="list-inline">
148 <li
><a href
="?<?= $package ?>"><?
= $package ?
></a
></li
>
149 <?php
$prev = $next; ?
>
158 ©
; 2015 m6w6
, Michael Wallner