]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/order.php
Reset rewritten, SQL fixed, zeros are now numeric
[mailer.git] / inc / modules / order.php
index e617ab9b6c972e485765230024ea30cf520f17dd..74fbc6a45a58e087c6444d48f4de7113c72b2503 100644 (file)
@@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
 } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order");
        return;
-} elseif (!IS_LOGGED_IN()) {
+} elseif (!IS_MEMBER()) {
        // Sorry, no guest access!
        $URL = URL."/modules.php?module=index";
 } elseif (empty($_GET['order'])) {
@@ -67,7 +67,7 @@ if (empty($URL)) {
         array($type, bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);
 
        // Finally is the entry valid?
-       if (SQL_AFFECTEDROWS($link) == 1) {
+       if (SQL_AFFECTEDROWS() == 1) {
                // Update his login data
                UPDATE_LOGIN_DATA();
 
@@ -90,7 +90,7 @@ if (empty($URL)) {
                // Update used points
                $ADD = "";
                if ($_CONFIG['order_max_full'] == "ORDER") $ADD = ", mail_orders=mail_orders+1";
-               SUB_POINTS($GLOBALS['userid']), $USED);
+               SUB_POINTS($GLOBALS['userid'], $USED);
 
                // Update mediadata as well
                if (GET_EXT_VERSION("mediadata") >= "0.0.4") {