function xhprof_xhprof_include_js_css in XHProf 6
Same name and namespace in other branches
- 7 xhprof.inc \xhprof_xhprof_include_js_css()
Generate references to required stylesheets & javascript.
If the calling script (such as index.php) resides in a different location that than 'xhprof_html' directory the caller must provide the URL path to 'xhprof_html' directory so that the correct location of the style sheets/javascript can be specified in the generated HTML.
File
- ./
xhprof.inc, line 216
Code
function xhprof_xhprof_include_js_css($ui_dir_url_path = NULL) {
if (empty($ui_dir_url_path)) {
$ui_dir_url_path = rtrim(dirname($_SERVER['SCRIPT_NAME']), "/");
}
// style sheets
echo "<link href='{$ui_dir_url_path}/css/xhprof.css' rel='stylesheet' " . " type='text/css'></link>";
echo "<link href='{$ui_dir_url_path}/jquery/jquery.tooltip.css' " . " rel='stylesheet' type='text/css'></link>";
echo "<link href='{$ui_dir_url_path}/jquery/jquery.autocomplete.css' " . " rel='stylesheet' type='text/css'></link>";
// javascript
echo "<script src='{$ui_dir_url_path}/jquery/jquery-1.2.6.js'>" . "</script>";
echo "<script src='{$ui_dir_url_path}/jquery/jquery.tooltip.js'>" . "</script>";
echo "<script src='{$ui_dir_url_path}/jquery/jquery.autocomplete.js'>" . "</script>";
echo "<script src='{$ui_dir_url_path}/js/xhprof_report.js'></script>";
}