3 function help_url($title, $app)
6 global $help_page_url, $help_base_url, $applications, $help_page_title;
8 if (isset($help_page_url))
10 return $help_base_url.$help_page_url;
14 if (isset($help_page_title))
16 $help_page_url = $help_page_title;
18 elseif ($title==_("Main Menu"))
20 $help_page_url = $applications[$app];
24 $help_page_url = $title;
27 return $help_base_url.urlencode(str_replace(' ', '', ucwords($help_page_url)));
30 function send_scripts()
32 global $js_lib, $js_static, $js_path, $js_userlib, $comp_path,
33 $path_to_root, $go_debug;
38 foreach($js_static as $jsfile)
40 $fpath = $comp_path.'/'.user_company().'/js_cache/'.$jsfile;
41 // compress also static files
42 if (!file_exists($fpath) || $go_debug)
43 cache_js_file($fpath, file_get_contents($js_path.$jsfile));
45 $js .= '<script language="javascript" type="text/javascript" src="'.
46 $fpath . '"></script>';
48 foreach($js_userlib as $jsfile)
50 $js .= '<script language="javascript" type="text/javascript" src="'.
51 $jsfile . '"></script>';
54 foreach($js_lib as $text)
61 function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="")
63 // titles and screen header
64 global $path_to_root, $def_app, $use_popup_windows, $help_base_url;
67 return; // just for speed up
69 $theme = user_theme();
70 $local_path_to_root = $path_to_root;
72 if ($help_base_url != null && $use_popup_windows && $js == '')
74 if (!function_exists('get_js_open_window'))
76 include_once($path_to_root.'/includes/ui/ui_view.inc');
78 add_js_source(get_js_open_window(900, 500));
87 if (!isset($_SESSION["sel_app"]))
88 session_register("sel_app");
89 if (isset($_SESSION["App"]) && is_object($_SESSION["App"]) && isset($_SESSION["App"]->selected_application) &&
90 $_SESSION["App"]->selected_application != "")
91 $sel_app = $_SESSION["App"]->selected_application;
92 elseif (isset($_SESSION["sel_app"]) && $_SESSION["sel_app"] != "")
93 $sel_app = $_SESSION["sel_app"];
96 $_SESSION["sel_app"] = $sel_app;
97 if (isset($_SESSION["App"]) && is_object($_SESSION["App"]))
98 $_SESSION["App"]->selected_application = $sel_app;
99 $encoding = $_SESSION['language']->encoding;
101 if (!headers_sent()){
102 header("Content-type: text/html; charset='$encoding'");
104 echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n";
105 echo "<html dir='" . $_SESSION['language']->dir . "' >\n";
106 echo "<head><title>$title</title>";
107 $local_stylesheet = $_SESSION['language']->get_stylesheet();
108 echo "<meta http-equiv='Content-type' content='text/html; charset=$encoding'>";
109 echo "<link href='$local_path_to_root/themes/$theme/default.css' rel='stylesheet' type='text/css'> \n";
110 if (file_exists($local_path_to_root. "/".$local_stylesheet))
111 echo "<link href='$local_path_to_root/$local_stylesheet' rel='stylesheet' type='text/css'> \n";
118 echo "<body onload=\"$onload\">";
119 include_once($local_path_to_root."/themes/".user_theme()."/renderer.php");
120 $rend = new renderer();
121 $rend->menu_header($title, $no_menu, $is_index);