Compare commits

...

4 Commits

1 changed files with 71 additions and 0 deletions
Split View
  1. +71
    -0
      canary/redesign.php

+ 71
- 0
canary/redesign.php View File

@ -0,0 +1,71 @@
<?php
// Copyright (C) 2021 Socialist Rifle Association
//
// This file is part of SRA Website.
//
// website is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// website is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with website. If not, see <http://www.gnu.org/licenses/>.
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Socialist Rifle Association</title>
<style>
code {
display: block;
background: rgba(222,222,222,.25);
border-radius: 8px;
border: 1px solid #ddd;
font-family: "Courier New", monospace;
font-size: 0.9em;
padding: 1em 1.5em;
line-height: 1.75em;
overflow-x: auto;
text-align: left;
}
</style>
<?php include("../res/php/headtags.php") ?>
</head>
<body>
<?php include("../res/php/top.php") ?>
<div id="section-title">Warrant Canaries</div>
<hr>
<?php
// Display all canaries
$canaries = [];
foreach (new DirectoryIterator('./dl') as $canaryInfo) {
if ($canaryInfo->isDot()) {
continue;
}
array_push($canaries, $canaryInfo->getFilename());
}
// Sort the canaries from newest to oldest
arsort($canaries);
?>
<div>
<?php
foreach ($canaries as $canary) {
if (file_exists("./dl/" . $canary . "/Canary.txt")) {
echo("<div><h1>Canary $canary</h1>");
$canaryContent = file_get_contents("./dl/" . $canary . "/Canary.txt");
echo("<section><pre><code>$canaryContent</code></pre></section></div>");
}
}
?>
</div>
<?php include("../res/php/bottom.php") ?>
</body>
</html>

Loading…
Cancel
Save