From: pdontthink Date: Thu, 28 Sep 2006 14:08:43 +0000 (+0000) Subject: Functionality moved to Template class and/or functions/template.php X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=007b4a6b5c042afc60846e5ac314cf58a0bf728e;p=squirrelmail.git Functionality moved to Template class and/or functions/template.php git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11748 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/templates/util_css.php b/templates/util_css.php deleted file mode 100644 index b0ff1040..00000000 --- a/templates/util_css.php +++ /dev/null @@ -1,85 +0,0 @@ -3) AND strtolower(substr($file,strlen($file)-3,3))=='css') { - $files[$file]="$cssroot/$file"; - } - } - } - closedir($dh); - } - if (count($files)>0) { -// sort($files); - return $files; - } - return false; -} - -/** - * Function to create stylesheet links that will work for multiple browsers - * -**/ -function css_link($url, $name = null, $alt = true, $mtype = 'screen', $xhtml_end='/') { - global $http_site_root; - - if ( empty($url) ) - return ''; - // set to lower case to avoid errors - $browser_user_agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); - - if (stristr($browser_user_agent, "msie 4")) - { - $browser = 'msie4'; - $dom_browser = false; - $is_IE = true; - } - elseif (stristr($browser_user_agent, "msie")) - { - $browser = 'msie'; - $dom_browser = true; - $is_IE = true; - } - - if ((strpos($url, '-ie')!== false) and !$is_IE) { - //not IE, so don't render this sheet - return; - } - - if ( strpos($url, 'print') !== false ) - $mtype = 'print'; - - $href = 'href="'.$url.'" '; - $media = 'media="'.$mtype.'" '; - - if ( empty($name) ) { - $title = ''; - $rel = 'rel="stylesheet" '; - } else { - $title = empty($name) ? '' : 'title="'.$name.'" '; - $rel = 'rel="'.( $alt ? 'alternate ' : '' ).'stylesheet" '; - } - - return ' \n"; -} - -