- if ((isset($_POST['ok'])) && (!empty($_POST['points']))) {
- // Remove depth to prevent booking errors. This is a bad coding
- // practice, thats also why we need to write this project from
- // scratch...
- unset($GLOBALS['ref_level']);
-
- // Ok, add points and send an email to him...
- ADD_POINTS_REFSYSTEM("admin_single", bigintval($_GET['u_id']), bigintval($_POST['points']), false, "0", false, "direct");
+ if ((isFormSent()) && (isPostRequestElementSet('points'))) {
+ // Add points and send an email to him...
+ addPointsDirectly('admin_add_single', bigintval(getRequestElement('userid')), bigintval(postRequestElement('points')));