]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/frametester.php
Rewrote script to use more EL, introduced wrappers for sending pool:
[mailer.git] / inc / modules / frametester.php
index 09898ff036a0818c34be7ee2463df0cef1fb2e98..600958ce57aa2ce48adf71873d4ca6d47c384f14 100644 (file)
@@ -46,11 +46,10 @@ if (isGetRequestElementSet('order')) {
        // Order number placed, is he also logged in?
        if (isMember()) {
                // Ok, test passed... :)
-               $result = SQL_QUERY_ESC("SELECT `url` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s AND `sender`=%s AND `data_type`='TEMP' LIMIT 1",
-                       array(bigintval(getRequestElement('order')), getMemberId()), __FILE__, __LINE__);
+               $content = getPoolDataFromId(getRequestElement('order'));
 
                // Finally is the entry valid?
-               if (SQL_NUMROWS($result) == 1) {
+               if ((count($content) > 0) && ($content['data_type'] == 'TEMP')) {
                        // Load subject and URL (but forwhat do we need the subject line here???
                        list($url) = SQL_FETCHROW($result);
 
@@ -63,9 +62,6 @@ if (isGetRequestElementSet('order')) {
                        // Matching line not found
                        redirectToUrl('modules.php?module=index&what=login');
                }
-
-               // Free memory
-               SQL_FREERESULT($result);
        } else {
                // He is no longer logged in
                redirectToUrl('modules.php?module=index&what=login');