]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/order.php
URL edit in surfbar continued (unfinished)
[mailer.git] / inc / modules / order.php
index c0164a51d7994d392cf4f23eb2d476871e61d70f..c2b8ad87324d4f7007d8b48852a3478d3faf6848 100644 (file)
@@ -36,7 +36,7 @@ $URL = "";
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
+} elseif (!EXT_IS_ACTIVE("order"))
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order");
        return;
 } elseif (!IS_MEMBER()) {
@@ -68,9 +68,6 @@ if (empty($URL)) {
 
        // Finally is the entry valid?
        if (SQL_AFFECTEDROWS() == 1) {
-               // Update his login data
-               UPDATE_LOGIN_DATA();
-
                // Load personal data...
                $result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
                 array($GLOBALS['userid']), __FILE__, __LINE__);
@@ -90,7 +87,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("order", $GLOBALS['userid'], $USED);
 
                // Prepare content
                $content = array(
@@ -98,7 +95,8 @@ if (empty($URL)) {
                        'subject'  => $DATA[0],
                        'text'     => $DATA[1],
                        'payment'  => GET_PAYMENT($DATA[3]),
-                       'category' => GET_CATEGORY($DATA[6])
+                       'category' => GET_CATEGORY($DATA[6]),
+                       'url'      => $DATA[5]
                );
 
                // Send an email to the user