summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/page_header.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-05-31 09:17:23 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-05-31 09:17:23 +0000
commit00d73a873b0ca6325a235db50e67ab5ff12eab94 (patch)
treee3125a19618f061c9e8bf554bf3c635acac2ec4b /frontends/php/include/page_header.php
parent1c57942f5b57f9afca03b111bf8a4eef2e00fb42 (diff)
downloadzabbix-00d73a873b0ca6325a235db50e67ab5ff12eab94.tar.gz
zabbix-00d73a873b0ca6325a235db50e67ab5ff12eab94.tar.xz
zabbix-00d73a873b0ca6325a235db50e67ab5ff12eab94.zip
- added availability to add js scripts to header (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4217 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/page_header.php')
-rw-r--r--frontends/php/include/page_header.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/frontends/php/include/page_header.php b/frontends/php/include/page_header.php
index 00ec9fa1..05665354 100644
--- a/frontends/php/include/page_header.php
+++ b/frontends/php/include/page_header.php
@@ -341,12 +341,27 @@ COpt::profiling_start("page");
<html>
<head>
<title><?php echo $page['title'] ?></title>
-<?php if(defined('ZBX_PAGE_DO_REFRESH') && $USER_DETAILS["refresh"]) { ?>
- <meta http-equiv="refresh" content="<?php echo $USER_DETAILS["refresh"]; ?>">
-<?php } ?>
+<?php
+ if(defined('ZBX_PAGE_DO_REFRESH') && $USER_DETAILS["refresh"]) {
+ echo '<meta http-equiv="refresh" content="'.$USER_DETAILS["refresh"].'">';
+ }
+ ?>
<link rel="stylesheet" href="css.css">
<meta name="Author" content="ZABBIX SIA">
<script type="text/javascript" src="js/common.js"></script>
+<?php
+ if(isset($page['scripts'])){
+ foreach($page['scripts'] as $script){
+ if(file_exists('js/'.$script)){
+ echo ' <script type="text/javascript" src="js/'.$script.'"></script>'."\n";
+ } elseif(file_exists($script)){
+ echo ' <script type="text/javascript" src="'.$script.'"></script>'."\n";
+ } else {
+ echo '<!-- js script "'.$script.'" not found-->'."\n";
+ }
+ }
+ }
+?>
</head>
<body onLoad="zbxCallPostScripts();">
<?php