|
|
- <?php
-
- function buildURL($URI, $https = false)
- {
- $url = 'http';
- if ($https && USE_HTTPS)
- $url .= 's';
-
- $url .= '://'.FORUM_DOMAIN;
- if ($https && USE_HTTPS && HTTPS_PORT != 443)
- $url .= ':'.HTTPS_PORT;
-
- if ((!$https || !USE_HTTPS) && HTTP_PORT != 80)
- $url .= ':'.HTTP_PORT;
-
- if (strpos($URI, FORUM_PATH) === 0)
- $url .= $URI;
- else
- $url .= FORUM_PATH.'/'.$URI;
-
- return $url;
- }
- ?>
|