authenticate("U_Display"); $html = new html; // ----------------------------------------- // require the language file for this script require "languages/{$_SESSION['myprefs']['language']}/addfav.php"; if (!$user['U_Username']) { $html -> not_right ($ubbt_lang['NO_AUTH'],$Cat); } // ----------------------------------------------------------------------- // Grab the last_post date of this thread so we can update the favorites // table $Board = $F_Board; $query = " SELECT B_Last_Post FROM {$config['tbprefix']}Posts WHERE B_Number = '$Thread' "; $sth = $dbh -> do_query($query,__LINE__,__FILE__); list($lastpost) = $dbh -> fetch_array($sth); $query = " UPDATE {$config['tbprefix']}Favorites SET F_LastPost = '$lastpost' WHERE F_Number = '$Entry' "; $dbh -> do_query($query,__LINE__,__FILE__); // ---------------------------------------------------------------------------- // If display is threaded then we need to link to the proper new post, if there // is one if ( ($postmarker) && ($user['U_Display'] == "threaded") ) { $Thread = $postmarker; } // --------------------------- // Now send them to the thread header("Location: {$config['phpurl']}/show{$user['U_Display']}.php?Cat=$Cat&Board=$Board&Number=$Thread&fpart=$partnumber$postmarker&PHPSESSID=$PHPSESSID"); ?>