arbeitscommit
This commit is contained in:
120
homepage/participo/index.php
Normal file
120
homepage/participo/index.php
Normal file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
|
||||
require_once("config.php");
|
||||
|
||||
require_once("./local/dbConf.php");
|
||||
require_once("./local/achievementsConf.php");
|
||||
|
||||
require_once("./lib/db.php");
|
||||
require_once("./lib/achievementsLib.php");
|
||||
require_once("./lib/api.php");
|
||||
|
||||
$dbConnection = getPdoDbConnection(
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
require_once("./auth.php");
|
||||
|
||||
$basePath = "/users/cwsvjudo/www";
|
||||
require_once($basePath."/config/cwsvJudo.config.php");
|
||||
require_once($basePath."/config/phpcount.config.php");
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<!-- inits for the materializeCss -->
|
||||
<?php include("lib/machs/materializeInit.php");?>
|
||||
|
||||
<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>
|
||||
|
||||
<nav> <!-- navbar content here --> </nav>
|
||||
|
||||
<ul id="slide-out" class="sidenav">
|
||||
<li>
|
||||
<div class="user-view">
|
||||
<div class="background">
|
||||
<img src="images/office.jpg">
|
||||
</div>
|
||||
<a href="#user"><img class="circle" src="images/yuna.jpg"></a>
|
||||
<a href="#name"><span class="white-text name">John Doe</span></a>
|
||||
<a href="#email"><span class="white-text email">jdoe@example.com</span></a>
|
||||
</div></li>
|
||||
<li><a href="#!"><i class="material-icons">cloud</i>First Link With Icon</a></li>
|
||||
<li><a href="#!">Second Link</a></li>
|
||||
<li><div class="divider"></div></li>
|
||||
<li><a class="subheader">Subheader</a></li>
|
||||
<li><a class="waves-effect" href="#!">Third Link With Waves</a></li>
|
||||
</ul>
|
||||
<a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
||||
|
||||
|
||||
|
||||
<?php echo $login_status; ?>
|
||||
|
||||
<?php
|
||||
if( hasUserAttribute($dbConnection, $_SESSION['user']['userId'], "inTraining" ) ){
|
||||
echo( "<h2>Eigene Achievements</h2>" );
|
||||
echo( htmlUsersUploadBox($dbConnection, $_SESSION['user']['userId']) );
|
||||
echo(htmlAchievementListForUser(
|
||||
$dbConnection,
|
||||
$achievementGroups,
|
||||
$_SESSION['user']['userId'],
|
||||
getUsersAchievements($dbConnection, $_SESSION['user']['userId'])
|
||||
));
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$usersKids = getUsersKids($dbConnection, $_SESSION['user']['userId']);
|
||||
foreach($usersKids as $k){
|
||||
if( hasUserAttribute($dbConnection, $k['kidId'], "inTraining" ) and ($k['kidId']!=$_SESSION['user']['userId']) ){
|
||||
echo( "<h2>".$k['vorname']." ".$k['name']."</h2>" );
|
||||
echo( htmlUsersUploadBox($dbConnection, $k['kidId']) );
|
||||
echo(htmlAchievementListForUser(
|
||||
$dbConnection,
|
||||
$achievementGroups,
|
||||
$k['id'],
|
||||
getUsersAchievements($dbConnection, $k['id'])
|
||||
));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if(isUserAdmin($dbConnection, $_SESSION['user']['userId'])){
|
||||
echo("<h2 id=\"addAchievementBox\">Add Achievements</h2>");
|
||||
echo(htmlAddAchievementBox());
|
||||
|
||||
echo("<h2>Update Achievements</h2>");
|
||||
$achievements = getAchievements($dbConnection);
|
||||
foreach($achievements as $a){
|
||||
echo( htmlUpdateAchievementBox(
|
||||
$a['id'],
|
||||
$a['name'],
|
||||
$a['description'],
|
||||
$a['rootId'],
|
||||
$a['level']
|
||||
));
|
||||
echo("<hr />");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span id="endOfUpdateAchievementBoxes" style="display:none;" ></span>
|
||||
</body>
|
||||
</html>
|
||||
18
homepage/participo/sidenav.php
Normal file
18
homepage/participo/sidenav.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php if($_SESSION['login']){ ?>
|
||||
<ul id="slide-out" class="sidenav">
|
||||
<li><div class="user-view">
|
||||
<div class="background">
|
||||
<img src="images/office.jpg">
|
||||
</div>
|
||||
<a href="#user"><img class="circle" src="images/yuna.jpg"></a>
|
||||
<a href="#name"><span class="white-text name">John Doe</span></a>
|
||||
<a href="#email"><span class="white-text email">jdoe@example.com</span></a>
|
||||
</div></li>
|
||||
<li><a href="#!"><i class="material-icons">cloud</i>First Link With Icon</a></li>
|
||||
<li><a href="#!">Second Link</a></li>
|
||||
<li><div class="divider"></div></li>
|
||||
<li><a class="subheader">Subheader</a></li>
|
||||
<li><a class="waves-effect" href="#!">Third Link With Waves</a></li>
|
||||
</ul>
|
||||
<a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
||||
<?php } ?>
|
||||
Reference in New Issue
Block a user