168 lines
5.3 KiB
PHP
168 lines
5.3 KiB
PHP
<?php
|
|
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
|
|
require_once("config/participo.php");
|
|
|
|
require_once("./local/dbConf.php");
|
|
require_once("./local/cwsvJudo.php");
|
|
|
|
require_once("./lib/db.php");
|
|
require_once("./lib/api.php");
|
|
require_once("./lib/participoLib/participo.php");
|
|
|
|
require_once("./auth.php");
|
|
|
|
require_once($config['basePath']."/config/cwsvJudo.config.php");
|
|
require_once($config['basePath']."/config/phpcount.config.php");
|
|
|
|
$dbConnection = getPdoDbConnection(
|
|
$cwsvJudoConfig["db"]["host"],
|
|
$cwsvJudoConfig["db"]["name"],
|
|
$cwsvJudoConfig["db"]["user"],
|
|
$cwsvJudoConfig["db"]["password"]
|
|
);
|
|
$userData = getUserData($dbConnection, $_SESSION['user']['userId']);
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<!-- MaterializeCss Ressources -->
|
|
<!-- - Compiled and minified CSS -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@materializecss/materialize@1.1.0-alpha/dist/css/materialize.min.css">
|
|
<!-- - Compiled and minified JavaScript -->
|
|
<script src="https://cdn.jsdelivr.net/npm/@materializecss/materialize@1.1.0-alpha/dist/js/materialize.min.js"></script>
|
|
<!-- - Import Google Icon Font-->
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
|
|
|
<!-- participo specific style adjustments -->
|
|
<link rel="stylesheet" href="css/participo.css">
|
|
|
|
<!-- inits for the materializeCss -->
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
var elems = document.querySelectorAll('.sidenav');
|
|
var instances = M.Sidenav.init(elems, {
|
|
// specify options here
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<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">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
<nav class="indigo darken-4">cwsvJudo Apps<a class="right top-nav sidenav-trigger waves-effect waves-light hide-on-large-only" href="#" data-target="nav-mobile">
|
|
<i class="material-icons">menu</i>
|
|
</a></nav>
|
|
<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" />
|
|
</a>
|
|
</li>
|
|
<li><?php require_once("sidenav/loginStatus.php");?></li>
|
|
<li class="bold">
|
|
<a class="waves-effect waves-teal right-align" href="#AppList">Apps</a>
|
|
</li>
|
|
<li class="bold">
|
|
<a class="waves-effect waves-teal right-align" href="#Configs">UserInfos</a>
|
|
</li>
|
|
<?php if( isUserAdmin($dbConnection, $userData['id']) ){?>
|
|
<li class="bold">
|
|
<a class="waves-effect waves-teal right-align" href="#Admin">adminStuff</a>
|
|
</li>
|
|
<?php }?>
|
|
</ul>
|
|
</header>
|
|
|
|
<?php
|
|
if($_SESSION['login']){
|
|
?>
|
|
<main>
|
|
<!-- List of Mitmach-Apps -->
|
|
<div class="row" id="AppList">
|
|
<?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' => "/machs",
|
|
'title' => "<strong>M</strong>ein <strong>Ach</strong>ievement <strong>S</strong>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' => "/pages/desktop/wkParticipo",
|
|
'title' => "Event-Planer",
|
|
'description'=> "Organisieren der Teilnahmen (und nicht-Teilnahmen) an Wettkämpfen, Sondertrainingseinheiten, Feiern etc.",
|
|
'imgUrl' => "/ressourcen/graphiken/icons/terminKalender.svg",
|
|
'actions' => [
|
|
AppCardAction::fromArray(['caption'=>"Planer", 'link'=>"/pages/desktop/wkParticipo"]),
|
|
],
|
|
])->htmlCode().
|
|
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()
|
|
);
|
|
?>
|
|
</div><!-- End of MitmachApps -->
|
|
|
|
<div class="divider"></div>
|
|
|
|
<!-- List of ConfigStuff -->
|
|
<div class="row" id="Configs">
|
|
<?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()
|
|
);
|
|
// AdminStuff, thats only visible for Admins
|
|
if( isUserAdmin($dbConnection, $userData['id']) ){
|
|
echo(
|
|
AppCard::fromArray([
|
|
'title' =>"lastLogins",
|
|
'description' => lastLoginTable()
|
|
])->htmlCode()
|
|
);
|
|
}
|
|
?>
|
|
</div><!-- End of ConfigStuff -->
|
|
</main>
|
|
<?php
|
|
}
|
|
?>
|
|
</body>
|
|
</html>
|