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,24 @@
<?php
require_once 'config/participo.php';
require_once "bootstrap.php";
require_once 'participoLib/participo.php';
require_once "participoLib/participo.php";
require_once './local/dbConf.php';
require_once './local/cwsvJudo.php';
// @todo Legacy libs! Remove!
require_once "./lib/api.php";
require_once './lib/db.php';
require_once './lib/api.php';
require_once "parsedown/Parsedown.php";
require_once "spyc/Spyc.php";
$basePath = $config['basePath'];
require_once $basePath . '/config/cwsvJudo.config.php';
require_once $basePath . '/ressourcen/phpLib/parsedown/Parsedown.php';
require_once $basePath . '/ressourcen/phpLib/Spyc/Spyc.php';
participo::authentificate();
participo::authentificate();
// get a list of all infoZettel
$fileList = glob($basePath . '/infoZettel/*.md');
$fileList = glob(join("/", [$BASE_PATH, "infoZettel", "*.md"]));
rsort($fileList);
$years = [];
foreach ($fileList as $file) {
$years[] = (int)substr(basename($file), 0, 4);
$years[] = (int) substr(basename($file), 0, 4);
}
$years = array_unique($years);
?>
<!DOCTYPE html>
<html>
@@ -32,7 +26,7 @@ $years = array_unique($years);
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<?php readfile('./shared/imports.php'); ?>
<?php readfile("./shared/imports.php"); ?>
<!-- adjustments to parsedowncards (smaller headings) -->
<link rel="stylesheet" href="css/parsedownCard.css">
@@ -49,8 +43,8 @@ $years = array_unique($years);
<title>InfoZettel</title>
<meta name="description" content="InfoZettel der Judoka des Chemnitzer WSV">
<link rel="icon" href="<?echo($config['ressourceUrl']);?>/graphiken/icons/cwsv.ico" />
<link rel="apple-touch-icon" href="<?echo($config['baseUrl']);?>/apple-touch-icon.png">
<link rel="icon" href="/ressourcen/graphiken/icons/cwsv.ico" />
<link rel="apple-touch-icon" href="/ressourcen/graphiken/logos/favIcons/apple-touch-icon.png">
</head>
<body>
@@ -62,21 +56,18 @@ $years = array_unique($years);
<ul class="sidenav sidenav-fixed sidenav-close" id="nav-mobile">
<li class="logo">
<a style="height:auto;" class="brand-logo" id="logo-container" href="/participo/">
<img style="max-width:100%;height:12vh;" class="responsive-img" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png" />
<img style="max-width:100%;height:12vh;" class="responsive-img" src="/ressourcen/graphiken/logos/cwsvJudoLogoWappen.256w.png" />
</a>
</li>
<li><?php require_once 'sidenav/loginStatus.php'; ?></li>
<li><?php require_once "sidenav/loginStatus.php"; ?></li>
<li class="bold">
<a class="waves-effect waves-teal left-align" href="/participo">zurück</a>
</li>
<?php
foreach ($years as $year) {?>
<?php foreach ($years as $year) { ?>
<li class="bold">
<a class="waves-effect waves-teal right-align" href="#infoZettel-<?php echo($year); ?>"><?php echo($year); ?></a>
<a class="waves-effect waves-teal right-align" href="#infoZettel-<?php echo $year; ?>"><?php echo $year; ?></a>
</li>
<?php
}
?>
<?php } ?>
</ul>
</header>
@@ -84,39 +75,50 @@ foreach ($years as $year) {?>
<!-- List of Infos -->
<div class="row" id="infoList">
<?php
$currentYear = (int)substr(basename($fileList[0]), 0, 4);
echo('<h2 id="infoZettel-' . $currentYear . '">' . $currentYear . '</h2>');
if (sizeof($fileList) > 0) {
$currentYear = (int) substr(basename($fileList[0]), 0, 4);
echo '<h2 id="infoZettel-' . $currentYear . '">' . $currentYear . "</h2>";
} else {
echo "<h2>Seltsam! Keine Infozettel gefunden...</h2>";
}
foreach ($fileList as $file) {
$thisYear = (int)substr(basename($file), 0, 4);
if ($thisYear != $currentYear) {
$currentYear = $thisYear;
echo('<h2 id="infoZettel-' . $currentYear . '">' . $currentYear . '</h2>');
}
// get a list of all infoZettel
$fileList = glob($basePath . '/infoZettel/*.md');
rsort($fileList);
$thisYear = (int) substr(basename($file), 0, 4);
if ($thisYear != $currentYear) {
$currentYear = $thisYear;
echo '<h2 id="infoZettel-' .
$currentYear .
'">' .
$currentYear .
"</h2>";
}
foreach ($fileList as $file) {
$thisYear = (int)substr(basename($file), 0, 4);
if ($thisYear != $currentYear) {
$currentYear = $thisYear;
echo('<h2 id="infoZettel-' . $currentYear . '">' . $currentYear . '</h2>');
}
// get a list of all infoZettel
$fileList = glob($basePath . "/infoZettel/*.md");
rsort($fileList);
$infoZettel = loadMarkdownFile($file);
echo(
AppCard::fromArray([
'title' => $infoZettel['yaml']['title'],
'description' => Parsedown::instance()->text($infoZettel['mdText']),
])->htmlCode(['extraClass' => 'parsedownCard'])
);
} ?>
foreach ($fileList as $file) {
$thisYear = (int) substr(basename($file), 0, 4);
if ($thisYear != $currentYear) {
$currentYear = $thisYear;
echo '<h2 id="infoZettel-' .
$currentYear .
'">' .
$currentYear .
"</h2>";
}
$infoZettel = loadMarkdownFile($file);
echo AppCard::fromArray([
"title" => $infoZettel["yaml"]["title"],
"description" => Parsedown::instance()->text($infoZettel["mdText"]),
])->htmlCode(["extraClass" => "parsedownCard"]);
}
?>
</div><!-- End of Infos -->
</main>
<?php
}
?>
</body>
</html>
</html>