X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-add_points.php;h=f514b885cdee17f65e6ffebc4523d5000e16493f;hb=b8ba3824d640da47d5f81485650b5885ba60867b;hp=a193055a5aca5ed84144132cbfcde50c0d18c011;hpb=357b2ca133fc1f89db74097955c366cb4bee6996;p=mailer.git diff --git a/inc/modules/admin/what-add_points.php b/inc/modules/admin/what-add_points.php index a193055a5a..f514b885cd 100644 --- a/inc/modules/admin/what-add_points.php +++ b/inc/modules/admin/what-add_points.php @@ -58,8 +58,14 @@ if ($_GET['u_id'] == "all") { SQL_FREERESULT($result); if ((isset($_POST['ok'])) && (!empty($_POST['points']))) { + global $DEPTH; + // Remove depth to prevent booking errors. This is a bad coding + // practice, thats also why we need to write this project from + // scratch... + unset($DEPTH); + // Ok, add points and send an email to him... - ADD_POINTS_REFSYSTEM($uid, bigintval($_POST['points']), false, "0", false, "direct"); + ADD_POINTS_REFSYSTEM("admin_all", $uid, bigintval($_POST['points']), false, "0", false, "direct"); // Prepare content $content = array( @@ -93,8 +99,14 @@ if ($_GET['u_id'] == "all") { SQL_FREERESULT($result); if ((isset($_POST['ok'])) && (!empty($_POST['points']))) { + global $DEPTH; + // Remove depth to prevent booking errors. This is a bad coding + // practice, thats also why we need to write this project from + // scratch... + unset($DEPTH); + // Ok, add points and send an email to him... - ADD_POINTS_REFSYSTEM(bigintval($_GET['u_id']), bigintval($_POST['points']), false, "0", false, "direct"); + ADD_POINTS_REFSYSTEM("admin_single", bigintval($_GET['u_id']), bigintval($_POST['points']), false, "0", false, "direct"); // Prepare content $content = array( @@ -110,7 +122,7 @@ if ($_GET['u_id'] == "all") { } else { // Opps, missing form here define('__USER_VALUE', "".$sname." ".$fname.""); - define('__UID_VALUE', $_GET['u_id']); + define('__UID' , bigintval($_GET['u_id'])); LOAD_TEMPLATE("admin_add_points"); } } else {