- added simple achievement editor
- added records
This commit is contained in:
76
homepage/machs/setUserData.php
Normal file
76
homepage/machs/setUserData.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?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 setUserData(".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"]
|
||||
);
|
||||
|
||||
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>Benutzerdaten ändern</title>
|
||||
<meta name="description" content="Benutzerdaten ändern">
|
||||
|
||||
<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>
|
||||
|
||||
<!-- sidenav -->
|
||||
<?php include("lib/machs/sidenav.php");?>
|
||||
<!-- end sidenav -->
|
||||
|
||||
<h1>Benutzerdaten ändern</h1>
|
||||
<?php
|
||||
$usersKids = getUsersKids($dbConnection, $_SESSION['user']['userId']);
|
||||
foreach($usersKids as $k){
|
||||
if( hasUserAttribute($dbConnection, $k['kidId'], "inTraining" ) ){
|
||||
echo( "<h2 >".$k['vorname']." ".$k['name']."</h2>" );
|
||||
echo( htmlUsersUploadBox($dbConnection, $_SESSION['user']['userId']) );
|
||||
echo( setUserDataBox($k['kidId']) );
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user