1
0

updateslog

This commit is contained in:
2018-02-03 15:44:40 +01:00
parent e9bd5a783c
commit 3789b02dfd
6 changed files with 93 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ require_once (__DIR__ . '/../internals/highscores.php');
require_once (__DIR__ . '/../internals/mikeschergitgraph.php');
require_once (__DIR__ . '/../internals/programs.php');
require_once (__DIR__ . '/../internals/books.php');
require_once (__DIR__ . '/../internals/updateslog.php');
Database::connect();
@@ -153,6 +154,23 @@ function dumpConsistency($c) {
<!------------------------------------------>
<div class="boxedcontent">
<div class="bc_header">UpdatesLog</div>
<div class="bc_data keyvaluelist kvl_300">
<?php foreach (UpdatesLog::listProgramsInformation() as $info): ?>
<div><span><?php echo '[' . $info['name'] . '] Count:' ?></span> <span><a href="javascript:startAjaxReplace('#ul_ajax_target', '/su_ajax/updateslog?secret=<?php echo $CONFIG['ajax_secret'] ?>&ulname=<?php echo $info['name'] ?>')"><?php echo $info['count_total']; ?></a></span></div>
<div><span><?php echo '[' . $info['name'] . '] Last query:' ?></span> <span><?php echo $info['last_query']; ?></span></div>
<div><span><?php echo '[' . $info['name'] . '] Count (1 week):' ?></span> <span><?php echo $info['count_week']; ?></span></div>
<hr />
<?php endforeach; ?>
<br/>
<div id="ul_ajax_target"></div>
</div>
</div>
<!------------------------------------------>
<div class="boxedcontent">
<div class="bc_header">Highscores</div>
@@ -160,7 +178,7 @@ function dumpConsistency($c) {
<?php foreach (Highscores::getAllGames() as $game): ?>
<div><span><?php echo '[' . $game['NAME'] . '] Entries:' ?></span> <span><a href="/Highscores/list?gameid=<?php echo $game['ID']; ?>"><?php echo Highscores::getEntryCountFromGame($game['ID']); ?></a></span></div>
<div><span><?php echo '[' . $game['NAME'] . '] Entries:' ?></span> <span><a href=""><?php echo Highscores::getEntryCountFromGame($game['ID']); ?></a></span></div>
<div><span><?php echo '[' . $game['NAME'] . '] Highscore:' ?></span> <span><?php
$hs = Highscores::getOrderedEntriesFromGame($game['ID'], 1)[0];
echo $hs['POINTS'] . ' (' . $hs['PLAYER'] . ') @ ' . $hs['TIMESTAMP'];

View File

@@ -3,6 +3,7 @@
require_once (__DIR__ . '/../internals/base.php');
require_once (__DIR__ . '/../internals/programs.php');
require_once (__DIR__ . '/../internals/updateslog.php');
$name = $OPTIONS['name'];
@@ -12,4 +13,6 @@
$data = $updatedata[$name];
print($data['Name']."<hr>".$data['Version']."<hr>".$data['Link']);
UpdatesLog::insert($name, $data['version']);
print($name."<hr>".$data['version']."<hr>".$data['url']);

View File

@@ -16,5 +16,6 @@ if ($cmd === 'egh::refresh') { include (__DIR__ . '/../ajax/egh_refresh.php'); e
if ($cmd === 'egh::redraw') { include (__DIR__ . '/../ajax/egh_redraw.php'); exit; }
if ($cmd === 'alephnotetable') { include (__DIR__ . '/../ajax/an_activeusers.php'); exit; }
if ($cmd === 'updateslog') { include (__DIR__ . '/../ajax/ul_entries.php'); exit; }
die('Wrong command.');