Browse Source

show more statistics in site footer

master
Fabian Kurz 2 years ago
parent
commit
94bfc08f1e
  1. 13
      functions.php
  2. 2
      index.php

13
functions.php

@ -1153,11 +1153,20 @@ function is_call ($c) {
return $ret;
}
function latest_member() {
function site_stats() {
global $db;
$ret = "";
$q = mysqli_query($db, "select * from cwops_members order by nr desc limit 1");
$member = mysqli_fetch_object($q);
return "$member->callsign (#$member->nr, $member->joined) ";
$ret .= "Newest member in database: $member->callsign (#$member->nr, $member->joined) - ";
$q = mysqli_query($db, "select count(*) as c from cwops_users");
$cnt = mysqli_fetch_object($q);
$ret .= "Number of accounts: $cnt->c - ";
$q = mysqli_query($db, "select count(*) as c from cwops_log");
$cnt = mysqli_fetch_object($q);
$ret .= "Number of QSOs: $cnt->c";
return $ret;
}
?>

2
index.php

@ -415,7 +415,7 @@ else {
?>
<hr>
<p>Last modified: <? echo date ("Y-m-d", filemtime("index.php")); ?> - Newest member in database: <?=latest_member();?> - <a href="http://fkurz.net/">Fabian Kurz, DJ1YFK</a> <a href="mailto:fabian@fkurz.net">&lt;fabian@fkurz.net&gt;</a>
<p>Last modified: <? echo date ("Y-m-d", filemtime("index.php")); ?> - <?=site_stats();?> - <a href="http://fkurz.net/">Fabian Kurz, DJ1YFK</a> <a href="mailto:fabian@fkurz.net">&lt;fabian@fkurz.net&gt;</a>
- <a href="/privacy">Impressum / Datenschutz / Privacy Policy</a> - <a href="https://git.fkurz.net/dj1yfk/cwops">Source code repository</a>
</p>

Loading…
Cancel
Save