A new, object-oriented, better vesion of μForum
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.

22 lines
398 B

  1. <?php
  2. function buildURL($URI, $https = false)
  3. {
  4. $url = 'http';
  5. if ($https && USE_HTTPS)
  6. $url .= 's';
  7. $url .= '://'.FORUM_DOMAIN;
  8. if ($https && USE_HTTPS && HTTPS_PORT != 443)
  9. $url .= ':'.HTTPS_PORT;
  10. if ((!$https || !USE_HTTPS) && HTTP_PORT != 80)
  11. $url .= ':'.HTTP_PORT;
  12. if (strpos($URI, FORUM_PATH) === 0)
  13. $url .= $URI;
  14. else
  15. $url .= FORUM_PATH.'/'.$URI;
  16. return $url;
  17. }
  18. ?>