removed auth usage, php-cs-fixer
This commit is contained in:
@@ -1,21 +1,20 @@
|
||||
<?php
|
||||
require_once("config/participo.php");
|
||||
require_once 'config/participo.php';
|
||||
|
||||
require_once("./local/cwsvJudo.php");
|
||||
|
||||
require_once("./lib/db.php");// should be replaced
|
||||
require_once("./lib/api.php");// should be replaced
|
||||
require_once("participoLib/participo.php");
|
||||
require_once("participoLib/planer.php");
|
||||
require_once './local/cwsvJudo.php';
|
||||
|
||||
require_once './lib/db.php'; // should be replaced
|
||||
require_once './lib/api.php'; // should be replaced
|
||||
require_once 'participoLib/participo.php';
|
||||
require_once 'participoLib/planer.php';
|
||||
|
||||
dbConnector::connect(
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
$cwsvJudoConfig['db']['host'],
|
||||
$cwsvJudoConfig['db']['name'],
|
||||
$cwsvJudoConfig['db']['user'],
|
||||
$cwsvJudoConfig['db']['password']
|
||||
);
|
||||
eventPlaner::setDbConnection( dbConnector::getDbConnection() );
|
||||
eventPlaner::setDbConnection(dbConnector::getDbConnection());
|
||||
participo::authentificate();
|
||||
$userData = getUserData(dbConnector::getDbConnection(), $_SESSION['user']['userId']);
|
||||
|
||||
@@ -26,7 +25,7 @@ require_once("config/participo.php");
|
||||
<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'); ?>
|
||||
|
||||
<!-- inits for the materializeCss -->
|
||||
<script>
|
||||
@@ -61,7 +60,7 @@ require_once("config/participo.php");
|
||||
<img alt="cwsvJudoApps" style="max-width:100%;height:12vh;" class="responsive-img" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.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>
|
||||
@@ -74,7 +73,7 @@ require_once("config/participo.php");
|
||||
<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($userData['id'])) {?>
|
||||
<li class="bold">
|
||||
<a class="waves-effect waves-teal right-align" href="#admiStuff">adminStuff</a>
|
||||
</li>
|
||||
@@ -83,30 +82,30 @@ require_once("config/participo.php");
|
||||
</header>
|
||||
|
||||
<?php
|
||||
if($_SESSION['login']){
|
||||
?>
|
||||
if ($_SESSION['login']) {
|
||||
?>
|
||||
<main>
|
||||
<!-- List of Mitmach-Apps -->
|
||||
<h2>Zum Mitmachen</h2>
|
||||
<div class="row" id="mitmachApps">
|
||||
<?php
|
||||
<?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"]),
|
||||
'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().
|
||||
])->htmlCode() .
|
||||
AppCard::fromArray([
|
||||
'link' => "/pages/desktop/wkParticipo",
|
||||
'title' => "Event-Planer",
|
||||
'description'=> "Organisieren der Teilnahmen (und nicht-Teilnahmen) an Wettkämpfen, Sondertrainingseinheiten, Feiern etc.</p>".eventPlaner::getHtmlEventTable(eventPlaner::getCommingWkEvents())."<p>",
|
||||
'imgUrl' => "/ressourcen/graphiken/icons/terminKalender.svg",
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption'=>"Planer", 'link'=>"/pages/desktop/wkParticipo"]),
|
||||
'link' => '/pages/desktop/wkParticipo',
|
||||
'title' => 'Event-Planer',
|
||||
'description' => 'Organisieren der Teilnahmen (und nicht-Teilnahmen) an Wettkämpfen, Sondertrainingseinheiten, Feiern etc.</p>' . eventPlaner::getHtmlEventTable(eventPlaner::getCommingWkEvents()) . '<p>',
|
||||
'imgUrl' => '/ressourcen/graphiken/icons/terminKalender.svg',
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption' => 'Planer', 'link' => '/pages/desktop/wkParticipo']),
|
||||
],
|
||||
])->htmlCode()
|
||||
)
|
||||
@@ -118,26 +117,25 @@ echo(
|
||||
<?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"]),
|
||||
'link' => 'infoZettel',
|
||||
'title' => 'Infozettel',
|
||||
'description' => 'Online-Variante der Infozettel und Newsletter',
|
||||
'imgUrl' => 'images/info.svg',
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption' => 'Info', 'link' => 'infoZettel']),
|
||||
],
|
||||
])->htmlCode().
|
||||
])->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"]),
|
||||
'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
|
||||
?>
|
||||
// @todo attendanceApp?>
|
||||
</div> <!-- infoApps -->
|
||||
|
||||
<h2>Zum Nachschlagen</h2>
|
||||
@@ -145,26 +143,25 @@ echo(
|
||||
<?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"]),
|
||||
'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().
|
||||
])->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"]),
|
||||
'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
|
||||
?>
|
||||
// @todo horstWolf?>
|
||||
</div><!-- lexiApps -->
|
||||
|
||||
<!-- List of ConfigStuff -->
|
||||
@@ -173,31 +170,29 @@ echo(
|
||||
<?php
|
||||
echo(
|
||||
AppCard::fromArray([
|
||||
'link' => "user",
|
||||
'title' => "User-Config",
|
||||
'description' => "Einstellungen zum aktuellen Benutzer dessen Kindern",
|
||||
'imgUrl' => "images/account.svg",
|
||||
'link' => 'user',
|
||||
'title' => 'User-Config',
|
||||
'description' => 'Einstellungen zum aktuellen Benutzer dessen Kindern',
|
||||
'imgUrl' => 'images/account.svg',
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption'=>"Config", 'link'=>"user"]),
|
||||
AppCardAction::fromArray(['caption' => 'Config', 'link' => 'user']),
|
||||
],
|
||||
])->htmlCode()
|
||||
);
|
||||
?>
|
||||
); ?>
|
||||
</div> <!-- configApps -->
|
||||
<?php
|
||||
// AdminStuff, thats only visible for Admins
|
||||
if( participo::isUserAdmin( $userData['id'] ) ){
|
||||
if (participo::isUserAdmin($userData['id'])) {
|
||||
echo(
|
||||
"<h2>AdminStuff</h2>".
|
||||
"<div id=\"admiStuff\" class=\"row\">".
|
||||
'<h2>AdminStuff</h2>' .
|
||||
'<div id="admiStuff" class="row">' .
|
||||
AppCard::fromArray([
|
||||
'title' =>"lastLogins",
|
||||
'description' => "</p>".lastLoginTable()."</p>"
|
||||
])->htmlCode().
|
||||
"</div>"
|
||||
'title' => 'lastLogins',
|
||||
'description' => '</p>' . lastLoginTable() . '</p>'
|
||||
])->htmlCode() .
|
||||
'</div>'
|
||||
);
|
||||
}
|
||||
?>
|
||||
} ?>
|
||||
</main>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user