Browse Source

scores for 2021 archived / new ones for 2022

master
Fabian Kurz 6 months ago
parent
commit
9e3197e24a
  1. 2
      api.php
  2. 5
      functions.php
  3. 2
      scores-by-call.php
  4. 2
      scores.php

2
api.php

@ -1,4 +1,5 @@
<?
# error_reporting(0);
session_start();
$access = false;
@ -476,6 +477,7 @@
header("Content-type: application/pdf");
header("Content-Disposition: attachment; filename=\"$callsign-$type.pdf\"");
echo create_award ($callsign, $_SESSION['id'], $type, $score, date("d-M-Y"));
}
else {
echo "wrong type or callsign";

5
functions.php

@ -1337,7 +1337,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")-1, $nr, $date, $score);
$fdf = sprintf($template, $callsign, date("Y"), $nr, $date, $score);
}
else {
$fdf = sprintf($template, $callsign, $nr, $date, $score);
@ -1439,7 +1439,7 @@ function export_rbn ($c) {
# CMA
foreach ($bands as $b) {
if (!in_array($b, $cma[$m['nr']])) {
if (array_key_exists($m['nr'], $cma) && !in_array($b, $cma[$m['nr']])) {
$ret[$m['callsign']][$b] = array("CMA");
}
}
@ -1450,4 +1450,5 @@ function export_rbn ($c) {
}
?>

2
scores-by-call.php

@ -73,7 +73,7 @@ function plot() {
console.log("plot...");
var request = new XMLHttpRequest();
var pc = plot_calls.join(",");
request.open("GET", "/api.php?action=plot&type=ACA&year=2021&calls="+pc, true);
request.open("GET", "/api.php?action=plot&type=ACA&year=2022&calls="+pc, true);
request.onreadystatechange = function() {
var done = 4, ok = 200;
if (request.readyState == done && request.status == ok) {

2
scores.php

@ -4,7 +4,7 @@
<link rel="stylesheet" type="text/css" href="/style.css">
</head>
<h2>Score overview</h2>
<a href="/">Back</a> - <a href="/scores-by-call">Sortable and searchable score table with graphs</a> - Final scores: <a href="/scores-2020-final">2020</a>, <a href="/scores-2019-final">2019</a><br><br>
<a href="/">Back</a> - <a href="/scores-by-call">Sortable and searchable score table with graphs</a> - Final scores: <a href="/scores-2021-final">2021</a> - <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