- Records page introduced
- rearangements in the include structure
This commit is contained in:
@@ -1,39 +1,20 @@
|
||||
<?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('machs.php');
|
||||
|
||||
require_once("./lib/db.php");
|
||||
require_once("./lib/achievementsLib.php");
|
||||
require_once("./lib/api.php");
|
||||
require_once("./lib/record.php");
|
||||
require_once("./lib/machs/achievementGroup.php");
|
||||
PHPCount::AddHit("Achievementsystem (".htmlspecialchars($_SESSION['user']['username']).")");
|
||||
|
||||
require_once("./auth.php");
|
||||
|
||||
$basePath = "/users/cwsvjudo/www";
|
||||
require_once($basePath."/config/cwsvJudo.config.php");
|
||||
require_once($basePath."/config/phpcount.config.php");
|
||||
require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php");
|
||||
PHPCount::AddHit("Achievementsystem (".htmlspecialchars($_SESSION['user']['username']).")");
|
||||
// require_once($basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
|
||||
|
||||
// $dbConnection = getCwsvJudoDbConn();
|
||||
$dbConnection = getPdoDbConnection(
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
$dbConnection = getPdoDbConnection(
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
|
||||
record::setDbConnection($dbConnection);
|
||||
achievementGroup::setDbConnection($dbConnection);
|
||||
$achievementGroups = achievementGroup::getAllAchievementGroups();
|
||||
|
||||
processPostData($dbConnection, $_POST);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -63,9 +44,8 @@ processPostData($dbConnection, $_POST);
|
||||
|
||||
<?php // show own achievements, if oneself is inTraining
|
||||
if( hasUserAttribute($dbConnection, $_SESSION['user']['userId'], "inTraining" ) ){
|
||||
echo( "<div class=\"row\">");
|
||||
echo( "<h2>Eigene Achievements</h2>" );
|
||||
# var_dump($achievementGroups);
|
||||
echo( "<div style=\"display:flex; flex-wrap:wrap; align-items:stretch;\" class=\"row\">");
|
||||
foreach($achievementGroups as $g){
|
||||
echo($g->asHtmlCard($_SESSION['user']['userId']));
|
||||
}
|
||||
@@ -78,7 +58,7 @@ processPostData($dbConnection, $_POST);
|
||||
foreach($usersKids as $k){
|
||||
if( hasUserAttribute($dbConnection, $k['kidId'], "inTraining" ) ){
|
||||
echo( "<h2>".$k['vorname']." ".$k['name']."</h2>" );
|
||||
echo( "<div class=\"row\">");
|
||||
echo( "<div style=\"display:flex; flex-wrap:wrap; align-items:stretch;\" class=\"row\">");
|
||||
foreach($achievementGroups as $g){
|
||||
echo($g->asHtmlCard($k['kidId'], ['noForm'=>false]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user