Files
uf2/inc/misc_functions.php
PioDer a542813c8f implemented buildURL() function (and fixed redirecting on https page)
added comments block (file description) in each PHP file
2015-02-15 14:33:02 +01:00

23 lines
398 B
PHP

<?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;
}
?>