X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/0e5cca951eafa6193153f171b89a3bbf255152ef..9fb59d5f9af3618e443aba9cc459f4bc682ccceb:/lib/functions.php?ds=inline diff --git a/lib/functions.php b/lib/functions.php index bc119a3..f1f8965 100755 --- a/lib/functions.php +++ b/lib/functions.php @@ -90,6 +90,18 @@ jirafeau_gen_random ($l) return $code; } +function is_ssl() { + if ( isset($_SERVER['HTTPS']) ) { + if ( 'on' == strtolower($_SERVER['HTTPS']) ) + return true; + if ( '1' == $_SERVER['HTTPS'] ) + return true; + } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) { + return true; + } + return false; +} + function jirafeau_human_size ($octets) {