X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-order.php;h=5f5422dc5eb1d9092658829e54310a1ba4880edc;hb=7a6515f7a4a512a6b1922b68aa4f211daad997cd;hp=a85be7e4686e695d87866544fffe6f2ef4a6f76c;hpb=7f104f6fe558bb56b4205241435a2357c2feece1;p=mailer.git diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index a85be7e468..5f5422dc5e 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("member", basename(__FILE__)); +ADD_DESCR("member", __FILE__); $URL = ""; $id = 0; $whereStatement = " WHERE visible='Y'"; @@ -53,7 +53,7 @@ if (empty($_GET['msg'])) $_GET['msg'] = ""; if (empty($_POST['zip'])) $_POST['zip'] = ""; if (empty($_POST['html'])) $_POST['html'] = ""; if (empty($_POST['receiver'])) $_POST['receiver'] = ""; -if (is_admin()) $whereStatement = ""; +if (IS_ADMIN()) $whereStatement = ""; // Add slashes to every value foreach($_POST as $key => $value) @@ -96,16 +96,9 @@ if ($_CONFIG['order_max_full'] == "MAX") $ALLOWED = $MAXI; $HTML_EXT = EXT_IS_ACTIVE("html_mail"); // Now check his points amount -$result_p = SQL_QUERY_ESC("SELECT SUM(points) FROM "._MYSQL_PREFIX."_user_points WHERE userid=%s", - array($GLOBALS['userid']), __FILE__, __LINE__); - -$TOTAL = 0; -if (SQL_NUMROWS($result_p) > 0) -{ - // Load points - list($TOTAL) = SQL_FETCHROW($result_p); - SQL_FREERESULT($result_p); +$TOTAL = GET_TOTAL_DATA($GLOBALS['userid'], "user_points", "points"); +if ($TOTAL > 0) { // And subtract his used points... $TOTAL -= GET_TOTAL_DATA($GLOBALS['userid'], "user_data", "used_points"); @@ -113,14 +106,11 @@ if (SQL_NUMROWS($result_p) > 0) if (!ereg(".", $TOTAL)) $TOTAL .= ".00000"; } -if (($HOLIDAY == "Y") && (GET_EXT_VERSION("holiday") >= "0.1.3")) -{ +if (($HOLIDAY == "Y") && (GET_EXT_VERSION("holiday") >= "0.1.3")) { // Holiday is active! SQL_FREERESULT($result_p); LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_ORDER_NOT_POSSIBLE); -} - elseif ((!empty($_POST['frametester'])) && ($ALLOWED > 0) && ($_POST['receiver'] > 0)) -{ +} elseif ((!empty($_POST['frametester'])) && ($ALLOWED > 0) && ($_POST['receiver'] > 0)) { // Continue with the frametester, we first need to store the data temporary in the pool // // First we would like to store the data and get it's pool position back...