Browse Source

2020 final scores archived and ACA table cleared. (ACA PDF still on 2020!)

master
Fabian Kurz 2 years ago
parent
commit
20f5f4e6ae
  1. 4
      functions.php
  2. 1
      scores-2019-final.php
  3. 1791
      scores-2020-final.php
  4. 2
      scores.php

4
functions.php

@ -14,6 +14,7 @@ function stats($c) {
# ACA
# $q = mysqli_query($db, "SELECT count(distinct(`nr`)) from cwops_log where `mycall`='$c' and year=2021"); # roll over => keep last year's scores
$q = mysqli_query($db, "SELECT count(distinct(`nr`)) from cwops_log where `mycall`='$c' and year=YEAR(CURDATE())");
$r = mysqli_fetch_row($q);
$aca = $r[0];
@ -44,6 +45,7 @@ function stats($c) {
?>
<h2>Statistics for <?=$_SESSION['callsign'];?></h2>
<!-- p>Note: The year for which the scores are calculated will remain 2020 until January 5th, 2021, to give you sufficient time to upload your remaining 2020 logs. After that, it will switch to 2021 and the 2020 score table will be archived.</p -->
<table>
<tr><th>Award</th><th>Score</th><th>Details</th><th>PDF</th></tr>
<tr><td>ACA</td> <td><?=$aca?></td> <td><?=award_details('aca', 'y');?></td><td><a href="/api.php?action=award_pdf&type=aca">Download PDF award</a></td></tr>
@ -1126,7 +1128,7 @@ function create_award ($callsign, $uid, $type, $score, $date) {
$template = file_get_contents("pdf/cwops-$type.fdf");
if ($type == "aca") {
$fdf = sprintf($template, $callsign, date("Y"), $nr, $date, $score);
$fdf = sprintf($template, $callsign, date("Y")-1, $nr, $date, $score);
}
else {
$fdf = sprintf($template, $callsign, $nr, $date, $score);

1
scores-2019-final.php

@ -1,3 +1,4 @@
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="/style.css">
</head>

1791
scores-2020-final.php

File diff suppressed because it is too large Load Diff

2
scores.php

@ -3,7 +3,7 @@
<link rel="stylesheet" type="text/css" href="/style.css">
</head>
<h2>Score overview</h2>
<a href="/">Back</a> - <a href="/scores-by-call">Scores sorted by call</a> - <a href="/scores-2019-final">Final scores 2019</a><br><br>
<a href="/">Back</a> - <a href="/scores-by-call">Scores sorted by call</a> - Final scores: <a href="/scores-2020-final">2020</a>, <a href="/scores-2019-final">2019</a><br><br>
<?php
session_start();
include("functions.php");

Loading…
Cancel
Save