// Process all entries
while ($row = SQL_FETCHARRAY($result_main)) {
- // Merge both arrays
- $content = merge_array($content, $row);
-
// Remove depth to prevent booking errors. This is a bad coding
// practice, thats also why we need to write this project from
// scratch...
addPointsDirectly('admin_all', $content['userid'], bigintval(postRequestParameter('points')));
// Prepare content
- $content['text'] = SQL_ESCAPE(postRequestParameter('reason'));
- $content['points'] = bigintval(postRequestParameter('points'));
+ $content = array(
+ 'reason' => SQL_ESCAPE(postRequestParameter('reason')),
+ 'points' => bigintval(postRequestParameter('points'))
+ );
// Load email template and send email away
$message = loadEmailTemplate('add-points', $content, bigintval($content['userid']));
- sendEmail(bigintval($content['userid']), getMessage('ADMIN_ADD_SUBJ'), $message);
+ sendEmail(bigintval($content['userid']), '{--ADMIN_ADD_SUBJECT--}', $message);
} // END - while
// Free memory
// Prepare content
$content = array(
- 'text' => SQL_ESCAPE(postRequestParameter('reason')),
+ 'reason' => SQL_ESCAPE(postRequestParameter('reason')),
'points' => bigintval(postRequestParameter('points'))
);
// Message laden
$message = loadEmailTemplate('add-points', $content, bigintval(getRequestParameter('userid')));
- sendEmail(bigintval(getRequestParameter('userid')), getMessage('ADMIN_ADD_SUBJ'), $message);
+ sendEmail(bigintval(getRequestParameter('userid')), '{--ADMIN_ADD_SUBJECT--}', $message);
loadTemplate('admin_settings_saved', false, '{--ADMIN_POINTS_ADDED--}');
} else {
// Prepare content
- $content['user'] = '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['surname'] . ' ' . $content['family'] . '</a>';
$content['userid'] = bigintval(getRequestParameter('userid'));
// Output template
}
} else {
// User not found!
- loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid'))) . '</div>');
+ loadTemplate('admin_settings_unsaved', false, getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid'))));
}
} else {
// Output selection form with all confirmed user accounts listed