BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

inbox.class.php 893B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. class Inbox
  3. {
  4. /*
  5. * Get the link to a user's inbox.
  6. * This is what handles the ListUnreadPMsFirst setting
  7. *
  8. * @param string - whether the inbox or sentbox should be loaded
  9. * @return string - the URL to a user's inbox
  10. */
  11. public static function get_inbox_link($WhichBox = 'inbox')
  12. {
  13. $ListFirst = isset(G::$LoggedUser['ListUnreadPMsFirst']) ? G::$LoggedUser['ListUnreadPMsFirst'] : false;
  14. if ($WhichBox === 'inbox') {
  15. if ($ListFirst) {
  16. $InboxURL = 'inbox.php?sort=unread';
  17. } else {
  18. $InboxURL = 'inbox.php';
  19. }
  20. } else {
  21. if ($ListFirst) {
  22. $InboxURL = 'inbox.php?action=sentbox&amp;sort=unread';
  23. } else {
  24. $InboxURL = 'inbox.php?action=sentbox';
  25. }
  26. }
  27. return $InboxURL;
  28. }
  29. }