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:
@@ -1,4 +1,4 @@
|
||||
<?php require_once 'index.inc.php'; ?>
|
||||
<?php require_once "index.inc.php"; ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<!-- shared imports (common css, MaterializeCss) -->
|
||||
<?php readfile('shared/imports.php'); ?>
|
||||
<?php readfile("shared/imports.php"); ?>
|
||||
|
||||
<!-- inits for the materializeCss -->
|
||||
<script src="index.js"></script>
|
||||
@@ -14,8 +14,8 @@
|
||||
<title>participo</title>
|
||||
<meta name="description" content="Online-Apps 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>
|
||||
@@ -29,10 +29,10 @@
|
||||
<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 alt="cwsvJudoApps" style="max-width:100%;height:12vh;" class="responsive-img" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png" />
|
||||
<img alt="cwsvJudoApps" style="max-width:100%;height:12vh;" class="responsive-img" src="/ressourcen/graphiken/logos/cwsvJudoLogoWappen.256w.png" />
|
||||
</a>
|
||||
</li>
|
||||
<?php require_once 'sidenav/loginStatus.php'; ?><!-- brings its own li -->
|
||||
<?php require_once "sidenav/loginStatus.php"; ?><!-- brings its own li -->
|
||||
<li class="bold">
|
||||
<a class="waves-effect waves-teal right-align" href="#mitmachApps">Mitmachen<i class="material-icons">accessibility</i></a>
|
||||
</li>
|
||||
@@ -45,139 +45,137 @@
|
||||
<li class="bold">
|
||||
<a class="waves-effect waves-teal right-align" href="#configApps">Einstellen<i class="material-icons">settings</i></a>
|
||||
</li>
|
||||
<?php if (participo::isUserAdmin($userData['id'])) {?>
|
||||
<?php if (participo::isUserAdmin()) { ?>
|
||||
<li class="bold">
|
||||
<a class="waves-effect waves-teal right-align" href="#admiStuff">adminStuff</a>
|
||||
</li>
|
||||
<?php }?>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
if ($_SESSION['login']) {
|
||||
?>
|
||||
<?php if ($_SESSION["login"]) { ?>
|
||||
<main>
|
||||
<!-- List of Mitmach-Apps -->
|
||||
<h2>Zum Mitmachen</h2>
|
||||
<div class="row" id="mitmachApps">
|
||||
<?php
|
||||
echo(
|
||||
AppCard::fromArray([
|
||||
'link' => '/machs',
|
||||
'title' => '<em>M</em>ein <em>Ach</em>ievement <em>S</em>ystem',
|
||||
'description' => 'Ein kleines Achievementsystem für die tägliche Herausforderung',
|
||||
'imgUrl' => 'images/mountain-climber.svg',
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption' => 'MAchS', 'link' => '/machs']),
|
||||
],
|
||||
])->htmlCode() .
|
||||
AppCard::fromArray([
|
||||
'link' => 'events',
|
||||
'title' => 'Event-Planer',
|
||||
'description' => 'Organisieren der Teilnahmen (und nicht-Teilnahmen) an Wettkämpfen, Sondertrainingseinheiten, Feiern etc.' . eventPlaner::getHtmlEventTable(eventPlaner::getComingWkEvents()),
|
||||
'imgUrl' => '/ressourcen/graphiken/icons/terminKalender.svg',
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption' => 'Planer', 'link' => 'events']),
|
||||
],
|
||||
])->htmlCode()
|
||||
)
|
||||
?>
|
||||
<?php echo AppCard::fromArray([
|
||||
"link" => "/machs",
|
||||
"title" => "<em>M</em>ein <em>Ach</em>ievement <em>S</em>ystem",
|
||||
"description" =>
|
||||
"Ein kleines Achievementsystem für die tägliche Herausforderung",
|
||||
"imgUrl" => "images/mountain-climber.svg",
|
||||
"actions" => [
|
||||
AppCardAction::fromArray(["caption" => "MAchS", "link" => "/machs"]),
|
||||
],
|
||||
])->htmlCode() .
|
||||
AppCard::fromArray([
|
||||
"link" => "events",
|
||||
"title" => "Event-Planer",
|
||||
"description" =>
|
||||
"Organisieren der Teilnahmen (und nicht-Teilnahmen) an Wettkämpfen, Sondertrainingseinheiten, Feiern etc." .
|
||||
eventPlaner::getHtmlEventTable(eventPlaner::getComingWkEvents()),
|
||||
"imgUrl" => "/ressourcen/graphiken/icons/terminKalender.svg",
|
||||
"actions" => [
|
||||
AppCardAction::fromArray([
|
||||
"caption" => "Planer",
|
||||
"link" => "events",
|
||||
]),
|
||||
],
|
||||
])->htmlCode(); ?>
|
||||
</div> <!-- mitmachApps -->
|
||||
|
||||
<h2>Zur Information</h2>
|
||||
<div class="row" id="infoApps">
|
||||
<?php
|
||||
echo(
|
||||
AppCard::fromArray([
|
||||
'link' => 'infoZettel',
|
||||
'title' => 'Infozettel',
|
||||
'description' => 'Online-Variante der Infozettel und Newsletter',
|
||||
'imgUrl' => 'images/info.svg',
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption' => 'Info', 'link' => 'infoZettel']),
|
||||
],
|
||||
])->htmlCode() .
|
||||
AppCard::fromArray([
|
||||
'link' => 'attendance',
|
||||
'title' => 'Teilnahme',
|
||||
'description' => 'Eine kleine Übersicht, wie wie oft man beim Training war',
|
||||
'imgUrl' => 'http://cwsvjudo.bplaced.net/ressourcen/graphiken/icons/calendarIcon.svg',
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption' => 'Anwesenheit', 'link' => 'attendance']),
|
||||
],
|
||||
])->htmlCode()
|
||||
);
|
||||
// @todo attendanceApp?>
|
||||
<?php echo AppCard::fromArray([
|
||||
"link" => "infoZettel",
|
||||
"title" => "Infozettel",
|
||||
"description" => "Online-Variante der Infozettel und Newsletter",
|
||||
"imgUrl" => "images/info.svg",
|
||||
"actions" => [
|
||||
AppCardAction::fromArray(["caption" => "Info", "link" => "infoZettel"]),
|
||||
],
|
||||
])->htmlCode() .
|
||||
AppCard::fromArray([
|
||||
"link" => "attendance",
|
||||
"title" => "Teilnahme",
|
||||
"description" =>
|
||||
"Eine kleine Übersicht, wie wie oft man beim Training war",
|
||||
"imgUrl" => "/ressourcen/graphiken/icons/calendarIcon.svg",
|
||||
"actions" => [
|
||||
AppCardAction::fromArray([
|
||||
"caption" => "Anwesenheit",
|
||||
"link" => "attendance",
|
||||
]),
|
||||
],
|
||||
])->htmlCode();
|
||||
// @todo attendanceApp
|
||||
?>
|
||||
</div> <!-- infoApps -->
|
||||
|
||||
<h2>Zum Nachschlagen</h2>
|
||||
<div class="row" id="lexiApps">
|
||||
<?php
|
||||
echo(
|
||||
AppCard::fromArray([
|
||||
'link' => 'kyu',
|
||||
'title' => 'Kyu',
|
||||
'description' => 'Die Prüfungsprogamme der einzelnen Gürtelstufen in Bild, Ton und Text',
|
||||
'imgUrl' => 'images/obi.svg',
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption' => 'Kyu-Programme', 'link' => 'kyu']),
|
||||
],
|
||||
])->htmlCode() .
|
||||
AppCard::fromArray([
|
||||
'link' => '/JudoWiki',
|
||||
'title' => 'JudoWiki',
|
||||
'description' => 'Ein Wiki zum Thema Judo',
|
||||
'imgUrl' => 'http://cwsvjudo.bplaced.net/ressourcen/graphiken/icons/wikipediaW.svg',
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption' => 'JudoWiki', 'link' => '/JudoWiki']),
|
||||
],
|
||||
])->htmlCode()
|
||||
);
|
||||
// @todo horstWolf?>
|
||||
<?php echo AppCard::fromArray([
|
||||
"link" => "kyu",
|
||||
"title" => "Kyu",
|
||||
"description" =>
|
||||
"Die Prüfungsprogamme der einzelnen Gürtelstufen in Bild, Ton und Text",
|
||||
"imgUrl" => "images/obi.svg",
|
||||
"actions" => [
|
||||
AppCardAction::fromArray([
|
||||
"caption" => "Kyu-Programme",
|
||||
"link" => "kyu",
|
||||
]),
|
||||
],
|
||||
])->htmlCode() .
|
||||
AppCard::fromArray([
|
||||
"link" => "/JudoWiki",
|
||||
"title" => "JudoWiki",
|
||||
"description" => "Ein Wiki zum Thema Judo",
|
||||
"imgUrl" => "/ressourcen/graphiken/icons/wikipediaW.svg",
|
||||
"actions" => [
|
||||
AppCardAction::fromArray([
|
||||
"caption" => "JudoWiki",
|
||||
"link" => "/JudoWiki",
|
||||
]),
|
||||
],
|
||||
])->htmlCode();
|
||||
// @todo horstWolf
|
||||
?>
|
||||
</div><!-- lexiApps -->
|
||||
|
||||
<!-- List of ConfigStuff -->
|
||||
<h2>Zum Einstellen</h2>
|
||||
<div class="row" id="configApps">
|
||||
<?php
|
||||
echo(
|
||||
AppCard::fromArray([
|
||||
'link' => 'user',
|
||||
'title' => 'User-Config',
|
||||
'description' => 'Einstellungen zum aktuellen Benutzer dessen Kindern',
|
||||
'imgUrl' => 'images/account.svg',
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption' => 'Config', 'link' => 'user']),
|
||||
],
|
||||
])->htmlCode()
|
||||
); ?>
|
||||
<?php echo AppCard::fromArray([
|
||||
"link" => "user",
|
||||
"title" => "User-Config",
|
||||
"description" => "Einstellungen zum aktuellen Benutzer dessen Kindern",
|
||||
"imgUrl" => "images/account.svg",
|
||||
"actions" => [
|
||||
AppCardAction::fromArray(["caption" => "Config", "link" => "user"]),
|
||||
],
|
||||
])->htmlCode(); ?>
|
||||
</div> <!-- configApps -->
|
||||
<?php
|
||||
// AdminStuff, thats only visible for Admins
|
||||
if (participo::isUserAdmin($userData['id'])) {
|
||||
echo(
|
||||
'<h2>AdminStuff</h2>' .
|
||||
'<div id="admiStuff" class="row">' .
|
||||
AppCard::fromArray([
|
||||
'title' => 'lastLogins',
|
||||
'description' => '</p>' . lastLoginTable() . '</p>'
|
||||
])->htmlCode() .
|
||||
'</div>'
|
||||
);
|
||||
echo(
|
||||
AppCard::fromArray([
|
||||
'link' => 'admin',
|
||||
'title' => 'Admin',
|
||||
'description' => 'Admin Stuff',
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption' => 'Admin', 'link' => 'admin']),
|
||||
],
|
||||
])->htmlCode()
|
||||
);
|
||||
<?php // AdminStuff, thats only visible for Admins
|
||||
|
||||
if (participo::isUserAdmin()) {
|
||||
echo "<h2>AdminStuff</h2>" .
|
||||
'<div id="admiStuff" class="row">' .
|
||||
AppCard::fromArray([
|
||||
"title" => "lastLogins",
|
||||
"description" => "</p>" . lastLoginTable() . "</p>",
|
||||
])->htmlCode() .
|
||||
"</div>";
|
||||
echo AppCard::fromArray([
|
||||
"link" => "admin",
|
||||
"title" => "Admin",
|
||||
"description" => "Admin Stuff",
|
||||
"actions" => [
|
||||
AppCardAction::fromArray(["caption" => "Admin", "link" => "admin"]),
|
||||
],
|
||||
])->htmlCode();
|
||||
} ?>
|
||||
</main>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user