Code:
if (file_exists(DIR_WS_CLASSES . 'browser.php')) {
include_once(DIR_WS_CLASSES . 'browser.php');
$browser = new browser();
$browser_name = strtolower($browser->Name);
if (($browser_name == 'msie') && $browser->Version <= 6) {
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^ie6-/', '.css');
$js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^ie6-/', '.js');
} if (($browser_name == 'msie') && $browser->Version >= 7) {
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^ie7-/', '.css');
$js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^ie7-/', '.js');
} elseif ($browser_name == 'firefox') {
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^ff-/', '.css');
$js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^ff-/', '.js');
} elseif ($browser_name == 'safari') {
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^safari-/', '.css');
$js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^safari-/', '.js');
} elseif ($browser_name == 'chrome') {
$directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^chrome-/', '.css');
$js_directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'js'), '/^chrome-/', '.js');
}
while(list ($key, $value) = each($directory_array )) {
$css_files_to_load[$value] = -100;
}
while(list ($key, $value) = each($js_directory_array )) {
$js_files_to_load[$value] = -500;
}
}
Bookmarks