WIP: bring participo back - consistent use of bootstrap - formatting -

phpstan level 0 error free - fixes for kyu subpage - move mams into
participo framework - remove legacy `lib/db.php` usage - add attributer
admin function - add newsposter - fixing apiKey creation
This commit is contained in:
marko
2025-11-07 10:37:25 +01:00
parent 672eaccfc9
commit f28fa7b51b
96 changed files with 6152 additions and 6053 deletions

View File

@@ -1,30 +1,23 @@
<?php
require_once 'config/participo.php';
// (local specific) settings
require_once "config.php";
require_once "bootstrap.php";
require_once './local/cwsvJudo.php';
require_once "participoLib/dbConnector.php";
require_once "participoLib/participo.php";
require_once "participoLib/planer.php";
require_once 'participoLib/dbConnector.php';
require_once 'participoLib/participo.php';
require_once 'participoLib/planer.php';
participo::init(config: $CONFIG["cwsvJudo"], secrets: $SECRETS["cwsvJudo"]);
dbConnector::connect(
$cwsvJudoConfig['db']['host'],
$cwsvJudoConfig['db']['name'],
$cwsvJudoConfig['db']['user'],
$cwsvJudoConfig['db']['password']
);
$eventId = $_POST["eventId"] ?? null;
$startingTypeId = $_POST["type"] ?? null;
$starterId = $_POST["userId"] ?? null;
participo::authentificate();
$eventId = $_POST['eventId'] ?? null;
$startingTypeId = $_POST['type'] ?? null;
$starterId = $_POST['userId'] ?? null;
$returnToUrl = $_POST['returnToUrl'] ?? 'participo/';
$returnToUrl = $_POST["returnToUrl"] ?? "participo/";
// @todo Check against deadline?
$newStarter = new Starter(null, $eventId, $startingTypeId, $starterId);
$newStarterId = $newStarter->addToDb();
header('Location: ' . urldecode($returnToUrl), true, 301);
header("Location: " . urldecode($returnToUrl), true, 301);
exit(-1); // shouldn't matter