- if ((IS_FORM_SENT()) && (REQUEST_ISSET_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(REQUEST_GET('uid')), bigintval(REQUEST_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')));