- Records page introduced
- rearangements in the include structure
This commit is contained in:
79
homepage/machs/records.php
Normal file
79
homepage/machs/records.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?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");
|
||||
require_once("./lib/record.php");
|
||||
require_once("./lib/machs/achievementGroup.php");
|
||||
|
||||
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"]
|
||||
);
|
||||
|
||||
record::setDbConnection($dbConnection);
|
||||
achievementGroup::setDbConnection($dbConnection);
|
||||
$achievementGroups = achievementGroup::getAllAchievementGroups();
|
||||
|
||||
processPostData($dbConnection, $_POST);
|
||||
|
||||
?>
|
||||
<!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://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
|
||||
<!-- Compiled and minified JavaScript -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
||||
<!-- inits for the materializeCss -->
|
||||
<?php include("lib/machs/materializeInit.php");?>
|
||||
|
||||
<title>Achievements</title>
|
||||
<meta name="description" content="Achievements">
|
||||
|
||||
<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>
|
||||
|
||||
<?php include("lib/machs/sidenav.php");?>
|
||||
|
||||
<?php
|
||||
echo("<h1>Rekorde</h1>");
|
||||
foreach($achievementGroups as $group){
|
||||
$ageClasses = record::getAgeClassesWithRecord($group->getId());
|
||||
if(empty($ageClasses))
|
||||
continue;
|
||||
echo("<h2>".$group->getName()."</h2>");
|
||||
foreach($ageClasses as $ageClass){
|
||||
$ageClass = $ageClass['ageClass'];
|
||||
echo("<h3>Altersklasse U".$ageClass."</h3>");
|
||||
$records = record::getGroupsRecords($group->getId(), $ageClass);
|
||||
echo(record::htmlRanking($records));
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user