Browse Source

2022 -> 2023

master
Fabian Kurz 9 months ago
parent
commit
e7814aa377
  1. 5
      api.php
  2. 3
      functions.php
  3. 1756
      scores-2021-final.php
  4. 2170
      scores-2022-final.php
  5. 2
      scores-by-call.php
  6. 2
      scores.php

5
api.php

@ -528,12 +528,11 @@
else {
$ret[$c] = Array();
$date = new DateTime("$year-01-01");
$date = new DateTime("2023-01-01");
for ($i = 1; $i <= 52; $i++) {
$date->modify('next tuesday');
$tue = $date->format('Y-m-d');
$q = mysqli_query($db, "SELECT count(distinct(`nr`)) from cwops_log where `mycall`='$c' and year=YEAR(CURDATE()) and date <= '$tue'");
#$q = mysqli_query($db, "SELECT count(distinct(`nr`)) from cwops_log where `mycall`='$c' and year=2021 and date <= '$tue'");
$q = mysqli_query($db, "SELECT count(distinct(`nr`)) from cwops_log where `mycall`='$c' and year=2023 and date <= '$tue'");
$r = mysqli_fetch_row($q);
$aca = $r[0];
array_push($ret[$c], $aca);

3
functions.php

@ -41,8 +41,7 @@ function stats_default($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())");
$q = mysqli_query($db, "SELECT count(distinct(`nr`)) from cwops_log where `mycall`='$c' and year=2023");
$r = mysqli_fetch_row($q);
$aca = $r[0];

1756
scores-2021-final.php

File diff suppressed because it is too large Load Diff

2170
scores-2022-final.php

File diff suppressed because it is too large Load Diff

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=2022&calls="+pc, true);
request.open("GET", "/api.php?action=plot&type=ACA&year=2023&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-2021-final">2021</a> - <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-2022-final">2022</a> - <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