X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fpage%2Fheader.inc;h=ec80dc160973052d407325a37d60e7e951cc453c;hb=09f11ae8dda656ddc48b3d6916f34b93033d9136;hp=880c03f449489eb4ac4729bfbb63327ce3741dd2;hpb=5e63c6ace55729bbb5ee3b060035a25a4426eb0a;p=fa-stable.git diff --git a/includes/page/header.inc b/includes/page/header.inc index 880c03f4..ec80dc16 100644 --- a/includes/page/header.inc +++ b/includes/page/header.inc @@ -40,9 +40,25 @@ function help_url($context=null) if ($clean) $help_page_url = access_string($help_page_url, true); - return $SysPrefs->help_base_url + return htmlspecialchars($SysPrefs->help_base_url .urlencode(strtr(ucwords($help_page_url), array(' '=>'', '/'=>'', '&'=>'And'))) - .'&ctxhelp=1&lang='.$country; + .'&ctxhelp=1&lang='.$country, ENT_QUOTES); +} + +function send_css($css = '') +{ + global $css_files; + + css_files_ensure_init(); + + foreach ($css_files as $css_file) + { + echo " \n"; + } + if ($css) + { + echo " \n"; + } } function send_scripts() @@ -78,14 +94,9 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="" if (in_ajax()) return; // just for speed up -// $jsext = substr_replace($_SERVER['PHP_SELF'], '.js', -4); - -// if (file_exists($_SERVER['DOCUMENT_ROOT'].$jsext)) -// add_js_ufile($jsext); - $theme = user_theme(); - if ($SysPrefs->help_base_url != null && $SysPrefs->SysPrefs->use_popup_windows && $js == '') + if ($SysPrefs->help_base_url != null && $SysPrefs->use_popup_windows && $js == '') { if (!function_exists('get_js_open_window')) { @@ -94,7 +105,7 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="" add_js_source(get_js_open_window(900, 500)); } if ($js!='') - add_js_source($js); + add_js_source($js); if (!isset($no_menu)) { @@ -122,16 +133,17 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="" $encoding = $_SESSION['language']->encoding; if (!headers_sent()){ - header("Content-type: text/html; charset='$encoding'"); + header("Content-type: text/html; charset=$encoding"); } echo "\n"; echo "dir . "' >\n"; echo "$title"; + if (strpos($_SERVER['HTTP_USER_AGENT'], 'Trident/7.0; rv:11.0') != -1) // IE 11 doesn't work with input file type in form. + echo "\n"; echo ""; - echo " \n"; - echo " \n"; - if ($css) - echo ''; + echo " \n"; + + send_css($css); send_scripts();