fix credit update condition
This commit is contained in:
@@ -16,7 +16,7 @@ if (!$sql->num_of_rows($check_query) && $_POST['checked'] == "false") {
|
||||
$sql->insert_into('presence', array('pr_user_kid_uk_id' => $_POST['user_id'], 'pr_training_tr_id' => $_POST['tr_id']));
|
||||
log::register('new_presence', 'Edzés: ' . $_POST['tr_id'] . ', gyerek: ' . $_POST['user_id'], null, $_POST['admin_id']);
|
||||
|
||||
if ($_POST['credited']) {
|
||||
if ($_POST['credited'] == 'true') {
|
||||
$sql->update_table('user_kid', array('uk_credit' => $_POST['credit'] + 1), array('uk_id' => $_POST['user_id']));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user