X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fpage%2Fheader.inc;h=8db8fe9ba5ae8f3b42cbea08022b42b6e48bd558;hb=c061e1b478cb41d22c23627ddff39a4ea7d849ed;hp=9bff3d2f391710be748f72f5b3e34a86c18eb367;hpb=20a783f75445c8889335b8a51cf5723b3b19cdb2;p=fa-stable.git
diff --git a/includes/page/header.inc b/includes/page/header.inc
index 9bff3d2f..8db8fe9b 100644
--- a/includes/page/header.inc
+++ b/includes/page/header.inc
@@ -15,7 +15,7 @@
function help_url($context=null)
{
- global $help_base_url, $help_context, $old_style_help;
+ global $SysPrefs, $help_context;
$country = $_SESSION['language']->code;
$clean = 0;
@@ -34,28 +34,45 @@ function help_url($context=null)
$clean = 1;
}
- if (@$old_style_help)
+ if (@$SysPrefs->old_style_help)
$help_page_url = _($help_page_url);
if ($clean)
$help_page_url = access_string($help_page_url, true);
- return $help_base_url
+ return html_specials_encode(
+ $SysPrefs->help_base_url
.urlencode(strtr(ucwords($help_page_url), array(' '=>'', '/'=>'', '&'=>'And')))
- .'&ctxhelp=1&lang='.$country;
+ .'&ctxhelp=1&lang='.$country);
+}
+
+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()
{
- global $js_lib, $js_static, $js_path, $js_userlib, $comp_path,
- $path_to_root, $go_debug;
+ global $SysPrefs, $path_to_root, $js_static, $js_path, $js_userlib;
$js ='';
foreach($js_static as $jsfile)
{
- $fpath = $comp_path.'/'.user_company().'/js_cache/'.$jsfile;
+ $cached_name = basename($jsfile);
+ $fpath = user_js_cache().'/'.$cached_name;
// compress also static files
- if (!file_exists($fpath) || $go_debug)
+ if (!file_exists($fpath) || $SysPrefs->go_debug)
cache_js_file($fpath, file_get_contents($js_path.$jsfile));
$js .= '