'-1',`ID` NOT IN ({$sGotMails}), '1')"; return getResult($sQuery); } /** * This function automatically logins user to your site and makes necessary redirects */ function redirect($sLocation, $iId, $sNick, $sPassword, $iMessageId, $iRecipientId, $sRecipientNick) { global $sScriptHomeUrl; /** * Automatic login to your Web site. * You need to change this section according to your login algorithm. */ $sPassword = md5( $sPassword ); setcookie( "memberID", $iId, 0, '/' ); setcookie( "memberPassword", $sPassword, 0, '/' ); //--- this section makes redirects depending on the specified action ---// switch($sLocation) { case "goToInbox": header("Location: " . $sScriptHomeUrl . getSettingValue("desktop", "scriptMailboxPage")); break; case "goToReadMsg": header("Location: " . $sScriptHomeUrl . getSettingValue("desktop", "scriptMessagePage") . "?message=" . $iMessageId); break; case "goToNewMsg": header("Location: " . $sScriptHomeUrl . getSettingValue("desktop", "scriptComposePage") . "?ID=" . $sRecipientNick); break; default: header("Location: " . $sScriptHomeUrl); } exit(); } ?>