removed auth usage, php-cs-fixer

This commit is contained in:
marko
2022-06-26 19:24:14 +02:00
parent c5a6699caf
commit 269c680fe0
6 changed files with 400 additions and 387 deletions

View File

@@ -1,31 +1,30 @@
<?php
require_once("config/participo.php");
require_once 'config/participo.php';
require_once("participoLib/participo.php");
require_once("./local/dbConf.php");
require_once("./local/cwsvJudo.php");
require_once 'participoLib/participo.php';
require_once("./lib/db.php");
require_once("./lib/api.php");
require_once("./auth.php");
require_once './local/dbConf.php';
require_once './local/cwsvJudo.php';
require_once './lib/db.php';
require_once './lib/api.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");
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();
// get a list of all infoZettel
$fileList = glob($basePath."/infoZettel/*.md");
$fileList = glob($basePath . '/infoZettel/*.md');
rsort($fileList);
$years = [];
foreach($fileList as $file){
foreach ($fileList as $file) {
$years[] = (int)substr(basename($file), 0, 4);
}
$years = array_unique($years);
?>
<!DOCTYPE html>
<html>
@@ -33,7 +32,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">
@@ -66,14 +65,14 @@ $years = array_unique($years);
<img style="max-width:100%;height:12vh;" class="responsive-img" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.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){?>
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
}
@@ -84,37 +83,36 @@ foreach($years as $year){?>
<main>
<!-- List of Infos -->
<div class="row" id="infoList">
<?php
<?php
$currentYear = (int)substr(basename($fileList[0]), 0, 4);
echo("<h2 id=\"infoZettel-".$currentYear."\">".$currentYear."</h2>");
echo('<h2 id="infoZettel-' . $currentYear . '">' . $currentYear . '</h2>');
foreach($fileList as $file){
foreach ($fileList as $file) {
$thisYear = (int)substr(basename($file), 0, 4);
if($thisYear != $currentYear){
$currentYear=$thisYear;
echo("<h2 id=\"infoZettel-".$currentYear."\">".$currentYear."</h2>");
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);
// get a list of all infoZettel
$fileList = glob($basePath . '/infoZettel/*.md');
rsort($fileList);
foreach($fileList as $file){
$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>');
}
$infoZettel = loadMarkdownFile($file);
echo(
$infoZettel = loadMarkdownFile($file);
echo(
AppCard::fromArray([
'title' => $infoZettel['yaml']['title'],
'description'=> Parsedown::instance()->text( $infoZettel['mdText'] ),
])->htmlCode(['extraClass'=>"parsedownCard"])
'title' => $infoZettel['yaml']['title'],
'description' => Parsedown::instance()->text($infoZettel['mdText']),
])->htmlCode(['extraClass' => 'parsedownCard'])
);
}
?>
} ?>
</div><!-- End of Infos -->
</main>
<?php