tbrehm
2011-03-23 40843b9dd2060a081e6443d79868d950c157a13d
Added new function get_ispconfig_url() to functions library.
1 files modified
8 ■■■■■ changed files
interface/lib/classes/functions.inc.php 8 ●●●●● patch | view | raw | blame | history
interface/lib/classes/functions.inc.php
@@ -96,6 +96,14 @@
        return number_format((double)$number, $number_format_decimals, $number_format_dec_point, $number_format_thousands_sep);
    }
    
    public function get_ispconfig_url() {
        $url = (stristr($_SERVER['SERVER_PROTOCOL'],'HTTPS'))?'https':'http';
        $url .= '//'.$_SERVER['SERVER_NAME'];
        if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
            $url .= ':'.$_SERVER['SERVER_PORT'];
        }
        return $url;
    }
    
        
}