Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 538e24585c
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 75 lines (69 sloc) 2.261 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
<?php

require("../lib/functions.php");

$plugins = Plugin::all(false, LEVEL_DEV);

$secrets = Plugin::all(true, LEVEL_DEV);

$app = Plugin::get(PLUGIN_IDENTIFIER, QS_ID);

$plugins = array_merge($plugins, $secrets);

?><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Update administration page</title>
<link href="site.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="page">
<h1>Update administration page</h1>
<p><a href="add.php"><strong>Add update/new plugin</strong></a></p>
<hr />
<div id="app_updates">
<h2>Application Updates <span id="app_count"><?= count($app->versions) ?> updates</span></h2>
<table>
<tr>
<th>Version</th>
<th>Level</th>
<th>Downloads</th>
</tr>
<?php
        $i = 0;
        foreach ($app->versions as $version) {
          $url = "update.php?id=" . $version->identifier . "&amp;version=" . $version->version;
          $odd = ($i % 2 == 1);
          ?><tr<?= $odd ? ' class="odd"' : "" ?> onclick="javascript:document.location = '<?= $url ?>';">
<td><a href="<?= $url ?>"><?= $version->displayVersion() ?></a></td>
<td><a href="<?= $url ?>"><?= $version->level ?></a></td>
<td><a href="<?= $url ?>"><?= $version->downloads ?></a></td>
</tr><?php
        $i++;
        }
        ?>
</table>
</div>
<hr />
<div id="plugin_updates">
<h2>Plugins <span id="plugin_count"><?= count($plugins) ?> plugins</span></h2>
<table>
<tr>
<th>Name</th>
<th>Version</th>
<th>Downloads</th>
</tr>
<?php
      $i = 0;
      foreach ($plugins as $plugin) {
        $url = "update.php?id=" . $plugin->identifier . "&amp;version=" . $plugin->version;
        $odd = ($i % 2 == 1);
      ?>
<tr<?= $odd ? ' class="odd"' : "" ?> onclick="javascript:document.location = '<?= $url ?>';">
<td><a href="<?= $url ?>"><?= $plugin->name ?></a></td>
<td><a href="<?= $url ?>"><?= $plugin->displayVersion() ?></a></td>
<td><a href="<?= $url ?>"><?= $plugin->downloads ?></a></td>
</tr><?php
        $i++;
      }
    ?>
</table>
</div>
</div>
</body>
</html>
Something went wrong with that request. Please try again.