summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/page_header.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-06-04 12:55:26 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-06-04 12:55:26 +0000
commit9c976c3c04e8a3f9bc9f9dbbdb429d82559f58b0 (patch)
tree928b80f63c70a9b8addd26cf3d099140e5f0febd /frontends/php/include/page_header.php
parent16bfe6f1840d96fda7902f78a781430aa21d1e7e (diff)
downloadzabbix-9c976c3c04e8a3f9bc9f9dbbdb429d82559f58b0.tar.gz
zabbix-9c976c3c04e8a3f9bc9f9dbbdb429d82559f58b0.tar.xz
zabbix-9c976c3c04e8a3f9bc9f9dbbdb429d82559f58b0.zip
- added history of last five visited pages (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4229 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/page_header.php')
-rw-r--r--frontends/php/include/page_header.php30
1 files changed, 25 insertions, 5 deletions
diff --git a/frontends/php/include/page_header.php b/frontends/php/include/page_header.php
index 05665354..d776b53c 100644
--- a/frontends/php/include/page_header.php
+++ b/frontends/php/include/page_header.php
@@ -350,8 +350,8 @@ COpt::profiling_start("page");
<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(isset($page['scripts']) && is_array($page['scripts'])){
+ foreach($page['scripts'] as $id => $script){
if(file_exists('js/'.$script)){
echo ' <script type="text/javascript" src="js/'.$script.'"></script>'."\n";
} elseif(file_exists($script)){
@@ -428,10 +428,10 @@ COpt::compare_files_with_menu($ZBX_MENU);
$table = new CTable();
$table->SetCellSpacing(0);
$table->SetCellPadding(0);
- $table->options['style'] = "width: 100%;";
+ $table->AddOption('style','width: 100%;');
$r_col = new CCol($node_form);
- $r_col->options['style'] = "text-align: right;";
+ $r_col->AddOption('style','text-align: right;');
$table->AddRow(array($menu_table,$r_col));
$table->Show();
@@ -440,9 +440,29 @@ COpt::compare_files_with_menu($ZBX_MENU);
$sub_menu_table->SetCellSpacing(0);
$sub_menu_table->SetCellPadding(5);
$sub_menu_table->AddRow(new CCol($sub_menu_row));
-
$sub_menu_table->Show();
}
+//------------------------------------- <HISTORY> ---------------------------------------
+ if(isset($page['hist_arg'])){
+ $table = new CTable();
+ $table->SetClass('history');
+
+ $table->SetCellSpacing(0);
+ $table->SetCellPadding(0);
+
+ $history = get_user_history();
+ add_user_history($page);
+
+ $tr = new CRow(new CCol('History:','caption'));
+ $tr->AddItem($history);
+
+ $table->AddRow($tr);
+ $table->Show();
+ } else {
+ echo BR;
+ }
+//------------------------------------ </HISTORY> ---------------------------------------
+
unset($ZBX_MENU);
unset($table, $top_page_row, $menu_table, $node_form);