- Records page introduced
- rearangements in the include structure
This commit is contained in:
@@ -1,43 +1,23 @@
|
||||
<?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("Achievementbuilder (".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"]
|
||||
);
|
||||
|
||||
if(!isUserAdmin($dbConnection, $_SESSION['user']['userId']))
|
||||
header("Location: .");
|
||||
|
||||
record::setDbConnection($dbConnection);
|
||||
achievementGroup::setDbConnection($dbConnection);
|
||||
|
||||
$achievementGroups = achievementGroup::getAllAchievementGroups();
|
||||
|
||||
processPostData($dbConnection, $_POST);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -75,6 +55,9 @@ processPostData($dbConnection, $_POST);
|
||||
echo($g->htmlEditAchievementGroupForm());
|
||||
|
||||
$achievements = $g->getAchievements();
|
||||
if(empty($achievements)){
|
||||
echo("<h4>Auto Add Achievements</h4>".achievementGroup::htmlAutoAddAchievementsForm($g->getId()));
|
||||
}
|
||||
foreach($achievements as $a){
|
||||
echo("<h4>".$a['name']."</h4>");
|
||||
echo(htmlUpdateAchievementBox(
|
||||
|
||||
Reference in New Issue
Block a user