- added simple achievement editor
- added records
This commit is contained in:
@@ -13,19 +13,79 @@ function processPostData($db, $post, $redirectLocation = "."){
|
||||
addAchievement(
|
||||
$db,
|
||||
$post['name'],
|
||||
$post['description']
|
||||
$post['rootId'],
|
||||
$post['achievementGroupId'],
|
||||
$post['level'],
|
||||
$post['description'],
|
||||
$post['imgUrl']
|
||||
);
|
||||
}
|
||||
|
||||
if($post['action']=="addAchievementGroup"){
|
||||
addAchievementGroup(
|
||||
$db,
|
||||
$post['name'],
|
||||
$post['rootId'],
|
||||
$post['unlockingAchievementId'],
|
||||
$post['imgUrl']
|
||||
);
|
||||
}
|
||||
|
||||
if($post['action']=="updateAchievement"){
|
||||
updateAchievement(
|
||||
$db,
|
||||
$post['achievementId'],
|
||||
$post['name'],
|
||||
$post['name'],
|
||||
$post['rootId'],
|
||||
$post['achievementGroupId'],
|
||||
$post['level'],
|
||||
$post['description'],
|
||||
$post['rootId'],
|
||||
$post['level']
|
||||
$post['imgUrl']
|
||||
);
|
||||
}
|
||||
|
||||
if($post['action']=="updateAchievementGroup"){
|
||||
updateAchievement(
|
||||
$db,
|
||||
$post['achievementGroupId'],
|
||||
$post['name'],
|
||||
$post['rootId'],
|
||||
$post['unlockingAchievementId'],
|
||||
$post['imgUrl']
|
||||
);
|
||||
}
|
||||
|
||||
if($post['action']=="setBday"){
|
||||
setBday(
|
||||
$db,
|
||||
$post['userId'],
|
||||
$post['bday']
|
||||
);
|
||||
}
|
||||
if($post['action']=="setRecord"){
|
||||
# $u = getUserData($db, $post['userId']);
|
||||
# $ag = new achievementGroup;
|
||||
# achievementGroup::setDbConnection($db);
|
||||
# $ag->loadAchievementGroupFromDb($post['achievementGroupId']);
|
||||
# $m = $u['vorname']." ".$u['name']." hat in ".$ag->getName()." ".$post['value']." geschafft!";
|
||||
$m = $post['userId']." hat in ".$post['achievementGroupId']." ".$post['value']." geschafft!";
|
||||
sendEmail("cwsvjudo@arcor.de", $m, "[machs] Rekord eingetragen");
|
||||
# setRecord(
|
||||
# $db,
|
||||
# $post['userId'],
|
||||
# $post['achievementGroupId'],
|
||||
# $post['value']
|
||||
# );
|
||||
}
|
||||
if($post['action']=="reportRecord"){
|
||||
# $u = getUserData($db, $post['userId']);
|
||||
# $ag = new achievementGroup;
|
||||
# achievementGroup::setDbConnection($db);
|
||||
# $ag->loadAchievementGroupFromDb($post['achievementGroupId']);
|
||||
$m = $post['userId']." hat in ".$post['achievementGroupId']." ".$post['value']." geschafft!";
|
||||
# $m = $u['vorname']." ".$u['name']." hat in ".$ag->getName()." ".$post['value']." geschafft!";
|
||||
sendEmail("cwsvjudo@arcor.de", $m, "[machs] Rekordmeldung");
|
||||
}
|
||||
if($post['redirectLocation'])
|
||||
$redirectLocation = $post['redirectLocation'];
|
||||
header("Location: ".$redirectLocation);
|
||||
|
||||
Reference in New Issue
Block a user