More stuff for mysql3->mysql switch.
[mailer.git] / mailid.php
index 86a71fca41ee21ed368a543f7e9a55c35ee0b013..90a2210fad852c7bfab2b8a7f2010c78bd29cf6e 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Bestaetigung von Mails                           *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
@@ -55,10 +50,10 @@ require('inc/config-global.php');
 setContentType('text/html');
 setHttpStatus('404 Not Found');
 
-// Is the extension mailid active?
+// Is ext-mailid active?
 redirectOnUninstalledExtension('mailid');
 
-// Is the extension other active?
+// Is ext-other active?
 redirectOnUninstalledExtension('other');
 
 // Init data
@@ -80,19 +75,19 @@ if (isGetRequestElementSet('type'))   $data['type']   = getRequestElement('type'
 
 // @TODO Improve check on $data['type'], empty() is not very much ...
 if ((isValidId($data['userid'])) && (isValidId($data['id'])) && (!empty($data['type'])) && (!ifFatalErrorsDetected())) {
-       // No image?
-       if ($data['do'] != 'img') {
-               // ... then output header
-               loadIncludeOnce('inc/header.php');
-       } // END - fi
-
        // Is 'do' still "frames"?
        if ($data['do'] == 'frames') {
                // This is a frameset module
                $GLOBALS['frameset_mode'] = TRUE;
        } // END - if
 
-       // Init result for below SQL_NUMROWS() function
+       // No image?
+       if ($data['do'] != 'img') {
+               // ... then output header
+               loadPageHeader();
+       } // END - fi
+
+       // Init result for below sqlNumRows() function
        $result_main = FALSE;
 
        // Maybe he wants to confirm an email?
@@ -123,12 +118,12 @@ if ((isValidId($data['userid'])) && (isValidId($data['id'])) && (!empty($data['t
                // @TODO Rewrite this to a filter/function
                switch ($data['link_type']) {
                        case 'NORMAL':
-                               $result_mailid = sqlQueryEscaped("SELECT `pool_id`, `userid` AS `sender` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1",
+                               $result_mailid = sqlQueryEscaped("SELECT `pool_id`, `userid` AS `sender`, `url` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1",
                                        array($data['id']), __FILE__, __LINE__);
                                break;
 
                        case 'BONUS':
-                               $result_mailid = sqlQueryEscaped("SELECT `id` AS `pool_id`, `is_notify` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
+                               $result_mailid = sqlQueryEscaped("SELECT `id` AS `pool_id`, `is_notify`, `url` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
                                        array($data['id']), __FILE__, __LINE__);
                                break;
 
@@ -254,7 +249,7 @@ handleMailIdErrorCode($data['error_code']);
 // Insert footer if no image
 if ($data['do'] != 'img') {
        // Write footer
-       loadIncludeOnce('inc/footer.php');
+       loadPageFooter();
 } // END - if
 
 // Really all done here... ;-)